openapi: 3.0.0
info:
  title: Shipping Options
  description: "Find all relevant shipping options, rates and service standards."
  termsOfService: https://about.usps.com/termsofuse.htm
  contact:
    name: USPS Support
    email: apisupport@usps.gov
  version: 3.1.4
  x-updated-on: MM/DD/YYYY - <team name>
  x-reviewed-on: MM/DD/YYYY - <team name>
  x-approved-on: MM/DD/YYYY - <team name>
servers:
- url: https://api.usps.com/shipments/v3
  description: Base Path
paths:
  /options/search:
    post:
      tags:
      - Resources
      summary: Presents options for shipping a package.
      description: |-
        Based on the inputs below, the API generates a comprehensive list of shipping options that comply with USPS Shipping Standards, all within a single request.  For international mail classes deliveries there are no commitments.  APO, DPO, and FPO locations also do not offer commitments.
          | Element                       | Description |
          | ----------------------------- | --------|
          | **originZIPCode**             | The origin ZIP Code&#8482; is where the package is being mailed from and is used for calculating pricing. |
          | **destinationZIPCode**        | The destination ZIP Code&#8482; of the recipient is used for calculating pricing. |
          | **packageDescription**        | Package characteristics used to price the shipment including requested mail class, weight, dimensions, and more. |
          | **pricingOptions**         | Pricing options such as price type and supporting information needed for pricing the shipping option. |
      operationId: post-options-search
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OptionsRequest'
          application/xml:
            schema:
              $ref: '#/components/schemas/OptionsRequest'
        required: true
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OptionsResponse'
              examples:
                OptionExample1:
                  $ref: '#/components/examples/OptionsExample'
              encoding:
                metadata:
                  contentType: application/json
                  style: form
            application/xml:
              schema:
                $ref: '#/components/schemas/OptionsResponse'
              examples:
                OptionExample1:
                  $ref: '#/components/examples/OptionsExample'
              encoding:
                metadata:
                  contentType: application/xml
                  style: form
        "400":
          description: Bad Request.  There is an error in the received request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
            examples: {}
            application/xml:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
        "401":
          description: Unauthorized request.
          headers:
            WWW-Authenticate:
              $ref: '#/components/headers/WWWAuthenticate'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
            examples: {}
            application/xml:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
        "403":
          description: Access is denied.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
            examples: {}
            application/xml:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
        "429":
          description: Too Many Requests. Too many requests have been received from client in a short amount of time.
          headers:
            Retry-After:
              $ref: '#/components/headers/RetryAfter'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
            examples: {}
            application/xml:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
        "503":
          description: Service is unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
            examples: {}
            application/xml:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
        default:
          description: Other unanticipated errors that may occur.
          content: {}
components:
  schemas:
    OptionsRequest:
      description: All ingredients requested to calculate pricing based on USPS service standards.
      oneOf:
      - $ref: '#/components/schemas/DomesticOptionsRequest'
      - $ref: '#/components/schemas/InternationalOptionsRequest'
    DomesticOptionsRequest:
      required:
      - destinationZIPCode
      - originZIPCode
      - packageDescription
      type: object
      properties:
        pricingOptions:
          minItems: 1
          type: array
          items:
            $ref: '#/components/schemas/DomesticPricingOption'
        originZIPCode:
          $ref: '#/components/schemas/originZIPCode'
        destinationZIPCode:
          $ref: '#/components/schemas/destinationZIPCode'
        packageDescription:
          $ref: '#/components/schemas/DomesticPackageDescription'
        shippingFilter:
          type: string
          description: A filter for domestic results to return only one response based on lowest price or fastest service standard
          enum:
          - PRICE
          - SERVICE_STANDARDS
      additionalProperties: false
    InternationalOptionsRequest:
      required:
      - destinationCountryCode
      - foreignPostalCode
      - originZIPCode
      - packageDescription
      type: object
      properties:
        pricingOptions:
          minItems: 1
          type: array
          items:
            $ref: '#/components/schemas/InternationalPricingOption'
        originZIPCode:
          $ref: '#/components/schemas/originZIPCode'
        foreignPostalCode:
          $ref: '#/components/schemas/postalCode'
        destinationCountryCode:
          type: string
          description: Country of destination.
        packageDescription:
          $ref: '#/components/schemas/InternationalPackageDescription'
        shippingFilter:
          type: string
          description: A filter for international results to return only one response based on lowest price.  There are no service standards for international.
          enum:
          - PRICE
      additionalProperties: false
    OptionsResponse:
      type: object
      description: TBD
      oneOf:
      - $ref: '#/components/schemas/DomesticOptionsResponse'
      - $ref: '#/components/schemas/InternationalOptionsResponse'
    DomesticOptionsResponse:
      type: object
      properties:
        originZIPCode:
          pattern: "^\\d{5}(?:[-\\s]\\d{4})?$"
          type: string
          description: This is the originating ZIP Code&#8482; for the package.
        destinationZIPCode:
          pattern: "^\\d{5}(?:[-\\s]\\d{4})?$"
          type: string
          description: This is destination ZIP Code&#8482; for the package.
        pricingOptions:
          type: array
          xml:
            name: pricingOptions
            wrapped: true
          items:
            $ref: '#/components/schemas/DomesticPricingOption'
      additionalProperties: false
      description: TBD
    InternationalOptionsResponse:
      type: object
      properties:
        originZIPCode:
          pattern: "^\\d{5}(?:[-\\s]\\d{4})?$"
          type: string
          description: This is the originating ZIP Code&#8482; for the package.
        foreignPostalCode:
          $ref: '#/components/schemas/postalCode'
        destinationCountryCode:
          type: string
          description: Country of destination.
        pricingOptions:
          type: array
          xml:
            name: pricingOptions
            wrapped: true
          items:
            $ref: '#/components/schemas/InternationalPricingOption'
      additionalProperties: false
      description: TBD
    DomesticOptions:
      type: object
      properties:
        mailClass:
          type: string
          description: "USPS mail classes. \nThe domestic mail service requested.\n * 'PARCEL_SELECT'\n * 'PARCEL_SELECT_LIGHTWEIGHT'\n * 'USPS_CONNECT_LOCAL'\n * 'USPS_CONNECT_REGIONAL'\n * 'USPS_CONNECT_MAIL'\n * 'USPS_CONNECT_NEXT_DAY'\n * 'USPS_CONNECT_SAME_DAY'\n * 'USPS_GROUND_ADVANTAGE'\n * 'PRIORITY_MAIL_EXPRESS'\n * 'PRIORITY_MAIL'\n * 'LIBRARY_MAIL'\n * 'MEDIA_MAIL'\n * 'BOUND_PRINTED_MATTER'\n"
          enum:
          - PARCEL_SELECT
          - USPS_CONNECT_LOCAL
          - USPS_CONNECT_REGIONAL
          - USPS_CONNECT_MAIL
          - USPS_CONNECT_NEXT_DAY
          - USPS_CONNECT_SAME_DAY
          - USPS_GROUND_ADVANTAGE
          - PRIORITY_MAIL_EXPRESS
          - PRIORITY_MAIL
          - LIBRARY_MAIL
          - MEDIA_MAIL
          - BOUND_PRINTED_MATTER
        rateOptions:
          type: array
          xml:
            name: rateOptions
            wrapped: true
          items:
            $ref: '#/components/schemas/DomesticRateOptions'
      additionalProperties: false
      description: TBD
      xml:
        name: shippingOption
    InternationalOptions:
      type: object
      properties:
        mailClass:
          type: string
          description: "International Mail classes for label \nThe mail service requested.\n * FIRST-CLASS_PACKAGE_INTERNATIONAL_SERVICE\n * PRIORITY_MAIL_INTERNATIONAL\n * PRIORITY_MAIL_EXPRESS_INTERNATIONAL\n"
          enum:
          - FIRST-CLASS_PACKAGE_INTERNATIONAL_SERVICE
          - PRIORITY_MAIL_INTERNATIONAL
          - PRIORITY_MAIL_EXPRESS_INTERNATIONAL
        rateOptions:
          type: array
          xml:
            name: rateOptions
            wrapped: true
          items:
            $ref: '#/components/schemas/InternationalRateOptions'
      additionalProperties: false
      description: TBD
      xml:
        name: shippingOption
    DomesticRateOptions:
      type: object
      description: TBD
      allOf:
      - type: object
        properties:
          commitment:
            $ref: '#/components/schemas/Commitment'
      - $ref: '#/components/schemas/InternationalRateOptions'
    InternationalRateOptions:
      type: object
      properties:
        totalPrice:
          type: number
          description: The totalBasePrice and all extra service prices.
          format: double
          example: 3.35
        totalBasePrice:
          type: number
          description: "The price of the rate, fees, and pound postage."
          format: double
          example: 0.63
        rates:
          type: array
          xml:
            wrapped: true
          items:
            $ref: '#/components/schemas/InternationalRateOptions_rates'
        extraServices:
          type: array
          description: Extra services requested on the package.
          xml:
            name: extraServices
            wrapped: true
          items:
            $ref: '#/components/schemas/InternationalRateOptions_extraServices'
      additionalProperties: false
      description: TBD
      xml:
        name: rateOption
    DomesticPackageDescription:
      allOf:
      - $ref: '#/components/schemas/ShippingOptionsPackageDescription'
      - required:
        - height
        - length
        - mailClass
        - weight
        - width
        type: object
        properties:
          mailClass:
            type: string
            description: Mail classes for the label.
            enum:
            - PARCEL_SELECT
            - PARCEL_SELECT_LIGHTWEIGHT
            - USPS_CONNECT_LOCAL
            - USPS_CONNECT_REGIONAL
            - USPS_CONNECT_MAIL
            - USPS_CONNECT_NEXT_DAY
            - USPS_CONNECT_SAME_DAY
            - USPS_GROUND_ADVANTAGE
            - PRIORITY_MAIL_EXPRESS
            - PRIORITY_MAIL
            - FIRST-CLASS_PACKAGE_SERVICE
            - LIBRARY_MAIL
            - MEDIA_MAIL
            - BOUND_PRINTED_MATTER
            - ALL
          extraServices:
            maxItems: 5
            minItems: 0
            type: array
            description: Extra Services requested on the package.
            xml:
              name: extraServices
              wrapped: true
            items:
              $ref: '#/components/schemas/ExtraService'
          packageValue:
            minimum: 0
            type: number
            description: "The merchandise value of the package, in US dollars. Used to calculate Insurance Fees if requested."
            example: 35
          mailingDate:
            type: string
            oneOf:
            - $ref: '#/components/schemas/MailingDate'
            - $ref: '#/components/schemas/MailingDateTime'
        additionalProperties: true
        description: "Package characteristics used to price the shipment including requested mail class, weight, dimensions, and more."
    InternationalPackageDescription:
      allOf:
      - $ref: '#/components/schemas/ShippingOptionsPackageDescription'
      - required:
        - height
        - length
        - mailClass
        - weight
        - width
        type: object
        properties:
          mailClass:
            type: string
            description: "International Mail classes for the label.  GLOBAL_EXPRESS_GUARANTEED is supported by shipping options, but is not supported by labels"
            enum:
            - FIRST-CLASS_PACKAGE_INTERNATIONAL_SERVICE
            - PRIORITY_MAIL_INTERNATIONAL
            - PRIORITY_MAIL_EXPRESS_INTERNATIONAL
            - GLOBAL_EXPRESS_GUARANTEED
            - ALL
          extraServices:
            maxItems: 5
            minItems: 0
            type: array
            description: Extra Services requested on the package.
            xml:
              name: extraServices
              wrapped: true
            items:
              $ref: '#/components/schemas/ExtraService'
          packageValue:
            minimum: 0
            type: number
            description: "The merchandise value of the package, in US dollars. Used to calculate Insurance Fees if requested."
            example: 35
          mailingDate:
            description: "Supports either a date or date-time entry, if using a date the time will be defaulted to 6:00 pm local time for the purpose of Service Delivery Standard estimates. A mailing date of 0-30 days in advance can be requested. "
            oneOf:
            - type: string
              format: date
            - type: string
              format: date-time
        additionalProperties: true
        description: "Package characteristics used to price the shipment including requested mail class, weight, dimensions, and more."
    ExtraService:
      title: Extra Service Codes
      pattern: "\\d{3}"
      type: integer
      description: "Extra Service Code requested. When review HAZMAT shipping options, users must include Extra Service Code 857.\n * 365 - Global Direct Entry\n * 415 - USPS Label Delivery Service\n * 480 - Tracking Plus 6 Months\n * 481 - Tracking Plus 1 Year\n * 482 - Tracking Plus 3 Years\n * 483 - Tracking Plus 5 Years\n * 484 - Tracking Plus 7 Years\n * 485 - Tracking Plus 10 Years\n * 486 - Tracking Plus Signature 3 Years\n * 487 - Tracking Plus Signature 5 Years\n * 488 - Tracking Plus Signature 7 Years\n * 489 - Tracking Plus Signature 10 Years\n * 810 - Hazardous Materials - Air Eligible Ethanol\n * 811 - Hazardous Materials - Class 1 – Toy Propellant/Safety Fuse Package\n * 812 - Hazardous Materials - Class 3 - Flammable and Combustible Liquids\n * 813 - Hazardous Materials - Class 7 – Radioactive Materials\n * 814 - Hazardous Materials - Class 8 – Air Eligible Corrosive Materials\n * 815 - Hazardous Materials - Class 8 – Nonspillable Wet Batteries\n * 816 - Hazardous Materials - Class 9 - Lithium Battery Marked Ground Only  \n * 817 - Hazardous Materials - Class 9 - Lithium Battery Returns\n * 818 - Hazardous Materials - Class 9 - Marked Lithium Batteries\n * 819 - Hazardous Materials - Class 9 – Dry Ice\n * 820 - Hazardous Materials - Class 9 – Unmarked Lithium Batteries\n * 821 - Hazardous Materials - Class 9 – Magnetized Materials\n * 822 - Hazardous Materials - Division 4.1 – Mailable Flammable Solids and Safety Matches \n * 823 - Hazardous Materials - Division 5.1 – Oxidizers \n * 824 - Hazardous Materials - Division 5.2 – Organic Peroxides \n * 825 - Hazardous Materials - Division 6.1 – Toxic Materials \n * 826 - Hazardous Materials - Division 6.2 Biological Materials\n * 827 - Hazardous Materials - Excepted Quantity Provision \n * 828 - Hazardous Materials - Ground Only Hazardous Materials\n * 829 - Hazardous Materials - Air Eligible ID8000 Consumer Commodity\n * 830 - Hazardous Materials - Lighters \n * 831 - Hazardous Materials - Limited Quantity Ground \n * 832 - Hazardous Materials - Small Quantity Provision (Markings Required)\n * 857 - Hazardous Materials\n * 910 - Certified Mail\n * 911 - Certified Mail Restricted Delivery\n * 912 - Certified Mail Adult Signature Required\n * 913 - Certified Mail Adult Signature Restricted Delivery\n * 915 - Collect on Delivery\n * 917 - Collect on Delivery Restricted Delivery\n * 920 - USPS Tracking Electronic\n * 921 - Signature Confirmation\n * 922 - Adult Signature Required\n * 923 - Adult Signature Restricted Delivery\n * 924 - Signature Confirmation Restricted Delivery\n * 925 - Priority Mail Express Merchandise Insurance \n * 930 - Insurance\n * 931 - Insurance > $500\n * 934 - Insurance Restricted Delivery\n * 940 - Registered Mail\n * 941 - Registered Mail Restricted Delivery\n * 955 - Return Receipt\n * 957 - Return Receipt Electronic\n * 981 - Signature Requested (PRIORITY_MAIL_EXPRESS only)\n * 984 - Parcel Locker Delivery\n * 986 - PO to Addressee (PRIORITY_MAIL_EXPRESS only)\n * 991 - Sunday Delivery"
      enum:
      - 365
      - 415
      - 480
      - 481
      - 482
      - 483
      - 484
      - 485
      - 486
      - 487
      - 488
      - 489
      - 810
      - 811
      - 812
      - 813
      - 814
      - 815
      - 816
      - 817
      - 818
      - 819
      - 820
      - 821
      - 822
      - 823
      - 824
      - 825
      - 826
      - 827
      - 828
      - 829
      - 830
      - 831
      - 832
      - 857
      - 910
      - 911
      - 912
      - 913
      - 915
      - 917
      - 920
      - 921
      - 922
      - 923
      - 924
      - 925
      - 930
      - 931
      - 934
      - 940
      - 941
      - 955
      - 957
      - 981
      - 984
      - 986
      - 991
    Commitment:
      title: Commitment
      type: object
      properties:
        name:
          type: string
          description: "Commitment name such as 1-day, 2-day, 3-day, Military, DPO"
        scheduleDeliveryDate:
          type: string
          description: Date in the YYYY-MM-DD format.
          format: date
        guaranteedDelivery:
          type: boolean
          description: "If true, the scheduleDeliveryDate is guaranteed."
      additionalProperties: false
      description: The commitment and scheduled delivery date of the package.
    DomesticPricingOption:
      required:
      - priceType
      type: object
      properties:
        shippingOptions:
          type: array
          readOnly: true
          xml:
            wrapped: true
          items:
            $ref: '#/components/schemas/DomesticOptions'
        priceType:
          type: string
          description: Price type can be  * 'RETAIL' * 'COMMERCIAL' * 'CONTRACT'
          default: COMMERCIAL
          enum:
          - RETAIL
          - COMMERCIAL
          - CONTRACT
        paymentAccount:
          $ref: '#/components/schemas/PaymentAccount'
      additionalProperties: false
      xml:
        name: pricingOption
    InternationalPricingOption:
      required:
      - priceType
      type: object
      properties:
        shippingOptions:
          type: array
          readOnly: true
          xml:
            wrapped: true
          items:
            $ref: '#/components/schemas/InternationalOptions'
        priceType:
          type: string
          description: Price type can be  * 'RETAIL' * 'COMMERCIAL' * 'CONTRACT'
          default: COMMERCIAL
          enum:
          - RETAIL
          - COMMERCIAL
          - CONTRACT
        paymentAccount:
          $ref: '#/components/schemas/PaymentAccount'
      additionalProperties: false
      xml:
        name: pricingOption
    PaymentAccount:
      title: Payment Account
      type: object
      properties:
        accountType:
          type: string
          description: The type of payment account.  METER pricing is only available to PC Postage customers on domestic requests.  METER pricing for international requests will be available at a future date.
          example: EPS
          enum:
          - EPS
          - PERMIT
          - METER
        accountNumber:
          type: string
          description: "The Enterprise Payment Account, Permit number, or PC Postage meter number associated with a contract."
      additionalProperties: false
      description: Payment account information.
    ErrorMessage:
      title: Error
      type: object
      properties:
        apiVersion:
          type: string
          description: The version of the API that was used and that raised the error.
        error:
          $ref: '#/components/schemas/ErrorMessage_error'
      additionalProperties: true
      description: Standard error message response.
    originZIPCode:
      pattern: "^\\d{5}(?:[-\\s]\\d{4})?$"
      type: string
      description: The originating ZIP code for the package.
    destinationZIPCode:
      pattern: "^\\d{5}(?:[-\\s]\\d{4})?$"
      type: string
      description: The destination ZIP code for the package.
    postalCode:
      maxLength: 11
      type: string
      description: This is the Postal Code used in an international addresses.
    ShippingOptionsPackageDescription:
      title: Package Description
      type: object
      properties:
        weight:
          minimum: 0
          exclusiveMinimum: true
          type: number
          description: "The package weight, in weightUOM (Unit Of Measure). Items must weigh 70 pounds (1120 ounces) or less."
        length:
          minimum: 0
          exclusiveMinimum: true
          type: number
          description: "The length of the container, in dimensionsUOM. If partial dimensions are provided, an error response will return. Length, Width, Height are required for accurate pricing of a rectangular package when any dimension of the item exceeds 12 inches. In addition, Girth is required only for a non- rectangular package in addition to Length, Width, Height when any dimension of the package exceeds 12 inches. For rectangular packages, the Girth dimension must be left blank as this dimension is to only be used for non- rectangular packages."
        height:
          minimum: 0
          exclusiveMinimum: true
          type: number
          description: "The height of the container, in dimensionsUOM. If partial dimensions are provided, an error response will return. Length, Width, Height are required for accurate pricing of a rectangular package when any dimension of the item exceeds 12 inches. In addition, Girth is required only for a non- rectangular package in addition to Length, Width, Height when any dimension of the package exceeds 12 inches. For rectangular packages, the Girth dimension must be left blank as this dimension is to only be used for non- rectangular packages."
        width:
          minimum: 0
          exclusiveMinimum: true
          type: number
          description: "The width of the container, in dimensionsUOM. If partial dimensions are provided, an error response will return. Length, Width, Height are required for accurate pricing of a rectangular package when any dimension of the item exceeds 12 inches. In addition, Girth is required only for a non- rectangular package in addition to Length, Width, Height when any dimension of the package exceeds 12 inches. For rectangular packages, the Girth dimension must be left blank as this dimension is to only be used for non- rectangular packages."
        girth:
          minimum: 0
          exclusiveMinimum: true
          type: number
          description: "The girth of the container, in dimensionsUOM. If partial dimensions are provided, an error response will return. Length, Width, Height are required for accurate pricing of a rectangular package when any dimension of the item exceeds 12 inches. In addition, Girth is required only for a non- rectangular package in addition to Length, Width, Height when any dimension of the package exceeds 12 inches. For rectangular packages, the Girth dimension must be left blank as this dimension is to only be used for non- rectangular packages."
      additionalProperties: true
      description: Package Definitions
    MailingDate:
      type: string
      description: "The date package will be mailed. The mailing date may be today plus 0 to 7 days in advance. Enter the date in the full-date notation as defined by [RFC 3339, section 5.6](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6)."
      format: date
    MailingDateTime:
      type: string
      description: "The date and time a package will be mailed. The mailing date may be today plus 0 to 7 days in advance. Enter the date in the date-time notation as defined by [RFC 3339, section 5.6](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6)."
      format: date-time
    InternationalRateOptions_fees:
      type: object
      properties:
        name:
          type: string
          description: Name of the fee.
        SKU:
          type: string
          description: Pricing SKU
        price:
          type: number
          description: The price for the fee.
          format: double
    InternationalRateOptions_rates:
      type: object
      properties:
        description:
          type: string
          description: The description of the price.
        startDate:
          type: string
          description: Effective start date of the rate.
          format: date
          example: 2021-07-16
        endDate:
          type: string
          description: Effective end date of the rate.  If blank the rate doesn't have an end date as of yet.
          format: date
          example: 2021-07-16
        SKU:
          type: string
          description: Pricing SKU
        price:
          type: number
          description: "Amount of Postage Required, does not include insurance or other extra service fees."
          format: double
        mailClass:
          type: string
          description: The mail class of the price.
        zone:
          type: string
          description: Indicates the number of postal rate zones between the origin and destination ZIP Code&#8482;.
        weight:
          type: number
          description: "The package weight, in weightUOM. Items must weigh 70 pounds (1120 ounces) or less."
        dimWeight:
          type: number
          description: "The dimensional weight of package, if greater than specified in weight, in ounces."
        dimensionalWeight:
          type: number
          description: "The dimensional weight of package, if greater than specified in weight, in ounces. This will be removed in July 2025."
          deprecated: true
        priceType:
          type: string
          description: |-
            The type of price applied.
             * Valid Options for Domestic Prices include: 'RETAIL','COMMERCIAL' & 'CONTRACT'
             * Valid Options for International Prices include: 'RETAIL', 'COMMERCIAL', 'COMMERCIAL_BASE', 'COMMERCIAL_PLUS' & 'CONTRACT'
          enum:
          - RETAIL
          - COMMERCIAL
          - COMMERCIAL_BASE
          - COMMERCIAL_PLUS
          - CONTRACT
        fees:
          type: array
          description: Fees associated to the package.
          items:
            $ref: '#/components/schemas/InternationalRateOptions_fees'
        productName:
          type: string
          description: A business friendly name for a product that can be displayed to a customer on a shipping portal
        productDefinition:
          type: string
          description: A business friendly description for a product that can be displayed to a customer on a shipping portal
      additionalProperties: false
      xml:
        name: rate
    InternationalRateOptions_extraServices:
      type: object
      properties:
        name:
          type: string
          description: Name of the fee.
        SKU:
          type: string
          description: Pricing SKU
        priceType:
          type: string
          description: "The type of price applied (Retail, Commercial, Contract, NSA (deprecated))."
          enum:
          - RETAIL
          - COMMERCIAL
          - CONTRACT
          - NSA
        price:
          type: number
          description: The price for the fee.
          format: double
        warnings:
          type: array
          xml:
            wrapped: true
          items:
            type: string
            xml:
              name: warning
      additionalProperties: false
    ErrorMessage_error_source:
      type: object
      properties:
        parameter:
          type: string
          description: The input in the request which caused an error.
        example:
          type: string
          description: An example of a valid value for the input parameter.
      additionalProperties: true
      description: The element that is suspected of originating the error.  Helps to pinpoint the problem.
    ErrorMessage_error_errors:
      type: object
      properties:
        status:
          type: string
          description: The status code response returned to the client.
        code:
          type: string
          description: An internal subordinate code used for error diagnosis.
        title:
          type: string
          description: A human-readable title that identifies the error.
        detail:
          type: string
          description: A human-readable description of the error that occurred.
        source:
          $ref: '#/components/schemas/ErrorMessage_error_source'
      additionalProperties: true
    ErrorMessage_error:
      type: object
      properties:
        code:
          type: string
          description: The error status code that has been returned in response to the request.
        message:
          type: string
          description: A human-readable message describing the error.
        errors:
          type: array
          items:
            $ref: '#/components/schemas/ErrorMessage_error_errors'
      additionalProperties: true
      description: The high-level error that has occurred as indicated by the status code.
  examples:
    OptionsExample:
      summary: options example
      description: options example
      value:
        originZIPCode: 37125-8734
        destinationZIPCode: "71270"
        pricingOptions:
        - shippingOptions:
          - mailClass: PARCEL_SELECT
            rateOptions:
            - commitment:
                name: 3-day
                scheduleDeliveryDate: 2021-07-19
              totalPrice: 3.35
              totalBasePrice: 0.63
              rates:
              - description: Parcel Select Flat Rate Envelope
                startDate: 2021-07-16
                endDate: 2021-07-16
                SKU: X123456
                price: 0
                zone: "02"
                weight: 0
                dimWeight: 0
                fees:
                - name: string
                  SKU: X654321
                  price: 0
              extraServices:
              - name: Adult Signature Required
                SKU: X135791
                price: 0
          priceType: COMMERCIAL
          paymentAccount:
            accountType: EPS
            accountNumber: "123456789"
  headers:
    WWWAuthenticate:
      description: Hint to the client application which security scheme to authorize a resource request.
      required: false
      schema:
        type: string
        example: "WWW-Authenticate: Bearer realm=\"https://api.usps.com\""
    RetryAfter:
      description: Indicate to the client application a time after which they can retry a resource request.
      required: false
      schema:
        type: string
        example: "Retry-After: 30"
