{
  "openapi": "3.0.1",
  "info": {
    "title": "Batch Shipment APIs",
    "description": "The Batch Shipment APIs provide operations to create, import, process, track, and manage shipments in bulk. These APIs enable submission of multiple shipments in a single request or through file-based import, supporting high-volume shipping workflows.\n\nBatch shipment processing supports two modes:\n\n  - **Synchronous bulk** creation using API payloads\n  - **Asynchronous batch** processing using file import (CSV via S3 URL)\n\nThe APIs also support ERR (Electronic Return Receipt) shipments, allowing generation of compliant return receipt documents for USPS shipments.\n\n**Batch**\n\nA collection of shipments grouped under a single processing request, identified by batchId.\n\n**Root Level attributes (Default)**\n\nDefines common attributes (e.g., carrier, service, parcel type) applied to all shipments in the batch.\n\n**Shipment Level attributes**\n\nDefines attributes specific to individual shipments. Values provided at this level override root-level defaults.\n\n**Combination Rule**\n\n`carrierAccountId`, `parcelType`, and `serviceId` must be provided together at the shipment level. Partial values result in validation errors.\n\n**Batch ID (batchId)**\n\nA system-generated identifier used to process, track, and manage batch operations.\n\n- Bulk shipments can be created via API payload or imported using a CSV file hosted on S3\n- Batch import generates a batchId used for further processing and tracking\n- Batch processing is triggered explicitly using the `Process Batch API`\n- Batch status and shipment-level results can be retrieved using `batchId`\n- Shipments within a batch can be voided either partially (specific shipment IDs) or entire batch\n- ERR batch supports additional document formats such as **Shipping Label** and **Coversheet**\n",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://api-sandbox.sendpro360.pitneybowes.com/shipping",
      "description": "Sandbox Server"
    },
    {
      "url": "https://api.sendpro360.pitneybowes.com/shipping",
      "description": "Production Server (uses live data)"
    },
    {
      "url": "https://api-ppd.shipping360.pitneybowes.com/ca/shipping",
      "description": "Sandbox Server for Canada"
    },
    {
      "url": "https://api.shipping360.pitneybowes.com/ca/shipping",
      "description": "Production Server for Canada"
    }
  ],
  "tags": [
    {
      "name": "Batch Shipment",
      "description": "These APIs support both synchronous bulk shipment creation and asynchronous batch processing using file-based import. They provide capabilities to track batch execution status, retrieve shipment-level results, and perform actions such as voiding shipments, enabling efficient handling of high-volume shipping workflows."
    }
  ],
  "paths": {
    "/api/v1/bulkShipments": {
      "post": {
        "tags": [
          "Batch Shipment"
        ],
        "summary": "Create Bulk Shipments",
        "description": "This API \"Create Bulk Shipments\" operation requires the following information:\n  - Recipient (Single or Multiple)\n  - Carrier\n  - Service\n  - Parcel Type, and\n  - Special Service\n\n  The API works at two levels: Shipment level and Root level. Root level is marked as Default, where multiple shipments are processed and entities are common for all shipments. While at Shipment level, entities might differ. <br />\n  User can either define values for *CarrierAccountID*, *ParcelType*, *ServiceID*, and *SpecialService* respectively at the Root level for all shipments, or mention the values at Shipment level, i.e., for individual shipment(s).  \n  If user does not provide values for the above-mentioned fields combinedly at Shipment level, then the default values for these fields provided at Root level will be considered. \n  While, if user provides these values combinedly at Shipment Level for individual shipment(s), it will override the values defined at Root level. <br />\n  <br />\n  *Condition: The fields *CarrierAccountID*, *ParcelType*, *ServiceID* are treated as a combination, and values against each field must be provided if user selects Shipment level. \n  In case any of these field(s) out of the mentioned combination is/are missing, it will return validation error.*\n",
        "operationId": "CreateBulkShipmentsAPI",
        "parameters": [
          {
            "name": "X-PB-Developer-Partner-ID",
            "description": "The Developer-Partner-ID is assigned by PB to uniquely identify a developer's strategic business partners. If the developer is the sole business partner, this field is not required.",
            "required": false,
            "in": "header",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-PB-LocationId",
            "description": "The X-PB-LocationId header identifies the enterprise, developer, or partner location under which a shipment is processed and billed.\nIf the header is not provided, the system defaults to the enterprise-level location that was created during developer account onboarding. This default location is automatically used for shipment processing and billing. <br/>\n\n**Requirement Rules**\n\n- The `X-PB-LocationId` header is optional when the shipment origin country code matches the enterprise's default address country code.\n- The `X-PB-LocationId` header is required when the shipment origin country code differs from the enterprise's default address country code.\n- If the header is required but not provided, the API will return a validation error *\"invalid origin countryCode\"*.\n",
            "required": false,
            "in": "header",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "This is the request body to create Bulk Shipment.",
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/CreateBulkShipments"
                  },
                  {
                    "$ref": "#/components/schemas/CreateBulkShipmentInternational"
                  }
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "The Bulk Shipment has been successfully created..",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BulkShipmentResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid Request",
            "$ref": "#/components/responses/InvalidError"
          },
          "401": {
            "description": "Unauthorized Error",
            "$ref": "#/components/responses/UnauthorizedError"
          },
          "500": {
            "description": "Internal Server Error",
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-codegen-request-body-name": "body"
      }
    },
    "/api/v1/err/bulkShipments": {
      "post": {
        "tags": [
          "Batch Shipment"
        ],
        "summary": "Create Bulk Shipments ERR",
        "description": "ERR (Electronic Return Receipt) is an official United States Postal Service® (USPS) document designed to be equivalent to the hardcopy 'green card' Return Receipt. <br /> \n  It provides the following information:\n  - Name of the Recipient\t\t\n  - Time when article is delivered\n  - Signature (image) of the Recipient\t\t\n  - Address where the item is delivered, and \n  - Date when the article gets delivered.\n  \n  ERR is combined with certain classes and categories of mails, which are as follow:\n  -\tFirst-Class Mail® \n  -\tPriority Mail® \n\n  ERR Batch supports two types of Shipment Document format: \n  - Shipping Label \n  - Coversheet \n  \n  This API \"Create Bulk Shipments with ERR\" operation requires the following information:\n  - Recipient (Single or Multiple)\n  - Carrier - USPS\n  - Service\n  - Parcel Type, and\n  - Special Service.\n\n  The ERR API works at two levels: Shipment level and Root level. Root level is marked as Default, where multiple shipments are processed and entities are common for all shipments. While at Shipment level, entities might differ. <br />\n  User can either define values for *CarrierAccountID*, *ParcelType*, *ServiceID*, and *SpecialService* respectively at the Root level for all shipments, or mention the values at Shipment level, i.e., for individual shipment(s).  \n  If user does not provide values for the above-mentioned fields combinedly at Shipment level, then the default values for these fields provided at Root level will be considered. While, if user provides these values combinedly at Shipment Level for individual shipment(s), it will override the values defined at Root level. <br />\n  <br />\n  *Condition: The fields *CarrierAccountID*, *ParcelType*, *ServiceID* are treated as a combination, and values against each field must be provided if user selects Shipment level. In case any of these field(s) out of the mentioned combination is/are missing, it will return validation error.*\n",
        "operationId": "CreateBulkShipmentsAPIERR",
        "parameters": [
          {
            "name": "X-PB-Developer-Partner-ID",
            "description": "The Developer-Partner-ID is assigned by PB to uniquely identify a developer's strategic business partners. If the developer is the sole business partner, this field is not required.",
            "required": false,
            "in": "header",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "This is the request body to create Bulk Shipment for ERR.",
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/CreateBulkShipmentsERRLabel"
                  },
                  {
                    "$ref": "#/components/schemas/CreateBulkShipmentsERRCoversheet"
                  }
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "The Bulk Shipment for ERR has been successfully created.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BulkShipmentResponseERR"
                }
              }
            }
          },
          "400": {
            "description": "Invalid Request",
            "$ref": "#/components/responses/InvalidError"
          },
          "401": {
            "description": "Unauthorized Error",
            "$ref": "#/components/responses/UnauthorizedError"
          },
          "500": {
            "description": "Internal Server Error",
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-codegen-request-body-name": "body"
      }
    },
    "/api/v1/shipments/importUrl": {
      "post": {
        "tags": [
          "Batch Shipment"
        ],
        "summary": "Bulk Import Shipments",
        "description": "\"This operation imports the .CSV file for Bulk Shipment, which includes fields essential to create Bulk Shipments. \n  The payload contains the following essential fields in .CSV file, used for shipment transactions:\n  - Carrier Account\n  - Output format, which includes Shipping Label and Coversheet \n  - Services, and\n  - Special Services \n\n  User stores this information in AWS-S3 which in turn provides URL to users. \n  After submitting Batch, user uploads the S3 returned URL along with the .CSV file, which generates BatchID. The same BatchID can be used to track the status of BulkImport.\"\n",
        "operationId": "BulkImportAPI",
        "parameters": [
          {
            "name": "X-PB-Developer-Partner-ID",
            "in": "header",
            "description": "The Developer Partner ID is assigned by PB to uniquely identify a Developer's strategic business partners. If the developer is the sole business partner, this field isn't required.",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": " This is the request body to import Bulk shipments.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateBatchRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": " The bulk shipment has been successfully imported.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ShipmentBatch"
                }
              }
            }
          },
          "400": {
            "description": "Invalid Request",
            "$ref": "#/components/responses/InvalidError"
          },
          "401": {
            "description": "Unauthorized Error",
            "$ref": "#/components/responses/UnauthorizedError"
          },
          "500": {
            "description": "Internal Server Error",
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-codegen-request-body-name": "body"
      }
    },
    "/api/v1/err/shipments/importUrl": {
      "post": {
        "tags": [
          "Batch Shipment"
        ],
        "summary": "Bulk Import Shipments ERR",
        "description": "This operation imports the .CSV file which includes fields required for creating ERR (Electronic Return Receipt) Bulk Shipments. \n  The payload, which is used for shipment transactions, contains the following essential information in .CSV file:\n  - Carrier Account\n  - Output format: Shipping Label and Coversheet \n  - Services, and\n  - Special Services \n\n  The above-mentioned information are stored in AWS-S3 which in turn provides URL to users. When Batch is submitted, S3 returned URL along with .CSV file are uploaded, which generates BatchID. \n  The same BatchID is used to track the status of BulkImport.\n",
        "operationId": "BulkImportAPIERR",
        "parameters": [
          {
            "name": "X-PB-Developer-Partner-ID",
            "in": "header",
            "description": "The PB-Developer-Partner-ID is assigned by PB to uniquely identify a developer's strategic business partners. If the developer is the sole business partner, this field is not required.",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": " This is the request body to import ERR Bulk shipments.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateBatchRequestERR"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": " ERR Bulk Shipment has been successfully imported.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ShipmentBatchResponseERR"
                }
              }
            }
          },
          "400": {
            "description": "Invalid Request",
            "$ref": "#/components/responses/InvalidError"
          },
          "401": {
            "description": "Unauthorized Error",
            "$ref": "#/components/responses/UnauthorizedError"
          },
          "500": {
            "description": "Internal Server Error",
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-codegen-request-body-name": "body"
      }
    },
    "/api/v1/shipments/batch/{batchId}/process": {
      "post": {
        "tags": [
          "Batch Shipment"
        ],
        "summary": "Process Batch",
        "description": "This operation processes (executes) the existing Batch. The payload for this endpoint needs only an empty JSON object and no additional data is required in the request body. The BatchID parameter located in the endpoint specifies which batch of shipments to process.",
        "operationId": "ProcessBatchAPI",
        "parameters": [
          {
            "name": "X-PB-Developer-Partner-ID",
            "description": "The Developer-Partner-ID is assigned by PB to uniquely identify a Developer's strategic business partners. If the developer is the sole business partner, this field is not required.",
            "required": false,
            "in": "header",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "batchId",
            "description": "This is a system-generated unique identifier assigned to the Batch while it is processed.",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The Batch has been processed successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProcessShipmentResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid Request",
            "$ref": "#/components/responses/InvalidError"
          },
          "401": {
            "description": "Unauthorized Error",
            "$ref": "#/components/responses/UnauthorizedError"
          },
          "404": {
            "description": "Not Found Error",
            "$ref": "#/components/responses/NotFoundError"
          },
          "500": {
            "description": "Internal Server Error",
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "x-codegen-request-body-name": "body"
      }
    },
    "/api/v1/shipments/batch/{batchId}/void": {
      "post": {
        "tags": [
          "Batch Shipment"
        ],
        "summary": "Void Batch Shipping Labels",
        "description": "This operation cancels (voids) shipments which are created using the Batch API operation `createBulkShipments`. <br />\nIf user wants to cancel specific shipment(s) of the Batch, then s/he needs to pass the *Shipment ID* for the selected shipments in the `shipmentIDs` array. \nWhile if user wants to cancel all shipments of the Batch, then s/he does not need to provide any *Shipment ID* in the array under request body.\n\n**Key Considerations**\n- Cancelation must occur before the shipment is picked up or processed by the carrier.\n- Refunds are only applicable for unused labels. Voiding a used label may result in penalties or billing.\n- Refunds are subject to the policies of the applicable carrier.  \n- Refund requests must be submitted within 30 days from the date the label was printed.  \n- USPS may take up to 30 days to process the refund.  \n- The refund status can be tracked on the History page.  \n- Approved refunds will be credited back to the USPS postage balance.  \n- The label status will change to `Refunded` once the refund is processed.  \n- For unused post-paid labels, you must void them. Voiding avoids billing for the label and allows the carrier to maintain an accurate count for pickups.  \n- Always destroy voided labels to prevent accidental use. If a voided label is shipped, you will be billed for the label.  \n- Once a refund has been claimed, you cannot use the shipping label for sending packages. It will be rejected.  \n- Submitting false or fraudulent refund claims is a federal offense, punishable by fines or imprisonment.\n",
        "operationId": "voidShippingLabel",
        "parameters": [
          {
            "name": "X-PB-Developer-Partner-ID",
            "in": "header",
            "description": "The Developer-Partner-ID is assigned by PB to uniquely identify a Developer's strategic business partners. If the developer is the sole business partner, this field is not required.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "batchId",
            "in": "path",
            "description": "This is a system-generated unique identifier assigned to the Batch while it is processed.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": " This is the request body for cancelling the selected shipments or entire Batch of shipments*.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VoidBatchRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The indicated shipment(s) of Batch have been successfully cancelled.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VoidBatchResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid Request",
            "$ref": "#/components/responses/InvalidError"
          },
          "401": {
            "description": "Unauthorized Error",
            "$ref": "#/components/responses/UnauthorizedError"
          },
          "404": {
            "description": "Not Found Error",
            "$ref": "#/components/responses/NotFoundError"
          },
          "500": {
            "description": "Internal Server Error",
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/v1/shipments/batch/{batchId}/status": {
      "get": {
        "tags": [
          "Batch Shipment"
        ],
        "summary": "Get Batch Status",
        "description": "This operation retrieves the status of an existing Batch using *Batch ID*. Once the Job status is completed, the URL received from Response can be used to download the shipping label in PDF format.",
        "operationId": "GetBatchStatusAPI",
        "parameters": [
          {
            "name": "X-PB-Developer-Partner-ID",
            "in": "header",
            "description": "The Developer-Partner- ID is assigned by PB to uniquely identify a Developer's strategic business partners. If the developer is the sole business partner, this field is not required.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "batchId",
            "in": "path",
            "description": "This is a system-generated unique identifier assigned to the Batch while it is processed.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Here, is the status of the Batch ID.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetStatusDetailedResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid Request",
            "$ref": "#/components/responses/InvalidError"
          },
          "401": {
            "description": "Unauthorized Error",
            "$ref": "#/components/responses/UnauthorizedError"
          },
          "404": {
            "description": "Not Found Error",
            "$ref": "#/components/responses/NotFoundError"
          },
          "500": {
            "description": "Internal Server Error",
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/v1/shipments/batch/{batchId}/shipments": {
      "get": {
        "tags": [
          "Batch Shipment"
        ],
        "summary": "Get Batch Shipment Details",
        "description": "\"This API operation provides the shipment details for those shipments which are SUCCESS or FAILED during batch processing at the following levels:\n- addressValidation\n- rating\n- labelGeneration, and\n- voidLabel\n\nBased on fields/data mentioned in Query Parameter, user can check shipment details for particular status at any levels. <br />\nIf no values are provided in the fields mentioned in Query Parameter, the default for each will be:\n- Page: 1 \n- Size: 20\n- Status: SUCCESS/FAILED.\n",
        "operationId": "getShipmentDetailsForBatchAPI",
        "parameters": [
          {
            "name": "X-PB-Developer-Partner-ID",
            "in": "header",
            "description": "The Developer-Partner- ID is assigned by PB to uniquely identify a Developer's strategic business partners. If the developer is the sole business partner, this field is not required.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "batchId",
            "in": "path",
            "description": "This is a system-generated unique identifier assigned to the Batch while it is processed",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "description": "It returns detailed information for shipments status and it can cover in one or more pages. The default value for page number is 1.",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "size",
            "in": "query",
            "description": "Indicates the number of records per page. The default value for records is 20.",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "status",
            "in": "query",
            "description": "The status of the shipment. Values can be Failed or Success.",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "SUCCESS",
                "FAILED"
              ]
            }
          },
          {
            "name": "step",
            "in": "query",
            "description": "Indicates various stages of the batch processing.",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "rating",
                "addressValidation",
                "labelGeneration",
                "voidLabel"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Detailed status of processed shipments for the batch.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/getShipmentsForBatch"
                }
              }
            }
          },
          "400": {
            "description": "Invalid Request",
            "$ref": "#/components/responses/InvalidError"
          },
          "401": {
            "description": "Unauthorized Error",
            "$ref": "#/components/responses/UnauthorizedError"
          },
          "404": {
            "description": "Not Found Error",
            "$ref": "#/components/responses/NotFoundError"
          },
          "500": {
            "description": "Internal Server Error",
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "CreateBulkShipments": {
        "type": "object",
        "required": [
          "size",
          "type",
          "name",
          "carrierAccountId",
          "parcelType",
          "serviceId",
          "shipments"
        ],
        "properties": {
          "name": {
            "type": "string",
            "description": "Name of the of Batch which consists of multiple shipments (shipments in bulk) for Label printing, e.g. Bulk07.",
            "example": "Bulk07",
            "x-go-name": "Name"
          },
          "groupName": {
            "type": "string",
            "description": "Indicates the name of the group of batches, which consists of multiple Batch groups.",
            "example": "Shipping-021",
            "x-go-name": "groupName"
          },
          "size": {
            "type": "string",
            "enum": [
              "DOC_8X11",
              "DOC_4X6"
            ],
            "description": "This indicates the label size of the Bulk Shipment when it gets printed,i.e., DocSize. This has two options 8' X 11' or 4' X 6'.",
            "example": "DOC_8X11"
          },
          "type": {
            "type": "string",
            "description": "Indicates the type of the Batch Shipment, e.g., Shipping Label.",
            "example": "SHIPPING_LABEL",
            "enum": [
              "SHIPPING_LABEL"
            ]
          },
          "format": {
            "type": "string",
            "description": "Defines the type of the shipment, which is printed, e.g., Shipping label gets printed in PDF form.",
            "example": "PDF",
            "enum": [
              "PDF"
            ]
          },
          "carrierAccountId": {
            "type": "string",
            "description": "A unique identifier associated with the Carrier account used by client users during shipment process. Default CarrierAccountID for this batch will be user's registered carrier account. User can override this value by defining it at shipment level.",
            "x-go-name": "carrierAccountId",
            "example": "abcd123"
          },
          "serviceId": {
            "type": "string",
            "description": "A unique identifier given to the carrier-specific service, which varies as per carrier selection. User can override this value by defining it at Shipment level.",
            "x-go-name": "serviceId",
            "example": "LIB"
          },
          "parcelType": {
            "type": "string",
            "description": "Parcel Type is required for creating a shipment while rating a parcel, which varies as per Carrier selection and selected services. Different carriers have different Services and associated ParcelTypes, e.g., FRPKG, LGENV, TUBE, and PKG.<br /> User can override this value by defining it at Shipment level.",
            "x-go-name": "ParcelType",
            "example": "LP"
          },
          "parcelID": {
            "type": "string",
            "description": "A unique identifier given to the parcel or package corresponding to the selected service. This is optional field, but is used in few cases. User can override this value by defining it at Shipment level.",
            "x-go-name": "parcelID",
            "example": "PMB4"
          },
          "specialServices": {
            "type": "array",
            "description": "It provides a carrier based special or extra service, which also varies as per selected service and parcel type. User can override this value by defining it at shipment level.",
            "items": {
              "$ref": "#/components/schemas/SpecialService"
            },
            "x-go-name": "SpecialServices"
          },
          "shipments": {
            "type": "array",
            "items": {
              "type": "object",
              "allOf": [
                {
                  "$ref": "#/components/schemas/Shipment"
                },
                {
                  "type": "object",
                  "properties": {
                    "additionalAddresses": {
                      "$ref": "#/components/schemas/additionalAddresses"
                    }
                  }
                },
                {
                  "type": "object",
                  "properties": {
                    "altReturnAddress": {
                      "type": "object",
                      "description": "This is an optional field. if a package shipped from Location_A to Location_B needs to return to Location_C. The alternate address will be printed on the label. Use this object to specify a return address different from the fromAddress. Supported by FedEx, UPS, and Purolator.",
                      "properties": {
                        "addressLine1": {
                          "type": "string",
                          "description": "The first line of the alternate return address, such as a street address or PO Box.",
                          "example": "27 Waterview Dr"
                        },
                        "addressLine2": {
                          "type": "string",
                          "description": "The addressLine2 contains Street address or Landmark (if any).",
                          "example": "near abc street"
                        },
                        "addressLine3": {
                          "type": "string",
                          "description": "The addressLine3 contains P.O. Box (if any) near the address.",
                          "example": "near xyz street"
                        },
                        "company": {
                          "type": "string",
                          "description": "The name of the company for the alternate return address, in case if the recipient's address is not residential. <br /> `Max length = 30`.",
                          "example": "PB"
                        },
                        "email": {
                          "type": "string",
                          "description": "The email address of the recipient. It can be person's email address or company email address (for non-residential).",
                          "example": "user@email.com"
                        },
                        "residential": {
                          "type": "boolean",
                          "description": "The specified address can be Residential or Official. In case if the address is Residential, the boolean value will be 'true', else it will take 'false'.",
                          "example": true
                        },
                        "cityTown": {
                          "type": "string",
                          "description": "The city or town for the alternate return address.",
                          "example": "Shelton"
                        },
                        "countryCode": {
                          "type": "string",
                          "description": "The country in which the address is located. Use ISO 3166-1 Alpha-2 standard values. For best results this should be included, especially if the country name does not appear in any of the unparsedAddressLines.",
                          "example": "US"
                        },
                        "name": {
                          "type": "string",
                          "description": "The name of the recipient or organization for the alternate return address.",
                          "example": "User Name"
                        },
                        "phone": {
                          "type": "string",
                          "description": "The phone number associated with the alternate return address.",
                          "example": "203-555-1213"
                        },
                        "postalCode": {
                          "type": "string",
                          "description": "The postal or ZIP code for the alternate return address.",
                          "example": "06484"
                        },
                        "stateProvince": {
                          "type": "string",
                          "description": "The 2-letter state or province code for the alternate return address.",
                          "example": "CT"
                        }
                      }
                    }
                  }
                }
              ]
            },
            "x-go-name": "Shipments"
          }
        },
        "description": "This ShipmentBatch contains the schema information.",
        "x-go-package": "batch-apis"
      },
      "CreateBulkShipmentsERRLabel": {
        "type": "object",
        "required": [
          "size",
          "type",
          "name",
          "carrierAccountId",
          "parcelType",
          "serviceId",
          "shipments"
        ],
        "properties": {
          "name": {
            "type": "string",
            "description": "Name of the of ERR Batch which consists of multiple shipments (shipments in bulk) for Label printing, e.g. ERR-Bulk05.",
            "example": "ERR-Bulk05",
            "x-go-name": "Name"
          },
          "groupName": {
            "type": "string",
            "description": "Indicates the name of the group of batches, which consists of multiple Batch groups.",
            "x-go-name": "groupName"
          },
          "size": {
            "type": "string",
            "enum": [
              "DOC_8X11",
              "DOC_4X6"
            ],
            "description": "This indicates the label size of the Bulk Shipment when it gets printed,i.e., DocSize. This has two options 8' X 11' or 4' X 6'.",
            "example": "DOC_8X11"
          },
          "type": {
            "type": "string",
            "description": "Indicates the type of the Batch Shipment, e.g., Shipping Label.",
            "example": "SHIPPING_LABEL",
            "enum": [
              "SHIPPING_LABEL"
            ]
          },
          "format": {
            "type": "string",
            "description": "Defines the type of the shipment which is printed, e.g., Shipping label gets printed in PDF form.",
            "example": "PDF",
            "enum": [
              "PDF"
            ]
          },
          "carrierAccountId": {
            "type": "string",
            "description": "A unique identifier associated with the Carrier account used by client users during shipment process. Default CarrierAccountID for this batch will be user's registered USPS account. User can override this value by defining it at Shipment level.",
            "x-go-name": "carrierAccountId",
            "example": "qnpB1VkRMmw"
          },
          "serviceId": {
            "type": "string",
            "description": "A unique identifier given to the carrier-specific service. User can override this value by defining it at Shipment level.",
            "x-go-name": "serviceId",
            "example": "PM"
          },
          "parcelType": {
            "type": "string",
            "description": "Parcel Type is required for creating a shipment while rating a parcel. And it varies as per USPS selected services, e.g. FRPKG, LGENV, TUBE, and PKG. User can override this value by defining it at Shipment level.",
            "x-go-name": "ParcelType",
            "example": "PKG"
          },
          "parcelID": {
            "type": "string",
            "description": "A unique identifier given to the parcel or package corresponding to the selected service. This is optional field, but is used in few cases. Examples include BLM10, B1095, MT1098, etc. User can override this value by defining it at Shipment level.",
            "x-go-name": "parcelID",
            "example": "PMB4"
          },
          "specialServices": {
            "$ref": "#/components/schemas/SpecialServiceERR",
            "x-go-name": "SpecialServices"
          },
          "shipments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ShipmentERR"
            },
            "x-go-name": "Shipments"
          }
        },
        "description": "This ShipmentBatch contains the schema information for ERR Label.",
        "x-go-package": "batch-apis"
      },
      "CreateBulkShipmentsERRCoversheet": {
        "type": "object",
        "required": [
          "size",
          "type",
          "name",
          "carrierAccountId",
          "parcelType",
          "serviceId",
          "shipments"
        ],
        "properties": {
          "name": {
            "type": "string",
            "description": "Name of the of ERR Batch which consists of multiple shipments (shipments in bulk) for Coversheet printing., e.g. ERR-Coversheet07.",
            "example": "ERR-Coversheet07",
            "x-go-name": "Name"
          },
          "groupName": {
            "type": "string",
            "description": "Indicates the name of the group of batches, which consists of multiple Batch groups.",
            "x-go-name": "groupName"
          },
          "size": {
            "type": "string",
            "enum": [
              "10",
              "6 X 9",
              "6 X 9.5",
              "9.5 X 12"
            ],
            "description": "This indicates the envelope size of the ERR Bulk Shipment, i.e., DocSize. We have indicated the example values in enum.",
            "example": "10"
          },
          "type": {
            "type": "string",
            "description": "This indicates the type of the ERR Batch Shipment, e.g., Coversheet.",
            "example": "COVERSHEET",
            "enum": [
              "COVERSHEET"
            ]
          },
          "format": {
            "type": "string",
            "description": "This defines the format type of the shipment which is printed. For example Coversheet prints in PDF form.",
            "example": "PDF",
            "enum": [
              "PDF"
            ]
          },
          "carrierAccountId": {
            "type": "string",
            "description": "The unique identifier associated with the user's registered USPS Account which will be required for this batch. User can override this value by defining it at Shipment level.",
            "x-go-name": "carrierAccountId",
            "example": "qnpB1VkRMmw"
          },
          "parcelType": {
            "type": "string",
            "description": "Parcel Type is required for creating a shipment while rating a parcel. And it varies as per USPS selected services, e.g. LTR, LGENV. User can override this value by defining it at shipment level.",
            "x-go-name": "ParcelType",
            "example": "LTR"
          },
          "serviceId": {
            "type": "string",
            "description": "A unique identifier given  to the carrier-specific service which is used for this BulkShipment. User can override this value by defining it at shipment level.",
            "x-go-name": "serviceId",
            "example": "FCM"
          },
          "specialServices": {
            "$ref": "#/components/schemas/SpecialServiceERR",
            "x-go-name": "SpecialServices"
          },
          "shipments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ShipmentERRCoversheet"
            },
            "x-go-name": "Shipments"
          }
        },
        "description": "This ShipmentBatch contains the schema information for ERR Coversheet.",
        "x-go-package": "batch-apis"
      },
      "CreateBulkShipmentInternational": {
        "type": "object",
        "required": [
          "size",
          "type",
          "name",
          "carrierAccountId",
          "parcelType",
          "serviceId",
          "shipments"
        ],
        "properties": {
          "name": {
            "type": "string",
            "description": "Name of the of Batch which consists of multiple shipments (shipments in bulk) for Label printing, e.g. Bulk-Intl-57.",
            "example": "Bulk-Intl-57",
            "x-go-name": "Name"
          },
          "groupName": {
            "type": "string",
            "description": "Indicates the name of the group of batches, which consists of multiple Batch groups.",
            "example": "Intl-Shipping-021",
            "x-go-name": "groupName"
          },
          "size": {
            "type": "string",
            "enum": [
              "DOC_8X11"
            ],
            "description": "This indicates the label size of the Bulk International Shipment when it gets printed, i.e., DocSize. It supports only 8' X 11'.",
            "example": "DOC_8X11"
          },
          "type": {
            "type": "string",
            "description": "This indicates the type of the Batch Shipment, e.g., Shipping Label.",
            "example": "SHIPPING_LABEL",
            "enum": [
              "SHIPPING_LABEL"
            ]
          },
          "format": {
            "type": "string",
            "description": "This defines the type of the shipment which is printed, e.g., Shipping label gets printed in PDF form.",
            "example": "PDF",
            "enum": [
              "PDF"
            ]
          },
          "carrierAccountId": {
            "type": "string",
            "description": "A unique identifier associated with the Carrier account used by client users during shipment process. Default CarrierAccountID for this batch will be user's registered carrier account. User can override this value by defining it at shipment level.",
            "x-go-name": "carrierAccountId",
            "example": "abcd123"
          },
          "serviceId": {
            "type": "string",
            "description": "A unique identifier given to the carrier-specific service, which varies as per carrier selection. User can override this value by defining it at Shipment level.",
            "x-go-name": "serviceId",
            "example": "PMI"
          },
          "parcelType": {
            "type": "string",
            "description": "Parcel Type is required for creating a shipment while rating a parcel, which varies as per Carrier selection and selected services. Different carriers have different Services and associated ParcelTypes, e.g., FRPKG, LGENV, TUBE, and PKG.<br /> User can override this value by defining it at Shipment level.",
            "x-go-name": "ParcelType",
            "example": "PKG"
          },
          "parcelID": {
            "type": "string",
            "description": "A unique identifier given to the parcel or package corresponding to the selected service. This is optional field, but is used in few cases. User can override this value by defining it at Shipment level.",
            "x-go-name": "parcelID",
            "example": "PMB4"
          },
          "specialServices": {
            "type": "array",
            "description": "It provides a carrier based special or extra service, which also varies as per selected service and parcel type. User can override this value by defining it at shipment level.",
            "items": {
              "$ref": "#/components/schemas/SpecialService"
            },
            "x-go-name": "SpecialServices"
          },
          "shipments": {
            "type": "array",
            "items": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/ShipmentInternational"
                },
                {
                  "type": "object",
                  "properties": {
                    "additionalAddresses": {
                      "$ref": "#/components/schemas/additionalAddresses"
                    }
                  }
                },
                {
                  "type": "object",
                  "properties": {
                    "altReturnAddress": {
                      "type": "object",
                      "description": "This is an optional field. if a package shipped from Location_A to Location_B needs to return to Location_C. The alternate address will be printed on the label. Use this object to specify a return address different from the fromAddress. Supported by FedEx, UPS, and Purolator.",
                      "properties": {
                        "addressLine1": {
                          "type": "string",
                          "description": "The first line of the alternate return address, such as a street address or PO Box.",
                          "example": "27 Waterview Dr"
                        },
                        "addressLine2": {
                          "type": "string",
                          "description": "The addressLine2 contains Street address or Landmark (if any).",
                          "example": "near abc street"
                        },
                        "addressLine3": {
                          "type": "string",
                          "description": "The addressLine3 contains P.O. Box (if any) near the address.",
                          "example": "near xyz street"
                        },
                        "company": {
                          "type": "string",
                          "description": "The name of the company for the alternate return address, in case if the recipient's address is not residential. <br /> `Max length = 30`.",
                          "example": "PB"
                        },
                        "email": {
                          "type": "string",
                          "description": "The email address of the recipient. It can be person's email address or company email address (for non-residential).",
                          "example": "user@email.com"
                        },
                        "residential": {
                          "type": "boolean",
                          "description": "The specified address can be Residential or Official. In case if the address is Residential, the boolean value will be 'true', else it will take 'false'.",
                          "example": true
                        },
                        "cityTown": {
                          "type": "string",
                          "description": "The city or town for the alternate return address.",
                          "example": "Shelton"
                        },
                        "countryCode": {
                          "type": "string",
                          "description": "\tThe country in which the address is located. Use ISO 3166-1 Alpha-2 standard values. For best results this should be included, especially if the country name does not appear in any of the unparsedAddressLines.",
                          "example": "US"
                        },
                        "name": {
                          "type": "string",
                          "description": "The name of the recipient or organization for the alternate return address.",
                          "example": "User Name"
                        },
                        "phone": {
                          "type": "string",
                          "description": "The phone number associated with the alternate return address.",
                          "example": "203-555-1213"
                        },
                        "postalCode": {
                          "type": "string",
                          "description": "The postal or ZIP code for the alternate return address.",
                          "example": "06484"
                        },
                        "stateProvince": {
                          "type": "string",
                          "description": "The 2-letter state or province code for the alternate return address.",
                          "example": "CT"
                        }
                      }
                    }
                  }
                }
              ]
            },
            "x-go-name": "Shipments"
          }
        },
        "description": "The International ShipmentBatch contains the required schema information like `BatchId`, `Carrier`, `Addresses`, `Tracking details`, and `Event information` of the Ship Request.",
        "x-go-package": "batch-apis"
      },
      "SpecialService": {
        "required": [
          "specialserviceId"
        ],
        "type": "object",
        "description": "It provides a carrier based special or extra service.",
        "properties": {
          "inputParameters": {
            "type": "array",
            "description": ">- These parameters are required to set for the special service, such as an Insurance value or a Receipt-number format. This is applicable only when Special Service requires input parameters. If a Special Service does not require input parameters, user can pass an empty array.",
            "items": {
              "$ref": "#/components/schemas/Parameter"
            },
            "x-go-name": "InputParameters"
          },
          "specialserviceId": {
            "type": "string",
            "example": "Ins",
            "description": "A unique identifier associated with the Special Service, will be mentioned in this column. If user selects additional service, will be entered here.",
            "x-go-name": "SpecialserviceId"
          }
        },
        "x-go-package": "batch-apis"
      },
      "SpecialServiceERR": {
        "required": [
          "specialserviceId"
        ],
        "type": "array",
        "items": {
          "properties": {
            "specialserviceId": {
              "type": "string",
              "description": "A unique identifier associated with the Special Service, will be mentioned in this column. If user selects additional service will be entered here.",
              "enum": [
                "ERR",
                "Cert",
                "CertRD"
              ],
              "x-go-name": "SpecialserviceId"
            }
          }
        },
        "example": [
          {
            "specialServiceID": "ERR"
          },
          {
            "specialServiceID": "Cert"
          },
          {
            "specialServiceID": "CertRD"
          }
        ],
        "x-go-package": "batch-apis"
      },
      "Parameter": {
        "required": [
          "name",
          "value"
        ],
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "example": "INPUT_VALUE",
            "description": "The name of the parameter which is passed for Special Service.",
            "x-go-name": "Name"
          },
          "value": {
            "type": "string",
            "example": "100",
            "description": ">- Parameter value is as per the carrier specifications. This can be blank if the parameter is sufficient and no value is associated.",
            "x-go-name": "Value"
          }
        },
        "x-go-package": "batch-apis"
      },
      "ShipmentInternational": {
        "type": "object",
        "required": [
          "fromAddress",
          "toAddress",
          "parcel",
          "customs"
        ],
        "properties": {
          "fromAddress": {
            "type": "object",
            "required": [
              "name",
              "addressLine1",
              "cityTown",
              "stateProvince",
              "postalCode",
              "countryCode"
            ],
            "properties": {
              "addressLine1": {
                "type": "string",
                "description": "The addressLine1 can contain the Flat number, Building or Apartment Name/number (if any) or company name (if not residential).",
                "example": "27 Waterview Dr"
              },
              "addressLine2": {
                "type": "string",
                "description": "The addressLine2 contains Street address or Landmark (if any).",
                "example": "near abc street"
              },
              "addressLine3": {
                "type": "string",
                "description": "The addressLine3 contains P.O. Box (if any) near the address.",
                "example": "near xyz street"
              },
              "cityTown": {
                "type": "string",
                "description": "The name of the city or town to where the address belongs.",
                "example": "Stamford"
              },
              "countryCode": {
                "type": "string",
                "description": "The two-character ISO Code of the source country from this ISO country list.  The country in which the address is located. Use ISO 3166-1 Alpha-2 standard values. For best results this should be included, especially if the country name does not appear in any of the unparsedAddressLines.",
                "example": "US"
              },
              "name": {
                "type": "string",
                "description": "Name of the sender to which this address points.",
                "example": "Paul Wright"
              },
              "company": {
                "type": "string",
                "description": "The name of the company, in case if the sender address is not residential. ",
                "example": "PB"
              },
              "email": {
                "type": "string",
                "description": "This must be sender's valid email. Email is required if the customer is using GoFor Carrier. ",
                "example": "testuser@gmail.com"
              },
              "phone": {
                "type": "string",
                "description": "This is sender's phone number. Enter the digits with or without spaces or hyphens. The maximum limit of characters for Phone number is 10 digits. ",
                "example": "203-555-1213"
              },
              "postalCode": {
                "type": "string",
                "description": "The Postal Code or ZIP Code of the address. For US addresses, use either the 5-digit or 9-digit ZIP Code in one of the following formats: '12345' or '12345-6789'. If you use a different format, such as 12345- or 123451234, will receive an error.",
                "example": "06905"
              },
              "inductionPostalCode": {
                "type": "string",
                "description": "The postal code where the shipment is tendered to the carrier. If an induction postal code is specified in the \"fromAddress\", it will be used for rate calculations and determining manifest eligibility instead of the standard postal code. If not specified, the postal code from the \"fromAddress\" will be used. IPC supported only for carrier USPS.",
                "example": "06905"
              },
              "stateProvince": {
                "type": "string",
                "description": "The State or Province of the address. For a US or Canadian address, it is the 2-letter state or province code. ",
                "example": "CT"
              },
              "residential": {
                "type": "boolean",
                "description": "The specified address can be Residential or Official. In case if the address is Residential, the boolean value will be 'true', else it will take 'false'.",
                "example": true
              },
              "taxId": {
                "type": "string",
                "description": "The Tax Identification Number (TIN). TIN Number is supported for FedEx as of now.<br /> `Max character length = 18`.\n- `EIN`, `VAT`, `GST`, and `IOSS` are mapped to `BUSINESS_NATIONAL`.\n- `EORI` is mapped to `BUSINESS_UNION`.\n- `RFC` with a length of 12 characters is mapped to `BUSINESS_NATIONAL`.\n- `RFC` with a length of 13 characters is mapped to `PERSONAL_NATIONAL`.\n"
              },
              "taxIdType": {
                "type": "string",
                "description": "Specifies the type of tax identification being provided.",
                "enum": [
                  "EIN",
                  "GST",
                  "VAT",
                  "IOSS",
                  "RFC",
                  "EORI"
                ]
              }
            }
          },
          "toAddress": {
            "type": "object",
            "required": [
              "name",
              "addressLine1",
              "cityTown",
              "stateProvince",
              "postalCode",
              "countryCode"
            ],
            "properties": {
              "addressLine1": {
                "type": "string",
                "description": "The addressLine1 can contain the Flat number, Building or Apartment Name/number (if any) or company name (if not residential).",
                "example": "70 Hanlan RD"
              },
              "addressLine2": {
                "type": "string",
                "description": "The addressLine2 contains Street address or Landmark (if any).",
                "example": "near abc street"
              },
              "addressLine3": {
                "type": "string",
                "description": "The addressLine3 contains P.O. Box (if any) near the address.",
                "example": "near xyz street"
              },
              "cityTown": {
                "type": "string",
                "description": "The name of the city or town to where the address belongs.",
                "example": "Woodbridge"
              },
              "countryCode": {
                "type": "string",
                "description": "The two-character ISO Code of the destination country from this ISO country list.  The country in which the address is located. Use ISO 3166-1 Alpha-2 standard values. For best results this should be included, especially if the country name does not appear in any of the unparsedAddressLines.",
                "example": "CA"
              },
              "name": {
                "type": "string",
                "description": "Name of the recipient to which this address points.",
                "example": "Paul Wright"
              },
              "phone": {
                "type": "string",
                "description": "This is recipient's phone number. Enter the digits with or without spaces or hyphens. The maximum limit of characters for Phone number is 10 digits. ",
                "example": "203-555-1213"
              },
              "company": {
                "type": "string",
                "description": "The name of the company, in case if the receiver address is not residential.",
                "example": "PB"
              },
              "email": {
                "type": "string",
                "description": "This must be receivers's valid email. Email is required if the customer is using GoFor Carrier.",
                "example": "testuser@gmail.com"
              },
              "postalCode": {
                "type": "string",
                "description": "The Postal Code or ZIP Code of the address. For US addresses, use either the 5-digit or 9-digit ZIP Code in one of the following formats: '12345' or '12345-6789'. If you use a different format, such as 12345- or 123451234, will receive an error.",
                "example": "L4L3P6"
              },
              "stateProvince": {
                "type": "string",
                "description": "The State or Province of the address. For a US or Canadian address, it is the 2-letter state or province code. ",
                "example": "ON"
              },
              "residential": {
                "type": "boolean",
                "description": "The specified address can be Residential or Official. In case if the address is Residential, the boolean value will be 'true', else it will take 'false'.",
                "example": true
              },
              "taxId": {
                "type": "string",
                "description": "The Tax Identification Number (TIN). TIN Number is supported for FedEx as of now.<br /> `Max character length = 18`. \n- `EIN`, `VAT`, `GST`, and `IOSS` are mapped to `BUSINESS_NATIONAL`.\n- `EORI` is mapped to `BUSINESS_UNION`.\n- `RFC` with a length of 12 characters is mapped to `BUSINESS_NATIONAL`.\n- `RFC` with a length of 13 characters is mapped to `PERSONAL_NATIONAL`.\n"
              },
              "taxIdType": {
                "type": "string",
                "description": "Specifies the type of tax identification being provided.",
                "enum": [
                  "EIN",
                  "GST",
                  "VAT",
                  "IOSS",
                  "RFC",
                  "EORI"
                ]
              }
            }
          },
          "parcel": {
            "$ref": "#/components/schemas/parcel"
          },
          "carrierAccountId": {
            "type": "string",
            "example": "asas2223",
            "description": "A unique identifier associated with the Carrier account used by client users during shipment process.",
            "x-go-name": "carrierAccountId"
          },
          "parcelType": {
            "type": "string",
            "example": "PKG",
            "description": ">-Packaging type varies as per selected carrier and its services, e.g., FRPKG, LGENV, TUBE,PKG.",
            "x-go-name": "ParcelType"
          },
          "serviceId": {
            "type": "string",
            "example": "PMI",
            "description": ">-The unique identifier given to the carrier-specific service.",
            "x-go-name": "serviceId"
          },
          "dateOfShipment": {
            "type": "string",
            "description": "Indicates the date when shipment is created. The format must be YYY:MM:DD.",
            "example": "2023-04-03"
          },
          "specialServices": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SpecialService"
            },
            "x-go-name": "SpecialServices"
          },
          "shipmentOptions": {
            "allOf": [
              {
                "$ref": "#/components/schemas/shipmentOptions"
              },
              {
                "type": "object",
                "properties": {
                  "bookingConfirmationNumber": {
                    "type": "string",
                    "minLength": 5,
                    "maxLength": 12,
                    "example": "XXXX56789812",
                    "description": "This is an advanced booking number required for FedEx Express Freight shipments. It must be obtained through the appropriate channel in the shipment's origin country. Without a valid booking confirmation number, pickup and space allocation for the shipment are not guaranteed. The booking number must be between 5 and 12 digits.\n"
                  }
                }
              }
            ]
          },
          "metadata": {
            "type": "array",
            "description": "Additional metadata that needs to be stored for this shipment can be added here. For now, `costAccountName` is supported.",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string",
                  "description": "The key of metadata is CostAccount. User needs to enter the name of the CostAccount.",
                  "example": "PB-SHLTN-CostAccount"
                },
                "value": {
                  "type": "string",
                  "description": "User needs to enter the Cost Account Code.",
                  "example": "CostAccount-00PBSHLTN"
                }
              }
            }
          },
          "customs": {
            "type": "object",
            "required": [
              "customsInfo",
              "customsItemsShipment"
            ],
            "properties": {
              "customsItems": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "description",
                    "quantity",
                    "unitPrice",
                    "unitWeight"
                  ],
                  "properties": {
                    "description": {
                      "type": "string",
                      "description": "A detailed description of the commodity, up to 255 characters. The description will appear on the Customs Form. If the shipment has multiple items, user needs to create a separate customsItems object for each. Required details will appear on the Form.",
                      "example": "Books"
                    },
                    "hSTariffCode": {
                      "type": "string",
                      "description": "The destination country’s tariff-classification number (HS code) for the commodity. Most countries use the six-digit Harmonized System (HS) as the basis for their tariff classifications and then add digits for more detail. <br /> The HS code will appear on the Customs Form. If the shipment has multiple items, user needs to create a separate customsItems object for each. <br /> `Max length = 40`",
                      "example": "AST559"
                    },
                    "originCountryCode": {
                      "type": "string",
                      "description": "The country in which the sender's address is located. The value will be the two-character ISO Code of the country from the ISO country list. <br /> Use ISO 3166-1 Alpha-2 standard values. For best results this should be included, especially if the country name does not appear in any of the unparsedAddressLines. <br /> Below is the hyperlink, please select `Country codes` and then click `SEARCH` button.",
                      "externalDocs": {
                        "url": "https://www.iso.org/obp/ui/#search",
                        "description": "List of Countries with their ISO Codes"
                      },
                      "example": "US"
                    },
                    "quantity": {
                      "type": "number",
                      "description": "Enter the total count/number of items/commodities.",
                      "example": 1
                    },
                    "unitPrice": {
                      "type": "number",
                      "description": "The price of one item of this type of commodity.",
                      "example": 3000
                    },
                    "weightUnit": {
                      "type": "string",
                      "enum": [
                        "OZ"
                      ],
                      "description": "The unit of measurement. This field is required by the unitWeight object."
                    },
                    "weight": {
                      "type": "number",
                      "description": "The weight of the item.",
                      "example": 0.1
                    }
                  }
                }
              },
              "customsInfo": {
                "type": "object",
                "description": "This is additional customs information required along with item details.",
                "required": [
                  "reasonForExport",
                  "customsDeclaredValue",
                  "currencyCode"
                ],
                "properties": {
                  "reasonForExport": {
                    "type": "string",
                    "enum": [
                      "GIFT",
                      "COMMERCIAL_SAMPLE",
                      "MERCHANDISE",
                      "DOCUMENTS",
                      "RETURNED_GOODS",
                      "OTHER"
                    ],
                    "description": "The reason why the commodity is being exported. Valid values have been defined in enums."
                  },
                  "customsDeclaredValue": {
                    "description": "Item value is mentioned in currencyCode.",
                    "type": "number"
                  },
                  "currencyCode": {
                    "description": "The currency used for declared value. Use three uppercase letters, per ISO 4217.",
                    "example": "USD",
                    "type": "string"
                  },
                  "EELPFC": {
                    "type": "string",
                    "example": "NOEEI 30.2D2",
                    "description": "A number provided by the Automated Export System (AES). <br/> Required if the item is more than $2,500 USD, per Schedule B export codes. <br/> Required if EELPFC  is AES ITN.\n- AES ITN is a unique transaction number generated by the Automated Export System (AES) when export data is filed for international shipments from the U.S.\n- The ITN format is AES XYYYYMMDDNNNNNN, where X indicates the type, YYYYMMDD is the filing date, and NNNNNN is a 6-digit number. Example: `AES X20250327123456`\n- If the ITN is not available, an exemption format may be used: AESDOWN [Filer ID] [mm/dd/yyyy]. Example: `AESDOWN 12345678912 03/27/2025`\n"
                  },
                  "certificateNumber": {
                    "type": "string",
                    "description": "The certificate number associated with the commodity.",
                    "example": "988"
                  },
                  "comments": {
                    "type": "string",
                    "description": "Free-form comments regarding the exported shipment.",
                    "example": "test comment"
                  },
                  "fromCustomsReference": {
                    "type": "string",
                    "description": "Free-form reference information provided by the requestor of the shipment. Depending on the carrier this information may or may not be rendered on the customs documents.",
                    "example": "111"
                  },
                  "importerCustomsReference": {
                    "type": "string",
                    "description": "A reference number used by the importer, such as a VAT number, PO number, or Insured number.",
                    "example": "2322"
                  },
                  "consigneeType": {
                    "type": "string",
                    "description": "Optional consignee type for international shipments only. Indicates whether the shipment is being delivered to a business or consumer.",
                    "enum": [
                      "Business",
                      "Consumer"
                    ],
                    "example": "Business"
                  },
                  "invoiceNumber": {
                    "type": "string",
                    "description": "The commercial Invoice Number assigned by the exporter.",
                    "example": "01112920"
                  },
                  "licenseNumber": {
                    "type": "string",
                    "description": "The export License Number associated with the commodity.",
                    "example": "456ABC123"
                  },
                  "sdrValue": {
                    "type": "number",
                    "description": "When an international parcel is insured, the insured value must be expressed in Special Drawing Rights values.",
                    "example": 23.32
                  },
                  "termsOfSale": {
                    "type": "string",
                    "description": "Defines the delivery and payment terms between the shipper and recipient. Currenty supported by carriers - UPS, FedEx and DHL. - Common values include:\n  - CIP: Carriage and Insurance Paid to\n  - CPT: Carriage Paid To\n  - DAP: Delivered at Place\n  - DAT: Delivered at Terminal\n  - DDP: Delivered Duty Paid\n  - EXW: Ex Works\n  - FCA: Free Carrier\n",
                    "example": "DDU",
                    "enum": [
                      "CIP",
                      "CPT",
                      "DAP",
                      "DAT",
                      "DDP",
                      "EXW",
                      "FCA"
                    ]
                  }
                }
              }
            }
          }
        },
        "x-go-package": "batch-apis"
      },
      "Shipment": {
        "type": "object",
        "required": [
          "fromAddress",
          "toAddress",
          "parcel"
        ],
        "properties": {
          "externalId": {
            "type": "string",
            "description": "The external ID of the shipment. User can provide any custom value to it for their own reference."
          },
          "fromAddress": {
            "$ref": "#/components/schemas/fromAddress"
          },
          "toAddress": {
            "$ref": "#/components/schemas/toAddress"
          },
          "parcel": {
            "$ref": "#/components/schemas/parcel"
          },
          "carrierAccountId": {
            "type": "string",
            "example": "asas2223",
            "description": "A unique identifier associated with the Carrier account used by client users during shipment process.",
            "x-go-name": "carrierAccountId"
          },
          "parcelType": {
            "type": "string",
            "example": "PKG",
            "description": ">-Packaging type varies as per selected carrier and its services, e.g., FRPKG, LGENV, TUBE,PKG.",
            "x-go-name": "ParcelType"
          },
          "serviceId": {
            "type": "string",
            "example": "PM",
            "description": ">-The unique identifier given to the carrier-specific service.",
            "x-go-name": "serviceId"
          },
          "dateOfShipment": {
            "type": "string",
            "description": "Indicates the date when shipment is created.",
            "example": "2023-04-03"
          },
          "specialServices": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SpecialService"
            },
            "x-go-name": "SpecialServices"
          },
          "shipmentOptions": {
            "allOf": [
              {
                "$ref": "#/components/schemas/shipmentOptions"
              },
              {
                "type": "object",
                "properties": {
                  "bookingConfirmationNumber": {
                    "type": "string",
                    "minLength": 5,
                    "maxLength": 12,
                    "example": "XXXX56789812",
                    "description": "This is an advanced booking number required for FedEx Express Freight shipments. It must be obtained through the appropriate channel in the shipment's origin country. Without a valid booking confirmation number, pickup and space allocation for the shipment are not guaranteed. The booking number must be between 5 and 12 digits.\n"
                  }
                }
              }
            ]
          },
          "metadata": {
            "type": "array",
            "description": "Additional metadata that needs to be stored for this shipment can be added here. For now, `costAccountName` is supported.",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string",
                  "description": "The key of metadata is CostAccount. User needs to enter the name of the CostAccount.",
                  "example": "PB-PUN-CostAccount",
                  "enum": [
                    "costAccountName"
                  ]
                },
                "value": {
                  "type": "string",
                  "description": "User needs to enter the Cost Account Code.",
                  "example": "CostAccount-00PBPUN"
                }
              }
            }
          }
        },
        "x-go-package": "batch-apis"
      },
      "ShipmentERR": {
        "type": "object",
        "required": [
          "fromAddress",
          "toAddress",
          "parcel"
        ],
        "properties": {
          "externalId": {
            "type": "string",
            "description": "This is a user-defined value provided by users just for their reference. This is for mapping purpose against each shipment."
          },
          "fromAddress": {
            "$ref": "#/components/schemas/fromAddress"
          },
          "toAddress": {
            "$ref": "#/components/schemas/toAddress"
          },
          "parcel": {
            "$ref": "#/components/schemas/parcel"
          },
          "carrierAccountId": {
            "type": "string",
            "example": "asas2223",
            "description": "A unique identifier associated with the Carrier account used by client users during shipment process.",
            "x-go-name": "carrierAccountId"
          },
          "parcelType": {
            "type": "string",
            "example": "PKG",
            "description": ">-Packaging type varies as per selected carrier and its services, e.g., PKG, LGENV.",
            "x-go-name": "ParcelType"
          },
          "serviceId": {
            "type": "string",
            "example": "PM",
            "description": ">-The unique identifier given to the carrier-specific service. ERR supports two services: First Class Mail (FCM) and Priority Mail (PM).",
            "x-go-name": "serviceId"
          },
          "dateOfShipment": {
            "type": "string",
            "description": "Indicates the date when shipment is created.",
            "example": "2023-04-03"
          },
          "specialServices": {
            "$ref": "#/components/schemas/SpecialServiceERR",
            "x-go-name": "SpecialServices"
          },
          "shipmentOptions": {
            "$ref": "#/components/schemas/shipmentOptionsERR"
          },
          "metadata": {
            "type": "array",
            "description": "Additional metadata that needs to be stored for this shipment can be added here. For now, `costAccountName` is supported.",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string",
                  "description": "The key of metadata is CostAccount. User needs to enter the name of the CostAccount, e.g. PBPUNE_COSTACC.",
                  "example": "costAccountName"
                },
                "value": {
                  "type": "string",
                  "description": "User needs to enter the CostAccount Code, e.g. CAC-00PBPUN.",
                  "example": "CostAccount-00PBPUN"
                }
              }
            }
          }
        },
        "x-go-package": "batch-apis"
      },
      "ShipmentERRCoversheet": {
        "type": "object",
        "required": [
          "fromAddress",
          "toAddress",
          "parcel"
        ],
        "properties": {
          "externalId": {
            "type": "string",
            "description": "This is a user-defined value provided by users just for their reference. This is for mapping purpose against each shipment."
          },
          "fromAddress": {
            "$ref": "#/components/schemas/fromAddress"
          },
          "toAddress": {
            "$ref": "#/components/schemas/toAddress"
          },
          "parcel": {
            "$ref": "#/components/schemas/parcel"
          },
          "carrierAccountId": {
            "type": "string",
            "example": "asas2223",
            "description": "A unique identifier associated with the user's registered USPS account which is used by client users while shipment process.",
            "x-go-name": "carrierAccountId"
          },
          "parcelType": {
            "type": "string",
            "example": "LTR",
            "description": ">-Packaging type varies as per USPS selected services, e.g., LTR, LGENV.",
            "x-go-name": "ParcelType"
          },
          "serviceId": {
            "type": "string",
            "example": "FCM",
            "description": ">-A unique identifier given to the carrier-specific service. ERR supports two services: First Class Mail (FCM) and Priority Mail (PM).",
            "x-go-name": "serviceId"
          },
          "dateOfShipment": {
            "type": "string",
            "description": "The date when shipment gets created.",
            "example": "2023-04-03"
          },
          "specialServices": {
            "$ref": "#/components/schemas/SpecialServiceERR",
            "x-go-name": "SpecialServices"
          },
          "shipmentOptions": {
            "$ref": "#/components/schemas/shipmentOptionsERR"
          },
          "metadata": {
            "type": "array",
            "description": "Additional metadata that needs to be stored for this shipment, can be added here. For now, `costAccountName` is supported.",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string",
                  "description": "The key of metadata is CostAccount. User needs to enter the name of the CostAccount, e.g. PBNOIDA-COSTACC.",
                  "example": "costAccountName"
                },
                "value": {
                  "type": "string",
                  "description": "User needs to enter the Cost Account Code, CostAccount-00PBNOD.",
                  "example": "CostAccount-00PBNOD"
                }
              }
            }
          },
          "shippingReferences": {
            "type": "object",
            "description": "Contains additional reference fields that can be passed with an ERR request (single piece or batch). While USPS only accepts a single reference, these fields are used for internal tracking, exports, and reporting.",
            "properties": {
              "reference1": {
                "type": "string",
                "example": "reference1",
                "description": "Primary reference field, printed on the coversheet under the label `Shipper Ref`. If `reference1` and `printCustomMessage` are both supplied, they will be concatenated and printed on the coversheet under the label `Shipper Ref`."
              },
              "reference2": {
                "type": "string",
                "example": "reference2",
                "description": "Secondary reference field."
              },
              "reference3": {
                "type": "string",
                "example": "reference3",
                "description": "Tertiary reference field."
              },
              "reference4": {
                "type": "string",
                "example": "reference4",
                "description": "Additional reference field."
              },
              "shipperReference": {
                "type": "string",
                "example": "Shipper123",
                "description": "Reference provided by the shipper."
              },
              "transportationReference": {
                "type": "string",
                "example": "TransRef2025",
                "description": "Reference related to transportation."
              },
              "shipperNotes": {
                "type": "string",
                "example": "Handle with care",
                "description": "Optional notes from the shipper."
              }
            }
          }
        },
        "x-go-package": "batch-apis"
      },
      "ShipmentBatch": {
        "type": "object",
        "properties": {
          "batchId": {
            "type": "string",
            "description": "This is a system-generated unique identifier assigned to the Batch while it is processed.",
            "x-go-name": "batchId"
          },
          "name": {
            "type": "string",
            "description": "Name of the of Batch which consists of multiple shipments (shipments in bulk).",
            "x-go-name": "Name"
          },
          "groupName": {
            "type": "string",
            "description": " Indicates the name of the group of batches, which consists of multiple Batch groups.",
            "x-go-name": "groupName"
          },
          "status": {
            "$ref": "#/components/schemas/JobStatus"
          },
          "uploadURL": {
            "type": "string",
            "description": "For the stored Batch file under S3, this is the S3 returned URL. The URL is uploaded along with the .CSV file to get the BatchID, which is used to track the import status.",
            "x-go-name": "UploadURL"
          }
        },
        "x-go-package": "batch-apis"
      },
      "ShipmentBatchResponseERR": {
        "type": "object",
        "properties": {
          "batchId": {
            "type": "string",
            "description": "This is a system-generated unique identifier assigned to the ERR Batch while it is processed.",
            "x-go-name": "batchId"
          },
          "name": {
            "type": "string",
            "description": "Name of the of ERR Batch which consists of multiple shipments (shipments in bulk).",
            "x-go-name": "Name"
          },
          "groupName": {
            "type": "string",
            "description": " Indicates the name of the group of batches, which consists of multiple Batch groups.",
            "x-go-name": "groupName"
          },
          "status": {
            "$ref": "#/components/schemas/JobStatus"
          },
          "uploadURL": {
            "type": "string",
            "description": "For the stored Batch file under S3, this is the S3 returned URL. The URL is uploaded along with the .CSV file to get the BatchID, which is used to track the import status.",
            "x-go-name": "UploadURL"
          }
        },
        "x-go-package": "batch-apis"
      },
      "BulkShipmentResponse": {
        "type": "object",
        "properties": {
          "batchId": {
            "type": "string",
            "description": " This is a system-generated unique identifier assigned to the Batch while it is processed."
          },
          "groupName": {
            "type": "string",
            "description": "Indicates the name of the group of batches, which consists of multiple Batch groups."
          },
          "name": {
            "type": "string",
            "description": " Name of the of Batch which consists of multiple shipments (shipments in bulk).",
            "x-go-name": "Name"
          },
          "status": {
            "$ref": "#/components/schemas/JobStatus"
          },
          "addressValidation": {
            "type": "object",
            "description": " This indicates the processing status of address validation stage.",
            "$ref": "#/components/schemas/AddressCountStatus"
          },
          "rating": {
            "type": "object",
            "description": " This indicates the processing status of rating stage.",
            "$ref": "#/components/schemas/RatingCountStatus"
          },
          "labelGeneration": {
            "type": "object",
            "description": " This indicates the processing status of label generation stage.",
            "$ref": "#/components/schemas/LabelGenerationCountStatus"
          }
        }
      },
      "BulkShipmentResponseERR": {
        "type": "object",
        "properties": {
          "batchId": {
            "type": "string",
            "description": " This is a system-generated unique identifier assigned to the Batch while it is processed."
          },
          "name": {
            "type": "string",
            "description": " Name of the of ERR Batch which consists of multiple shipments (shipments in bulk).",
            "x-go-name": "Name"
          },
          "groupName": {
            "type": "string",
            "description": "Indicates the name of the group of batches, which consists of multiple Batch groups."
          },
          "status": {
            "$ref": "#/components/schemas/JobStatus"
          },
          "addressValidation": {
            "type": "object",
            "description": "Indicates the status of address(es) which are in validating stage.",
            "$ref": "#/components/schemas/AddressCountStatus"
          },
          "rating": {
            "type": "object",
            "description": "Indicates the status of shipments which are at Rating stage. Rating is a process of assessing the shipping/freight charge associated with the ERR Bulk shipment. Rates are calculated based on selected special/extra services correcponding to the selected Services and ParcelType for USPS.",
            "$ref": "#/components/schemas/RatingCountStatusERR"
          },
          "labelGeneration": {
            "type": "object",
            "description": "Indicates the status of shipping labels which are at Printing stage.",
            "$ref": "#/components/schemas/LabelGenerationCountStatus"
          },
          "labelDetails": {
            "type": "object",
            "properties": {
              "layout": {
                "type": "object",
                "description": " This indicates the layout of the label.",
                "properties": {
                  "size": {
                    "type": "string",
                    "description": "Defines the label size of the Shipment, that is, the Shipping Label is available in different Doc Size.",
                    "example": "DOC_4X6",
                    "enum": [
                      "DOC_8X11",
                      "DOC_4X6"
                    ]
                  },
                  "type": {
                    "type": "string",
                    "description": " This indicates the type of the label.",
                    "example": "SHIPPING_LABEL"
                  }
                }
              }
            }
          }
        }
      },
      "AddressCountStatus": {
        "type": "object",
        "description": "This indicates the status count of addresses which are at validation stage.",
        "properties": {
          "success": {
            "type": "number",
            "example": 20,
            "description": "The number of addresses which have been successfully validated."
          },
          "failed": {
            "type": "number",
            "example": 10,
            "description": "The number of addresses failed at validation due to incorrect entry in the address."
          },
          "pending": {
            "type": "number",
            "example": 10,
            "description": "The number of addresses which are pending and in-queue to be processed."
          }
        }
      },
      "RatingCountStatus": {
        "type": "object",
        "description": "This indicates the status count of shipments which are at Rating stage. Rating is a process of assessing the shipping/freight charge associated with the Bulk shipment. Rates are calculated based on selected special/extra services corresponding to the carrier, linked services, and selected ParcelType.",
        "properties": {
          "success": {
            "type": "number",
            "example": 20,
            "description": "The number of shipments that have been successfully processed for Ratings."
          },
          "failed": {
            "type": "number",
            "example": 10,
            "description": "The number of shipments which failed processing at Rating due to some scenarios like unsupported extra services or incompatible special services combined for a shipment."
          },
          "pending": {
            "type": "number",
            "example": 10,
            "description": "The number of shipments which are pending and in-queue to be processed."
          }
        }
      },
      "RatingCountStatusERR": {
        "type": "object",
        "description": "This indicates the status count of shipments which are at Rating stage. Rating is a process of assessing the shipping/freight charge associated with the ERR Bulk shipment. Rates are calculated based on selected special/extra services corresponding to the selected Services and ParcelType for USPS.",
        "properties": {
          "success": {
            "type": "number",
            "example": 20,
            "description": "The number of shipments that have been successfully processed for Ratings."
          },
          "failed": {
            "type": "number",
            "example": 10,
            "description": "The number of shipments which failed processing at Ratings due to some scenarios like unsupported extra services or incompatible extra services combined for a shipment."
          },
          "pending": {
            "type": "number",
            "example": 10,
            "description": "The number of shipments which are pending and in-queue to be processed."
          }
        }
      },
      "LabelGenerationCountStatus": {
        "type": "object",
        "description": "Indicates the status of shipping labels/coversheets which are at final steps before printing.",
        "properties": {
          "success": {
            "type": "number",
            "example": 20,
            "description": "The number of shipment labels which have been successfully generated."
          },
          "failed": {
            "type": "number",
            "example": 10,
            "description": "The number of shipment labels which failed processing and could not be generated due to some errors with shipment."
          },
          "pending": {
            "type": "number",
            "example": 10,
            "description": "The number of shipment labels which are pending and in-queue to be processed."
          }
        }
      },
      "VoidCountStatus": {
        "type": "object",
        "description": "Indicates the status of shipping labels/shipments which are sent to be cancelled.",
        "properties": {
          "success": {
            "type": "number",
            "example": 20,
            "description": "The number of shipment labels which have been successfully cancelled."
          },
          "failed": {
            "type": "number",
            "example": 10,
            "description": "The number of shipment labels which failed cancelling due to some validation issue."
          },
          "pending": {
            "type": "number",
            "example": 10,
            "description": "The number of shipment labels which are pending and in-queue to be cancelled."
          }
        }
      },
      "ProcessShipmentResponse": {
        "type": "object",
        "properties": {
          "batchId": {
            "type": "string",
            "description": " This is a system-generated unique identifier assigned to the Batch while it is processed."
          },
          "name": {
            "type": "string",
            "description": "Name of the of Batch which consists of multiple shipments (shipments in bulk).",
            "x-go-name": "Name"
          },
          "groupName": {
            "type": "string",
            "description": "Indicates the name of the group of batches, which consists of multiple Batch groups."
          },
          "status": {
            "type": "string",
            "description": " The batch will show the status `SUBMITTED` on successful execution of Batch."
          }
        }
      },
      "GetStatusDetailedResponse": {
        "type": "object",
        "properties": {
          "batchId": {
            "type": "string",
            "description": " This is a system-generated unique identifier assigned to the Batch while it is processed."
          },
          "name": {
            "type": "string",
            "description": " Name of the of Batch which consists of multiple shipments (shipments in bulk).",
            "x-go-name": "Name"
          },
          "groupName": {
            "type": "string",
            "description": "Indicates the name of the group of batches, which consists of multiple Batch groups."
          },
          "status": {
            "$ref": "#/components/schemas/JobStatus"
          },
          "import": {
            "type": "object",
            "description": "Indicates the processing status of import. It shows only those shipments which are submitted through import via .CSV file.",
            "$ref": "#/components/schemas/ImportCountStatus"
          },
          "addressValidation": {
            "type": "object",
            "description": " This indicates the processing status of addresses which are in validating stage.",
            "$ref": "#/components/schemas/AddressCountStatus"
          },
          "rating": {
            "type": "object",
            "description": " This indicates the processing status of shipments which are at Rating stage.",
            "$ref": "#/components/schemas/RatingCountStatus"
          },
          "labelGeneration": {
            "type": "object",
            "description": " This indicates the processing status of labels at printing stage.",
            "$ref": "#/components/schemas/LabelGenerationCountStatus"
          },
          "voidLabel": {
            "type": "object",
            "description": " This indicates the processing status of shipments or shipping labels which are sent for cancelling (void/cancel shipment).",
            "$ref": "#/components/schemas/VoidCountStatus"
          },
          "labelDetails": {
            "type": "object",
            "properties": {
              "layout": {
                "type": "object",
                "description": " This indicates the layout of the label.",
                "properties": {
                  "fileFormat": {
                    "type": "string",
                    "description": " Defines the format of the document file the print takes",
                    "example": "PDF"
                  },
                  "size": {
                    "type": "string",
                    "description": "Defines the label size of the Shipment, that is, the Shipping Label is available in different Doc Size.",
                    "example": "DOC_4X6",
                    "enum": [
                      "DOC_8X11",
                      "DOC_4X6"
                    ]
                  },
                  "type": {
                    "type": "string",
                    "description": " This indicates the type of the label.",
                    "example": "SHIPPING_LABEL"
                  }
                }
              },
              "results": {
                "type": "array",
                "description": " This indicates the results of the label generation.",
                "items": {
                  "type": "object",
                  "properties": {
                    "url": {
                      "type": "string",
                      "description": " This indicates URL of the shipping label in PDF format.",
                      "example": "https://api-sandbox.pitneybowes.com/shippingservices/v1/shipments/210000000000000000/labels/210000000000000000.pdf"
                    },
                    "shipmentIdentifiers": {
                      "type": "array",
                      "description": " Indicates the following identifiers related to Shipment.",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": " This indicates the identifier at DB level mapped with Shipment ID.",
                            "example": "64993ea9c3257d74798d4589"
                          },
                          "labelOrder": {
                            "type": "number",
                            "description": " The 'labelOrder' is the identifier of label order mapped with Shipment ID.",
                            "example": 1
                          },
                          "parcelTrackingNumber": {
                            "type": "string",
                            "description": " The `parcelTrackingNumber` is a unique identifier assigned to a shipment for tracking.",
                            "example": "9414809898643517754882"
                          },
                          "shipmentId": {
                            "type": "string",
                            "description": " Shipment ID is a unique identifier for an individual shipment.",
                            "example": "USPS2200592809609000"
                          },
                          "externalId": {
                            "type": "string",
                            "description": " This is a user-defined value provided by users just for their reference. This is for mapping purpose against each shipment.",
                            "example": "123456789"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "totalShipmentCharge": {
            "type": "number",
            "example": 8.97,
            "description": " The `totalShipmentCharge` represents the total cost of shipping for all the parcels in the batch. This amount reflects the shipping charges applied to the batch as a whole."
          }
        }
      },
      "ImportCountStatus": {
        "type": "object",
        "description": "This will display the status counts for shipments or batch which are submitted via Import .CSV file",
        "properties": {
          "success": {
            "type": "number",
            "example": 20,
            "description": "The number of shipments which have been successfully imported."
          },
          "failed": {
            "type": "number",
            "example": 10,
            "description": "The number of shipments failed during Import."
          },
          "pending": {
            "type": "number",
            "example": 10,
            "description": "The number of shipments which are pending and in-queue to be imported."
          }
        }
      },
      "JobStatus": {
        "type": "string",
        "description": "This shows all the status related to the Batch Job.",
        "enum": [
          "SUBMITTED",
          "ADDRESS_VALIDATION_PROCESSING",
          "ADDRESS_VALIDATED",
          "ADDRESS_VALIDATION_FAILED",
          "RATE_VALIDATION_PROCESSING",
          "RATE_VALIDATED",
          "RATE_VALIDATION_FAILED",
          "LABEL_GENERATION_PROCESSING",
          "LABEL_GENERATION_FAILED",
          "LABEL_GENERATED",
          "COMPLETED"
        ],
        "x-go-package": "batch-apis"
      },
      "shipmentOptions": {
        "type": "object",
        "properties": {
          "addToManifest": {
            "type": "boolean",
            "description": "This option asks if the shipment is to be added for Manifest, so that the shipment can be reflected in the Manifest Form while compilation. The value can be 'true' or 'false'. Applicable for USPS.",
            "example": true
          },
          "printCustomMessage": {
            "type": "string",
            "description": "This prints a custom message on shipping label.",
            "example": "Print Message 1"
          },
          "receiptOption": {
            "type": "string",
            "description": "It provides options to print receipt with shipping label. Only applicable for USPS, can take values- RECEIPT_ONLY or RECEIPT_WITH_INSTRUCTIONS or NO_OPTIONS.",
            "example": "RECEIPT_WITH_INSTRUCTIONS",
            "enum": [
              "RECEIPT_ONLY",
              "RECEIPT_WITH_INSTRUCTIONS",
              "NO_OPTIONS"
            ]
          },
          "printDepartment": {
            "type": "string",
            "description": "This prints Department name on the shipping label. This is applicable for FedEx.",
            "example": "department"
          },
          "printInvoiceNumber": {
            "type": "string",
            "description": "This prints Invoice Number on the shipping label. This is applicable for FedEx.",
            "example": "invoicenumber"
          },
          "printPONumber": {
            "type": "string",
            "description": "This prints PO number on the shipping label. This is applicable for FedEx.",
            "example": "ponumber"
          },
          "minimalAddressValidation": {
            "type": "boolean",
            "description": "Allows performing minimal address validation during shipment creation. the addressLine1 field is not validated if set to true.\nMinimal address validation is supported only for these APIs:\n  - Create Shipment\n  - Create Bulk Shipments\n  - Create Multipiece Shipment\n",
            "example": true,
            "enum": [
              true,
              false
            ]
          }
        }
      },
      "shipmentOptionsERR": {
        "type": "object",
        "properties": {
          "addToManifest": {
            "type": "boolean",
            "description": "This option asks if the shipment is to be added for Manifest, so that the shipment can be reflected in the Manifest Form while compilation. The value can be 'true' or 'false'. Applicable for USPS.",
            "example": true
          },
          "printCustomMessage": {
            "type": "string",
            "description": "This prints a custom message on the Shipping Label.",
            "example": "Print Message 1"
          },
          "receiptOption": {
            "type": "string",
            "description": "It provides options to print receipt with Shipping Label. This is only applicable for USPS, and takes values: `RECEIPT_ONLY`, `RECEIPT_WITH_INSTRUCTIONS`, or `NO_OPTIONS`.",
            "example": "RECEIPT_WITH_INSTRUCTIONS",
            "enum": [
              "RECEIPT_ONLY",
              "RECEIPT_WITH_INSTRUCTIONS",
              "NO_OPTIONS"
            ]
          }
        }
      },
      "CreateBatchRequest": {
        "type": "object",
        "required": [
          "size",
          "type",
          "carrierAccountId",
          "serviceId",
          "parcelType"
        ],
        "properties": {
          "name": {
            "type": "string",
            "description": "Name of the of Batch which which is imported (imported shipments in bulk).",
            "x-go-name": "Name"
          },
          "groupName": {
            "type": "string",
            "description": "Indicates the name of the group of batches, which consists of multiple Batch groups..",
            "x-go-name": "groupName"
          },
          "size": {
            "type": "string",
            "enum": [
              "DOC_8X11",
              "DOC_4X6"
            ],
            "description": "This indicates the label size of the Bulk Shipment when it gets printed, e.g., DocSize can be 8' X 11' or 4' X 6'.",
            "example": "DOC_8X11"
          },
          "type": {
            "type": "string",
            "description": "This indicates the type of the Batch Shipment, e.g., Shipping Label.",
            "example": "SHIPPING_LABEL",
            "enum": [
              "SHIPPING_LABEL"
            ]
          },
          "format": {
            "type": "string",
            "description": "This defines the type of the shipment which is printed, e.g., Shipping label gets printed in PDF form.",
            "example": "PDF",
            "enum": [
              "PDF"
            ]
          },
          "carrierAccountId": {
            "type": "string",
            "description": "A unique identifier associated with the carrier account used by client users during shipment process.",
            "x-go-name": "carrierAccountId"
          },
          "serviceId": {
            "type": "string",
            "description": "A unique identifier given to the carrier-specific service. This varies as per carrier selection. User can override this value by defining it at Shipment level.",
            "x-go-name": "Service"
          },
          "parcelType": {
            "type": "string",
            "description": "Parcel Type is required for creating a shipment while rating a parcel. And it varies as per carrier and its selected services, e.g. FRPKG, LGENV, TUBE, and PKG.",
            "x-go-name": "Service"
          },
          "specialServices": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SpecialServiceBatch"
            },
            "x-go-name": "SpecialServices"
          }
        },
        "x-go-package": "batch-apis"
      },
      "CreateBatchRequestERR": {
        "type": "object",
        "required": [
          "size",
          "type",
          "carrierAccountId",
          "serviceId",
          "parcelType"
        ],
        "properties": {
          "name": {
            "type": "string",
            "description": "Name of the of ERR Batch which is imported, e.g. ERR-Import-05.",
            "x-go-name": "Name"
          },
          "groupName": {
            "type": "string",
            "description": "Indicates the name of the group of batches, which consists of multiple Batch groups.",
            "x-go-name": "groupName"
          },
          "size": {
            "type": "string",
            "enum": [
              "ERR Label - DOC_8X11 and DOC_4X6.",
              "ERR Coversheet - 10, 6 X 9, 6 X 9.5, and 9.5 X 12"
            ],
            "description": "This indicates the label size of the Bulk Shipment when it gets printed,i.e., DocSize.",
            "example": "DOC_8X11"
          },
          "type": {
            "type": "string",
            "description": "This indicates the type of the Batch Shipment, e.g., Shipping Label and Coversheet.",
            "example": "SHIPPING_LABEL",
            "enum": [
              "SHIPPING_LABEL",
              "COVERSHEET"
            ]
          },
          "format": {
            "type": "string",
            "description": "This defines the type of the shipment which is printed, e.g., Shipping label gets printed in PDF form.",
            "example": "PDF",
            "enum": [
              "PDF"
            ]
          },
          "carrierAccountId": {
            "type": "string",
            "description": "A unique identifier associated with the carrier account used by client users during shipment process. Default CarrierAccountID for this batch will be user's registered USPS account.",
            "x-go-name": "carrierAccountId"
          },
          "serviceId": {
            "type": "string",
            "description": "A unique identifier given to the carrier-specific service. User can override this value by defining it at Shipment level.",
            "x-go-name": "Service"
          },
          "parcelType": {
            "type": "string",
            "description": "Parcel Type is required for creating a shipment while rating a parcel. And it varies as per USPS selected services, e.g. FRPKG, LGENV, TUBE, and PKG.",
            "x-go-name": "Service"
          },
          "specialServices": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SpecialServiceBatchERR"
            },
            "x-go-name": "SpecialServices"
          }
        },
        "x-go-package": "batch-apis"
      },
      "getShipmentsForBatch": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "description": "It displays all the shipment details based on the paramter selected in the request body.",
            "items": {
              "type": "object",
              "properties": {
                "batchId": {
                  "type": "string",
                  "description": "This is a system-generated unique identifier assigned to the Batch while it is processed.",
                  "example": "RgYgaV7mKax"
                },
                "carrierAccountId": {
                  "type": "string",
                  "description": "A unique identifier associated with the Carrier account used by client users during shipment process.",
                  "example": "GpoVzzeQ37l"
                },
                "externalId": {
                  "type": "string",
                  "description": "This is a user-defined value provided by users just for their reference. This is for mapping purpose against each shipment.",
                  "example": "1"
                },
                "fromAddress": {
                  "$ref": "#/components/schemas/fromAddress"
                },
                "labelLayout": {
                  "type": "object",
                  "description": "Label layout details",
                  "properties": {
                    "fileFormat": {
                      "type": "string",
                      "description": " Defines the format of the document file the print takes.",
                      "example": "PDF"
                    },
                    "printReceipt": {
                      "type": "boolean",
                      "description": " This option asks if the receipt is to be printed.",
                      "example": true
                    },
                    "size": {
                      "type": "string",
                      "description": "Defines the label size of the Shipment, that is, the Shipping Label is available in different Doc Size.",
                      "example": "DOC_4X6",
                      "enum": [
                        "DOC_8X11",
                        "DOC_4X6"
                      ]
                    },
                    "type": {
                      "type": "string",
                      "description": "This indicates the type of the label",
                      "example": "SHIPPING_LABEL"
                    }
                  }
                },
                "metadata": {
                  "type": "array",
                  "description": "Additional metadata that needs to be stored for this shipment can be added here. For now, `costAccountName` is supported.",
                  "items": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string",
                        "description": "The key of metadata is CostAccount. User needs to enter the name of the CostAccount.",
                        "example": "costAccountName",
                        "enum": [
                          "costAccountName"
                        ]
                      },
                      "value": {
                        "type": "string",
                        "description": "User needs to enter the Cost Account Code.",
                        "example": "CostAccount-00PBPUN"
                      }
                    }
                  }
                },
                "parcel": {
                  "$ref": "#/components/schemas/parcel"
                },
                "parcelType": {
                  "type": "string",
                  "description": "Parcel Type is required for creating a shipment while rating a parcel. And it varies as per carrier selection and corresponding services.",
                  "example": "LP"
                },
                "serviceId": {
                  "type": "string",
                  "description": "A unique identifier given to the carrier-specific service. User can override this value by defining it at Shipment level.",
                  "example": "LIB"
                },
                "shipmentId": {
                  "type": "string",
                  "description": "Shipment ID is a unique identifier for an individual shipment",
                  "example": "USPS2200589023653912"
                },
                "parcelTrackingNumber": {
                  "type": "string",
                  "description": " The `parcelTrackingNumber` is a unique identifier assigned to a shipment for tracking.",
                  "example": "9407809105156003660859"
                },
                "shipmentIdentifier": {
                  "type": "string",
                  "description": "Unique identifier generated for each shipment, it can be either success or failed.",
                  "example": "USPS2200589023653912"
                },
                "shipmentOptions": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/shipmentOptions"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "billingWeight": {
                          "type": "string",
                          "description": "The weight used by the carrier to calculate the shipping cost. This value is determined as the greater of the actual weight and the dimensional weight.\n",
                          "example": "128.0"
                        }
                      }
                    },
                    {
                      "type": "object",
                      "properties": {
                        "bookingConfirmationNumber": {
                          "type": "string",
                          "minLength": 5,
                          "maxLength": 12,
                          "example": "XXXX56789812",
                          "description": "This is an advanced booking number required for FedEx Express Freight shipments. It must be obtained through the appropriate channel in the shipment's origin country. Without a valid booking confirmation number, pickup and space allocation for the shipment are not guaranteed. The booking number must be between 5 and 12 digits.\n"
                        }
                      }
                    }
                  ]
                },
                "specialServices": {
                  "type": "array",
                  "description": "Special services used to create shipment",
                  "items": {
                    "type": "object",
                    "properties": {
                      "fee": {
                        "type": "number",
                        "description": "The amount of the surcharge.",
                        "example": 0
                      },
                      "specialServiceId": {
                        "type": "string",
                        "description": "A unique identifier associated with the Special Service, will be mentioned in this column. If user selects additional service will be entered here.",
                        "example": "DelCon"
                      }
                    }
                  },
                  "example": [
                    {
                      "fee": 0,
                      "specialServiceId": "DelCon"
                    }
                  ]
                },
                "stepStatus": {
                  "type": "object",
                  "description": "It displays different status of shipments at each level- addressValidation, rating, labelGeneration, and voidLabel.",
                  "properties": {
                    "import": {
                      "type": "string",
                      "description": "This is only visible for batch submitted during Import via .CSV.",
                      "example": "SUCCESS"
                    },
                    "addressValidation": {
                      "type": "string",
                      "description": "It indicates the status of shipments at addressValidation stage.",
                      "example": "SUCCESS"
                    },
                    "rating": {
                      "type": "string",
                      "description": "It indicates status of shipments at rating level.",
                      "example": "SUCCESS"
                    },
                    "labelGeneration": {
                      "type": "string",
                      "description": "It indicates status of shipments at labelGeneration step.",
                      "example": "SUCCESS"
                    },
                    "voidLabel": {
                      "type": "string",
                      "description": "It will only be visible when batch labels are cancelled.",
                      "example": "SUCCESS"
                    }
                  }
                },
                "toAddress": {
                  "$ref": "#/components/schemas/toAddress"
                },
                "additionalAddresses": {
                  "$ref": "#/components/schemas/additionalAddresses"
                },
                "altReturnAddress": {
                  "type": "object",
                  "description": "This is an optional field. if a package shipped from Location_A to Location_B needs to return to Location_C. The alternate address will be printed on the label. Use this object to specify a return address different from the fromAddress. Supported by FedEx, UPS, and Purolator.",
                  "properties": {
                    "addressLine1": {
                      "type": "string",
                      "description": "The first line of the alternate return address, such as a street address or PO Box.",
                      "example": "27 Waterview Dr"
                    },
                    "addressLine2": {
                      "type": "string",
                      "description": "The addressLine2 contains Street address or Landmark (if any).",
                      "example": "near abc street"
                    },
                    "addressLine3": {
                      "type": "string",
                      "description": "The addressLine3 contains P.O. Box (if any) near the address.",
                      "example": "near xyz street"
                    },
                    "company": {
                      "type": "string",
                      "description": "The name of the company for the alternate return address, in case if the recipient's address is not residential. <br /> `Max length = 30`.",
                      "example": "PB"
                    },
                    "email": {
                      "type": "string",
                      "description": "The email address of the recipient. It can be person's email address or company email address (for non-residential).",
                      "example": "user@email.com"
                    },
                    "residential": {
                      "type": "boolean",
                      "description": "The specified address can be Residential or Official. In case if the address is Residential, the boolean value will be 'true', else it will take 'false'.",
                      "example": true
                    },
                    "cityTown": {
                      "type": "string",
                      "description": "The city or town for the alternate return address.",
                      "example": "Shelton"
                    },
                    "countryCode": {
                      "type": "string",
                      "description": "The two-character ISO Code of the source country from this ISO country list.  The country in which the address is located. Use ISO 3166-1 Alpha-2 standard values. For best results this should be included, especially if the country name does not appear in any of the unparsedAddressLines.",
                      "example": "US"
                    },
                    "name": {
                      "type": "string",
                      "description": "The name of the recipient or organization for the alternate return address.",
                      "example": "User Name"
                    },
                    "phone": {
                      "type": "string",
                      "description": "The phone number associated with the alternate return address.",
                      "example": "203-555-1213"
                    },
                    "postalCode": {
                      "type": "string",
                      "description": "The postal or ZIP code for the alternate return address.",
                      "example": "06484"
                    },
                    "stateProvince": {
                      "type": "string",
                      "description": "The 2-letter state or province code for the alternate return address.",
                      "example": "CT"
                    }
                  }
                }
              }
            }
          },
          "pageInfo": {
            "type": "object",
            "description": "It displays the pagination details.",
            "properties": {
              "page": {
                "type": "number",
                "description": "It displays current page number.",
                "example": 1
              },
              "pages": {
                "type": "number",
                "description": "It displays total number of pages.",
                "example": 1
              },
              "total": {
                "type": "number",
                "description": "It displays total records which are filtered.",
                "example": 2
              }
            }
          }
        }
      },
      "SpecialServiceBatch": {
        "required": [
          "specialserviceId"
        ],
        "type": "object",
        "properties": {
          "inputParameters": {
            "type": "array",
            "description": ">- These parameters are required to set for the special service, such as an Insurance value or a Receipt-number format. This is applicable only when Special Service requires input parameters. If a Special Service does not require input parameters, user can or pass an empty array.",
            "items": {
              "$ref": "#/components/schemas/Parameter"
            },
            "x-go-name": "InputParameters"
          },
          "specialserviceId": {
            "type": "string",
            "description": "A unique identifier associated with the special service which varies based on selected Carrier Service and ParcelTypes/PackageTypes.",
            "x-go-name": "SpecialserviceId"
          }
        },
        "x-go-package": "batch-apis"
      },
      "SpecialServiceBatchERR": {
        "required": [
          "specialserviceId"
        ],
        "type": "object",
        "properties": {
          "inputParameters": {
            "type": "array",
            "description": ">- These parameters are required to set for the special service, such as an Insurance value or a Receipt-number format. This is applicable only when Special Service requires input parameters. If a Special Service does not require input parameters, user can or pass an empty array.",
            "items": {
              "$ref": "#/components/schemas/Parameter"
            },
            "x-go-name": "InputParameters"
          },
          "specialserviceId": {
            "type": "string",
            "description": "A unique identifier associated with the special service which varies based on selected USPS Service and ParcelTypes/PackageTypes.",
            "x-go-name": "SpecialserviceId"
          }
        },
        "x-go-package": "batch-apis"
      },
      "VoidBatchRequest": {
        "type": "object",
        "required": [
          "name"
        ],
        "description": "The request to cancel Batch.",
        "properties": {
          "name": {
            "type": "string",
            "description": "Indicates the name of the Batch, i.e., a list of shipments, which need to be cancelled.",
            "example": "batchTest",
            "x-go-name": "Name"
          },
          "reason": {
            "type": "string",
            "description": "Reason to cancel the batch of shipments.",
            "example": "Not processing due to rating issue.",
            "x-go-name": "Name"
          },
          "shipmentIds": {
            "type": "array",
            "description": ">- Shipment ID is a unique identifier for an individual shipment. If ShipmentID(s) are passed in the array, then corresponding shipments will be cancelled. If ShipmentID(s) is/are not provided, then the entire shipments of the Batch will be cancelled.",
            "items": {
              "type": "string",
              "example": "USPS09998889999038"
            }
          }
        }
      },
      "VoidBatchResponse": {
        "type": "object",
        "properties": {
          "batchID": {
            "type": "string",
            "description": "This is a system-generated unique identifier assigned to the Batch while it is processed.",
            "example": "p1B9VZYVp5V",
            "x-go-name": "Name"
          },
          "status": {
            "type": "string",
            "description": "Indicates the status of the Batch while executing `voidShippingLabel`.",
            "example": "RATE_VALIDATION_FAILED",
            "x-go-name": "Name"
          }
        }
      },
      "fromAddress": {
        "type": "object",
        "required": [
          "name",
          "addressLine1",
          "cityTown",
          "stateProvince",
          "postalCode",
          "countryCode"
        ],
        "description": "The complete address of the Sender.",
        "properties": {
          "name": {
            "type": "string",
            "description": "The name of the Sender to which this address points.<br /> `Max length = 40`",
            "example": "Anupama"
          },
          "addressLine1": {
            "type": "string",
            "description": "The addressLine1 contains the Flat number, Building or Apartment Name/number (if any) or company name (if not residential) of the Sender. <br /> `Max length = 40`",
            "example": "27 Watervw Dr"
          },
          "addressLine2": {
            "type": "string",
            "description": "The addressLine2 contains the Area or Street Name. This is an optional field. <br /> `Max length = 40`",
            "example": "Street-257"
          },
          "addressLine3": {
            "type": "string",
            "description": "The addressLine3 contains other details for easy reach, e.g. Landmark. This is an optional field. <br /> `Max length = 40`",
            "example": "Near XZ Tower"
          },
          "cityTown": {
            "type": "string",
            "description": "The name of the city or town the Sender's address belongs to.",
            "example": "Stamford"
          },
          "stateProvince": {
            "type": "string",
            "description": "The name of the State or Province the Sender belongs to. It is the `2-letter` State or Province Code for US or Canadian address(es). <br /> Below is the hyperlink for CA country that will navigate to its Province/State Codes page. Similarly, respective country users can check for their country- State/Province codes. <br /> Please switch to the `Search` tab, select `Country codes` radio button, enter the required country name or country code, and then click `SEARCH` button. ",
            "externalDocs": {
              "url": "https://www.iso.org/obp/ui/#iso:code:3166:CA",
              "description": "List of Province with their Province/State Codes."
            },
            "example": "CT"
          },
          "postalCode": {
            "type": "string",
            "description": "The Postal Code or ZIP Code of the address. <br /> For US addresses, use either the `5-digit` or `9-digit` ZIP Code in one of the following formats: '12345' or '12345-6789'. <br /> While for CA addresses, use a `six-character` alphanumeric string Postal Code in this format: 'A1A 1A1'. <br /> <br /> *NOTE: USPS supports only US location.*",
            "example": 6905
          },
          "inductionPostalCode": {
            "type": "string",
            "description": "The postal code where the shipment is tendered to the carrier. If an induction postal code is specified in the \"fromAddress\", it will be used for rate calculations and determining manifest eligibility instead of the standard postal code. If not specified, the postal code from the \"fromAddress\" will be used.<br/> Supported for Create Bulk Shipment API.",
            "example": "06905"
          },
          "countryCode": {
            "type": "string",
            "description": "The country in which the sender's address is located. The value will be the two-character ISO Code of the country from the ISO country list. <br /> Use ISO 3166-1 Alpha-2 standard values. For best results this should be included, especially if the country name does not appear in any of the unparsedAddressLines. <br /> Below is the hyperlink, please select `Country codes` and then click `SEARCH` button. <br /> *NOTE: USPS supports only US location.*",
            "externalDocs": {
              "url": "https://www.iso.org/obp/ui/#search",
              "description": "List of Countries with their ISO Codes"
            },
            "example": "US"
          },
          "company": {
            "type": "string",
            "description": "The name of the company, in case if the sender address is not residential. ",
            "example": "PB"
          },
          "phone": {
            "type": "string",
            "description": "This is sender's phone number. Enter the digits with or without spaces or hyphens. <br /> `Max length = 15`.",
            "example": "203-555-1213"
          },
          "email": {
            "type": "string",
            "description": "This must be sender's valid email. <br /> `Max length = 50` ",
            "example": "anupama.k@gmail.com"
          },
          "residential": {
            "type": "boolean",
            "description": "The specified address can be Residential or Official. In case if the address is Residential, the boolean value will be 'true', else it will take 'false'.",
            "example": true
          }
        }
      },
      "toAddress": {
        "type": "object",
        "required": [
          "name",
          "addressLine1",
          "cityTown",
          "stateProvince",
          "postalCode",
          "countryCode"
        ],
        "description": "The complete address of the Recipient or Department (in case if the address is not pointed to any individual recipient).",
        "properties": {
          "name": {
            "type": "string",
            "description": "The name of the Recipient. <br /> `Max length = 40`",
            "example": "John Smith"
          },
          "addressLine1": {
            "type": "string",
            "description": "The addressLine1 contains the Flat number, Building or Apartment Name/number (if any) or company name (if not residential) of the Recipient. <br /> `Max length = 40`",
            "example": "98 Watervw Dr"
          },
          "addressLine2": {
            "type": "string",
            "description": "The addressLine2 contains the Area or Street Name. This is an optional field. <br /> `Max length = 40`",
            "example": "Street-975"
          },
          "addressLine3": {
            "type": "string",
            "description": "The addressLine3 contains other details for easy reach, e.g. Landmark. This is an optional field. <br /> `Max length = 40`",
            "example": "Near ABC Tower"
          },
          "cityTown": {
            "type": "string",
            "description": "The name of the city or town the Recipient belongs to.",
            "example": "Shelton"
          },
          "stateProvince": {
            "type": "string",
            "description": "The name of the State or Province the Sender belongs to. It is the `2-letter` State or Province Code for US or Canadian address(es). <br /> Below is the hyperlink for CA country that will navigate to its Province/State Codes page. Similarly, respective country users can check for their country- State/Province codes. <br /> Please switch to the `Search` tab, select `Country codes` radio button, enter the required country name or country code, and then click `SEARCH` button . <br /> `Max length = 2`",
            "externalDocs": {
              "url": "https://www.iso.org/obp/ui/#iso:code:3166:CA",
              "description": "List of Province with their Province/State Codes."
            },
            "example": "CT"
          },
          "postalCode": {
            "type": "string",
            "description": "The Postal Code or ZIP Code of the address.<br /> For US addresses, use either the `5-digit` or `9-digit` ZIP Code in one of the following formats: '12345' or '12345-6789'. <br /> While for CA addresses, use a `six-character` alphanumeric string Postal Code in this format: 'A1A 1A1'. ERR supports only US addresses.<br /> *NOTE: USPS supports only US location.*",
            "example": 6905
          },
          "countryCode": {
            "type": "string",
            "description": "The country in which the recipient's address is located. The value will be the two-character ISO Code of the country from the ISO country list. <br /> Use ISO 3166-1 Alpha-2 standard values. For best results this should be included, especially if the country name does not appear in any of the unparsedAddressLines. <br /> Below is the hyperlink, please select `Country codes` and then click `SEARCH` button.  <br /> *NOTE: USPS supports only US location.*",
            "externalDocs": {
              "url": "https://www.iso.org/obp/ui/#search",
              "description": "List of Countries with their ISO Codes"
            },
            "example": "US"
          },
          "company": {
            "type": "string",
            "description": "The name of the company, in case if the Recipient address is not residential.",
            "example": "PB"
          },
          "phone": {
            "type": "string",
            "description": "This is recipient's phone number. Enter the digits with or without spaces or hyphens. <br /> `Max length = 15`.",
            "example": "203-555-1213"
          },
          "email": {
            "type": "string",
            "description": "This must be recipients's valid email. <br /> `Max length = 50` ",
            "example": "anupama.kr@gmail.com"
          },
          "residential": {
            "type": "boolean",
            "description": "The specified address can be Residential or Official. In case if the address is Residential, the boolean value will be 'true', else it will take 'false'.",
            "example": true
          }
        }
      },
      "parcel": {
        "type": "object",
        "required": [
          "weightUnit"
        ],
        "description": "The details of the Parcel.",
        "properties": {
          "length": {
            "type": "number",
            "format": "float",
            "description": "Length is always the greatest of the three dimensions. The other two dimensions are used in the calculation of the girth.",
            "example": 2
          },
          "width": {
            "type": "number",
            "format": "float",
            "description": "There is no strict rule as to which element is the width or the height, but the width is the second greatest dimension of a parcel by convention.",
            "example": 1
          },
          "height": {
            "type": "number",
            "format": "float",
            "description": "By convention the height is the smallest dimension of the parcel.",
            "example": 1
          },
          "dimUnit": {
            "type": "string",
            "description": "DimUnit is a standard for measuring the physical quantities of specified dimension parameters.<br /> The valid values are: Inch and Centimeter.",
            "example": "IN",
            "enum": [
              "IN",
              "CM"
            ]
          },
          "weightUnit": {
            "type": "string",
            "description": "WeightUnit is a standard for measuring the physical quantities of specified weight.<br /> The valid values are: Ounces and Grams.<br /> For USPS shipments, set this to OZ.",
            "example": "OZ",
            "enum": [
              "OZ",
              "GM"
            ]
          },
          "weight": {
            "type": "number",
            "format": "float",
            "description": "Weight measures the heaviness of an object (how heavy an object is) .",
            "example": 2
          }
        }
      },
      "additionalAddresses": {
        "type": "array",
        "description": "A list of additional addresses associated with the shipment. \n- Each object includes an address and its designated type, such as BROKER or other parties involved in customs or shipping processes. \n- Additional address could be domestic or International both.\n",
        "items": {
          "type": "object",
          "properties": {
            "address": {
              "type": "object",
              "description": "The additional address details.",
              "properties": {
                "residential": {
                  "type": "boolean",
                  "example": false,
                  "description": "If the address is residential."
                },
                "phone": {
                  "type": "string",
                  "example": "732-443-1007",
                  "description": "Contact phone number for the address."
                },
                "countryCode": {
                  "type": "string",
                  "example": "US",
                  "description": "The ISO 2-letter country code."
                },
                "postalCode": {
                  "type": "string",
                  "example": "08810-1411",
                  "description": "ZIP or postal code."
                },
                "cityTown": {
                  "type": "string",
                  "example": "DAYTON",
                  "description": "Name of the city or town."
                },
                "name": {
                  "type": "string",
                  "example": "Warehouse Manager",
                  "description": "Name of the contact person."
                },
                "stateProvince": {
                  "type": "string",
                  "example": "NJ",
                  "description": "State or province code."
                },
                "addressLine1": {
                  "type": "string",
                  "example": "2270 US HIGHWAY 130",
                  "description": "Primary street address line."
                }
              }
            },
            "addressType": {
              "type": "string",
              "example": "BROKER",
              "description": "Type of the additional address (e.g., BROKER). This is required if passing `additionalAddresses`. <br/> **Note** The addressType `SHIPPER` is returned only in USPS responses.",
              "enum": [
                "HOLD",
                "BROKER",
                "THIRD_PARTY",
                "PICKUP",
                "EXPORTER",
                "ALT_DELIVERY",
                "SHIPPER"
              ]
            }
          }
        }
      },
      "UnauthorizedErrors": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string",
            "description": "This is HTTP 401 Unauthorized response status code, which indicates that the client request has not been completed because it lacks valid authentication credentials for the requested resource."
          }
        },
        "required": [
          "message"
        ]
      },
      "InternalServerErrors": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string",
            "description": "This is HTTP 500 Internal Server Error response status code, which indicates that the server encountered an unexpected condition that prevented it from fulfilling the request."
          }
        },
        "required": [
          "message"
        ]
      },
      "InvalidErrors": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "errorCode": {
              "type": "string",
              "description": "Error code(s) that appear due to HTTP  400- Invalid or Bad Request, e.g. validation-error.",
              "example": "validation_error"
            },
            "errorDescription": {
              "type": "string",
              "description": "The HTTP 400 Bad/Invalid Request response status code indicates that the server cannot process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing).",
              "example": "Error while getting rates for carrier with carrierAccount eRMnRx4mzPP."
            },
            "additionalCode": {
              "type": "string",
              "description": "A unique identifier for the error, for example 1101055, 0100008, or 1021126."
            },
            "additionalInfo": {
              "type": "string",
              "description": "This is an additional information about the error. This error 'Invalid Request' might appear due to invalid dimension, weight, or serviceid, or if the information is missing."
            },
            "additionalParameters": {
              "type": "array",
              "items": {
                "type": "string",
                "description": "The field(s) that might be incorrect in the request."
              }
            }
          }
        }
      },
      "NotFoundErrors": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "errorCode": {
              "type": "string",
              "example": "not_found",
              "description": "Error code(s) that appear due HTTP 404 Page or File not found."
            },
            "errorDescription": {
              "type": "string",
              "example": "resource not found",
              "description": "The HTTP 404 Not Found response status code indicates that the server cannot find the requested resource."
            },
            "additionalCode": {
              "type": "string",
              "description": "A unique identifier for the error, for example 0100025, 1110017, or 1090001."
            },
            "additionalInfo": {
              "type": "string",
              "description": "Additional information about the error. This error 'Not Found' might appear due to `Shipment Not Found`, `No Shipments to close`, or `Original Transaction not found`."
            },
            "additionalParameters": {
              "type": "array",
              "items": {
                "type": "string",
                "description": "The field(s) that might be incorrect in the request."
              }
            }
          }
        }
      }
    },
    "responses": {
      "UnauthorizedError": {
        "description": "The request could not be authorized.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/UnauthorizedErrors"
            }
          }
        }
      },
      "InternalServerError": {
        "description": "The request could not be completed due to an internal server error.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/InternalServerErrors"
            }
          }
        }
      },
      "InvalidError": {
        "description": "Invalid request.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/InvalidErrors"
            }
          }
        }
      },
      "NotFoundError": {
        "description": "The requested resource was not found.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/NotFoundErrors"
            }
          }
        }
      }
    },
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer"
      }
    }
  }
}