Below are the detailed specifications for the JSON object literals for the cart that must be passed from the merchant website for Breeze integration.
Description: All the required data will be passed in this sole JSON object literal from the merchant website. Details of each key and its corresponding value types are outlined in the table below. Example attached at the end of the document for more reference.
| Key | Type | Required |
|---|---|---|
cartId | string | Yes |
customerId | number | No |
currency | string | Yes |
emailId | string | No |
data_id | number | No |
stockId | number | Yes |
isGuestCheckoutAllowed | boolean | No |
possible_onepage_checkout | boolean | No |
items | [MagentoCartItem] | Yes |
storeId | string | Yes |
subTotal | string | No |
subtotal_incl_tax | string | No |
subtotal_excl_tax | string | No |
subtotalAmount | string | Yes |
summary_count | number | Yes |
website_id | string | No |
totalWeight | number | No |
weightUnit | string | No |
extra_actions | string | No |
journey | string | No |
order | MagentoOrder | No |
Description: This object literal will contain the details of each item in the cart. Details of each key and its corresponding value types are outlined in the table below.
| Key | Type | Required |
|---|---|---|
item_id | string | Yes |
message | string | No |
options | [MagentoCartItemOption] | No |
product_id | string | Yes |
product_image | MagentoCartItemProductImage | Yes |
product_name | string | Yes |
product_price_value | number | Yes |
product_sku | string | Yes |
product_type | string | No |
product_url | string | No |
qty | number | Yes |
weight | number | No |
weightUnit | string | No |
configure_url | string | No |
is_visible_in_site_visibility | boolean | No |
product_has_url | boolean | No |
product_price | string | No |
canApplyMsrp | boolean | No |
Description: This data will be passed as the value for product_image inside MagentoCartItem.
| Key | Type | Required |
|---|---|---|
alt | string | No |
height | number | No |
src | string | Yes |
width | number | No |
Description: This mainly contains address data for the customer, which is essential to generate payment details and will be passed under Cart.
| Key | Type | Required |
|---|---|---|
shipping_address | MagentoAddress | Yes |
billing_address | MagentoAddress | Yes |
email | string | No |
Description: Address data details.
| Key | Type | Required |
|---|---|---|
regionCode | string | Yes |
region | string | Yes |
street | [string] | Yes |
countryId | string | Yes |
city | string | Yes |
firstname | string | Yes |
lastname | string | No |
telephone | string | Yes |
postcode | string | Yes |
{
"cartId": "631",
"customerId": 1,
"currency": "INR",
"emailId": null,
"data_id": 1716416005,
"stockId": 1,
"isGuestCheckoutAllowed": true,
"possible_onepage_checkout": true,
"items": [
{
"item_id": "1210",
"message": "",
"options": [
{
"label": "Size",
"option_id": 144,
"option_value": "169",
"value": "L"
},
{
"label": "Color",
"option_id": 93,
"option_value": "56",
"value": "Orange"
}
],
"product_id": "1556",
"product_image": {
"alt": "Radiant Tee",
"height": 150,
"src": "https://magento.test/media/catalog/product/cache/89e1327584a2193ffd98c3fae211a266/w/s/ws12-orange_main_2.jpg",
"width": 150
},
"product_name": "Radiant Tee",
"product_price_value": 22,
"product_sku": "WS12-L-Orange",
"product_type": "configurable",
"product_url": "https://magento.test/radiant-tee.html",
"qty": 1,
"weight": 1,
"weightUnit": "lbs",
"configure_url": "https://magento.test/checkout/cart/configure/id/1210/product_id/1556/",
"is_visible_in_site_visibility": true,
"product_has_url": true,
"product_price": "\n\n <span class="price-excluding-tax" data-label="Excl. Tax">\n <span class="minicart-price">\n <span class="price">₹22.00</span> </span>\n\n </span>\n",
"canApplyMsrp": false
}
],
"storeId": "1",
"subTotal": null,
"subtotal_incl_tax": "<span class="price">₹22.00</span>",
"subtotal_excl_tax": "<span class="price">₹22.00</span>",
"subtotalAmount": "22.0000",
"summary_count": 1,
"website_id": "1",
"totalWeight": 1,
"weightUnit": "lbs",
"extra_actions": "",
"order": {
"shipping_address": {
"regionCode": "MI",
"region": "Michigan",
"street": [
"6146 Honey Bluff Parkway"
],
"countryId": "US",
"city": "Calder",
"firstname": "Veronica",
"lastname": "Costello",
"telephone": "(555) 229-3326",
"postcode": "49628-7978"
},
"billing_address": {
"regionCode": "MI",
"region": "Michigan",
"street": [
"6146 Honey Bluff Parkway"
],
"countryId": "US",
"city": "Calder",
"firstname": "Veronica",
"lastname": "Costello",
"telephone": "(555) 229-3326",
"postcode": "49628-7978"
},
"email": "roni_cost@example.com"
}
}