GET, POST, PATCH, and DELETE. Other related conventions for our API can be found in the section below.
Gated EndpointsLabeled with:Gated FeatureSome of the features offered by Commerce are gated and require explicit activation.
In order to get access you need to contact your account manager.
Beta EndpointsLabeled with:Beta FeatureCommerce offers various features as part of our beta release track. These features are experimental and subject to change or removal at any time. They may also have limited support and stability.By default, accounts do not have access to beta features unless explicitly subscribed to beta releases. If you would like to enable beta features, please contact your account manager for subscription options.
JSON Conventions
- Resources are addressable by a UUIDv4
idproperty. - Property names are always in
snake_case. - Temporal data is encoded in ISO 8601 strings.
Empty Strings and Omitted Fields
The empty string is not a value. A string field is either omitted or present with a real value — and where a field is nullable, an explicitnull unsets it. Never send "".
Where a field is validated as a string, "" is rejected with 422 Unprocessable Entity and a field error
on that path (see Request Errors for the response format). Not every field carries that
validation, so do not treat the rejection as a safety net: where it is absent, "" is accepted and then
stored or forwarded verbatim — an empty string travels further into a request than a missing field ever does.
Authentication
Commerce supports API keys to authenticate requests. The keys are passed in via the HTTP headerx-api-key.
API Use
API Versions
Commerce API will be updated regularly, to include new features and updates to existing ones. We package these changes into versions that can be addressed using a header field (x-hellgate-version).
If there is no version specified in the header, the most recent version is being used.
x-hellgate-version header on API responses, to tell the integrator which version is in use.
Idempotency
To prevent your system from handling requests twice and thus, for example, charging a customer twice, Commerce supports idempotency on requests to the API. The behavior is controlled via the header fieldx-idempotency-Key.
Pagination
Endpoints that return lists of objects support cursor-based pagination requests. By default, Commerce returns up to 50 objects per API call. If the number of objects in a response from a support endpoint exceeds the default, then an integration can use pagination to request a specific set of the results and/or to limit the number of returned objects. If an endpoint supports pagination, the response body follows this structure:Response Sample
Request Errors
Commerce uses the standard errors to indicate the client errors on the gateway level.- Invalid Requests - HTTP 4xx
- Unprocessable Content - HTTP 422
The response payload for processing errors follows a standard format.