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
}
]
}

JSON Field

Data Type

Description

destinationZip

integer

Destination Zip, will be passed as an integer. For example: 5010010 (for zip code "05010-010")

volumes

array

List of items

sku

string

Partner SKU

quantity

integer

Number of units

price

double

Product Selling Price

height

double

Height in Centimeters. Example: 20 centimeters will be sent as "0.2"

width

double

Width in Centimeters.

Example: 20 centimeters will be sent as "0.2"

length

double

Length in Centimeters.

Example: 20 centimeters will be sent as "0.2"

weight

double

Weight in KILOS. Example: 350 grams will be sent as "0.35"

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"
}
]
}

JSON Field

Data Type

Description

shippingQuotes

array

List with the results of freight calculation. Only the FIRST position

shippingCost

double

Freight Cost

Total

integer

Total delivery time in days (sum of transit and expedition times)

transit

integer

Transit Time

expedition

integer

The total time involved in the shipment of the product (Supplier Time (Cross-docking) + LeadTime when it exists)

shippingMethodId

string

Carrier ID / freight type selected. Alphanumeric field

shippingMethodName

string

Name of carrier / freight type selected

shippingMethodDisplayName

string

Freight name that will be displayed to the customer

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.