{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "additionalProperties": false,
    "properties": {
        "carrier": {
            "description": "carrier used for this pickup request",
            "type": "string"
        },
        "carrier_pickup_number": {
            "description": "carrier identifier for this pickup request",
            "type": "string"
        },
        "id": {
            "description": "shipcloud identifier for this pickup request",
            "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_time": {
            "additionalProperties": false,
            "description": "defined time window when the carrier should pickup shipments",
            "properties": {
                "earliest": {
                    "_format": "date-time",
                    "type": "string"
                },
                "latest": {
                    "_format": "date-time",
                    "type": "string"
                }
            },
            "required": [
                "earliest",
                "latest"
            ],
            "type": "object"
        },
        "shipments": {
            "additionalProperties": false,
            "items": {
                "properties": {
                    "id": {
                        "description": "id of the shipment included in this pickup request",
                        "type": "string"
                    }
                },
                "type": "object"
            },
            "required": [
                "id"
            ],
            "type": "array"
        }
    },
    "required": [
        "id",
        "carrier",
        "pickup_time"
    ],
    "type": "object"
}