Requests and responses

The headers you send and the ones we set, the three statuses of a change, and the formats of amounts, times and identifiers.

On this page

Every address is $RDC_BASE_URL/<product>/v1/… and every body, in a request or an answer, is JSON.

Address and version

The base address comes with your account. After it come the product and the version of its API, such as /inventory/v1. Only HTTPS is answered. Versioning and deprecation says what the version promises.

Headers

HeaderDirectionMeaning
AuthorizationYou send itBearer $RDC_TOKEN, on every request. See API authentication.
Content-TypeYou send itapplication/json on a request that has a body.
AcceptYou send itapplication/json. Every answer is JSON.
X-RDC-Customer-Org-IdWe set itYour organisation, taken from the token. A copy that you send is overwritten.
X-RDC-Legal-Company-IdWe set itYour legal company, taken from the token. A copy that you send is overwritten.
X-RDC-Request-IdOn every answerThe identifier of the request, the same as requestId in an error. Keep it with your logs.

A client is bound to the company of its token. A change whose body names customerOrgId and legalCompanyId must name the ones of the token, otherwise the answer is 403 forbidden.

Reading

A read answers 200 with the record or with a list. A record carries its revision.

A balance, answer 200

{
  "customerOrgId": "a3f1d7c2-64be-4b09-9d58-2c0e7f1a8b34",
  "legalCompanyId": "c8b25e90-1d47-4f3a-a6d2-93e0b51f7c68",
  "productId": "7d0c4e19-b3a2-4f65-8e91-2a6f5c8d3b40",
  "locationId": "1b9e6a35-d4c7-4082-b5f3-9e0a7c2d8164",
  "onHand": "180",
  "reserved": "0",
  "available": "180",
  "revision": 7
}

Changing

A change answers 202 with the result of the operation: operationId, status and aggregateRevision. A product may add fields to it, such as the ids of what it recorded. The change is applied once, however many times you send it with the same operationId.

A change, answer 202

{
  "operationId": "3b7e41a8-9c25-4d60-b8f3-1a05e6d27c94",
  "status": "completed",
  "aggregateRevision": 8,
  "movementIds": [
    "f2a95c08-6d41-4e7b-83a0-b7d14e92c5a6"
  ]
}

StatusMeaning
accepted The request was recorded and is being applied.
completed The change was applied.
rejected The request was understood and refused. Nothing was changed.

On accepted, the change is not applied yet: read the operation again later with GET /operations/{operationId}, as Idempotency and retries shows, or wait for the event of the change. aggregateRevision is the revision of the record after the change.

Formats

KindRuleWhy
Amounts and quantitiesDecimal strings, such as "24" or "1250.00"Most languages read a JSON number as a binary float, which can round. A string keeps every digit.
Dates and timesUTC, with the offset: 2026-11-20T09:41:05ZOne clock for every company and every country.
IdentifiersOpaque stringsStore and send them as you got them. Do not parse them or rely on their length.
Unknown fields in answers and eventsYou ignore themA product can add a field to an answer or an event. Your code keeps working.
Unknown fields in requestsRefused with 400 invalid_requestA request that names a field the contract does not have is refused, and fields names it.