Integração frete Omnik
A omnik oferta uma interação para cotação de frete onde é cadastrado o endpoint do parceiro e o mesmo deve receber um payload e responder com o contrato já definido.
Request
curl --location 'https: //seuDominio/freteSeller' \
--header 'Content-Type: application/json' \
--data '{
"originZipCode": "string", //cep origem
"destinationZipCode": "string", //cep destino
"products": [ // produtos
{
"skuId": "string", // skuid
"sellerTenant": "string", //tenant seller
"category": "string", //categoria
"weight": null, //peso
"width": null, //largura
"height": null, //altura
"length": null, //comprimento
"quantity": null, //quntidade
"cost": null // custo/preço
}
]
}
Response
Para os campos abaixo foi mapeado nos comentários a obrigatoriedade e qual campo do antigo retorno deve ser mapeado para um campo específico.
{
"statusHttp": 200, //sempre 200
"status": "string", //sempre ok
"messages": [ // opcional, informações para o integrador
//[ { "type": "INFO", "key": "NO_DELIVERY_OPTIONS", "text": "Nenhuma opção de frete disponível para o CEP informado.", "sellerTenant": "string" } ]
{
"type": "string",
"key": "string",
"text": "string",
"sellerTenant": "string"
}
],
"content": {
"sellerTenant": "string", // o id seller omink
"destinationZipCode": 1415906, //cep destino
"platform": "string", //plataforma: mobile
"quotationId": "string", // opcional
"deliveryOptions": [
{
"deliveryMethodId": "string",//shippingMethodId
"deliveryMethodName": "string",//shippingMethodDisplayName
"deliveryTime": 1,//Dias para entregar transit+ expedition
"deliveryTimeType": "bd", // bd
"deliveryMode": "ENUM", //optional
"deliveryEstimateBusinessDays": 1, //optional
"finalShippingCost": 0,//shippingCost
"deliveryEstimatedDateExact": 1,//Dias para entregar transit+ expedition
"deliveryEstimatedDateExactIso": "2025-09-08",//Dias para entregar transit+ expedition
"pickupPointInfo": [ // opcional
{
"id": "string",
"name": "string",
"instructions": "string",
"description": "string",
"address": {
"id": "string",
"externalId": "string",
"zipCode": "string",
"city": {
"name": "string"
},
"state": {
"name": "string",
"initials": "string",
"ibgeCode": "string"
},
"street": "string",
"number": "string",
"complement": "string",
"neighborhood": "string",
"country": "string",
"latitude": null,
"longitude": null
},
"businessHours": [
{
"dayOfWeek": "ENUM",
"openingTime": "string",
"closingTime": "string"
}
],
"businessHoursExceptions": [
{
"date": "string",
"startTime": "string",
"endTime": "string",
"name": "string"
}
]
}
],
"availableDeliveryWindows": [// opcional
{
"date": "string",
"startTime": "string",
"endTime": "string"
}
]
}
],
"products": [
{
"skuId": "string", //skuid
"sellerTenant": "string", //seu proprio tenant
"skuIntegration": "string" //opcional
}
]
},
"time": "string", //duração de request
"timezone": "string", //timezone
"locale": "string" //lingua local
}
Comparação
Request
As Is
{
"destinationZip": 5711000,
"volumes": [
{
"sku": "PRD9999999999",
"height": 0.038,
"length": 0.082,
"width": 0.016,
"weight": 0.32,
"quantity": 2,
"price": 45.0
}
]
}
To be
{
"originZipCode": "13555122", //cep origem
"destinationZipCode": "5711000", //cep destino
"products": [ // produtos
{
"skuId": "PRD9999999999", // skuid
"sellerTenant": "TALD99999999999", //tenant seller
"category": "string", //categoria opcional
"weight": 0.32, //peso
"width": 0.016, //largura
"height": 0.038, //altura
"length": 0.082, //comprimento
"quantity": 2, //quntidade
"cost": 50.0 // custo/preço
}
]
}
Response
As Is
{
"shippingQuotes": [
{
"shippingMethodType": "regular",
"shippingCost": 0.0,
"shippingMethodId": "jadlog",
"shippingMethodName": "standard",
"shippingMethodDisplayName": "Normal",
"deliveryTime": {
"transit": 60,
"expedition": 2
}
},
{
"shippingMethodType": "express",
"shippingCost": 0.0,
"shippingMethodId": "jadlog",
"shippingMethodName": "express",
"shippingMethodDisplayName": "Expresso",
"deliveryTime": {
"transit": 60,
"expedition": 2
}
}
]
}
To be
{
"content": {
"additionalInformation": null,
"cached": false,
"deliveryOptions": [
{
"deliveryEstimatedDateExact": 60,
"deliveryEstimatedDateExactIso": "60",
"deliveryEstimatedDateMax": 60,
"deliveryEstimatedDateMaxIso": "60",
"deliveryMethodId": "jadlog",
"deliveryMethodName": "Normal",
"deliveryTime": 60,
"deliveryTimeType": "bd",
"finalShippingCost": 0
}
],
"destinationZipCode": "04252040",
"originZipCode": null,
"identification": null,
"platform": "mobile",
"products": [
{
"sellerTenant": "TALD99999999999",
"skuId": "PRD9999999999",
"skuIntegration": null,
"weight": 124.75,
"quantity": 1,
"cost": 1144.43,
"height": 0.178,
"width": 0.625,
"length": 2.135,
"stock": null
}
],
"sellerTenant": "TALD99999999999",
"volumes": []
},
"locale": "en",
"messages": [],
"status": "OK", // sempre OK
"statusHttp": 200, // sempre 200
"time": "13", //quanto tempo levou para calcular
"timezone": "America/Sao_Paulo"
}
Last updated