v1

latestOpenAPI 3.1.0CC-BY-NC-SA-4.02026-07-2413803.8 MB
Shipments API

Create shipment

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 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

Advanced access token with shipments.write

OAuth access with shipments.write

post/orders/{orderId}/shipments

Request body

resourcestring

Indicates the response contains a shipment object. Will always contain the string shipment for this endpoint.

idstring

The identifier uniquely referring to this shipment. Example: shp_gNapNy9qQTUFZYnCrCF7J.

modestring

Whether this entity was created in live mode or in test mode.

Possible values: live test

orderIdstring

The unique identifier of the order this shipment was created for. For example: ord_8wmqcHMN4U.

createdAtstring

The entity's date and time of creation, in ISO 8601 format.

Example request

{
  "id": "shp_5x4xQJDWGNcY3tKGL7X5J",
  "mode": "live",
  "orderId": "ord_5B8cwPMGnU",
  "createdAt": "2024-03-20T09:13:37+00:00",
  "tracking": {
    "carrier": "PostNL",
    "code": "3SKABA000000000",
    "url": "http://postnl.nl/tracktrace/?B=3SKABA000000000&P=1015CW&D=NL&T=C"
  },
  "routing": [
    {
      "id": "rt_5B8cwPMGnU",
      "amount": {
        "currency": "EUR",
        "value": "10.00"
      },
      "destination": {
        "type": "organization",
        "organizationId": "org_1234567"
      }
    }
  ],
  "lines": [
    {
      "resource": "orderline",
      "id": "odl_5B8cwPMGnU",
      "orderId": "ord_5B8cwPMGnU",
      "name": "Chess Board",
      "type": "physical",
      "status": "created",
      "quantity": 1,
      "amountShipped": {
        "currency": "EUR",
        "value": "10.00"
      },
      "amountRefunded": {
        "currency": "EUR",
        "value": "10.00"
      },
      "amountCanceled": {
        "currency": "EUR",
        "value": "10.00"
      },
      "amount": {
        "currency": "EUR",
        "value": "10.00"
      },
      "unitPrice": {
        "currency": "EUR",
        "value": "10.00"
      },
      "totalAmount": {
        "currency": "EUR",
        "value": "10.00"
      },
      "vatRate": "21.00",
      "vatAmount": {
        "currency": "EUR",
        "value": "10.00"
      },
      "createdAt": "2025-03-28T16:42:12+00:00",
      "discountedAmount": {
        "currency": "EUR",
        "value": "10.00"
      },
      "_links": {
        "productUr": {
          "href": "https://...",
          "type": "application/hal+json"
        },
        "imageUrl": {
          "href": "https://...",
          "type": "application/hal+json"
        }
      }
    }
  ],
  "_links": {
    "self": {
      "href": "https://...",
      "type": "application/hal+json"
    },
    "order": {
      "href": "https://...",
      "type": "application/hal+json"
    },
    "documentation": {
      "href": "https://...",
      "type": "application/hal+json"
    }
  }
}

Response

The newly created shipment object.