---
title: "Add shipment to order."
method: POST
path: "/rest/api/orders/{id}/shipment/"
tags: ["Order"]
---

# Add shipment to order.

`POST /rest/api/orders/{id}/shipment/`

Shipment is created as order document, it can be see from <a href='#tag/Order/operation/get_rest_order_documents_detail'>here</a>

## Path parameters

- `id` string, required

## Request body

- RestOrderShipmentDTO2 — This object represents a shipment belongs to an order with the specified ID
  - `idExternal` string, nullable — External unique ID of the shipment
  - `tracking` string, required — Shipment tracking number
  - `carrierProviderId` integer, required — ID of <a href='#tag/Order/operation/get_rest_orders_carrier_map'>Carrier ID</a>. If you specify a value equal to 'manual carrier', there might be problems in passing the tracking number to the external integration.
  - `postDate` string, date-time, nullable — Date of shipment
  - `media` string — Null or media UUID - <a href='#tag/Media/operation/post_rest_media_new'>media attachment endpoint</a>

## Response `200`

Shipment already exsists

- RestOrderShipmentDTO3 — This object represents a shipment belongs to an order with the specified ID
  - `id` integer — Internal ID of the shipment
  - `idExternal` string, nullable — External unique ID of the shipment
  - `tracking` string, required — Shipment tracking number
  - `carrierProviderId` integer, required — ID of <a href='#tag/Order/operation/get_rest_orders_carrier_map'>Carrier ID</a>. If you specify a value equal to 'manual carrier', there might be problems in passing the tracking number to the external integration.
  - `postDate` string, date-time, nullable — Date of shipment
  - `media` string — Null or media UUID - <a href='#tag/Media/operation/post_rest_media_new'>media attachment endpoint</a>
  - `status` string — Shipment tracking status if is present or NULL

## Other responses

- `201` — Add shipment correctly
- `400` — Courier account is not configuret yet
- `401` — Authorization failed
- `422` — Validation error

---

[API](https://skmtc.dev/apilo/apis/apilo-rest-api.md) · [All operations](https://skmtc.dev/apilo/apis/apilo-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/apilo/apilo-rest-api/revisions/a0f9dcdba6cc/schema)
