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/customerAccepts a JSON array of customer entries.
| Field | Type | Notes |
|---|---|---|
id | string (GUID) | |
externalId | string | |
customerNumber | string | |
source | string | |
firstName | string | |
lastName | string | |
companyName | string | |
customerType | string | |
email | string | Used as the upsert key if present |
phone | string | |
mobilePhone | string | |
vatNumber | string | |
orgNumber | string | |
currency | string | |
warehouseId | string | |
invoiceToCountryCode | string | |
shipToCountryCode | string | |
invoicingAddress | object | See Address below |
shipToAddress | object | See Address below |
shipToAddresses | array of object | Multiple named delivery addresses, each shaped like Address |
extendedInfo | array | See Extended Info |
checksum | string | |
hasVatNumber | boolean | |
hasCustomerNumber | boolean | |
contacts | array of object | See 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
| Field | Type | Notes |
|---|---|---|
id | string (GUID) | |
externalId | string | |
defaultAddress | boolean | |
code | string | |
contact | string | |
address1 | string | |
address2 | string | |
zip | string | |
city | string | |
county | string | |
country | string | |
phone | string | |
extendedInfo | array | See Extended Info |
checksum | string |
Contact
| Field | Type | Notes |
|---|---|---|
code | string | |
firstName | string | |
lastName | string | |
email | string | |
phone | string | |
mobilePhone | string | |
jobTitle | string | |
extendedInfo | array | See 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 parameter | Notes |
|---|---|
count | Number of entries to retrieve. Default 100 if omitted. |
acknowledge | The 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": []
}
]
}