Accountant Portal

Create a merchant rule for this customer

#3039. Accountant login only: the service token is refused. Creates a company rule, which outranks a global rule for the same merchant. glAccountCode must be an active, postable account in this customer's chart: an unknown, inactive, locked, non-postable or parent account (judged against the whole chart) is 422. The rule's account name and type are taken from that account. merchantPattern needs at least 3 characters, cannot contain %, _, a backslash or a control character, and cannot consist only of generic words such as fee or payment (422). A pattern and match field another rule of this customer already has is 409. Rows already categorized are not changed; rows still in needs_review with no category are categorized by it on the next sync, and an exact rule with a Revenue target releases that customer's held Stripe revenue on the next posting attempt. Writes an audit_logs row (entity_type merchant_rule, action create) in the same transaction as the rule: if the row cannot be written, no rule is created.

post/accountant/companies/{customerId}/merchant-rules

Request

  • Base URL
    https://api.medianfi.com/api/v1
  • Auth
    HTTP bearer

Path parameters

customerId, string uuid required

Request body

object required
merchantPattern, string required
matchField, 'merchant_name' | 'description'
glAccountCode, string required
priority, integer

Response

The created rule

object required
success, boolean
data, object

Changes

No recorded changes to this operation across all 110 revisions of this API.