Skip to main content

Fetching a Configuration from the Service

Saved configurations can be fetched from the DIVA service via a dedicated backend API.

[WIP] Work in Progress

This documentation is currently under development. If you encounter any gaps, please contact your project manager at Crystal Design.

Endpoint

GET /baskets/<divaNr>?version=<documentVersion>&fields=<requested-fields>

Authentication

The API key must be provided as a request header:

  • X-API-KEY: <api-key>

Parameters

NameExampleDescriptionRequired
divaNr (path)DIVA-123456The ID of the configuration to be fetchedyes
version (query)3The configuration version. If not provided, the most recent version is fetchedno
fields (query){DivaNr,...}Field selection to avoid fetching the full object. If not provided, the full configuration is returnedno
X-API-KEY (header)xxxAPI key used to authorize the requestyes

Example request (cURL)

curl -X GET "https://<your-diva-api-host>/baskets/DIVA-123456?version=3&fields=%7BDivaNr%2COrderSets.SetImage%2COrderSets.OrderLines.PosNr%7D" \
-H "X-API-KEY: <api-key>"

Response

The response is the Configuration Object.

See: The Configuration Object.