{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/bol-com/json-schema/bol-com-shipment-request-schema.json",
  "title": "ShipmentRequest",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/bol-com-shipments-api-openapi.yml#/components/schemas/ShipmentRequest",
  "required": [
    "orderItems"
  ],
  "type": "object",
  "properties": {
    "orderItems": {
      "maxItems": 100,
      "minItems": 1,
      "type": "array",
      "description": "List of order items to ship.",
      "items": {
        "$ref": "#/$defs/OrderItem"
      }
    },
    "shipmentReference": {
      "maxLength": 90,
      "minLength": 0,
      "type": [
        "string",
        "null"
      ],
      "description": "A user-defined reference that you can provide to add to the shipment. Can be used for own administration purposes. Only 'null' or non-empty strings accepted."
    },
    "shippingLabelId": {
      "type": [
        "string",
        "null"
      ],
      "description": "The identifier of the purchased shipping label."
    },
    "transport": {
      "allOf": [
        {
          "$ref": "#/$defs/TransportInstruction"
        }
      ]
    }
  },
  "$defs": {
    "OrderItem": {
      "required": [
        "orderItemId"
      ],
      "type": "object",
      "properties": {
        "orderItemId": {
          "minLength": 1,
          "type": "string",
          "description": "The order item being confirmed."
        },
        "quantity": {
          "type": [
            "integer",
            "null"
          ],
          "description": "The quantity of the order items to ship. If omitted, will be interpreted as the full quantity that is still open for this order item.",
          "format": "int32",
          "exclusiveMinimum": 0
        }
      },
      "description": "List of order items to ship."
    },
    "TransportInstruction": {
      "required": [
        "transporterCode"
      ],
      "type": "object",
      "properties": {
        "transporterCode": {
          "type": "string",
          "description": "Specify the transporter that will carry out the shipment."
        },
        "trackAndTrace": {
          "type": [
            "string",
            "null"
          ],
          "description": "The track and trace code that is associated with this transport."
        }
      }
    }
  }
}