> For the complete documentation index, see [llms.txt](https://zrpl-co-1.gitbook.io/zrpl/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://zrpl-co-1.gitbook.io/zrpl/reference/api-reference/create-customer-cart.md).

# Create Customer Cart

This request retrieves the shopping cart for a logged-in customer using a Bearer token for authentication.

<mark style="color:green;">`POST`</mark> `{{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.

{% tabs %}
{% tab title="Curl" %}

```json
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 ''
```

{% endtab %}
{% endtabs %}

**Responses**

{% tabs %}
{% tab title="Success Response 200" %}

```json
615982
```

{% endtab %}

{% tab title="Invalid Token 401" %}

```json
{
    "message": "The consumer isn't authorized to access %resources.",
    "parameters": {
        "resources": "self"
    }
}
```

{% endtab %}
{% endtabs %}

* **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.
