XM
Members
Delete Cart
This documentation is now outdated, please find the latest docs for this endpoint here
Path:
1
PATCH https://{baseurl}/cart/{cartId}/orderNumber
Copied!
This API is automatically triggered when the checkout is complete, and it deletes the existing cart. At a later point, when the user picks up an item, a new cart (with a new cartId) is created.

Headers

x-site-context : { "date": "2020-08-28T02:35:27.787Z", "channel": 12, "account": 5f493c9f30ec2a0007a94fc8", "stage": "sandbox" }

Parameters

Type : path
Name : The cartID (from the Add Items to Cart or Retrieve Cart by userAuthToken API)
Required: true
Type: requestBody
Name: The order number.
Required: true

Sample Request

Path:
1
https://{baseURL}/api-cart/cart/5e990107fcef0314e06b64aa/orderNumber
Copied!
Body:
1
{
2
"orderNumber": "1234-1234-12345"
3
}
Copied!

Response

Response Code: 200
Message: OK
1
{
2
"_id": "6080420ee1ae0600085fa6b1",
3
"deleted": true,
4
"registeredUser": false,
5
"cartId": 1489,
6
"items": [],
7
"allPromosApplied": [],
8
"attributes": [],
9
"createdAt": "2021-04-21T15:17:34.462Z",
10
"updatedAt": "2021-04-21T15:19:49.652Z",
11
"__v": 0,
12
"orderNumber": "1234-1234-12345",
13
"totalAmount": {
14
"currency": "",
15
"amount": 0
16
},
17
"quantity": 0
18
}
Copied!
Error Code: 404
Message: Cart Not Found
Error Code: 500
Message: Internal server error
Description: You will see this error when the account number is incorrect in the x-site-context (for a multi-tenent client).

Change Log

  • June - 2021
  • July - 2020 First updated
Last modified 1mo ago
Copy link
Contents
Change Log