Freight Service

You can use the SkyHub Freight API for freight integration with the B2W Marketplace, informing the price and delivery time for products integrated in that marketplace. So you can create your own logistics policy.

Request

SkyHub will make a POST request in the configured partner url. Here's an example of the data that will be sent

{
  "destinationZip": 00000000,
  "volumes": [
    {
      "sku": "SKU_PARCEIRO_1",
      "quantity": 2,
      "price": 15.20,
      "height": 0.55,
      "length": 0.63,
      "width": 0.21,
      "weight": 1.00
    },
    {
      "sku": "SKU_PARCEIRO_2",
      "quantity": 1,
      "price": 53.99,
      "height": 0.3,
      "length": 0.2,
      "width": 0.1,
      "weight": 1.75
    }
  ]
}

Response

The API expects the following json to contain the information below, see example:

The return must be a valid JSON, with the Content-Type Header with the value of application/json, as in the example below

{
  "shippingQuotes": [
    {
      "shippingCost": 13,
      "deliveryTime": {
        "total": 10,
        "transit": 8,
        "expedition": 2
      },
      "shippingMethodId": "8-Correios",
      "shippingMethodName": "Sedex",
      "shippingMethodDisplayName": "Sedex"
    }
  ]
}

Implementation Rules

To ensure a proper buyer experience, Partner's freight service must respond within 800ms. If the freight service takes longer than this to respond, the calculation will made by contingency worksheet.

B2W Marketplace will always show the cheapest option and between the cheaper ones, they pick the fastest, following the same rules as buybox.

Exceções

We cite below some examples of application of the service:

  • If there is no delivery service for a certain ZIP code range, just return the HTTP 404 (NOT FOUND)

{
  "message": "Região de entrega não atendida".
}

As good practice, you can report a standard message following the example above.

If the response time exceeds the 800 ms time limit, the return will be 499 (Timeout), Keep in mind that in that case the contingency table will be triggered. But only if the store had it registered one in the B2W portal, otherwise the freight won't be calculated

Before using freight service, our technology team must carry out an approval to validate compliance with the minimum requirements to made it available at B2W MarketPlace. For that send an email to api@skyhub.com.br.

Last updated