Add a Product Variant to Cart
POST
/catalog/stores/{store_id}/carts/productsThis endpoint allows you to add a specific variant of a product to a shopping cart,
along with any custom fields such as uploaded files, images, text inputs, numbers,
multi-selections, or single selection options.
Custom fields can be used to capture additional product attributes or customer inputs,
like specific dates, text, or selections.
Request
Specifies the Media Types acceptable for the client. In this case, it signals that the client expects a response in the JSON format.
The Authorization token is a unique key given to the third-party application (Partner) by Zid. It is used to authenticate the API requests made by the Partner application. The token verifies the partner's identity and ensures they have permission to access Zid's API but does not provide any specific user or store information. It should be included in the header of API requests when the partner application needs to access Zid's API.
Preferred language for the response. Defaults to en
if not specified.
The unique identifier of the product variant.
The quantity of the product to add to the cart.
An array of custom field objects to further specify product details or customer preferences. Each object includes:
id
: Identifier for the custom field.price_settings
: Identifier for price adjustments based on the field, if applicable.name
: Display name of the custom field.value
: Value or input for the custom field.type
: Type of the custom field (e.g., DATE, TEXT, NUMBER, MULTI_SELECT, SINGLE_SELECT).
The unique identifier for the custom field.
An identifier used to apply specific price settings based on the custom field selection.
Obtain this identifier from the product configuration or pricing settings.
The display name of the custom field.
The value or input for the custom field.
The type of the custom field.
{
"id": "5d376bd6-70dc-4b6b-bcce-37083616fb4e",
"quantity": "1",
"custom_fields": [
{
"id": "40f3a8b5-fec6-488f-8b10-f1552ee63daf",
"price_settings": "price_variation_01",
"name": "Date of Production",
"value": "2012-12-06",
"type": "DATE"
}
]
}
Request samples
Responses
Indicates whether the product variant was successfully added to the cart.
{
"success": true,
"message": "string"
}