{
 "description": "Some optional fields in the request are not processed, but are included as part of upstream compatibility. Make a request using pickup.isTest=true to check your request format, and ignoreUnprocessed=true to make the upstream request with unprocesed fields.",
 "type": "object",
 "properties": {
  "accessorials": {
   "type": "object",
   "properties": {
    "appointmentDetails": {
     "type": "object",
     "properties": {
      "pickup": {
       "type": "object",
       "properties": {
        "end": {
         "type": "string",
         "pattern": "\\d{4}-\\d{2}-\\d{2}(?:T\\d{2}:\\d{2}:\\d{2}(?:[.]\\d{3})?)?"
        },
        "start": {
         "type": "string",
         "pattern": "\\d{4}-\\d{2}-\\d{2}(?:T\\d{2}:\\d{2}:\\d{2}(?:[.]\\d{3})?)?"
        }
       },
       "required": [
        "end",
        "start"
       ]
      }
     },
     "required": [
      "pickup"
     ]
    },
    "codes": {
     "type": "array",
     "items": {
      "enum": [
       "GTD_AM",
       "GTD_NOON",
       "GTD_PM",
       "PG I",
       "PG II",
       "PG III",
       "HAZ",
       "IPU",
       "LFTP",
       "LFTD",
       "PSC",
       "LTDAP",
       "REP"
      ]
     }
    }
   }
  },
  "pickup": {
   "type": "object",
   "properties": {
    "function": {
     "enum": [
      "Create"
     ]
    },
    "isTest": {
     "type": "boolean"
    },
    "requestedPickupDate": {
     "type": "string",
     "pattern": "\\d{4}-\\d{2}-\\d{2}"
    },
    "requestorRole": {
     "enum": [
      "Shipper",
      "Consignee",
      "Third Party"
     ]
    },
    "specialInstructions": {
     "type": "string"
    }
   },
   "required": [
    "function",
    "requestedPickupDate",
    "requestorRole"
   ]
  },
  "commodities": {
   "type": "object",
   "properties": {
    "handlingUnits": {
     "type": "array",
     "items": {
      "type": "object",
      "properties": {
       "count": {
        "type": "integer"
       },
       "dimensionsUnit": {
        "enum": [
         "Inches",
         "Centimeters"
        ]
       },
       "height": {
        "type": "integer"
       },
       "length": {
        "type": "integer"
       },
       "stackable": {
        "type": "boolean"
       },
       "type": {
        "enum:": [
         "PLT",
         "PCS",
         "BAG",
         "BOX",
         "BDL",
         "CTN",
         "CRT",
         "DRUM",
         "DRM",
         "PAIL",
         "PLS",
         "ROLL",
         "ROL",
         "TOTE",
         "TOT"
        ]
       },
       "weight": {
        "type": "integer"
       },
       "weightUnit": {
        "enum": [
         "Pounds",
         "Kilograms"
        ]
       },
       "width": {
        "type": "integer"
       }
      },
      "required": [
       "count",
       "type",
       "weight"
      ]
     }
    }
   }
  },
  "destination": {
   "type": "object",
   "properties": {
    "account": {
     "type": "string"
    },
    "address1": {
     "type": "string"
    },
    "city": {
     "type": "string"
    },
    "contact": {
     "type": "object",
     "properties": {
      "name": {
       "type": "string"
      },
      "phone": {
       "type": "string"
      },
      "phoneExt": {
       "type": "string"
      }
     },
     "required": [
      "phone",
      "name"
     ]
    },
    "country": {
     "enum": [
      "USA"
     ]
    },
    "name": {
     "type": "string"
    },
    "postalCode": {
     "type": "string",
     "pattern": "\\d{5}(?:[-]\\d{4})?"
    },
    "stateProvince": {
     "enum": [
      "AL",
      "AK",
      "AZ",
      "AR",
      "CA",
      "CO",
      "CT",
      "DC",
      "DE",
      "FL",
      "GA",
      "HI",
      "ID",
      "IL",
      "IN",
      "IA",
      "KS",
      "KY",
      "LA",
      "ME",
      "MD",
      "MA",
      "MI",
      "MN",
      "MS",
      "MO",
      "MT",
      "NE",
      "NV",
      "NH",
      "NJ",
      "NM",
      "NY",
      "NC",
      "ND",
      "OH",
      "OK",
      "OR",
      "PA",
      "PR",
      "RI",
      "SC",
      "SD",
      "TN",
      "TX",
      "UT",
      "VT",
      "VA",
      "WA",
      "WV",
      "WI",
      "WY"
     ]
    }
   },
   "required": [
    "address1",
    "city",
    "name",
    "postalCode",
    "stateProvince"
   ]
  },
  "origin": {
   "type": "object",
   "properties": {
    "account": {
     "type": "string"
    },
    "address1": {
     "type": "string"
    },
    "city": {
     "type": "string"
    },
    "contact": {
     "type": "object",
     "properties": {
      "name": {
       "type": "string"
      },
      "phone": {
       "type": "string"
      },
      "phoneExt": {
       "type": "string"
      }
     },
     "required": [
      "phone",
      "name"
     ]
    },
    "country": {
     "enum": [
      "USA"
     ]
    },
    "name": {
     "type": "string"
    },
    "postalCode": {
     "type": "string",
     "pattern": "\\d{5}(?:[-]\\d{4})?"
    },
    "stateProvince": {
     "enum": [
      "AL",
      "AK",
      "AZ",
      "AR",
      "CA",
      "CO",
      "CT",
      "DC",
      "DE",
      "FL",
      "GA",
      "HI",
      "ID",
      "IL",
      "IN",
      "IA",
      "KS",
      "KY",
      "LA",
      "ME",
      "MD",
      "MA",
      "MI",
      "MN",
      "MS",
      "MO",
      "MT",
      "NE",
      "NV",
      "NH",
      "NJ",
      "NM",
      "NY",
      "NC",
      "ND",
      "OH",
      "OK",
      "OR",
      "PA",
      "PR",
      "RI",
      "SC",
      "SD",
      "TN",
      "TX",
      "UT",
      "VT",
      "VA",
      "WA",
      "WV",
      "WI",
      "WY"
     ]
    }
   },
   "required": [
    "address1",
    "city",
    "name",
    "postalCode",
    "stateProvince"
   ]
  },
  "referenceNumbers": {
   "type": "object",
   "properties": {
    "bol": {
     "type": "string"
    }
   },
   "required": []
  }
 },
 "required": [
  "pickup",
  "commodities",
  "destination",
  "origin"
 ]
}