{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/usps/json-schema/usps-slot-availability-schema.json",
  "title": "Slot Availability",
  "description": "Request object for checking on slot availability",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/usps-appointments-openapi.yml#/components/schemas/SlotAvailability",
  "type": "object",
  "required": [
    "mailClass",
    "dropshipKey",
    "destinationEntry",
    "detailInfo",
    "consigneeFacility"
  ],
  "properties": {
    "oneTimeAppt": {
      "type": "boolean",
      "description": "Determine query path for the search.\n\nEither oneTimeAppt or recurringAppt must be set to true.\n"
    },
    "recurringAppt": {
      "type": "boolean",
      "description": "Determine query path for the search.\n\nEither oneTimeAppt or recurringAppt must be set to true.\n"
    },
    "mailClass": {
      "description": "1 FIRST CLASS MAIL, 2 PERIODICALS, 3 USPS MARKETING MAIL (PREVIOUSLY STANDARD MAIL), 4 PACKAGE SERVICES, 6 PARCEL SELECT, 7 PRIORITY MAIL",
      "type": "string",
      "enum": [
        "FIRST_CLASS",
        "PERIODICALS",
        "USPS_MARKETING_MAIL",
        "PACKAGE_SERVICES",
        "PARCEL_SELECT",
        "PRIORITY_MAIL"
      ]
    },
    "dropshipKey": {
      "pattern": "^[A-Za-z0-9]{7}$",
      "type": "string",
      "description": "The dropship key for the appointment.",
      "minLength": 7,
      "maxLength": 7
    },
    "appointmentType": {
      "type": "string",
      "description": "The type of appointment. PALLET = 1, BEDLOAD = 2, DROP_AND_PICK = 3, SPEEDLINE = 4",
      "enum": [
        "PALLET",
        "BEDLOAD",
        "DROP_AND_PICK",
        "SPEEDLINE"
      ]
    },
    "appointmentStartDate": {
      "type": "string",
      "description": "The start date of the date range of the query. Cannot be in the past.\n\nRequired for recurring appointments.\n",
      "format": "date-time"
    },
    "appointmentEndDate": {
      "type": "string",
      "description": "The end date of the date range of the query.  Maximum of 21 days in the future.\n\nRequired for recurring appointments.\n",
      "format": "date-time"
    },
    "destinationEntry": {
      "description": "Dropship is YES. Origin Entry is NO.",
      "type": "string",
      "enum": [
        "YES",
        "NO"
      ]
    },
    "applyTiers": {
      "description": "The applyTiers used for the search. YES or NO",
      "type": "string",
      "enum": [
        "YES",
        "NO"
      ]
    },
    "perishableInd": {
      "type": "boolean",
      "description": "Is it perishable"
    },
    "userCRID": {
      "pattern": "^[0-9]{2,18}$",
      "type": "string",
      "description": "CRID of the user",
      "minLength": 2,
      "maxLength": 18
    },
    "schedulerID": {
      "pattern": "^[A-Za-z0-9]{1,12}$",
      "description": "Unique ID for mailer scheduler",
      "type": "string",
      "minLength": 1,
      "maxLength": 12
    },
    "schedulerCorpID": {
      "pattern": "^[A-Za-z0-9]{1,12}$",
      "description": "Unique ID of the corporation generated by PostalOne!",
      "type": "string",
      "minLength": 1,
      "maxLength": 12
    },
    "schedulerCRID": {
      "pattern": "^[0-9]{2,15}$",
      "description": "CRID assigned to Scheduler of FAST Appointment",
      "type": "string",
      "minLength": 2,
      "maxLength": 15
    },
    "consigneeFacility": {
      "description": "Consignee Facility details.",
      "type": "object",
      "properties": {
        "facilityNumber": {
          "pattern": "^[A-Za-z0-9]{1,15}$",
          "description": "Facility number",
          "type": "string",
          "minLength": 1,
          "maxLength": 15
        },
        "facilityType": {
          "pattern": "^[A-Za-z0-9]{1,15}$",
          "description": "Type of facility",
          "type": "string",
          "minLength": 1,
          "maxLength": 15
        }
      }
    },
    "detailInfo": {
      "description": "Details of the appointment for the availability request.",
      "type": "object",
      "properties": {
        "consigneeContainerGroupingID": {
          "description": "Consigner Container Grouping ID",
          "type": "string"
        },
        "shipperContainerGroupingID": {
          "description": "Shipper Container Grouping ID",
          "type": "string"
        },
        "uspsSummary": {
          "description": "Additional details of the Appointment.",
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "destinationDiscountIndicator": {
                "description": "Indicator whether this is dropship (NO) or origin entry (YES) appointment",
                "type": "string",
                "enum": [
                  "YES",
                  "NO"
                ]
              },
              "zoneSkippingIndicator": {
                "description": "Zone Skip in the Content of the appointment",
                "type": "string",
                "enum": [
                  "YES",
                  "NO"
                ]
              },
              "processingCategory": {
                "description": "Mail shape category",
                "type": "string",
                "enum": [
                  "LT",
                  "FL",
                  "CD",
                  "OS",
                  "MP",
                  "IR",
                  "PF",
                  "CM",
                  "SP",
                  "MB"
                ]
              },
              "newsIndicator": {
                "description": "Indicator for Newspaper",
                "type": "string",
                "enum": [
                  "YES",
                  "NO"
                ]
              },
              "priorityMailIndicator": {
                "description": "Priority Mail Indicator",
                "type": "string",
                "enum": [
                  "YES",
                  "NO"
                ]
              },
              "verificationLocation": {
                "description": "Verified Location for BMEU or DMU for FAST appointment",
                "type": "string",
                "enum": [
                  "BMEU",
                  "DMU"
                ]
              },
              "perishable": {
                "description": "Is it perishable.",
                "type": "string",
                "enum": [
                  "YES",
                  "NO"
                ]
              },
              "mailClass": {
                "description": "Numbers represent the mailClass within legacy systems for understanding\n\n1 FIRST CLASS MAIL\n2 PERIODICALS\n3 USPS MARKETING MAIL (PREVIOUSLY STANDARD MAIL)\n4 PACKAGE SERVICES\n6 PARCEL SELECT\n7 PRIORITY MAIL\n",
                "type": "string",
                "enum": [
                  "FIRST_CLASS",
                  "PERIODICALS",
                  "USPS_MARKETING_MAIL",
                  "PACKAGE_SERVICES",
                  "PARCEL_SELECT",
                  "PRIORITY_MAIL",
                  "USPS_GROUND_ADVANTAGE"
                ]
              },
              "rateType": {
                "description": "Rate type describes mail class and mail shape combination",
                "type": "string",
                "enum": [
                  "R",
                  "L",
                  "B",
                  "C",
                  "S",
                  "S1",
                  "S2",
                  "S3",
                  "S4",
                  "S5",
                  "S6",
                  "S7",
                  "F",
                  "A",
                  "N",
                  "P",
                  "T",
                  "D",
                  "X",
                  "H",
                  "M",
                  "Z",
                  "E",
                  "E4",
                  "G",
                  "1",
                  "2",
                  "3",
                  "4",
                  "J",
                  "K",
                  "V",
                  "W",
                  "Y",
                  "Q"
                ]
              }
            }
          }
        }
      }
    },
    "preferredAppt": {
      "description": "Preferred appointment if on one time appt selection path",
      "type": "string",
      "format": "date-time",
      "minLength": 0,
      "maxLength": 20
    },
    "apptTime": {
      "pattern": "^([01]?[0-9]|2[0-3]):[0-5][0-9]$",
      "description": "Appointment time if on recurring appt selection path",
      "type": "string",
      "minLength": 0,
      "maxLength": 5
    },
    "dayFrequency": {
      "description": "Appointment daily frequency if on recurring appt selection path",
      "type": "string",
      "enum": [
        "DAILY",
        "SATURDAY",
        "SUNDAY",
        "MONDAY",
        "TUESDAY",
        "WEDNESDAY",
        "THURSDAY",
        "FRIDAY"
      ]
    },
    "weekFrequency": {
      "description": "Appointment weekly frequency if on recurring appt selection path",
      "type": "string",
      "enum": [
        "WEEKLY",
        "BI_WEEKLY",
        "FIRST",
        "SECOND",
        "THIRD",
        "FOURTH",
        "FIFTH",
        "SIXTH"
      ]
    },
    "apptTrackingID": {
      "description": "ShipperApptRequestID in xml, CustomerSequenceId on one time and recurring selection paths",
      "type": "string",
      "minLength": 0,
      "maxLength": 30
    },
    "comments": {
      "description": "Comments if on recurring appt selection path",
      "type": "string",
      "minLength": 0,
      "maxLength": 100,
      "pattern": "^[A-Za-z0-9\\.\\-\\&\\# ]{1,100}$"
    },
    "schedulerContentID": {
      "description": "value set in recurring appt selection path",
      "type": "string",
      "minLength": 0,
      "maxLength": 30
    },
    "shipperApptRequestID": {
      "description": "value set in recurring appt selection path",
      "type": "string",
      "minLength": 0,
      "maxLength": 30
    },
    "shipperMultiStopID": {
      "description": "value set in one time appt selection path",
      "type": "string",
      "minLength": 0,
      "maxLength": 30
    },
    "trailerInfo": {
      "description": "Information about the trailer for the appointment.",
      "type": "object",
      "maxItems": 2,
      "properties": {
        "trailer": {
          "description": "max of two objects in the array",
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "trailerNumber": {
                "description": "Trailer Identifier",
                "type": "string",
                "minLength": 1,
                "maxLength": 12
              },
              "trailerLength": {
                "description": "Length of the trailer",
                "type": "string",
                "enum": [
                  "20FT",
                  "40FT",
                  "45FT",
                  "48FT",
                  "53FT"
                ]
              }
            }
          }
        },
        "carrier": {
          "description": "Details about the carrier for the appointment.",
          "type": "object",
          "properties": {
            "carrierName": {
              "description": "Name of the carrier",
              "type": "string",
              "minLength": 1,
              "maxLength": 40
            },
            "carrierCRID": {
              "description": "CRID of the carrier",
              "type": "string",
              "minLength": 2,
              "maxLength": 15
            },
            "commonContact": {
              "description": "Contact details of the appointment requestor.",
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "contactName": {
                    "description": "Contact name",
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 60
                  },
                  "telephone": {
                    "description": "Phone number of contact, numbers only, no delimeters, optional + sign",
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 25,
                    "pattern": "^\\+?[1-9][0-9]{7,14}$"
                  },
                  "mobilePhone": {
                    "description": "Cell phone number of contact, numbers only, no delimeters, optional + sign",
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 25,
                    "pattern": "^\\+?[1-9][0-9]{7,14}$"
                  },
                  "email": {
                    "description": "Email address of contact",
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 50,
                    "pattern": "^[a-zA-Z0-9_+&*-]+(?:\\.[a-zA-Z0-9_+&*-]+)*@(?:[a-zA-Z0-9-]+\\.)+[a-zA-Z]{2,}$"
                  },
                  "fax": {
                    "description": "Fax number of the contact, numbers only, no delimeters, optional +",
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 25,
                    "pattern": "^\\+?[1-9][0-9]{7,14}$"
                  },
                  "contactID": {
                    "description": "Identification details for the appointment requestor.",
                    "type": "object",
                    "properties": {
                      "idValue": {
                        "description": "Number on ID",
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 30
                      },
                      "idValueType": {
                        "description": "Type of ID used",
                        "type": "string",
                        "enum": [
                          "DRIVERS_LICENSE",
                          "EMPLOYEE_ID"
                        ]
                      }
                    }
                  },
                  "contactType": {
                    "description": "Carrier contact type",
                    "type": "string",
                    "enum": [
                      "ACCOUNT_MANAGER",
                      "CARRIER",
                      "CROSS_DOCK",
                      "CUSTOMER_SERVICE",
                      "HELP_DESK",
                      "DROP_SHIP_COORDINATOR",
                      "APPT_COORDINATOR",
                      "PLANT",
                      "INBOUND_FREIGHT_COORDINATOR",
                      "SALES_OFFICE",
                      "TRUCK_DRIVER",
                      "WAREHOUSE",
                      "OTHER"
                    ]
                  }
                }
              }
            }
          }
        },
        "billOfLadingNumberArray": {
          "description": "max of two objects in the array",
          "type": "array",
          "maxItems": 2,
          "items": {
            "type": "object",
            "properties": {
              "billOfLadingNumber": {
                "description": "Bill of lading number.",
                "type": "string",
                "minLength": 1,
                "maxLength": 15
              }
            }
          }
        }
      }
    }
  }
}