{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/fedex/json-schema/fedex-regulatorydetails-retrieve-body-schema.json",
  "title": "regulatorydetails_retrieve_body",
  "x-generated": "2026-11-05",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/fedex-global-trade-api-openapi.yml#/components/schemas/regulatorydetails_retrieve_body",
  "oneOf": [
    {
      "$ref": "#/$defs/FullSchema"
    },
    {
      "$ref": "#/$defs/MinimumSamplePayload"
    }
  ],
  "$defs": {
    "Address": {
      "required": [
        "countryCode"
      ],
      "type": "object",
      "properties": {
        "countryCode": {
          "type": "string",
          "description": "Indicate the 2-character ISO country code. <br>Maximum length is 2.<br>Example: US<br><a onclick='loadDocReference(\"countrycodes\")'>click here to see Country codes</a>"
        },
        "postalCode": {
          "type": "string",
          "description": "This is the postal code.<br>Note: This is Optional for non postal-aware countries. Maximum length is 10.<br>Example: 65247<br><a onclick='loadDocReference(\"postalawarecountries\")'>click here to see Postal aware countries</a>"
        },
        "stateOrProvinceCode": {
          "type": "string",
          "description": "This is a placeholder for state or province code.<br>Example: CA.<br><a onclick='loadDocReference(\"canadaprovincecodes\")'>click here to see State or Province Code</a>"
        }
      },
      "description": "Address Model"
    },
    "CommercialInvoice": {
      "type": "object",
      "properties": {
        "freightCharge": {
          "description": "Indicate the freight charge.",
          "allOf": [
            {
              "$ref": "#/$defs/Money"
            }
          ]
        },
        "purpose": {
          "type": "string",
          "description": "It describes the purpose."
        }
      },
      "description": "Use this object to provide Commercial Invoice details. This element is required for electronic upload of CI data. It will serve to create/transmit an electronic Commercial Invoice through the FedEx system.<br>Customers are responsible for printing their own Commercial Invoice.<br>If you would like FedEx to generate a Commercial Invoice and transmit it to Customs for clearance purposes, you need to specify that in the ETDDetail/RequestedDocumentCopies element.<br>Supports maximum of 99 commodity line items."
    },
    "CommodityVO": {
      "required": [
        "harmonizedCode"
      ],
      "type": "object",
      "properties": {
        "quantity": {
          "type": "string",
          "description": "Total number of units (using quantityUnits as the unit of measure) of this commodity present in the shipment.  <br>Example: '1'"
        },
        "quantityUOM": {
          "type": "string",
          "description": "This is the units quantity per commodity. This is used to estimate duties and taxes in GTC.<br>Example: 125"
        },
        "customsValue": {
          "description": "Required<br>Customs value for this commodity",
          "allOf": [
            {
              "$ref": "#/$defs/Money"
            }
          ]
        },
        "countryOfManufacture": {
          "type": "string",
          "description": "Required<br> Max Length is 4<br> Example: IN"
        },
        "name": {
          "type": "string",
          "description": "This represents the name of commodity."
        },
        "harmonizedCode": {
          "type": "string",
          "description": "This is to specify the Harmonized Tariff System (HTS) code to meet U.S. and foreign governments' customs requirements. These are mainly used to estimate the duties and taxes.<br>Example: 0613<br>To research the classification for your commodity, use the FedEx Global Trade Manager online at <a href='http://www.fedex.com/gtm' target='_blank'>fedex.com/gtm</a>. You will find country-specific information to determine whether your commodity is considered to be a document or non-document for your destination."
        },
        "description": {
          "type": "string",
          "description": "This represents commodity description"
        },
        "weight": {
          "description": "Represents Weight of the packages or shipment.",
          "allOf": [
            {
              "$ref": "#/$defs/Weight"
            }
          ]
        },
        "commodityId": {
          "type": "integer",
          "description": "This represents the commodity id",
          "format": "int32"
        },
        "additionalMeasures": {
          "$ref": "#/$defs/Measure"
        }
      }
    },
    "CustomsClearanceDetailVO": {
      "required": [
        "commodities",
        "customsValue"
      ],
      "type": "object",
      "properties": {
        "regulatoryControls": {
          "type": "array",
          "description": "These are the Regulatory Controls applicable to the shipment.",
          "items": {
            "type": "string",
            "enum": [
              "FOOD_OR_PERISHABLE",
              "USMCA",
              "NOT_APPLICABLE_FOR_LOW_VALUE_CUSTOMS_EXCEPTIONS",
              "NOT_IN_FREE_CIRCULATION"
            ]
          }
        },
        "insuranceCharges": {
          "$ref": "#/$defs/Money_1"
        },
        "importerOfRecordAccountNumber": {
          "description": "The descriptive data for the importer of Record for the shipment and account number information.",
          "allOf": [
            {
              "$ref": "#/$defs/Party"
            }
          ]
        },
        "customsValue": {
          "$ref": "#/$defs/Money"
        },
        "commercialInvoice": {
          "$ref": "#/$defs/CommercialInvoice"
        },
        "commodities": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/CommodityVO"
          }
        },
        "documentContent": {
          "type": "string",
          "description": "Defaults to COMMODITY. Only used for int'l Express requests to indicate if just documents are being shipped or not.",
          "enum": [
            "DOCUMENT",
            "COMMODITY"
          ]
        }
      },
      "description": "These are customs clearance details. <br>Required for International and intra-country Shipments."
    },
    "FullSchema": {
      "required": [
        "carrierCode",
        "destinationAddress",
        "originAddress"
      ],
      "type": "object",
      "properties": {
        "serviceType": {
          "type": "string",
          "description": "Specify the type of service that is used to ship the package.<br><a onclick='loadDocReference(\"servicetypes\")'>click here to see Service Types</a>"
        },
        "totalCommodityValue": {
          "description": "Specify the total commodity value. Either customsClearenceDetail or totalCommodityValue is required.",
          "allOf": [
            {
              "$ref": "#/$defs/Money"
            }
          ]
        },
        "originAddress": {
          "description": "Provide the shipment origin address details.",
          "allOf": [
            {
              "$ref": "#/$defs/Address"
            }
          ]
        },
        "destinationAddress": {
          "description": "Provide the shipment destination address details.",
          "allOf": [
            {
              "$ref": "#/$defs/Address"
            }
          ]
        },
        "serviceOptionType": {
          "type": "array",
          "description": "Specify attributes to filter location types. If more than one value is specified, only those locations that have all the specified attributes will be returned.",
          "items": {
            "type": "string",
            "description": "Specify attributes to filter location types. If more than one value is specified, only those locations that have all the specified attributes will be returned. <br> Example: [FEDEX_ONE_RATE, SATURDAY_DELIVERY]",
            "enum": [
              "FEDEX_ONE_RATE",
              "FREIGHT_GUARANTEE",
              "SATURDAY_DELIVERY",
              "SMART_POST_ALLOWED_INDICIA",
              "SMART_POST_HUB_ID"
            ]
          }
        },
        "customsClearanceDetail": {
          "description": "Specify the Customs clearance details.Either customsClearenceDetail or totalCommodityValue is required.",
          "allOf": [
            {
              "$ref": "#/$defs/CustomsClearanceDetailVO"
            }
          ]
        },
        "shipDate": {
          "type": "string",
          "description": "Specify shipment date. <br><br><i>Note : Default value is current date in case the date is not provided or a past date is provided.</i><br>Format [YYYY-MM-DD].<br>Example: 2021-08-05'"
        },
        "carrierCode": {
          "type": "string",
          "description": "Specify the four letter code of a FedEx operating company that meets your requirements.<br><br>Valid values are:<ul><li>FDXE - FedEx Express</li><li>FDXG - FedEx Ground</li><br>Example: FDXE"
        },
        "totalWeight": {
          "description": "Provide the total weight for the shipment.",
          "allOf": [
            {
              "$ref": "#/$defs/Weight"
            }
          ]
        },
        "includeURLReferences": {
          "type": "boolean",
          "description": "Specify if the url references to be included in the output. These are regulatory reference data urls specific to document, agency."
        },
        "consolidationType": {
          "type": "string",
          "description": "Specify the type of consolidation that contains this shipment.<br><br>Valid values are:<ul><li>INTERNATIONAL_DISTRIBUTION_FREIGHT</li><li>INTERNATIONAL_ECONOMY_DISTRIBUTION</li><li>INTERNATIONAL_GROUND_DISTRIBUTION</li><li>INTERNATIONAL_PRIORITY_DISTRIBUTION</li><li>TRANSBORDER_DISTRIBUTION</ul>"
        },
        "consolidationRole": {
          "type": "string",
          "description": "Specify the role this shipment plays within the consolidation.<br><br>Valid values are:<ul><li>CONSOLIDATION_DOCUMENTS_SHIPMENT &ndash; Shipment contains clearance documents for the corresponding consolidation.</li><li>CRN_SHIPMENT &ndash; Shipment is a Child Reference Number(individual shipment within consolidation).</li><li>MASTER_AIRWAYBILL_SHIPMENT &ndash; Shipment represents entire consolidation, moving as a unit.</li></ul>"
        },
        "version": {
          "$ref": "#/$defs/Version"
        }
      },
      "description": "The request elements to retrieve Shipment Regulatory Details."
    },
    "Measure": {
      "required": [
        "quantity",
        "uom"
      ],
      "type": "object",
      "properties": {
        "uom": {
          "type": "string",
          "description": "Unit of measure used to express the quantity of this commodity line item."
        },
        "quantity": {
          "type": "number",
          "description": "Specify commodity quantity.",
          "format": "double"
        }
      },
      "description": "This object contains additional quantitative information other than weight and quantity to calculate duties and taxes."
    },
    "MinimumSamplePayload": {},
    "Money": {
      "type": "object",
      "properties": {
        "amount": {
          "type": "number",
          "description": "This is the amount.<br>Example: 12.45",
          "format": "double"
        },
        "currency": {
          "type": "string",
          "description": "This is the currency code for the amount.<br>Example: USD<br><a onclick='loadDocReference(\"currencycodes\")'>click here to see Currency codes</a>"
        }
      },
      "description": "Customs value for this commodity."
    },
    "Money_1": {
      "type": "object",
      "properties": {
        "amount": {
          "type": "number",
          "description": "This is the amount.<br>Example: 12.45",
          "format": "double"
        },
        "currency": {
          "type": "string",
          "description": "This is the currency code for the amount.<br>Example: USD<br><a onclick='loadDocReference(\"currencycodes\")'>click here to see Currency codes</a>"
        }
      },
      "description": "Specify Insurance charges if applicable.<br><i>Note: FedEx does not provide insurance of any kind</i>."
    },
    "Party": {
      "type": "object",
      "properties": {
        "accountNumber": {
          "type": "string",
          "description": "This is FedEx Account number details. Example: 123456789"
        }
      },
      "description": "Attributes for a Party to a transaction including the physical address, contact information and account number information."
    },
    "Version": {
      "type": "object",
      "properties": {
        "major": {
          "type": "integer",
          "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"
        },
        "minor": {
          "type": "integer",
          "description": "This represents a backward-compatible minor adjustment to an existing API functionality. This is the second number in API versioning scheme. Accepts only numbers"
        },
        "patch": {
          "type": "integer",
          "description": "This represents a backward-compatible bug fix adjustment to an existing API functionality. This is the third number in API versioning scheme. Accepts only numbers"
        }
      }
    },
    "Weight": {
      "required": [
        "units",
        "value"
      ],
      "type": "object",
      "properties": {
        "units": {
          "type": "string",
          "description": "Indicate the weight unit type. The package and commodity weight unit should be the same else the request will result in an error.",
          "enum": [
            "KG",
            "LB"
          ]
        },
        "value": {
          "type": "number",
          "description": "This is the weight. Max. Length is 99999.<br>Example: 68.25",
          "format": "double"
        }
      },
      "description": "Specify the Dry Ice weight details. <p><i>Note:<ul><li>Dry Ice is a Package level service for Domestic shipments.</li><li>Dry Ice must be declared at both Shipment and Package level for International MPS shipments to print the compliance statement on Airway Bill labels.</li></ul></i></p>"
    }
  }
}