post https://{accountName}.{environment}.com.br/api/logistics/pvt/shipping/calculate
Used by checkout to calculate Service Level Agreement.
It stands for Service Level Agreement. In VTEX logistics, it means the agreement between the store and the end customer on the estimated delivery time. The VTEX platform calculates the estimated delivery time of an order and shows it to the end customer during checkout. This delivery time estimate is the store's SLA with the end customer. The calculation of this estimate takes into account the settings of the shipping and loading dock policies.
Request body example
curl --location --request POST 'https://{accountName}.{environment}.com.br/api/logistics/pvt/shipping/calculate' \
--header 'Content-Type: application/json; charset=utf-8' \
--header 'Accept: application/json' \
--header 'X-VTEX-API-AppKey: {{X-VTEX-API-AppKey}}' \
--header 'X-VTEX-API-AppToken: {{X-VTEX-API-AppToken}}' \
--data-raw '[
{
"items": [
{
"id": "2390059",
"groupItemId": null,
"kitItem": [],
"quantity": 1,
"price": 0,
"additionalHandlingTime": "00:00:00",
"dimension": {
"weight": 800,
"height": 10,
"width": 12,
"length": 35
}
},
{
"id": "2389945",
"groupItemId": null,
"kitItem": [],
"quantity": 1,
"price": 0,
"additionalHandlingTime": "00:00:00",
"dimension": {
"weight": 800,
"height": 10,
"width": 12,
"length": 35
}
}
],
"location": {
"zipCode": "22220070",
"country": "BRA",
"instore": {
"isCheckedIn": false,
"storeId": "180082"
}
},
"salesChannel": "1"
}
]'
Response body example
[
[
{
"itemId": "2389945",
"quantity": 1,
"availabilityQuantity": 500,
"salesChannel": "1",
"slaType": "Entrega Agendada",
"slaTypeName": "Entrega Agendada",
"freightTableName": "Entrega Agendada",
"freightTableId": "teste1",
"listPrice": 5.25,
"transitTime": "2.00:00:00",
"dockTime": "00:00:00",
"timeToDockPlusDockTime": "1.00:00:00",
"aditionalTimeBlockedDays": "00:00:00",
"totalTime": "3.00:00:00",
"deliveryWindows": [
{
"startDateUtc": "2016-04-20T08:00:00+00:00",
"endDateUtc": "2016-04-20T12:00:00+00:00",
"listPrice": 10
},
{
"startDateUtc": "2016-04-20T12:01:00+00:00",
"endDateUtc": "2016-04-20T18:00:00+00:00",
"listPrice": 10
},
{
"startDateUtc": "2016-04-21T08:00:00+00:00",
"endDateUtc": "2016-04-21T12:00:00+00:00",
"listPrice": 10
},
{
"startDateUtc": "2016-04-21T12:01:00+00:00",
"endDateUtc": "2016-04-21T18:00:00+00:00",
"listPrice": 10
},
{
"startDateUtc": "2016-04-22T08:00:00+00:00",
"endDateUtc": "2016-04-22T12:00:00+00:00",
"listPrice": 10
},
{
"startDateUtc": "2016-04-22T12:01:00+00:00",
"endDateUtc": "2016-04-22T18:00:00+00:00",
"listPrice": 10
},
{
"startDateUtc": "2016-04-23T08:00:00+00:00",
"endDateUtc": "2016-04-23T12:00:00+00:00",
"listPrice": 10
},
{
"startDateUtc": "2016-04-23T12:01:00+00:00",
"endDateUtc": "2016-04-23T18:00:00+00:00",
"listPrice": 10
},
{
"startDateUtc": "2016-04-24T08:00:00+00:00",
"endDateUtc": "2016-04-24T12:00:00+00:00",
"listPrice": 10
},
{
"startDateUtc": "2016-04-24T12:01:00+00:00",
"endDateUtc": "2016-04-24T18:00:00+00:00",
"listPrice": 10
},
{
"startDateUtc": "2016-04-25T08:00:00+00:00",
"endDateUtc": "2016-04-25T12:00:00+00:00",
"listPrice": 10
},
{
"startDateUtc": "2016-04-25T12:01:00+00:00",
"endDateUtc": "2016-04-25T18:00:00+00:00",
"listPrice": 10
},
{
"startDateUtc": "2016-04-26T08:00:00+00:00",
"endDateUtc": "2016-04-26T12:00:00+00:00",
"listPrice": 10
},
{
"startDateUtc": "2016-04-26T12:01:00+00:00",
"endDateUtc": "2016-04-26T18:00:00+00:00",
"listPrice": 10
}
],
"wareHouseId": "1937054",
"dockId": "1_1_1",
"location": {
"zipCode": "22220070",
"country": "BRA",
"deliveryPointId": null,
"point": null,
"inStore": {
"IsCheckedIn": false,
"StoreId": "180082"
}
},
"deliveryOnWeekends": false,
"carrierSchedule": [],
"restrictedFreight": null,
"coordinates": null,
"pickupStoreInfo": null
},
{
"itemId": "2390059",
"quantity": 1,
"availabilityQuantity": 500,
"salesChannel": "1",
"slaType": "Entrega Agendada",
"slaTypeName": "Entrega Agendada",
"freightTableName": "Entrega Agendada",
"freightTableId": "teste1",
"listPrice": 5.25,
"transitTime": "2.00:00:00",
"dockTime": "00:00:00",
"timeToDockPlusDockTime": "1.00:00:00",
"aditionalTimeBlockedDays": "00:00:00",
"totalTime": "3.00:00:00",
"deliveryWindows": [
{
"startDateUtc": "2016-04-20T08:00:00+00:00",
"endDateUtc": "2016-04-20T12:00:00+00:00",
"listPrice": 10
},
{
"startDateUtc": "2016-04-20T12:01:00+00:00",
"endDateUtc": "2016-04-20T18:00:00+00:00",
"listPrice": 10
},
{
"startDateUtc": "2016-04-21T08:00:00+00:00",
"endDateUtc": "2016-04-21T12:00:00+00:00",
"listPrice": 10
},
{
"startDateUtc": "2016-04-21T12:01:00+00:00",
"endDateUtc": "2016-04-21T18:00:00+00:00",
"listPrice": 10
},
{
"startDateUtc": "2016-04-22T08:00:00+00:00",
"endDateUtc": "2016-04-22T12:00:00+00:00",
"listPrice": 10
},
{
"startDateUtc": "2016-04-22T12:01:00+00:00",
"endDateUtc": "2016-04-22T18:00:00+00:00",
"listPrice": 10
},
{
"startDateUtc": "2016-04-23T08:00:00+00:00",
"endDateUtc": "2016-04-23T12:00:00+00:00",
"listPrice": 10
},
{
"startDateUtc": "2016-04-23T12:01:00+00:00",
"endDateUtc": "2016-04-23T18:00:00+00:00",
"listPrice": 10
},
{
"startDateUtc": "2016-04-24T08:00:00+00:00",
"endDateUtc": "2016-04-24T12:00:00+00:00",
"listPrice": 10
},
{
"startDateUtc": "2016-04-24T12:01:00+00:00",
"endDateUtc": "2016-04-24T18:00:00+00:00",
"listPrice": 10
},
{
"startDateUtc": "2016-04-25T08:00:00+00:00",
"endDateUtc": "2016-04-25T12:00:00+00:00",
"listPrice": 10
},
{
"startDateUtc": "2016-04-25T12:01:00+00:00",
"endDateUtc": "2016-04-25T18:00:00+00:00",
"listPrice": 10
},
{
"startDateUtc": "2016-04-26T08:00:00+00:00",
"endDateUtc": "2016-04-26T12:00:00+00:00",
"listPrice": 10
},
{
"startDateUtc": "2016-04-26T12:01:00+00:00",
"endDateUtc": "2016-04-26T18:00:00+00:00",
"listPrice": 10
}
],
"wareHouseId": "1937054",
"dockId": "1_1_1",
"location": {
"zipCode": "22220070",
"country": "BRA",
"deliveryPointId": null,
"point": null,
"inStore": {
"IsCheckedIn": false,
"StoreId": "180082"
}
},
"deliveryOnWeekends": false,
"carrierSchedule": [],
"restrictedFreight": null,
"coordinates": null,
"pickupStoreInfo": null
},
{
"itemId": "2389945",
"quantity": 1,
"availabilityQuantity": 500,
"salesChannel": "1",
"slaType": "Normal",
"slaTypeName": "Normal",
"freightTableName": "Correios PAC",
"freightTableId": "11cc4b6",
"listPrice": 7.88,
"transitTime": "2.00:00:00",
"dockTime": "00:00:00",
"timeToDockPlusDockTime": "1.00:00:00",
"aditionalTimeBlockedDays": "00:00:00",
"totalTime": "3.00:00:00",
"deliveryWindows": [],
"wareHouseId": "1937054",
"dockId": "1_1_1",
"location": {
"zipCode": "22220070",
"country": "BRA",
"deliveryPointId": null,
"point": null,
"inStore": {
"IsCheckedIn": false,
"StoreId": "180082"
}
},
"deliveryOnWeekends": true,
"carrierSchedule": [],
"restrictedFreight": null,
"coordinates": null,
"pickupStoreInfo": null
},
{
"itemId": "2390059",
"quantity": 1,
"availabilityQuantity": 500,
"salesChannel": "1",
"slaType": "Normal",
"slaTypeName": "Normal",
"freightTableName": "Correios PAC",
"freightTableId": "11cc4b6",
"listPrice": 7.88,
"transitTime": "2.00:00:00",
"dockTime": "00:00:00",
"timeToDockPlusDockTime": "1.00:00:00",
"aditionalTimeBlockedDays": "00:00:00",
"totalTime": "3.00:00:00",
"deliveryWindows": [],
"wareHouseId": "1937054",
"dockId": "1_1_1",
"location": {
"zipCode": "22220070",
"country": "BRA",
"deliveryPointId": null,
"point": null,
"inStore": {
"IsCheckedIn": false,
"StoreId": "180082"
}
},
"deliveryOnWeekends": true,
"carrierSchedule": [],
"restrictedFreight": null,
"coordinates": null,
"pickupStoreInfo": null
}
]
]