{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/dpd-group/main/json-schema/dpd-group-pickupscheduling-pickup-schedule-schema.json",
  "title": "pickupscheduling.PickupSchedule",
  "x-generated": "2026-10-13",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/dpd-group-shipping-api-openapi.yml#/components/schemas/pickupscheduling.PickupSchedule",
  "type": "object",
  "properties": {
    "customerInfos": {
      "$ref": "#/$defs/pickupscheduling.CustomerInfos"
    },
    "shipmentNumbers": {
      "type": "array",
      "description": "List of Shipment numbers for the Pickup",
      "items": {
        "type": "string"
      }
    },
    "parcelNumbers": {
      "type": "array",
      "description": "List of Parcel Numbers for the PickUp",
      "items": {
        "type": "string"
      }
    },
    "pickup": {
      "$ref": "#/$defs/pickupscheduling.Pickup"
    },
    "numberOfParcels": {
      "type": "integer",
      "format": "int32",
      "description": "Quantity (Number) of Parcels"
    },
    "addressId": {
      "type": "string",
      "description": "AddressId"
    },
    "pickupAddress": {
      "$ref": "#/$defs/pickupscheduling.Address"
    },
    "pickupContact": {
      "$ref": "#/$defs/pickupscheduling.ContactDetails"
    },
    "pickupWeight": {
      "type": "string",
      "description": "Weight in grams units without decimal delimiter (e.g. 3000 equals 3kg) of all the parcels that will picked up"
    },
    "parcelMaxWeight": {
      "type": "string",
      "description": "Weight in grams units without decimal delimiter (e.g. 3000 equals 3kg) of the heaviest parcel"
    },
    "parcelMaxDimensions": {
      "$ref": "#/$defs/pickupscheduling.Dimensions"
    },
    "comment": {
      "type": "string"
    },
    "references": {
      "type": "array",
      "description": "Reference of the pickup request, defined by the customer",
      "items": {
        "type": "string"
      }
    },
    "sendingDepot": {
      "type": "string",
      "description": "GeoRouting depot code 7 digits - BU code 3 digits + 4 | specificy for BRT - fill with the ID given by your representative"
    },
    "messages": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/pickupscheduling.Message"
      }
    }
  },
  "$defs": {
    "pickupscheduling.Address": {
      "type": "object",
      "properties": {
        "companyName": {
          "type": "string",
          "description": "Company Name"
        },
        "name1": {
          "type": "string"
        },
        "name2": {
          "type": "string"
        },
        "street": {
          "type": "string",
          "description": "Street"
        },
        "houseNumber": {
          "type": "string",
          "description": "House number (could be included into in the address field and not set)."
        },
        "addressLine1": {
          "type": "string"
        },
        "addressLine2": {
          "type": "string"
        },
        "addressLine3": {
          "type": "string"
        },
        "interphoneName": {
          "type": "string",
          "description": "Name on the interphone"
        },
        "floor": {
          "type": "string",
          "description": "Information on the floor (e.g. if located in a huge office building)"
        },
        "doorCode": {
          "type": "string",
          "description": "A code to open the door . It is possible to input 3 different codes separated by a /"
        },
        "building": {
          "type": "string",
          "description": "Information of the building (e.g. when located on a big campus)."
        },
        "department": {
          "type": "string",
          "description": "Information on the department (e.g. when located in a huge office-building with different departments on the same floor)."
        },
        "country": {
          "type": "string",
          "description": "country (ISO 3166). All three ISO standards will be accepted: * ISO 3166-1: 2 Alpha Numerical Characters * ISO 3166-1: 3 Alpha Numerical Characters * ISO 3166-1: 3 Numerical Characters "
        },
        "state": {
          "type": "string",
          "description": "State within the country, e.g. CA for California."
        },
        "zipCode": {
          "type": "string",
          "description": "Destination zipcode of the parcel"
        },
        "city": {
          "type": "string",
          "description": "city"
        }
      },
      "required": [
        "city",
        "country",
        "street",
        "zipCode"
      ]
    },
    "pickupscheduling.ContactDetails": {
      "type": "object",
      "properties": {
        "contactPerson": {
          "type": "string",
          "description": "Name of the person to contact"
        },
        "phone1": {
          "type": "string",
          "description": "Telephone/Fax number formatted. Has to be encoded in one of the following ways: * XXXXXXXX * +intcodeXXXXXXXX * 00intcodeXXXXXXXX where:  * XXXXXXXX is numeric and means the phone/fax number * intcode is the numeric country code with a length from 1 to 4. Without international code, the phone number has to be understood as a domestic one.' "
        },
        "phone2": {
          "type": "string",
          "description": "Telephone/Fax number formatted. Has to be encoded in one of the following ways: * XXXXXXXX * +intcodeXXXXXXXX * 00intcodeXXXXXXXX where:  * XXXXXXXX is numeric and means the phone/fax number * intcode is the numeric country code with a length from 1 to 4. Without international code, the phone number has to be understood as a domestic one.' "
        },
        "fax": {
          "type": "string",
          "description": "Telephone/Fax number formatted. Has to be encoded in one of the following ways: * XXXXXXXX * +intcodeXXXXXXXX * 00intcodeXXXXXXXX where:  * XXXXXXXX is numeric and means the phone/fax number * intcode is the numeric country code with a length from 1 to 4. Without international code, the phone number has to be understood as a domestic one.' "
        },
        "email": {
          "type": "string",
          "description": "Email address"
        }
      }
    },
    "pickupscheduling.CustomerInfos": {
      "type": "object",
      "properties": {
        "customerAccountNumber": {
          "type": "string",
          "description": "BU’s Internal Customer’s Account Number"
        },
        "customerSubAccountNumber": {
          "type": "string",
          "description": "Customer number SUBID"
        },
        "customerID": {
          "type": "string",
          "description": "BU’s internal Unique Customer ID/Identifier"
        }
      }
    },
    "pickupscheduling.Dimensions": {
      "type": "object",
      "properties": {
        "length": {
          "type": "integer",
          "format": "int32",
          "description": "Dimmension in cm units"
        },
        "width": {
          "type": "integer",
          "format": "int32",
          "description": "Dimmension in cm units"
        },
        "height": {
          "type": "integer",
          "format": "int32",
          "description": "Dimmension in cm units"
        }
      }
    },
    "pickupscheduling.Message": {
      "type": "object",
      "properties": {
        "messageType": {
          "type": "string",
          "description": "Notification type * `EMAIL` * `PHONE` * `SMS` * `APP` ",
          "enum": [
            "EMAIL",
            "PHONE",
            "SMS",
            "APP"
          ]
        },
        "messageDestination": {
          "type": "string",
          "description": "Destination for the notification, e.g. telephone number, email address, etc. … The required data format for the pro active message types SMS, phone and FAX is as follows: \"+international country numberphone number\" Has to be encoded in one of the following ways: * XXXXXXXX * +intcodeXXXXXXXX * 00intcodeXXXXXXXX' "
        },
        "messageLanguage": {
          "type": "string",
          "description": "Language of the proactive notification 2 (ISO 639-1 alpha 2 code, e.g. DE). MSG are maintain per BU. The list of available language is maintain by the BU which send the message.. Default language will be the one in the BU which send the message. "
        },
        "senderCompany": {
          "type": "string"
        }
      }
    },
    "pickupscheduling.Pickup": {
      "type": "object",
      "properties": {
        "date": {
          "type": "string",
          "format": "date"
        },
        "fromTime": {
          "type": "string"
        },
        "toTime": {
          "type": "string"
        }
      },
      "required": [
        "date"
      ]
    }
  }
}