Skip to Content
TenantReceipts Rules

Update a tenant receipt rule

PATCH
/v0/tenant/receipt-rules/{rule_id}

Omitted fields keep their current values, and so do fields sent as null, except reason, which null clears.

Scopes: tenant:update

Authorization

OAuth2ClientCredentialsBearer tenant:update
headerAuthorizationBearer <token>

Scope: tenant:update

Path Parameters

rule_id*Rule Id

The id of the receipt rule

Formattrr_string

Request Body

application/json
  1. body

Omitted or null fields keep their current values, except reason, which null clears. A named rule's ledger name can be changed but not removed, and a default rule cannot be given one: delete the rule and create the other kind instead.

country?|

The country of the businesses the rule applies to.

ledger_name?|

The name of the ledger the rule applies to, of any type. Matched case-insensitively against each business's ledgers, so it can name a ledger no business has yet. Omit it for the country's default rule, which covers every expense ledger without a rule of its own. A country with no default rule never asks for receipts on those ledgers, and other ledgers without a rule are never asked for receipts.

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 a default rule, this turns requests off for the country's other expense ledgers.

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
Formattrr_string
country*BusinessCountry

The country of the businesses the rule applies to.

Value in"CA""US"
ledger_name*|

The name of the ledger the rule applies to, of any type. Matched case-insensitively against each business's ledgers, so it can name a ledger no business has yet. Omit it for the country's default rule, which covers every expense ledger without a rule of its own. A country with no default rule never asks for receipts on those ledgers, and other ledgers without a rule are never asked for receipts.

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 a default rule, this turns requests off for the country's other expense ledgers.

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/tenant/receipt-rules/trr_GA6EG2qFxA97NZHtxeLPUy' \  -H 'Content-Type: application/json' \  -d '{}'
Example Response
{  "id": "string",  "country": "CA",  "ledger_name": "Meals & Entertainment",  "never_request": true,  "threshold_amount": 25,  "reason": "Meals need an itemized receipt for CRA."}