{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/fedex/json-schema/fedex-full-schema-validate-postal-schema.json",
  "title": "FullSchema-ValidatePostal",
  "description": "The request elements for validating a postal code.",
  "x-generated": "2026-11-05",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/fedex-postal-code-api-openapi.yml#/components/schemas/FullSchema-ValidatePostal",
  "required": [
    "carrierCode",
    "countryCode",
    "postalCode",
    "shipDate",
    "stateOrProvinceCode"
  ],
  "type": "object",
  "properties": {
    "carrierCode": {
      "type": "string",
      "description": "Specify the four letter code of a FedEx operating company that meets your requirements<br>Examples of FedEx Operating Companies are:<ul><li>FDXE - FedEx Express</li><li>FDXG - FedEx Ground</li><li>FXSP - FedEx SmartPost</li><li>FXCC - FedEx Custom Critical.</li></ul>",
      "enum": [
        "FDXE",
        "FDXG",
        "FXSP",
        "FDXC",
        "FXCC"
      ]
    },
    "countryCode": {
      "type": "string",
      "description": "The two-letter code used to identify a country. <br>Example:US<br><a onclick='loadDocReference(\"countrycodes\")'>Click here to see Country Codes</a>"
    },
    "stateOrProvinceCode": {
      "type": "string",
      "description": "This is the state or province code. Format and presence of this field will vary, depending on country. <br> Example: US<br><a onclick='loadDocReference(\"canadaprovincecodes\")'>Click here to see State Or Province Code</a>"
    },
    "postalCode": {
      "type": "string",
      "description": "Identification code of a region (usally small) for easier and accurate mail/package delivery. The format and presence of this field may vary depending on the country.  <br> Example: 75063-8659 <br><a onclick='loadDocReference(\"postalawarecountries\")'>Click here to see Postal aware countries</a>"
    },
    "shipDate": {
      "type": "string",
      "description": "Specify the date on which the package is to be shipped. The specified date should not be the current date or any date, 10 days after the current date. The date format must be YYYY-MM-DD. <br> Example: 2019-10-04"
    },
    "routingCode": {
      "type": "string",
      "description": "Specify the routing code for the shipment. Routing code is the information that identifies the route the package or shipment may take. <br> Example: Memphis 38017 - HKA/NQA"
    },
    "checkForMismatch": {
      "type": "boolean",
      "description": "This element checks for mismatch between State/Province Code and Postal Code. <ul><li>When the checkForMismatch is set TRUE, for U.S. and Canada: The values in State/Province Code are checked with respect to Postal Code provided. If these entries are valid, the response provides respective State/Province Code and Postal Code. In case of mismatch of Postal Code and State/Province Code an error message is displayed.</li><li> When the checkForMismatch is set FALSE, for U.S. and Canada: The values in State/Province Code are not checked with respect to Postal Code provided. Instead the given data is reflected in the response.</li></ul> <br> For regions other than U.S and Canada regardless of the value of checkForMismatch the State/Province Code are checked with respect to the Postal Code and the response provides the respective State/Province Code and Postal Code."
    },
    "city": {
      "type": "string",
      "description": "Name of the city associated with the postal code. Required when `countryCode` is `AU` (Australia)."
    },
    "version": {
      "$ref": "#/$defs/Version"
    }
  },
  "$defs": {
    "Version": {
      "type": "object",
      "properties": {
        "major": {
          "description": "This version is incremented when significant changes are made to the API functionality. These could be breaking changes and might require code-adjustments from clients. Accepts only numbers",
          "type": "integer"
        },
        "minor": {
          "description": "This represents a backward-compatible bug fix or minor adjustment to an existing API functionality. This is the second number in API versioning scheme. Accepts only numbers",
          "type": "integer"
        },
        "patch": {
          "description": "This represents a backward-compatible bug fix or minor adjustment to an existing API functionality. This is the third number in API versioning scheme. Accepts only numbers",
          "type": "integer"
        }
      }
    }
  }
}