@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 # HTTP Client Negotiation _Accept_ Header. Indicates the types of responses the client can understand.}
@endpoints 59
@hint download_for_search
@toc api(55), availability(4)

@group api
@endpoint GET /api/logistics/pvt/shipping-policies/{id}
@desc Retrieve shipping policy by ID
@required {Content-Type: str # Type of the content being sent., id: str # [Shipping policy](https://help.vtex.com/en/tutorial/shipping-policy--tutorials_140) ID.}
@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}} # OK

@endpoint DELETE /api/logistics/pvt/shipping-policies/{id}
@desc Delete shipping policy by ID
@required {Content-Type: str=application/json # Type of the content being sent., id: str # ID of the shipping policy.}
@returns(200) OK

@endpoint PUT /api/logistics/pvt/shipping-policies/{id}
@desc Update shipping policy by ID
@required {Content-Type: str=application/json # Type of the content being sent., id: str # Shipping policy ID., name: str # [Shipping policy]((https://help.vtex.com/en/tutorial/shipping-policy--tutorials_140) name., shippingMethod: str # Type of shipping available for this shipping policy (carrier). Options are shown on [shipping simulation](https://help.vtex.com/en/tutorial/shipping-simulation--tutorials_144)., deliveryOnWeekends: bool # Defines if the delivery on weekends configuration is active (`true`) or not (`false`)., maxDimension: map{largestMeasure!: num, maxMeasureSum!: num} # Object containing attributes of maximum dimension permitted by the shipping policy (carrier)., isActive: bool # Defines if the shipping policy is active (`true`) or inactive (`false`).}
@optional {cubicWeightSettings: map{volumetricFactor: num, minimunAcceptableVolumetricWeight: num} # Settings for the cubic weight of a package, which accounts for the [package's volume](https://help.vtex.com/en/tutorial/understanding-the-cubic-weight-factor--tutorials_128), and not only weight., modalSettings: map{modals: [str], useOnlyItemsWithDefinedModal: bool} # Configurations for the [modal](https://help.vtex.com/en/tutorial/how-does-the-modal-work--tutorials_125), which is the attachement of a specific product to a carrier specialized in delivering that type of product., deliveryScheduleSettings: map{useDeliverySchedule!: bool, maxRangeDelivery!: num, dayOfWeekForDelivery!: [map]} # [Scheduled delivery](https://help.vtex.com/en/tutorial/scheduled-delivery--22g3HAVCGLFiU7xugShOBi) settings.}
@returns(200) OK
@example_request {"name":"Correios PAC","shippingMethod":"Normal","deliveryOnWeekends":false,"maxDimension":{"largestMeasure":0,"maxMeasureSum":0},"cubicWeightSettings":{"volumetricFactor":0.2,"minimunAcceptableVolumetricWeight":0},"modalSettings":{"modals":["LIQUID"],"useOnlyItemsWithDefinedModal":false},"isActive":true,"deliveryScheduleSettings":{"useDeliverySchedule":true,"maxRangeDelivery":0,"dayOfWeekForDelivery":[{"dayOfWeek":2,"deliveryRanges":[{"startTime":"11:00:00","endTime":"12:30:00","listPrice":0,"deliveryCapacity":[{"capacityType":"ORDERS_QUANTITY","maxValue":0}]}]}]}}

@endpoint GET /api/logistics/pvt/shipping-policies
@desc List shipping policies
@required {Content-Type: str=application/json # Type of the content being sent.}
@optional {page: int # Number of the starting page of the response. When no value is sent, it starts in page `1`., perPage: int # Desired number of items per page, to retrieve information from your shipping policies.}
@returns(200) {items: [map], paging: map{page: int, perPage: int, total: int, pages: int}} # OK

@endpoint POST /api/logistics/pvt/shipping-policies
@desc Create shipping policy
@required {Content-Type: str=application/json # Type of the content being sent., id: str # ID of the shipping policy., name: str # Name of the shipping policy., shippingMethod: str # Type of shipping available for this shipping policy (carrier). Options shown on freight simulation., weekendAndHolidays: map{saturday!: bool, sunday!: bool, holiday!: bool} # If the shipping policy includes deliveries on weekends and holidays., maxDimension: map{largestMeasure!: num, maxMeasureSum!: num} # Object containing attributes of maximum dimension permitted by the shipping policy (carrier)., numberOfItemsPerShipment: int # Capacity of your store's logistics of shipment, determines number of items permitted per shipment., minimumValueAceptable: num # Minimum value accepted by the carrier, to realize the shipping., maximumValueAceptable: num # Maximum value accepted by the carrier, to realize the shipping., deliveryScheduleSettings: map{useDeliverySchedule!: bool, maxRangeDelivery!: num, dayOfWeekForDelivery!: [map]} # Settings for the Scheduled Delivery feature., cubicWeightSettings: map{volumetricFactor!: num, minimunAcceptableVolumetricWeight!: num} # Measure including the [package's volume](https://help.vtex.com/en/tutorial/understanding-the-cubic-weight-factor--tutorials_128), and not only weight., modalSettings: map{modals!: [str], useOnlyItemsWithDefinedModal!: bool} # Configurations for the [modal](https://help.vtex.com/en/tutorial/how-does-the-modal-work--tutorials_125), which is the attachement of a specific product to a carrier specialized in delivering that type of product., businessHourSettings: map{carrierBusinessHours!: [map], isOpenOutsideBusinessHours!: bool} # Business hours configurations., pickupPointsSettings: map{pickupPointIds!: [str], pickupPointTags!: [str], sellers!: [str]} # Configuration for Pickup Points., isActive: bool # Defines if the shipping policy is active (`true`) or not (`false`).}
@optional {carrierSchedule: [map{dayOfWeek: int, timeLimit: str}] # Schedule sent by the carrier to configure the shipping policy.}
@returns(200) OK
@example_request {"id":"123","name":"Normal","shippingMethod":"Normal","weekendAndHolidays":{"saturday":false,"sunday":false,"holiday":false},"maxDimension":{"largestMeasure":0,"maxMeasureSum":0},"numberOfItemsPerShipment":5,"minimumValueAceptable":0,"maximumValueAceptable":0,"deliveryScheduleSettings":{"useDeliverySchedule":true,"maxRangeDelivery":0,"dayOfWeekForDelivery":[{"dayOfWeek":2,"deliveryRanges":[{"startTime":"11:00:00","endTime":"12:30:00","listPrice":0,"deliveryCapacity":[{"capacityType":"ORDERS_QUANTITY","maxValue":55}]}]}]},"carrierSchedule":[{"dayOfWeek":0,"timeLimit":"time_limit"}],"cubicWeightSettings":{"volumetricFactor":3,"minimunAcceptableVolumetricWeight":5},"modalSettings":{"modals":["ELECTRONICS"],"useOnlyItemsWithDefinedModal":false},"businessHourSettings":{"carrierBusinessHours":[{"openingTime":"00:00:00","closingTime":"23:59:59","dayOfWeek":1}],"isOpenOutsideBusinessHours":true},"pickupPointsSettings":{"pickupPointIds":["Id1"],"pickupPointTags":["Tag1"],"sellers":["Seller1"]},"isActive":false}

@endpoint POST /api/logistics/pvt/configuration/freights/{carrierId}/values/update
@desc Create or update freight values
@required {Content-Type: str=application/json # Type of the content being sent., carrierId: str # Carrier ID.}
@returns(200) OK
@example_request [{"absoluteMoneyCost":"1.00","country":"BRA","maxVolume":1000000000,"operationType":1,"pricePercent":10,"pricePercentByWeight":0,"timeCost":"2.00:00:00","weightEnd":1000,"weightStart":1,"zipCodeEnd":"1234500","zipCodeStart":"1000000","polygon":"polygon2"}]

@endpoint GET /api/logistics/pvt/configuration/freights/{carrierId}/{cep}/values
@desc List freight values
@required {Content-Type: str=application/json # Type of the content being sent., carrierId: str # Carrier ID., cep: str # Postal code of the area in which you wish to retrieve freight values for a given carrier, according to your [shipping rate template](https://help.vtex.com/en/tutorial/shipping-rate-template--tutorials_127) configurations.}
@returns(200) OK

@endpoint GET /api/logistics/pvt/configuration/carriers/{carrierId}/getdayofweekblocked
@desc Retrieve blocked delivery windows
@required {Content-Type: str=application/json # Type of the content being sent., carrierId: str # [Shipping policy](https://help.vtex.com/en/tutorial/shipping-policy--tutorials_140) ID (carrier ID).}
@returns(200) OK

@endpoint POST /api/logistics/pvt/configuration/carriers/{carrierId}/adddayofweekblocked
@desc Add blocked delivery windows
@required {Content-Type: str=application/json # Type of the content being sent., carrierId: str # [Shipping policy](https://help.vtex.com/en/tutorial/shipping-policy--tutorials_140) ID (carrier ID).}
@returns(200) OK
@example_request "2025-12-09T08:00:00"

@endpoint POST /api/logistics/pvt/configuration/carriers/{carrierId}/removedayofweekblocked
@desc Remove blocked delivery windows
@required {Content-Type: str=application/json # Type of the content being sent., carrierId: str # [Shipping policy](https://help.vtex.com/en/tutorial/shipping-policy--tutorials_140) ID (carrier ID).}
@returns(200) OK
@example_request "2024-12-09T08:00:00"

@endpoint POST /api/logistics/pvt/configuration/docks
@desc Create or update dock
@required {Content-Type: str=application/json # Type of the content being sent., id: str # [Loading dock](https://help.vtex.com/en/tutorial/loading-dock--5DY8xHEjOLYDVL41Urd5qj) ID., name: str # Loading dock name., priority: int # Value used as a tie-breaking rule when selecting a loading dock., dockTimeFake: str # [Loading dock](https://help.vtex.com/en/tutorial/loading-dock--5DY8xHEjOLYDVL41Urd5qj) processing time in the format `D.HH:MM:SS`. When not configured, it returns `00:00:00`., timeFakeOverhead: str # Time frame used to choose a loading dock when there is more than one loading dock with the same processing time. The lower the value entered in this field, the greater the possibility of the loading dock being chosen.  >ℹ️ This field is not considered when calculating the delivery time., salesChannels: [str] # Sales channels ([trade policies](https://help.vtex.com/en/tutorial/how-trade-policies-work--6Xef8PZiFm40kg2STrMkMV)) to associate with the loading dock., salesChannel: str # Main sales channel ([trade policy](https://help.vtex.com/en/tutorial/how-trade-policies-work--6Xef8PZiFm40kg2STrMkMV)) to associate with the loading dock., freightTableIds: [str] # List with freight table IDs., wmsEndPoint: str # Warehouse Management System (WMS) fulfillment endpoint., address: map{postalCode!: str, country!: map, city!: str, state!: str, neighborhood!: str, street!: str, number!: str, complement!: str, coordinates!: [[num]]} # Dock address object.}
@returns(200) OK
@example_request {"id":"1a8bce3","name":"Catete dock_3","priority":0,"dockTimeFake":"00:00:00","timeFakeOverhead":"00:00:00","salesChannels":["3"],"salesChannel":"1","freightTableIds":["11cc4b6"],"wmsEndPoint":null,"address":{"postalCode":"02220070","country":{"acronym":"BRA","name":"Brazil"},"city":"Rio de Janeiro","state":"RJ","neighborhood":"Catete","street":"Artur Bernardes Street","number":"100","complement":"apartment","coordinates":[[-34.82939147949219]]}}

@endpoint GET /api/logistics/pvt/configuration/docks
@desc List all docks
@required {Content-Type: str=application/json # Type of the content being sent.}
@returns(200) OK

@endpoint GET /api/logistics/pvt/configuration/docks/{dockId}
@desc List dock by ID
@required {Content-Type: str=application/json # Type of the content being sent., dockId: str # [Loading dock](https://help.vtex.com/en/tutorial/loading-dock--5DY8xHEjOLYDVL41Urd5qj) ID.}
@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} # OK

@endpoint DELETE /api/logistics/pvt/configuration/docks/{dockId}
@desc Delete dock
@required {Content-Type: str=application/json # Type of the content being sent., dockId: str # [Loading dock](https://help.vtex.com/en/tutorial/loading-dock--5DY8xHEjOLYDVL41Urd5qj) ID.}
@returns(200) OK

@endpoint POST /api/logistics/pvt/configuration/docks/{dockId}/activation
@desc Activate dock
@required {Content-Type: str=application/json # Type of the content being sent., dockId: str # [Loading dock](https://help.vtex.com/en/tutorial/loading-dock--5DY8xHEjOLYDVL41Urd5qj) ID.}
@returns(204) No Content

@endpoint POST /api/logistics/pvt/configuration/docks/{dockId}/deactivation
@desc Deactivate dock
@required {Content-Type: str=application/json # Type of the content being sent., dockId: str # [Loading dock](https://help.vtex.com/en/tutorial/loading-dock--5DY8xHEjOLYDVL41Urd5qj) ID.}
@returns(204) No Content

@endpoint POST /api/logistics/pvt/configuration/warehouses
@desc Create or update warehouse
@required {Content-Type: str=application/json # Type of the content being sent., id: str # Warehouse ID., name: str # Warehouse name., warehouseDocks: [map{dockId!: str, name!: str, time!: str, cost!: str, translateDays!: str, costToDisplay!: str}] # List of [loading docks](https://help.vtex.com/en/tutorial/loading-dock--5DY8xHEjOLYDVL41Urd5qj) to associate with the warehouse.}
@optional {priority: int # Optional configuration of the warehouse priority. When no priority was set, it corresponds to `0`., isActive: bool # Defines if the warehous is active (`true`) or not (`false`).}
@returns(200) OK
@example_request {"id":"15bfc76","name":"Main warehouse","warehouseDocks":[{"dockId":"1a8bce3","name":"Central dock","time":"3.00:00:00","cost":"5.00","translateDays":"days","costToDisplay":"5,00"}],"priority":0,"isActive":true}

@endpoint GET /api/logistics/pvt/configuration/warehouses
@desc List all warehouses
@required {Content-Type: str=application/json # Type of the content being sent.}
@returns(200) OK

@endpoint GET /api/logistics/pvt/configuration/warehouses/{warehouseId}
@desc List warehouse by ID
@required {Content-Type: str=application/json # Type of the content being sent., warehouseId: str # [Warehouse](https://help.vtex.com/en/tutorial/warehouse--6oIxvsVDTtGpO7y6zwhGpb) ID.}
@returns(200) {id: str, name: str, warehouseDocks: [map], pickupPointIds: [str], priority: int, isActive: bool} # OK

@endpoint DELETE /api/logistics/pvt/configuration/warehouses/{warehouseId}
@desc Remove warehouse
@required {Content-Type: str=application/json # Type of the content being sent., warehouseId: str # [Warehouse](https://help.vtex.com/en/tutorial/warehouse--6oIxvsVDTtGpO7y6zwhGpb) ID.}
@returns(200) OK

@endpoint POST /api/logistics/pvt/configuration/warehouses/{warehouseId}/activation
@desc Activate warehouse
@required {Content-Type: str=application/json # Type of the content being sent., warehouseId: str # [Warehouse](https://help.vtex.com/en/tutorial/warehouse--6oIxvsVDTtGpO7y6zwhGpb) ID.}
@returns(200) OK

@endpoint POST /api/logistics/pvt/configuration/warehouses/{warehouseId}/deactivation
@desc Deactivate warehouse
@required {Content-Type: str=application/json # Type of the content being sent., warehouseId: str # [Warehouse](https://help.vtex.com/en/tutorial/warehouse--6oIxvsVDTtGpO7y6zwhGpb) ID.}
@returns(200) OK

@endpoint GET /api/logistics/pvt/inventory/skus/{skuId}
@desc List inventory by SKU
@required {Content-Type: str=application/json # Type of the content being sent., skuId: str # Every SKU has a unique identifier called SKU ID.}
@returns(200) {skuId: str, balance: [map]} # OK

@endpoint GET /api/logistics/pvt/inventory/items/{skuId}/warehouses/{warehouseId}
@desc List inventory per warehouse
@required {Content-Type: str=application/json # Type of the content being sent., skuId: str # SKU unique identifier., warehouseId: str # Warehouse ID is the unique identifier of the [warehouse](https://help.vtex.com/en/tutorial/warehouse--6oIxvsVDTtGpO7y6zwhGpb).}
@returns(200) OK

@endpoint PUT /api/logistics/pvt/inventory/skus/{skuId}/warehouses/{warehouseId}
@desc Update inventory by SKU and warehouse
@required {Content-Type: str # Type of the content being sent., skuId: str # Unique identifier of the SKU you wish to update., warehouseId: str # Unique identifier of the [warehouse](https://help.vtex.com/en/tutorial/warehouse--6oIxvsVDTtGpO7y6zwhGpb) of the SKU you wish to update., quantity: int(int32) # Quantity of SKU units you wish to update the [inventory](https://help.vtex.com/tutorial/inventory-management--tutorials_139) in the given [warehouse](https://help.vtex.com/en/tutorial/warehouse--6oIxvsVDTtGpO7y6zwhGpb). Note that:  - Sending it as `null` sets the quantity to `0`.  - Not sending it sets the quantity to `0`.  - Sending `unlimitedQuantity` as `true` overrules the `quantity`., unlimitedQuantity: bool # When set as `true`, you make the SKU from the given warehouse permanently available for sales. No matter how many units are sold, the default quantity of `1000000` units does not decrease, and the store never runs out of stock. When set as `false`, every sold unit will decrease your inventory quantity. Note that:  - Sending this field as `null` sets the value to `false`.  - Not sending this field sets the value to `false`.  - Sending this field as `true` overrules the `quantity` field., leadTime: str # Defines the [lead time](https://help.vtex.com/en/tutorial/lead-time-shipping-time-at-sku-level--16yv5Mkj6bTyWR1hCN2f4B), which is an optional time configuration you can make for a SKU in a warehouse. It can be handling time, fabrication or how long it takes for the item to be available to be shipped to customers.  The lead time is a part of the total shipping time and will be considered for shipping date calculation.  The format is `dd.hh:mm:ss` (days.hours:minutes:seconds). Note that:  - Sending this field as `null` sets the value to `0`.  - Not sending this field sets the value to `0`.}
@optional {dateUtcOnBalanceSystem: str # Defines the date and time of the warehouse when the SKU was updated. This can be useful for liberating handling order [reservations](https://help.vtex.com/en/tutorial/how-the-reservation-works--tutorials_92), for example. The format is [ISO 8601 time zone offset format](https://learn.microsoft.com/en-us/rest/api/storageservices/formatting-datetime-values), as in `YYYY-MM-DDThh:mm:ss.ssZ`.  When the value is `null` or empty, the default will be the date and time of the request being made.}
@returns(200) OK
@errors {400: Bad Request, 423: Locked}
@example_request {"quantity":202,"unlimitedQuantity":false,"dateUtcOnBalanceSystem":"2024-06-13T00:52:16","leadTime":"10.10:00:00"}

@endpoint PATCH /api/logistics/pvt/inventory/skus/{skuId}/warehouses/{warehouseId}/quantity
@desc Update inventory quantity by SKU and warehouse
@required {Content-Type: str # Type of the content being sent., skuId: str # Unique identifier of the SKU you wish to update., warehouseId: str # Unique identifier of the [warehouse](https://help.vtex.com/en/tutorial/warehouse--6oIxvsVDTtGpO7y6zwhGpb) of the SKU you wish to update., quantity: int # Number of items you wish to update in your [inventory](https://help.vtex.com/en/tutorial/inventory-management--tutorials_139) for a SKU from a given warehouse.   Note that sending the field `unlimitedQuantity` as `true` overrules the `quantity`., unlimitedQuantity: bool # When set as `false`, every sold unit decreases the item's available quantity. When set as `true`, the SKU from the warehouse is always available for sale. No matter how many units are sold, the SKU available quantity never decreases, and the SKU is never out of stock.   Note that sending this field as `true` overrules the `quantity`.}
@optional {dateUtcOnBalanceSystem: str # Defines the date and time of the warehouse when the SKU was updated. This can be useful for liberating handling order [reservations](https://help.vtex.com/en/tutorial/how-the-reservation-works--tutorials_92), for example.   The format is [ISO 8601 time zone offset format](https://learn.microsoft.com/en-us/rest/api/storageservices/formatting-datetime-values), as in `YYYY-MM-DDThh:mm:ss.ssZ`. When the value is `null` or empty, the default will be the date and time of the when the request being made.}
@returns(204) No Content
@errors {400: Bad Request}
@example_request {"quantity":201,"unlimitedQuantity":false,"dateUtcOnBalanceSystem":"2024-01-31T19:12:01.025662+00:00"}

@endpoint PATCH /api/logistics/pvt/inventory/skus/{skuId}/warehouses/{warehouseId}/lead-time
@desc Update inventory lead time by SKU and warehouse
@required {Content-Type: str # Type of the content being sent., skuId: str # Unique identifier of the SKU you wish to update., warehouseId: str # Unique identifier of the [warehouse](https://help.vtex.com/en/tutorial/warehouse--6oIxvsVDTtGpO7y6zwhGpb) of the SKU you wish to update., leadTime: str # Defines the [lead time](https://help.vtex.com/en/tutorial/lead-time-shipping-time-at-sku-level--16yv5Mkj6bTyWR1hCN2f4B), a configuration for shipping time at SKU level. You can set a shipping period for a warehouse SKU, and this time will be added to the order's total shipping time. Note that:   - The format is `DD.HH:MM:SS`, or `DD`. The endpoint allows configuring hours and minutes, but the UI only shows days.   - If you mistake hours for days, the system will accept the value as days. For example, sending `78:00:00` updates the lead time to 78 days.   - Sending an empty field or a value in an incorrect format will result in a `400 Bad Request`.}
@returns(204) No Content
@errors {400: Bad Request}
@example_request {"leadTime":"8.00:00:00"}

@endpoint GET /api/logistics/pvt/inventory/items/{skuId}/docks/{dockId}
@desc List inventory per dock
@required {Content-Type: str=application/json # Type of the content being sent., skuId: str # SKU unique identifier., dockId: str # [Loading dock](https://help.vtex.com/en/tutorial/loading-dock--5DY8xHEjOLYDVL41Urd5qj) ID.}
@returns(200) OK

@endpoint GET /api/logistics/pvt/inventory/items/{skuId}/docks/{dockId}/warehouses/{warehouseId}
@desc List inventory per dock and warehouse
@required {Content-Type: str=application/json # Type of the content being sent., skuId: str # SKU unique identifier., dockId: str # [Loading dock](https://help.vtex.com/en/tutorial/loading-dock--5DY8xHEjOLYDVL41Urd5qj) ID., warehouseId: str # [Warehouse](https://help.vtex.com/en/tutorial/warehouse--6oIxvsVDTtGpO7y6zwhGpb) ID.}
@returns(200) OK

@endpoint GET /api/logistics/pvt/inventory/items/{itemId}/warehouses/{warehouseId}/dispatched
@desc List inventory with dispatched reservations
@required {Content-Type: str=application/json # Type of the content being sent., itemId: str # SKU unique identifier called SKU ID. This field is an equivalent to `skuId`., warehouseId: str # Warehouse ID is the unique identifier of the [warehouse](https://help.vtex.com/en/tutorial/warehouse--6oIxvsVDTtGpO7y6zwhGpb).}
@returns(200) OK

@endpoint GET /api/logistics/pvt/inventory/items/{skuId}/warehouses/{warehouseId}/supplyLots
@desc List supply lots
@required {Content-Type: str # Type of the content being sent., skuId: str # SKU ID., warehouseId: str # ID of the [warehouse](https://help.vtex.com/en/tutorial/warehouse--6oIxvsVDTtGpO7y6zwhGpb) where the SKU is located.}
@returns(200) OK

@endpoint PUT /api/logistics/pvt/inventory/items/{skuId}/warehouses/{warehouseId}/supplyLots/{supplyLotId}
@desc Save supply lot
@required {Content-Type: str=application/json # Type of the content being sent., skuId: str # SKU ID being scheduled for availability for sales., warehouseId: str # ID of the [warehouse](https://help.vtex.com/en/tutorial/warehouse--6oIxvsVDTtGpO7y6zwhGpb) where the SKU will arrive., supplyLotId: str # ID of the supply lot of the SKU availability scheduling., quantity: int # Supply lot quantity for a SKU from a [warehouse](https://help.vtex.com/en/tutorial/warehouse--6oIxvsVDTtGpO7y6zwhGpb)., dateOfSupplyUtc: str # Date and time of when the SKU from the warehouse will have quantity and availability for sales again. The format is [ISO 8601 time zone offset](https://learn.microsoft.com/en-us/rest/api/storageservices/formatting-datetime-values), as in `YYYY-MM-DDThh:mm:ss.ssZ`. Since it is a prevision, this field must be a future date.}
@optional {keepSellingAfterExpiration: bool # Defines if the SKU from the warehouse should be available for sales after running _out-of-stock_ (`true`), or not (`false`).}
@returns(204) No Content
@example_request {"quantity":1200,"dateOfSupplyUtc":"2025-02-25T09:00:00+00:00","keepSellingAfterExpiration":true}

@endpoint POST /api/logistics/pvt/inventory/items/{skuId}/warehouses/{warehouseId}/supplyLots/{supplyLotId}/transfer
@desc Transfer supply lot
@required {Content-Type: str=application/json # Type of the content being sent., skuId: str # ID of the SKU., warehouseId: str # ID of the [warehouse](https://help.vtex.com/en/tutorial/warehouse--6oIxvsVDTtGpO7y6zwhGpb) where the SKU is located., supplyLotId: str # ID of the supply lot in which the SKU is currently located and from where it will be transfered.}
@returns(204) No Content

@endgroup

@group availability
@endpoint POST /availability/v1/inventory/batch
@desc Create batch inventory job
@returns(201) {batchId: str(uuid), status: str, upload: map{method: str, url: str(uri), headers: map{Content-Type: str}, expiresAt: str(date-time)}} # Created
@errors {400: Bad Request  Invalid request or missing required path parameter., 401: Unauthorized  Missing or invalid authentication., 403: Forbidden  Insufficient permissions or feature not enabled for the account., 500: Internal Server Error  Unexpected error occurred while creating the batch.}

@endpoint POST /availability/v1/inventory/batch/{batchId}/commit
@desc Commit batch inventory
@required {batchId: str(uuid) # Unique identifier for the batch job, returned by the [Create batch inventory job](https://developers.vtex.com/docs/api-reference/logistics-api#post-/availability/v1/inventory/batch) endpoint.}
@returns(202) Accepted  Upload confirmed and batch queued for processing.
@errors {400: Bad Request  Batch already processing or invalid state., 401: Unauthorized  Missing or invalid authentication., 403: Forbidden  Insufficient permissions., 423: Locked  There is already a commit in progress for this batch., 500: Internal Server Error  Unexpected error occurred while committing the batch.}

@endpoint GET /availability/v1/inventory/batch/{batchId}/status
@desc Get batch inventory status
@required {batchId: str(uuid) # Unique identifier for the batch job, returned by the [Create batch inventory job](https://developers.vtex.com/docs/api-reference/logistics-api#post-/availability/v1/inventory/batch) endpoint.}
@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}} # OK
@errors {400: Bad Request  Invalid batch ID format., 401: Unauthorized  Missing or invalid authentication., 403: Forbidden  Insufficient permissions., 404: Not Found  Batch not found., 500: Internal Server Error  Unexpected error occurred while retrieving the batch status.}

@endpoint GET /availability/v1/inventory/batch/{batchId}/errors
@desc Get batch inventory errors
@required {batchId: str(uuid) # Unique identifier for the batch job, returned by the [Create batch inventory job](https://developers.vtex.com/docs/api-reference/logistics-api#post-/availability/v1/inventory/batch) endpoint.}
@returns(200) {batchId: str(uuid), downloadUrl: str(uri), errorCount: int} # OK  Error report available for download.
@returns(204) No Content  No errors or report not available.
@errors {400: Bad Request  Invalid batch ID format., 401: Unauthorized  Missing or invalid authentication., 403: Forbidden  Insufficient permissions., 404: Not Found  Batch not found., 500: Internal Server Error  Unexpected error occurred while retrieving the error report.}

@endgroup

@group api
@endpoint PUT /api/logistics/pvt/configuration/holidays/{holidayId}
@desc Create or update holiday
@required {Content-Type: str=application/json # Type of the content being sent., holidayId: str # [Holiday](https://help.vtex.com/en/tutorial/registering-holidays--2ItOthSEAoyAmcwsuiO6Yk) ID., name: str # [Holiday](https://help.vtex.com/en/tutorial/registering-holidays--2ItOthSEAoyAmcwsuiO6Yk) ID., startDate: str # Holiday starting date, in the format `YYYY-MM-DD`.}
@returns(200) OK
@example_request {"name":"Christmas","startDate":"2024-12-25"}

@endpoint GET /api/logistics/pvt/configuration/holidays/{holidayId}
@desc List holiday by ID
@required {Content-Type: str=application/json # Type of the content being sent., holidayId: str # [Holiday](https://help.vtex.com/en/tutorial/registering-holidays--2ItOthSEAoyAmcwsuiO6Yk) ID.}
@returns(200) OK

@endpoint DELETE /api/logistics/pvt/configuration/holidays/{holidayId}
@desc Delete holiday
@required {Content-Type: str=application/json # Type of the content being sent., holidayId: str # [Holiday](https://help.vtex.com/en/tutorial/registering-holidays--2ItOthSEAoyAmcwsuiO6Yk) ID.}
@returns(200) OK

@endpoint GET /api/logistics/pvt/configuration/holidays
@desc List all holidays
@required {Content-Type: str=application/json # Type of the content being sent.}
@returns(200) OK

@endpoint POST /api/logistics/pvt/inventory/reservations
@desc Create reservation
@required {Content-Type: str=application/json # Type of the content being sent., salesChannel: str # Sales channel ([trade policy](https://help.vtex.com/en/tutorial/how-trade-policies-work--6Xef8PZiFm40kg2STrMkMV)) valid for the reservation., lockId: str # [Reservation](https://help.vtex.com/en/tutorial/how-does-reservation-work--tutorials_92) ID., autorizationExpirationTTL: str # Duration before expiring the reservation, in the format `DD.HH:MM:SS`., 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}] # Array with information about reserved items.}
@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} # OK
@example_request {"salesChannel":"1","lockId":null,"autorizationExpirationTTL":"10.00:00:00","deliveryItemOptions":[{"item":{"id":"29","quantity":1,"kitItem":[],"price":14128.9,"modal":"FURNITURE","additionalHandlingTime":"00:00:00","dimension":{"weight":186.37,"height":23.5,"width":165,"length":67.5}},"slaType":"delivery","slaTypeName":"Normal delivery","listPrice":10.5,"promotionalPrice":10.5,"transitTime":"2.00:00:00","dockTime":"00:00:00","timeToDockPlusDockTime":"1.00:00:00","aditionalTimeBlockedDays":"1.00:00:00","totalTime":"3.00:00:00","deliveryWindows":[{"startDateUtc":"2024-02-25T09:00:00+00:00","endDateUtc":"2024-02-25T12:00:00+00:00","listPrice":"0.0"}],"wareHouseId":"1937054","dockId":"1a8bce3","location":{"zipCode":"22220070","country":"BRA","inStore":{"IsCheckedIn":false,"StoreId":"180082"}}}]}

@endpoint GET /api/logistics/pvt/inventory/reservations/{reservationId}
@desc List reservation by ID
@required {Content-Type: str=application/json # Type of the content being sent., reservationId: str # [Reservation](https://help.vtex.com/en/tutorial/how-the-reservation-works--tutorials_92) ID.}
@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} # OK

@endpoint POST /api/logistics/pvt/inventory/reservations/{reservationId}/confirm
@desc Confirm reservation
@required {Content-Type: str=application/json # Type of the content being sent., reservationId: str # [Reservation](https://help.vtex.com/en/tutorial/how-the-reservation-works--tutorials_92) ID.}
@returns(200) OK

@endpoint POST /api/logistics/pvt/inventory/reservations/{reservationId}/acknowledge
@desc Acknowledgment reservation
@required {Content-Type: str=application/json # Type of the content being sent., reservationId: str # [Reservation](https://help.vtex.com/en/tutorial/how-the-reservation-works--tutorials_92) ID.}
@returns(200) OK

@endpoint POST /api/logistics/pvt/inventory/reservations/{reservationId}/cancel
@desc Cancel reservation
@required {Content-Type: str=application/json # Type of the content being sent., reservationId: str # [Reservation](https://help.vtex.com/en/tutorial/how-the-reservation-works--tutorials_92) ID.}
@returns(200) OK

@endpoint GET /api/logistics/pvt/inventory/reservations/{warehouseId}/{skuId}
@desc List reservation by warehouse and SKU
@required {Content-Type: str=application/json # Type of the content being sent., warehouseId: str # [Warehouse](https://help.vtex.com/en/tutorial/warehouse--6oIxvsVDTtGpO7y6zwhGpb) ID., skuId: str # SKU ID.}
@returns(200) OK

@endpoint POST /api/logistics/pvt/shipping/calculate
@desc Calculate SLA
@required {Content-Type: str=application/json # Type of the content being sent.}
@returns(200) OK
@example_request [{"items":[{"id":"1","quantity":1,"price":14128.9,"modal":"FURNITURE","additionalHandlingTime":"00:00:00","dimension":{"weight":86.37,"height":23.5,"width":65,"length":67.5,"maxSumDimension":243.9},"kitItem":[{"id":"2","kitItem":["1"],"quantity":1,"price":1,"additionalHandlingTime":"00:00:00","dimension":{"weight":1,"height":1,"width":1,"length":1,"maxSumDimension":5}}],"dockId":"1a8bce3","wareHouseId":"1937054"}],"location":{"zipCode":"22780084","country":"BRA","point":[-43.23171615600586],"inStore":{"IsCheckedIn":false,"StoreId":"180082"}},"salesChannel":"1","deliveryChannel":"delivery"}]

@endpoint GET /api/logistics/pvt/configuration/pickuppoints
@desc List pickup points
@required {Content-Type: str=application/json # Type of the content being sent.}
@returns(200) OK

@endpoint PUT /api/logistics/pvt/configuration/pickuppoints/{pickupPointId}
@desc Create or update pickup point
@required {Content-Type: str=application/json # Type of the content being sent., pickupPointId: str # [Pickup point](https://help.vtex.com/en/tutorial/pickup-points--2fljn6wLjn8M4lJHA6HP3R) ID. Cannot contain spaces., id: str # [Pickup point](https://help.vtex.com/en/tutorial/pickup-points--2fljn6wLjn8M4lJHA6HP3R) ID. Cannot contain spaces., name: str # Pickup point name displayed to customers at checkout., description: str # Pickup point description., instructions: str # Pickup point instructions., formatted_address: str # Formatted address., address: map{postalCode!: str, country!: map, city!: str, state!: str, neighborhood!: str, street!: str, number!: str, complement!: str, reference!: str, location!: map} # Pickup point address information., isActive: bool # Defines if the pickup point is active (`true`) or inactive (`false`)., businessHours: [map{dayOfWeek!: int(int32), openingTime!: str, closingTime!: str}] # Pickup point business hours configurations., tagsLabel: [str] # Tags that identify a group of pickup points.}
@optional {isThirdPartyPickup: bool # Defines if the pickup point is third-party (`true`) or not (`false`).}
@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?} # OK
@example_request {"id":"b8e7ca56","name":"Pickup store.","description":"Pickup your items in our store.","instructions":"Bring your ID in order to pickup your order.","formatted_address":"undefined","address":{"postalCode":"22070002","country":{"acronym":"BRA","name":"Brazil"},"city":"Rio de Janeiro","state":"RJ","neighborhood":"Botafogo","street":"Praia de botafogo.","number":"200","complement":"3rd floor","reference":"Grey building","location":{"latitude":-22.974477767944336,"longitude":-43.18672561645508}},"isActive":true,"businessHours":[{"dayOfWeek":1,"openingTime":"08:00:00","closingTime":"20:00:00"}],"tagsLabel":["w67"],"isThirdPartyPickup":false}

@endpoint GET /api/logistics/pvt/configuration/pickuppoints/{pickupPointId}
@desc List pickup point by ID
@required {Content-Type: str=application/json # Type of the content being sent., pickupPointId: str # [Pickup point](https://help.vtex.com/en/tutorial/pickup-points--2fljn6wLjn8M4lJHA6HP3R) ID.}
@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?} # OK

@endpoint DELETE /api/logistics/pvt/configuration/pickuppoints/{pickupPointId}
@desc Delete pickup point
@required {Content-Type: str=application/json # Type of the content being sent., pickupPointId: str # [Pickup point](https://help.vtex.com/en/tutorial/pickup-points--2fljn6wLjn8M4lJHA6HP3R) ID.}
@returns(204) No Content

@endpoint GET /api/logistics/pvt/configuration/pickuppoints/_search
@desc List paged pickup points
@required {Content-Type: str=application/json # Type of the content being sent.}
@optional {page: int # Number of the page of the response. When not informed, the default page returned is `1`, but you can use this parameter to retrieve a specific page. The response is limited to 100 pages., pageSize: int # Number of [pickup points](https://help.vtex.com/en/tutorial/pickup-points--2fljn6wLjn8M4lJHA6HP3R) per page., keyword: str # Search pickup points by using a keyword.}
@returns(200) {items: [map], paging: map{page: int, perPage: int, total: int, pages: int}} # OK

@endpoint GET /api/logistics/pvt/configuration/geoshape
@desc List paged polygons
@required {Content-Type: str=application/json # Type of the content being sent.}
@optional {page: int # Number of the page of the response., perPage: int # Number of [polygons](https://help.vtex.com/en/tutorial/registering-geolocation--tutorials_138) per page.}
@returns(200) {items: [str], paging: map{page: int, perPage: int, total: int, pages: int}} # OK

@endpoint PUT /api/logistics/pvt/configuration/geoshape
@desc Create or update polygon
@required {Content-Type: str=application/json # Type of the content being sent., name: str # Name of the [polygon](https://help.vtex.com/en/tutorial/registering-geolocation--tutorials_138) being created or updated., geoShape: map{coordinates!: [[[num]]]} # Polygon geolocation coordinates.}
@returns(200) OK
@errors {400: Bad Request}
@example_request {"name":"ipanema_leblon","geoShape":{"coordinates":[[[-43.23171615600586]]]}}

@endpoint GET /api/logistics/pvt/configuration/geoshape/{polygonName}
@desc List polygon by ID
@required {Content-Type: str=application/json # Type of the content being sent., polygonName: str # [Polygon](https://help.vtex.com/en/tutorial/registering-geolocation--tutorials_138) ID (same as the polygon name).}
@returns(200) {isActive: bool, name: str, geoShape: map{coordinates: [[[num]]], type: str}} # OK

@endpoint DELETE /api/logistics/pvt/configuration/geoshape/{polygonName}
@desc Delete polygon
@required {Content-Type: str=application/json # Type of the content being sent., polygonName: str # [Polygon](https://help.vtex.com/en/tutorial/registering-geolocation--tutorials_138) ID (same as the polygon name).}
@returns(200) OK

@endpoint GET /api/logistics-capacity/resources/carrier@{capacityType}@{shippingPolicyId}/time-frames
@desc Search capacity reservations in time range
@required {Content-Type: str=application/json # Type of the content being sent., capacityType: str # Defines how the [delivery capacity](https://help.vtex.com/en/tutorial/managing-delivery-capacity--2y217FQZCjD0I1n62yxVcz) is set in the [shipping policy](https://help.vtex.com/en/tutorial/shipping-policy--tutorials_140), which can be by maximum number of orders (`orders_quantity`) or items (`skus_quantity`)., shippingPolicyId: str # ID of the [shipping policy](https://help.vtex.com/en/tutorial/shipping-policy--tutorials_140) being searched for capacity reservation., rangeStart: str # Starting date range in the format `YYYY-MM-DD`., rangeEnd: str # Ending date range in the format `YYYY-MM-DD`.}
@returns(200) {id: str, resourceId: str, startDate: str, endDate: str, ownMaxCapacity: num, resourceMaxCapacity: num, reservedValue: num, reservations: [map], log: [map]} # OK

@endpoint GET /api/logistics-capacity/resources/carrier@{capacityType}@{shippingPolicyId}/time-frames/{windowDay}F{windowStartTime}T{windowEndTime}
@desc Get capacity reservation usage by window
@required {Content-Type: str=application/json # Type of the content being sent., capacityType: str # Defines how the [delivery capacity](https://help.vtex.com/en/tutorial/managing-delivery-capacity--2y217FQZCjD0I1n62yxVcz) is set in the [shipping policy](https://help.vtex.com/en/tutorial/shipping-policy--tutorials_140), which can be by maximum number of orders (`orders_quantity`) or items (`skus_quantity`)., shippingPolicyId: str # ID of the [shipping policy](https://help.vtex.com/en/tutorial/shipping-policy--tutorials_140) being searched for capacity reservation., windowDay: str # Date of the [scheduled delivery window](https://help.vtex.com/en/tutorial/scheduled-delivery--22g3HAVCGLFiU7xugShOBi) being consulted for reservations. The format is `YYYY-MM-DD`., windowStartTime: str # Starting time of the scheduled delivery window being consulted for reservations. The format is `HHMM`., windowEndTime: str # Ending time of the scheduled delivery window being consulted for reservations. The format is `HHMM`.}
@returns(200) {id: str, resourceId: str, startDate: str, endDate: str, ownMaxCapacity: num, resourceMaxCapacity: num, reservedValue: num, reservations: [map], log: [map]} # OK

@endgroup

@end
