{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/shipcloud/json-schema/shipcloud-manifest-schema.json",
  "title": "manifest",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/shipcloud-manifests-api-openapi.yml#/components/schemas/manifest",
  "type": "object",
  "properties": {
    "carrier": {
      "type": "string",
      "description": "Carrier for whom the maifest should be created"
    },
    "posting_hub_address": {
      "allOf": [
        {
          "$ref": "#/$defs/address"
        },
        {
          "description": "Address of the hub where the shipments will be overturned to the carrier"
        }
      ]
    },
    "shipments": {
      "type": "array",
      "description": "array of shipment IDs that are send using this manifest",
      "items": {}
    },
    "reference_number": {
      "type": "string",
      "description": "For referencing the manifest at the carrier"
    }
  },
  "required": [
    "carrier",
    "posting_hub_address",
    "shipments"
  ],
  "$defs": {
    "address": {
      "type": "object",
      "properties": {
        "care_of": {
          "type": [
            "string",
            "null"
          ],
          "description": "Additional care of field"
        },
        "city": {
          "type": "string",
          "description": "Name of the city"
        },
        "country": {
          "type": "string",
          "description": "Country as uppercase ISO 3166-1 alpha-2 code"
        },
        "first_name": {
          "type": [
            "string",
            "null"
          ],
          "description": "A persons first name"
        },
        "state": {
          "type": [
            "string",
            "null"
          ],
          "description": "The state the address is in"
        },
        "street": {
          "type": "string",
          "description": "Name of the street. Can hold the house number"
        },
        "street_no": {
          "type": [
            "string",
            "null"
          ],
          "description": "House number of the address (when a carrier requires it separately)"
        },
        "zip_code": {
          "type": "string",
          "description": "Zipcode of the address"
        },
        "phone": {
          "type": "string",
          "description": "Telephone number (mandatory when using UPS and the following terms apply: service is `one_day` or `one_day_early` or ship to country is different than ship from country)"
        },
        "email": {
          "type": "string",
          "description": "Email address for this person. Some carrier are using the email address to send notifications"
        }
      },
      "required": [
        "street",
        "city",
        "zip_code",
        "country"
      ]
    }
  }
}