Create Customer Cart
This request retrieves the shopping cart for a logged-in customer using a Bearer token for authentication.
POST {{Base_url}}/rest/V1/carts/mine
The cURL request you've provided is using the /rest/V1/carts/mine endpoint, which is used to interact with the current shopping cart (quote) of the logged-in customer in Magento. This specific API is used for authenticating a customer and retrieving their active cart.
curl --location --request POST '{{Base_url}}/rest/V1/carts/mine' \
--header 'Authorization: Bearer eyJraWQiOiIxIiwiYWxnIjoiSFMyNTYifQ.eyJ1aWQiOjIyNjE4OSwidXR5cGlkIjozLCJpYXQiOjE3MzgzMTg1ODksImV4cCI6MTczODMyMjE4OX0.4tWNj6cBnVyEsBXGHyrZGfdGBSgPQq7unBWV-BNlvWA' \
--header 'Cookie: PHPSESSID=6t4unirh1unu87ef0stp2sv3kv; private_content_version=5ab80b7def0c212f723edead3c971a19' \
--data ''Responses
615982{
"message": "The consumer isn't authorized to access %resources.",
"parameters": {
"resources": "self"
}
}Value:
"615982"Explanation: The response
615982indicates that the cart has been successfully retrieved or created for the authenticated user. It serves as the identifier for managing this cart in subsequent API calls.
Last updated