This page provides you with information on how to manage your carts.
Index:
Read and search carts
Create and update carts
Delete carts
Read and search carts
Use the following endpoint to search and read the carts we have in the system.
Description | Read and search carts |
HTTP Method | GET |
URL | |
Headers | X-Tenant:
Authorization: Bearer |
Rate limit | 60 requests per minute |
JSON request (example) | none |
JSON response (example) |
|
Paging and filtering (example) | The paging and filters can be combined. Filtering: # Search by email https://api.midway.la/api/consumer/[email protected] # Search by id https://api.midway.la/api/consumer/carts?cart_id=cart_00 # Search by source https://api.midway.la/api/consumer/carts?source=vtex # Search by creation dates. https://api.midway.la/api/consumer/carts?created_at_from=2024-01-01&created_at_to=2024-06-01 Paging: https://api.midway.la/api/consumer/carts?source=tienda01&cart_id=cart_001&page=2&per_page=250 |
Create and update carts
Use the following endpoint to create and update the carts of your company in our system, we use the parameter “source” + “cart_id” to create in case the combination does not exist and if it doest exist it will be updated. You can send many carts in one request.
Description | Create and update carts. |
HTTP Method | POST |
URL | |
Headers | X-Tenant:
Authorization: Bearer |
Rate limit | 60 requests per minute |
Max records | 5000 per request |
Reference | See the CartsDTO table below. |
JSON request (example) |
|
JSON response (example) | status code 204 |
Paging and filtering (example) | none |
Delete carts
Use the following endpoint to delete the carts of your company from our system, we use the parameter “source” + “cart_id” to delete. You can send many carts in one request to delete.
Description | Delete carts. |
HTTP Method | DELETE |
URL | |
Headers | X-Tenant:
Authorization: Bearer |
Rate limit | 60 requests per minute |
JSON request (example) |
|
JSON response (example) | status code 204 |
Paging and filtering (example) | none |
The parameters that have “*” are required.
CartsDTO
Parameter | Type | Description |
source* | string | The source is from which application the information comes from (vtex, prestashop, system,crm, etc). |
carts* | List <CartDTO> | The carts field is the list of carts to be uploaded in bulk. |
CartDTO
Parameter | Type | Description |
cart_id* | string | The cart_id field is the id of the cart in the external system. |
created_at* | string | The date relate to the creation of the cart in UTC (Y-m-d H:i:s eg 2024-10-01 09:00:00). |
updated_at* | string | The date relate to the last updated of the cart in UTC (Y-m-d H:i:s eg 2024-10-01 15:00:00). |
url_recovery | string | The url_recovery field is to upload the link that allows the customer to recover or return to their abandoned cart. |
customer* | CustomerDTO | The customer field is to upload the information relate to the customer like name, email, etc. |
items* | List <ItemDTO> | The items field is to upload the information relate to the items. |
summary* | SummaryDTO | The summary field is to upload the information relate to cart like total items, subtotal, total, discount, tax, etc. |
CustomerDTO
Parameter | Type | Description |
email* | string | The email of the customer. |
firstname | string | The firstname of the customer. |
lastname | string | The lastname of the customer. |
ItemDTO
Parameter | Type | Description |
id* | string | The id of the product. |
sku* | string | The sku of the product. |
name* | string | The name of the product. |
price* | float | The list price of the product on the cart. |
price_sale* | float | The final price of the product on the cart. |
quantity* | integer | The quantity of the product that was bought. |
image* | string | The image field is to upload the URL of the product image. |
link* | string | The link field is to upload the URL of the product page. |
SummaryDTO
Parameter | Type | Description |
subtotal* | float | The subtotal of the cart. |
tax* | float | The tax of the cart. |
shipping* | float | The cost of shipping of the cart. |
discount* | float | The discount of the cart. |
total* | float | The total of the cart. |
