Processing personalization results
- 4 minutes to read
After a successful checkout, you can save the personalization results in your Customer's Canvas account for further processing. Here, the special integration entity Project appears. When creating a project, the corresponding private design is marked as permanent and remains in private storage for as long as this project exists.
Creating projects
The project is primarily used to prepare print files used for making a personalized product. Projects store private designs, data obtained during personalization, and information about the order in the online store.
A separate project is created for each product in the order if the product is linked to the Customer's Canvas specification. Depending on the configuration of the personalization process, a single project may include information about multiple elements and their personalized designs. For example, a project for the product representing a postcard in an envelope may include two elements: a postcard and an envelope.
In the Storefront API, the endpoint Projects_CreateWithSingleItem is responsible for creating projects. The parameters are the product identifier in the online store, order information, and personalization results.
curl -X \
POST "https://api.customerscanvashub.com/api/storefront/v1/projects?storefrontId=12" \
-H "accept: text/plain" \
-H "Authorization: Bearer <TOKEN>" \
-d "{'productReference': 'invitation', 'orderId': 1004, 'items': [{ 'designIds': ['642e793dc46d098d64514607', '62da200abb25c5477797d9cb'] }]}"
Here, the designIds
array contains private design IDs saved after personalization.
All projects created under your Customer's Canvas account are displayed on the Projects tab in BackOffice.
Working with Projects
During the life cycle of a project, it can move from one status to another, reflecting the completed stages: creation, confirmation, preparation of a print file, production of products, delivery, and so on.
The possible states and transitions between them are currently finalized. To get information about them, you can use the endpoints Projects_GetAllStatuses and Projects_GetAllTransitions.
curl -X \
GET "https://api.customerscanvashub.com/api/storefront/v1/projects/statuses" \
-H "accept: text/plain" \
-H "Authorization: Bearer <TOKEN>"
The transition between states is performed using the endpoint Projects_ChangeStatus. For example, if the project ID is 906
, you can make it confirmed as follows:
curl -X \
POST "https://api.customerscanvashub.com/api/storefront/v1/projects/906/transitions/confirm" \
-H "accept: text/plain" \
-H "Authorization: Bearer <TOKEN>"
You can get a list of projects related to a given online store and track their status by using the Storefront API endpoint Projects_GetAll. This endpoint supports a paginated output as well as filtering by creation date and status.
curl -X \
GET "https://api.customerscanvashub.com/api/storefront/v1/projects?storefrontId=12" \
-H "accept: text/plain" \
-H "Authorization: Bearer <TOKEN>"
To prepare and download a print file for making a personalized product, you can get its URL from the response of the endpoint Projects_GetProjectProcessingResults. The only parameter is the project identifier. For example, if the project ID is 906
, you can get the print file links as follows:
curl -X \
GET "https://api.customerscanvashub.com/api/storefront/v1/projects/906/processing-results" \
-H "accept: text/plain" \
-H "Authorization: Bearer <TOKEN>"
Next, let's learn how to download rendered print files.