Create and submit an AP adjustment

Writes the adjustment header, its lines and the resulting payment schedules, and submits them, in one transaction. Any failure rolls all of it back, so the call either succeeds completely or leaves nothing behind and can be sent again unchanged.

Returns the new adjustment id, not the adjustment - read the detail back with the GET. Reusing an externalId is refused with 409 and never alters the adjustment that already exists; its id is returned so it can be retrieved.

Which line fields apply depends on creditType: Against Invoice lines name the invoice line they credit and take the payment period from it, On Account lines carry a payDate and the payment period themselves. Each field says when it applies.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Body Params

The adjustment to create and submit

string
length ≤ 240

Your own reference, unique per tenant. Optional, but without it a repeat request creates a second adjustment

string
required

Credit Memo or Debit Memo. Send the code or the meaning; must be an enabled PAY_ADJ_TYPE value

string
required

On-Account or Against Invoice - decides which line fields apply. Code or meaning; must be an enabled PAY_CREDIT_TYPE value

string
required

Code or meaning; must be an enabled PAY_CREDIT_METHOD value

string

Optional - the vendor is derived from the site code. If sent, it must own that site

string
required

Must be an active site in the business unit given

date
required

Date the adjustment takes effect

date
required

Must not be earlier than the adjustment date

string
required

Must be an active business unit

string
required

Code or meaning; must be an enabled PAY_ADJ_REASON_CODE value

string
required

Why the adjustment was raised

string
required

Name or code, matched against the currencies configured for this tenant

customAttributes
array of objects

Up to 35 name/value pairs against the header

customAttributes
lines
array of objects
required

At least one line; accepts multiple lines

lines*
Responses

Language
Credentials
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json