Empty cart

Shopping cart Ajax API is used for shopping cart interaction generated by customers during the session. This interface can be called when the shopping cart needs to be emptied.

Request information

API Path:

POST https://{handle}.myshopline.com/cart/clear

Request header:

Parameter nameParameter typeRequired or notArray or notDefault valuedescribe
Content-TypeStringYNapplication/json
cookieStringYNsession cookie

Response information

See return example

Request and response example

Scenario 1: update shopping cart normally

{
"token": "a90a01c9d11c4b3aa51533765d43ab79",
"note": null,
"attributes": {},
"totalPrice": 0,
"totalWeight": 0,
"itemCount": 0,
"items": [],
"requiresShipping": false
}

Scenario 2: request error:

POST https://{handle}.myshopline.com/cart/clear

status:404 
{
"message": "error code",
"description": "error description"
}
Was this article helpful to you?