Naar de inhoud
Open Nexym

Create or update a customer

POST
/api/connect/customers
curl --request POST \
--url https://app.nexym.nl/api/connect/customers \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "reference": "CUST-0099", "name": "Acme Interiors", "email": "ops@example.com", "phone": "+31 10 123 4567" }'

Upserts a customer by reference within the key’s project. An existing record is matched on (project_id, reference); only the fields present in the payload are written, and any key not listed in the request schema is ignored rather than rejected.

Requires customers: write.

Media typeapplication/json

The write payload for a customer. Only these four keys are read; anything else in the body is ignored.

object
reference
required

Matched against an existing customer in this project.

string
name
required
string
email

Must be a valid address when present.

string | null format: email
phone
string | null

An existing customer was updated.

Media typeapplication/json

A customer record. Personal data — every read of this resource is written to the project’s access log.

object
id
integer
project_id
integer
reference

The canonical customer key. A guest, which has no customer number at the source, is keyed by e-mail address instead.

string
name
string
email
string | null format: email
is_guest

Inferred from an order rather than synced from the system that owns customers.

boolean | null
discovered_via

Which entity the record was first seen on, for a guest.

string | null
phone
string | null
vat_number
string | null
gender
string | null
date_of_birth

A date-only value, serialised at midnight.

string | null format: date-time
billing

A denormalised address or contact block, stored as JSON exactly as the mapping produced it. Keys vary by connector and by project mapping; treat it as an open object rather than a fixed shape.

object | null
shipping

A denormalised address or contact block, stored as JSON exactly as the mapping produced it. Keys vary by connector and by project mapping; treat it as an open object rather than a fixed shape.

object | null
meta

Free-form store for fields the universal schema does not define for everybody: a connector’s declared extension fields and a project’s own customer fields, each under its own name.

object | null
source_connection_id
integer | null
created_at
string | null format: date-time
updated_at
string | null format: date-time

Example

{
"id": 2201,
"project_id": 3,
"reference": "CUST-0099",
"name": "Acme Interiors",
"email": "ops@example.com",
"is_guest": false,
"discovered_via": "order",
"phone": "+31 10 123 4567",
"vat_number": "NL123456789B01",
"gender": null,
"date_of_birth": "1984-03-02T00:00:00.000000Z",
"billing": {
"name": "Acme Interiors",
"street": "Voorstraat 12",
"postcode": "1234 AB",
"city": "Middelburg",
"country": "NL"
},
"shipping": {
"name": "Acme Interiors",
"street": "Voorstraat 12",
"postcode": "1234 AB",
"city": "Middelburg",
"country": "NL"
},
"meta": {
"service_code": "INSTALL-STD"
},
"source_connection_id": 7,
"created_at": "2026-04-11T09:55:12.000000Z",
"updated_at": "2026-09-14T13:41:05.000000Z"
}

A new customer was created.

Media typeapplication/json

A customer record. Personal data — every read of this resource is written to the project’s access log.

object
id
integer
project_id
integer
reference

The canonical customer key. A guest, which has no customer number at the source, is keyed by e-mail address instead.

string
name
string
email
string | null format: email
is_guest

Inferred from an order rather than synced from the system that owns customers.

boolean | null
discovered_via

Which entity the record was first seen on, for a guest.

string | null
phone
string | null
vat_number
string | null
gender
string | null
date_of_birth

A date-only value, serialised at midnight.

string | null format: date-time
billing

A denormalised address or contact block, stored as JSON exactly as the mapping produced it. Keys vary by connector and by project mapping; treat it as an open object rather than a fixed shape.

object | null
shipping

A denormalised address or contact block, stored as JSON exactly as the mapping produced it. Keys vary by connector and by project mapping; treat it as an open object rather than a fixed shape.

object | null
meta

Free-form store for fields the universal schema does not define for everybody: a connector’s declared extension fields and a project’s own customer fields, each under its own name.

object | null
source_connection_id
integer | null
created_at
string | null format: date-time
updated_at
string | null format: date-time

Example

{
"id": 2201,
"project_id": 3,
"reference": "CUST-0099",
"name": "Acme Interiors",
"email": "ops@example.com",
"is_guest": false,
"discovered_via": "order",
"phone": "+31 10 123 4567",
"vat_number": "NL123456789B01",
"gender": null,
"date_of_birth": "1984-03-02T00:00:00.000000Z",
"billing": {
"name": "Acme Interiors",
"street": "Voorstraat 12",
"postcode": "1234 AB",
"city": "Middelburg",
"country": "NL"
},
"shipping": {
"name": "Acme Interiors",
"street": "Voorstraat 12",
"postcode": "1234 AB",
"city": "Middelburg",
"country": "NL"
},
"meta": {
"service_code": "INSTALL-STD"
},
"source_connection_id": 7,
"created_at": "2026-04-11T09:55:12.000000Z",
"updated_at": "2026-09-14T13:41:05.000000Z"
}

No key, a key that does not match, a revoked key, or an expired one. The body says which, and nothing else — an unusable key is never described further.

Media typeapplication/json

Every error this API returns carries a single human-readable message.

object
message
required
string

Examples

No bearer token, or one too short to hold a prefix

{
"message": "Missing or invalid API key."
}

The key is valid but its abilities do not cover this resource at this right.

Media typeapplication/json

Every error this API returns carries a single human-readable message.

object
message
required
string

Examples

{
"message": "This API key lacks read access to orders."
}

The payload failed validation. The framework’s standard shape: a summary message plus an errors map of field to messages. Requires Accept: application/json — without it the response is a 302 redirect instead.

Media typeapplication/json
object
message
required
string
errors
required

Field name to the list of messages that field failed on.

object
key
additional properties
Array<string>

Examples

Exampleproduct
{
"message": "The reference field is required. (and 1 more error)",
"errors": {
"reference": [
"The reference field is required."
],
"name": [
"The name field is required."
]
}
}

The per-minute rate limit was exceeded. The limit is 120 requests per minute by default (CONNECT_API_RATE_PER_MIN), counted per API key — or per IP address for a request that never authenticated.

Media typeapplication/json

Every error this API returns carries a single human-readable message.

object
message
required
string

Examples

Examplelimited
{
"message": "Too many requests — slow down."
}
Retry-After
integer

Seconds until the limit resets.

X-RateLimit-Limit
integer

Requests allowed per minute.

X-RateLimit-Remaining
integer

Requests left in the current window.