Cotar pedidos (v2)
Simula o frete de um ou mais pedidos antes da criação. Retorna prazo, preço e transportadora elegível para cada ponto de coleta × destino.
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.
Authorization
sellerGroupKey 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/v2/quotation/orders" \ -H "Content-Type: application/json" \ -d '{ "seller_identifier": "12345678000190", "orders": [ { "identifier": "1", "amount": 100, "destination_address": { "country": "BRA", "zip_code": "01412100", "state": "RJ", "city": "Rio de Janeiro", "neighborhood": "Ipanema", "street": "Rua Conde de Bonfim", "street_number": "10", "complement": "sala comercial, 13º andar", "reference": "Portão azul", "latitude": -23.52045997445427, "longitude": -46.438805678513575 }, "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_address": {
"country": "BRA",
"latitude": -22.987931622192264,
"longitude": -43.22691885754466,
"zip_code": "22441000"
},
"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,
"advalorem_value": 0,
"base_method_shipping_price": 2000,
"gris_value": 0,
"weight": {
"applied": 1570,
"physical": 1570,
"cubed": 1570
},
"volumes": [
{
"weight": 1570,
"height": 20,
"length": 30,
"width": 10
}
]
}
]
},
"cheapest": {
"total_orders_shipping_price": 1000,
"max_orders_expected_delivery_date": "2023-07-18T02:59:00.000Z",
"orders_quotations": [
{
"identifier": "1",
"amount": 100,
"destination_address": {
"country": "BRA",
"latitude": -22.987931622192264,
"longitude": -43.22691885754466,
"zip_code": "22441000"
},
"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,
"advalorem_value": 0,
"base_method_shipping_price": 1000,
"gris_value": 0,
"weight": {
"applied": 1570,
"physical": 1570,
"cubed": 1570
},
"volumes": [
{
"weight": 1570,
"height": 20,
"length": 30,
"width": 10
}
]
}
]
}
},
"orders": [
{
"identifier": "1",
"address": {
"country": "BRA",
"latitude": -22.987931622192264,
"longitude": -43.22691885754466,
"zip_code": "22441000"
},
"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,
"advalorem_value": 0,
"base_method_shipping_price": 1000,
"gris_value": 0,
"tags_object": {
"fastest": false,
"cheapest": true
},
"tags": [
"cheapest"
],
"weight": {
"applied": 1570,
"physical": 1570,
"cubed": 1570
}
},
{
"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,
"advalorem_value": 0,
"base_method_shipping_price": 2000,
"gris_value": 0,
"tags_object": {
"fastest": true,
"cheapest": false
},
"tags": [
"fastest"
],
"weight": {
"applied": 1570,
"physical": 1570,
"cubed": 1570
}
},
{
"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": 1200,
"advalorem_value": 0,
"base_method_shipping_price": 1200,
"gris_value": 0,
"tags_object": {
"fastest": false,
"cheapest": false
},
"tags": [],
"weight": {
"applied": 1570,
"physical": 1570,
"cubed": 1570
}
},
{
"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": 1250,
"advalorem_value": 0,
"base_method_shipping_price": 1250,
"gris_value": 0,
"tags_object": {
"fastest": false,
"cheapest": false
},
"tags": [],
"weight": {
"applied": 1570,
"physical": 1570,
"cubed": 1570
}
},
{
"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": 1190,
"advalorem_value": 0,
"base_method_shipping_price": 1190,
"gris_value": 0,
"tags_object": {
"fastest": false,
"cheapest": false
},
"tags": [],
"weight": {
"applied": 1570,
"physical": 1570,
"cubed": 1570
}
},
{
"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": 1200,
"advalorem_value": 0,
"base_method_shipping_price": 1200,
"gris_value": 0,
"tags_object": {
"fastest": false,
"cheapest": false
},
"tags": [],
"weight": {
"applied": 1570,
"physical": 1570,
"cubed": 1570
}
}
]
}
]
}{}