Cart
The cart features are essential for buyers. The Cart API
enables users to create,
replace, update, and delete data retrieved from the cart.
POST api/v2/cart# Create CartPOST /api/v2/cart/replace# Replace CartPUT /api/v2/cart/update# Update CartPUT /api/v2/cart/update-bulk# Update Cart (Bulk)GET /api/v2/cart# Retrieve CartGET /api/v2/cart/total-quantity# Retrieve Total Quantity CartDEL /api/v2/cart/8086# Delete CartPUT /api/v2/cart/restore# Restore CartPOST /api/v2/cart/store-bulk# Create Cart (Bulk)
Create Cart
Users can initiate the order creation process by providing essential information such as product quantity, fulfillment type, delivery options, and additional features.
Headers
The JSON containing ID, quantity, product ID, fulfillment type, delivery option, ZIP code, warranty, and installation sends raw data in the request body.
Bearer Authorization
token
To access the API, you must use the token.
Attributes
message
string
It shows the success message.
data
null
It is optional.
meta
null
It is optional.
errors
null
It is optional.
POST /api/v2/cart
curl --location 'https://appliance-api.com/api/v2/cart' \
--header 'x-api-key: your_api_key' \
--header 'x-tenant-id: your_tenant_id' \
--header 'Authorization: Bearer 5f00cadbd42e5Z4MgOKxphsNmIy7ibGSpuplj7l1uwF6t7WeKmhc2X3dG47KsE8lQB8aAESoQ' \
--data '{
"id": 300,
"quantity": 1,
"product_id": "MDB8959SKZ",
"fulfillment_type": 1,
"delivery_option_id": 1,
"zip_code": 63011,
"warranty_selected": [],
"install_selected": []
}'
{
"code": "200",
"message": "Success",
"data": null,
"meta": null,
"errors": null
}
Replace Cart
Users can replace the old cart data on the website.
Headers
The JSON containing ID, quantity, product ID, fulfillment type, delivery option, ZIP code, warranty, and installation sends raw data in the request body.
Bearer Authorization
token
To access the API, you must use the token.
Parameters
is_popular
boolean
The param is used to show the popular brand category.
Attributes
Nothing in the API.
POST /api/v2/cart/replace
curl --location 'https://appliance-api.com/api/v2/cart/replace' \
--header 'x-api-key: your_api_key' \
--header 'x-tenant-id: your_tenant_id' \
--header 'Authorization: {{customer_token}}' \
--data '{
"carts" : [
{
"id": 583,
"quantity": 1,
"sku": "ART318FFDW",
"fulfillment_type": null,
"delivery_option_id": null,
"zip_code": 40241,
"warranty_selected": [],
"install_selected": []
}
]
}'
No response body.
This request doesn't return any response body.
Update Cart
Users are allowed to modify and update their carts.
Headers
The JSON, which includes cart ID, ID, quantity, product ID, fulfillment type, delivery option, ZIP code, warranty, installation, haul away charge, and haul quantity, sends raw data in the request body.
Bearer Authorization
token
To access the API, you must use the token.
Parameters
No parameter required.
Attributes
message
string
It shows the success message.
data
null
It is optional.
meta
null
It is optional.
errors
null
It is optional.
PUT /api/v2/cart/update
curl --location --request PUT 'https://appliance-api.com/api/v2/cart/update' \
--header 'x-api-key: your_api_key' \
--header 'x-tenant-id: your_tenant_id' \
--header 'Authorization: Bearer 5f00cadbd42e5Z4MgOKxphsNmIy7ibGSpuplj7l1uwF6t7WeKmhc2X3dG47KsE8lQB8aAESoQ' \
--data '{
"cart_id": 4473,
"id": 583,
"quantity": 1,
"product_id": "ART318FFDW",
"fulfillment_type": 3,
"delivery_option_id": null,
"zip_code": 40241,
"warranty_selected": [],
"install_selected": [],
"haul_away_charge": 10,
"qty_haul": 1
}'
{
"code": "200",
"message": "Success",
"data": null,
"meta": null,
"errors": null
}
Update Cart (Bulk)
The user might want to update all the data in their cart at once, and this API can be used to replace the current contents.
Headers
The JSON, which includes cart ID, ID, quantity, product ID, fulfillment type, delivery option, ZIP code, warranty, installation, haul away charge, and haul quantity, sends raw data in the request body.
Bearer Authorization
token
To access the API, you must use the token.
Parameters
message
string
No parameter required.
Attributes
message
string
It shows the success message.
data
null
It is optional.
meta
null
It is optional.
errors
null
It is optional.
PUT /api/v2/cart/update-bulk
curl --location --request PUT 'https://appliance-api.com/api/v2/cart/update-bulk' \
--header 'x-api-key: your_api_key' \
--header 'x-tenant-id: your_tenant_id' \
--header 'Authorization: Bearer 5f00cadbd42e5Z4MgOKxphsNmIy7ibGSpuplj7l1uwF6t7WeKmhc2X3dG47KsE8lQB8aAESoQ' \
--data '{
"carts" : [
{
"cart_id": 4473,
"id": 583,
"quantity": 1,
"product_id": "ART318FFDW",
"fulfillment_type": null,
"delivery_option_id": null,
"zip_code": 40241,
"warranty_selected": [],
"install_selected": []
}
]
}'
{
"code": "200",
"message": "Success",
"data": null,
"meta": null,
"errors": null
}
Retrieve Cart
Retrieving the data from the cart displays its detailed contents.
Headers
The JSON, which includes cart ID, ID, quantity, product ID, fulfillment type, delivery option, ZIP code, warranty, installation, haul away charge, and haul quantity, sends raw data in the request body.
Bearer Authorization
token
To access the API, you must use the token.
Parameters
zip_code
number
*It is used to sort based on the zip code of the area.
Attributes
cart_id
number
The id of the cart history.
product_id
string
The id of the product.
is_unavailable
number
The option of availability.
in_stock
number
The option of stock availability.
status
string
The status of the cart.
image
string
The url of image.
id
string
The id of the product.
brand_id
number
The id of the product's brand.
brand_name
string
The name of the product's brand.
brand_image
string
The url of the brand's image.
name
string
The name of the product.
link_category_name
string
The link of category's name.
link_subcategory_name
string
The link of subcategory's name.
link_detail_category_name
string
The link of category's name.
short_description
string
The description of the product category.
color
string
The color of the product.
price
string
The price of the product.
price_sale
string
The sale price of the product.
savings
string
The savings of the user.
regular_price
string
The regular price of the product.
install
array of objects
The array of objects.
install_id
string
The id of installation.
install_name
string
The name of installation.
description
string
The description of installation.
description
string
The description of installation.
install_price
string
The price of installation.
category_name
string
The name of the product category.
subcategory_name
string
The subcategory name of the product.
detail_category_name
string
The name of the detail category.
date_created
string
The date of the payment created.
date_updated
string
The date of the payment updated.
detail_install
array of objects
The installation details.
id
number
The id of installation detail.
install_id
string
The unique identifier of installation.
warranty
empty string
It is optional to include this.
quantity
number
The quantity of the product in the cart.
install_selected
empty string
It is optional to include this.
warranty_selected
empty string
It is optional to include this.
fulfillment_types
array of objects
Including the details of fulfillment type.
fulfillment_type
number
The type of fulfillment.
fulfillment_type_name
string
The name of fulfillment type.
estimated_availability
string
The estimation of fulfillemnt type availability.
estimated_availability_desc
string
The description of estimation availability.
subtotal
number
The subtotal price in the cart.
GET /api/v2/cart (Retrieve Cart)
curl --location 'https://appliance-api.com/api/v2/cart?zip_code=63011' \
--header 'x-api-key: your_api_key' \
--header 'x-tenant-id: your_tenant_id' \
--header 'Authorization: Bearer 5f00cadbd42e5Z4MgOKxphsNmIy7ibGSpuplj7l1uwF6t7WeKmhc2X3dG47KsE8lQB8aAESoQ'
{
"data": [
{
"cart_id": 4473,
"product_id": "MDB8959SKZ",
"is_unavailable": 0,
"in_stock": 1,
"status": "Active",
"image": "https://dq5w511paquwy.cloudfront.net/assets/images/MDB8959SKZ-18395431.webp",
"id": "300",
"brand_id": 27,
"brand_name": "Maytag",
"brand_image": "https://dq5w511paquwy.cloudfront.net/assets/brands/255905-maytag.webp",
"name": "Top control dishwasher with Third Level Rack and Dual Power Filtration",
"link_category_name": "dishwashers",
"link_subcategory_name": "dishwasher-appliances",
"link_detail_category_name": "built-in-dishwashers",
"short_description": "Top control dishwasher with Third Level Rack and Dual Power Filtration",
"color": "Fingerprint Resistant Stainless Steel",
"price": "746",
"price_sale": "746",
"savings": "253.00",
"regular_price": "999.00",
"install": [
{
"install_id": "5e0a9984c9cb6",
"install_name": "Dishwasher Standard Install (includes 6' SS supply line)",
"description": "Includes setting up, leveling, removing packaging, installing a new stainless steel water supply line to your existing water source, plugging in to a dedicated 110v outlet or hardwiring the electrical, installing the factory supplied drain hose to your existing drain, and haul away of the old appliance",
"install_price": "199.99",
"category_name": "Dishwashers",
"subcategory_name": "Dishwashers",
"detail_category_name": "Built-In Dishwashers",
"status": 0,
"is_show_website": 1,
"date_created": "2019-12-30 18:42:44",
"date_updated": "2023-03-18 10:18:11",
"detail_install": [
{
"id": 1937,
"install_id": "5e0a9984c9cb6",
"category_name": "Dishwashers",
"subcategory_name": "Dishwashers",
"detail_category_name": "Built-In Dishwashers",
"is_active": 1,
"filters": [
{
"id": 1822,
"install_id": "5e0a9984c9cb6",
"detail_install_id": 1937,
"filter_id": 1458,
"section": null,
"field": "Color",
"value": "Black",
"created_at": "2023-03-18 10:18:11",
"updated_at": "2023-03-18 10:18:11"
},
{
"id": 1823,
"install_id": "5e0a9984c9cb6",
"detail_install_id": 1937,
"filter_id": 1459,
"section": null,
"field": "Color",
"value": "Black Stainless Steel",
"created_at": "2023-03-18 10:18:11",
"updated_at": "2023-03-18 10:18:11"
},
{
"id": 1824,
"install_id": "5e0a9984c9cb6",
"detail_install_id": 1937,
"filter_id": 1460,
"section": null,
"field": "Color",
"value": "Blue",
"created_at": "2023-03-18 10:18:11",
"updated_at": "2023-03-18 10:18:11"
},
{
"id": 1825,
"install_id": "5e0a9984c9cb6",
"detail_install_id": 1937,
"filter_id": 1461,
"section": null,
"field": "Color",
"value": "Orange",
"created_at": "2023-03-18 10:18:11",
"updated_at": "2023-03-18 10:18:11"
},
{
"id": 1826,
"install_id": "5e0a9984c9cb6",
"detail_install_id": 1937,
"filter_id": 1462,
"section": null,
"field": "Color",
"value": "Red",
"created_at": "2023-03-18 10:18:11",
"updated_at": "2023-03-18 10:18:11"
},
{
"id": 1827,
"install_id": "5e0a9984c9cb6",
"detail_install_id": 1937,
"filter_id": 1463,
"section": null,
"field": "Color",
"value": "Silver",
"created_at": "2023-03-18 10:18:11",
"updated_at": "2023-03-18 10:18:11"
},
{
"id": 1828,
"install_id": "5e0a9984c9cb6",
"detail_install_id": 1937,
"filter_id": 1464,
"section": null,
"field": "Color",
"value": "Stainless Steel",
"created_at": "2023-03-18 10:18:11",
"updated_at": "2023-03-18 10:18:11"
},
{
"id": 1829,
"install_id": "5e0a9984c9cb6",
"detail_install_id": 1937,
"filter_id": 1465,
"section": null,
"field": "Color",
"value": "White",
"created_at": "2023-03-18 10:18:11",
"updated_at": "2023-03-18 10:18:11"
},
{
"id": 1830,
"install_id": "5e0a9984c9cb6",
"detail_install_id": 1937,
"filter_id": 1466,
"section": null,
"field": "Color",
"value": "Yellow",
"created_at": "2023-03-18 10:18:11",
"updated_at": "2023-03-18 10:18:11"
},
{
"id": 1831,
"install_id": "5e0a9984c9cb6",
"detail_install_id": 1937,
"filter_id": 1467,
"section": null,
"field": "Color",
"value": "Other",
"created_at": "2023-03-18 10:18:11",
"updated_at": "2023-03-18 10:18:11"
}
]
},
{
"id": 1938,
"install_id": "5e0a9984c9cb6",
"category_name": "Dishwashers",
"subcategory_name": "Dishwashers",
"detail_category_name": "Portable Dishwashers",
"is_active": 1,
"filters": []
}
],
"product": {
"category_name": "Dishwashers",
"subcategory_name": "Dishwashers",
"detail_category_name": "Built-In Dishwashers"
},
"is_option": 1
},
{
"description": null,
"install_id": "no-install",
"install_name": "I am unsure. Please have an appliance expert contact me to determine the correct installation.",
"install_price": "0",
"is_option": 0
}
],
"warranty": [],
"quantity": 1,
"install_selected": [],
"warranty_selected": [],
"backup_install_selected": [],
"haulaway": 0,
"fulfillment_type": 1,
"fulfillment_type_name": "Local Delivery Only",
"delivery_option_id": 1,
"delivery_option_name": "Full-service",
"delivery_option_description": null,
"delivery_option_price": 10,
"delivery_charge": 10,
"fulfillment_types": [
{
"fulfillment_type": 1,
"fulfillment_type_name": "Local Delivery Only",
"is_disable": 0,
"estimated_availability": "Wed, Nov 22nd",
"estimated_availability_desc": "Guaranteed by",
"installation_availability": null,
"installation_availability_desc": null,
"pickup_time": null,
"pickup_time_availability": null,
"pickup_time_availability_desc": null,
"pickup_time_post_desc": null
},
{
"fulfillment_type": 3,
"fulfillment_type_name": "Local Delivery & Install",
"is_disable": 0,
"estimated_availability": null,
"estimated_availability_desc": null,
"installation_availability": "Wed, Nov 22nd",
"installation_availability_desc": "Guaranteed by",
"pickup_time": null,
"pickup_time_availability": null,
"pickup_time_availability_desc": null,
"pickup_time_post_desc": null
},
{
"fulfillment_type": 2,
"fulfillment_type_name": "Pickup",
"is_disable": 0,
"estimated_availability": null,
"estimated_availability_desc": null,
"installation_availability": null,
"installation_availability_desc": null,
"pickup_time": "tomorrow",
"pickup_time_availability": null,
"pickup_time_availability_desc": null,
"pickup_time_post_desc": "Ready at 09:30 AM"
}
],
"delivery_options": [
{
"id": 1,
"name": "Full-service",
"description": null,
"price": 10
},
{
"id": 2,
"name": "Drop-off",
"description": null,
"price": 10
}
],
"is_pickup_today": false,
"is_next_day_delivery": false,
"estimate_availability": null,
"estimate_availability_desc": null,
"installation_availability": null,
"pickup_time": null,
"is_valid_fulfillment_type": 0,
"inventory_quantity": 13
}
],
"subtotal": 746
}
Retrieve Total Quantity
Obtaining the total quantity of the product after it has been selected.
Headers
Bearer Authorization
token
To access the API, you must use the token.
Parameters
super_classes
string
The param determines the name of the brand.
Attributes
total_quantity
number
The total quantity of product.
subtotal
string
The total price of the product based on the quantity.
GET /api/v2/cart/total-quantity
curl --location 'https://appliance-api.com/api/v2/cart/total-quantity' \
--header 'x-api-key: your_api_key' \
--header 'x-tenant-id: your_tenant_id' \
--header 'Authorization: Bearer 5f00cadbd42e5Z4MgOKxphsNmIy7ibGSpuplj7l1uwF6t7WeKmhc2X3dG47KsE8lQB8aAESoQ'
{
"code": "200",
"message": "Success",
"data": {
"total_quantity": 1,
"subtotal": "596.00"
},
"meta": null,
"errors": null
}
Delete Cart
Removing cart data using the DELETE method.Headers
Bearer Authorization
token
To access the API, you must use the token.
Value: Bearer 5f00cadbd42e5Z4MgOKxphsNmIy7ibGSpuplj7l1uwF6t7WeKmhc2X3dG47KsE8lQB8aAESoQ
Parameters
No parameter required.
Attributes
Nothing in the API.
DEL /api/v2/cart/8086
curl --location --request DELETE 'https://appliance-api.com/api/v2/cart/8086' \
--header 'x-api-key: your_api_key' \
--header 'x-tenant-id: your_tenant_id' \
--header 'Authorization: Bearer 5f00cadbd42e5Z4MgOKxphsNmIy7ibGSpuplj7l1uwF6t7WeKmhc2X3dG47KsE8lQB8aAESoQ'
No response body.
This request doesn't return any response body.
Restore Cart
Data restoration in the cart is achievable through the use of the PUT method.Headers
Bearer Authorization
token
To access the API, you must use the token.
Value: Customer's token.
Parameters
No parameter required.
Attributes
Nothing in the API.
PUT /api/v2/cart/restore
curl --location --request PUT 'https://appliance-api.com/api/v2/cart/restore' \
--header 'x-api-key: your_api_key' \
--header 'x-tenant-id: your_tenant_id'
No response body.
This request doesn't return any response body.
Create Cart (Bulk)
Displaying multiple products when users select more than one item in the cart.Headers
The JSON containing ID, quantity, product ID, fulfillment type, delivery option, ZIP code, warranty, and installation sends raw data in the request body.
Bearer Authorization
token
To access the API, you must use the token.
Value: Customer's token
Parameters
No parameter required.
Attributes
Nothing in the API.
POST /api/v2/cart/store-bulk
curl --location 'https://appliance-api.com/api/v2/cart/store-bulk' \
--header 'x-api-key: your_api_key' \
--header 'x-tenant-id: your_tenant_id' \
--header 'Authorization: {{customer_token}}' \
--data '{
"carts" : [
{
"id": 583,
"quantity": 1,
"sku": "ART318FFDW",
"fulfillment_type": null,
"delivery_option_id": null,
"zip_code": 40241,
"warranty_selected": [],
"install_selected": []
},
{
"id": 300,
"quantity": 1,
"sku": "MDB8959SKZ",
"fulfillment_type": null,
"delivery_option_id": null,
"zip_code": 40241,
"warranty_selected": [],
"install_selected": []
}
]
}'
No response body.
This request doesn't return any response body.