Creates or updates customers in Business Central. If a customer already exists on the queue, the entry is replaced by the new one — matched by e-mail address if present, otherwise by customer code.

Add customers to the queue

POST https://onbrightcom.com/gateway/v1/customer

Accepts a JSON array of customer entries.

FieldTypeNotes
idstring (GUID)
externalIdstring
customerNumberstring
sourcestring
firstNamestring
lastNamestring
companyNamestring
customerTypestring
emailstringUsed as the upsert key if present
phonestring
mobilePhonestring
vatNumberstring
orgNumberstring
currencystring
warehouseIdstring
invoiceToCountryCodestring
shipToCountryCodestring
invoicingAddressobjectSee Address below
shipToAddressobjectSee Address below
shipToAddressesarray of objectMultiple named delivery addresses, each shaped like Address
extendedInfoarraySee Extended Info
checksumstring
hasVatNumberboolean
hasCustomerNumberboolean
contactsarray of objectSee Contact below

Request

[
  {
    "externalId": "20000",
    "customerNumber": "20000",
    "source": "example-shop",
    "firstName": "Anna",
    "lastName": "Karlsson",
    "customerType": "Person",
    "email": "anna.karlsson@example.com",
    "phone": "+46 31 555 0123",
    "currency": "SEK",
    "invoicingAddress": {
      "address1": "Storgatan 4",
      "city": "Göteborg",
      "zip": "411 03",
      "country": "SE"
    },
    "extendedInfo": []
  }
]

Response

201 Created
"1 customer(s) queued"

Address

FieldTypeNotes
idstring (GUID)
externalIdstring
defaultAddressboolean
codestring
contactstring
address1string
address2string
zipstring
citystring
countystring
countrystring
phonestring
extendedInfoarraySee Extended Info
checksumstring

Contact

FieldTypeNotes
codestring
firstNamestring
lastNamestring
emailstring
phonestring
mobilePhonestring
jobTitlestring
extendedInfoarraySee Extended Info — Customer is one of the resources where Extended Info appears at more than one level: on the customer itself, and independently on each contact.

Retrieve customers from the queue

GET https://onbrightcom.com/gateway/v1/customer
Query parameterNotes
countNumber of entries to retrieve. Default 100 if omitted.
acknowledgeThe acknowledgeToken from your previous batch — pass it to close that batch and advance the queue.
{
  "count": 1,
  "acknowledgeToken": "5b2f7c1a-8d4e-4b9a-9f31-2c6a8e1d4b90",
  "nextLink": "/customer?acknowledge=5b2f7c1a-8d4e-4b9a-9f31-2c6a8e1d4b90",
  "data": [
    {
      "externalId": "20000",
      "customerNumber": "20000",
      "firstName": "Anna",
      "lastName": "Karlsson",
      "email": "anna.karlsson@example.com",
      "extendedInfo": []
    }
  ]
}