API reference
All operations
COMPANY

Inserts or updates company AR records by account number

Each row replaces the company's AR values in full (an omitted amount is saved as 0). A company with no AR record gets one; otherwise its record is updated. Rows whose account number matches no company, or more than one, are skipped and listed with the reason. The whole batch is saved together.

POST/api/v2/companies/ar/bulk-upsert

Authentication

Choose one supported method for this request.

OAuth 2.0 client credentialsAPI key

Request body

application/jsonrequired

One row per account number; an account number may appear only once.

CompanyArUpsertRequest[]

An array. Each item is a CompanyArUpsertRequest:

  • accountNostringrequired
    max length 250
  • aged30number · double
  • aged60number · double
  • aged90number · double
  • aged120number · double
  • over120number · double
  • futureBalancenumber · double
  • totalOutstandingnumber · double
  • creditLimitnumber · double
  • creditTermsstringnullable
    max length 250
  • arAgencyDefaultstringnullable
    max length 250
  • averagePaymentDaysinteger · int32
  • highestBalancenumber · double
  • highestBalanceDatestring · datenullable
  • lastInvoicestring · datenullable
  • lastPaymentstring · datenullable
  • commentsstringnullable

Responses

Batch processed.

Standard response envelopeisSuccessmessageerrorsdata

Read the result from data. When isSuccess is false, errors lists what went wrong. Handling errors

dataCompanyArBulkUpsertResult
  • insertedinteger · int32
  • updatedinteger · int32