API reference › Platforms & people
POST/accounts
Create or link the IDS account of one of your buyers or sellers (a platform's key)
By your externalId of the person. A new e-mail: IDS creates the account and sends its letter naming your platform; an existing IDS account: its holder confirms in their cabinet. Both answer state pending (201) — whether the e-mail had an account is never told. The same externalId again (same e-mail): the same link (200); roles are added, sellerVerified follows you. Another e-mail for the externalId, or the e-mail under another externalId: 409 ACCOUNT_LINK_CONFLICT. A test key: simulated — no IDS account, no letter. At most 300 new requests per platform and environment an hour (429).
- Key scope
accounts:write- Idempotency-Key
- Not used
- URL
https://ids.express/api/v1/accounts
Request body
Unknown fields are rejected (400 VALIDATION_FAILED, details[].path names the field).
application/json — AccountRequest
externalIdstringrequiredlength 1–100pattern ^[^\u0000-\u001F\u007F-\u009F\u2028\u2029]+$The person as the platform knows them — an opaque code, never a name, e-mail or phone.
emailstring (email)requiredlength ≤ 254The person's e-mail, verified by the platform.
firstNamestringrequiredlength 1–100lastNamestringlength 0–100phonestringpattern ^\+?[0-9][0-9 ().-]{4,30}$localestringone of: en · ro · ru · uk · sr · hu · bg · el · zh
The language of IDS letters and of a new account (default: IDS's).
roles[]array of stringrequireditems ≥ 1items ≤ 2buyer, seller or both — one IDS account for a person who is both.
sellerVerifiedbooleanThe platform verified this seller (a new account is then a shop account).
companyobjectA seller that is a company — kept on a new account only.
namestringrequiredlength 1–200vatNumberstringlength ≤ 32registrationNumberstringlength ≤ 32countrystringpattern ^[A-Z]{2}$
Call it
curl -s -X POST "https://ids.express/api/v1/accounts" \
-H "Authorization: Bearer $IDS_KEY" \
-H "Content-Type: application/json" \
-d '{
"externalId": "<externalId>",
"email": "<email>",
"firstName": "<firstName>",
"roles": []
}'Answers
200 { account } — the same externalId again
Headers: X-Request-Id
application/json — AccountEnvelope
accountobjectrequiredexternalIdstringrequiredThe person as the platform knows them.
environmentstringrequiredone of: sandbox · production
A test key's links are simulated (no IDS account, no letter).
statestringrequiredone of: pending · linked · unlinked
pending: IDS is waiting for the person (a new account: activation through the IDS letter; an existing one: its holder's confirmation); linked: confirmed; unlinked: removed (unlinkedBy).
roles[]array of stringrequiredsellerVerifiedbooleanrequiredrequestedAtstring (date-time)requiredlinkedAtstring (date-time)requirednullableunlinkedAtstring (date-time)requirednullableunlinkedBystringrequirednullableone of: platform · person · ids · null
201 { account } — requested
Headers: X-Request-Id
application/json — AccountEnvelope
accountobjectrequiredexternalIdstringrequiredThe person as the platform knows them.
environmentstringrequiredone of: sandbox · production
A test key's links are simulated (no IDS account, no letter).
statestringrequiredone of: pending · linked · unlinked
pending: IDS is waiting for the person (a new account: activation through the IDS letter; an existing one: its holder's confirmation); linked: confirmed; unlinked: removed (unlinkedBy).
roles[]array of stringrequiredsellerVerifiedbooleanrequiredrequestedAtstring (date-time)requiredlinkedAtstring (date-time)requirednullableunlinkedAtstring (date-time)requirednullableunlinkedBystringrequirednullableone of: platform · person · ids · null
400 VALIDATION_FAILED — a field (details[0].path): an e-mail or a phone as externalId, sellerVerified or company without the seller role, a role twice
Headers: X-Request-Id
Codes: VALIDATION_FAILED
The error envelope — Error (error.code, message, retryable, details, requestId); the codes below.
401 AUTHENTICATION_FAILED — missing, malformed, invalid, revoked or expired key
Headers: X-Request-Id
Codes: AUTHENTICATION_FAILED
The error envelope — Error (error.code, message, retryable, details, requestId); the codes below.
403 PLATFORM_KEY_REQUIRED (a key that belongs to no platform) / PLATFORM_SUSPENDED / API_ACCESS_DISABLED / FORBIDDEN_SCOPE
Headers: X-Request-Id
Codes: PLATFORM_KEY_REQUIREDPLATFORM_SUSPENDEDAPI_ACCESS_DISABLEDFORBIDDEN_SCOPE
The error envelope — Error (error.code, message, retryable, details, requestId); the codes below.
409 ACCOUNT_LINK_CONFLICT (details.reason)
Headers: X-Request-Id
Codes: ACCOUNT_LINK_CONFLICT
The error envelope — Error (error.code, message, retryable, details, requestId); the codes below.
429 RATE_LIMITED — per-key or per-IP limit exceeded; wait Retry-After seconds
Headers: X-Request-IdRetry-After
Codes: RATE_LIMITED
The error envelope — Error (error.code, message, retryable, details, requestId); the codes below.
500 INTERNAL_ERROR
Headers: X-Request-Id
Codes: INTERNAL_ERROR
The error envelope — Error (error.code, message, retryable, details, requestId); the codes below.
503 API_DISABLED (API switched off); CARRIER_NOT_CONFIGURED / CURRENCY_RATE_MISSING where a carrier or FX rate is used
Headers: X-Request-Id
Codes: API_DISABLEDCARRIER_NOT_CONFIGUREDCURRENCY_RATE_MISSING
The error envelope — Error (error.code, message, retryable, details, requestId); the codes below.
Error codes of this operation
The codes the answers of this operation name. Always read error.retryable of the answer itself — «varies» means it differs per answer. The gates of every keyed request (401, 403, 429, 503) and the whole catalog: errors.
The request is invalid: a field (details[].path), an unknown field, a missing Idempotency-Key, a body that is not JSON, an address the label cannot print. Fix it; repeating it unchanged fails again.
AUTHENTICATION_FAILEDHTTP 401retryable: noMissing, malformed, invalid, revoked or expired key; an environment tag that does not match. (An account switched off answers 403 API_ACCOUNT_DISABLED since SEC.)
PLATFORM_KEY_REQUIREDHTTP 403retryable: noAccounts of a platform's people are for a platform's service-account key only — this key belongs to no platform.
PLATFORM_SUSPENDEDHTTP 403retryable: noThe platform of this key is suspended by IDS: quotes, bookings and test operations are refused until IDS resumes it; reads, the tracking refresh, a cancellation and a complaint still work. A retry of a booking finished before the suspension replays its answer.
API_ACCESS_DISABLEDHTTP 403retryable: noAPI access is switched off for this account.
FORBIDDEN_SCOPEHTTP 403retryable: noThe key lacks the scope of this operation (x-scope).
This externalId is linked with another e-mail, or the e-mail with another externalId of this platform (details.reason) — remove the link first (DELETE /accounts/{externalId}/link).
RATE_LIMITEDHTTP 429retryable: yesA limit per minute — the key's requests, its quotes, its platform's keys together, or the client IP (limitScope) — wait Retry-After seconds (retryAfterSec, limit).
INTERNAL_ERRORHTTP 500retryable: noUnexpected — for a booking, check GET /shipments before using a new key; quote the requestId.
API_DISABLEDHTTP 503retryable: noIDS switched the whole API off (/ping and /openapi.json keep answering).
CARRIER_NOT_CONFIGUREDHTTP 503retryable: noThe carrier credentials of this environment are missing.
CURRENCY_RATE_MISSINGHTTP 503retryable: noIDS has no exchange rate for the balance currency.