Categorization
Create Rule
Creates a new categorization rule.
POST
/
v0
/
platform
/
categorization
/
rules
Authorization
Body
curl --request POST \
--url https://api.sandbox.teal.dev/v0/platform/categorization/rules \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '{
"expression": "<string>",
"ledger_name": "<string>",
"name": "<string>",
"priority": 123
}'
{
"expression": "t.description == Fuel",
"id": "N6ntpvTtiA4L31vVyVat5n",
"ledger_name": "Fuel Expenses",
"name": "Fuel Expenses",
"priority": 100
}
Authorizations
Authorization
string
headerrequiredThe access token received from the authorization server in the OAuth 2.0 flow.
Body
application/json
expression
string
requiredThe expression to match on transactions.
ledger_name
string
requiredThe name of the destination ledger.
name
string
requiredThe name of the rule.
priority
integer
requiredThe priority of the rule.
Response
201 - application/json
expression
string
requiredid
string
requiredledger_name
string
requiredname
string
requiredpriority
integer
requiredcurl --request POST \
--url https://api.sandbox.teal.dev/v0/platform/categorization/rules \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '{
"expression": "<string>",
"ledger_name": "<string>",
"name": "<string>",
"priority": 123
}'
{
"expression": "t.description == Fuel",
"id": "N6ntpvTtiA4L31vVyVat5n",
"ledger_name": "Fuel Expenses",
"name": "Fuel Expenses",
"priority": 100
}