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
| Name | Example | Description | Required |
|---|---|---|---|
divaNr (path) | DIVA-123456 | The ID of the configuration to be fetched | yes |
version (query) | 3 | The configuration version. If not provided, the most recent version is fetched | no |
fields (query) | {DivaNr,...} | Field selection to avoid fetching the full object. If not provided, the full configuration is returned | no |
X-API-KEY (header) | xxx | API key used to authorize the request | yes |
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.