{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/usps/json-schema/usps-qrcode-response-schema.json",
  "title": "QRCodeResponse",
  "description": "QR Code and associated meta data",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/usps-qr-codes-openapi.yml#/components/schemas/QRCodeResponse",
  "required": [
    "trackingNumber",
    "ZIPCode",
    "pickup",
    "QRCode"
  ],
  "properties": {
    "trackingNumber": {
      "description": "The package tracking Number.",
      "type": "string"
    },
    "ZIPCode": {
      "pattern": "^\\d{11}$",
      "type": "string",
      "description": "The 11-digit delivery ZIP Code."
    },
    "pickupCode": {
      "pattern": "\\w{6}",
      "type": "string",
      "description": "The one-time, six-digit access code to retrieve the package from a USPS Locker."
    },
    "QRCode": {
      "maxLength": 7089,
      "minLength": 1,
      "type": "string",
      "description": "The QR code to retrieve the package from a USPS Locker, in Base64 encoded format."
    },
    "lockerRemovalDate": {
      "format": "date",
      "type": "string",
      "description": "The last day to pick up the package before it is removed from the USPS Locker."
    },
    "POName": {
      "maxLength": 255,
      "minLength": 1,
      "type": "string",
      "description": "The name of the Post Office where the USPS Locker is located."
    },
    "streetAddress": {
      "maxLength": 50,
      "minLength": 1,
      "type": "string",
      "description": "The Post Office street address."
    },
    "city": {
      "maxLength": 28,
      "minLength": 1,
      "type": "string",
      "description": "The Post Office city."
    },
    "state": {
      "maxLength": 2,
      "minLength": 2,
      "pattern": "^(AA|AE|AL|AK|AP|AS|AZ|AR|CA|CO|CT|DE|DC|FM|FL|GA|GU|HI|ID|IL|IN|IA|KS|KY|LA|ME|MH|MD|MA|MI|MN|MS|MO|MP|MT|NE|NV|NH|NJ|NM|NY|NC|ND|OH|OK|OR|PW|PA|PR|RI|SC|SD|TN|TX|UT|VT|VI|VA|WA|WV|WI|WY)$",
      "type": "string",
      "description": "The Post Office state."
    },
    "POZIPCode": {
      "maxLength": 5,
      "minLength": 5,
      "type": "string",
      "description": "The Post Office 5-digit ZIP Code."
    },
    "POZIPCodePlus4": {
      "maxLength": 4,
      "minLength": 4,
      "type": "string",
      "description": "The Post Office ZIP+4 Code."
    }
  }
}