{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "additionalProperties": false,
    "properties": {
        "carrier": {
            "description": "acronym of the carrier you want to use",
            "enum": [
                "ups",
                "dpd",
                "hermes",
                "gls"
            ],
            "type": "string"
        },
        "pickup_address": {
            "additionalProperties": false,
            "description": "address where the carrier should pick up shipments",
            "properties": {
                "care_of": {
                    "type": "string"
                },
                "city": {
                    "type": "string"
                },
                "company": {
                    "type": "string"
                },
                "country": {
                    "description": "Country as uppercase ISO 3166-1 alpha-2 code",
                    "type": "string"
                },
                "first_name": {
                    "type": "string"
                },
                "id": {
                    "description": "identifier of a previously created address",
                    "type": "string"
                },
                "last_name": {
                    "type": "string"
                },
                "phone": {
                    "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)",
                    "type": "string"
                },
                "state": {
                    "type": "string"
                },
                "street": {
                    "type": "string"
                },
                "street_no": {
                    "type": "string"
                },
                "zip_code": {
                    "type": "string"
                }
            },
            "required": [
                "last_name",
                "street",
                "street_no",
                "city",
                "zip_code",
                "country"
            ],
            "type": "object"
        },
        "pickup_date": {
            "description": "deprecated: please use pickup_time instead.",
            "pattern": "^[0-9]{4}/[0-9]{2}/[0-9]{2}$",
            "type": "string"
        },
        "pickup_time": {
            "additionalProperties": false,
            "description": "defines a time window in which the carrier should pickup shipments",
            "properties": {
                "earliest": {
                    "_format": "date-time",
                    "type": "string"
                },
                "latest": {
                    "_format": "date-time",
                    "type": "string"
                }
            },
            "required": [
                "earliest",
                "latest"
            ],
            "type": "object"
        }
    },
    "required": [
        "carrier",
        "pickup_time"
    ],
    "type": "object"
}