Skip to navigation

Create or replace an Account Lookup

This endpoint is an idempotent upsert keyed on the posting code in the path. The postingCode in the body is ignored; the path is authoritative. The lookup attributes and patterns are replaced wholesale.

To create an Account Lookup, send no If-Match, or send If-None-Match: * to make the request fail if the lookup already exists. To replace an existing Account Lookup, If-Match is required and must carry the ETag from your last read - omitting it is rejected with 428, and a stale value with 412.

When the accounting rules approval workflow is enabled the change is queued instead of applied, and 202 is returned with the handle to poll for the approval decision.

Supply X-Change-Set to hold this write in an open change set instead of applying it. The write then returns 200/201 rather than 202, and only reaches the approved configuration once the change set is submitted.

Authentication

AuthorizationBearer

OAuth authentication of the form <token>.

Path parameters

postingCodestringRequired<=128 characters

The posting code of the account lookup. Business keys occupy a single path segment, so a value containing a / is rejected rather than silently changing the route.

Headers

If-MatchstringOptional

The ETag from your last read of the resource. Required when replacing an existing resource, and omitted when creating one.

If-None-MatchenumOptional

Send * for create-only semantics - the request then fails if the resource already exists.

Allowed values:
X-Change-SetstringOptionalformat: "uuid"

The changeSetId of an open change set. When supplied, this request reads or writes against that change set’s working copy instead of the current approved accounting rules configuration - see the Change Sets operations.

Query parameters

commentstringOptional

Comment recorded against the change in the audit trail. Defaults to Changed through the configuration API.

Request

This endpoint expects an object.
postingCodestringOptional<=128 characters

Posting code - the business key. Echoed in responses and ignored in requests, where the value in the path is authoritative.

accountLookupAttributeDefinitionlist of objectsOptional
The attributes this lookup matches on, in the order they are matched.
accountLookupPatternslist of objectsOptional
The patterns this lookup resolves to accounts.

Response headers

ETagstringOptional

Current entity tag of the resource. Supply it as If-Match on a subsequent update or deactivation.

Response

OK
postingCodestringOptional<=128 characters

Posting code - the business key. Echoed in responses and ignored in requests, where the value in the path is authoritative.

accountLookupAttributeDefinitionlist of objectsOptional
The attributes this lookup matches on, in the order they are matched.
accountLookupPatternslist of objectsOptional
The patterns this lookup resolves to accounts.

Errors

400
Bad Request Error
401
Unauthorized Error
409
Conflict Error
412
Precondition Failed Error
428
Precondition Error
429
Too Many Requests Error
5XX
Server Error