# Delivery

Managing shipments and carriers in the e-shop.

## List of shipments

 - [GET /api/shipments](https://api.docs.shoptet.com/shoptet-api/openapi/delivery/getlistofshipments.md): Returns a paginated list of shipments. Optionally filter by status or order code.

## Creation of shipment

 - [POST /api/shipments](https://api.docs.shoptet.com/shoptet-api/openapi/delivery/createshipment.md): In the packages field, you can send an object containing three
combinations of child fields:

- orderPackagingId only,
- packaging and weight,
- width, height, depth, and weight.

## Detail of shipment

 - [GET /api/shipments/{guid}](https://api.docs.shoptet.com/shoptet-api/openapi/delivery/getshipmentdetail.md): Returns detail of a single shipment identified by its GUID.

## Shipment cancellation request

 - [POST /api/shipments/{guid}/cancel-request](https://api.docs.shoptet.com/shoptet-api/openapi/delivery/shipmentcancellationrequest.md): Requests cancellation of shipment. Cancellation request, if valid, is
accepted via API - it means we try to process this request within the
carrier. The final state of this request can be checked in the [Shipment
detail](#tag/delivery/getshipmentdetail) endpoint.

## Shipment shipping options by order code

 - [GET /api/shipments/order/{code}/shipping-options](https://api.docs.shoptet.com/shoptet-api/openapi/delivery/getshipmentshippingoptionsbyordercode.md): Returns available shipping options for the given order.

## List of shipment carriers

 - [GET /api/shipments/carriers](https://api.docs.shoptet.com/shoptet-api/openapi/delivery/getlistofshipmentcarriers.md): List of all active shipment carriers.

The list can be filtered according to carrier type (branch).

## Detail of shipment carrier

 - [GET /api/shipments/carriers/{code}/{type}](https://api.docs.shoptet.com/shoptet-api/openapi/delivery/getshipmentcarrierdetail.md): Returns detail of a single shipment carrier identified by its numeric ID and type.

## Close carrier shipments

 - [POST /api/shipments/carriers/{code}/close](https://api.docs.shoptet.com/shoptet-api/openapi/delivery/closecarriershipments.md): Closes (moves to transportation stage) of all created shipments for
given carrier ID.

## Creation of shipment by order code (deprecated)

 - [POST /api/shipments/order/{code}](https://api.docs.shoptet.com/shoptet-api/openapi/delivery/createshipmentbyordercode.md): [DEPRECATED] Use POST /api/shipments instead. Creates a new shipment for the order identified by its code.

