{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/fedex/json-schema/fedex-full-schema-modify-package-in-open-shipment-schema.json",
  "title": "FullSchema-modifyPackageInOpenShipment",
  "description": "The response elements received when a shipment is created.",
  "x-generated": "2026-11-05",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/fedex-open-ship-api-openapi.yml#/components/schemas/FullSchema-modifyPackageInOpenShipment",
  "required": [
    "accountNumber",
    "index",
    "requestedPackageLineItem",
    "trackingId"
  ],
  "type": "object",
  "properties": {
    "requestedPackageLineItem": {
      "description": "Contains the data for the package that is to be modified in the open shipment.",
      "allOf": [
        {
          "$ref": "#/$defs/RequestedPackageLineItem"
        }
      ]
    },
    "index": {
      "type": "string",
      "description": "This is a unique value assigned to the already created Open Shipment. If this isn’t available then provide the master tracking number.<br>Example: Test1234"
    },
    "openShipmentAction": {
      "allOf": [
        {
          "$ref": "#/$defs/OpenShipmentAction_1"
        }
      ]
    },
    "accountNumber": {
      "$ref": "#/$defs/AccountNumber"
    },
    "version": {
      "$ref": "#/$defs/Version"
    },
    "trackingId": {
      "$ref": "#/$defs/TrackingId"
    }
  },
  "$defs": {
    "AccountNumber": {
      "description": "The account number associated with the shipment. <br>Example: Your account number",
      "allOf": [
        {
          "$ref": "#/$defs/PartyAccountNumber"
        }
      ]
    },
    "AlcoholDetail": {
      "type": "object",
      "properties": {
        "alcoholRecipientType": {
          "type": "string",
          "description": "Specify the recipient type.",
          "enum": [
            "LICENSEE",
            "CONSUMERstomer"
          ]
        },
        "shipperAgreementType": {
          "type": "string",
          "description": "Specify the type of entity, the shipper for alcohol shipment is registered such as fulfillment house, retailer or a winery."
        }
      },
      "description": "These are details for the package containing alcohol. This is required for alcohol special service. The alcoholRecipientType is required."
    },
    "BatteryDetail": {
      "type": "object",
      "properties": {
        "batteryPackingType": {
          "type": "string",
          "description": "Describe the packing arrangement of the battery or cell with respect to other items within the same package.",
          "enum": [
            "CONTAINED_IN_EQUIPMENT",
            "PACKED_WITH_EQUIPMENT"
          ]
        },
        "batteryRegulatoryType": {
          "type": "string",
          "description": "This is a regulation specific classification for the battery or the cell.",
          "enum": [
            "IATA_SECTION_II"
          ]
        },
        "batteryMaterialType": {
          "type": "string",
          "description": "Indicate the material composition of the battery or cell.",
          "enum": [
            "LITHIUM_METAL",
            "LITHIUM_ION"
          ]
        }
      }
    },
    "ContentRecord": {
      "type": "object",
      "properties": {
        "itemNumber": {
          "type": "string",
          "description": "This is a package item number."
        },
        "receivedQuantity": {
          "type": "integer",
          "description": "This is the package item quantity.",
          "format": "int32"
        },
        "description": {
          "type": "string",
          "description": "This is the description of the package item."
        },
        "partNumber": {
          "type": "string",
          "description": "This is the part number."
        }
      },
      "description": "Use this object to specify package content details."
    },
    "CustomerReference_1": {
      "type": "object",
      "properties": {
        "customerReferenceType": {
          "type": "string",
          "description": "This is a customer reference type. The value specified here for the element is printed on the Commercial Invoice only for tracking and label information.<p>Note: <ul><li>The P_O_NUMBER value must be specified in customerReferences under requestedPackageLineItems</li><li>The INVOICE_NUMBER value that is printed on the FedEx-supplied invoice must be specified in customerReferences under commercialInvoice. Value defined in this section will print on the label that is attached to the package</li><li>RMA value sent by the customer is returned on the label in human readable form and also as a barcode.</li></ul>Note: INTRACOUNTRY_REGULATORY_REFERENCE is applicable only in Intra-Brazil.<br><a onclick='loadDocReference(\"customerreferencetypes\")'>For more information, click here for Cutsomer References</a>",
          "enum": [
            "CUSTOMER_REFERENCE",
            "DEPARTMENT_NUMBER",
            "INVOICE_NUMBER",
            "P_O_NUMBER",
            "INTRACOUNTRY_REGULATORY_REFERENCE",
            "RMA_ASSOCIATION"
          ]
        },
        "value": {
          "type": "string",
          "description": "This is a customer reference type value.<br>Example: 3686 <ul><li>The P_O_NUMBER value must be specified in customerReferences under requestedPackageLineItems</li><li>The INVOICE_NUMBER value that is printed on the FedEx-supplied invoice must be specified in customerReferences under commercialInvoice. Value defined in this section will print on the label that is attached to the package</li><li>The RMA value sent by the customer is returned on the label in human readable form but also as a barcode. RMA_ASSOCIATION only prints on the label as a barcode for a Return shipment.</ul>NOTE:<ul><li> INTRACOUNTRY_REGULATORY_REFERENCE is applicable only in Intra-Brazil.</li><li>  Maximum length varies for value field depending on customerReferenceType.</li></ul> Maximum length for value is as follows: <ul><li>CUSTOMER_REFERENCE - 40(Express), 30(Ground)</li><li>DEPARTMENT_NUMBER - 30</li><li>INVOICE_NUMBER - 30</li><li>P_O_NUMBER - 30</li><li>INTRACOUNTRY_REGULATORY_REFERENCE - 30</li><li>RMA_ASSOCIATION - 20</li>"
        }
      }
    },
    "DangerousGoodsDetail": {
      "type": "object",
      "properties": {
        "accessibility": {
          "type": "string",
          "description": "Specify Dangerous Goods Accessibility Type. <ul><li>Inaccessible &ndash; it does not have to be accessable on the aircraft.</li><li>Accessible &ndash; it must be fully accessible on the aircraft, and is more strictly controlled.</li></ul><i>Note: Accessibility is only required for IATA controlled DG shipments.</i>",
          "enum": [
            "ACCESSIBLE",
            "INACCESSIBLE"
          ]
        },
        "cargoAircraftOnly": {
          "description": "A Boolean value that, when True, specifies the mode of shipment transportation should be Cargo Aircraft for Dangerous Goods. Its default value is set as False.<br>Note: An identifier DGD-CAO is added in AWB for cargo aircraft shipments.",
          "type": "boolean"
        },
        "regulation": {
          "type": "string",
          "description": "It is a HazardousCommodityRegulationType(The regulation under which the DG data has been validated).",
          "enum": [
            "ADR",
            "DOT",
            "IATA",
            "ORMD"
          ]
        },
        "options": {
          "type": "array",
          "description": "Indicate type of DG being reported.",
          "items": {
            "type": "string",
            "enum": [
              "HAZARDOUS_MATERIALS",
              "BATTERY",
              "ORM_D",
              "REPORTABLE_QUANTITIES",
              "SMALL_QUANTITY_EXCEPTION",
              "LIMITED_QUANTITIES_COMMODITIES"
            ]
          }
        }
      },
      "description": "Provide dangerous goods shipment details."
    },
    "Dimensions": {
      "type": "object",
      "properties": {
        "length": {
          "type": "integer",
          "description": "Indicate the length of the package. No implied decimal places. Maximum value: 999 <br> Example: 20",
          "format": "int32"
        },
        "width": {
          "type": "integer",
          "description": "Indicate the width of the package. No implied decimal places. Maximum value: 999 <br> Example: 10",
          "format": "int32"
        },
        "height": {
          "type": "integer",
          "description": "Indicate the height of the package. No implied decimal places. Maximum value: 999 <br> Example: 10",
          "format": "int32"
        },
        "units": {
          "type": "string",
          "description": "Indicate the Unit of measure for the provided dimensions.<br>Valid Values are:<li>IN - inches</li><li>CM - centimeters</li>Note: Any value other than CM including blank/null will default to IN.",
          "enum": [
            "CM",
            "IN"
          ]
        }
      },
      "description": "Indicate the dimensions of the package.<br> Following conditions will apply: <ul><li>Dimensions are optional but when added, then all three dimensions must be indicated.</li><li>Dimensions are required when using a Express freight service.</li></ul>Note: The maximum/minimum dimension values varies based on the services and the packaging types. Refer <a href='https://www.fedex.com/en-us/service-guide.html' target='_blank'>FedEx Service Guide</a> for service details related to DIM Weighting for FedEx Express and oversize conditions for FedEx Express and FedEx Ground."
    },
    "Money": {
      "type": "object",
      "properties": {
        "amount": {
          "type": "number",
          "description": "This is the amount. Maximum limit is 5 digits before decimal.<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": "Specifies taxes or miscellaneous charge."
    },
    "OpenShipmentAction_1": {
      "type": "string",
      "description": "Indicates the optional actions that can be performed during the modification of packages in  Open Shipment.<p>Here are the values:<ul><li>CREATE_PACKAGE - Use CREATE_PACKAGE option to create Open Shipment.</li><li>STRONG_VALIDATION – Full shipment edits: any edit that fails will cause the transaction to fail. If the transaction is successful, a tracking number may be returned and the transaction will be saved to the database (committed).</li><li>WEAK_VALIDATION - Full shipment edits: any edit that fails will return errors but the transaction does not fail. The tracking number is returned and the transaction is saved in the database if the core edits are passed. Fix errors with the ModifyRequests transaction using the Index and returned tracking number.</li></ul></p>",
      "enum": [
        "STRONG_VALIDATION",
        "WEAK_VALIDATION",
        "CREATE_PACKAGE"
      ]
    },
    "PackageCODDetail": {
      "type": "object",
      "properties": {
        "codCollectionAmount": {
          "description": "Indicate the COD collection amount.",
          "allOf": [
            {
              "$ref": "#/$defs/Money"
            }
          ]
        }
      },
      "description": "These are COD package details. For use with FedEx Ground services only; COD must be present in shipments special services."
    },
    "PackageSpecialServicesRequested": {
      "type": "object",
      "properties": {
        "specialServiceTypes": {
          "type": "array",
          "description": "Indicate the types of special services requested for the shipment.<br><a onclick='loadDocReference(\"packagelevelspecialservicetypes\")'>click here to see Package Special Service Types</a>",
          "items": {
            "type": "string"
          }
        },
        "signatureOptionType": {
          "type": "string",
          "description": "Indicate the Signature Type. <br>Valid Values: <ul><li>ADULT - Adult signature required, at recipient address.</li><li>DIRECT - Signature required, at recipient address.</li><li>INDIRECT - Signature required, alternate address is accepted.This option is available for residential deliveries only</li><li>NO_SIGNATURE_REQUIRED - Signature is not required.</li><li>SERVICE_DEFAULT - Signature handled as per current Service Guide.</li></ul>",
          "enum": [
            "SERVICE_DEFAULT",
            "NO_SIGNATURE_REQUIRED",
            "INDIRECT",
            "DIRECT",
            "ADULT"
          ]
        },
        "priorityAlertDetail": {
          "$ref": "#/$defs/PriorityAlertDetail"
        },
        "signatureOptionDetail": {
          "$ref": "#/$defs/SignatureOptionDetail"
        },
        "alcoholDetail": {
          "$ref": "#/$defs/AlcoholDetail"
        },
        "dangerousGoodsDetail": {
          "$ref": "#/$defs/DangerousGoodsDetail"
        },
        "packageCODDetail": {
          "$ref": "#/$defs/PackageCODDetail"
        },
        "pieceCountVerificationBoxCount": {
          "type": "integer",
          "description": "Provide the pieceCount or VerificationBoxCount for batteries or cells that are contained within this specific package.",
          "format": "int32"
        },
        "batteryDetails": {
          "type": "array",
          "description": "Provide details about the batteries or cells that are contained within this specific package.",
          "items": {
            "$ref": "#/$defs/BatteryDetail"
          }
        },
        "dryIceWeight": {
          "$ref": "#/$defs/Weight_Without_Link"
        },
        "standaloneBatteryDetails": {
          "type": "array",
          "description": "Provide details about the batteries or cells that are contained within this specific package.",
          "items": {
            "$ref": "#/$defs/StandaloneBatteryDetails"
          }
        }
      },
      "description": "These are special services that are available at the package level for some or all service types."
    },
    "PartyAccountNumber": {
      "type": "object",
      "properties": {
        "value": {
          "type": "string",
          "description": "Conditional.<br> The account number value.<br> Max Length is 9.<br>Example: 12XXXXX89"
        }
      },
      "description": "This is FedEx Account number details."
    },
    "PriorityAlertDetail": {
      "type": "object",
      "properties": {
        "enhancementTypes": {
          "type": "array",
          "description": "The types of all enhancement for the Priority Alert.<br>Example: PRIORITY_ALERT_PLUS",
          "items": {
            "type": "string"
          }
        },
        "content": {
          "type": "array",
          "description": "Specifies Content for the Priority Alert Detail.",
          "items": {
            "type": "string"
          }
        }
      },
      "description": "Specifies the Priority Alert Detail."
    },
    "RequestedPackageLineItem": {
      "required": [
        "weight"
      ],
      "type": "object",
      "properties": {
        "sequenceNumber": {
          "type": "string",
          "description": "Optional. <br>Used only with individual packages as a unique identifier of each requested package. Will be adjusted at the shipment level as pieces are added."
        },
        "subPackagingType": {
          "type": "string",
          "description": "Indicate the subPackagingType, if you are using your own packaging for the shipment. Use it for all shipments inbound to Canada (CA) and inbound shipments to the U.S. and Puerto Rico (PR) from Canada and Mexico (MX).subPackagingType is mandatory for shipments to Canada.<br>Example: TUBE, CARTON, CONTAINER. etc.<br>Note: If the value is TUBE, a non-machinable surcharge will be applicable for SmartPost shipments.<br><a onclick='loadDocReference(\"subpackagetypes\")'>click here to see Sub-Packaging Types</a><br>For more information on physical packaging or packaging regulatory requirements, contact your FedEx representative."
        },
        "customerReferences": {
          "type": "array",
          "description": "These are additional customer reference data.<br>Note: The groupPackageCount must be specified to retrieve customer references.",
          "items": {
            "$ref": "#/$defs/CustomerReference_1"
          }
        },
        "declaredValue": {
          "description": "This is the Declared Value of any shipment which represents FedEx maximum liability associated with a shipment. This is including, but not limited to any loss, damage, delay, misdelivery, any failure to provide information, or misdelivery of information related to the Shipment.",
          "allOf": [
            {
              "$ref": "#/$defs/Money"
            }
          ]
        },
        "weight": {
          "$ref": "#/$defs/Weight_With_Link"
        },
        "dimensions": {
          "description": "Indicate the dimensions of the package.<br> Following conditions will apply: <ul><li>Dimensions are optional but when added, then all three dimensions must be indicated.</li><li>Dimensions are required when using a Express freight service.</li></ul>Note: The maximum/minimum dimension values varies based on the services and the packaging types. Refer <a href='https://www.fedex.com/en-us/service-guide.html' target='_blank'>FedEx Service Guide</a> for service details related to DIM Weighting for FedEx Express and oversize conditions for FedEx Express and FedEx Ground.",
          "allOf": [
            {
              "$ref": "#/$defs/Dimensions"
            }
          ]
        },
        "groupPackageCount": {
          "type": "integer",
          "description": "Indicate the grouped package count. These are number of identical package(s) each with one or more commodities. <br> Example: 2",
          "format": "int32"
        },
        "itemDescriptionForClearance": {
          "type": "string",
          "description": "Describe the content of the package for customs clearance purposes. This applies to intra-UAE, intra-Columbia and intra-Brazil shipments."
        },
        "contentRecord": {
          "type": "array",
          "description": "Use this object to specify package content details.",
          "items": {
            "$ref": "#/$defs/ContentRecord"
          }
        },
        "itemDescription": {
          "type": "string",
          "description": "This the item description for the package.<br>Note: Item description is required for Email Label return shipments and ground Create tag.<br>Example: Item description<br> Maximum limit is 50 characters"
        },
        "variableHandlingChargeDetail": {
          "$ref": "#/$defs/VariableHandlingChargeDetail"
        },
        "packageSpecialServices": {
          "$ref": "#/$defs/PackageSpecialServicesRequested"
        }
      },
      "description": "These are one or more package-attribute descriptions, each of which describes an individual package, a group of identical packages, or (for the total-piece-total-weight case) common characteristics of all packages in the shipment.<ul><li>At least one instance containing the weight for at least one package is required for EXPRESS and GROUND shipments.</li><li>Single piece requests will have one RequestedPackageLineItem.</li><li>Multiple piece requests will have multiple RequestedPackageLineItems.</li><li>Maximum occurrences is 30.</li></ul>"
    },
    "SignatureOptionDetail": {
      "type": "object",
      "properties": {
        "signatureReleaseNumber": {
          "type": "string",
          "description": "This is release number.<br>Example: 23456"
        }
      },
      "description": "This element specifies Signature option details."
    },
    "StandaloneBatteryDetails": {
      "type": "object",
      "properties": {
        "batteryMaterialType": {
          "type": "string",
          "description": "Describes the material composition of the battery or cell.",
          "enum": [
            "LITHIUM_METAL",
            "LITHIUM_ION"
          ]
        }
      }
    },
    "TrackingId": {
      "type": "object",
      "properties": {
        "formId": {
          "type": "integer",
          "description": "This is FedEx tracking Identifier associated with the package.<br>Example: 8600"
        },
        "trackingIdType": {
          "type": "string",
          "description": "Specify the FedEx transportation type. <br>Example: EXPRESS"
        },
        "uspsApplicationId": {
          "type": "integer",
          "description": "Specify the USPS tracking Identifier associated with FedEx SmartPost shipment.<br>Example: 92"
        },
        "trackingNumber": {
          "type": "string",
          "description": "This is a number associated with a package that is used to track it. <br>Example: 49XXX0000XXX20032835"
        }
      },
      "description": "Indicates the tracking details for the package."
    },
    "VariableHandlingChargeDetail": {
      "type": "object",
      "properties": {
        "rateType": {
          "type": "string",
          "description": "The rate type indicates what type of rate request is being returned; account, preferred, incentive, etc",
          "enum": [
            "ACCOUNT",
            "ACTUAL",
            "CURRENT",
            "CUSTOM",
            "LIST",
            "INCENTIVE",
            "PREFERRED",
            "PREFERRED_INCENTIVE",
            "PREFERRED_CURRENCY"
          ]
        },
        "percentValue": {
          "type": "number",
          "description": "This is the variable handling percentage. If the percent value is mentioned as 10, it means 10%(multiplier of 0.1).<br>Example: 12.45",
          "format": "double"
        },
        "rateLevelType": {
          "type": "string",
          "description": "indicates whether or not the rating is being done at the package level, or if the packages are bundled together. At the package level, charges are applied based on the details of each individual package. If they are bundled, one package is chosen as the parent and charges are applied based on that one package.",
          "enum": [
            "BUNDLED_RATE",
            "INDIVIDUAL_PACKAGE_RATE"
          ]
        },
        "fixedValue": {
          "description": "This is to specify a fixed handling charge on the shipment. The element allows entry of 7 characters before the decimal and 2 characters following the decimal. <br>Example: 5.00.",
          "allOf": [
            {
              "$ref": "#/$defs/Money"
            },
            {
              "required": [
                "amount",
                "currency"
              ],
              "properties": {
                "amount": {
                  "type": "number",
                  "description": "fixed variable handling charge amount"
                },
                "currency": {
                  "type": "string",
                  "description": "fixed variable handling charge currency type<br><a onclick='loadDocReference(\"currencycodes\")'>click here to see Currency codes</a>"
                }
              }
            }
          ]
        },
        "rateElementBasis": {
          "type": "string",
          "description": "Specify the charge type upon which the variable handling percentage amount is calculated.",
          "enum": [
            "NET_CHARGE",
            "NET_FREIGHT",
            "BASE_CHARGE",
            "NET_CHARGE_EXCLUDING_TAXES"
          ]
        }
      },
      "description": "Indicate the details about how to calculate variable handling charges at the shipment level. They can be based on a percentage of the shipping charges or a fixed amount. If indicated, element rateLevelType is required."
    },
    "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"
        }
      }
    },
    "Weight_With_Link": {
      "description": "These are the package weight details.",
      "type": "object",
      "required": [
        "units",
        "value"
      ],
      "properties": {
        "units": {
          "description": "Specifies the package weight unit type.<br>Example:KG",
          "type": "string",
          "enum": [
            "KG",
            "LB"
          ]
        },
        "value": {
          "format": "double",
          "description": "Weight Value.<br> Example: 68.25<br><a href=\"/developer-portal/en-us/reference-guide.html#packagetypes\" target=\"_blank\">Click here to see Weight Values</a>",
          "type": "number"
        }
      }
    },
    "Weight_Without_Link": {
      "description": "These are the package weight details.",
      "type": "object",
      "required": [
        "units",
        "value"
      ],
      "properties": {
        "units": {
          "description": "Specifies the package weight unit type.<br>Example:KG",
          "type": "string",
          "enum": [
            "KG",
            "LB"
          ]
        },
        "value": {
          "format": "double",
          "description": "Weight Value.<br> Example: 68.25",
          "type": "number"
        }
      }
    }
  }
}