GET /v1/expense-rules #
The recurring-vendor rules
Not paged: the response is the complete list.
Responses
Example response
{
"rules": [
{
"id": "0192f0b4-6f6e-7c3a-9a3e-6a1f2b3c4d5e",
"vendor_match": "string",
"category": "infrastructure",
"currency": "string",
"tax_bps": 0,
"expected_amount_minor": "string",
"tolerance_bps": 0,
"auto_approve": false,
"app_id": "0192f0b4-6f6e-7c3a-9a3e-6a1f2b3c4d5e"
}
]
}
curl
curl -X GET https://YOUR-API-ADDRESS/v1/expense-rules \
-H "Authorization: Bearer $PAYRUDDER_API_KEY"
POST /v1/expense-rules #
Add a recurring-vendor rule
A vendor whose name contains vendor_match gets the category, currency and tax of the rule. With auto_approve the console records the expense on its own when the amount read from the document is within tolerance_bps of expected_amount_minor.
Request body
| Field | Type | Description |
|---|
id | string · uuid | |
vendor_match required | string | Case-insensitive text the vendor name contains |
category required | ExpenseCategory | |
currency required | string | |
tax_bps | integer | The tax share of the amount, in basis points |
expected_amount_minor | string · int64 | What this vendor usually bills, in minor units; 0: no expectation |
tolerance_bps | integer | |
auto_approve | boolean | Needs an expected amount |
app_id | string · uuid | |
Example
{
"vendor_match": "string",
"category": "infrastructure",
"currency": "string"
}
Responses
Example response
{
"id": "0192f0b4-6f6e-7c3a-9a3e-6a1f2b3c4d5e",
"vendor_match": "string",
"category": "infrastructure",
"currency": "string",
"tax_bps": 0,
"expected_amount_minor": "string",
"tolerance_bps": 0,
"auto_approve": false,
"app_id": "0192f0b4-6f6e-7c3a-9a3e-6a1f2b3c4d5e"
}
curl
curl -X POST https://YOUR-API-ADDRESS/v1/expense-rules \
-H "Authorization: Bearer $PAYRUDDER_API_KEY" \
-H "Content-Type: application/json" \
-d '{"vendor_match":"string","category":"infrastructure","currency":"string"}'
PUT /v1/expense-rules/{id} #
Replace a recurring-vendor rule
Parameters
| Name | In | Type | Description |
|---|
id required | path | string · uuid | |
Request body
| Field | Type | Description |
|---|
id | string · uuid | |
vendor_match required | string | Case-insensitive text the vendor name contains |
category required | ExpenseCategory | |
currency required | string | |
tax_bps | integer | The tax share of the amount, in basis points |
expected_amount_minor | string · int64 | What this vendor usually bills, in minor units; 0: no expectation |
tolerance_bps | integer | |
auto_approve | boolean | Needs an expected amount |
app_id | string · uuid | |
Example
{
"vendor_match": "string",
"category": "infrastructure",
"currency": "string"
}
Responses
Example response
{
"id": "0192f0b4-6f6e-7c3a-9a3e-6a1f2b3c4d5e",
"vendor_match": "string",
"category": "infrastructure",
"currency": "string",
"tax_bps": 0,
"expected_amount_minor": "string",
"tolerance_bps": 0,
"auto_approve": false,
"app_id": "0192f0b4-6f6e-7c3a-9a3e-6a1f2b3c4d5e"
}
curl
curl -X PUT https://YOUR-API-ADDRESS/v1/expense-rules/<id> \
-H "Authorization: Bearer $PAYRUDDER_API_KEY" \
-H "Content-Type: application/json" \
-d '{"vendor_match":"string","category":"infrastructure","currency":"string"}'