x-api-key security
scheme, the x-organization-id header of every operation and the deprecation flags. Errors follow
problem details. It includes nothing else: the routes that list the ids a record needs (a
facility, a unit, a LER code…) are not in it, see Lookups outside the document.
Generate a client
x-api-key) and take x-organization-id in every call: one
key acts on its own organization and on its subsidiaries, so each request says which. Every bulk write (each
POST of these resources except the webhook endpoints) also takes an Idempotency-Key: one per batch, reused only
to retry that same batch.
Postman / Insomnia
Import → Link →https://code.dcycle.io/openapi-v2.json. Postman turns x-api-key into the collection’s
Authorization (variable apiKey), and every request gets an x-organization-id header: set its value, e.g. to a
{{organizationId}} collection variable.
Lookups outside the document
A record refers to Dcycle’s catalogs and to your organization’s data by id. The routes that list those ids are not v2 standard resources and are not inopenapi-v2.json: a generated client does not have them, and they answer errors in
the historical format of the older endpoints (see Errors), not as problem details, and most of
their timestamps have no offset (see Timestamps). They take
the same two headers as the v2 resources: send only x-api-key and x-organization-id. The request acts as the key’s
owner, who must be a member of that organization.
When one of them moves to the v2 standard, the changelog says so.