@lap v0.3
# Machine-readable API spec. Each @endpoint block is one API call.
@api Logistics API
@base https://apiexamples.vtexcommercestable.com.br
@version 1.0
@auth ApiKey X-VTEX-API-AppKey in header | ApiKey X-VTEX-API-AppToken in header | ApiKey VtexIdclientAutCookie in header
@common_fields {Accept: str}
@endpoints 59
@hint download_for_search
@toc api(55), availability(4)

@group api
@endpoint GET /api/logistics/pvt/shipping-policies/{id}
@required {Content-Type: str, id: str}
@returns(200) {id: str, name: str, shippingMethod: str, weekendAndHolidays: map{saturday: bool, sunday: bool, holiday: bool}, maxDimension: map{largestMeasure: num, maxMeasureSum: num}, numberOfItemsPerShipment: int, minimumValueAceptable: num, maximumValueAceptable: num, additionalTime: str, additionalPrice: map{method: int, value: num}, deliveryScheduleSettings: map{useDeliverySchedule: bool, maxRangeDelivery: num, dayOfWeekForDelivery: [map], dayOfWeekBlockeds: [str]?}, carrierSchedule: [map], cubicWeightSettings: map{volumetricFactor: num, minimunAcceptableVolumetricWeight: num}, modalSettings: map{modals: [str], useOnlyItemsWithDefinedModal: bool}, businessHourSettings: map{carrierBusinessHours: [map], isOpenOutsideBusinessHours: bool}, pickupPointsSettings: map{pickupPointIds: [str], pickupPointTags: [str], sellers: [str]}, processingStatus: map{status: int(int32), errorMessage: str?, errorsMetadata: str?}, deliveryChannel: str, calculationType: int, isActive: bool, lastIndexedAt: str?, shippingHoursSettings: map{shippingHours: [map], acceptOrdersOutsideShippingHours: bool}, carrierInfo: map{carrierAccountName: str, deliveryAgreementId: str?, linkedDocks: [map], readyToUse: bool}}

@endpoint DELETE /api/logistics/pvt/shipping-policies/{id}
@required {Content-Type: str=application/json, id: str}
@returns(200)

@endpoint PUT /api/logistics/pvt/shipping-policies/{id}
@required {Content-Type: str=application/json, id: str, name: str, shippingMethod: str, deliveryOnWeekends: bool, maxDimension: map{largestMeasure!: num, maxMeasureSum!: num}, isActive: bool}
@optional {cubicWeightSettings: map{volumetricFactor: num, minimunAcceptableVolumetricWeight: num}, modalSettings: map{modals: [str], useOnlyItemsWithDefinedModal: bool}, deliveryScheduleSettings: map{useDeliverySchedule!: bool, maxRangeDelivery!: num, dayOfWeekForDelivery!: [map]}}
@returns(200)

@endpoint GET /api/logistics/pvt/shipping-policies
@required {Content-Type: str=application/json}
@optional {page: int, perPage: int}
@returns(200) {items: [map], paging: map{page: int, perPage: int, total: int, pages: int}}

@endpoint POST /api/logistics/pvt/shipping-policies
@required {Content-Type: str=application/json, id: str, name: str, shippingMethod: str, weekendAndHolidays: map{saturday!: bool, sunday!: bool, holiday!: bool}, maxDimension: map{largestMeasure!: num, maxMeasureSum!: num}, numberOfItemsPerShipment: int, minimumValueAceptable: num, maximumValueAceptable: num, deliveryScheduleSettings: map{useDeliverySchedule!: bool, maxRangeDelivery!: num, dayOfWeekForDelivery!: [map]}, cubicWeightSettings: map{volumetricFactor!: num, minimunAcceptableVolumetricWeight!: num}, modalSettings: map{modals!: [str], useOnlyItemsWithDefinedModal!: bool}, businessHourSettings: map{carrierBusinessHours!: [map], isOpenOutsideBusinessHours!: bool}, pickupPointsSettings: map{pickupPointIds!: [str], pickupPointTags!: [str], sellers!: [str]}, isActive: bool}
@optional {carrierSchedule: [map{dayOfWeek: int, timeLimit: str}]}
@returns(200)

@endpoint POST /api/logistics/pvt/configuration/freights/{carrierId}/values/update
@required {Content-Type: str=application/json, carrierId: str}
@returns(200)

@endpoint GET /api/logistics/pvt/configuration/freights/{carrierId}/{cep}/values
@required {Content-Type: str=application/json, carrierId: str, cep: str}
@returns(200)

@endpoint GET /api/logistics/pvt/configuration/carriers/{carrierId}/getdayofweekblocked
@required {Content-Type: str=application/json, carrierId: str}
@returns(200)

@endpoint POST /api/logistics/pvt/configuration/carriers/{carrierId}/adddayofweekblocked
@required {Content-Type: str=application/json, carrierId: str}
@returns(200)

@endpoint POST /api/logistics/pvt/configuration/carriers/{carrierId}/removedayofweekblocked
@required {Content-Type: str=application/json, carrierId: str}
@returns(200)

@endpoint POST /api/logistics/pvt/configuration/docks
@required {Content-Type: str=application/json, id: str, name: str, priority: int, dockTimeFake: str, timeFakeOverhead: str, salesChannels: [str], salesChannel: str, freightTableIds: [str], wmsEndPoint: str, address: map{postalCode!: str, country!: map, city!: str, state!: str, neighborhood!: str, street!: str, number!: str, complement!: str, coordinates!: [[num]]}}
@returns(200)

@endpoint GET /api/logistics/pvt/configuration/docks
@required {Content-Type: str=application/json}
@returns(200)

@endpoint GET /api/logistics/pvt/configuration/docks/{dockId}
@required {Content-Type: str=application/json, dockId: str}
@returns(200) {pickupStoreInfo: map{isPickupStore: bool?, storeId: str?, friendlyName: str?, address: map?{postalCode: str, country: map{acronym: str, name: str}, city: str, state: str, neighborhood: str, street: str, number: str, complement: str?, reference: str?, location: map{latitude: num, longitude: num}}, additionalInfo: str?, dockId: str?, distance: num?, businessHours: str?, pickupHolidays: str?, sellerId: str?, isThirdPartyPickup: bool}, storeId: str?, pickupInStoreInfo: map{isActice: bool, additionalInfo: str?}, deliveryFromStoreInfo: map{isActice: bool, deliveryRadius: num, deliveryFee: num, deliveryTime: str, maximumWeight: num}, address: map{postalCode: str, country: map{acronym: str, name: str}, city: str, state: str, neighborhood: str, street: str, number: str, complement: str?, reference: str?, location: map{latitude: num, longitude: num}}, location: map?{zipCode: str, country: str, inStore: map{IsCheckedIn: bool, StoreId: str?}}, shippingRatesProviders: [str]?, deliveryAgreementsIds: [str]?, id: str, name: str, priority: int, dockTimeFake: str, timeFakeOverhead: str, salesChannels: [str], salesChannel: str, freightTableIds: [str], wmsEndPoint: str?, isActive: bool}

@endpoint DELETE /api/logistics/pvt/configuration/docks/{dockId}
@required {Content-Type: str=application/json, dockId: str}
@returns(200)

@endpoint POST /api/logistics/pvt/configuration/docks/{dockId}/activation
@required {Content-Type: str=application/json, dockId: str}
@returns(204)

@endpoint POST /api/logistics/pvt/configuration/docks/{dockId}/deactivation
@required {Content-Type: str=application/json, dockId: str}
@returns(204)

@endpoint POST /api/logistics/pvt/configuration/warehouses
@required {Content-Type: str=application/json, id: str, name: str, warehouseDocks: [map{dockId!: str, name!: str, time!: str, cost!: str, translateDays!: str, costToDisplay!: str}]}
@optional {priority: int, isActive: bool}
@returns(200)

@endpoint GET /api/logistics/pvt/configuration/warehouses
@required {Content-Type: str=application/json}
@returns(200)

@endpoint GET /api/logistics/pvt/configuration/warehouses/{warehouseId}
@required {Content-Type: str=application/json, warehouseId: str}
@returns(200) {id: str, name: str, warehouseDocks: [map], pickupPointIds: [str], priority: int, isActive: bool}

@endpoint DELETE /api/logistics/pvt/configuration/warehouses/{warehouseId}
@required {Content-Type: str=application/json, warehouseId: str}
@returns(200)

@endpoint POST /api/logistics/pvt/configuration/warehouses/{warehouseId}/activation
@required {Content-Type: str=application/json, warehouseId: str}
@returns(200)

@endpoint POST /api/logistics/pvt/configuration/warehouses/{warehouseId}/deactivation
@required {Content-Type: str=application/json, warehouseId: str}
@returns(200)

@endpoint GET /api/logistics/pvt/inventory/skus/{skuId}
@required {Content-Type: str=application/json, skuId: str}
@returns(200) {skuId: str, balance: [map]}

@endpoint GET /api/logistics/pvt/inventory/items/{skuId}/warehouses/{warehouseId}
@required {Content-Type: str=application/json, skuId: str, warehouseId: str}
@returns(200)

@endpoint PUT /api/logistics/pvt/inventory/skus/{skuId}/warehouses/{warehouseId}
@required {Content-Type: str, skuId: str, warehouseId: str, quantity: int(int32), unlimitedQuantity: bool, leadTime: str}
@optional {dateUtcOnBalanceSystem: str}
@returns(200)
@errors {400, 423}

@endpoint PATCH /api/logistics/pvt/inventory/skus/{skuId}/warehouses/{warehouseId}/quantity
@required {Content-Type: str, skuId: str, warehouseId: str, quantity: int, unlimitedQuantity: bool}
@optional {dateUtcOnBalanceSystem: str}
@returns(204)
@errors {400}

@endpoint PATCH /api/logistics/pvt/inventory/skus/{skuId}/warehouses/{warehouseId}/lead-time
@required {Content-Type: str, skuId: str, warehouseId: str, leadTime: str}
@returns(204)
@errors {400}

@endpoint GET /api/logistics/pvt/inventory/items/{skuId}/docks/{dockId}
@required {Content-Type: str=application/json, skuId: str, dockId: str}
@returns(200)

@endpoint GET /api/logistics/pvt/inventory/items/{skuId}/docks/{dockId}/warehouses/{warehouseId}
@required {Content-Type: str=application/json, skuId: str, dockId: str, warehouseId: str}
@returns(200)

@endpoint GET /api/logistics/pvt/inventory/items/{itemId}/warehouses/{warehouseId}/dispatched
@required {Content-Type: str=application/json, itemId: str, warehouseId: str}
@returns(200)

@endpoint GET /api/logistics/pvt/inventory/items/{skuId}/warehouses/{warehouseId}/supplyLots
@required {Content-Type: str, skuId: str, warehouseId: str}
@returns(200)

@endpoint PUT /api/logistics/pvt/inventory/items/{skuId}/warehouses/{warehouseId}/supplyLots/{supplyLotId}
@required {Content-Type: str=application/json, skuId: str, warehouseId: str, supplyLotId: str, quantity: int, dateOfSupplyUtc: str}
@optional {keepSellingAfterExpiration: bool}
@returns(204)

@endpoint POST /api/logistics/pvt/inventory/items/{skuId}/warehouses/{warehouseId}/supplyLots/{supplyLotId}/transfer
@required {Content-Type: str=application/json, skuId: str, warehouseId: str, supplyLotId: str}
@returns(204)

@endgroup

@group availability
@endpoint POST /availability/v1/inventory/batch
@returns(201) {batchId: str(uuid), status: str, upload: map{method: str, url: str(uri), headers: map{Content-Type: str}, expiresAt: str(date-time)}}
@errors {400, 401, 403, 500}

@endpoint POST /availability/v1/inventory/batch/{batchId}/commit
@required {batchId: str(uuid)}
@returns(202)
@errors {400, 401, 403, 423, 500}

@endpoint GET /availability/v1/inventory/batch/{batchId}/status
@required {batchId: str(uuid)}
@returns(200) {batchId: str(uuid), status: str, rowCount: int, processedCount: int, errorCount: int, amountCompleted: int, createdAt: str(date-time), startedAt: str(date-time)?, stages: map?{ingestedChunks: int, classifiedChunks: int, processedChunks: int, notifiedChunks: int, totalChunks: int}, summary: map?{insertCount: int, updateCount: int, noopCount: int, conflictCount: int, skippedDueApiUpdateCount: int, perItemRoutedCount: int, dlqEventsCount: int}}
@errors {400, 401, 403, 404, 500}

@endpoint GET /availability/v1/inventory/batch/{batchId}/errors
@required {batchId: str(uuid)}
@returns(200) {batchId: str(uuid), downloadUrl: str(uri), errorCount: int}
@returns(204)
@errors {400, 401, 403, 404, 500}

@endgroup

@group api
@endpoint PUT /api/logistics/pvt/configuration/holidays/{holidayId}
@required {Content-Type: str=application/json, holidayId: str, name: str, startDate: str}
@returns(200)

@endpoint GET /api/logistics/pvt/configuration/holidays/{holidayId}
@required {Content-Type: str=application/json, holidayId: str}
@returns(200)

@endpoint DELETE /api/logistics/pvt/configuration/holidays/{holidayId}
@required {Content-Type: str=application/json, holidayId: str}
@returns(200)

@endpoint GET /api/logistics/pvt/configuration/holidays
@required {Content-Type: str=application/json}
@returns(200)

@endpoint POST /api/logistics/pvt/inventory/reservations
@required {Content-Type: str=application/json, salesChannel: str, lockId: str, autorizationExpirationTTL: str, deliveryItemOptions: [map{item!: map, slaType!: str, slaTypeName!: str, listPrice!: num, promotionalPrice!: num, transitTime!: str, dockTime!: str, timeToDockPlusDockTime!: str, aditionalTimeBlockedDays!: str, totalTime!: str, deliveryWindows!: [map], wareHouseId!: str, dockId!: str, location!: map}]}
@returns(200) {LastUpdateDateUtc: str, SalesChannel: str, LockId: str, ReservationDateUtc: str, MaximumConfirmationDateUtc: str, Status: int(int32), SlaRequest: [map], PickupPointItemOptions: str?, CanceledDateUtc: str, AuthorizedDateUtc: str, ConfirmedDateUtc: str, Errors: [str]?, IsSucess: bool}

@endpoint GET /api/logistics/pvt/inventory/reservations/{reservationId}
@required {Content-Type: str=application/json, reservationId: str}
@returns(200) {LastUpdateDateUtc: str, SalesChannel: str, LockId: str, ReservationDateUtc: str, MaximumConfirmationDateUtc: str, Status: int(int32), SlaRequest: [map], CanceledDateUtc: str, AuthorizedDateUtc: str, ConfirmedDateUtc: str, Errors: [str]?, IsSucess: bool}

@endpoint POST /api/logistics/pvt/inventory/reservations/{reservationId}/confirm
@required {Content-Type: str=application/json, reservationId: str}
@returns(200)

@endpoint POST /api/logistics/pvt/inventory/reservations/{reservationId}/acknowledge
@required {Content-Type: str=application/json, reservationId: str}
@returns(200)

@endpoint POST /api/logistics/pvt/inventory/reservations/{reservationId}/cancel
@required {Content-Type: str=application/json, reservationId: str}
@returns(200)

@endpoint GET /api/logistics/pvt/inventory/reservations/{warehouseId}/{skuId}
@required {Content-Type: str=application/json, warehouseId: str, skuId: str}
@returns(200)

@endpoint POST /api/logistics/pvt/shipping/calculate
@required {Content-Type: str=application/json}
@returns(200)

@endpoint GET /api/logistics/pvt/configuration/pickuppoints
@required {Content-Type: str=application/json}
@returns(200)

@endpoint PUT /api/logistics/pvt/configuration/pickuppoints/{pickupPointId}
@required {Content-Type: str=application/json, pickupPointId: str, id: str, name: str, description: str, instructions: str, formatted_address: str, address: map{postalCode!: str, country!: map, city!: str, state!: str, neighborhood!: str, street!: str, number!: str, complement!: str, reference!: str, location!: map}, isActive: bool, businessHours: [map{dayOfWeek!: int(int32), openingTime!: str, closingTime!: str}], tagsLabel: [str]}
@optional {isThirdPartyPickup: bool}
@returns(200) {id: str, name: str, description: str, instructions: str, formatted_address: str?, address: map{postalCode: str, country: map{acronym: str, name: str}, city: str, state: str, neighborhood: str, street: str, number: str, complement: str, reference: str, location: map{latitude: num, longitude: num}}, isActive: bool, distance: num, seller: str, _sort: [num], businessHours: [map], tagsLabel: [str], pickupHolidays: [map], isThirdPartyPickup: bool, accountOwnerName: str, accountOwnerId: str, parentAccountName: str, originalId: str?}

@endpoint GET /api/logistics/pvt/configuration/pickuppoints/{pickupPointId}
@required {Content-Type: str=application/json, pickupPointId: str}
@returns(200) {id: str, name: str, description: str, instructions: str, formatted_address: str?, address: map{postalCode: str, country: map{acronym: str, name: str}, city: str, state: str, neighborhood: str, street: str, number: str, complement: str, reference: str, location: map{latitude: num, longitude: num}}, isActive: bool, distance: num, seller: str, _sort: [num], businessHours: [map], tagsLabel: [str], pickupHolidays: [map], isThirdPartyPickup: bool, accountOwnerName: str, accountOwnerId: str, parentAccountName: str, originalId: str?}

@endpoint DELETE /api/logistics/pvt/configuration/pickuppoints/{pickupPointId}
@required {Content-Type: str=application/json, pickupPointId: str}
@returns(204)

@endpoint GET /api/logistics/pvt/configuration/pickuppoints/_search
@required {Content-Type: str=application/json}
@optional {page: int, pageSize: int, keyword: str}
@returns(200) {items: [map], paging: map{page: int, perPage: int, total: int, pages: int}}

@endpoint GET /api/logistics/pvt/configuration/geoshape
@required {Content-Type: str=application/json}
@optional {page: int, perPage: int}
@returns(200) {items: [str], paging: map{page: int, perPage: int, total: int, pages: int}}

@endpoint PUT /api/logistics/pvt/configuration/geoshape
@required {Content-Type: str=application/json, name: str, geoShape: map{coordinates!: [[[num]]]}}
@returns(200)
@errors {400}

@endpoint GET /api/logistics/pvt/configuration/geoshape/{polygonName}
@required {Content-Type: str=application/json, polygonName: str}
@returns(200) {isActive: bool, name: str, geoShape: map{coordinates: [[[num]]], type: str}}

@endpoint DELETE /api/logistics/pvt/configuration/geoshape/{polygonName}
@required {Content-Type: str=application/json, polygonName: str}
@returns(200)

@endpoint GET /api/logistics-capacity/resources/carrier@{capacityType}@{shippingPolicyId}/time-frames
@required {Content-Type: str=application/json, capacityType: str, shippingPolicyId: str, rangeStart: str, rangeEnd: str}
@returns(200) {id: str, resourceId: str, startDate: str, endDate: str, ownMaxCapacity: num, resourceMaxCapacity: num, reservedValue: num, reservations: [map], log: [map]}

@endpoint GET /api/logistics-capacity/resources/carrier@{capacityType}@{shippingPolicyId}/time-frames/{windowDay}F{windowStartTime}T{windowEndTime}
@required {Content-Type: str=application/json, capacityType: str, shippingPolicyId: str, windowDay: str, windowStartTime: str, windowEndTime: str}
@returns(200) {id: str, resourceId: str, startDate: str, endDate: str, ownMaxCapacity: num, resourceMaxCapacity: num, reservedValue: num, reservations: [map], log: [map]}

@endgroup

@end
