Listar itens do carrinho

Changed on

Carrinho de Compras

get/api/v2/me/cart

Request

Headers

Acceptstring required

application/json

Authorizationstring required
User-Agentstring required

É obritatório que seja adicionado o cabeçalho HTTP User-Agent com o nome da sua aplicação junto a um email de contato/suporte.

Response

200

current_pageinteger
first_page_urlstring
frominteger
last_pageinteger
last_page_urlstring
next_page_urlunknown
pathstring
per_pageinteger
prev_page_urlunknown
tointeger
totalinteger

Example response

{
  "current_page": 1,
  "data": [
    {
      "id": "4d9a896c-9057-490d-94ea-abb23565463c",
      "protocol": "ORD-20220397315",
      "service_id": 2,
      "contract": "9912415671",
      "quote": 50.93,
      "price": 50.93,
      "discount": 10.95,
      "delivery_min": 3,
      "delivery_max": 4,
      "status": "pending",
      "insurance_value": 50,
      "format": "box",
      "billed_weight": 3.5,
      "created_at": "2022-03-29 13:17:46",
      "updated_at": "2022-03-29 13:17:46",
      "from": {
        "name": "Teste ME",
        "phone": "5598105050",
        "email": "melhorenvio@teste.com",
        "document": "16571478358",
        "company_document": "04517623000197",
        "state_register": "563025255115",
        "postal_code": "7110000",
        "address": "Rua Teste",
        "location_number": "100",
        "complement": "CASA",
        "district": "Bairro Teste",
        "city": "Guarulhos",
        "state_abbr": "SP",
        "country_id": "BR",
        "note": "Teste ME"
      },
      "to": {
        "name": "ME Teste",
        "phone": "1999999999",
        "email": "melhorenvio@teste.com",
        "document": "73646548010",
        "company_document": "89794131000100",
        "state_register": "123456",
        "postal_code": "26210000",
        "address": "Avenida Marechal Floriano Peixoto",
        "location_number": "123",
        "complement": "Ap 2",
        "district": "Centro",
        "city": "Nova Iguacu",
        "state_abbr": "RJ",
        "country_id": "BR",
        "note": "ME Teste"
      },
      "service": {
        "id": 2,
        "name": "SEDEX",
        "status": "available",
        "type": "express",
        "range": "interstate",
        "restrictions": "{\"insurance_value\":{\"min\":0,\"max\":10000},\"formats\":{\"box\":{\"weight\":{\"min\":0.001,\"max\":30},\"width\":{\"min\":11,\"max\":105},\"height\":{\"min\":2,\"max\":105},\"length\":{\"min\":16,\"max\":105},\"sum\":200},\"roll\":{\"weight\":{\"min\":0.001,\"max\":30},\"diameter\":{\"min\":5,\"max\":91},\"length\":{\"min\":18,\"max\":105},\"sum\":200},\"letter\":{\"weight\":{\"min\":0.001,\"max\":0.5},\"width\":{\"min\":11,\"max\":60},\"length\":{\"min\":16,\"max\":60}}}}",
        "requirements": "[\"names\",\"addresses\"]",
        "optionals": "[\"AR\",\"MP\",\"VD\"]",
        "company": {
          "id": 1,
          "name": "Correios",
          "status": "available",
          "picture": "/images/shipping-companies/correios.png"
        }
      },
      "invoice": {
        "serie": "1"
      },
      "products": [
        {
          "name": "Papel adesivo para etiquetas 1",
          "quantity": 3,
          "unitary_value": 100
        }
      ],
      "volumes": [
        {
          "id": 101604,
          "height": "10.00",
          "width": "15.00",
          "length": "20.00",
          "diameter": "0.00",
          "weight": "3.50",
          "format": "box",
          "created_at": "2022-03-29 13:17:46",
          "updated_at": "2022-03-29 13:17:46"
        }
      ]
    }
  ],
  "first_page_url": "https://sandbox.melhorenvio.com.br/api/v2/me/cart?page=1",
  "from": 1,
  "last_page": 1,
  "last_page_url": "https://sandbox.melhorenvio.com.br/api/v2/me/cart?page=1",
  "path": "https://sandbox.melhorenvio.com.br/api/v2/me/cart",
  "per_page": 10,
  "to": 3,
  "total": 3
}

Changes