Create or update a courier by external id
const url = 'https://example.com/api/couriers/sync';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"externalId":"example","fullName":"example","phone":"example","email":"example","additionalInfo":"example","tags":["example"],"transportId":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","status":"Active"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/api/couriers/sync \ --header 'Content-Type: application/json' \ --data '{ "externalId": "example", "fullName": "example", "phone": "example", "email": "example", "additionalInfo": "example", "tags": [ "example" ], "transportId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "status": "Active" }'Matches an existing courier by external id; answers 201 when no match is found and a new courier is created, 200 when an existing courier is updated. Fails with 409 when the matched courier is archived or has been erased.
Authorizations
Заголовок раздела «Authorizations»Request Bodyrequired
Заголовок раздела «Request Bodyrequired»A courier’s profile, pushed from an external system and matched by external id.
object
Your system’s id for this courier. Sending the same id again updates the courier instead of creating a second one.
The courier’s full name.
The courier’s phone number.
The courier’s email address; omit if none.
Free-text notes about the courier; omit if none.
The courier’s capability-skill tags; omit or send an empty list for none.
The vehicle to permanently assign the courier to; omit for none.
Responses
Заголовок раздела «Responses»OK
The result of syncing a courier by external id.
object
The courier’s id — the same one on every later sync of this external id.
Whether this call created a new courier (Created) or updated an existing one matched by external id (Updated).
Example
{ "outcome": "Created"}Created
The result of syncing a courier by external id.
object
The courier’s id — the same one on every later sync of this external id.
Whether this call created a new courier (Created) or updated an existing one matched by external id (Updated).
Example
{ "outcome": "Created"}Validation failed
The body of a 400 response, served as application/problem+json. It follows the RFC 9457 problem-details shape: type, title, status and detail are the standard members, and errors is an extension that lists the offending fields.
object
A stable, machine-readable code for the error. Branch on this rather than on the wording of the title or the detail.
A short label for the kind of failure, such as Validation failed.
The HTTP status code of the response, which for this body is 400.
A human-readable explanation of this particular failure, or null.
The fields the request was rejected over, one entry each. Omitted entirely when the failure carries no field-level context, so a 400 can arrive without this member.
One field the request was rejected over.
object
The name of the offending field, spelled as the request body spells it.
A stable, machine-readable code for this field’s failure.
The rejected value. Always present, and null when it was not safe to echo back.
A human-readable explanation of what is wrong with the field.
Set only by the dispatcher application’s manual planning operations — integration endpoints never set it. True when every problem in this refusal is a tenant-policy refusal the operator may override by re-sending the same request with force: true. Omitted otherwise.
Examplegenerated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "errors": [ { "field": "example", "code": "example", "value": "example", "message": "example" } ], "overridable": true}Missing or invalid credentials
Authenticated, but the role or scope does not allow this
Not found
RFC 9457 problem body returned on every failure. type carries a stable machine-readable error code (see docs/api/error-codes.yaml), title a short human summary, status the HTTP status, detail the specific message.
object
Examplegenerated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example"}Conflict
RFC 9457 problem body returned on every failure. type carries a stable machine-readable error code (see docs/api/error-codes.yaml), title a short human summary, status the HTTP status, detail the specific message.
object
Examplegenerated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example"}Rate limit exceeded, or an Idempotency-Key request is still in flight; retry after the Retry-After header
RFC 9457 problem body returned on every failure. type carries a stable machine-readable error code (see docs/api/error-codes.yaml), title a short human summary, status the HTTP status, detail the specific message.
object
Examplegenerated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example"}Unexpected error
RFC 9457 problem body returned on every failure. type carries a stable machine-readable error code (see docs/api/error-codes.yaml), title a short human summary, status the HTTP status, detail the specific message.
object
Examplegenerated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example"}