GET
/
v1
/
carts
/
:id
Recuperando um carrinho
curl --request GET \
  --url https://lojinha.dev/api/v1/carts/:id \
  --header 'Authorization: Bearer <token>'
{
  "cart": {
    "id": "4f24a75c-792a-4aff-9265-19deb198be07",
    "store": "org_2StqHEqEqKtCH66IJjLb73J2ww6",
    "customerId": null,
    "addressId": null,
    "price": 16000,
    "originalPrice": null,
    "status": "PENDING",
    "createdAt": "2023-07-23T22:04:52.234Z",
    "updatedAt": null,
    "deletedAt": null,
    "products": [
      {
        "id": "4cf35a0f-7f25-43ef-8e5e-208fbfeb1bd0",
        "store": "org_2StqHEqEqKtCH66IJjLb73J2ww6",
        "status": "ACTIVE",
        "name": "A Tormenta de Espadas",
        "slug": "a-tormenta-de-espadas",
        "description": "<p>Terceiro livro da série</p>",
        "price": 8000,
        "originalPrice": 12000,
        "quantity": 10,
        "sku": "LI-004",
        "createdAt": "2023-07-22T00:51:44.685Z",
        "updatedAt": "2023-07-23T22:04:32.178Z",
        "deletedAt": null,
        "order": {
          "quantity": 2,
          "price": 16000
        }
      }
    ]
  }
}

URL

id
uuid
required
Id do carrinho que você deseja recuperar.

Resposta

cart
object
{
  "cart": {
    "id": "4f24a75c-792a-4aff-9265-19deb198be07",
    "store": "org_2StqHEqEqKtCH66IJjLb73J2ww6",
    "customerId": null,
    "addressId": null,
    "price": 16000,
    "originalPrice": null,
    "status": "PENDING",
    "createdAt": "2023-07-23T22:04:52.234Z",
    "updatedAt": null,
    "deletedAt": null,
    "products": [
      {
        "id": "4cf35a0f-7f25-43ef-8e5e-208fbfeb1bd0",
        "store": "org_2StqHEqEqKtCH66IJjLb73J2ww6",
        "status": "ACTIVE",
        "name": "A Tormenta de Espadas",
        "slug": "a-tormenta-de-espadas",
        "description": "<p>Terceiro livro da série</p>",
        "price": 8000,
        "originalPrice": 12000,
        "quantity": 10,
        "sku": "LI-004",
        "createdAt": "2023-07-22T00:51:44.685Z",
        "updatedAt": "2023-07-23T22:04:32.178Z",
        "deletedAt": null,
        "order": {
          "quantity": 2,
          "price": 16000
        }
      }
    ]
  }
}