Skip to main content
The v2 standard resources are described by an OpenAPI 3.1 document, generated from the code and checked against it on every change, so it matches what the API accepts and returns: openapi-v2.json It includes every path of those resources, with their parameters, body and response schemas, the 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

Generated clients send the API key you configure once (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 in openapi-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.

Stability

v2 is BETA: additive changes (new fields, endpoints, error codes) ship without notice, so ignore unknown fields. Breaking changes are announced in the changelog.