Skip to Content
BusinessReceipts Rules

Update a business receipt rule

PATCH
/v0/business/{business_id}/receipt-rules/{rule_id}

Omitted fields keep their current values, and so do fields sent as null, except reason, which null clears. A default rule cannot be given a ledger.

Scopes: business:update

Authorization

OAuth2ClientCredentialsBearer business:update
headerAuthorizationBearer <token>

Scope: business:update

Path Parameters

rule_id*Rule Id

The id of the receipt rule

Formatbrr_string
business_id*Business Id

The id of the business

Formatbiz_string

Request Body

application/json
  1. body

Omitted or null fields keep their current values, except reason, which null clears. A default rule cannot be given a ledger.

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 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?||

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.

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 PATCH 'https://api.sandbox.getasset.com/v0/business/biz_GA6EG2qFxA97NZHtxeLPUy/receipt-rules/brr_GA6EG2qFxA97NZHtxeLPUy' \  -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."}