> ## Documentation Index
> Fetch the complete documentation index at: https://developer.jtl-software.com/llms.txt
> Use this file to discover all available pages before exploring further.

# ShipOrder

> Ships an order after batch picking — packs it into packages and persists it to the database. A package is marked shipped only when its DeliveryDate is supplied (and, for shipping methods that require a tracking id, only when its TrackingId is supplied); jtl-Shipping packages complete themselves. Each package carries its positions, shipping method, weight, dimensions, optional packaging materials, SSCC, tracking id and delivery date. Returns the created delivery note and packages. A per-package PackageId (for shipping-label retrieval) is only assigned when the shipping-preparation feature and licence are active.

If a request with this mutation's Idempotency-Key was already completed, the response's `extensions` contains an `idempotency.{responseName}` entry with `wasReplayed: true`.



**mutation** `ShipOrder(request: ShipOrderCommandRequestInput!): ShipOrderResponse!`

## Arguments

**`request`**: `ShipOrderCommandRequestInput!` (required)

## Returns

`ShipOrderResponse!`

**`deliveryNotes`**: `[ShippedDeliveryNote!]!`

The delivery notes created by this call (currently exactly one).

## Examples

```graphql Mutation
mutation ShipOrder($request: ShipOrderCommandRequestInput!) {
  ShipOrder(request: $request) {
    deliveryNotes {
      id
      number
      packages {
        id
        packageId
        trackingId
        isShipped
      }
    }
  }
}
```

```json Variables
{
  "request": {
    "orderId": "id",
    "picklistId": "id",
    "warehouseId": "id",
    "userId": "id",
    "packages": [
      {
        "positions": [
          {
            "quantity": "value"
          }
        ],
        "shippingMethodId": "id",
        "weight": "value"
      }
    ]
  }
}
```

```json Response
{
  "data": {
    "ShipOrder": {
      "deliveryNotes": [
        {
          "id": "id",
          "number": "string",
          "packages": [
            {
              "id": "id",
              "packageId": "string",
              "trackingId": "string",
              "isShipped": true
            }
          ]
        }
      ]
    }
  }
}
```
