Add to Cart

Important

This article is valid only for custom integrations of the 3D Product Configurator via API. If you're searching for information on how to disable/enable the Add to Cart button on your product page, please read here.

 

The process of adding a configured product to the cart is initialized by the Configurator UI and must be completed by a server to server communication using the following API to obtain the information of a product configuration.

This API allows starting from the identifier of a configuration and the quantity required to obtain:

  • The list of attributes with the respective selected options
  • The sum of the unit price for the attributes where the price is managed on the Zakeke side

Your system must be able to save the design identifier as an additional property in the cart item element.

The unit price of the product must be increased by the unit price of the configuration reported by Zakeke. The price of the configuration is always in the base currency set in the Zakeke API settings. The price of the configuration must be converted into the correct currency.

Depending on the settings of your system, product, and the customer, the tax settings must be calculated for the configuration price.

Depending on the settings of your system, product, and the customer, the applicable discounts must be calculated for the configuration price.

Every time the consumer changes the quantity for the shopping cart line, that must be updated by calling this API again with the new quantity.

It is possible to bring in the cart the image of the configured product provided by Zakeke, as well as the list of attributes with the respective values chosen by the consumer.

Configuration cart properties

preview
"preview": "https://..."

Url to image preview of the configured product.

price
"price": 19.99

The sum of the unit price for the attributes where the price is managed on the Zakeke side.
The price of the configuration is always in the base currency set in the Zakeke API settings.

items
"items": [
{
"attributeCode": "{\"id\":\"242422342\",\"label\":\"Color\",\"zakekePlatform\":true}",
"attributeName": "Color",
"selectedOptionCode": "{"id":"537564567","label":"White","zakekePlatform":true}",
"selectedOptionName": "White"
}
]

The list of attributes and respective chosen option.

For attributes that are linked to attributes on the store, the attributeCode and selectedOptionName properties each contain a json serialized with the sentinel zakekePlatform property and the id of your system.

designID
"designID": "000-2vXWy19gyU6jK3Wamdpm6A"

The optional designID associated to the composition.

Add to Cart endpoint

GET https://api.zakeke.com/v1/compositions/{composition}/cartinfo
Retrieves the information on a product configuration.
quantity

Product quantity.

(default: 1)

Retrieve the information on a product configuration with quantity 5.

GET https://api.zakeke.com/v1/compositions/315-e4848045-91c2-44b2/cartinfo?quantity=5

Response

HTTP/1.1 200 OK
{
  "preview": "https://...",
  "price": 19.99,
  "items": [
{
"attributeCode": "{\"id\":\"242422342\",\"label\":\"Color\",\"zakekePlatform\":true}",
"attributeName": "Color",
"selectedOptionCode": "{"id":"537564567","label":"White","zakekePlatform":true}",
"selectedOptionName": "White"
}
],
"designID": "000-2vXWy19gyU6jK3Wamdpm6A" }

 

Was this article helpful?
0 out of 0 found this helpful