Cotar pedidos (v1)

Versão antiga da cotação de frete. Prefira a `v2`.

Conceito relacionado

Entenda o fluxo no guia: Conceito: Cotação de frete · Como cotar frete.

Header obrigatório. Toda chamada exige o header x-abbiamo-seller-group-key. Preencha-o no canto superior direito desta página ou veja como obter a sua chave.

Rate limit: 300 requisições por minuto por chave. Acima disso a API retorna HTTP 429.

Este endpoint serve para simular o frete dos seus pedidos. Foi desenvolvido para simular entregas com ponto de coleta em uma das suas filiais e múltiplos pontos de entrega. Assim, antes de criar os pedidos, você pode cotar quanto eles custariam e quanto tempo levariam para chegar ao destino final.

A resposta é dividida em duas seções:

  • optimized_global_quotation: refere-se às melhores combinações de frete de acordo com a data de envio (mais rápido) e de acordo com o valor do frete (mais barato), somando todos os métodos disponíveis.

Para que um método seja selecionado como o mais barato ou o mais rápido na resposta dentro do objeto optimized_global_quotation, ele precisa ter tanto method_expected_delivery_date quanto method_shipping_price.

  • orders: cada item do array corresponde a um pedido cotado com todas as cotações possíveis para os métodos disponíveis.

Para que um método apareça na resposta dentro de quotations no array orders, ele precisa ter method_expected_delivery_date.

POST
/v1/quotation/orders

Authorization

sellerGroupKey
x-abbiamo-seller-group-key<token>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

curl -X POST "https://example.com/v1/quotation/orders" \  -H "Content-Type: application/json" \  -d '{    "seller_identifier": "12345678000190",    "orders": [      {        "identifier": "1",        "amount": 100,        "destination_zip_code": "04304011",        "volumes": [          {            "weight": 1570,            "height": 20,            "length": 30,            "width": 10          }        ]      }    ]  }'
{
  "seller_identifier": "12345678000190",
  "origin_address_zipcode": "20521060",
  "optimized_global_quotation": {
    "fastest": {
      "total_orders_shipping_price": 2000,
      "max_orders_expected_delivery_date": "2023-07-13T15:05:52.236Z",
      "orders_quotations": [
        {
          "identifier": "1",
          "amount": 100,
          "destination_zip_code": "04304011",
          "volumes": [
            {
              "weight": 1570,
              "height": 20,
              "length": 30,
              "width": 10
            }
          ],
          "carrier_name": "CARRIER-TEST",
          "logistic_id": "5f111deb-dc13-45c7-9821-7f4aa5be856f",
          "method_id": "9591bbe7-bbcd-4702-93a4-f340f1dde622",
          "method_type": "EXPRESS",
          "method_expected_delivery_date": "2023-07-13T12:05:52.236-03:00",
          "method_shipping_price": 2000
        }
      ]
    },
    "cheapest": {
      "total_orders_shipping_price": 1000,
      "max_orders_expected_delivery_date": "2023-07-18T02:59:00.000Z",
      "orders_quotations": [
        {
          "identifier": "1",
          "amount": 100,
          "destination_zip_code": "04304011",
          "volumes": [
            {
              "weight": 1570,
              "height": 20,
              "length": 30,
              "width": 10
            }
          ],
          "carrier_name": "CARRIER-TEST",
          "logistic_id": "94928548-bb5a-4474-a639-6018e3b5dae6",
          "method_id": "a1fe1560-de68-481f-bdf9-21e19764b171",
          "method_type": "D4",
          "method_expected_delivery_date": "2023-07-18T02:59:00.000Z",
          "method_shipping_price": 1000
        }
      ]
    }
  },
  "orders": [
    {
      "identifier": "1",
      "destination_zip_code": "04304011",
      "volumes": [
        {
          "weight": 1570,
          "height": 20,
          "length": 30,
          "width": 10
        }
      ],
      "quotations": [
        {
          "carrier_name": "CARRIER-TEST",
          "logistic_id": "94928548-bb5a-4474-a639-6018e3b5dae6",
          "method_id": "02ddad13-650c-4fd8-a193-5c0979c7c1c6",
          "method_type": "D4",
          "method_expected_delivery_date": "2023-07-18T02:59:00.000Z",
          "method_shipping_price": 1000,
          "tags_object": {
            "fastest": false,
            "cheapest": true
          },
          "tags": [
            "cheapest"
          ]
        },
        {
          "carrier_name": "CARRIER-TEST",
          "logistic_id": "5f111deb-dc13-45c7-9821-7f4aa5be856f",
          "method_id": "8381ff82-0951-4fcd-bf02-8755a386d3e8",
          "method_type": "EXPRESS",
          "method_expected_delivery_date": "2023-07-13T12:05:52.236-03:00",
          "method_shipping_price": 2000,
          "tags_object": {
            "fastest": true,
            "cheapest": false
          },
          "tags": [
            "fastest"
          ]
        },
        {
          "carrier_name": "SHIPPER-TEST",
          "logistic_id": "dc9f1601-9331-4f26-ab34-70136b0d8c40",
          "method_id": "ea0dedb6-3fc7-44a0-baf3-cbf8295f2337",
          "method_type": "D0",
          "method_expected_delivery_date": "2023-07-14T02:59:00.000Z",
          "method_shipping_price": null,
          "tags_object": {
            "fastest": false,
            "cheapest": false
          },
          "tags": []
        },
        {
          "carrier_name": "SHIPPER-TEST",
          "logistic_id": "a43ad1ab-1e15-464e-80bd-ffdf0c75e534",
          "method_id": "7be49a5e-453d-4a55-83c0-21f842b9f207",
          "method_type": "D1",
          "method_expected_delivery_date": "2023-07-14T02:59:00.000Z",
          "method_shipping_price": null,
          "tags_object": {
            "fastest": false,
            "cheapest": false
          },
          "tags": []
        },
        {
          "carrier_name": "GREEN-CARRIER",
          "logistic_id": "6a5a1efa-ccf1-442e-aa31-2e2a6d2a46e0",
          "method_id": "4f2cc2cf-1ec5-4c3c-9f05-d651654888c1",
          "method_type": "D0",
          "method_expected_delivery_date": "2023-07-15T02:59:00.000Z",
          "method_shipping_price": null,
          "tags_object": {
            "fastest": false,
            "cheapest": false
          },
          "tags": []
        },
        {
          "carrier_name": "GREEN-CARRIER",
          "logistic_id": "ed2418ca-9a7d-476e-b6ca-37193f4c5bed",
          "method_id": "aa93affd-e1d5-467c-a5c5-e903a0b6aeb6",
          "method_type": "D1",
          "method_expected_delivery_date": "2023-07-15T02:59:00.000Z",
          "method_shipping_price": null,
          "tags_object": {
            "fastest": false,
            "cheapest": false
          },
          "tags": []
        }
      ]
    }
  ]
}
{}