Skip to Content
BusinessReceipts Rules

Create a business receipt rule

POST
/v0/business/{business_id}/receipt-rules

A rule for one of the business's ledgers, of any type, or the business's default rule when no ledger is named. A ledger has at most one rule, a business at most one default, and a rule goes with its ledger if that is deleted. Rules take effect on the next transaction to be confirmed or changed, and an admin can re-run them over the business's history.

Scopes: business:update

Authorization

OAuth2ClientCredentialsBearer business:update
headerAuthorizationBearer <token>

Scope: business:update

Path Parameters

business_id*Business Id

The id of the business

Formatbiz_string

Request Body

application/json
  1. body

A business receipt rule to create.

ledger_id?|

The id of the business's ledger the rule applies to, of any type. It comes before every other rule for that ledger. Null for the business's default rule, which covers every expense ledger the business has no rule for and comes before the tenant's rules: a business with a default follows none of them.

never_request?Never Request

Never request a receipt for spend on this ledger, whatever its amount. The threshold is kept for when this is turned off again. On the default rule, this turns requests off for every ledger the business has no rule of its own for; the tenant's rules no longer apply to it.

Defaultfalse
threshold_amount?|

Request a receipt for spend on this ledger at or above this amount, in the country's currency. 0 means every spend.

Default"0"
reason?|

Shown on the request in place of the default message, so the business knows why this receipt matters.

Response Body

Successful Response

application/json
  1. response
id*Id
Formatbrr_string
ledger_id*|

The id of the business's ledger the rule applies to, of any type. It comes before every other rule for that ledger. Null for the business's default rule, which covers every expense ledger the business has no rule for and comes before the tenant's rules: a business with a default follows none of them.

ledger_name*|

The ledger's current name. Null for the business's default rule.

never_request*Never Request

Never request a receipt for spend on this ledger, whatever its amount. The threshold is kept for when this is turned off again. On the default rule, this turns requests off for every ledger the business has no rule of its own for; the tenant's rules no longer apply to it.

threshold_amount*Threshold Amount

Request a receipt for spend on this ledger at or above this amount, in the country's currency. 0 means every spend.

reason*|

Shown on the request in place of the default message, so the business knows why this receipt matters.

Example Request
curl -X POST 'https://api.sandbox.getasset.com/v0/business/biz_GA6EG2qFxA97NZHtxeLPUy/receipt-rules' \  -H 'Content-Type: application/json' \  -d '{}'
Example Response
{  "id": "string",  "ledger_id": "ldg_GA6EG2qFxA97NZHtxeLPUy",  "ledger_name": "Meals & Entertainment",  "never_request": true,  "threshold_amount": 25,  "reason": "Meals need an itemized receipt for CRA."}