Get cart details
GET
/stores/{store_id}/cartsGet the cart details including products, customer, total price etc. given the cart session ID.
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.
A unique identifier for the current cart session.
The currency in which the data should be returned. This should be provided as an ISO 4217 currency code. For example, SAR for Saudi Riyal, USD for United States Dollar, KWD for Kuwaiti Dinar, etc.
Request samples
Responses
The response code indicating the result of the API operation.
An optional message providing additional information about the API operation result.
Contains the data payload of the response.
The unique identifier of the cart.
The session ID associated with the cart.
The current phase or status of the cart.
Whether a customer email is required for this cart.
The current order status associated with the cart.
The unique identifier of the order status associated with the cart.
The total value of the items in the cart.
The total quantity of items in the cart.
An array of products added to the cart.
Specifies whether the cart is active or not.
The restrictions applicable during the checkout process for this cart.
The timestamp when the cart was last updated.
The timestamp indicating when the cart is set to expire.
The current date according to the server.
{
"code": "SUCCESS_WITH_SINGLE_PAYLOAD_OBJECT",
"message": "string",
"payload": {
"id": 186720,
"session_id": "YrYr5AAWLzt2rHKcI1ys4FXNmxunLwCp",
"phase": "new",
"required_customer_email": false,
"order_status": {
"name": "Initial",
"code": "initial"
},
"order_status_id": 1,
"total": "0.00",
"total_quantity": 0,
"products": [
{
"is_external_product": false,
"id": null,
"parent_id": null,
"product_class": "string",
"sku": "string",
"barcode": "string",
"name": {
"ar": "string",
"en": "string"
},
"slug": "string",
"price": 0,
"short_description": null,
"sale_price": 50,
"formatted_price": "10$",
"formatted_sale_price": "8$",
"currency": "string",
"currency_symbol": "string",
"attributes": [
{}
],
"categories": [
{}
],
"display_order": null,
"has_options": false,
"has_fields": true,
"images": [
{}
],
"is_draft": true,
"quantity": null,
"is_infinite": true,
"html_url": "string",
"weight": {
"value": 100,
"unit": "kg"
},
"keywords": [
{}
],
"requires_shipping": true,
"is_taxable": false,
"structure": "string",
"seo": {
"title": {
"ar": "string",
"en": "string"
},
"description": {}
},
"rating": {
"average": 3.9,
"total_count": 400,
"1_ratings": {
"percentage": 0,
"count": 0
},
"2_ratings": {
"percentage": 0,
"count": 0
},
"3_ratings": {
"percentage": 0,
"count": 0
},
"4_ratings": {
"percentage": 0,
"count": 0
},
"5_ratings": {
"percentage": 0,
"count": 0
}
},
"store_id": 0,
"purchase_restrictions": {
"min_quantity_per_cart": null,
"max_quantity_per_cart": null,
"availability_period_start": null,
"availability_period_end": null,
"sale_price_period_start": "2024-09-18T21:00:00.000000Z",
"sale_price_period_end": "2024-09-19T20:59:59.000000Z"
},
"metafields": null,
"meta": {},
"badge": {
"body": {
"ar": "string",
"en": "string"
},
"icon": {
"code": "string"
}
},
"related_products_settings": "string",
"related_products_title": null,
"variants": [
{}
],
"options": [
{}
],
"cost": 0,
"is_published": true,
"waiting_customers_count": null,
"description": {},
"custom_user_input_fields": [
{}
],
"custom_option_fields": [
{}
],
"related_products": [
{}
],
"next_product": null,
"previous_product": null,
"group_products": [
{
"id": "143",
"item": {
"id": "string",
"product_class": null,
"sku": "string",
"barcode": "string",
"parent_id": null,
"name": {
"ar": "string",
"en": "string"
},
"slug": "string",
"price": 0,
"short_description": null,
"sale_price": null,
"formatted_price": "string",
"formatted_sale_price": null,
"currency": "string",
"currency_symbol": "string",
"attributes": [
{}
],
"categories": [
{}
],
"display_order": null,
"has_options": true,
"has_fields": true,
"images": [
{}
],
"is_draft": true,
"quantity": null,
"is_infinite": true,
"html_url": "string",
"weight": {
"value": null,
"unit": "string"
},
"keywords": [
{}
],
"requires_shipping": true,
"is_taxable": true,
"structure": "string",
"seo": {
"title": {
"ar": "string",
"en": "string"
},
"description": {}
},
"rating": {
"average": 4.1,
"total_count": 50,
"1_ratings": {
"percentage": 0,
"count": 0
},
"2_ratings": {
"percentage": 0,
"count": 0
},
"3_ratings": {
"percentage": 0,
"count": 0
},
"4_ratings": {
"percentage": 0,
"count": 0
},
"5_ratings": {
"percentage": 0,
"count": 0
}
},
"store_id": 0,
"purchase_restrictions": {
"min_quantity_per_cart": null,
"max_quantity_per_cart": null,
"availability_period_start": null,
"availability_period_end": null
},
"metafields": null,
"meta": null,
"badge": null,
"related_products_settings": "string",
"related_products_title": null,
"created_at": "string",
"updated_at": "string",
"options": [
{}
],
"group_products": null,
"stocks": [
{
"id": "string",
"location": {
"id": "string",
"name": {
"ar": "string"
},
"type": "string"
},
"available_quantity": null,
"is_infinite": false
}
]
},
"origin_product_id": "string",
"item_id": "string",
"item_quantity": 0,
"in_stock": true
}
],
"stocks": [
{
"id": "string",
"location": {
"id": "string",
"name": {
"ar": "string"
},
"type": "string"
},
"available_quantity": null,
"is_infinite": true
}
],
"sold_products_count": null,
"created_at": "string",
"updated_at": "string"
}
],
"cart_active": true,
"checkout_restrictions": {
"someRestrictionField": "example value"
},
"timestamp": "2023-05-22T18:32:31+00:00",
"expiration_time": "2023-05-29T18:32:31+00:00",
"current_date": "2023-05-22"
}
}