---
title: "Create shipment"
method: POST
path: "/orders/{orderId}/shipments"
tags: ["Shipments API"]
deprecated: true
---

# Create shipment

`POST /orders/{orderId}/shipments`

> **Deprecated.**

Create a shipment for specific order lines of an order.

When using Klarna, using this endpoint is mandatory for the order amount to be captured. A [capture](get-capture) will automatically be created for the shipment.

The word 'shipment' is used in the figurative sense here. It can also mean that a service was provided or digital content was delivered.

> 🔑 Access with
>
> [API key](/reference/authentication)
>
> [Advanced access token with **shipments.write**](/reference/authentication)
>
> [OAuth access with **shipments.write**](/reference/authentication)

## Request body

- object
  - `resource` string — Indicates the response contains a shipment object. Will always contain the string `shipment` for this endpoint.
  - `id` string — The identifier uniquely referring to this shipment. Example: `shp_gNapNy9qQTUFZYnCrCF7J`.
  - `mode` string — Whether this entity was created in live mode or in test mode. Possible values: `live` `test`
  - `orderId` string — The unique identifier of the order this shipment was created for. For example: `ord_8wmqcHMN4U`.
  - `createdAt` string — The entity's date and time of creation, in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
  - `tracking` object — Shipment tracking details. Can be omitted if tracking details are not available or not applicable.
    - `carrier` string — The name of the postal carrier.
    - `code` string — The track-and-trace code for the shipment.
    - `url` string — The URL where your customer can track the shipment.
  - `routing` object[]
    - `id` string — The identifier uniquely referring to this route. Mollie will always refer to the route by this ID. Example: `rt_5B8cwPMGnU6qLbRvo7qEZo`.
    - `amount` object — The portion of the total payment amount being routed.
      - `currency` string, required — A three-character ISO 4217 currency code.
      - `value` string, required — A string containing an exact monetary amount in the given currency.
    - `destination` object — The destination of this portion of the payment.
      - `type` string — The type of destination. Currently only the destination type `organization` is supported. Possible values: `organization`
      - `organizationId` string — Required for destination type `organization`. The ID of the connected organization the funds should be routed to.
  - `lines` object[] — The order lines that are being fulfilled with this shipment. If left blank, all open order lines will be considered fulfilled.
    - `resource` string, required
    - `id` string, required — The ID of the order line you wish to refund. For example: `odl_jp31y97yjz`.
    - `orderId` string, required
    - `name` string, required
    - `sku` string, nullable, required
    - `type` 'physical' | 'digital' | 'discount' | 'shipping_fee' | 'store_credit' | 'gift_card' | 'surcharge', required
    - `status` 'created' | 'authorized' | 'paid' | 'canceled' | 'shipping' | 'completed', required
    - `metadata` union, required — Provide any data you like, for example a string or a JSON object. We will save the data alongside the entity. Whenever you fetch the entity with our API, we will also include the metadata. You can use up to approximately 1kB.
      - string
      - number
      - object
      - string[]
    - `isCancelable` boolean, required
    - `quantity` integer, required — The number of items that should be refunded for this order line. When this parameter is omitted, the whole order line will be refunded. Must be less than the number of items already refunded for this order line.
    - `quantityShipped` integer
    - `amountShipped` object — In v2 endpoints, monetary amounts are represented as objects with a `currency` and `value` field.
      - `currency` string, required — A three-character ISO 4217 currency code.
      - `value` string, required — A string containing an exact monetary amount in the given currency.
    - `quantityRefunded` integer
    - `amountRefunded` object — In v2 endpoints, monetary amounts are represented as objects with a `currency` and `value` field.
      - `currency` string, required — A three-character ISO 4217 currency code.
      - `value` string, required — A string containing an exact monetary amount in the given currency.
    - `quantityCanceled` integer
    - `amountCanceled` object — In v2 endpoints, monetary amounts are represented as objects with a `currency` and `value` field.
      - `currency` string, required — A three-character ISO 4217 currency code.
      - `value` string, required — A string containing an exact monetary amount in the given currency.
    - `amount` object — The amount that you want to refund. In almost all cases, Mollie can determine the amount automatically. The amount is required only if you are partially refunding an order line which has a non-zero `discountAmount`. The amount you can refund depends on various properties of the order line and the create order refund request. The maximum that can be refunded is `unit price x quantity to ship`. The minimum amount depends on the discount applied to the line, the quantity already refunded or shipped, the amounts already refunded or shipped and the quantity you want to refund. If you do not send an amount, Mollie will determine the amount automatically or respond with an error if the amount cannot be determined automatically. The error will contain the `extra.minimumAmount` and `extra.maximumAmount` properties that allow you pick the right amount.
      - `currency` string, required — A three-character ISO 4217 currency code.
      - `value` string, required — A string containing an exact monetary amount in the given currency.
    - `shippableQuantity` integer
    - `refundableQuantity` integer
    - `cancelableQuantity` integer
    - `unitPrice` object, required — In v2 endpoints, monetary amounts are represented as objects with a `currency` and `value` field.
      - `currency` string, required — A three-character ISO 4217 currency code.
      - `value` string, required — A string containing an exact monetary amount in the given currency.
    - `totalAmount` object, required — In v2 endpoints, monetary amounts are represented as objects with a `currency` and `value` field.
      - `currency` string, required — A three-character ISO 4217 currency code.
      - `value` string, required — A string containing an exact monetary amount in the given currency.
    - `vatRate` string, required
    - `vatAmount` object, required — In v2 endpoints, monetary amounts are represented as objects with a `currency` and `value` field.
      - `currency` string, required — A three-character ISO 4217 currency code.
      - `value` string, required — A string containing an exact monetary amount in the given currency.
    - `createdAt` string, required
    - `discountedAmount` object — In v2 endpoints, monetary amounts are represented as objects with a `currency` and `value` field.
      - `currency` string, required — A three-character ISO 4217 currency code.
      - `value` string, required — A string containing an exact monetary amount in the given currency.
    - `_links` object, required — An object with several relevant URLs. Every URL object will contain an `href` and a `type` field.
      - `productUr` object — In v2 endpoints, URLs are commonly represented as objects with an `href` and `type` field.
        - `href` string, required — The actual URL string.
        - `type` string, required — The content type of the page or endpoint the URL points to.
      - `imageUrl` object — In v2 endpoints, URLs are commonly represented as objects with an `href` and `type` field.
        - `href` string, required — The actual URL string.
        - `type` string, required — The content type of the page or endpoint the URL points to.
  - `_links` object — An object with several relevant URLs. Every URL object will contain an `href` and a `type` field.
    - `self` object — In v2 endpoints, URLs are commonly represented as objects with an `href` and `type` field.
      - `href` string, required — The actual URL string.
      - `type` string, required — The content type of the page or endpoint the URL points to.
    - `order` object — The API resource URL of the [order](get-order) that this shipment belongs to.
      - `href` string, required — The actual URL string.
      - `type` string, required — The content type of the page or endpoint the URL points to.
    - `documentation` object — In v2 endpoints, URLs are commonly represented as objects with an `href` and `type` field.
      - `href` string, required — The actual URL string.
      - `type` string, required — The content type of the page or endpoint the URL points to.

## Response `201`

The newly created shipment object.

## Other responses

- `404` — No entity with this ID exists.
- `422` — The request contains issues. For example, if an order line ID is missing.
- `429` — Rate Limit has been reached.

---

[API](https://skmtc.net/mollie/apis/accepting-payments.md) · [All operations](https://skmtc.net/mollie/apis/accepting-payments/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/mollie/accepting-payments/revisions/4b45df3039ef/schema)
