ZRPL
  • Welcome!
  • Quick Start
  • Reference
    • API Reference
      • Categories List
      • Category Details by ID
      • Create Simple Product
      • Config Product Creation
      • Product List
      • Update Existing Product
      • Product Details by SKU
      • Product Details by ID
      • Products in Category
      • Create Order
      • Order Details
      • Order History
      • Create Customer
      • Customer Token
      • Create Customer Cart
      • Add Item to Cart
      • View Cart
      • Update Cart
      • Delete Cart
      • Country Code
      • Set Shipping and Billing
      • Place Order
      • Customer Details
Powered by GitBook
On this page
  1. Reference
  2. API Reference

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 615982 indicates 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.

PreviousCustomer TokenNextAdd Item to Cart

Last updated 3 months ago