Exporting customizations

Description

When your application or online store retrieves an order which contains one or more customizations, every customization consists of a unique reference, e.g.:

1
45.3618204e-f166-4a53-8a7f-0ce2828b17ca

This reference breaks down in two parts, separated by a point (.):

Both parts are needed to access the endpoint.

Endpoint

Use following endpoint to retrieve customization exports:

1
https://api.colorlab.io/v1/configuration/:id/:token/export

And replace :id and :token with the ID and Token of the customization of which you need to retrieve a generated export file.

The response of this endpoint has a Content-Disposition header equal to attachment and sends the raw data of the export to the client.

Generating the signature

Create a verification string containing this data:
shop_id + customization_id + configuration_token

Example: with values 123, abc and 789, the verification string is:

123abc789

Now use your API secret to compute a sha256 HMAC signature. You can test the output using online generators like https://www.freeformatter.com/hmac-generator.html.

Use the resulting value in the X-Colorlab-Api-Signature header when requesting the API.