Skip to main content
POST
/
v1
/
businesses
/
{businessId}
/
categorization-rules
/
{categorizationRuleId}
/
archive
Archive categorization rule
curl --request POST \
  --url https://sandbox.layerfi.com/v1/businesses/{businessId}/categorization-rules/{categorizationRuleId}/archive \
  --header 'Authorization: Bearer <token>'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "business_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z",
  "name": "<string>",
  "category": {
    "type": "AccountId",
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
  },
  "suggestion_1": {
    "type": "AccountId",
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
  },
  "suggestion_2": {
    "type": "AccountId",
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
  },
  "suggestion_3": {
    "type": "AccountId",
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
  },
  "merchant_type_filter": "<string>",
  "transaction_description_filter": "<string>",
  "counterparty_filter": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "name": "<string>",
    "logo_url": "<string>",
    "website": "<string>"
  },
  "bank_transaction_type_filter": "REVENUE",
  "bank_direction_filter": "MONEY_IN",
  "amount_min_filter": 123,
  "amount_max_filter": 123
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

Content-Type
string

Content-Type must be set to application/json

Path Parameters

businessId
string<uuid>
required

The UUID of the business

categorizationRuleId
string<uuid>
required

The UUID of the categorization rule

Response

Categorization rule archived successfully

A categorization rule that automatically categorizes transactions matching specified filters

id
string<uuid>
required

Unique identifier for the rule

business_id
string<uuid>
required

The business this rule belongs to

created_at
string<date-time>
required

When the rule was created

updated_at
string<date-time>
required

When the rule was last updated

name
string

Name of the rule

category
Account ID · object

ID of the account

suggestion_1
Account ID · object

ID of the account

suggestion_2
Account ID · object

ID of the account

suggestion_3
Account ID · object

ID of the account

merchant_type_filter
string

Regex pattern matching merchant type

transaction_description_filter
string

Regex pattern matching transaction description

counterparty_filter
object

Information about a transaction counterparty (merchant/vendor)

bank_transaction_type_filter
enum<string>

Type of bank transaction

Available options:
REVENUE,
LOAN_DISBURSEMENT,
REFUND_RECEIVED,
INCOMING_P2P_TRANSFER,
INTRA_ACCOUNT_TRANSFER_IN,
CHECK_WITHDRAWAL,
ATM_DEPOSIT,
BANK_DEPOSIT,
BANK_VERIFICATION_TRIAL_CREDIT,
REVERSAL_IN,
CREDIT_CARD_REWARD,
CREDIT_CARD_PAYMENT_IN,
INTEREST_EARNED,
GOVERNMENT_OR_OTHER_GRANT,
TAX_REFUND,
PURCHASE,
REFUND_GIVEN,
OUTGOING_P2P_TRANSFER,
INTRA_ACCOUNT_TRANSFER_OUT,
CHECK_DEPOSIT,
CREDIT_CARD_PAYMENT_OUT,
ATM_WITHDRAWAL,
BANK_WITHDRAWAL,
BANKING_FEE,
PAYMENT_PROCESSING_FEE,
BANK_VERIFICATION_TRIAL_DEBIT,
REVERSAL_OUT,
LOAN_PAYMENT,
TAX_PAYMENT,
NOT_ENOUGH_INFORMATION
bank_direction_filter
enum<string>

Transaction direction that this rule matches

Available options:
MONEY_IN,
MONEY_OUT
amount_min_filter
integer<int64>

Minimum amount in cents

amount_max_filter
integer<int64>

Maximum amount in cents