> ## Documentation Index
> Fetch the complete documentation index at: https://docs.goshippo.com/llms.txt
> Use this file to discover all available pages before exploring further.

<AgentInstructions>

## Submitting Feedback

If you encounter incorrect, outdated, or confusing documentation on this page, submit feedback:

POST https://docs.goshippo.com/feedback

```json
{
  "path": "/api-reference/rates-at-checkout/generate-a-live-rates-request",
  "feedback": "Description of the issue"
}
```

Only submit feedback when you have something specific and actionable to report.

</AgentInstructions>

# Generate a live rates request

> Initiates a live rates request. Include either the object ID for
an existing address record or a fully formed address object when entering
an address value. You can also enter the object ID of an existing user parcel
template or a fully formed user parcel template object as the parcel value.



## OpenAPI

````yaml /spec/shippoapi/public-api.yaml post /live-rates
openapi: 3.1.0
info:
  title: Shippo external API.
  version: '2018-02-08'
  x-logo:
    url: https://docs.goshippo.com/images/shippo-logo.svg
  contact:
    name: Shippo Developer Platform
    url: https://goshippo.com/contact/
  description: Use this API to integrate with the Shippo service
servers:
  - url: https://api.goshippo.com
security:
  - APIKeyHeader: []
tags:
  - name: Overview
    description: >-
      <p style="text-align: center; background-color: #F2F3F4; padding: 16px
      24px; border-radius: 4px;">
        First-time users and those looking for specific integration tutorials,
        <a href="/shippoapi/public-api/overview">see our full API documentation and guides.</a><br>
        Download the <a href="/spec/shippoapi/public-api.yaml">API Specification yaml file</a>
      </p>


      <h3>API Resources</h3>

      All API URLs listed in this documentation are relative to
      <b>https://api.goshippo.com/</b>.


      For example, the `/addresses/` resource is reachable at
      `https://api.goshippo.com/addresses/`.



      <h3>Authentication</h3>

      The API requires Shippo's token HTTP Authentication with your Shippo token
      (live or test). 


      In order to authenticate properly, please put `Authorization: ShippoToken
      <token>` in your header. You can find your token on the 

      <a href="https://goshippo.com/user/apikeys/">Shippo API settings page</a>.




      For more information about authentication and test mode, 

      <a
      href="https://docs.goshippo.com/docs/guides_general/authentication/">please
      visit our Authentication guide</a>.


      The API is available via Secure Socket Layer (SSL) only. All requests to
      the Shippo API must use TLS version 1.2 or higher.


      <h3>Request & Response Data</h3>

      Request data is passed to the API by <b>POSTing JSON objects</b> with the
      appropriate key/value-pairs to the respective 

      resource. The documentation for each API resource contains more details on
      the values accepted by a given resource.


      Response data also formatted as JSON object. You can specify how many
      results per page are to be returned. For instance, 

      `/rates/?results=25` will return up to 25 results.


      <h3>REST & Disposable Objects</h3>

      The Shippo API is built around <a
      href="http://en.wikipedia.org/wiki/Representational_State_Transfer">REST
      principles</a>. 

      Use POST requests to create objects, GET requests to retrieve objects, and
      PUT requests to update objects.


      Only the Carrier Accounts object can be updated via PUT requests. All
      other objects such as Addresses, Parcels, 

      Shipments, Rates, Transactions, Refunds, Customs Items, and Customs
      Declarations are disposable. This means that 

      once you have created an object, you cannot change it. Instead, create a
      new one with the desired values.


      <h3>API Version</h3>


      This reference guide supports the Shippo API version: `2018-02-08` . 


      To see reference guides for older API versions, see our <a
      href="https://docs.goshippo.com/docs/guides_general/legacy_reference/">legacy
      reference guide</a>. 

      For more information about Shippo API versions, see our <a
      href="https://docs.goshippo.com/docs/api_concepts/apiversioning/">API
      versions guide</a>.
  - name: Addresses
    description: >-
      Addresses are the locations a parcel is being shipped **from** and **to**.
      They represent company and residential places. Among other things, you can
      use address objects to create shipments, calculate shipping rates, and
      purchase shipping labels.
  - name: Parcels
    description: >-
      A parcel is an item you are shipping. The parcel object includes details
      about its physical make-up of the parcel. It includes dimensions and
      weight that Shippo uses to calculate rates.
  - name: Shipments
    description: >-
      A shipment is the act of transporting goods. A shipment object contains
      **to** and **from** addresses, and the parcel details that you are
      shipping. You can use the shipment object to retrieve shipping rates and
      purchase a shipping label.
  - name: Rates
    description: >-
      A rate is the cost to ship a parcel from a carrier. The rate object
      details the service level including the cost and transit time. 
  - name: Transactions
    x-displayName: Transactions (shipping labels)
    description: >-
      A transaction is the purchase of a shipping label from a shipping provider
      for a specific service. You can print purchased labels and used them to
      ship a parcel with a carrier, such as USPS or FedEx.
  - name: Customs Items
    description: >-
      Customs declarations are relevant information, including one or multiple
      customs items, you need to provide for customs clearance for your
      international shipments.
  - name: Customs Declarations
    description: >-
      Customs declarations are relevant information, including one or multiple
      customs items, you need to provide for 

      customs clearance for your international shipments.
  - name: Refunds
    description: >-
      Refunds are reimbursements for successfully created but unused shipping
      labels or other charges.
  - name: Manifests
    description: >-
      A manifest is a single-page document with a barcode that carriers can scan
      to accept all packages into transit without the need to scan each item
      individually.

      They are close-outs of shipping labels of a certain day. Some carriers
      require manifests to  process the shipments.
  - name: Carrier Accounts
    description: >-
      Carriers are the companies who deliver your package. Shippo uses Carrier
      account objects as credentials to retrieve shipping rates and purchase
      labels from shipping Carriers.
  - name: Webhooks
    description: >-
      Webhooks are a way for Shippo to notify your application when a specific
      event occurs. For example, when a label is purchased or when a shipment
      tracking status has changed. You can use webhooks to trigger actions in
      your application, such as sending an email or updating a database.
  - name: Tracking Status
    description: >-
      <p style="text-align: center; background-color: #F2F3F4;"></br>

      If you purchased your shipping label through Shippo, you can also get all
      the tracking details of your Shipment 

      from the <a href="/shippoapi/public-api/transactions">Transaction</a>
      object.

      </br></br></p>

      A tracking status of a package is an indication of current location of a
      package in the supply chain. For example,  sorting, warehousing, or out
      for delivery. Use the tracking status object to track the location of your
      shipments.


      When using your <a
      href="https://docs.goshippo.com/docs/guides_general/authentication/">Test</a>
      token for tracking, you need to use Shippo's 

      predefined tokens for testing different tracking statuses. You can find
      more information in our 

      <a href="https://docs.goshippo.com/docs/tracking/tracking/">Tracking
      tutorial</a> on how to do this, and what the 

      payloads look like.      
  - name: Batches
    description: >-
      A batch is a technique for creating multiple labels at once. Use the 
      batch object to create and purchase many shipments in two API calls. After
      creating the batch, retrieve the batch to verify that all shipments are
      valid. You can add and remove shipments after you have created the batch.
      When all shipments are valid you can purchase the batch and retrieve all
      the shipping labels.
  - name: Orders
    x-displayName: Orders (beta)
    description: >-
      An order is a request from a customer to purchase goods from a merchant.

      Use the orders object to load orders from your system to the Shippo
      dashboard.

      You can use the orders object to create, retrieve, list, and manage orders
      programmatically.

      You can also retrieve shipping rates, purchase labels, and track shipments
      for each order.
  - name: Pickups
    description: >-
      A pickup is when you schedule a carrier to collect a package for delivery.

      Use Shippo’s pickups endpoint to schedule pickups with USPS and DHL
      Express for eligible shipments that you have already created.
  - name: Service Groups
    description: >-
      A service group is a set of service levels grouped together. 

      Rates at checkout uses services groups to present available shipping
      options to customers in their shopping basket.
  - name: Carrier Parcel Templates
    description: >-
      A carrier parcel template represents a package used for shipping that has
      preset dimensions defined by a carrier. Some examples of a carrier parcel
      template include USPS Flat Rate Box and Fedex Small Pak. When using a
      carrier parcel template, the rates returned may be limited to the carrier
      that provides the box. You can create user parcel templates using a
      carrier parcel template. Shippo takes the dimensions of the carrier parcel
      template but you must configure the weight.
  - name: User Parcel Templates
    description: >-
      A user parcel template represents a package used for shipping that has
      preset dimensions and attributes defined 

      by you. They are useful for capturing attributes of parcel-types you
      frequently use for shipping, allowing 

      them to be defined once and then used for many shipments. These parcel
      templates can also be used for live rates.


      User parcel templates can also be created using a carrier parcel template,
      where the dimensions will be copied from 

      the carrier presets, but the weight can be configured by you.
  - name: Rates at Checkout
    description: >-
      Rates at checkout is a tool for merchants to display up-to-date shipping
      estimates based on what's in their customers cart and where they’re
      shipping to.

      Merchants set up curated shipping options for customers in the checkout
      flow based on data in the shopping cart. The request must include the
      **to** address and item information. Optional fields are the **from**
      address and package information. If the optional fields are not included,
      the service will use the default address and/or package configured for
      rates at checkout. The response is a list of shipping options based on the
      Service Group configuration.

      (see <a href="/shippoapi/public-api/service-groups">Service Group
      configuration</a> for details).




      # Default Parcel Template

      Assign one of your user parcel templates to be the default used when
      generating Live Rates. This template will be used by default when
      generating Live Rates, unless you explicitly provide a parcel in the Live
      Rates request.
  - name: Carriers
    description: >
      |Token | Carrier name|

      |:---|:---|

      | airterra | Airterra |

      | apc_postal | APC Postal|

      | apg | APG|

      | aramex | Aramex|

      | asendia_us | Asendia US|

      | australia_post | Australia Post (also used for Startrack)|

      | axlehire | Jitsu|

      | better_trucks | BetterTrucks|

      | borderguru | BorderGuru|

      | boxberry | Boxberry|

      | bring | Bring (also used for Posten Norge)|

      | canada_post | Canada Post|

      | chronopost | Chronopost|

      | collect_plus | CollectPlus|

      | correios_br | CorreiosBR|

      | correos_espana | Correos España |

      | colissimo | Colissimo|

      | deutsche_post | Deutsche Post|

      | dhl_benelux | DHL Benelux|

      | dhl_ecommerce | DHL eCommerce|

      | dhl_express | DHL Express|

      | dhl_germany_c2c | DHL Germany C2C|

      | dhl_germany | DHL Germany|

      | dpd_de | DPD GERMANY|

      | dpd_uk | DPD UK|

      | estafeta | Estafeta|

      | fastway_australia | Aramex|

      | fedex | FedEx|

      | globegistics | Globegistics (now Asendia)|

      | gls_us | GLS US|

      | gophr | Gophr|

      | gso | GSO|

      | hermes_germany_b2c | Hermes Germany B2C|

      | hermes_uk | Evri UK |

      | hongkong_post | Hongkong Post|

      | lasership | LaserShip|

      | lso | LSO|

      | mondial_relay | Mondial Relay|

      | new_zealand_post | New Zealand Post (also used for Pace and
      CourierPost)|

      | nippon_express | Nippon Express|

      | ontrac | OnTrac|

      | parcelforce | Parcelforce|

      | passport | Passport|

      | pcf | PCF|

      | poste_italiane | Poste Italiane |

      | posti | Posti|

      | purolator | Purolator|

      | royal_mail | Royal Mail|

      | royal_mail_sf | Royal Mail Storefeeder|

      | rr_donnelley | ePost Global|

      | russian_post | Russian Post|

      | skypostal | SkyPostal|

      | stuart | Stuart|

      | swyft | Swyft|

      | uds | UDS (United Delivery Service)|

      | ups | UPS|

      | usps | USPS|

      | veho | Veho |
  - name: Service Levels
    description: >
      Service levels represent the shipping service type for each carrier. Use
      the tokens below when creating shipments.


      ## USPS Service Levels

      |Token | Service name|

      |:---|:---|

      | usps_priority | Priority Mail|

      | usps_priority_express | Priority Mail Express|

      | usps_media_mail | Media Mail (grandfathered customers only)|

      | usps_priority_mail_international | Priority Mail International|

      | usps_priority_mail_express_international | Priority Mail Express
      International|

      | usps_first_class_package_international_service | First Class Package
      International|

      | usps_ground_advantage | Ground Advantage |


      ## FedEx Service Levels

      |Token | Service name|

      |:---|:---|

      | fedex_ground | FedEx Ground®|

      | fedex_home_delivery | FedEx Home Delivery®|

      | fedex_ground_economy | FedEx Ground® Economy|

      | fedex_2_day | FedEx 2Day®|

      | fedex_2_day_am | FedEx 2Day® A.M.|

      | fedex_express_saver | FedEx Express Saver®|

      | fedex_standard_overnight | FedEx Standard Overnight®|

      | fedex_priority_overnight | FedEx Priority Overnight®|

      | fedex_first_overnight | FedEx First Overnight®|

      | fedex_international_economy | FedEx International Economy®|

      | fedex_international_priority | FedEx International Priority®|

      | fedex_international_first | FedEx International First®|

      | fedex_international_connect_plus | FedEx International Connect Plus|


      ## UPS Service Levels

      |Token | Service name|

      |:---|:---|

      | ups_standard | UPS Standard|

      | ups_ground | UPS Ground|

      | ups_saver | UPS Saver|

      | ups_3_day_select | UPS 3 Day Select|

      | ups_second_day_air | UPS 2nd Day Air|

      | ups_second_day_air_am | UPS 2nd Day Air A.M.|

      | ups_next_day_air | UPS Next Day Air|

      | ups_next_day_air_saver | UPS Next Day Air Saver|

      | ups_next_day_air_early_am | UPS Next Day Air Early A.M.|

      | ups_express | UPS Express|

      | ups_express_plus | UPS Express Plus|

      | ups_expedited | UPS Expedited|


      ## Other Supported Carriers

      Additional service levels are available for: Airterra, APC Postal, APG,
      Asendia, Australia Post, 

      Better Trucks, Canada Post, Chronopost, Colissimo, Correos España, DHL
      Express, DHL eCommerce, 

      DHL Germany, DPD DE, DPD UK, Deutsche Post, Aramex Australia,
      Globegistics, GLS US, Jitsu, LaserShip, 

      LSO, Mondial Relay, OnTrac, Parcelforce, Poste Italiane, ePost Global,
      Purolator, Royal Mail, 

      Royal Mail Storefeeder, Swyft, UDS, Veho, and Evri UK.


      See the Schemas section for complete service level lists for each carrier.
  - name: Parcel Templates
    description: >
      A predefined package used by one or multiple carriers. When a template is
      given, the parcel dimensions 

      do not have to be sent - the dimensions below will instead be used. The
      parcel weight is not affected 

      by the use of a template.


      ## FedEx Parcel Templates

      |Token | Name | Dimensions|

      |:---|:---|:---|

      | FedEx_Box_10kg | FedEx® 10kg Box | 15.81 x 12.94 x 10.19 in|

      | FedEx_Box_25kg | FedEx® 25kg Box | 54.80 x 42.10 x 33.50 in|

      | FedEx_Box_Extra_Large_1 | FedEx® Extra Large Box (X1) | 11.88 x 11.00 x
      10.75 in|

      | FedEx_Box_Extra_Large_2 | FedEx® Extra Large Box (X2) | 15.75 x 14.13 x
      6.00 in|

      | FedEx_Box_Large_1 | FedEx® Large Box (L1) | 17.50 x 12.38 x 3.00 in|

      | FedEx_Box_Large_2 | FedEx® Large Box (L2) | 11.25 x 8.75 x 7.75 in|

      | FedEx_Box_Medium_1 | FedEx® Medium Box (M1) | 13.25 x 11.50 x 2.38 in|

      | FedEx_Box_Medium_2 | FedEx® Medium Box (M2) | 11.25 x 8.75 x 4.38 in|

      | FedEx_Box_Small_1 | FedEx® Small Box (S1) | 12.38 x 10.88 x 1.50 in|

      | FedEx_Box_Small_2 | FedEx® Small Box (S2) | 11.25 x 8.75 x 2.38 in|

      | FedEx_Envelope | FedEx® Envelope | 12.50 x 9.50 x 0.80 in|

      | FedEx_Padded_Pak | FedEx® Padded Pak | 11.75 x 14.75 x 2.00 in|

      | FedEx_Pak_1 | FedEx® Large Pak | 15.50 x 12.00 x 0.80 in|

      | FedEx_Pak_2 | FedEx® Small Pak | 12.75 x 10.25 x 0.80 in|

      | FedEx_Tube | FedEx® Tube | 38.00 x 6.00 x 6.00 in|

      | FedEx_XL_Pak | FedEx® Extra Large Pak | 17.50 x 20.75 x 2.00 in|


      ## UPS Parcel Templates

      |Token | Name | Dimensions|

      |:---|:---|:---|

      | UPS_Box_10kg | Box 10kg | 410.00 x 335.00 x 265.00 mm|

      | UPS_Box_25kg | Box 25kg | 484.00 x 433.00 x 350.00 mm|

      | UPS_Express_Box | Express Box | 460.00 x 315.00 x 95.00 mm|

      | UPS_Express_Box_Large | Express Box Large | 18.00 x 13.00 x 3.00 in|

      | UPS_Express_Box_Medium | Express Box Medium | 15.00 x 11.00 x 3.00 in|

      | UPS_Express_Box_Small | Express Box Small | 13.00 x 11.00 x 2.00 in|

      | UPS_Express_Envelope | Express Envelope | 12.50 x 9.50 x 2.00 in|

      | UPS_Express_Hard_Pak | Express Hard Pak | 14.75 x 11.50 x 2.00 in|

      | UPS_Express_Legal_Envelope | Express Legal Envelope | 15.00 x 9.50 x
      2.00 in|

      | UPS_Express_Pak | Express Pak | 16.00 x 12.75 x 2.00 in|

      | UPS_Express_Tube | Express Tube | 970.00 x 190.00 x 165.00 mm|

      | UPS_Laboratory_Pak | Laboratory Pak | 17.25 x 12.75 x 2.00 in|

      | UPS_Pad_Pak | Pad Pak | 14.75 x 11.00 x 2.00 in|


      ## USPS Parcel Templates

      |Token | Name | Dimensions|

      |:---|:---|:---|

      | USPS_FlatRateCardboardEnvelope | Flat Rate Cardboard Envelope | 12.50 x
      9.50 x 0.75 in|

      | USPS_FlatRateEnvelope | Flat Rate Envelope | 12.50 x 9.50 x 0.75 in|

      | USPS_FlatRateGiftCardEnvelope | Flat Rate Gift Card Envelope | 10.00 x
      7.00 x 0.75 in|

      | USPS_FlatRateLegalEnvelope | Flat Rate Legal Envelope | 15.00 x 9.50 x
      0.75 in|

      | USPS_FlatRatePaddedEnvelope | Flat Rate Padded Envelope | 12.50 x 9.50 x
      1.00 in|

      | USPS_FlatRateWindowEnvelope | Flat Rate Window Envelope | 10.00 x 5.00 x
      0.75 in|

      | USPS_LargeFlatRateBoardGameBox | Large Flat Rate Board Game Box | 24.06
      x 11.88 x 3.13 in|

      | USPS_LargeFlatRateBox | Large Flat Rate Box | 12.25 x 12.25 x 6.00 in|

      | USPS_APOFlatRateBox | APO/FPO/DPO Large Flat Rate Box | 12.25 x 12.25 x
      6.00 in|

      | USPS_MediumFlatRateBox1 | Medium Flat Rate Box 1 | 11.25 x 8.75 x 6.00
      in|

      | USPS_MediumFlatRateBox2 | Medium Flat Rate Box 2 | 14.00 x 12.00 x 3.50
      in|

      | USPS_RegionalRateBoxA1 | Regional Rate Box A1 | 10.13 x 7.13 x 5.00 in|

      | USPS_RegionalRateBoxA2 | Regional Rate Box A2 | 13.06 x 11.06 x 2.50 in|

      | USPS_RegionalRateBoxB1 | Regional Rate Box B1 | 12.25 x 10.50 x 5.50 in|

      | USPS_RegionalRateBoxB2 | Regional Rate Box B2 | 16.25 x 14.50 x 3.00 in|

      | USPS_SmallFlatRateBox | Small Flat Rate Box | 8.69 x 5.44 x 1.75 in|

      | USPS_SmallFlatRateEnvelope | Small Flat Rate Envelope | 10.00 x 6.00 x
      4.00 in|


      ## Other Carriers

      Additional parcel templates are available for DHL eCommerce, DPD UK, and
      Aramex Australia.

      See the Schemas section for complete template lists.
  - name: Shippo Accounts
    description: >-
      Shippo Accounts are used by Shippo Platform Accounts to create and manage
      Managed Shippo Accounts. 

      Managed Shippo Accounts are headless accounts that represent your
      customers. They are opaque to your end customers, meaning customers do not
      need to create their own Shippo login or have a billing relationship with
      Shippo. 

      They can be used by marketplaces, e-commerce platforms, and third-party
      logistics providers who want to offer, seamless, built-in shipping
      functionality to their customers. See our <a
      href="https://docs.goshippo.com/docs/platformaccounts/platform_accounts/">guide</a>
      for more details.
  - name: Customs Declaration B13A Filing Option
    description: >
      B13A Option details are obtained by filing a B13A Canada Export
      Declaration via the Canadian Export Reporting System (CERS). 

      More information on <a
      href="https://www.cbsa-asfc.gc.ca/export/guide-eng.html">reporting
      commercial exports from Canada</a>.


      **Allowed values:**

      - `FILED_ELECTRONICALLY`

      - `SUMMARY_REPORTING`

      - `NOT_REQUIRED`
  - name: Customs Declaration Contents Type
    description: |
      Type of goods of the shipment.

      **Allowed values:**
      - `DOCUMENTS`
      - `GIFT`
      - `SAMPLE`
      - `MERCHANDISE`
      - `HUMANITARIAN_DONATION`
      - `RETURN_MERCHANDISE`
      - `OTHER`
  - name: Customs Declaration EEL/PFC
    description: >
      EEL / PFC type of the shipment. For most shipments from the US to CA,
      `NOEEI_30_36` is applicable; 

      for most other shipments from the US, `NOEEI_30_37_a` is applicable.


      **Allowed values:**

      - `NOEEI_30_37_a`

      - `NOEEI_30_37_h`

      - `NOEEI_30_37_f`

      - `NOEEI_30_36`

      - `AES_ITN`
  - name: Customs Declaration Incoterm
    description: >
      The incoterm reference of the shipment. FCA is available for DHL Express
      and FedEx only. 

      eDAP is available for DPD UK only. DAP is available for DHL Express and
      DPD UK.

      If expecting DAP for other carriers, please use DDU.


      **Allowed values:**

      - `DDP`

      - `DDU`

      - `FCA`

      - `DAP`

      - `eDAP`
  - name: Customs Declaration Non Delivery Option
    description: >
      Indicates how the carrier should proceed in case the shipment can't be
      delivered.


      **Allowed values:**

      - `ABANDON`

      - `RETURN`
  - name: Address Validation Source
    description: |
      Source of the address validation message.

      **Allowed values:**
      - `Shippo Address Validator`
      - `UPS`
  - name: Address Validation Codes
    description: |
      Validation result codes returned by the address validation service.

      **Allowed values:**
      - `verification_error`
      - `unknown_street`
      - `component_mismatch_error`
      - `multiple_match`
      - `sub_premise_number_invalid`
      - `sub_premise_number_missing`
      - `premise_number_invalid`
      - `premise_number_missing`
      - `box_number_invalid`
      - `box_number_missing`
      - `pmb_number_missing`
      - `postal_code_change`
      - `administrative_area_change`
      - `locality_change`
      - `dependent_locality_change`
      - `street_name_change`
      - `street_type_change`
      - `street_directional_change`
      - `sub_premise_type_change`
      - `sub_premise_number_change`
      - `double_dependent_locality_change`
      - `subadministrative_area_change`
      - `subnational_area_change`
      - `po_box_change`
      - `premise_type_change`
      - `house_number_change`
      - `organization_change`
      - `extraneous_information`
      - `usps_door_inaccessible`
      - `administrative_area_partial`
      - `city_partial`
      - `street_partial`
      - `building_partial`
      - `subpremise_partial`
      - `administrative_area_full`
      - `city_full`
      - `thoroughfare_full`
      - `premises_full`
      - `subpremise_full`
      - `geocoded_street`
      - `geocoded_neighborhood`
      - `geocoded_community`
      - `geocoded_state`
      - `geocoded_rooftop`
      - `geocoded_interpolated_rooftop`
      - `invalid_postal_code`
      - `postal_code_not_found`
      - `empty_request`
      - `service_error`
      - `street_detail_missing`
      - `Invalid City/State/Zip`
      - `Default Match`
      - `Unknown Street`
      - `Address Not Found`
      - `Non-Deliverable ZIP4`
      - `Multiple Responses`
      - `Invalid Dual Address`
      - `Invalid State`
      - `Invalid City`
      - `Ambiguous Address`
paths:
  /live-rates:
    post:
      tags:
        - Rates at Checkout
      summary: Generate a live rates request
      description: >-
        Initiates a live rates request. Include either the object ID for

        an existing address record or a fully formed address object when
        entering

        an address value. You can also enter the object ID of an existing user
        parcel

        template or a fully formed user parcel template object as the parcel
        value.
      operationId: CreateLiveRate
      parameters:
        - $ref: '#/components/parameters/ShippoApiVersionHeader'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/LiveRateCreateRequest'
        description: Generate rates at checkout
      responses:
        '200':
          $ref: '#/components/responses/liveRatePaginatedResponse'
        '400':
          $ref: '#/components/responses/badRequestResponse'
      x-codeSamples:
        - label: cURL
          lang: cURL
          source: |-
            curl https://api.goshippo.com/live-rates \
              -H "Authorization: ShippoToken <API_TOKEN>" \
              -H "Content-Type: application/json"
            --data-raw '{
                "address_from": {
                   "name": "S. Hippo",
                   "company": "Shippo",
                   "street1": "731 Market St #200",
                   "street_no": "",
                   "street2": "",
                   "street3": "",
                   "city": "San Francisco",
                   "state": "CA",
                   "zip": "94103",
                   "country": "US"
                },
                "address_to": {
                   "name": "Bob Bloat",
                   "company": "SF Zoo",
                   "street1": "Sloat Blvd. & Upper Great Hwy.",
                   "street_no": "",
                   "street2": "",
                   "street3": "",
                   "city": "San Francisco",
                   "state": "CA",
                   "zip": "94132",
                   "country": "US"
                },
                "line_items": [
                   {
                      "quantity": 1,
                      "total_price": "12.00",
                      "currency": "USD",
                      "weight": "1.0",
                      "weight_unit": "lb",
                      "title": "Hippo Snax",
                      "manufacture_country": "US",
                      "sku": "HM-123"
                   }
               ],
               "parcel": {
                  "length": "10",
                  "width": "15",
                  "height": "10",
                  "distance_unit": "in",
                  "weight": "1",
                  "mass_unit": "lb"
               }
            }'
        - lang: python
          label: Python
          source: >-
            import dateutil.parser

            import shippo

            from shippo.models import components


            s = shippo.Shippo(
                api_key_header='ShippoToken <API_TOKEN>',
                shippo_api_version='2018-02-08',
            )



            res =
            s.rates_at_checkout.create(request=components.LiveRateCreateRequest(
                address_from='<value>',
                address_to=components.AddressCompleteCreateRequest(
                    name='Shwan Ippotle',
                    company='Shippo',
                    street1='215 Clayton St.',
                    street3='',
                    street_no='',
                    city='San Francisco',
                    state='CA',
                    zip='94117',
                    country='US',
                    phone='+1 555 341 9393',
                    email='shippotle@shippo.com',
                    is_residential=True,
                    metadata='Customer ID 123456',
                    validate=True,
                ),
                line_items=[
                    components.LineItem(
                        currency='USD',
                        manufacture_country='US',
                        max_delivery_time=dateutil.parser.isoparse('2016-07-23T00:00:00Z'),
                        max_ship_time=dateutil.parser.isoparse('2016-07-23T00:00:00Z'),
                        quantity=20,
                        sku='HM-123',
                        title='Hippo Magazines',
                        total_price='12.1',
                        variant_title='June Edition',
                        weight='0.4',
                        weight_unit=components.WeightUnitEnum.LB,
                        object_id='abf7d5675d744b6ea9fdb6f796b28f28',
                    ),
                ],
                parcel='5df144dca289442cv7a06',
            ))


            if res is not None:
                # handle response
                pass
        - lang: typescript
          label: Typescript
          source: |-
            import { Shippo } from "shippo";

            const shippo = new Shippo({
              apiKeyHeader: "ShippoToken <API_TOKEN>",
              shippoApiVersion: "2018-02-08",
            });

            async function run() {
              const result = await shippo.ratesAtCheckout.create({
                addressFrom: "<value>",
                addressTo: {
                  name: "Shwan Ippotle",
                  company: "Shippo",
                  street1: "215 Clayton St.",
                  street3: "",
                  streetNo: "",
                  city: "San Francisco",
                  state: "CA",
                  zip: "94117",
                  country: "US",
                  phone: "+1 555 341 9393",
                  email: "shippotle@shippo.com",
                  isResidential: true,
                  metadata: "Customer ID 123456",
                  validate: true,
                },
                lineItems: [
                  {
                    currency: "USD",
                    manufactureCountry: "US",
                    maxDeliveryTime: new Date("2016-07-23T00:00:00Z"),
                    maxShipTime: new Date("2016-07-23T00:00:00Z"),
                    quantity: 20,
                    sku: "HM-123",
                    title: "Hippo Magazines",
                    totalPrice: "12.1",
                    variantTitle: "June Edition",
                    weight: "0.4",
                    weightUnit: "lb",
                    objectId: "abf7d5675d744b6ea9fdb6f796b28f28",
                  },
                ],
                parcel: "5df144dca289442cv7a06",
              });

              // Handle the result
              console.log(result);
            }

            run();
        - lang: csharp
          label: C#
          source: |-
            using Shippo;
            using Shippo.Models.Components;
            using System;
            using System.Collections.Generic;

            var sdk = new ShippoSDK(
                apiKeyHeader: "ShippoToken <API_TOKEN>",
                shippoApiVersion: "2018-02-08"
            );

            var res = await sdk.RatesAtCheckout.CreateAsync(
                liveRateCreateRequest: new LiveRateCreateRequest() {
                    AddressFrom = LiveRateCreateRequestAddressFrom.CreateStr(
                        "<value>"
                    ),
                    AddressTo = LiveRateCreateRequestAddressTo.CreateAddressCompleteCreateRequest(
                        new AddressCompleteCreateRequest() {
                            Name = "Shwan Ippotle",
                            Company = "Shippo",
                            Street1 = "215 Clayton St.",
                            Street3 = "",
                            StreetNo = "",
                            City = "San Francisco",
                            State = "CA",
                            Zip = "94117",
                            Country = "US",
                            Phone = "+1 555 341 9393",
                            Email = "shippotle@shippo.com",
                            IsResidential = true,
                            Metadata = "Customer ID 123456",
                            Validate = true,
                        }
                    ),
                    LineItems = new List<LineItem>() {
                        new LineItem() {
                            Currency = "USD",
                            ManufactureCountry = "US",
                            MaxDeliveryTime = System.DateTime.Parse("2016-07-23T00:00:00Z"),
                            MaxShipTime = System.DateTime.Parse("2016-07-23T00:00:00Z"),
                            Quantity = 20,
                            Sku = "HM-123",
                            Title = "Hippo Magazines",
                            TotalPrice = "12.1",
                            VariantTitle = "June Edition",
                            Weight = "0.4",
                            WeightUnit = WeightUnitEnum.Lb,
                            ObjectId = "abf7d5675d744b6ea9fdb6f796b28f28",
                        },
                    },
                    Parcel = LiveRateCreateRequestParcel.CreateStr(
                        "5df144dca289442cv7a06"
                    ),
                },
                shippoApiVersion: "2018-02-08"
            );

            // handle response
        - lang: php
          label: PHP
          source: |-
            declare(strict_types=1);

            require 'vendor/autoload.php';

            use Shippo\API;
            use Shippo\API\Models\Components;
            use Shippo\API\Utils;

            $sdk = API\Shippo::builder()
                ->setSecurity(
                    'ShippoToken <API_TOKEN>'
                )
                ->setShippoApiVersion('2018-02-08')
                ->build();

            $liveRateCreateRequest = new Components\LiveRateCreateRequest(
                addressFrom: '<value>',
                addressTo: new Components\AddressCompleteCreateRequest(
                    name: 'Shwan Ippotle',
                    company: 'Shippo',
                    street1: '215 Clayton St.',
                    street3: '',
                    streetNo: '',
                    city: 'San Francisco',
                    state: 'CA',
                    zip: '94117',
                    country: 'US',
                    phone: '+1 555 341 9393',
                    email: 'shippotle@shippo.com',
                    isResidential: true,
                    metadata: 'Customer ID 123456',
                    validate: true,
                ),
                lineItems: [
                    new Components\LineItem(
                        currency: 'USD',
                        manufactureCountry: 'US',
                        maxDeliveryTime: Utils\Utils::parseDateTime('2016-07-23T00:00:00Z'),
                        maxShipTime: Utils\Utils::parseDateTime('2016-07-23T00:00:00Z'),
                        quantity: 20,
                        sku: 'HM-123',
                        title: 'Hippo Magazines',
                        totalPrice: '12.1',
                        variantTitle: 'June Edition',
                        weight: '0.4',
                        weightUnit: Components\WeightUnitEnum::Lb,
                        objectId: 'abf7d5675d744b6ea9fdb6f796b28f28',
                    ),
                ],
                parcel: '5df144dca289442cv7a06',
            );

            $response = $sdk->ratesAtCheckout->create(
                liveRateCreateRequest: $liveRateCreateRequest,
                shippoApiVersion: '2018-02-08'

            );

            if ($response->liveRatePaginatedList !== null) {
                // handle response
            }
        - lang: java
          label: Java
          source: >-
            package hello.world;


            import com.goshippo.shippo_sdk.Shippo;

            import
            com.goshippo.shippo_sdk.models.components.AddressCompleteCreateRequest;

            import com.goshippo.shippo_sdk.models.components.LineItem;

            import
            com.goshippo.shippo_sdk.models.components.LiveRateCreateRequest;

            import
            com.goshippo.shippo_sdk.models.components.LiveRateCreateRequestAddressFrom;

            import
            com.goshippo.shippo_sdk.models.components.LiveRateCreateRequestAddressTo;

            import
            com.goshippo.shippo_sdk.models.components.LiveRateCreateRequestParcel;

            import com.goshippo.shippo_sdk.models.components.WeightUnitEnum;

            import
            com.goshippo.shippo_sdk.models.operations.CreateLiveRateResponse;

            import java.lang.Exception;

            import java.time.OffsetDateTime;

            import java.util.List;


            public class Application {

                public static void main(String[] args) throws Exception {

                    Shippo sdk = Shippo.builder()
                            .apiKeyHeader("ShippoToken <API_TOKEN>")
                            .shippoApiVersion("2018-02-08")
                        .build();

                    CreateLiveRateResponse res = sdk.ratesAtCheckout().create()
                            .shippoApiVersion("2018-02-08")
                            .liveRateCreateRequest(LiveRateCreateRequest.builder()
                                .addressTo(LiveRateCreateRequestAddressTo.of(AddressCompleteCreateRequest.builder()
                                    .name("Shwan Ippotle")
                                    .street1("215 Clayton St.")
                                    .city("San Francisco")
                                    .state("CA")
                                    .zip("94117")
                                    .country("US")
                                    .company("Shippo")
                                    .street3("")
                                    .streetNo("")
                                    .phone("+1 555 341 9393")
                                    .email("shippotle@shippo.com")
                                    .isResidential(true)
                                    .metadata("Customer ID 123456")
                                    .validate(true)
                                    .build()))
                                .lineItems(List.of(
                                    LineItem.builder()
                                        .currency("USD")
                                        .manufactureCountry("US")
                                        .maxDeliveryTime(OffsetDateTime.parse("2016-07-23T00:00:00Z"))
                                        .maxShipTime(OffsetDateTime.parse("2016-07-23T00:00:00Z"))
                                        .quantity(20L)
                                        .sku("HM-123")
                                        .title("Hippo Magazines")
                                        .totalPrice("12.1")
                                        .variantTitle("June Edition")
                                        .weight("0.4")
                                        .weightUnit(WeightUnitEnum.LB)
                                        .objectId("abf7d5675d744b6ea9fdb6f796b28f28")
                                        .build()))
                                .addressFrom(LiveRateCreateRequestAddressFrom.of("<value>"))
                                .parcel(LiveRateCreateRequestParcel.of("5df144dca289442cv7a06"))
                                .build())
                            .call();

                    if (res.liveRatePaginatedList().isPresent()) {
                        // handle response
                    }
                }
            }
components:
  parameters:
    ShippoApiVersionHeader:
      description: >-
        Optional string used to pick a non-default API version to use. See our
        <a href="https://docs.goshippo.com/docs/api_concepts/apiversioning/">API
        version</a> guide.
      in: header
      name: SHIPPO-API-VERSION
      schema:
        type: string
        example: '2018-02-08'
        default: '2018-02-08'
        x-default: '2018-02-08'
      x-speakeasy-globals-hidden: true
  schemas:
    LiveRateCreateRequest:
      properties:
        address_from:
          oneOf:
            - type: string
              description: >-
                Object ID for an existing <a
                href="/shippoapi/public-api/addresses">Address</a>
            - $ref: '#/components/schemas/AddressCompleteCreateRequest'
          description: >-
            The sender address, which includes your name, company name, street
            address, city, state, zip code, 

            country, phone number, and email address (strings). Special
            characters should not be included in 

            any address element, especially name, company, and email.
        address_to:
          oneOf:
            - type: string
              description: >-
                Object ID for an existing <a
                href="/shippoapi/public-api/addresses">Address</a>
            - $ref: '#/components/schemas/AddressCompleteCreateRequest'
          description: >-
            The recipient address, which includes the recipient's name, company
            name, street address, city, state, zip code, 

            country, phone number, and email address (strings). Special
            characters should not be included in 

            any address element, especially name, company, and email.
        line_items:
          description: Array of Line Item objects
          items:
            $ref: '#/components/schemas/LineItem'
          type: array
        parcel:
          oneOf:
            - type: string
              description: Object ID for an existing User Parcel Template
            - $ref: '#/components/schemas/Parcel'
          description: >-
            Object ID for an existing User Parcel Template OR a fully formed
            Parcel object.
          example: 5df144dca289442cv7a06
      required:
        - address_to
        - line_items
      type: object
    AddressCompleteCreateRequest:
      allOf:
        - $ref: '#/components/schemas/AddressBase'
        - properties:
            validate:
              example: true
              type: boolean
          required:
            - name
            - street1
            - city
            - state
            - zip
            - country
    LineItem:
      title: Line Item
      x-tags:
        - Orders
      description: >-
        <p style="text-align: center; background-color: #F2F3F4;">
          </br>Line Items, and their corresponding abstract Products and Variants, might be exposed as a separate resource
          in the future. Currently it's a nested object within the order resource.</br></br>
        </p>

        A line item is an individual object in an order. For example, if your
        order contains a t-shirt, shorts, and a jacket, each item is represented
        by a line item.
      allOf:
        - $ref: '#/components/schemas/LineItemBase'
        - properties:
            object_id:
              type: string
              example: abf7d5675d744b6ea9fdb6f796b28f28
              description: Unique identifier of the line item object.
    Parcel:
      x-tags:
        - Parcels
      allOf:
        - $ref: '#/components/schemas/ParcelBase'
        - $ref: '#/components/schemas/ParcelDimensions'
        - properties:
            object_created:
              description: Date and time of Parcel creation.
              example: '2014-07-09T02:19:13.174Z'
              format: date-time
              type: string
            object_id:
              description: >-
                Unique identifier of the given Parcel object. This ID is
                required to create a Shipment object.
              example: adcfdddf8ec64b84ad22772bce3ea37a
              type: string
            object_owner:
              description: Username of the user who created the Parcel object.
              example: shippotle@shippo.com
              type: string
            object_state:
              description: >-
                A Parcel will only be valid when all required values have been
                sent and validated successfully.
              example: VALID
              enum:
                - VALID
              type: string
            object_updated:
              description: >-
                Date and time of last Parcel update. Since you cannot update
                Parcels after they were created, this time stamp reflects the
                time when the Parcel was changed by Shippo's systems for the
                last time, e.g., during sorting the dimensions given.
              example: '2014-07-09T02:19:13.174Z'
              format: date-time
              type: string
            template:
              $ref: '#/components/schemas/ParcelTemplateEnumSet'
            test:
              type: boolean
              description: Indicates whether the object has been created in test mode.
      required:
        - length
        - width
        - height
        - distance_unit
        - weight
        - mass_unit
      type: object
    LiveRatePaginatedList:
      allOf:
        - $ref: '#/components/schemas/PaginatedList'
        - properties:
            count:
              example: 123
              format: int64
              type: integer
            results:
              items:
                $ref: '#/components/schemas/LiveRate'
              type: array
    BadRequest:
      additionalProperties: true
      type: object
    AddressBase:
      description: Address represents the address as retrieved from the database
      properties:
        name:
          description: >-
            **required for purchase**<br>

            First and Last Name of the addressee


            **Carrier-Specific Constraints:**

            | Carrier | Constraints |

            |:---|:---|

            | FedEx | Either company or name required; No length validation
            (first 35 chars printed on label) |
          example: Shwan Ippotle
          type: string
          maxLength: 100
        company:
          example: Shippo
          type: string
          maxLength: 100
          description: |-
            Company Name

            **Carrier-Specific Constraints:**
            | Carrier | Constraints |
            |:---|:---|
            | FedEx | Max 35 characters; Either company or name required |
        street1:
          description: >-
            **required for purchase**<br>

            First street line. Usually street number and street name (except for
            DHL Germany, see street_no).


            **Carrier-Specific Constraints:**

            | Carrier | Constraints |

            |:---|:---|

            | FedEx | At least one street line required; Max 35 characters per
            line |
          example: 215 Clayton St.
          type: string
          maxLength: 121
        street2:
          type: string
          maxLength: 100
          description: >-
            Second street line.


            **Carrier-Specific Constraints:**

            | Carrier | Constraints |

            |:---|:---|

            | FedEx | At least one street line required; Max 35 characters per
            line |
        street3:
          type: string
          maxLength: 100
          example: ''
          description: >-
            Third street line.

            Only accepted for USPS international shipments, UPS domestic and UPS
            international shipments.


            **Carrier-Specific Constraints:**

            | Carrier | Constraints |

            |:---|:---|

            | FedEx | At least one street line required; Max 35 characters per
            line |
        street_no:
          type: string
          example: ''
          description: >-
            Street number of the addressed building. 

            This field can be included in street1 for all carriers except for
            DHL Germany.
        city:
          description: >-
            **required for purchase**<br>

            Name of a city. When creating a Quote Address, sending a city is
            optional but will yield more accurate Rates.

            Please bear in mind that city names may be ambiguous (there are 34
            Springfields in the US). Pass in a state

            or a ZIP code (see below), if known, it will yield more accurate
            results.


            **Carrier-Specific Constraints:**

            | Carrier | Constraints |

            |:---|:---|

            | FedEx | Required; Max 35 characters |
          example: San Francisco
          type: string
          maxLength: 100
        state:
          description: >-
            **required for purchase for some countries**<br>

            State/Province values are required for shipments from/to the US, AU,
            and CA. UPS requires province for some

            countries (i.e Ireland). To receive more accurate quotes, passing
            this field is recommended. Most carriers

            only accept two or three character state abbreviations.


            **Carrier-Specific Constraints:**

            | Carrier | Constraints |

            |:---|:---|

            | FedEx | Required if country requires state; Max 2 characters for
            US, CA, PR |
          example: CA
          type: string
          maxLength: 100
        zip:
          description: >-
            **required for purchase**<br>

            Postal code of an Address. When creating a Quote Addresses, sending
            a ZIP is optional but will yield more

            accurate Rates.


            **Carrier-Specific Constraints:**

            | Carrier | Constraints |

            |:---|:---|

            | FedEx | Max 10 characters |
          example: '94117'
          type: string
          maxLength: 20
        country:
          example: US
          type: string
          description: >-
            ISO 3166-1 alpha-2 country codes and country names can be used. For
            most consistent results, we recommend using country codes like `US`
            or `DE`.

            If using country names, please ensure they are spelled correctly and
            in English. Country names are converted to country codes.

            Refer to this <a
            href="https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements"
            target="_blank">guide</a> for a list of country codes.

            Sending a country is always required.
        phone:
          example: +1 555 341 9393
          type: string
          maxLength: 50
          description: >-
            Addresses containing a phone number allow carriers to call the
            recipient when delivering the Parcel. This

            increases the probability of delivery and helps to avoid accessorial
            charges after a Parcel has been shipped.


            **Carrier-Specific Constraints:**

            | Carrier | Constraints |

            |:---|:---|

            | FedEx | Required; Min 1, max 15 characters |

            | USPS | Sender phone required for shipments during label purchase;
            Min 8, max 15 digits |
        email:
          example: shippotle@shippo.com
          type: string
          maxLength: 254
          description: |-
            E-mail address of the contact person, RFC3696/5321-compliant.

            **Carrier-Specific Constraints:**
            | Carrier | Constraints |
            |:---|:---|
            | FedEx | Max 80 characters |
            | USPS | Sender email required for shipments during label purchase |
        is_residential:
          example: true
          type: boolean
        metadata:
          example: Customer ID 123456
          type: string
          maxLength: 100
          description: >-
            A string of up to 100 characters that can be filled with any
            additional information you want 

            to attach to the object.
      type: object
    LineItemBase:
      properties:
        currency:
          description: Currency of the <code>total_price</code> amount.
          example: USD
          type: string
        manufacture_country:
          description: >-
            Country the item was manufactured in. In the Shippo dashboard, this
            value will be used ot pre-fill the customs declaration when creating
            a label for this order.
          example: US
          type: string
        max_delivery_time:
          description: >-
            The date and time this item needs to be delivered by, i.e. by when
            the carrier delivers it to the buyer. 

            This value is used by some platforms such as eBay to measure a
            seller's shipping time and performance. 

            It will be displayed in the Shippo dashboard.
          example: '2016-07-23T00:00:00Z'
          format: date-time
          type: string
        max_ship_time:
          description: >-
            The date and time this item needs to be fulfilled by, i.e. by when
            the shipping label needs to be 

            created and handed over to the carrier. This value is used by some
            platforms such as eBay to measure 

            a seller's handling time and performance. It will be displayed in
            the Shippo dashboard.
          example: '2016-07-23T00:00:00Z'
          format: date-time
          type: string
        quantity:
          description: The quantity of this item in this order.
          example: 20
          format: int64
          type: integer
        sku:
          description: The stock keeping unit value of this item.
          example: HM-123
          type: string
        title:
          description: Title of the line item.
          example: Hippo Magazines
          type: string
        total_price:
          description: >-
            Total price paid by the buyer for this item (or these items, if
            quantity > 1).
          example: '12.1'
          type: string
        variant_title:
          description: >-
            A variant is a specific variation of an item (e.g. `size M` or
            `color blue`). 

            Variants might be exposed as a separate resource in the future too. 

            Currently the variant title is a free text field describing the
            variant.
          example: June Edition
          type: string
        weight:
          description: >-
            Total weight of this/these item(s). Instead of specifying the weight
            of all items, 

            you can also set the <code>total_weight</code> value of the order
            object.
          example: '0.4'
          type: string
        weight_unit:
          $ref: '#/components/schemas/WeightUnitEnum'
      type: object
    ParcelBase:
      properties:
        extra:
          $ref: '#/components/schemas/ParcelExtra'
        metadata:
          type: string
          example: Customer ID 123456
        mass_unit:
          $ref: '#/components/schemas/WeightUnitEnum'
        weight:
          description: >-
            Weight of the parcel. Up to six digits in front and four digits
            after the decimal separator are accepted.
          example: '1'
          type: string
      type: object
    ParcelDimensions:
      properties:
        distance_unit:
          $ref: '#/components/schemas/DistanceUnitEnum'
          description: The measure unit used for length, width and height.
        height:
          description: >-
            Height of the parcel. Up to six digits in front and four digits
            after the decimal separator are accepted.
          example: '1'
          type: string
        length:
          description: >-
            Length of the Parcel. Up to six digits in front and four digits
            after the decimal separator are accepted.
          example: '1'
          type: string
        width:
          description: >-
            Width of the Parcel. Up to six digits in front and four digits after
            the decimal separator are accepted.
          example: '1'
          type: string
      type: object
    ParcelTemplateEnumSet:
      description: >-
        If template is passed, `length`, `width`, `height`, and `distance_unit`
        are not required
      oneOf:
        - $ref: '#/components/schemas/ParcelTemplateFedExEnum'
        - $ref: '#/components/schemas/ParcelTemplateUPSEnum'
        - $ref: '#/components/schemas/ParcelTemplateUSPSEnum'
        - $ref: '#/components/schemas/ParcelTemplateDHLeCommerceEnum'
        - $ref: '#/components/schemas/ParcelTemplateDPDUKEnum'
        - $ref: '#/components/schemas/ParcelTemplateAramexAustraliaEnum'
      x-speakeasy-include: true
    PaginatedList:
      properties:
        next:
          example: baseurl?page=3&results=10
          type: string
        previous:
          example: baseurl?page=1&results=10
          type: string
      type: object
    LiveRate:
      title: Live Rate
      x-tags:
        - Rates at Checkout
      allOf:
        - $ref: '#/components/schemas/RateAmountAndCurrency'
        - properties:
            estimated_days:
              description: >-
                The estimated days in transit of the rate that powers the
                shipping option, if available.
              example: 2
              format: int64
              type: integer
            title:
              description: The name of the service group being returned
              example: Shipping Option 1
              type: string
      type: object
    WeightUnitEnum:
      description: The unit used for weight.
      enum:
        - g
        - kg
        - lb
        - oz
      example: lb
      type: string
    ParcelExtra:
      title: Parcel Extra
      x-tags:
        - Parcels
      description: >-
        An object holding optional extra services to be requested for each
        parcel in a multi-piece shipment.

        The following values are supported for the `extra` field of the parcel
        object.
      properties:
        COD:
          $ref: '#/components/schemas/COD'
        insurance:
          $ref: '#/components/schemas/ParcelInsurance'
        reference_1:
          type: string
          maxLength: 50
          description: >-
            Optional text to be printed on the shipping label if supported by
            carrier. Up to 50 characters.


            **Carrier-Specific Constraints:**

            | Carrier | Constraints |

            |:---|:---|

            | FedEx | Max 40 characters (Express services); Max 30 characters
            (Ground services) |
        reference_2:
          type: string
          maxLength: 50
          description: >-
            Optional text to be printed on the shipping label if supported by
            carrier. Up to 50 characters.


            **Carrier-Specific Constraints:**

            | Carrier | Constraints |

            |:---|:---|

            | FedEx | Max 30 characters |
      type: object
    DistanceUnitEnum:
      enum:
        - cm
        - in
        - ft
        - m
        - mm
        - yd
      example: in
      type: string
      description: The measure unit used for length, width and height.
    ParcelTemplateFedExEnum:
      type: string
      title: FedEx Parcel Template
      enum:
        - FedEx_Box_10kg
        - FedEx_Box_25kg
        - FedEx_Box_Extra_Large_1
        - FedEx_Box_Extra_Large_2
        - FedEx_Box_Large_1
        - FedEx_Box_Large_2
        - FedEx_Box_Medium_1
        - FedEx_Box_Medium_2
        - FedEx_Box_Small_1
        - FedEx_Box_Small_2
        - FedEx_Envelope
        - FedEx_Padded_Pak
        - FedEx_Pak_1
        - FedEx_Pak_2
        - FedEx_Tube
        - FedEx_XL_Pak
      description: >
        |Token | Name | Dimensions|

        |:---|:---|:---|

        | FedEx_Box_10kg | FedEx® 10kg Box | 15.81 x 12.94 x 10.19 in|

        | FedEx_Box_25kg | FedEx® 25kg Box | 54.80 x 42.10 x 33.50 in|

        | FedEx_Box_Extra_Large_1 | FedEx® Extra Large Box (X1) | 11.88 x 11.00
        x 10.75 in|

        | FedEx_Box_Extra_Large_2 | FedEx® Extra Large Box (X2) | 15.75 x 14.13
        x 6.00 in|

        | FedEx_Box_Large_1 | FedEx® Large Box (L1) | 17.50 x 12.38 x 3.00 in|

        | FedEx_Box_Large_2 | FedEx® Large Box (L2) | 11.25 x 8.75 x 7.75 in|

        | FedEx_Box_Medium_1 | FedEx® Medium Box (M1) | 13.25 x 11.50 x 2.38 in|

        | FedEx_Box_Medium_2 | FedEx® Medium Box (M2) | 11.25 x 8.75 x 4.38 in|

        | FedEx_Box_Small_1 | FedEx® Small Box (S1) | 12.38 x 10.88 x 1.50 in|

        | FedEx_Box_Small_2 | FedEx® Small Box (S2) | 11.25 x 8.75 x 2.38 in|

        | FedEx_Envelope | FedEx® Envelope | 12.50 x 9.50 x 0.80 in|

        | FedEx_Padded_Pak | FedEx® Padded Pak | 11.75 x 14.75 x 2.00 in|

        | FedEx_Pak_1 | FedEx® Large Pak | 15.50 x 12.00 x 0.80 in|

        | FedEx_Pak_2 | FedEx® Small Pak | 12.75 x 10.25 x 0.80 in|

        | FedEx_Tube | FedEx® Tube | 38.00 x 6.00 x 6.00 in|

        | FedEx_XL_Pak | FedEx® Extra Large Pak | 17.50 x 20.75 x 2.00 in|
    ParcelTemplateUPSEnum:
      type: string
      title: UPS Parcel Template
      enum:
        - UPS_Box_10kg
        - UPS_Box_25kg
        - UPS_Express_Box
        - UPS_Express_Box_Large
        - UPS_Express_Box_Medium
        - UPS_Express_Box_Small
        - UPS_Express_Envelope
        - UPS_Express_Hard_Pak
        - UPS_Express_Legal_Envelope
        - UPS_Express_Pak
        - UPS_Express_Tube
        - UPS_Laboratory_Pak
        - UPS_MI_BPM
        - UPS_MI_BPM_Flat
        - UPS_MI_BPM_Parcel
        - UPS_MI_First_Class
        - UPS_MI_Flat
        - UPS_MI_Irregular
        - UPS_MI_Machinable
        - UPS_MI_MEDIA_MAIL
        - UPS_MI_Parcel_Post
        - UPS_MI_Priority
        - UPS_MI_Standard_Flat
        - UPS_Pad_Pak
        - UPS_Pallet
      description: >
        |Token | Name | Dimensions|

        |:---|:---|:---|

        | UPS_Box_10kg | Box 10kg | 410.00 x 335.00 x 265.00 mm|

        | UPS_Box_25kg | Box 25kg | 484.00 x 433.00 x 350.00 mm|

        | UPS_Express_Box | Express Box | 460.00 x 315.00 x 95.00 mm|

        | UPS_Express_Box_Large | Express Box Large | 18.00 x 13.00 x 3.00 in|

        | UPS_Express_Box_Medium | Express Box Medium | 15.00 x 11.00 x 3.00 in|

        | UPS_Express_Box_Small | Express Box Small | 13.00 x 11.00 x 2.00 in|

        | UPS_Express_Envelope | Express Envelope | 12.50 x 9.50 x 2.00 in|

        | UPS_Express_Hard_Pak | Express Hard Pak | 14.75 x 11.50 x 2.00 in|

        | UPS_Express_Legal_Envelope | Express Legal Envelope | 15.00 x 9.50 x
        2.00 in|

        | UPS_Express_Pak | Express Pak | 16.00 x 12.75 x 2.00 in|

        | UPS_Express_Tube | Express Tube | 970.00 x 190.00 x 165.00 mm|

        | UPS_Laboratory_Pak | Laboratory Pak | 17.25 x 12.75 x 2.00 in|

        | UPS_MI_BPM | BPM (Mail Innovations - Domestic &amp; International) |
        0.00 x 0.00 x 0.00 in|

        | UPS_MI_BPM_Flat | BPM Flat (Mail Innovations - Domestic &amp;
        International) | 0.00 x 0.00 x 0.00 in|

        | UPS_MI_BPM_Parcel | BPM Parcel (Mail Innovations - Domestic &amp;
        International) | 0.00 x 0.00 x 0.00 in|

        | UPS_MI_First_Class | First Class (Mail Innovations - Domestic only) |
        0.00 x 0.00 x 0.00 in|

        | UPS_MI_Flat | Flat (Mail Innovations - Domestic only) | 0.00 x 0.00 x
        0.00 in|

        | UPS_MI_Irregular | Irregular (Mail Innovations - Domestic only) | 0.00
        x 0.00 x 0.00 in|

        | UPS_MI_Machinable | Machinable (Mail Innovations - Domestic only) |
        0.00 x 0.00 x 0.00 in|

        | UPS_MI_MEDIA_MAIL | Media Mail (Mail Innovations - Domestic only) |
        0.00 x 0.00 x 0.00 in|

        | UPS_MI_Parcel_Post | Parcel Post (Mail Innovations - Domestic only) |
        0.00 x 0.00 x 0.00 in|

        | UPS_MI_Priority | Priority (Mail Innovations - Domestic only) | 0.00 x
        0.00 x 0.00 in|

        | UPS_MI_Standard_Flat | Standard Flat (Mail Innovations - Domestic
        only) | 0.00 x 0.00 x 0.00 in|

        | UPS_Pad_Pak | Pad Pak | 14.75 x 11.00 x 2.00 in|

        | UPS_Pallet | Pallet | 120.00 x 80.00 x 200.00 cm|
    ParcelTemplateUSPSEnum:
      type: string
      title: USPS Parcel Template
      enum:
        - USPS_FlatRateCardboardEnvelope
        - USPS_FlatRateEnvelope
        - USPS_FlatRateGiftCardEnvelope
        - USPS_FlatRateLegalEnvelope
        - USPS_FlatRatePaddedEnvelope
        - USPS_FlatRateWindowEnvelope
        - USPS_IrregularParcel
        - USPS_LargeFlatRateBoardGameBox
        - USPS_LargeFlatRateBox
        - USPS_APOFlatRateBox
        - USPS_LargeVideoFlatRateBox
        - USPS_MediumFlatRateBox1
        - USPS_MediumFlatRateBox2
        - USPS_RegionalRateBoxA1
        - USPS_RegionalRateBoxA2
        - USPS_RegionalRateBoxB1
        - USPS_RegionalRateBoxB2
        - USPS_SmallFlatRateBox
        - USPS_SmallFlatRateEnvelope
        - USPS_SoftPack
      description: >
        |Token | Name | Dimensions|

        |:---|:---|:---|

        | USPS_FlatRateCardboardEnvelope | Flat Rate Cardboard Envelope |  12.50
        x 9.50 x 0.75 in |

        | USPS_FlatRateEnvelope | Flat Rate Envelope |  12.50 x 9.50 x 0.75 in |

        | USPS_FlatRateGiftCardEnvelope | Flat Rate Gift Card Envelope |  10.00
        x 7.00 x 0.75 in |

        | USPS_FlatRateLegalEnvelope | Flat Rate Legal Envelope |  15.00 x 9.50
        x 0.75 in |

        | USPS_FlatRatePaddedEnvelope | Flat Rate Padded Envelope |  12.50 x
        9.50 x 1.00 in |

        | USPS_FlatRateWindowEnvelope | Flat Rate Window Envelope |  10.00 x
        5.00 x 0.75 in |

        | USPS_IrregularParcel | Irregular Parcel |  0.00 x 0.00 x 0.00 in |

        | USPS_LargeFlatRateBoardGameBox | Large Flat Rate Board Game Box | 
        24.06 x 11.88 x 3.13 in |

        | USPS_LargeFlatRateBox | Large Flat Rate Box |  12.25 x 12.25 x 6.00 in
        |

        | USPS_APOFlatRateBox | APO/FPO/DPO Large Flat Rate Box |  12.25 x 12.25
        x 6.00 in |

        | USPS_LargeVideoFlatRateBox | Flat Rate Large Video Box (Int&#39;l
        only) |  9.60 x 6.40 x 2.20 in |

        | USPS_MediumFlatRateBox1 | Medium Flat Rate Box 1 |  11.25 x 8.75 x
        6.00 in |

        | USPS_MediumFlatRateBox2 | Medium Flat Rate Box 2 |  14.00 x 12.00 x
        3.50 in |

        | USPS_RegionalRateBoxA1 | Regional Rate Box A1 |  10.13 x 7.13 x 5.00
        in |

        | USPS_RegionalRateBoxA2 | Regional Rate Box A2 |  13.06 x 11.06 x 2.50
        in |

        | USPS_RegionalRateBoxB1 | Regional Rate Box B1 |  12.25 x 10.50 x 5.50
        in |

        | USPS_RegionalRateBoxB2 | Regional Rate Box B2 |  16.25 x 14.50 x 3.00
        in |

        | USPS_SmallFlatRateBox | Small Flat Rate Box |  8.69 x 5.44 x 1.75 in |

        | USPS_SmallFlatRateEnvelope | Small Flat Rate Envelope |  10.00 x 6.00
        x 4.00 in |

        | USPS_SoftPack | Soft Pack Padded Envelope |  Length and width defined
        in the Parcel|
    ParcelTemplateDHLeCommerceEnum:
      type: string
      title: DHL eCommerce Parcel Template
      enum:
        - DHLeC_Irregular
        - DHLeC_SM_Flats
      description: |
        |Token | Name | Dimensions|
        |:---|:---|:---|
        | DHLeC_Irregular | Irregular Shipment | 10.00 x 10.00 x 10.00 in|
        | DHLeC_SM_Flats | Flats | 27.00 x 17.00 x 17.00 in|
    ParcelTemplateDPDUKEnum:
      type: string
      title: DPD UK Parcel Template
      enum:
        - DPD_UK_Express_Pak
      description: |
        |Token | Name | Dimensions|
        |:---|:---|:---|
        | DPD_UK_Express_Pak| DPD UK Express Pak | 530.00 x 400.00 x 100.00 mm|
    ParcelTemplateAramexAustraliaEnum:
      type: string
      title: Aramex Australia Parcel Template
      enum:
        - Fastway_Australia_Satchel_A2
        - Fastway_Australia_Satchel_A3
        - Fastway_Australia_Satchel_A4
        - Fastway_Australia_Satchel_A5
      description: >
        |Token | Name | Dimensions|

        |:---|:---|:---|

        | Fastway_Australia_Satchel_A2 | Satchel A2 | 594.00 x 420.00 x 48.00
        mm|

        | Fastway_Australia_Satchel_A3 | Satchel A3 | 420.00 x 297.00 x 64.00
        mm|

        | Fastway_Australia_Satchel_A4 | Satchel A4 | 297.00 x 210.00 x 64.00
        mm|

        | Fastway_Australia_Satchel_A5 | Satchel A5 | 210.00 x 148.00 x 64.00
        mm|
    RateAmountAndCurrency:
      properties:
        amount:
          example: '5.5'
          type: string
          description: >-
            Final Rate price, expressed in the currency used in the sender's
            country.
        amount_local:
          example: '5.5'
          type: string
          description: >-
            Final Rate price, expressed in the currency used in the recipient's
            country.
        currency:
          example: USD
          type: string
          description: >-
            Currency used in the sender's country, refers to `amount`. 

            The <a href="http://www.xe.com/iso4217.php">official ISO 4217</a>
            currency codes are used, e.g. `USD` or `EUR`.
        currency_local:
          example: USD
          type: string
          description: >-
            Currency used in the recipient's country, refers to `amount_local`. 

            The <a href="http://www.xe.com/iso4217.php">official ISO 4217</a>
            currency codes are used, e.g. `USD` or "EUR".
    COD:
      description: Specify collection on delivery details (UPS only).
      properties:
        amount:
          description: Amount to be collected.
          example: '5.5'
          type: string
        currency:
          description: >-
            Currency for the amount to be collected. Currently only USD is
            supported for UPS.
          example: USD
          type: string
        payment_method:
          description: >-
            Secured funds include money orders, certified cheques and others
            (see 

            <a
            href="https://www.ups.com/content/us/en/shipping/time/service/value_added/cod.html">UPS</a>
            for details). 

            If no payment_method inputted the value defaults to "ANY".)
          enum:
            - SECURED_FUNDS
            - CASH
            - ANY
          example: CASH
          type: string
      title: COD Specify collection on delivery details (UPS only).
      type: object
    ParcelInsurance:
      description: >-
        To add insurance to your parcel, specify `amount`, `content` and
        `currency`. <br><br>If you do not want to add insurance to you parcel,
        do not set these parameters.
      properties:
        amount:
          description: Declared value of the goods you want to insure.
          example: '5.5'
          type: string
        content:
          description: Description of parcel content.
          example: Laptop
          type: string
        currency:
          description: >-
            Currency for the amount value. Currently only USD is supported for
            FedEx and UPS.
          example: USD
          type: string
        provider:
          description: >-
            To have insurance cover provided by a carrier directly instead of
            Shippo's provider (XCover), set provider to `FEDEX`, `UPS`, or
            `ONTRAC`.
          example: UPS
          type: string
          enum:
            - FEDEX
            - UPS
            - ONTRAC
      type: object
  responses:
    liveRatePaginatedResponse:
      description: Paginated list of live rates
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/LiveRatePaginatedList'
    badRequestResponse:
      description: Bad request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/BadRequest'
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: Authorization
      x-token-prefix: ShippoToken
      x-token-format: ShippoToken {token}
      x-default: 'ShippoToken '
      description: |
        API key authentication using the ShippoToken scheme.
        Format: Authorization: ShippoToken <API_TOKEN>
        Example: Authorization: ShippoToken shippo_live_abc123

````