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
security:
  - APIKeyHeader: []
servers:
  - url: https://api.goshippo.com
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 4.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`
x-tagGroups:
  - name: API
    tags:
      - Overview
  - name: Addresses
    tags:
      - Addresses
  - name: Parcels
    tags:
      - Parcels
      - Carrier Parcel Templates
      - User Parcel Templates
  - name: Shipments
    tags:
      - Shipments
      - Rates
  - name: Purchase
    tags:
      - Transactions
      - Batches
  - name: Tracking
    tags:
      - Tracking Status
  - name: Webhooks
    tags:
      - Webhooks
  - name: International Shipping
    tags:
      - Customs Items
      - Customs Declarations
  - name: Carriers
    tags:
      - Carrier Accounts
  - name: Manifests and pickups
    tags:
      - Manifests
      - Pickups
  - name: Orders
    tags:
      - Orders
  - name: Billing
    tags:
      - Refunds
  - name: Rates at Checkout
    tags:
      - Service Groups
      - Rates at Checkout
  - name: Accounts
    tags:
      - Shippo Accounts
  - name: Enums
    tags:
      - Carriers
      - Service Levels
      - Parcel Templates
      - Address Validation Source
      - Address Validation Codes
      - Customs Declaration B13A Filing Option
      - Customs Declaration Contents Type
      - Customs Declaration EEL/PFC
      - Customs Declaration Incoterm
      - Customs Declaration Non Delivery Option
paths:
  /addresses:
    get:
      description: >-
        Returns a list of all address objects that have been created in this
        account.
      operationId: ListAddresses
      parameters:
        - $ref: '#/components/parameters/PageNumberQueryParam'
        - $ref: '#/components/parameters/ResultsPerPageDefault5QueryParam'
        - $ref: '#/components/parameters/ShippoApiVersionHeader'
      responses:
        '200':
          $ref: '#/components/responses/addressPaginatedResponse'
        '400':
          $ref: '#/components/responses/badRequestResponse'
      summary: List all addresses
      tags:
        - Addresses
      x-codeSamples:
        - label: cURL
          lang: cURL
          source: |-
            curl https://api.goshippo.com/addresses/ \
             -H "Authorization: ShippoToken <API_TOKEN>"
        - lang: python
          label: Python
          source: |-
            import shippo

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


            res = s.addresses.list(page=1, results=5)

            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.addresses.list(1, 5);

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

            run();
        - lang: php
          label: PHP
          source: |-
            declare(strict_types=1);

            require 'vendor/autoload.php';

            use Shippo\API;

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



            $response = $sdk->addresses->list(
                page: 1,
                results: 5,
                shippoApiVersion: '2018-02-08'

            );

            if ($response->addressPaginatedList !== null) {
                // handle response
            }
        - lang: csharp
          label: C#
          source: |-
            using Shippo;
            using Shippo.Models.Components;

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

            var res = await sdk.Addresses.ListAsync(
                page: 1,
                results: 5,
                shippoApiVersion: "2018-02-08"
            );

            // handle response
        - lang: java
          label: Java
          source: >-
            package hello.world;


            import com.goshippo.shippo_sdk.Shippo;

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

            import java.lang.Exception;


            public class Application {

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

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

                    ListAddressesResponse res = sdk.addresses().list()
                            .page(1L)
                            .results(5L)
                            .shippoApiVersion("2018-02-08")
                            .call();

                    if (res.addressPaginatedList().isPresent()) {
                        // handle response
                    }
                }
            }
    post:
      description: >-
        Creates a new address object. You can use address objects to create new
        shipments, calculate rates, and to create orders.
      operationId: CreateAddress
      parameters:
        - $ref: '#/components/parameters/ShippoApiVersionHeader'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AddressCreateRequest'
        description: Address details.
      responses:
        '201':
          $ref: '#/components/responses/addressResponse'
        '400':
          $ref: '#/components/responses/badRequestResponse'
      summary: Create a new address
      tags:
        - Addresses
      x-codeSamples:
        - label: cURL
          lang: cURL
          source: |-
            curl https://api.goshippo.com/addresses/ \
              -H "Authorization: ShippoToken <API_TOKEN>" \
              -d name="Shawn Ippotle" \
              -d company="Shippo" \
              -d street1="215 Clayton St." \
              -d street2="" \
              -d city="San Francisco" \
              -d state="CA" \
              -d zip=94117 \
              -d country="US" \
              -d phone="+1 555 341 9393" \
              -d email="shippotle@shippo.com"\
              -d is_residential=True\
              -d metadata="Customer ID 123456"
        - lang: python
          label: Python
          source: |-
            import shippo
            from shippo.models import components

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


            res = s.addresses.create(request=components.AddressCreateRequest(
                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,
            ))

            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.addresses.create({
                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,
              });

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

            run();
        - lang: php
          label: PHP
          source: |-
            declare(strict_types=1);

            require 'vendor/autoload.php';

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

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

            $addressCreateRequest = new Components\AddressCreateRequest(
                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,
            );

            $response = $sdk->addresses->create(
                addressCreateRequest: $addressCreateRequest,
                shippoApiVersion: '2018-02-08'

            );

            if ($response->address !== null) {
                // handle response
            }
        - lang: csharp
          label: C#
          source: |-
            using Shippo;
            using Shippo.Models.Components;

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

            var res = await sdk.Addresses.CreateAsync(
                addressCreateRequest: new AddressCreateRequest() {
                    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,
                },
                shippoApiVersion: "2018-02-08"
            );

            // handle response
        - lang: java
          label: Java
          source: >-
            package hello.world;


            import com.goshippo.shippo_sdk.Shippo;

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

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

            import java.lang.Exception;


            public class Application {

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

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

                    CreateAddressResponse res = sdk.addresses().create()
                            .shippoApiVersion("2018-02-08")
                            .addressCreateRequest(AddressCreateRequest.builder()
                                .country("US")
                                .name("Shwan Ippotle")
                                .company("Shippo")
                                .street1("215 Clayton St.")
                                .street3("")
                                .streetNo("")
                                .city("San Francisco")
                                .state("CA")
                                .zip("94117")
                                .phone("+1 555 341 9393")
                                .email("shippotle@shippo.com")
                                .isResidential(true)
                                .metadata("Customer ID 123456")
                                .validate(true)
                                .build())
                            .call();

                    if (res.address().isPresent()) {
                        // handle response
                    }
                }
            }
  /addresses/{AddressId}:
    get:
      description: Returns an existing address using an object ID.
      operationId: GetAddress
      parameters:
        - description: Object ID of the address
          in: path
          name: AddressId
          required: true
          schema:
            type: string
        - $ref: '#/components/parameters/ShippoApiVersionHeader'
      responses:
        '200':
          $ref: '#/components/responses/addressResponse'
        '400':
          $ref: '#/components/responses/badRequestResponse'
      summary: Retrieve an address
      tags:
        - Addresses
      x-codeSamples:
        - label: cURL
          lang: cURL
          source: >-
            curl
            https://api.goshippo.com/addresses/d799c2679e644279b59fe661ac8fa488/
            \
              -H "Authorization: ShippoToken <API_TOKEN>"
        - lang: python
          label: Python
          source: |-
            import shippo

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


            res = s.addresses.get(address_id='<id>')

            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.addresses.get("<id>");

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

            run();
        - lang: php
          label: PHP
          source: |-
            declare(strict_types=1);

            require 'vendor/autoload.php';

            use Shippo\API;

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



            $response = $sdk->addresses->get(
                addressId: '<id>',
                shippoApiVersion: '2018-02-08'

            );

            if ($response->address !== null) {
                // handle response
            }
        - lang: csharp
          label: C#
          source: |-
            using Shippo;
            using Shippo.Models.Components;

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

            var res = await sdk.Addresses.GetAsync(
                addressId: "<id>",
                shippoApiVersion: "2018-02-08"
            );

            // handle response
        - lang: java
          label: Java
          source: |-
            package hello.world;

            import com.goshippo.shippo_sdk.Shippo;
            import com.goshippo.shippo_sdk.models.operations.GetAddressResponse;
            import java.lang.Exception;

            public class Application {

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

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

                    GetAddressResponse res = sdk.addresses().get()
                            .addressId("<id>")
                            .shippoApiVersion("2018-02-08")
                            .call();

                    if (res.address().isPresent()) {
                        // handle response
                    }
                }
            }
  /addresses/{AddressId}/validate:
    get:
      description: Validates an existing address using an object ID
      operationId: ValidateAddress
      parameters:
        - description: Object ID of the address
          in: path
          name: AddressId
          required: true
          schema:
            type: string
        - $ref: '#/components/parameters/ShippoApiVersionHeader'
      responses:
        '200':
          $ref: '#/components/responses/addressResponse'
        '400':
          $ref: '#/components/responses/badRequestResponse'
      summary: Validate an address
      tags:
        - Addresses
      x-codeSamples:
        - label: cURL
          lang: cURL
          source: >-
            curl
            https://api.goshippo.com/addresses/d799c2679e644279b59fe661ac8fa488/validate/
            \
              -H "Authorization: ShippoToken <API_TOKEN>"
        - lang: python
          label: Python
          source: |-
            import shippo

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


            res = s.addresses.validate(address_id='<id>')

            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.addresses.validate("<id>");

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

            run();
        - lang: php
          label: PHP
          source: |-
            declare(strict_types=1);

            require 'vendor/autoload.php';

            use Shippo\API;

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



            $response = $sdk->addresses->validate(
                addressId: '<id>',
                shippoApiVersion: '2018-02-08'

            );

            if ($response->address !== null) {
                // handle response
            }
        - lang: csharp
          label: C#
          source: |-
            using Shippo;
            using Shippo.Models.Components;

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

            var res = await sdk.Addresses.ValidateAsync(
                addressId: "<id>",
                shippoApiVersion: "2018-02-08"
            );

            // handle response
        - lang: java
          label: Java
          source: >-
            package hello.world;


            import com.goshippo.shippo_sdk.Shippo;

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

            import java.lang.Exception;


            public class Application {

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

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

                    ValidateAddressResponse res = sdk.addresses().validate()
                            .addressId("<id>")
                            .shippoApiVersion("2018-02-08")
                            .call();

                    if (res.address().isPresent()) {
                        // handle response
                    }
                }
            }
      x-speakeasy-name-override: validate
  /batches:
    post:
      description: >-
        Creates a new batch object for purchasing shipping labels for many
        shipments at once. Batches are created asynchronously. This means that
        the API response won't include your batch shipments yet. You need to
        retrieve the batch later to verify that all batch shipments are valid.
      operationId: CreateBatch
      parameters:
        - $ref: '#/components/parameters/ShippoApiVersionHeader'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BatchCreateRequest'
        description: Batch details.
      responses:
        '201':
          $ref: '#/components/responses/batchResponse'
        '400':
          $ref: '#/components/responses/badRequestResponse'
      summary: Create a batch
      tags:
        - Batches
      x-codeSamples:
        - label: cURL
          lang: cURL
          source: |-
            curl https://api.goshippo.com/batches/  \
            -H "Authorization: ShippoToken <API_TOKEN>" \
            -H "Content-Type: application/json"  \
            -d '{
                  "default_carrier_account": "078870331023437cb917f5187429b093",
                  "default_servicelevel_token": "usps_priority",
                  "label_filetype": "PDF_4x6",
                  "metadata": "BATCH #170",
                  "batch_shipments": [
                    {
                      "shipment": {    
                        "address_from": {
                          "name": "Mr Hippo",
                          "street1": "965 Mission St",
                          "street2": "Ste 201",
                          "city": "San Francisco",
                          "state": "CA",
                          "zip": "94103",
                          "country": "US",
                          "phone": "4151234567",
                          "email": "mrhippo@shippo.com"
                        },
                        "address_to": {
                          "name": "Mrs Hippo",
                          "company": "",
                          "street1": "Broadway 1",
                          "street2": "",
                          "city": "New York",
                          "state": "NY",
                          "zip": "10007",
                          "country": "US",
                          "phone": "4151234567",
                          "email": "mrshippo@shippo.com"
                        },
                        "parcels": [{
                          "length": "5",
                          "width": "5",
                          "height": "5",
                          "distance_unit": "in",
                          "weight": "2",
                          "mass_unit": "oz"
                        }]
                      }
                    },
                    {
                      "shipment": {    
                        "address_from": {
                          "name": "Mr Hippo",
                          "street1": "1092 Indian Summer Ct",
                          "city": "San Jose",
                          "state": "CA",
                          "zip": "95122",
                          "country": "US",
                          "phone": "4151234567",
                          "email": "mrhippo@shippo.com"
                        },
                        "address_to": {
                          "name": "Mrs Hippo",
                          "company": "",
                          "street1": "Broadway 1",
                          "street2": "",
                          "city": "New York",
                          "state": "NY",
                          "zip": "10007",
                          "country": "US",
                          "phone": "4151234567",
                          "email": "mrshippo@shippo.com"
                        },
                        "parcels": [{
                          "length": "5",
                          "width": "5",
                          "height": "5",
                          "distance_unit": "in",
                          "weight": "20",
                          "mass_unit": "lb"
                        }]
                      },
                      "carrier_account": "a4391cd4ab974f478f55dc08b5c8e3b3",
                      "servicelevel_token": "fedex_2_day"
                    }
                  ]
                }' 
        - lang: python
          label: Python
          source: |-
            import shippo
            from shippo.models import components

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


            res = s.batches.create(request=components.BatchCreateRequest(
                default_carrier_account='078870331023437cb917f5187429b093',
                default_servicelevel_token='usps_priority',
                label_filetype=components.LabelFileTypeEnum.PDF_4X6,
                metadata='BATCH #1',
                batch_shipments=[
                    components.BatchShipmentCreateRequest(
                        carrier_account='a4391cd4ab974f478f55dc08b5c8e3b3',
                        metadata='SHIPMENT #1',
                        servicelevel_token='fedex_ground',
                        shipment=components.ShipmentCreateRequest(
                            extra=components.ShipmentExtra(
                                accounts_receivable_customer_account=components.UPSReferenceFields(
                                    prefix='ABC',
                                    value='value',
                                    ref_sort=1,
                                ),
                                appropriation_number=components.UPSReferenceFields(
                                    prefix='ABC',
                                    value='value',
                                    ref_sort=1,
                                ),
                                bill_of_lading_number=components.UPSReferenceFields(
                                    prefix='ABC',
                                    value='value',
                                    ref_sort=1,
                                ),
                                cod=components.Cod(
                                    amount='5.5',
                                    currency='USD',
                                    payment_method=components.PaymentMethod.CASH,
                                ),
                                cod_number=components.UPSReferenceFields(
                                    prefix='ABC',
                                    value='value',
                                    ref_sort=1,
                                ),
                                customer_reference=components.CustomerReference(
                                    ref_sort=1,
                                ),
                                dealer_order_number=components.UPSReferenceFields(
                                    prefix='ABC',
                                    value='value',
                                    ref_sort=1,
                                ),
                                dept_number=components.DepartmentNumber(
                                    ref_sort=3,
                                ),
                                fda_product_code=components.UPSReferenceFields(
                                    prefix='ABC',
                                    value='value',
                                    ref_sort=1,
                                ),
                                insurance=components.Insurance(
                                    amount='5.5',
                                    currency='USD',
                                ),
                                invoice_number=components.InvoiceNumber(
                                    ref_sort=2,
                                ),
                                manifest_number=components.UPSReferenceFields(
                                    prefix='ABC',
                                    value='value',
                                    ref_sort=1,
                                ),
                                model_number=components.UPSReferenceFields(
                                    prefix='ABC',
                                    value='value',
                                    ref_sort=1,
                                ),
                                part_number=components.UPSReferenceFields(
                                    prefix='ABC',
                                    value='value',
                                    ref_sort=1,
                                ),
                                po_number=components.PoNumber(
                                    ref_sort=2,
                                ),
                                production_code=components.UPSReferenceFields(
                                    prefix='ABC',
                                    value='value',
                                    ref_sort=1,
                                ),
                                purchase_request_number=components.UPSReferenceFields(
                                    prefix='ABC',
                                    value='value',
                                    ref_sort=1,
                                ),
                                rma_number=components.RmaNumber(
                                    ref_sort=1,
                                ),
                                salesperson_number=components.UPSReferenceFields(
                                    prefix='ABC',
                                    value='value',
                                    ref_sort=1,
                                ),
                                serial_number=components.UPSReferenceFields(
                                    prefix='ABC',
                                    value='value',
                                    ref_sort=1,
                                ),
                                store_number=components.UPSReferenceFields(
                                    prefix='ABC',
                                    value='value',
                                    ref_sort=1,
                                ),
                                transaction_reference_number=components.UPSReferenceFields(
                                    prefix='ABC',
                                    value='value',
                                    ref_sort=1,
                                ),
                            ),
                            metadata='Customer ID 123456',
                            shipment_date='2021-03-22T12:00:00Z',
                            address_from='d799c2679e644279b59fe661ac8fa488',
                            address_return=components.AddressCreateRequest(
                                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,
                            ),
                            address_to=components.AddressCreateRequest(
                                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,
                            ),
                            customs_declaration=components.CustomsDeclarationCreateRequest(
                                b13a_filing_option=components.CustomsDeclarationB13AFilingOptionEnum.FILED_ELECTRONICALLY,
                                certify=True,
                                certify_signer='Shawn Ippotle',
                                contents_explanation='T-Shirt purchase',
                                duties_payor=components.DutiesPayor(
                                    account='2323434543',
                                    type=components.CustomsDeclarationCreateRequestType.THIRD_PARTY,
                                    address=components.CustomsDeclarationCreateRequestAddress(
                                        name='Patrick Kavanagh',
                                        zip='80331',
                                        country='DE',
                                    ),
                                ),
                                exporter_identification=components.CustomsExporterIdentification(
                                    eori_number='PL123456790ABCDE',
                                    tax_id=components.CustomsTaxIdentification(
                                        number='123456789',
                                        type=components.CustomsTaxIdentificationType.EIN,
                                    ),
                                ),
                                invoice='#123123',
                                metadata='Order ID #123123',
                                address_importer=components.AddressImporter(
                                    name='Shwan Ippotle',
                                    company='Shippo',
                                    street1='Blumenstraße',
                                    street3='',
                                    street_no='22',
                                    city='München',
                                    state='CA',
                                    zip='80331',
                                    country='DE',
                                    phone='80331',
                                    email='shippotle@shippo.com',
                                    is_residential=True,
                                ),
                                contents_type=components.CustomsDeclarationContentsTypeEnum.MERCHANDISE,
                                eel_pfc=components.CustomsDeclarationEelPfcEnum.NOEEI_30_37_A,
                                incoterm=components.CustomsDeclarationIncotermEnum.DDP,
                                items=[
                                    components.CustomsItemCreateRequest(
                                        description='T-Shirt',
                                        mass_unit=components.WeightUnitEnum.LB,
                                        metadata='Order ID "123454"',
                                        net_weight='5',
                                        origin_country='<value>',
                                        quantity=20,
                                        sku_code='HM-123',
                                        hs_code='0901.21',
                                        value_amount='200',
                                        value_currency='USD',
                                    ),
                                    components.CustomsItemCreateRequest(
                                        description='T-Shirt',
                                        mass_unit=components.WeightUnitEnum.LB,
                                        metadata='Order ID "123454"',
                                        net_weight='5',
                                        origin_country='<value>',
                                        quantity=20,
                                        sku_code='HM-123',
                                        hs_code='0901.21',
                                        value_amount='200',
                                        value_currency='USD',
                                    ),
                                    components.CustomsItemCreateRequest(
                                        description='T-Shirt',
                                        mass_unit=components.WeightUnitEnum.LB,
                                        metadata='Order ID "123454"',
                                        net_weight='5',
                                        origin_country='<value>',
                                        quantity=20,
                                        sku_code='HM-123',
                                        hs_code='0901.21',
                                        value_amount='200',
                                        value_currency='USD',
                                    ),
                                ],
                                non_delivery_option=components.CustomsDeclarationNonDeliveryOptionEnum.RETURN,
                                test=True,
                            ),
                            carrier_accounts=[
                                '065a4a8c10d24a34ab932163a1b87f52',
                                '73f706f4bdb94b54a337563840ce52b0',
                            ],
                            parcels=[
                                components.ParcelCreateRequest(
                                    extra=components.ParcelExtra(
                                        cod=components.Cod(
                                            amount='5.5',
                                            currency='USD',
                                            payment_method=components.PaymentMethod.CASH,
                                        ),
                                        insurance=components.ParcelInsurance(
                                            amount='5.5',
                                            content='Laptop',
                                            currency='USD',
                                            provider=components.ParcelInsuranceProvider.UPS,
                                        ),
                                    ),
                                    metadata='Customer ID 123456',
                                    mass_unit=components.WeightUnitEnum.LB,
                                    weight='1',
                                    distance_unit=components.DistanceUnitEnum.IN,
                                    height='1',
                                    length='1',
                                    width='1',
                                ),
                                components.ParcelCreateRequest(
                                    extra=components.ParcelExtra(
                                        cod=components.Cod(
                                            amount='5.5',
                                            currency='USD',
                                            payment_method=components.PaymentMethod.CASH,
                                        ),
                                        insurance=components.ParcelInsurance(
                                            amount='5.5',
                                            content='Laptop',
                                            currency='USD',
                                            provider=components.ParcelInsuranceProvider.UPS,
                                        ),
                                    ),
                                    metadata='Customer ID 123456',
                                    mass_unit=components.WeightUnitEnum.LB,
                                    weight='1',
                                    distance_unit=components.DistanceUnitEnum.IN,
                                    height='1',
                                    length='1',
                                    width='1',
                                ),
                                components.ParcelCreateRequest(
                                    extra=components.ParcelExtra(
                                        cod=components.Cod(
                                            amount='5.5',
                                            currency='USD',
                                            payment_method=components.PaymentMethod.CASH,
                                        ),
                                        insurance=components.ParcelInsurance(
                                            amount='5.5',
                                            content='Laptop',
                                            currency='USD',
                                            provider=components.ParcelInsuranceProvider.UPS,
                                        ),
                                    ),
                                    metadata='Customer ID 123456',
                                    mass_unit=components.WeightUnitEnum.LB,
                                    weight='1',
                                    distance_unit=components.DistanceUnitEnum.IN,
                                    height='1',
                                    length='1',
                                    width='1',
                                ),
                            ],
                        ),
                    ),
                ],
            ))

            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.batches.create({
                defaultCarrierAccount: "078870331023437cb917f5187429b093",
                defaultServicelevelToken: "usps_priority",
                labelFiletype: "PDF_4x6",
                metadata: "BATCH #1",
                batchShipments: [
                  {
                    carrierAccount: "a4391cd4ab974f478f55dc08b5c8e3b3",
                    metadata: "SHIPMENT #1",
                    servicelevelToken: "fedex_ground",
                    shipment: {
                      extra: {
                        accountsReceivableCustomerAccount: {
                          prefix: "ABC",
                          value: "value",
                          refSort: 1,
                        },
                        appropriationNumber: {
                          prefix: "ABC",
                          value: "value",
                          refSort: 1,
                        },
                        billOfLadingNumber: {
                          prefix: "ABC",
                          value: "value",
                          refSort: 1,
                        },
                        cod: {
                          amount: "5.5",
                          currency: "USD",
                          paymentMethod: "CASH",
                        },
                        codNumber: {
                          prefix: "ABC",
                          value: "value",
                          refSort: 1,
                        },
                        customerReference: {
                          refSort: 1,
                        },
                        dealerOrderNumber: {
                          prefix: "ABC",
                          value: "value",
                          refSort: 1,
                        },
                        deptNumber: {
                          refSort: 3,
                        },
                        fdaProductCode: {
                          prefix: "ABC",
                          value: "value",
                          refSort: 1,
                        },
                        insurance: {
                          amount: "5.5",
                          currency: "USD",
                        },
                        invoiceNumber: {
                          refSort: 2,
                        },
                        manifestNumber: {
                          prefix: "ABC",
                          value: "value",
                          refSort: 1,
                        },
                        modelNumber: {
                          prefix: "ABC",
                          value: "value",
                          refSort: 1,
                        },
                        partNumber: {
                          prefix: "ABC",
                          value: "value",
                          refSort: 1,
                        },
                        poNumber: {
                          refSort: 2,
                        },
                        productionCode: {
                          prefix: "ABC",
                          value: "value",
                          refSort: 1,
                        },
                        purchaseRequestNumber: {
                          prefix: "ABC",
                          value: "value",
                          refSort: 1,
                        },
                        rmaNumber: {
                          refSort: 1,
                        },
                        salespersonNumber: {
                          prefix: "ABC",
                          value: "value",
                          refSort: 1,
                        },
                        serialNumber: {
                          prefix: "ABC",
                          value: "value",
                          refSort: 1,
                        },
                        storeNumber: {
                          prefix: "ABC",
                          value: "value",
                          refSort: 1,
                        },
                        transactionReferenceNumber: {
                          prefix: "ABC",
                          value: "value",
                          refSort: 1,
                        },
                      },
                      metadata: "Customer ID 123456",
                      shipmentDate: "2021-03-22T12:00:00Z",
                      addressFrom: "d799c2679e644279b59fe661ac8fa488",
                      addressReturn: {
                        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,
                      },
                      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,
                      },
                      customsDeclaration: {
                        b13aFilingOption: "FILED_ELECTRONICALLY",
                        certify: true,
                        certifySigner: "Shawn Ippotle",
                        contentsExplanation: "T-Shirt purchase",
                        dutiesPayor: {
                          account: "2323434543",
                          type: "THIRD_PARTY",
                          address: {
                            name: "Patrick Kavanagh",
                            zip: "80331",
                            country: "DE",
                          },
                        },
                        exporterIdentification: {
                          eoriNumber: "PL123456790ABCDE",
                          taxId: {
                            number: "123456789",
                            type: "EIN",
                          },
                        },
                        invoice: "#123123",
                        metadata: "Order ID #123123",
                        addressImporter: {
                          name: "Shwan Ippotle",
                          company: "Shippo",
                          street1: "Blumenstraße",
                          street3: "",
                          streetNo: "22",
                          city: "München",
                          state: "CA",
                          zip: "80331",
                          country: "DE",
                          phone: "80331",
                          email: "shippotle@shippo.com",
                          isResidential: true,
                        },
                        contentsType: "MERCHANDISE",
                        eelPfc: "NOEEI_30_37_a",
                        incoterm: "DDP",
                        items: [
                          {
                            description: "T-Shirt",
                            massUnit: "lb",
                            metadata: "Order ID \"123454\"",
                            netWeight: "5",
                            originCountry: "<value>",
                            quantity: 20,
                            skuCode: "HM-123",
                            hsCode: "0901.21",
                            valueAmount: "200",
                            valueCurrency: "USD",
                          },
                          {
                            description: "T-Shirt",
                            massUnit: "lb",
                            metadata: "Order ID \"123454\"",
                            netWeight: "5",
                            originCountry: "<value>",
                            quantity: 20,
                            skuCode: "HM-123",
                            hsCode: "0901.21",
                            valueAmount: "200",
                            valueCurrency: "USD",
                          },
                          {
                            description: "T-Shirt",
                            massUnit: "lb",
                            metadata: "Order ID \"123454\"",
                            netWeight: "5",
                            originCountry: "<value>",
                            quantity: 20,
                            skuCode: "HM-123",
                            hsCode: "0901.21",
                            valueAmount: "200",
                            valueCurrency: "USD",
                          },
                        ],
                        nonDeliveryOption: "RETURN",
                        test: true,
                      },
                      carrierAccounts: [
                        "065a4a8c10d24a34ab932163a1b87f52",
                        "73f706f4bdb94b54a337563840ce52b0",
                      ],
                      parcels: [
                        {
                          extra: {
                            cod: {
                              amount: "5.5",
                              currency: "USD",
                              paymentMethod: "CASH",
                            },
                            insurance: {
                              amount: "5.5",
                              content: "Laptop",
                              currency: "USD",
                              provider: "UPS",
                            },
                          },
                          metadata: "Customer ID 123456",
                          massUnit: "lb",
                          weight: "1",
                          distanceUnit: "in",
                          height: "1",
                          length: "1",
                          width: "1",
                        },
                        {
                          extra: {
                            cod: {
                              amount: "5.5",
                              currency: "USD",
                              paymentMethod: "CASH",
                            },
                            insurance: {
                              amount: "5.5",
                              content: "Laptop",
                              currency: "USD",
                              provider: "UPS",
                            },
                          },
                          metadata: "Customer ID 123456",
                          massUnit: "lb",
                          weight: "1",
                          distanceUnit: "in",
                          height: "1",
                          length: "1",
                          width: "1",
                        },
                        {
                          extra: {
                            cod: {
                              amount: "5.5",
                              currency: "USD",
                              paymentMethod: "CASH",
                            },
                            insurance: {
                              amount: "5.5",
                              content: "Laptop",
                              currency: "USD",
                              provider: "UPS",
                            },
                          },
                          metadata: "Customer ID 123456",
                          massUnit: "lb",
                          weight: "1",
                          distanceUnit: "in",
                          height: "1",
                          length: "1",
                          width: "1",
                        },
                      ],
                    },
                  },
                ],
              });

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

            run();
        - lang: php
          label: PHP
          source: |-
            declare(strict_types=1);

            require 'vendor/autoload.php';

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

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

            $batchCreateRequest = new Components\BatchCreateRequest(
                defaultCarrierAccount: '078870331023437cb917f5187429b093',
                defaultServicelevelToken: 'usps_priority',
                labelFiletype: Components\LabelFileTypeEnum::PDF4x6,
                metadata: 'BATCH #1',
                batchShipments: [
                    new Components\BatchShipmentCreateRequest(
                        carrierAccount: 'a4391cd4ab974f478f55dc08b5c8e3b3',
                        metadata: 'SHIPMENT #1',
                        servicelevelToken: 'fedex_ground',
                        shipment: new Components\ShipmentCreateRequest(
                            extra: new Components\ShipmentExtra(
                                accountsReceivableCustomerAccount: new Components\UPSReferenceFields(
                                    prefix: 'ABC',
                                    value: 'value',
                                    refSort: 1,
                                ),
                                appropriationNumber: new Components\UPSReferenceFields(
                                    prefix: 'ABC',
                                    value: 'value',
                                    refSort: 1,
                                ),
                                billOfLadingNumber: new Components\UPSReferenceFields(
                                    prefix: 'ABC',
                                    value: 'value',
                                    refSort: 1,
                                ),
                                cod: new Components\Cod(
                                    amount: '5.5',
                                    currency: 'USD',
                                    paymentMethod: Components\PaymentMethod::Cash,
                                ),
                                codNumber: new Components\UPSReferenceFields(
                                    prefix: 'ABC',
                                    value: 'value',
                                    refSort: 1,
                                ),
                                customerReference: new Components\CustomerReference(
                                    refSort: 1,
                                ),
                                dealerOrderNumber: new Components\UPSReferenceFields(
                                    prefix: 'ABC',
                                    value: 'value',
                                    refSort: 1,
                                ),
                                deptNumber: new Components\DepartmentNumber(
                                    refSort: 3,
                                ),
                                fdaProductCode: new Components\UPSReferenceFields(
                                    prefix: 'ABC',
                                    value: 'value',
                                    refSort: 1,
                                ),
                                insurance: new Components\Insurance(
                                    amount: '5.5',
                                    currency: 'USD',
                                ),
                                invoiceNumber: new Components\InvoiceNumber(
                                    refSort: 2,
                                ),
                                manifestNumber: new Components\UPSReferenceFields(
                                    prefix: 'ABC',
                                    value: 'value',
                                    refSort: 1,
                                ),
                                modelNumber: new Components\UPSReferenceFields(
                                    prefix: 'ABC',
                                    value: 'value',
                                    refSort: 1,
                                ),
                                partNumber: new Components\UPSReferenceFields(
                                    prefix: 'ABC',
                                    value: 'value',
                                    refSort: 1,
                                ),
                                poNumber: new Components\PoNumber(
                                    refSort: 2,
                                ),
                                productionCode: new Components\UPSReferenceFields(
                                    prefix: 'ABC',
                                    value: 'value',
                                    refSort: 1,
                                ),
                                purchaseRequestNumber: new Components\UPSReferenceFields(
                                    prefix: 'ABC',
                                    value: 'value',
                                    refSort: 1,
                                ),
                                rmaNumber: new Components\RmaNumber(
                                    refSort: 1,
                                ),
                                salespersonNumber: new Components\UPSReferenceFields(
                                    prefix: 'ABC',
                                    value: 'value',
                                    refSort: 1,
                                ),
                                serialNumber: new Components\UPSReferenceFields(
                                    prefix: 'ABC',
                                    value: 'value',
                                    refSort: 1,
                                ),
                                storeNumber: new Components\UPSReferenceFields(
                                    prefix: 'ABC',
                                    value: 'value',
                                    refSort: 1,
                                ),
                                transactionReferenceNumber: new Components\UPSReferenceFields(
                                    prefix: 'ABC',
                                    value: 'value',
                                    refSort: 1,
                                ),
                            ),
                            metadata: 'Customer ID 123456',
                            shipmentDate: '2021-03-22T12:00:00Z',
                            addressFrom: new Components\AddressCreateRequest(
                                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,
                            ),
                            addressReturn: 'd799c2679e644279b59fe661ac8fa488',
                            addressTo: new Components\AddressCreateRequest(
                                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,
                            ),
                            customsDeclaration: new Components\CustomsDeclarationCreateRequest(
                                b13aFilingOption: Components\CustomsDeclarationB13AFilingOptionEnum::FiledElectronically,
                                certify: true,
                                certifySigner: 'Shawn Ippotle',
                                contentsExplanation: 'T-Shirt purchase',
                                dutiesPayor: new Components\DutiesPayor(
                                    account: '2323434543',
                                    type: Components\CustomsDeclarationCreateRequestType::ThirdParty,
                                    address: new Components\CustomsDeclarationCreateRequestAddress(
                                        name: 'Patrick Kavanagh',
                                        zip: '80331',
                                        country: 'DE',
                                    ),
                                ),
                                exporterIdentification: new Components\CustomsExporterIdentification(
                                    eoriNumber: 'PL123456790ABCDE',
                                    taxId: new Components\CustomsTaxIdentification(
                                        number: '123456789',
                                        type: Components\CustomsTaxIdentificationType::Ein,
                                    ),
                                ),
                                invoice: '#123123',
                                metadata: 'Order ID #123123',
                                addressImporter: new Components\AddressImporter(
                                    name: 'Shwan Ippotle',
                                    company: 'Shippo',
                                    street1: 'Blumenstraße',
                                    street3: '',
                                    streetNo: '22',
                                    city: 'München',
                                    state: 'CA',
                                    zip: '80331',
                                    country: 'DE',
                                    phone: '80331',
                                    email: 'shippotle@shippo.com',
                                    isResidential: true,
                                ),
                                contentsType: Components\CustomsDeclarationContentsTypeEnum::Merchandise,
                                eelPfc: Components\CustomsDeclarationEelPfcEnum::NOEEI3037A,
                                incoterm: Components\CustomsDeclarationIncotermEnum::Ddp,
                                items: [
                                    new Components\CustomsItemCreateRequest(
                                        description: 'T-Shirt',
                                        massUnit: Components\WeightUnitEnum::Lb,
                                        metadata: 'Order ID "123454"',
                                        netWeight: '5',
                                        originCountry: '<value>',
                                        quantity: 20,
                                        skuCode: 'HM-123',
                                        hsCode: '0901.21',
                                        valueAmount: '200',
                                        valueCurrency: 'USD',
                                    ),
                                ],
                                nonDeliveryOption: Components\CustomsDeclarationNonDeliveryOptionEnum::Return,
                                test: true,
                            ),
                            carrierAccounts: [
                                '065a4a8c10d24a34ab932163a1b87f52',
                                '73f706f4bdb94b54a337563840ce52b0',
                            ],
                            parcels: [
                                new Components\ParcelCreateRequest(
                                    extra: new Components\ParcelExtra(
                                        cod: new Components\Cod(
                                            amount: '5.5',
                                            currency: 'USD',
                                            paymentMethod: Components\PaymentMethod::Cash,
                                        ),
                                        insurance: new Components\ParcelInsurance(
                                            amount: '5.5',
                                            content: 'Laptop',
                                            currency: 'USD',
                                            provider: Components\ParcelInsuranceProvider::Ups,
                                        ),
                                    ),
                                    metadata: 'Customer ID 123456',
                                    massUnit: Components\WeightUnitEnum::Lb,
                                    weight: '1',
                                    distanceUnit: Components\DistanceUnitEnum::In,
                                    height: '1',
                                    length: '1',
                                    width: '1',
                                ),
                            ],
                        ),
                    ),
                ],
            );

            $response = $sdk->batches->create(
                batchCreateRequest: $batchCreateRequest,
                shippoApiVersion: '2018-02-08'

            );

            if ($response->batch !== null) {
                // handle response
            }
        - lang: csharp
          label: C#
          source: |-
            using Shippo;
            using Shippo.Models.Components;
            using System.Collections.Generic;

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

            var res = await sdk.Batches.CreateAsync(
                batchCreateRequest: new BatchCreateRequest() {
                    DefaultCarrierAccount = "078870331023437cb917f5187429b093",
                    DefaultServicelevelToken = "usps_priority",
                    LabelFiletype = LabelFileTypeEnum.Pdf4x6,
                    Metadata = "BATCH #1",
                    BatchShipments = new List<BatchShipmentCreateRequest>() {
                        new BatchShipmentCreateRequest() {
                            CarrierAccount = "a4391cd4ab974f478f55dc08b5c8e3b3",
                            Metadata = "SHIPMENT #1",
                            ServicelevelToken = "fedex_ground",
                            Shipment = new ShipmentCreateRequest() {
                                Extra = new ShipmentExtra() {
                                    AccountsReceivableCustomerAccount = new UPSReferenceFields() {
                                        Prefix = "ABC",
                                        Value = "value",
                                        RefSort = 1,
                                    },
                                    AppropriationNumber = new UPSReferenceFields() {
                                        Prefix = "ABC",
                                        Value = "value",
                                        RefSort = 1,
                                    },
                                    BillOfLadingNumber = new UPSReferenceFields() {
                                        Prefix = "ABC",
                                        Value = "value",
                                        RefSort = 1,
                                    },
                                    Cod = new Cod() {
                                        Amount = "5.5",
                                        Currency = "USD",
                                        PaymentMethod = PaymentMethod.Cash,
                                    },
                                    CodNumber = new UPSReferenceFields() {
                                        Prefix = "ABC",
                                        Value = "value",
                                        RefSort = 1,
                                    },
                                    CustomerReference = new CustomerReference() {
                                        RefSort = 1,
                                    },
                                    DealerOrderNumber = new UPSReferenceFields() {
                                        Prefix = "ABC",
                                        Value = "value",
                                        RefSort = 1,
                                    },
                                    DeptNumber = new DepartmentNumber() {
                                        RefSort = 3,
                                    },
                                    FdaProductCode = new UPSReferenceFields() {
                                        Prefix = "ABC",
                                        Value = "value",
                                        RefSort = 1,
                                    },
                                    Insurance = new Insurance() {
                                        Amount = "5.5",
                                        Currency = "USD",
                                    },
                                    InvoiceNumber = new InvoiceNumber() {
                                        RefSort = 2,
                                    },
                                    ManifestNumber = new UPSReferenceFields() {
                                        Prefix = "ABC",
                                        Value = "value",
                                        RefSort = 1,
                                    },
                                    ModelNumber = new UPSReferenceFields() {
                                        Prefix = "ABC",
                                        Value = "value",
                                        RefSort = 1,
                                    },
                                    PartNumber = new UPSReferenceFields() {
                                        Prefix = "ABC",
                                        Value = "value",
                                        RefSort = 1,
                                    },
                                    PoNumber = new PoNumber() {
                                        RefSort = 2,
                                    },
                                    ProductionCode = new UPSReferenceFields() {
                                        Prefix = "ABC",
                                        Value = "value",
                                        RefSort = 1,
                                    },
                                    PurchaseRequestNumber = new UPSReferenceFields() {
                                        Prefix = "ABC",
                                        Value = "value",
                                        RefSort = 1,
                                    },
                                    RmaNumber = new RmaNumber() {
                                        RefSort = 1,
                                    },
                                    SalespersonNumber = new UPSReferenceFields() {
                                        Prefix = "ABC",
                                        Value = "value",
                                        RefSort = 1,
                                    },
                                    SerialNumber = new UPSReferenceFields() {
                                        Prefix = "ABC",
                                        Value = "value",
                                        RefSort = 1,
                                    },
                                    StoreNumber = new UPSReferenceFields() {
                                        Prefix = "ABC",
                                        Value = "value",
                                        RefSort = 1,
                                    },
                                    TransactionReferenceNumber = new UPSReferenceFields() {
                                        Prefix = "ABC",
                                        Value = "value",
                                        RefSort = 1,
                                    },
                                },
                                Metadata = "Customer ID 123456",
                                ShipmentDate = "2021-03-22T12:00:00Z",
                                AddressFrom = AddressFrom.CreateAddressCreateRequest(
                                    new AddressCreateRequest() {
                                        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,
                                    }
                                ),
                                AddressReturn = AddressReturn.CreateStr(
                                    "d799c2679e644279b59fe661ac8fa488"
                                ),
                                AddressTo = AddressTo.CreateAddressCreateRequest(
                                    new AddressCreateRequest() {
                                        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,
                                    }
                                ),
                                CustomsDeclaration = ShipmentCreateRequestCustomsDeclaration.CreateCustomsDeclarationCreateRequest(
                                    new CustomsDeclarationCreateRequest() {
                                        B13aFilingOption = CustomsDeclarationB13AFilingOptionEnum.FiledElectronically,
                                        Certify = true,
                                        CertifySigner = "Shawn Ippotle",
                                        ContentsExplanation = "T-Shirt purchase",
                                        DutiesPayor = new DutiesPayor() {
                                            Account = "2323434543",
                                            Type = CustomsDeclarationCreateRequestType.ThirdParty,
                                            Address = new CustomsDeclarationCreateRequestAddress() {
                                                Name = "Patrick Kavanagh",
                                                Zip = "80331",
                                                Country = "DE",
                                            },
                                        },
                                        ExporterIdentification = new CustomsExporterIdentification() {
                                            EoriNumber = "PL123456790ABCDE",
                                            TaxId = new CustomsTaxIdentification() {
                                                Number = "123456789",
                                                Type = CustomsTaxIdentificationType.Ein,
                                            },
                                        },
                                        Invoice = "#123123",
                                        Metadata = "Order ID #123123",
                                        AddressImporter = new AddressImporter() {
                                            Name = "Shwan Ippotle",
                                            Company = "Shippo",
                                            Street1 = "Blumenstraße",
                                            Street3 = "",
                                            StreetNo = "22",
                                            City = "München",
                                            State = "CA",
                                            Zip = "80331",
                                            Country = "DE",
                                            Phone = "80331",
                                            Email = "shippotle@shippo.com",
                                            IsResidential = true,
                                        },
                                        ContentsType = CustomsDeclarationContentsTypeEnum.Merchandise,
                                        EelPfc = CustomsDeclarationEelPfcEnum.Noeei3037A,
                                        Incoterm = CustomsDeclarationIncotermEnum.Ddp,
                                        Items = new List<CustomsItemCreateRequest>() {
                                            new CustomsItemCreateRequest() {
                                                Description = "T-Shirt",
                                                MassUnit = WeightUnitEnum.Lb,
                                                Metadata = "Order ID \"123454\"",
                                                NetWeight = "5",
                                                OriginCountry = "<value>",
                                                Quantity = 20,
                                                SkuCode = "HM-123",
                                                HsCode = "0901.21",
                                                ValueAmount = "200",
                                                ValueCurrency = "USD",
                                            },
                                        },
                                        NonDeliveryOption = CustomsDeclarationNonDeliveryOptionEnum.Return,
                                        Test = true,
                                    }
                                ),
                                CarrierAccounts = new List<string>() {
                                    "065a4a8c10d24a34ab932163a1b87f52",
                                    "73f706f4bdb94b54a337563840ce52b0",
                                },
                                Parcels = new List<Models.Components.Parcels>() {
                                    Parcels.CreateParcelCreateRequest(
                                        new ParcelCreateRequest() {
                                            Extra = new ParcelExtra() {
                                                Cod = new Cod() {
                                                    Amount = "5.5",
                                                    Currency = "USD",
                                                    PaymentMethod = PaymentMethod.Cash,
                                                },
                                                Insurance = new ParcelInsurance() {
                                                    Amount = "5.5",
                                                    Content = "Laptop",
                                                    Currency = "USD",
                                                    Provider = ParcelInsuranceProvider.Ups,
                                                },
                                            },
                                            Metadata = "Customer ID 123456",
                                            MassUnit = WeightUnitEnum.Lb,
                                            Weight = "1",
                                            DistanceUnit = DistanceUnitEnum.In,
                                            Height = "1",
                                            Length = "1",
                                            Width = "1",
                                        }
                                    ),
                                },
                            },
                        },
                    },
                },
                shippoApiVersion: "2018-02-08"
            );

            // handle response
        - lang: java
          label: Java
          source: >-
            package hello.world;


            import com.goshippo.shippo_sdk.Shippo;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            import java.lang.Exception;

            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();

                    CreateBatchResponse res = sdk.batches().create()
                            .shippoApiVersion("2018-02-08")
                            .batchCreateRequest(BatchCreateRequest.builder()
                                .defaultCarrierAccount("078870331023437cb917f5187429b093")
                                .defaultServicelevelToken("usps_priority")
                                .batchShipments(List.of(
                                    BatchShipmentCreateRequest.builder()
                                        .shipment(ShipmentCreateRequest.builder()
                                            .addressFrom(AddressFrom.of("d799c2679e644279b59fe661ac8fa488"))
                                            .addressTo(AddressTo.of(AddressCreateRequest.builder()
                                                .country("US")
                                                .name("Shwan Ippotle")
                                                .company("Shippo")
                                                .street1("215 Clayton St.")
                                                .street3("")
                                                .streetNo("")
                                                .city("San Francisco")
                                                .state("CA")
                                                .zip("94117")
                                                .phone("+1 555 341 9393")
                                                .email("shippotle@shippo.com")
                                                .isResidential(true)
                                                .metadata("Customer ID 123456")
                                                .validate(true)
                                                .build()))
                                            .parcels(List.of(
                                                Parcels.of(ParcelCreateRequest.builder()
                                                    .massUnit(WeightUnitEnum.LB)
                                                    .weight("1")
                                                    .distanceUnit(DistanceUnitEnum.IN)
                                                    .height("1")
                                                    .length("1")
                                                    .width("1")
                                                    .extra(ParcelExtra.builder()
                                                        .cod(Cod.builder()
                                                            .amount("5.5")
                                                            .currency("USD")
                                                            .paymentMethod(PaymentMethod.CASH)
                                                            .build())
                                                        .insurance(ParcelInsurance.builder()
                                                            .amount("5.5")
                                                            .content("Laptop")
                                                            .currency("USD")
                                                            .provider(ParcelInsuranceProvider.UPS)
                                                            .build())
                                                        .build())
                                                    .metadata("Customer ID 123456")
                                                    .build()),
                                                Parcels.of(ParcelCreateRequest.builder()
                                                    .massUnit(WeightUnitEnum.LB)
                                                    .weight("1")
                                                    .distanceUnit(DistanceUnitEnum.IN)
                                                    .height("1")
                                                    .length("1")
                                                    .width("1")
                                                    .extra(ParcelExtra.builder()
                                                        .cod(Cod.builder()
                                                            .amount("5.5")
                                                            .currency("USD")
                                                            .paymentMethod(PaymentMethod.CASH)
                                                            .build())
                                                        .insurance(ParcelInsurance.builder()
                                                            .amount("5.5")
                                                            .content("Laptop")
                                                            .currency("USD")
                                                            .provider(ParcelInsuranceProvider.UPS)
                                                            .build())
                                                        .build())
                                                    .metadata("Customer ID 123456")
                                                    .build()),
                                                Parcels.of(ParcelCreateRequest.builder()
                                                    .massUnit(WeightUnitEnum.LB)
                                                    .weight("1")
                                                    .distanceUnit(DistanceUnitEnum.IN)
                                                    .height("1")
                                                    .length("1")
                                                    .width("1")
                                                    .extra(ParcelExtra.builder()
                                                        .cod(Cod.builder()
                                                            .amount("5.5")
                                                            .currency("USD")
                                                            .paymentMethod(PaymentMethod.CASH)
                                                            .build())
                                                        .insurance(ParcelInsurance.builder()
                                                            .amount("5.5")
                                                            .content("Laptop")
                                                            .currency("USD")
                                                            .provider(ParcelInsuranceProvider.UPS)
                                                            .build())
                                                        .build())
                                                    .metadata("Customer ID 123456")
                                                    .build())))
                                            .extra(ShipmentExtra.builder()
                                                .accountsReceivableCustomerAccount(UPSReferenceFields.builder()
                                                    .prefix("ABC")
                                                    .value("value")
                                                    .refSort(1L)
                                                    .build())
                                                .appropriationNumber(UPSReferenceFields.builder()
                                                    .prefix("ABC")
                                                    .value("value")
                                                    .refSort(1L)
                                                    .build())
                                                .billOfLadingNumber(UPSReferenceFields.builder()
                                                    .prefix("ABC")
                                                    .value("value")
                                                    .refSort(1L)
                                                    .build())
                                                .cod(Cod.builder()
                                                    .amount("5.5")
                                                    .currency("USD")
                                                    .paymentMethod(PaymentMethod.CASH)
                                                    .build())
                                                .codNumber(UPSReferenceFields.builder()
                                                    .prefix("ABC")
                                                    .value("value")
                                                    .refSort(1L)
                                                    .build())
                                                .customerReference(CustomerReference.builder()
                                                    .refSort(1L)
                                                    .build())
                                                .dealerOrderNumber(UPSReferenceFields.builder()
                                                    .prefix("ABC")
                                                    .value("value")
                                                    .refSort(1L)
                                                    .build())
                                                .deptNumber(DepartmentNumber.builder()
                                                    .refSort(3L)
                                                    .build())
                                                .fdaProductCode(UPSReferenceFields.builder()
                                                    .prefix("ABC")
                                                    .value("value")
                                                    .refSort(1L)
                                                    .build())
                                                .insurance(Insurance.builder()
                                                    .amount("5.5")
                                                    .currency("USD")
                                                    .build())
                                                .invoiceNumber(InvoiceNumber.builder()
                                                    .refSort(2L)
                                                    .build())
                                                .manifestNumber(UPSReferenceFields.builder()
                                                    .prefix("ABC")
                                                    .value("value")
                                                    .refSort(1L)
                                                    .build())
                                                .modelNumber(UPSReferenceFields.builder()
                                                    .prefix("ABC")
                                                    .value("value")
                                                    .refSort(1L)
                                                    .build())
                                                .partNumber(UPSReferenceFields.builder()
                                                    .prefix("ABC")
                                                    .value("value")
                                                    .refSort(1L)
                                                    .build())
                                                .poNumber(PoNumber.builder()
                                                    .refSort(2L)
                                                    .build())
                                                .productionCode(UPSReferenceFields.builder()
                                                    .prefix("ABC")
                                                    .value("value")
                                                    .refSort(1L)
                                                    .build())
                                                .purchaseRequestNumber(UPSReferenceFields.builder()
                                                    .prefix("ABC")
                                                    .value("value")
                                                    .refSort(1L)
                                                    .build())
                                                .rmaNumber(RmaNumber.builder()
                                                    .refSort(1L)
                                                    .build())
                                                .salespersonNumber(UPSReferenceFields.builder()
                                                    .prefix("ABC")
                                                    .value("value")
                                                    .refSort(1L)
                                                    .build())
                                                .serialNumber(UPSReferenceFields.builder()
                                                    .prefix("ABC")
                                                    .value("value")
                                                    .refSort(1L)
                                                    .build())
                                                .storeNumber(UPSReferenceFields.builder()
                                                    .prefix("ABC")
                                                    .value("value")
                                                    .refSort(1L)
                                                    .build())
                                                .transactionReferenceNumber(UPSReferenceFields.builder()
                                                    .prefix("ABC")
                                                    .value("value")
                                                    .refSort(1L)
                                                    .build())
                                                .build())
                                            .metadata("Customer ID 123456")
                                            .shipmentDate("2021-03-22T12:00:00Z")
                                            .addressReturn(AddressReturn.of(AddressCreateRequest.builder()
                                                .country("US")
                                                .name("Shwan Ippotle")
                                                .company("Shippo")
                                                .street1("215 Clayton St.")
                                                .street3("")
                                                .streetNo("")
                                                .city("San Francisco")
                                                .state("CA")
                                                .zip("94117")
                                                .phone("+1 555 341 9393")
                                                .email("shippotle@shippo.com")
                                                .isResidential(true)
                                                .metadata("Customer ID 123456")
                                                .validate(true)
                                                .build()))
                                            .customsDeclaration(ShipmentCreateRequestCustomsDeclaration.of(CustomsDeclarationCreateRequest.builder()
                                                .certify(true)
                                                .certifySigner("Shawn Ippotle")
                                                .contentsType(CustomsDeclarationContentsTypeEnum.MERCHANDISE)
                                                .items(List.of(
                                                    CustomsItemCreateRequest.builder()
                                                        .description("T-Shirt")
                                                        .massUnit(WeightUnitEnum.LB)
                                                        .netWeight("5")
                                                        .originCountry("<value>")
                                                        .quantity(20L)
                                                        .valueAmount("200")
                                                        .valueCurrency("USD")
                                                        .metadata("Order ID \"123454\"")
                                                        .skuCode("HM-123")
                                                        .hsCode("0901.21")
                                                        .build(),
                                                    CustomsItemCreateRequest.builder()
                                                        .description("T-Shirt")
                                                        .massUnit(WeightUnitEnum.LB)
                                                        .netWeight("5")
                                                        .originCountry("<value>")
                                                        .quantity(20L)
                                                        .valueAmount("200")
                                                        .valueCurrency("USD")
                                                        .metadata("Order ID \"123454\"")
                                                        .skuCode("HM-123")
                                                        .hsCode("0901.21")
                                                        .build(),
                                                    CustomsItemCreateRequest.builder()
                                                        .description("T-Shirt")
                                                        .massUnit(WeightUnitEnum.LB)
                                                        .netWeight("5")
                                                        .originCountry("<value>")
                                                        .quantity(20L)
                                                        .valueAmount("200")
                                                        .valueCurrency("USD")
                                                        .metadata("Order ID \"123454\"")
                                                        .skuCode("HM-123")
                                                        .hsCode("0901.21")
                                                        .build()))
                                                .nonDeliveryOption(CustomsDeclarationNonDeliveryOptionEnum.RETURN)
                                                .b13aFilingOption(CustomsDeclarationB13AFilingOptionEnum.FILED_ELECTRONICALLY)
                                                .contentsExplanation("T-Shirt purchase")
                                                .dutiesPayor(DutiesPayor.builder()
                                                    .account("2323434543")
                                                    .type(CustomsDeclarationCreateRequestType.THIRD_PARTY)
                                                    .address(CustomsDeclarationCreateRequestAddress.builder()
                                                        .name("Patrick Kavanagh")
                                                        .zip("80331")
                                                        .country("DE")
                                                        .build())
                                                    .build())
                                                .exporterIdentification(CustomsExporterIdentification.builder()
                                                    .eoriNumber("PL123456790ABCDE")
                                                    .taxId(CustomsTaxIdentification.builder()
                                                        .number("123456789")
                                                        .type(CustomsTaxIdentificationType.EIN)
                                                        .build())
                                                    .build())
                                                .invoice("#123123")
                                                .metadata("Order ID #123123")
                                                .addressImporter(AddressImporter.builder()
                                                    .name("Shwan Ippotle")
                                                    .company("Shippo")
                                                    .street1("Blumenstraße")
                                                    .street3("")
                                                    .streetNo("22")
                                                    .city("München")
                                                    .state("CA")
                                                    .zip("80331")
                                                    .country("DE")
                                                    .phone("80331")
                                                    .email("shippotle@shippo.com")
                                                    .isResidential(true)
                                                    .build())
                                                .eelPfc(CustomsDeclarationEelPfcEnum.NOEEI3037_A)
                                                .incoterm(CustomsDeclarationIncotermEnum.DDP)
                                                .test(true)
                                                .build()))
                                            .carrierAccounts(List.of(
                                                "065a4a8c10d24a34ab932163a1b87f52",
                                                "73f706f4bdb94b54a337563840ce52b0"))
                                            .build())
                                        .carrierAccount("a4391cd4ab974f478f55dc08b5c8e3b3")
                                        .metadata("SHIPMENT #1")
                                        .servicelevelToken("fedex_ground")
                                        .build()))
                                .labelFiletype(LabelFileTypeEnum.PDF4X6)
                                .metadata("BATCH #1")
                                .build())
                            .call();

                    if (res.batch().isPresent()) {
                        // handle response
                    }
                }
            }
  /batches/{BatchId}:
    get:
      description: >-
        Returns a batch using an object ID. <br> Batch shipments are displayed
        100 at a time.  You can iterate 

        through each `page` using the `?page= query` parameter.  You can also
        filter based on batch shipment 

        status, for example, by passing a query param like
        `?object_results=creation_failed`. <br> 

        For more details on filtering results, see our guide on <a
        href="https://docs.goshippo.com/docs/api_concepts/filtering/"
        target="blank"> filtering</a>.
      operationId: GetBatch
      parameters:
        - description: Object ID of the batch
          in: path
          name: BatchId
          required: true
          schema:
            type: string
        - $ref: '#/components/parameters/PageNumberQueryParam'
        - $ref: '#/components/parameters/ResultsPerPageDefault5QueryParam'
        - $ref: '#/components/parameters/ShippoApiVersionHeader'
      responses:
        '200':
          $ref: '#/components/responses/batchResponse'
        '400':
          $ref: '#/components/responses/badRequestResponse'
      summary: Retrieve a batch
      tags:
        - Batches
      x-codeSamples:
        - label: cURL
          lang: cURL
          source: >-
            curl https://api.goshippo.com/batches/<BATCH OBJECT
            ID>?page=2&object_results=creation_failed \

            -H "Authorization: ShippoToken <API_TOKEN>"
        - lang: python
          label: Python
          source: |-
            import shippo

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


            res = s.batches.get(batch_id='<id>')

            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.batches.get("<id>");

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

            run();
        - lang: php
          label: PHP
          source: |-
            declare(strict_types=1);

            require 'vendor/autoload.php';

            use Shippo\API;
            use Shippo\API\Models\Operations;

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

            $request = new Operations\GetBatchRequest(
                batchId: '<id>',
            );

            $response = $sdk->batches->get(
                request: $request
            );

            if ($response->batch !== null) {
                // handle response
            }
        - lang: csharp
          label: C#
          source: |-
            using Shippo;
            using Shippo.Models.Components;
            using Shippo.Models.Requests;

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

            GetBatchRequest req = new GetBatchRequest() {
                BatchId = "<id>",
            };

            var res = await sdk.Batches.GetAsync(req);

            // handle response
        - lang: java
          label: Java
          source: |-
            package hello.world;

            import com.goshippo.shippo_sdk.Shippo;
            import com.goshippo.shippo_sdk.models.operations.GetBatchResponse;
            import java.lang.Exception;

            public class Application {

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

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

                    GetBatchResponse res = sdk.batches().get()
                            .batchId("<id>")
                            .page(1L)
                            .results(5L)
                            .shippoApiVersion("2018-02-08")
                            .call();

                    if (res.batch().isPresent()) {
                        // handle response
                    }
                }
            }
  /batches/{BatchId}/add_shipments:
    post:
      description: Adds batch shipments to an existing batch.
      operationId: AddShipmentsToBatch
      parameters:
        - description: Object ID of the batch
          in: path
          name: BatchId
          required: true
          schema:
            type: string
        - $ref: '#/components/parameters/ShippoApiVersionHeader'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              items:
                $ref: '#/components/schemas/BatchShipmentCreateRequest'
              type: array
        description: Array of shipments to add to the batch
      responses:
        '200':
          $ref: '#/components/responses/batchResponse'
        '400':
          $ref: '#/components/responses/badRequestResponse'
      summary: Add shipments to a batch
      tags:
        - Batches
      x-codeSamples:
        - label: cURL
          lang: cURL
          source: >-
            curl -X POST https://api.goshippo.com/batches/<BATCH OBJECT
            ID>/add_shipments \

            -H "Authorization: ShippoToken <API_TOKEN>" \

            -H "Content-Type: application/json"  \

            -d '[
                    {
                      "shipment": {    
                        "address_from": {
                          "name": "Mr Hippo",
                          "street1": "965 Mission St",
                          "street2": "Ste 201",
                          "city": "San Francisco",
                          "state": "CA",
                          "zip": "94103",
                          "country": "US",
                          "phone": "4151234567",
                        },
                        "address_to": {
                          "name": "Hippo Jr",
                          "street1": "915 Broadway",
                          "street2": "19th Floor",
                          "city": "New York",
                          "state": "NY",
                          "zip": "10010",
                          "country": "US",
                          "phone": "2129947880",
                        },
                        "parcels": [{
                          "length": "12",
                          "width": "12",
                          "height": "12",
                          "distance_unit": "in",
                          "weight": "12",
                          "mass_unit": "oz"
                        }]
                      }
                    },
                    {
                      "shipment": {    
                        "address_from": {
                          "name": "Ms Hippo",
                          "street1": "1092 Indian Summer Ct",
                          "city": "San Jose",
                          "state": "CA",
                          "zip": "95122",
                          "country": "US",
                          "phone": "4151234567",
                        },
                        "address_to": {
                          "name": "Mr Hippo",
                          "street1": "965 Mission St",
                          "street2": "Ste 201",
                          "city": "San Francisco",
                          "state": "CA",
                          "zip": "94103",
                          "country": "US",
                          "phone": "4151234567",
                        },
                        "parcels": [{
                          "length": "5",
                          "width": "5",
                          "height": "5",
                          "distance_unit": "in",
                          "weight": "2",
                          "mass_unit": "lb"
                        }]
                      },
                      "carrier_account": "a4391cd4ab974f478f55dc08b5c8e3b3",
                      "servicelevel_token": "fedex_2_day"
                    }
                  ]'
        - lang: python
          label: Python
          source: |-
            import shippo
            from shippo.models import components

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


            res = s.batches.add_shipments(request_body=[
                components.BatchShipmentCreateRequest(
                    carrier_account='a4391cd4ab974f478f55dc08b5c8e3b3',
                    metadata='SHIPMENT #1',
                    servicelevel_token='fedex_ground',
                    shipment=components.ShipmentCreateRequest(
                        extra=components.ShipmentExtra(
                            accounts_receivable_customer_account=components.UPSReferenceFields(
                                prefix='ABC',
                                value='value',
                                ref_sort=1,
                            ),
                            appropriation_number=components.UPSReferenceFields(
                                prefix='ABC',
                                value='value',
                                ref_sort=1,
                            ),
                            bill_of_lading_number=components.UPSReferenceFields(
                                prefix='ABC',
                                value='value',
                                ref_sort=1,
                            ),
                            cod=components.Cod(
                                amount='5.5',
                                currency='USD',
                                payment_method=components.PaymentMethod.CASH,
                            ),
                            cod_number=components.UPSReferenceFields(
                                prefix='ABC',
                                value='value',
                                ref_sort=1,
                            ),
                            customer_reference=components.CustomerReference(
                                ref_sort=1,
                            ),
                            dealer_order_number=components.UPSReferenceFields(
                                prefix='ABC',
                                value='value',
                                ref_sort=1,
                            ),
                            dept_number=components.DepartmentNumber(
                                ref_sort=3,
                            ),
                            fda_product_code=components.UPSReferenceFields(
                                prefix='ABC',
                                value='value',
                                ref_sort=1,
                            ),
                            insurance=components.Insurance(
                                amount='5.5',
                                currency='USD',
                            ),
                            invoice_number=components.InvoiceNumber(
                                ref_sort=2,
                            ),
                            manifest_number=components.UPSReferenceFields(
                                prefix='ABC',
                                value='value',
                                ref_sort=1,
                            ),
                            model_number=components.UPSReferenceFields(
                                prefix='ABC',
                                value='value',
                                ref_sort=1,
                            ),
                            part_number=components.UPSReferenceFields(
                                prefix='ABC',
                                value='value',
                                ref_sort=1,
                            ),
                            po_number=components.PoNumber(
                                ref_sort=2,
                            ),
                            production_code=components.UPSReferenceFields(
                                prefix='ABC',
                                value='value',
                                ref_sort=1,
                            ),
                            purchase_request_number=components.UPSReferenceFields(
                                prefix='ABC',
                                value='value',
                                ref_sort=1,
                            ),
                            rma_number=components.RmaNumber(
                                ref_sort=1,
                            ),
                            salesperson_number=components.UPSReferenceFields(
                                prefix='ABC',
                                value='value',
                                ref_sort=1,
                            ),
                            serial_number=components.UPSReferenceFields(
                                prefix='ABC',
                                value='value',
                                ref_sort=1,
                            ),
                            store_number=components.UPSReferenceFields(
                                prefix='ABC',
                                value='value',
                                ref_sort=1,
                            ),
                            transaction_reference_number=components.UPSReferenceFields(
                                prefix='ABC',
                                value='value',
                                ref_sort=1,
                            ),
                        ),
                        metadata='Customer ID 123456',
                        shipment_date='2021-03-22T12:00:00Z',
                        address_from=components.AddressCreateRequest(
                            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,
                        ),
                        address_return=components.AddressCreateRequest(
                            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,
                        ),
                        address_to='d799c2679e644279b59fe661ac8fa489',
                        customs_declaration='adcfdddf8ec64b84ad22772bce3ea37a',
                        carrier_accounts=[
                            '065a4a8c10d24a34ab932163a1b87f52',
                            '73f706f4bdb94b54a337563840ce52b0',
                        ],
                        parcels=[
                            '<value>',
                            '<value>',
                            components.ParcelCreateFromTemplateRequest(
                                extra=components.ParcelExtra(
                                    cod=components.Cod(
                                        amount='5.5',
                                        currency='USD',
                                        payment_method=components.PaymentMethod.CASH,
                                    ),
                                    insurance=components.ParcelInsurance(
                                        amount='5.5',
                                        content='Laptop',
                                        currency='USD',
                                        provider=components.ParcelInsuranceProvider.UPS,
                                    ),
                                ),
                                metadata='Customer ID 123456',
                                mass_unit=components.WeightUnitEnum.LB,
                                weight='1',
                                template=components.ParcelTemplateUSPSEnum.USPS_SMALL_FLAT_RATE_ENVELOPE,
                            ),
                        ],
                    ),
                ),
                components.BatchShipmentCreateRequest(
                    carrier_account='a4391cd4ab974f478f55dc08b5c8e3b3',
                    metadata='SHIPMENT #1',
                    servicelevel_token='fedex_ground',
                    shipment=components.ShipmentCreateRequest(
                        extra=components.ShipmentExtra(
                            accounts_receivable_customer_account=components.UPSReferenceFields(
                                prefix='ABC',
                                value='value',
                                ref_sort=1,
                            ),
                            appropriation_number=components.UPSReferenceFields(
                                prefix='ABC',
                                value='value',
                                ref_sort=1,
                            ),
                            bill_of_lading_number=components.UPSReferenceFields(
                                prefix='ABC',
                                value='value',
                                ref_sort=1,
                            ),
                            cod=components.Cod(
                                amount='5.5',
                                currency='USD',
                                payment_method=components.PaymentMethod.CASH,
                            ),
                            cod_number=components.UPSReferenceFields(
                                prefix='ABC',
                                value='value',
                                ref_sort=1,
                            ),
                            customer_reference=components.CustomerReference(
                                ref_sort=1,
                            ),
                            dealer_order_number=components.UPSReferenceFields(
                                prefix='ABC',
                                value='value',
                                ref_sort=1,
                            ),
                            dept_number=components.DepartmentNumber(
                                ref_sort=3,
                            ),
                            fda_product_code=components.UPSReferenceFields(
                                prefix='ABC',
                                value='value',
                                ref_sort=1,
                            ),
                            insurance=components.Insurance(
                                amount='5.5',
                                currency='USD',
                            ),
                            invoice_number=components.InvoiceNumber(
                                ref_sort=2,
                            ),
                            manifest_number=components.UPSReferenceFields(
                                prefix='ABC',
                                value='value',
                                ref_sort=1,
                            ),
                            model_number=components.UPSReferenceFields(
                                prefix='ABC',
                                value='value',
                                ref_sort=1,
                            ),
                            part_number=components.UPSReferenceFields(
                                prefix='ABC',
                                value='value',
                                ref_sort=1,
                            ),
                            po_number=components.PoNumber(
                                ref_sort=2,
                            ),
                            production_code=components.UPSReferenceFields(
                                prefix='ABC',
                                value='value',
                                ref_sort=1,
                            ),
                            purchase_request_number=components.UPSReferenceFields(
                                prefix='ABC',
                                value='value',
                                ref_sort=1,
                            ),
                            rma_number=components.RmaNumber(
                                ref_sort=1,
                            ),
                            salesperson_number=components.UPSReferenceFields(
                                prefix='ABC',
                                value='value',
                                ref_sort=1,
                            ),
                            serial_number=components.UPSReferenceFields(
                                prefix='ABC',
                                value='value',
                                ref_sort=1,
                            ),
                            store_number=components.UPSReferenceFields(
                                prefix='ABC',
                                value='value',
                                ref_sort=1,
                            ),
                            transaction_reference_number=components.UPSReferenceFields(
                                prefix='ABC',
                                value='value',
                                ref_sort=1,
                            ),
                        ),
                        metadata='Customer ID 123456',
                        shipment_date='2021-03-22T12:00:00Z',
                        address_from=components.AddressCreateRequest(
                            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,
                        ),
                        address_return=components.AddressCreateRequest(
                            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,
                        ),
                        address_to=components.AddressCreateRequest(
                            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,
                        ),
                        customs_declaration=components.CustomsDeclarationCreateRequest(
                            b13a_filing_option=components.CustomsDeclarationB13AFilingOptionEnum.FILED_ELECTRONICALLY,
                            certify=True,
                            certify_signer='Shawn Ippotle',
                            contents_explanation='T-Shirt purchase',
                            duties_payor=components.DutiesPayor(
                                account='2323434543',
                                type=components.CustomsDeclarationCreateRequestType.THIRD_PARTY,
                                address=components.CustomsDeclarationCreateRequestAddress(
                                    name='Patrick Kavanagh',
                                    zip='80331',
                                    country='DE',
                                ),
                            ),
                            exporter_identification=components.CustomsExporterIdentification(
                                eori_number='PL123456790ABCDE',
                                tax_id=components.CustomsTaxIdentification(
                                    number='123456789',
                                    type=components.CustomsTaxIdentificationType.EIN,
                                ),
                            ),
                            invoice='#123123',
                            metadata='Order ID #123123',
                            address_importer=components.AddressImporter(
                                name='Shwan Ippotle',
                                company='Shippo',
                                street1='Blumenstraße',
                                street3='',
                                street_no='22',
                                city='München',
                                state='CA',
                                zip='80331',
                                country='DE',
                                phone='80331',
                                email='shippotle@shippo.com',
                                is_residential=True,
                            ),
                            contents_type=components.CustomsDeclarationContentsTypeEnum.MERCHANDISE,
                            eel_pfc=components.CustomsDeclarationEelPfcEnum.NOEEI_30_37_A,
                            incoterm=components.CustomsDeclarationIncotermEnum.DDP,
                            items=[
                                components.CustomsItemCreateRequest(
                                    description='T-Shirt',
                                    mass_unit=components.WeightUnitEnum.LB,
                                    metadata='Order ID "123454"',
                                    net_weight='5',
                                    origin_country='<value>',
                                    quantity=20,
                                    sku_code='HM-123',
                                    hs_code='0901.21',
                                    value_amount='200',
                                    value_currency='USD',
                                ),
                            ],
                            non_delivery_option=components.CustomsDeclarationNonDeliveryOptionEnum.RETURN,
                            test=True,
                        ),
                        carrier_accounts=[
                            '065a4a8c10d24a34ab932163a1b87f52',
                            '73f706f4bdb94b54a337563840ce52b0',
                        ],
                        parcels=[
                            components.ParcelCreateFromTemplateRequest(
                                extra=components.ParcelExtra(
                                    cod=components.Cod(
                                        amount='5.5',
                                        currency='USD',
                                        payment_method=components.PaymentMethod.CASH,
                                    ),
                                    insurance=components.ParcelInsurance(
                                        amount='5.5',
                                        content='Laptop',
                                        currency='USD',
                                        provider=components.ParcelInsuranceProvider.UPS,
                                    ),
                                ),
                                metadata='Customer ID 123456',
                                mass_unit=components.WeightUnitEnum.LB,
                                weight='1',
                                template=components.ParcelTemplateDPDUKEnum.DPD_UK_EXPRESS_PAK,
                            ),
                            components.ParcelCreateFromTemplateRequest(
                                extra=components.ParcelExtra(
                                    cod=components.Cod(
                                        amount='5.5',
                                        currency='USD',
                                        payment_method=components.PaymentMethod.CASH,
                                    ),
                                    insurance=components.ParcelInsurance(
                                        amount='5.5',
                                        content='Laptop',
                                        currency='USD',
                                        provider=components.ParcelInsuranceProvider.UPS,
                                    ),
                                ),
                                metadata='Customer ID 123456',
                                mass_unit=components.WeightUnitEnum.LB,
                                weight='1',
                                template=components.ParcelTemplateDHLeCommerceEnum.DH_LE_C_IRREGULAR,
                            ),
                        ],
                    ),
                ),
                components.BatchShipmentCreateRequest(
                    carrier_account='a4391cd4ab974f478f55dc08b5c8e3b3',
                    metadata='SHIPMENT #1',
                    servicelevel_token='fedex_ground',
                    shipment=components.ShipmentCreateRequest(
                        extra=components.ShipmentExtra(
                            accounts_receivable_customer_account=components.UPSReferenceFields(
                                prefix='ABC',
                                value='value',
                                ref_sort=1,
                            ),
                            appropriation_number=components.UPSReferenceFields(
                                prefix='ABC',
                                value='value',
                                ref_sort=1,
                            ),
                            bill_of_lading_number=components.UPSReferenceFields(
                                prefix='ABC',
                                value='value',
                                ref_sort=1,
                            ),
                            cod=components.Cod(
                                amount='5.5',
                                currency='USD',
                                payment_method=components.PaymentMethod.CASH,
                            ),
                            cod_number=components.UPSReferenceFields(
                                prefix='ABC',
                                value='value',
                                ref_sort=1,
                            ),
                            customer_reference=components.CustomerReference(
                                ref_sort=1,
                            ),
                            dealer_order_number=components.UPSReferenceFields(
                                prefix='ABC',
                                value='value',
                                ref_sort=1,
                            ),
                            dept_number=components.DepartmentNumber(
                                ref_sort=3,
                            ),
                            fda_product_code=components.UPSReferenceFields(
                                prefix='ABC',
                                value='value',
                                ref_sort=1,
                            ),
                            insurance=components.Insurance(
                                amount='5.5',
                                currency='USD',
                            ),
                            invoice_number=components.InvoiceNumber(
                                ref_sort=2,
                            ),
                            manifest_number=components.UPSReferenceFields(
                                prefix='ABC',
                                value='value',
                                ref_sort=1,
                            ),
                            model_number=components.UPSReferenceFields(
                                prefix='ABC',
                                value='value',
                                ref_sort=1,
                            ),
                            part_number=components.UPSReferenceFields(
                                prefix='ABC',
                                value='value',
                                ref_sort=1,
                            ),
                            po_number=components.PoNumber(
                                ref_sort=2,
                            ),
                            production_code=components.UPSReferenceFields(
                                prefix='ABC',
                                value='value',
                                ref_sort=1,
                            ),
                            purchase_request_number=components.UPSReferenceFields(
                                prefix='ABC',
                                value='value',
                                ref_sort=1,
                            ),
                            rma_number=components.RmaNumber(
                                ref_sort=1,
                            ),
                            salesperson_number=components.UPSReferenceFields(
                                prefix='ABC',
                                value='value',
                                ref_sort=1,
                            ),
                            serial_number=components.UPSReferenceFields(
                                prefix='ABC',
                                value='value',
                                ref_sort=1,
                            ),
                            store_number=components.UPSReferenceFields(
                                prefix='ABC',
                                value='value',
                                ref_sort=1,
                            ),
                            transaction_reference_number=components.UPSReferenceFields(
                                prefix='ABC',
                                value='value',
                                ref_sort=1,
                            ),
                        ),
                        metadata='Customer ID 123456',
                        shipment_date='2021-03-22T12:00:00Z',
                        address_from='d799c2679e644279b59fe661ac8fa488',
                        address_return='d799c2679e644279b59fe661ac8fa488',
                        address_to=components.AddressCreateRequest(
                            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,
                        ),
                        customs_declaration='adcfdddf8ec64b84ad22772bce3ea37a',
                        carrier_accounts=[
                            '065a4a8c10d24a34ab932163a1b87f52',
                            '73f706f4bdb94b54a337563840ce52b0',
                        ],
                        parcels=[
                            '<value>',
                        ],
                    ),
                ),
            ], batch_id='<id>')

            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.batches.addShipments([
                {
                  carrierAccount: "a4391cd4ab974f478f55dc08b5c8e3b3",
                  metadata: "SHIPMENT #1",
                  servicelevelToken: "fedex_ground",
                  shipment: {
                    extra: {
                      accountsReceivableCustomerAccount: {
                        prefix: "ABC",
                        value: "value",
                        refSort: 1,
                      },
                      appropriationNumber: {
                        prefix: "ABC",
                        value: "value",
                        refSort: 1,
                      },
                      billOfLadingNumber: {
                        prefix: "ABC",
                        value: "value",
                        refSort: 1,
                      },
                      cod: {
                        amount: "5.5",
                        currency: "USD",
                        paymentMethod: "CASH",
                      },
                      codNumber: {
                        prefix: "ABC",
                        value: "value",
                        refSort: 1,
                      },
                      customerReference: {
                        refSort: 1,
                      },
                      dealerOrderNumber: {
                        prefix: "ABC",
                        value: "value",
                        refSort: 1,
                      },
                      deptNumber: {
                        refSort: 3,
                      },
                      fdaProductCode: {
                        prefix: "ABC",
                        value: "value",
                        refSort: 1,
                      },
                      insurance: {
                        amount: "5.5",
                        currency: "USD",
                      },
                      invoiceNumber: {
                        refSort: 2,
                      },
                      manifestNumber: {
                        prefix: "ABC",
                        value: "value",
                        refSort: 1,
                      },
                      modelNumber: {
                        prefix: "ABC",
                        value: "value",
                        refSort: 1,
                      },
                      partNumber: {
                        prefix: "ABC",
                        value: "value",
                        refSort: 1,
                      },
                      poNumber: {
                        refSort: 2,
                      },
                      productionCode: {
                        prefix: "ABC",
                        value: "value",
                        refSort: 1,
                      },
                      purchaseRequestNumber: {
                        prefix: "ABC",
                        value: "value",
                        refSort: 1,
                      },
                      rmaNumber: {
                        refSort: 1,
                      },
                      salespersonNumber: {
                        prefix: "ABC",
                        value: "value",
                        refSort: 1,
                      },
                      serialNumber: {
                        prefix: "ABC",
                        value: "value",
                        refSort: 1,
                      },
                      storeNumber: {
                        prefix: "ABC",
                        value: "value",
                        refSort: 1,
                      },
                      transactionReferenceNumber: {
                        prefix: "ABC",
                        value: "value",
                        refSort: 1,
                      },
                    },
                    metadata: "Customer ID 123456",
                    shipmentDate: "2021-03-22T12:00:00Z",
                    addressFrom: {
                      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,
                    },
                    addressReturn: {
                      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,
                    },
                    addressTo: "d799c2679e644279b59fe661ac8fa489",
                    customsDeclaration: "adcfdddf8ec64b84ad22772bce3ea37a",
                    carrierAccounts: [
                      "065a4a8c10d24a34ab932163a1b87f52",
                      "73f706f4bdb94b54a337563840ce52b0",
                    ],
                    parcels: [
                      "<value>",
                      "<value>",
                      {
                        extra: {
                          cod: {
                            amount: "5.5",
                            currency: "USD",
                            paymentMethod: "CASH",
                          },
                          insurance: {
                            amount: "5.5",
                            content: "Laptop",
                            currency: "USD",
                            provider: "UPS",
                          },
                        },
                        metadata: "Customer ID 123456",
                        massUnit: "lb",
                        weight: "1",
                        template: "USPS_SmallFlatRateEnvelope",
                      },
                    ],
                  },
                },
                {
                  carrierAccount: "a4391cd4ab974f478f55dc08b5c8e3b3",
                  metadata: "SHIPMENT #1",
                  servicelevelToken: "fedex_ground",
                  shipment: {
                    extra: {
                      accountsReceivableCustomerAccount: {
                        prefix: "ABC",
                        value: "value",
                        refSort: 1,
                      },
                      appropriationNumber: {
                        prefix: "ABC",
                        value: "value",
                        refSort: 1,
                      },
                      billOfLadingNumber: {
                        prefix: "ABC",
                        value: "value",
                        refSort: 1,
                      },
                      cod: {
                        amount: "5.5",
                        currency: "USD",
                        paymentMethod: "CASH",
                      },
                      codNumber: {
                        prefix: "ABC",
                        value: "value",
                        refSort: 1,
                      },
                      customerReference: {
                        refSort: 1,
                      },
                      dealerOrderNumber: {
                        prefix: "ABC",
                        value: "value",
                        refSort: 1,
                      },
                      deptNumber: {
                        refSort: 3,
                      },
                      fdaProductCode: {
                        prefix: "ABC",
                        value: "value",
                        refSort: 1,
                      },
                      insurance: {
                        amount: "5.5",
                        currency: "USD",
                      },
                      invoiceNumber: {
                        refSort: 2,
                      },
                      manifestNumber: {
                        prefix: "ABC",
                        value: "value",
                        refSort: 1,
                      },
                      modelNumber: {
                        prefix: "ABC",
                        value: "value",
                        refSort: 1,
                      },
                      partNumber: {
                        prefix: "ABC",
                        value: "value",
                        refSort: 1,
                      },
                      poNumber: {
                        refSort: 2,
                      },
                      productionCode: {
                        prefix: "ABC",
                        value: "value",
                        refSort: 1,
                      },
                      purchaseRequestNumber: {
                        prefix: "ABC",
                        value: "value",
                        refSort: 1,
                      },
                      rmaNumber: {
                        refSort: 1,
                      },
                      salespersonNumber: {
                        prefix: "ABC",
                        value: "value",
                        refSort: 1,
                      },
                      serialNumber: {
                        prefix: "ABC",
                        value: "value",
                        refSort: 1,
                      },
                      storeNumber: {
                        prefix: "ABC",
                        value: "value",
                        refSort: 1,
                      },
                      transactionReferenceNumber: {
                        prefix: "ABC",
                        value: "value",
                        refSort: 1,
                      },
                    },
                    metadata: "Customer ID 123456",
                    shipmentDate: "2021-03-22T12:00:00Z",
                    addressFrom: {
                      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,
                    },
                    addressReturn: {
                      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,
                    },
                    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,
                    },
                    customsDeclaration: {
                      b13aFilingOption: "FILED_ELECTRONICALLY",
                      certify: true,
                      certifySigner: "Shawn Ippotle",
                      contentsExplanation: "T-Shirt purchase",
                      dutiesPayor: {
                        account: "2323434543",
                        type: "THIRD_PARTY",
                        address: {
                          name: "Patrick Kavanagh",
                          zip: "80331",
                          country: "DE",
                        },
                      },
                      exporterIdentification: {
                        eoriNumber: "PL123456790ABCDE",
                        taxId: {
                          number: "123456789",
                          type: "EIN",
                        },
                      },
                      invoice: "#123123",
                      metadata: "Order ID #123123",
                      addressImporter: {
                        name: "Shwan Ippotle",
                        company: "Shippo",
                        street1: "Blumenstraße",
                        street3: "",
                        streetNo: "22",
                        city: "München",
                        state: "CA",
                        zip: "80331",
                        country: "DE",
                        phone: "80331",
                        email: "shippotle@shippo.com",
                        isResidential: true,
                      },
                      contentsType: "MERCHANDISE",
                      eelPfc: "NOEEI_30_37_a",
                      incoterm: "DDP",
                      items: [
                        {
                          description: "T-Shirt",
                          massUnit: "lb",
                          metadata: "Order ID \"123454\"",
                          netWeight: "5",
                          originCountry: "<value>",
                          quantity: 20,
                          skuCode: "HM-123",
                          hsCode: "0901.21",
                          valueAmount: "200",
                          valueCurrency: "USD",
                        },
                      ],
                      nonDeliveryOption: "RETURN",
                      test: true,
                    },
                    carrierAccounts: [
                      "065a4a8c10d24a34ab932163a1b87f52",
                      "73f706f4bdb94b54a337563840ce52b0",
                    ],
                    parcels: [
                      {
                        extra: {
                          cod: {
                            amount: "5.5",
                            currency: "USD",
                            paymentMethod: "CASH",
                          },
                          insurance: {
                            amount: "5.5",
                            content: "Laptop",
                            currency: "USD",
                            provider: "UPS",
                          },
                        },
                        metadata: "Customer ID 123456",
                        massUnit: "lb",
                        weight: "1",
                        template: "DPD_UK_Express_Pak",
                      },
                      {
                        extra: {
                          cod: {
                            amount: "5.5",
                            currency: "USD",
                            paymentMethod: "CASH",
                          },
                          insurance: {
                            amount: "5.5",
                            content: "Laptop",
                            currency: "USD",
                            provider: "UPS",
                          },
                        },
                        metadata: "Customer ID 123456",
                        massUnit: "lb",
                        weight: "1",
                        template: "DHLeC_Irregular",
                      },
                    ],
                  },
                },
                {
                  carrierAccount: "a4391cd4ab974f478f55dc08b5c8e3b3",
                  metadata: "SHIPMENT #1",
                  servicelevelToken: "fedex_ground",
                  shipment: {
                    extra: {
                      accountsReceivableCustomerAccount: {
                        prefix: "ABC",
                        value: "value",
                        refSort: 1,
                      },
                      appropriationNumber: {
                        prefix: "ABC",
                        value: "value",
                        refSort: 1,
                      },
                      billOfLadingNumber: {
                        prefix: "ABC",
                        value: "value",
                        refSort: 1,
                      },
                      cod: {
                        amount: "5.5",
                        currency: "USD",
                        paymentMethod: "CASH",
                      },
                      codNumber: {
                        prefix: "ABC",
                        value: "value",
                        refSort: 1,
                      },
                      customerReference: {
                        refSort: 1,
                      },
                      dealerOrderNumber: {
                        prefix: "ABC",
                        value: "value",
                        refSort: 1,
                      },
                      deptNumber: {
                        refSort: 3,
                      },
                      fdaProductCode: {
                        prefix: "ABC",
                        value: "value",
                        refSort: 1,
                      },
                      insurance: {
                        amount: "5.5",
                        currency: "USD",
                      },
                      invoiceNumber: {
                        refSort: 2,
                      },
                      manifestNumber: {
                        prefix: "ABC",
                        value: "value",
                        refSort: 1,
                      },
                      modelNumber: {
                        prefix: "ABC",
                        value: "value",
                        refSort: 1,
                      },
                      partNumber: {
                        prefix: "ABC",
                        value: "value",
                        refSort: 1,
                      },
                      poNumber: {
                        refSort: 2,
                      },
                      productionCode: {
                        prefix: "ABC",
                        value: "value",
                        refSort: 1,
                      },
                      purchaseRequestNumber: {
                        prefix: "ABC",
                        value: "value",
                        refSort: 1,
                      },
                      rmaNumber: {
                        refSort: 1,
                      },
                      salespersonNumber: {
                        prefix: "ABC",
                        value: "value",
                        refSort: 1,
                      },
                      serialNumber: {
                        prefix: "ABC",
                        value: "value",
                        refSort: 1,
                      },
                      storeNumber: {
                        prefix: "ABC",
                        value: "value",
                        refSort: 1,
                      },
                      transactionReferenceNumber: {
                        prefix: "ABC",
                        value: "value",
                        refSort: 1,
                      },
                    },
                    metadata: "Customer ID 123456",
                    shipmentDate: "2021-03-22T12:00:00Z",
                    addressFrom: "d799c2679e644279b59fe661ac8fa488",
                    addressReturn: "d799c2679e644279b59fe661ac8fa488",
                    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,
                    },
                    customsDeclaration: "adcfdddf8ec64b84ad22772bce3ea37a",
                    carrierAccounts: [
                      "065a4a8c10d24a34ab932163a1b87f52",
                      "73f706f4bdb94b54a337563840ce52b0",
                    ],
                    parcels: [
                      "<value>",
                    ],
                  },
                },
              ], "<id>");

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

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

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

            var res = await sdk.Batches.AddShipmentsAsync(
                batchId: "<id>",
                requestBody: new List<BatchShipmentCreateRequest>() {
                    new BatchShipmentCreateRequest() {
                        CarrierAccount = "a4391cd4ab974f478f55dc08b5c8e3b3",
                        Metadata = "SHIPMENT #1",
                        ServicelevelToken = "fedex_ground",
                        Shipment = new ShipmentCreateRequest() {
                            Extra = new ShipmentExtra() {
                                AccountsReceivableCustomerAccount = new UPSReferenceFields() {
                                    Prefix = "ABC",
                                    Value = "value",
                                    RefSort = 1,
                                },
                                AppropriationNumber = new UPSReferenceFields() {
                                    Prefix = "ABC",
                                    Value = "value",
                                    RefSort = 1,
                                },
                                BillOfLadingNumber = new UPSReferenceFields() {
                                    Prefix = "ABC",
                                    Value = "value",
                                    RefSort = 1,
                                },
                                Cod = new Cod() {
                                    Amount = "5.5",
                                    Currency = "USD",
                                    PaymentMethod = PaymentMethod.Cash,
                                },
                                CodNumber = new UPSReferenceFields() {
                                    Prefix = "ABC",
                                    Value = "value",
                                    RefSort = 1,
                                },
                                CustomerReference = new CustomerReference() {
                                    RefSort = 1,
                                },
                                DealerOrderNumber = new UPSReferenceFields() {
                                    Prefix = "ABC",
                                    Value = "value",
                                    RefSort = 1,
                                },
                                DeptNumber = new DepartmentNumber() {
                                    RefSort = 3,
                                },
                                FdaProductCode = new UPSReferenceFields() {
                                    Prefix = "ABC",
                                    Value = "value",
                                    RefSort = 1,
                                },
                                Insurance = new Insurance() {
                                    Amount = "5.5",
                                    Currency = "USD",
                                },
                                InvoiceNumber = new InvoiceNumber() {
                                    RefSort = 2,
                                },
                                ManifestNumber = new UPSReferenceFields() {
                                    Prefix = "ABC",
                                    Value = "value",
                                    RefSort = 1,
                                },
                                ModelNumber = new UPSReferenceFields() {
                                    Prefix = "ABC",
                                    Value = "value",
                                    RefSort = 1,
                                },
                                PartNumber = new UPSReferenceFields() {
                                    Prefix = "ABC",
                                    Value = "value",
                                    RefSort = 1,
                                },
                                PoNumber = new PoNumber() {
                                    RefSort = 2,
                                },
                                ProductionCode = new UPSReferenceFields() {
                                    Prefix = "ABC",
                                    Value = "value",
                                    RefSort = 1,
                                },
                                PurchaseRequestNumber = new UPSReferenceFields() {
                                    Prefix = "ABC",
                                    Value = "value",
                                    RefSort = 1,
                                },
                                RmaNumber = new RmaNumber() {
                                    RefSort = 1,
                                },
                                SalespersonNumber = new UPSReferenceFields() {
                                    Prefix = "ABC",
                                    Value = "value",
                                    RefSort = 1,
                                },
                                SerialNumber = new UPSReferenceFields() {
                                    Prefix = "ABC",
                                    Value = "value",
                                    RefSort = 1,
                                },
                                StoreNumber = new UPSReferenceFields() {
                                    Prefix = "ABC",
                                    Value = "value",
                                    RefSort = 1,
                                },
                                TransactionReferenceNumber = new UPSReferenceFields() {
                                    Prefix = "ABC",
                                    Value = "value",
                                    RefSort = 1,
                                },
                            },
                            Metadata = "Customer ID 123456",
                            ShipmentDate = "2021-03-22T12:00:00Z",
                            AddressFrom = AddressFrom.CreateStr(
                                "d799c2679e644279b59fe661ac8fa488"
                            ),
                            AddressReturn = AddressReturn.CreateAddressCreateRequest(
                                new AddressCreateRequest() {
                                    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,
                                }
                            ),
                            AddressTo = AddressTo.CreateAddressCreateRequest(
                                new AddressCreateRequest() {
                                    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,
                                }
                            ),
                            CustomsDeclaration = ShipmentCreateRequestCustomsDeclaration.CreateStr(
                                "adcfdddf8ec64b84ad22772bce3ea37a"
                            ),
                            CarrierAccounts = new List<string>() {
                                "065a4a8c10d24a34ab932163a1b87f52",
                                "73f706f4bdb94b54a337563840ce52b0",
                            },
                            Parcels = new List<Models.Components.Parcels>() {
                                Parcels.CreateStr(
                                    "<value>"
                                ),
                            },
                        },
                    },
                },
                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;

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



            $response = $sdk->batches->addShipments(
                batchId: '<id>',
                requestBody: [
                    new Components\BatchShipmentCreateRequest(
                        carrierAccount: 'a4391cd4ab974f478f55dc08b5c8e3b3',
                        metadata: 'SHIPMENT #1',
                        servicelevelToken: 'fedex_ground',
                        shipment: new Components\ShipmentCreateRequest(
                            extra: new Components\ShipmentExtra(
                                accountsReceivableCustomerAccount: new Components\UPSReferenceFields(
                                    prefix: 'ABC',
                                    value: 'value',
                                    refSort: 1,
                                ),
                                appropriationNumber: new Components\UPSReferenceFields(
                                    prefix: 'ABC',
                                    value: 'value',
                                    refSort: 1,
                                ),
                                billOfLadingNumber: new Components\UPSReferenceFields(
                                    prefix: 'ABC',
                                    value: 'value',
                                    refSort: 1,
                                ),
                                cod: new Components\Cod(
                                    amount: '5.5',
                                    currency: 'USD',
                                    paymentMethod: Components\PaymentMethod::Cash,
                                ),
                                codNumber: new Components\UPSReferenceFields(
                                    prefix: 'ABC',
                                    value: 'value',
                                    refSort: 1,
                                ),
                                customerReference: new Components\CustomerReference(
                                    refSort: 1,
                                ),
                                dealerOrderNumber: new Components\UPSReferenceFields(
                                    prefix: 'ABC',
                                    value: 'value',
                                    refSort: 1,
                                ),
                                deptNumber: new Components\DepartmentNumber(
                                    refSort: 3,
                                ),
                                fdaProductCode: new Components\UPSReferenceFields(
                                    prefix: 'ABC',
                                    value: 'value',
                                    refSort: 1,
                                ),
                                insurance: new Components\Insurance(
                                    amount: '5.5',
                                    currency: 'USD',
                                ),
                                invoiceNumber: new Components\InvoiceNumber(
                                    refSort: 2,
                                ),
                                manifestNumber: new Components\UPSReferenceFields(
                                    prefix: 'ABC',
                                    value: 'value',
                                    refSort: 1,
                                ),
                                modelNumber: new Components\UPSReferenceFields(
                                    prefix: 'ABC',
                                    value: 'value',
                                    refSort: 1,
                                ),
                                partNumber: new Components\UPSReferenceFields(
                                    prefix: 'ABC',
                                    value: 'value',
                                    refSort: 1,
                                ),
                                poNumber: new Components\PoNumber(
                                    refSort: 2,
                                ),
                                productionCode: new Components\UPSReferenceFields(
                                    prefix: 'ABC',
                                    value: 'value',
                                    refSort: 1,
                                ),
                                purchaseRequestNumber: new Components\UPSReferenceFields(
                                    prefix: 'ABC',
                                    value: 'value',
                                    refSort: 1,
                                ),
                                rmaNumber: new Components\RmaNumber(
                                    refSort: 1,
                                ),
                                salespersonNumber: new Components\UPSReferenceFields(
                                    prefix: 'ABC',
                                    value: 'value',
                                    refSort: 1,
                                ),
                                serialNumber: new Components\UPSReferenceFields(
                                    prefix: 'ABC',
                                    value: 'value',
                                    refSort: 1,
                                ),
                                storeNumber: new Components\UPSReferenceFields(
                                    prefix: 'ABC',
                                    value: 'value',
                                    refSort: 1,
                                ),
                                transactionReferenceNumber: new Components\UPSReferenceFields(
                                    prefix: 'ABC',
                                    value: 'value',
                                    refSort: 1,
                                ),
                            ),
                            metadata: 'Customer ID 123456',
                            shipmentDate: '2021-03-22T12:00:00Z',
                            addressFrom: 'd799c2679e644279b59fe661ac8fa488',
                            addressReturn: new Components\AddressCreateRequest(
                                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,
                            ),
                            addressTo: new Components\AddressCreateRequest(
                                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,
                            ),
                            customsDeclaration: 'adcfdddf8ec64b84ad22772bce3ea37a',
                            carrierAccounts: [
                                '065a4a8c10d24a34ab932163a1b87f52',
                                '73f706f4bdb94b54a337563840ce52b0',
                            ],
                            parcels: [
                                '<value>',
                            ],
                        ),
                    ),
                ],
                shippoApiVersion: '2018-02-08'

            );

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


            import com.goshippo.shippo_sdk.Shippo;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            import java.lang.Exception;

            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();

                    AddShipmentsToBatchResponse res = sdk.batches().addShipments()
                            .batchId("<id>")
                            .shippoApiVersion("2018-02-08")
                            .requestBody(List.of(
                                BatchShipmentCreateRequest.builder()
                                    .shipment(ShipmentCreateRequest.builder()
                                        .addressFrom(AddressFrom.of(AddressCreateRequest.builder()
                                            .country("US")
                                            .name("Shwan Ippotle")
                                            .company("Shippo")
                                            .street1("215 Clayton St.")
                                            .street3("")
                                            .streetNo("")
                                            .city("San Francisco")
                                            .state("CA")
                                            .zip("94117")
                                            .phone("+1 555 341 9393")
                                            .email("shippotle@shippo.com")
                                            .isResidential(true)
                                            .metadata("Customer ID 123456")
                                            .validate(true)
                                            .build()))
                                        .addressTo(AddressTo.of("d799c2679e644279b59fe661ac8fa489"))
                                        .parcels(List.of(
                                            Parcels.of("<value>"),
                                            Parcels.of("<value>"),
                                            Parcels.of(ParcelCreateFromTemplateRequest.builder()
                                                .massUnit(WeightUnitEnum.LB)
                                                .weight("1")
                                                .template(ParcelTemplateEnumSet.of(ParcelTemplateUSPSEnum.USPS_SMALL_FLAT_RATE_ENVELOPE))
                                                .extra(ParcelExtra.builder()
                                                    .cod(Cod.builder()
                                                        .amount("5.5")
                                                        .currency("USD")
                                                        .paymentMethod(PaymentMethod.CASH)
                                                        .build())
                                                    .insurance(ParcelInsurance.builder()
                                                        .amount("5.5")
                                                        .content("Laptop")
                                                        .currency("USD")
                                                        .provider(ParcelInsuranceProvider.UPS)
                                                        .build())
                                                    .build())
                                                .metadata("Customer ID 123456")
                                                .build())))
                                        .extra(ShipmentExtra.builder()
                                            .accountsReceivableCustomerAccount(UPSReferenceFields.builder()
                                                .prefix("ABC")
                                                .value("value")
                                                .refSort(1L)
                                                .build())
                                            .appropriationNumber(UPSReferenceFields.builder()
                                                .prefix("ABC")
                                                .value("value")
                                                .refSort(1L)
                                                .build())
                                            .billOfLadingNumber(UPSReferenceFields.builder()
                                                .prefix("ABC")
                                                .value("value")
                                                .refSort(1L)
                                                .build())
                                            .cod(Cod.builder()
                                                .amount("5.5")
                                                .currency("USD")
                                                .paymentMethod(PaymentMethod.CASH)
                                                .build())
                                            .codNumber(UPSReferenceFields.builder()
                                                .prefix("ABC")
                                                .value("value")
                                                .refSort(1L)
                                                .build())
                                            .customerReference(CustomerReference.builder()
                                                .refSort(1L)
                                                .build())
                                            .dealerOrderNumber(UPSReferenceFields.builder()
                                                .prefix("ABC")
                                                .value("value")
                                                .refSort(1L)
                                                .build())
                                            .deptNumber(DepartmentNumber.builder()
                                                .refSort(3L)
                                                .build())
                                            .fdaProductCode(UPSReferenceFields.builder()
                                                .prefix("ABC")
                                                .value("value")
                                                .refSort(1L)
                                                .build())
                                            .insurance(Insurance.builder()
                                                .amount("5.5")
                                                .currency("USD")
                                                .build())
                                            .invoiceNumber(InvoiceNumber.builder()
                                                .refSort(2L)
                                                .build())
                                            .manifestNumber(UPSReferenceFields.builder()
                                                .prefix("ABC")
                                                .value("value")
                                                .refSort(1L)
                                                .build())
                                            .modelNumber(UPSReferenceFields.builder()
                                                .prefix("ABC")
                                                .value("value")
                                                .refSort(1L)
                                                .build())
                                            .partNumber(UPSReferenceFields.builder()
                                                .prefix("ABC")
                                                .value("value")
                                                .refSort(1L)
                                                .build())
                                            .poNumber(PoNumber.builder()
                                                .refSort(2L)
                                                .build())
                                            .productionCode(UPSReferenceFields.builder()
                                                .prefix("ABC")
                                                .value("value")
                                                .refSort(1L)
                                                .build())
                                            .purchaseRequestNumber(UPSReferenceFields.builder()
                                                .prefix("ABC")
                                                .value("value")
                                                .refSort(1L)
                                                .build())
                                            .rmaNumber(RmaNumber.builder()
                                                .refSort(1L)
                                                .build())
                                            .salespersonNumber(UPSReferenceFields.builder()
                                                .prefix("ABC")
                                                .value("value")
                                                .refSort(1L)
                                                .build())
                                            .serialNumber(UPSReferenceFields.builder()
                                                .prefix("ABC")
                                                .value("value")
                                                .refSort(1L)
                                                .build())
                                            .storeNumber(UPSReferenceFields.builder()
                                                .prefix("ABC")
                                                .value("value")
                                                .refSort(1L)
                                                .build())
                                            .transactionReferenceNumber(UPSReferenceFields.builder()
                                                .prefix("ABC")
                                                .value("value")
                                                .refSort(1L)
                                                .build())
                                            .build())
                                        .metadata("Customer ID 123456")
                                        .shipmentDate("2021-03-22T12:00:00Z")
                                        .addressReturn(AddressReturn.of(AddressCreateRequest.builder()
                                            .country("US")
                                            .name("Shwan Ippotle")
                                            .company("Shippo")
                                            .street1("215 Clayton St.")
                                            .street3("")
                                            .streetNo("")
                                            .city("San Francisco")
                                            .state("CA")
                                            .zip("94117")
                                            .phone("+1 555 341 9393")
                                            .email("shippotle@shippo.com")
                                            .isResidential(true)
                                            .metadata("Customer ID 123456")
                                            .validate(true)
                                            .build()))
                                        .customsDeclaration(ShipmentCreateRequestCustomsDeclaration.of("adcfdddf8ec64b84ad22772bce3ea37a"))
                                        .carrierAccounts(List.of(
                                            "065a4a8c10d24a34ab932163a1b87f52",
                                            "73f706f4bdb94b54a337563840ce52b0"))
                                        .build())
                                    .carrierAccount("a4391cd4ab974f478f55dc08b5c8e3b3")
                                    .metadata("SHIPMENT #1")
                                    .servicelevelToken("fedex_ground")
                                    .build(),
                                BatchShipmentCreateRequest.builder()
                                    .shipment(ShipmentCreateRequest.builder()
                                        .addressFrom(AddressFrom.of(AddressCreateRequest.builder()
                                            .country("US")
                                            .name("Shwan Ippotle")
                                            .company("Shippo")
                                            .street1("215 Clayton St.")
                                            .street3("")
                                            .streetNo("")
                                            .city("San Francisco")
                                            .state("CA")
                                            .zip("94117")
                                            .phone("+1 555 341 9393")
                                            .email("shippotle@shippo.com")
                                            .isResidential(true)
                                            .metadata("Customer ID 123456")
                                            .validate(true)
                                            .build()))
                                        .addressTo(AddressTo.of(AddressCreateRequest.builder()
                                            .country("US")
                                            .name("Shwan Ippotle")
                                            .company("Shippo")
                                            .street1("215 Clayton St.")
                                            .street3("")
                                            .streetNo("")
                                            .city("San Francisco")
                                            .state("CA")
                                            .zip("94117")
                                            .phone("+1 555 341 9393")
                                            .email("shippotle@shippo.com")
                                            .isResidential(true)
                                            .metadata("Customer ID 123456")
                                            .validate(true)
                                            .build()))
                                        .parcels(List.of(
                                            Parcels.of(ParcelCreateFromTemplateRequest.builder()
                                                .massUnit(WeightUnitEnum.LB)
                                                .weight("1")
                                                .template(ParcelTemplateEnumSet.of(ParcelTemplateDPDUKEnum.DPDUK_EXPRESS_PAK))
                                                .extra(ParcelExtra.builder()
                                                    .cod(Cod.builder()
                                                        .amount("5.5")
                                                        .currency("USD")
                                                        .paymentMethod(PaymentMethod.CASH)
                                                        .build())
                                                    .insurance(ParcelInsurance.builder()
                                                        .amount("5.5")
                                                        .content("Laptop")
                                                        .currency("USD")
                                                        .provider(ParcelInsuranceProvider.UPS)
                                                        .build())
                                                    .build())
                                                .metadata("Customer ID 123456")
                                                .build()),
                                            Parcels.of(ParcelCreateFromTemplateRequest.builder()
                                                .massUnit(WeightUnitEnum.LB)
                                                .weight("1")
                                                .template(ParcelTemplateEnumSet.of(ParcelTemplateDHLeCommerceEnum.DH_LE_C_IRREGULAR))
                                                .extra(ParcelExtra.builder()
                                                    .cod(Cod.builder()
                                                        .amount("5.5")
                                                        .currency("USD")
                                                        .paymentMethod(PaymentMethod.CASH)
                                                        .build())
                                                    .insurance(ParcelInsurance.builder()
                                                        .amount("5.5")
                                                        .content("Laptop")
                                                        .currency("USD")
                                                        .provider(ParcelInsuranceProvider.UPS)
                                                        .build())
                                                    .build())
                                                .metadata("Customer ID 123456")
                                                .build())))
                                        .extra(ShipmentExtra.builder()
                                            .accountsReceivableCustomerAccount(UPSReferenceFields.builder()
                                                .prefix("ABC")
                                                .value("value")
                                                .refSort(1L)
                                                .build())
                                            .appropriationNumber(UPSReferenceFields.builder()
                                                .prefix("ABC")
                                                .value("value")
                                                .refSort(1L)
                                                .build())
                                            .billOfLadingNumber(UPSReferenceFields.builder()
                                                .prefix("ABC")
                                                .value("value")
                                                .refSort(1L)
                                                .build())
                                            .cod(Cod.builder()
                                                .amount("5.5")
                                                .currency("USD")
                                                .paymentMethod(PaymentMethod.CASH)
                                                .build())
                                            .codNumber(UPSReferenceFields.builder()
                                                .prefix("ABC")
                                                .value("value")
                                                .refSort(1L)
                                                .build())
                                            .customerReference(CustomerReference.builder()
                                                .refSort(1L)
                                                .build())
                                            .dealerOrderNumber(UPSReferenceFields.builder()
                                                .prefix("ABC")
                                                .value("value")
                                                .refSort(1L)
                                                .build())
                                            .deptNumber(DepartmentNumber.builder()
                                                .refSort(3L)
                                                .build())
                                            .fdaProductCode(UPSReferenceFields.builder()
                                                .prefix("ABC")
                                                .value("value")
                                                .refSort(1L)
                                                .build())
                                            .insurance(Insurance.builder()
                                                .amount("5.5")
                                                .currency("USD")
                                                .build())
                                            .invoiceNumber(InvoiceNumber.builder()
                                                .refSort(2L)
                                                .build())
                                            .manifestNumber(UPSReferenceFields.builder()
                                                .prefix("ABC")
                                                .value("value")
                                                .refSort(1L)
                                                .build())
                                            .modelNumber(UPSReferenceFields.builder()
                                                .prefix("ABC")
                                                .value("value")
                                                .refSort(1L)
                                                .build())
                                            .partNumber(UPSReferenceFields.builder()
                                                .prefix("ABC")
                                                .value("value")
                                                .refSort(1L)
                                                .build())
                                            .poNumber(PoNumber.builder()
                                                .refSort(2L)
                                                .build())
                                            .productionCode(UPSReferenceFields.builder()
                                                .prefix("ABC")
                                                .value("value")
                                                .refSort(1L)
                                                .build())
                                            .purchaseRequestNumber(UPSReferenceFields.builder()
                                                .prefix("ABC")
                                                .value("value")
                                                .refSort(1L)
                                                .build())
                                            .rmaNumber(RmaNumber.builder()
                                                .refSort(1L)
                                                .build())
                                            .salespersonNumber(UPSReferenceFields.builder()
                                                .prefix("ABC")
                                                .value("value")
                                                .refSort(1L)
                                                .build())
                                            .serialNumber(UPSReferenceFields.builder()
                                                .prefix("ABC")
                                                .value("value")
                                                .refSort(1L)
                                                .build())
                                            .storeNumber(UPSReferenceFields.builder()
                                                .prefix("ABC")
                                                .value("value")
                                                .refSort(1L)
                                                .build())
                                            .transactionReferenceNumber(UPSReferenceFields.builder()
                                                .prefix("ABC")
                                                .value("value")
                                                .refSort(1L)
                                                .build())
                                            .build())
                                        .metadata("Customer ID 123456")
                                        .shipmentDate("2021-03-22T12:00:00Z")
                                        .addressReturn(AddressReturn.of(AddressCreateRequest.builder()
                                            .country("US")
                                            .name("Shwan Ippotle")
                                            .company("Shippo")
                                            .street1("215 Clayton St.")
                                            .street3("")
                                            .streetNo("")
                                            .city("San Francisco")
                                            .state("CA")
                                            .zip("94117")
                                            .phone("+1 555 341 9393")
                                            .email("shippotle@shippo.com")
                                            .isResidential(true)
                                            .metadata("Customer ID 123456")
                                            .validate(true)
                                            .build()))
                                        .customsDeclaration(ShipmentCreateRequestCustomsDeclaration.of(CustomsDeclarationCreateRequest.builder()
                                            .certify(true)
                                            .certifySigner("Shawn Ippotle")
                                            .contentsType(CustomsDeclarationContentsTypeEnum.MERCHANDISE)
                                            .items(List.of(
                                                CustomsItemCreateRequest.builder()
                                                    .description("T-Shirt")
                                                    .massUnit(WeightUnitEnum.LB)
                                                    .netWeight("5")
                                                    .originCountry("<value>")
                                                    .quantity(20L)
                                                    .valueAmount("200")
                                                    .valueCurrency("USD")
                                                    .metadata("Order ID \"123454\"")
                                                    .skuCode("HM-123")
                                                    .hsCode("0901.21")
                                                    .build()))
                                            .nonDeliveryOption(CustomsDeclarationNonDeliveryOptionEnum.RETURN)
                                            .b13aFilingOption(CustomsDeclarationB13AFilingOptionEnum.FILED_ELECTRONICALLY)
                                            .contentsExplanation("T-Shirt purchase")
                                            .dutiesPayor(DutiesPayor.builder()
                                                .account("2323434543")
                                                .type(CustomsDeclarationCreateRequestType.THIRD_PARTY)
                                                .address(CustomsDeclarationCreateRequestAddress.builder()
                                                    .name("Patrick Kavanagh")
                                                    .zip("80331")
                                                    .country("DE")
                                                    .build())
                                                .build())
                                            .exporterIdentification(CustomsExporterIdentification.builder()
                                                .eoriNumber("PL123456790ABCDE")
                                                .taxId(CustomsTaxIdentification.builder()
                                                    .number("123456789")
                                                    .type(CustomsTaxIdentificationType.EIN)
                                                    .build())
                                                .build())
                                            .invoice("#123123")
                                            .metadata("Order ID #123123")
                                            .addressImporter(AddressImporter.builder()
                                                .name("Shwan Ippotle")
                                                .company("Shippo")
                                                .street1("Blumenstraße")
                                                .street3("")
                                                .streetNo("22")
                                                .city("München")
                                                .state("CA")
                                                .zip("80331")
                                                .country("DE")
                                                .phone("80331")
                                                .email("shippotle@shippo.com")
                                                .isResidential(true)
                                                .build())
                                            .eelPfc(CustomsDeclarationEelPfcEnum.NOEEI3037_A)
                                            .incoterm(CustomsDeclarationIncotermEnum.DDP)
                                            .test(true)
                                            .build()))
                                        .carrierAccounts(List.of(
                                            "065a4a8c10d24a34ab932163a1b87f52",
                                            "73f706f4bdb94b54a337563840ce52b0"))
                                        .build())
                                    .carrierAccount("a4391cd4ab974f478f55dc08b5c8e3b3")
                                    .metadata("SHIPMENT #1")
                                    .servicelevelToken("fedex_ground")
                                    .build(),
                                BatchShipmentCreateRequest.builder()
                                    .shipment(ShipmentCreateRequest.builder()
                                        .addressFrom(AddressFrom.of("d799c2679e644279b59fe661ac8fa488"))
                                        .addressTo(AddressTo.of(AddressCreateRequest.builder()
                                            .country("US")
                                            .name("Shwan Ippotle")
                                            .company("Shippo")
                                            .street1("215 Clayton St.")
                                            .street3("")
                                            .streetNo("")
                                            .city("San Francisco")
                                            .state("CA")
                                            .zip("94117")
                                            .phone("+1 555 341 9393")
                                            .email("shippotle@shippo.com")
                                            .isResidential(true)
                                            .metadata("Customer ID 123456")
                                            .validate(true)
                                            .build()))
                                        .parcels(List.of(
                                            Parcels.of("<value>")))
                                        .extra(ShipmentExtra.builder()
                                            .accountsReceivableCustomerAccount(UPSReferenceFields.builder()
                                                .prefix("ABC")
                                                .value("value")
                                                .refSort(1L)
                                                .build())
                                            .appropriationNumber(UPSReferenceFields.builder()
                                                .prefix("ABC")
                                                .value("value")
                                                .refSort(1L)
                                                .build())
                                            .billOfLadingNumber(UPSReferenceFields.builder()
                                                .prefix("ABC")
                                                .value("value")
                                                .refSort(1L)
                                                .build())
                                            .cod(Cod.builder()
                                                .amount("5.5")
                                                .currency("USD")
                                                .paymentMethod(PaymentMethod.CASH)
                                                .build())
                                            .codNumber(UPSReferenceFields.builder()
                                                .prefix("ABC")
                                                .value("value")
                                                .refSort(1L)
                                                .build())
                                            .customerReference(CustomerReference.builder()
                                                .refSort(1L)
                                                .build())
                                            .dealerOrderNumber(UPSReferenceFields.builder()
                                                .prefix("ABC")
                                                .value("value")
                                                .refSort(1L)
                                                .build())
                                            .deptNumber(DepartmentNumber.builder()
                                                .refSort(3L)
                                                .build())
                                            .fdaProductCode(UPSReferenceFields.builder()
                                                .prefix("ABC")
                                                .value("value")
                                                .refSort(1L)
                                                .build())
                                            .insurance(Insurance.builder()
                                                .amount("5.5")
                                                .currency("USD")
                                                .build())
                                            .invoiceNumber(InvoiceNumber.builder()
                                                .refSort(2L)
                                                .build())
                                            .manifestNumber(UPSReferenceFields.builder()
                                                .prefix("ABC")
                                                .value("value")
                                                .refSort(1L)
                                                .build())
                                            .modelNumber(UPSReferenceFields.builder()
                                                .prefix("ABC")
                                                .value("value")
                                                .refSort(1L)
                                                .build())
                                            .partNumber(UPSReferenceFields.builder()
                                                .prefix("ABC")
                                                .value("value")
                                                .refSort(1L)
                                                .build())
                                            .poNumber(PoNumber.builder()
                                                .refSort(2L)
                                                .build())
                                            .productionCode(UPSReferenceFields.builder()
                                                .prefix("ABC")
                                                .value("value")
                                                .refSort(1L)
                                                .build())
                                            .purchaseRequestNumber(UPSReferenceFields.builder()
                                                .prefix("ABC")
                                                .value("value")
                                                .refSort(1L)
                                                .build())
                                            .rmaNumber(RmaNumber.builder()
                                                .refSort(1L)
                                                .build())
                                            .salespersonNumber(UPSReferenceFields.builder()
                                                .prefix("ABC")
                                                .value("value")
                                                .refSort(1L)
                                                .build())
                                            .serialNumber(UPSReferenceFields.builder()
                                                .prefix("ABC")
                                                .value("value")
                                                .refSort(1L)
                                                .build())
                                            .storeNumber(UPSReferenceFields.builder()
                                                .prefix("ABC")
                                                .value("value")
                                                .refSort(1L)
                                                .build())
                                            .transactionReferenceNumber(UPSReferenceFields.builder()
                                                .prefix("ABC")
                                                .value("value")
                                                .refSort(1L)
                                                .build())
                                            .build())
                                        .metadata("Customer ID 123456")
                                        .shipmentDate("2021-03-22T12:00:00Z")
                                        .addressReturn(AddressReturn.of("d799c2679e644279b59fe661ac8fa488"))
                                        .customsDeclaration(ShipmentCreateRequestCustomsDeclaration.of("adcfdddf8ec64b84ad22772bce3ea37a"))
                                        .carrierAccounts(List.of(
                                            "065a4a8c10d24a34ab932163a1b87f52",
                                            "73f706f4bdb94b54a337563840ce52b0"))
                                        .build())
                                    .carrierAccount("a4391cd4ab974f478f55dc08b5c8e3b3")
                                    .metadata("SHIPMENT #1")
                                    .servicelevelToken("fedex_ground")
                                    .build()))
                            .call();

                    if (res.batch().isPresent()) {
                        // handle response
                    }
                }
            }
      x-speakeasy-name-override: addShipments
  /batches/{BatchId}/purchase:
    post:
      description: >-
        Purchases an existing batch with a status of `VALID`. 

        Once you send a POST request to the purchase endpoint the batch status
        will change to `PURCHASING`. 

        When all the shipments are purchased, the status will change to
        `PURCHASED` and you will receive a 

        `batch_purchased` webhook indicating that the batch has been purchased
      operationId: PurchaseBatch
      parameters:
        - description: Object ID of the batch
          in: path
          name: BatchId
          required: true
          schema:
            type: string
        - $ref: '#/components/parameters/ShippoApiVersionHeader'
      responses:
        '202':
          $ref: '#/components/responses/batchResponse'
        '400':
          $ref: '#/components/responses/badRequestResponse'
      summary: Purchase a batch
      tags:
        - Batches
      x-codeSamples:
        - label: cURL
          lang: cURL
          source: >-
            curl -X POST https://api.goshippo.com/batches/<BATCH OBJECT
            ID>/purchase \

            -H "Authorization: ShippoToken <API_TOKEN>"
        - lang: python
          label: Python
          source: |-
            import shippo

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


            res = s.batches.purchase(batch_id='<id>')

            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.batches.purchase("<id>");

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

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

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

            var res = await sdk.Batches.PurchaseAsync(
                batchId: "<id>",
                shippoApiVersion: "2018-02-08"
            );

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

            require 'vendor/autoload.php';

            use Shippo\API;

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



            $response = $sdk->batches->purchase(
                batchId: '<id>',
                shippoApiVersion: '2018-02-08'

            );

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


            import com.goshippo.shippo_sdk.Shippo;

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

            import java.lang.Exception;


            public class Application {

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

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

                    PurchaseBatchResponse res = sdk.batches().purchase()
                            .batchId("<id>")
                            .shippoApiVersion("2018-02-08")
                            .call();

                    if (res.batch().isPresent()) {
                        // handle response
                    }
                }
            }
      x-speakeasy-name-override: purchase
  /batches/{BatchId}/remove_shipments:
    post:
      description: Removes shipments from an existing batch shipment.
      operationId: RemoveShipmentsFromBatch
      parameters:
        - description: Object ID of the batch
          in: path
          name: BatchId
          required: true
          schema:
            type: string
        - $ref: '#/components/parameters/ShippoApiVersionHeader'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              items:
                type: string
              type: array
        description: Array of shipments object ids to remove from the batch
      responses:
        '200':
          $ref: '#/components/responses/batchResponse'
        '400':
          $ref: '#/components/responses/badRequestResponse'
      summary: Remove shipments from a batch
      tags:
        - Batches
      x-codeSamples:
        - label: cURL
          lang: cURL
          source: >-
            curl -X POST https://api.goshippo.com/batches/<BATCH OBJECT
            ID>/remove_shipments \

            -H "Authorization: ShippoToken <API_TOKEN>" \

            -H "Content-Type: application/json"  \

            -d '[
                  "aa7dea463a5a48b0b8fb21f90e72d779",
                  "f11b46440c144ce3b97fb5ddf02b8c71",
                  "5400f9078f764b1bbb121bcd08de127f",
                  "2ab2b452392545908d2cef8861a39c35"
                ]'
        - lang: python
          label: Python
          source: |-
            import shippo

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


            res = s.batches.remove_shipments(request_body=[
                '<value>',
                '<value>',
                '<value>',
            ], batch_id='<id>')

            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.batches.removeShipments([
                "<value>",
                "<value>",
                "<value>",
              ], "<id>");

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

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

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

            var res = await sdk.Batches.RemoveShipmentsAsync(
                batchId: "<id>",
                requestBody: new List<string>() {
                    "<value>",
                },
                shippoApiVersion: "2018-02-08"
            );

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

            require 'vendor/autoload.php';

            use Shippo\API;

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



            $response = $sdk->batches->removeShipments(
                batchId: '<id>',
                requestBody: [
                    '<value>',
                ],
                shippoApiVersion: '2018-02-08'

            );

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


            import com.goshippo.shippo_sdk.Shippo;

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

            import java.lang.Exception;

            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();

                    RemoveShipmentsFromBatchResponse res = sdk.batches().removeShipments()
                            .batchId("<id>")
                            .shippoApiVersion("2018-02-08")
                            .requestBody(List.of(
                                "<value>",
                                "<value>",
                                "<value>"))
                            .call();

                    if (res.batch().isPresent()) {
                        // handle response
                    }
                }
            }
      x-speakeasy-name-override: removeShipments
  /carrier_accounts:
    get:
      description: >-
        Returns a list of all carrier accounts connected to your Shippo account.
        These carrier accounts include both Shippo carrier accounts and your own
        carrier accounts that you have connected to your Shippo account.


        Additionally, you can get information about the service levels
        associated with each carrier account by passing in the
        `?service_levels=true` query parameter. <br>

        Using it appends the property `service_levels` to each carrier account.
        <br>

        By default, if the query parameter is omitted, the `service_levels`
        property will not be included in the response.
      operationId: ListCarrierAccounts
      parameters:
        - description: >-
            Appends the property `service_levels` to each returned carrier
            account
          in: query
          name: service_levels
          required: false
          schema:
            type: boolean
        - description: Filter the response by the specified carrier
          in: query
          name: carrier
          required: false
          schema:
            $ref: '#/components/schemas/CarriersEnum'
        - description: Filter the response by the specified carrier account Id
          in: query
          name: account_id
          required: false
          schema:
            type: string
        - $ref: '#/components/parameters/PageNumberQueryParam'
        - $ref: '#/components/parameters/ResultsPerPageDefault5QueryParam'
        - $ref: '#/components/parameters/ShippoApiVersionHeader'
      responses:
        '200':
          $ref: '#/components/responses/carrierAccountPaginatedResponse'
        '400':
          $ref: '#/components/responses/badRequestResponse'
      summary: List all carrier accounts
      tags:
        - Carrier Accounts
      x-codeSamples:
        - label: cURL
          lang: cURL
          source: |-
            curl https://api.goshippo.com/carrier_accounts?service_levels=true \
             -H "Authorization: ShippoToken <API_TOKEN>"
        - lang: python
          label: Python
          source: >-
            import shippo

            from shippo.models import operations


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



            res =
            s.carrier_accounts.list(request=operations.ListCarrierAccountsRequest())


            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.carrierAccounts.list({});

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

            run();
        - lang: php
          label: PHP
          source: |-
            declare(strict_types=1);

            require 'vendor/autoload.php';

            use Shippo\API;
            use Shippo\API\Models\Operations;

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

            $request = new Operations\ListCarrierAccountsRequest();

            $response = $sdk->carrierAccounts->list(
                request: $request
            );

            if ($response->carrierAccountPaginatedList !== null) {
                // handle response
            }
        - lang: csharp
          label: C#
          source: >-
            using Shippo;

            using Shippo.Models.Components;

            using Shippo.Models.Requests;


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


            ListCarrierAccountsRequest req = new ListCarrierAccountsRequest()
            {};


            var res = await sdk.CarrierAccounts.ListAsync(req);


            // handle response
        - lang: java
          label: Java
          source: >-
            package hello.world;


            import com.goshippo.shippo_sdk.Shippo;

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

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

            import java.lang.Exception;


            public class Application {

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

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

                    ListCarrierAccountsRequest req = ListCarrierAccountsRequest.builder()
                            .build();

                    ListCarrierAccountsResponse res = sdk.carrierAccounts().list()
                            .request(req)
                            .call();

                    if (res.carrierAccountPaginatedList().isPresent()) {
                        // handle response
                    }
                }
            }
    post:
      description: >-
        Creates a new carrier account or connects an existing carrier account to
        the Shippo account.
      operationId: CreateCarrierAccount
      parameters:
        - $ref: '#/components/parameters/ShippoApiVersionHeader'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ConnectExistingOwnAccountRequest'
        description: Examples.
        x-examples:
          application/json:
            fedex-existing-account-example:
              summary: Connect an existing Fedex account to Shippo
              value:
                account_id: 321123
                carrier: fedex
                metadata: FedEx Account
                parameters:
                  first_name: Hippo
                  from_address_city: San Francisco
                  from_address_country_iso2: US
                  from_address_st: 250 Union St
                  from_address_state: CA
                  from_address_zip: 94133
                  last_name: Hippovich
                  meter: 118599345
                  phone_number: 1112223333
                  smartpost_id: 5902
                test: false
            ups-existing-account-example:
              summary: Connect an existing UPS account to Shippo
              value:
                account_id: 123456
                active: true
                carrier: ups
                metadata: UPS Account
                parameters:
                  account_number: 94567e
                  aia_country_iso2: US
                  billing_address_city: San Francisco
                  billing_address_country_iso2: US
                  billing_address_state: CA
                  billing_address_street1: 731 Market St
                  billing_address_street2: STE 200
                  billing_address_zip: 94103
                  collec_country_iso2: US
                  collec_zip: 94103
                  company: Shippo
                  currency_code: USD
                  email: hippo@shippo.com
                  full_name: Shippo Meister
                  has_invoice: false
                  invoice_controlid: 1234
                  invoice_date: 20210529
                  invoice_number: 1112234
                  invoice_value: 11.23
                  phone: 1112223333
                  title: Manager
                  ups_agreements: true
                test: false
            ups-new-account-example:
              summary: Create a new UPS account
              value:
                account_id: 123456
                active: true
                carrier: ups
                metadata: UPS Account
                parameters:
                  billing_address_city: San Francisco
                  billing_address_country_iso2: US
                  billing_address_state: CA
                  billing_address_street1: 731 Market St
                  billing_address_street2: STE 200
                  billing_address_zip: 94103
                  company: Shippo
                  email: hippo@shippo.com
                  full_name: Shippo Meister
                  phone: 1112223333
                  pickup_address_city: San Francisco
                  pickup_address_country_iso2: US
                  pickup_address_same_as_billing_address: false
                  pickup_address_state: CA
                  pickup_address_street1: 731 Market St
                  pickup_address_street2: STE 200
                  pickup_address_zip: 94103
                  ups_agreements: true
                test: false
      responses:
        '201':
          $ref: '#/components/responses/carrierAccountResponse'
        '400':
          $ref: '#/components/responses/badRequestResponse'
      summary: Create a new carrier account
      tags:
        - Carrier Accounts
      x-codeSamples:
        - label: cURL
          lang: cURL
          source: >-
            curl --location --request POST
            'https://api.goshippo.com/carrier_accounts/' \

            --header 'Authorization: ShippoToken {{token}}' \

            --header 'Content-Type: application/json' \

            --data-raw '{
              "account_id": "string",
              "active": true,
              "carrier": "ups",
              "metadata": "UPS Account",
              "parameters": {
                "billing_address_city": "San Francisco",
                "billing_address_country_iso2": "US",
                "billing_address_state": "CA",
                "billing_address_street1": "731 Market St",
                "billing_address_street2": "STE 200",
                "billing_address_zip": "94103",
                "company": "Shippo",
                "email": "hippo@shippo.com",
                "full_name": "Thorn Hall",
                "phone": "1112223333",
                "pickup_address_city": "San Francisco",
                "pickup_address_country_iso2": "US",
                "pickup_address_same_as_billing_address": false,
                "pickup_address_state": "CA",
                "pickup_address_street1": "731 Market St",
                "pickup_address_street2": "STE 200",
                "pickup_address_zip": "94103",
                "ups_agreements": true
              },
              "test": false
            }'
        - lang: python
          label: Python
          source: >-
            import shippo

            from shippo.models import components


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



            res =
            s.carrier_accounts.create(request=components.ConnectExistingOwnAccountRequest(
                account_id='321123',
                carrier='fedex',
                metadata='FEDEX Account',
                parameters=components.FedExConnectExistingOwnAccountParameters(
                    first_name='Loyal',
                    last_name='Collier',
                    phone_number='(890) 307-8579',
                    from_address_st='<value>',
                    from_address_city='<value>',
                    from_address_state='<value>',
                    from_address_zip='<value>',
                    from_address_country_iso2='<value>',
                    use_multi_factor_registration=True,
                    verification_option='SMS',
                ),
                test=False,
            ))


            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.carrierAccounts.create({
                accountId: "321123",
                carrier: "fedex",
                metadata: "FEDEX Account",
                parameters: {
                  firstName: "Loyal",
                  lastName: "Collier",
                  phoneNumber: "(890) 307-8579",
                  fromAddressSt: "<value>",
                  fromAddressCity: "<value>",
                  fromAddressState: "<value>",
                  fromAddressZip: "<value>",
                  fromAddressCountryIso2: "<value>",
                  useMultiFactorRegistration: true,
                  verificationOption: "SMS",
                },
                test: false,
              });

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

            run();
        - lang: php
          label: PHP
          source: >-
            declare(strict_types=1);


            require 'vendor/autoload.php';


            use Shippo\API;

            use Shippo\API\Models\Components;


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

            $connectExistingOwnAccountRequest = new
            Components\ConnectExistingOwnAccountRequest(
                accountId: '321123',
                carrier: 'fedex',
                metadata: 'FEDEX Account',
                parameters: new Components\FedExConnectExistingOwnAccountParameters(
                    firstName: 'Loyal',
                    lastName: 'Collier',
                    phoneNumber: '(890) 307-8579',
                    fromAddressSt: '<value>',
                    fromAddressCity: '<value>',
                    fromAddressState: '<value>',
                    fromAddressZip: '<value>',
                    fromAddressCountryIso2: '<value>',
                    useMultiFactorRegistration: true,
                    verificationOption: 'SMS',
                ),
                test: false,
            );


            $response = $sdk->carrierAccounts->create(
                connectExistingOwnAccountRequest: $connectExistingOwnAccountRequest,
                shippoApiVersion: '2018-02-08'

            );


            if ($response->carrierAccount !== null) {
                // handle response
            }
        - lang: csharp
          label: C#
          source: |-
            using Shippo;
            using Shippo.Models.Components;

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

            var res = await sdk.CarrierAccounts.CreateAsync(
                connectExistingOwnAccountRequest: new ConnectExistingOwnAccountRequest() {
                    AccountId = "321123",
                    Carrier = "fedex",
                    Metadata = "FEDEX Account",
                    Parameters = ConnectExistingOwnAccountRequestParameters.CreateFedExConnectExistingOwnAccountParameters(
                        new FedExConnectExistingOwnAccountParameters() {
                            FirstName = "Loyal",
                            LastName = "Collier",
                            PhoneNumber = "(890) 307-8579",
                            FromAddressSt = "<value>",
                            FromAddressCity = "<value>",
                            FromAddressState = "<value>",
                            FromAddressZip = "<value>",
                            FromAddressCountryIso2 = "<value>",
                            UseMultiFactorRegistration = true,
                            VerificationOption = "SMS",
                        }
                    ),
                    Test = false,
                },
                shippoApiVersion: "2018-02-08"
            );

            // handle response
        - lang: java
          label: Java
          source: >-
            package hello.world;


            import com.goshippo.shippo_sdk.Shippo;

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

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

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

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

            import java.lang.Exception;


            public class Application {

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

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

                    CreateCarrierAccountResponse res = sdk.carrierAccounts().create()
                            .shippoApiVersion("2018-02-08")
                            .connectExistingOwnAccountRequest(ConnectExistingOwnAccountRequest.builder()
                                .accountId("321123")
                                .carrier("fedex")
                                .parameters(ConnectExistingOwnAccountRequestParameters.of(FedExConnectExistingOwnAccountParameters.builder()
                                    .firstName("Loyal")
                                    .lastName("Collier")
                                    .phoneNumber("(890) 307-8579")
                                    .fromAddressSt("<value>")
                                    .fromAddressCity("<value>")
                                    .fromAddressState("<value>")
                                    .fromAddressZip("<value>")
                                    .fromAddressCountryIso2("<value>")
                                    .useMultiFactorRegistration(true)
                                    .verificationOption("SMS")
                                    .build()))
                                .metadata("FEDEX Account")
                                .test(false)
                                .build())
                            .call();

                    if (res.carrierAccount().isPresent()) {
                        // handle response
                    }
                }
            }
  /carrier_accounts/{CarrierAccountId}:
    get:
      description: Returns an existing carrier account using an object ID.
      operationId: GetCarrierAccount
      parameters:
        - description: Object ID of the carrier account
          in: path
          name: CarrierAccountId
          required: true
          schema:
            type: string
        - $ref: '#/components/parameters/ShippoApiVersionHeader'
      responses:
        '200':
          $ref: '#/components/responses/carrierAccountResponse'
        '400':
          $ref: '#/components/responses/badRequestResponse'
      summary: Retrieve a carrier account
      tags:
        - Carrier Accounts
      x-codeSamples:
        - label: cURL
          lang: cURL
          source: >-
            curl
            https://api.goshippo.com/carrier_accounts/b741b99f95e841639b54272834bc478c
            \

            -H "Authorization: ShippoToken <API_TOKEN>"
        - lang: python
          label: Python
          source: |-
            import shippo

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


            res = s.carrier_accounts.get(carrier_account_id='<id>')

            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.carrierAccounts.get("<id>");

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

            run();
        - lang: php
          label: PHP
          source: |-
            declare(strict_types=1);

            require 'vendor/autoload.php';

            use Shippo\API;

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



            $response = $sdk->carrierAccounts->get(
                carrierAccountId: '<id>',
                shippoApiVersion: '2018-02-08'

            );

            if ($response->carrierAccount !== null) {
                // handle response
            }
        - lang: csharp
          label: C#
          source: |-
            using Shippo;
            using Shippo.Models.Components;

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

            var res = await sdk.CarrierAccounts.GetAsync(
                carrierAccountId: "<id>",
                shippoApiVersion: "2018-02-08"
            );

            // handle response
        - lang: java
          label: Java
          source: >-
            package hello.world;


            import com.goshippo.shippo_sdk.Shippo;

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

            import java.lang.Exception;


            public class Application {

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

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

                    GetCarrierAccountResponse res = sdk.carrierAccounts().get()
                            .carrierAccountId("<id>")
                            .shippoApiVersion("2018-02-08")
                            .call();

                    if (res.carrierAccount().isPresent()) {
                        // handle response
                    }
                }
            }
    put:
      description: >-
        Updates an existing carrier account object. The account_id and carrier
        can't be updated. This is because they form the unique identifier
        together.
      operationId: UpdateCarrierAccount
      parameters:
        - description: Object ID of the carrier account
          in: path
          name: CarrierAccountId
          required: true
          schema:
            type: string
        - $ref: '#/components/parameters/ShippoApiVersionHeader'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CarrierAccountUpdateRequest'
        description: Examples.
        x-examples:
          application/json:
            update-carrier-account:
              summary: Update a carrier account
              value:
                account_id: 123356
                active: true
                carrier: ups
                parameters: {}
      responses:
        '200':
          $ref: '#/components/responses/carrierAccountResponse'
        '400':
          $ref: '#/components/responses/badRequestResponse'
      summary: Update a carrier account
      tags:
        - Carrier Accounts
      x-codeSamples:
        - label: cURL
          lang: cURL
          source: >-
            curl
            https://api.goshippo.com/carrier_accounts/b741b99f95e841639b54272834bc478c/
            \

            -X PUT  \

            -H "Authorization: ShippoToken <API_TOKEN>" \

            -d parameters='{
                "meter": "123987"
            }'
        - lang: python
          label: Python
          source: >-
            import shippo

            from shippo.models import components


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



            res = s.carrier_accounts.update(carrier_account_id='<id>',
            carrier_account_base=components.CarrierAccountBase(
                account_id='****',
                carrier='usps',
                parameters=components.UPSConnectExistingOwnAccountParameters(
                    account_number='94567e',
                    aia_country_iso2='US',
                    billing_address_city='San Francisco',
                    billing_address_country_iso2='US',
                    billing_address_state='CA',
                    billing_address_street1='731 Market St',
                    billing_address_street2='STE 200',
                    billing_address_zip='94103',
                    collec_country_iso2='US',
                    collec_zip='94103',
                    company='Shippo',
                    currency_code='USD',
                    email='hippo@shippo.com',
                    full_name='Shippo Meister',
                    has_invoice=False,
                    invoice_controlid='1234',
                    invoice_date='20210529',
                    invoice_number='1112234',
                    invoice_value='11.23',
                    phone='1112223333',
                    title='Manager',
                    ups_agreements=True,
                ),
            ))


            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.carrierAccounts.update("<id>", {
                accountId: "****",
                carrier: "usps",
                parameters: {
                  accountNumber: "94567e",
                  aiaCountryIso2: "US",
                  billingAddressCity: "San Francisco",
                  billingAddressCountryIso2: "US",
                  billingAddressState: "CA",
                  billingAddressStreet1: "731 Market St",
                  billingAddressStreet2: "STE 200",
                  billingAddressZip: "94103",
                  collecCountryIso2: "US",
                  collecZip: "94103",
                  company: "Shippo",
                  currencyCode: "USD",
                  email: "hippo@shippo.com",
                  fullName: "Shippo Meister",
                  hasInvoice: false,
                  invoiceControlid: "1234",
                  invoiceDate: "20210529",
                  invoiceNumber: "1112234",
                  invoiceValue: "11.23",
                  phone: "1112223333",
                  title: "Manager",
                  upsAgreements: true,
                },
              });

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

            run();
        - lang: php
          label: PHP
          source: |-
            declare(strict_types=1);

            require 'vendor/autoload.php';

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

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

            $carrierAccountBase = new Components\CarrierAccountBase(
                accountId: '****',
                carrier: 'usps',
                parameters: new Components\UPSConnectExistingOwnAccountParameters(
                    accountNumber: '94567e',
                    aiaCountryIso2: 'US',
                    billingAddressCity: 'San Francisco',
                    billingAddressCountryIso2: 'US',
                    billingAddressState: 'CA',
                    billingAddressStreet1: '731 Market St',
                    billingAddressStreet2: 'STE 200',
                    billingAddressZip: '94103',
                    collecCountryIso2: 'US',
                    collecZip: '94103',
                    company: 'Shippo',
                    currencyCode: 'USD',
                    email: 'hippo@shippo.com',
                    fullName: 'Shippo Meister',
                    hasInvoice: false,
                    invoiceControlid: '1234',
                    invoiceDate: '20210529',
                    invoiceNumber: '1112234',
                    invoiceValue: '11.23',
                    phone: '1112223333',
                    title: 'Manager',
                    upsAgreements: false,
                ),
            );

            $response = $sdk->carrierAccounts->update(
                carrierAccountId: '<id>',
                shippoApiVersion: '2018-02-08',
                carrierAccountBase: $carrierAccountBase

            );

            if ($response->carrierAccount !== null) {
                // handle response
            }
        - lang: csharp
          label: C#
          source: |-
            using Shippo;
            using Shippo.Models.Components;

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

            var res = await sdk.CarrierAccounts.UpdateAsync(
                carrierAccountId: "<id>",
                shippoApiVersion: "2018-02-08",
                carrierAccountBase: new CarrierAccountBase() {
                    AccountId = "****",
                    Carrier = "usps",
                    Parameters = CarrierAccountBaseParameters.CreateUPSConnectExistingOwnAccountParameters(
                        new UPSConnectExistingOwnAccountParameters() {
                            AccountNumber = "94567e",
                            AiaCountryIso2 = "US",
                            BillingAddressCity = "San Francisco",
                            BillingAddressCountryIso2 = "US",
                            BillingAddressState = "CA",
                            BillingAddressStreet1 = "731 Market St",
                            BillingAddressStreet2 = "STE 200",
                            BillingAddressZip = "94103",
                            CollecCountryIso2 = "US",
                            CollecZip = "94103",
                            Company = "Shippo",
                            CurrencyCode = "USD",
                            Email = "hippo@shippo.com",
                            FullName = "Shippo Meister",
                            HasInvoice = false,
                            InvoiceControlid = "1234",
                            InvoiceDate = "20210529",
                            InvoiceNumber = "1112234",
                            InvoiceValue = "11.23",
                            Phone = "1112223333",
                            Title = "Manager",
                            UpsAgreements = false,
                        }
                    ),
                }
            );

            // handle response
        - lang: java
          label: Java
          source: >-
            package hello.world;


            import com.goshippo.shippo_sdk.Shippo;

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

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

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

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

            import java.lang.Exception;


            public class Application {

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

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

                    UpdateCarrierAccountResponse res = sdk.carrierAccounts().update()
                            .carrierAccountId("<id>")
                            .shippoApiVersion("2018-02-08")
                            .carrierAccountBase(CarrierAccountBase.builder()
                                .accountId("****")
                                .carrier("usps")
                                .parameters(CarrierAccountBaseParameters.of(UPSConnectExistingOwnAccountParameters.builder()
                                    .accountNumber("94567e")
                                    .billingAddressCity("San Francisco")
                                    .billingAddressCountryIso2("US")
                                    .billingAddressState("CA")
                                    .billingAddressStreet1("731 Market St")
                                    .billingAddressZip("94103")
                                    .collecCountryIso2("US")
                                    .collecZip("94103")
                                    .company("Shippo")
                                    .email("hippo@shippo.com")
                                    .fullName("Shippo Meister")
                                    .hasInvoice(false)
                                    .phone("1112223333")
                                    .title("Manager")
                                    .upsAgreements(true)
                                    .aiaCountryIso2("US")
                                    .billingAddressStreet2("STE 200")
                                    .currencyCode("USD")
                                    .invoiceControlid("1234")
                                    .invoiceDate("20210529")
                                    .invoiceNumber("1112234")
                                    .invoiceValue("11.23")
                                    .build()))
                                .build())
                            .call();

                    if (res.carrierAccount().isPresent()) {
                        // handle response
                    }
                }
            }
  /carrier_accounts/{CarrierAccountObjectId}/signin/initiate:
    get:
      description: >-
        Used by client applications to setup or reconnect an existing carrier
        account with carriers that support OAuth 2.0
      summary: Connect an existing carrier account using OAuth 2.0
      operationId: InitiateOauth2Signin
      parameters:
        - description: The carrier account ID (UUID) to start a signin process.
          in: path
          name: CarrierAccountObjectId
          required: true
          schema:
            type: string
        - description: >-
            Callback URL. The URL that tells the authorization server where to
            send the user back to after they approve the request.
          in: query
          name: redirect_uri
          required: true
          schema:
            type: string
            format: uri
        - description: >-
            A random string generated by the consuming application and included
            in the request to prevent CSRF attacks. The consuming application
            checks that the same value is returned after the user authorizes
            Shippo.
          in: query
          name: state
          required: false
          schema:
            type: string
        - $ref: '#/components/parameters/ShippoApiVersionHeader'
      responses:
        '302':
          description: >-
            Redirects the browser to the carrier login page, with the needed
            parameters
          headers:
            Location:
              description: >-
                Carrier login page URI, with the needed parameters set as query
                string
              schema:
                type: string
                format: uri
              example: >-
                https://www.ups.com/lasso/signin?client_id=testClientID&redirect_uri=https://client.example.com/cb&response_type=code&scope=read&type=ups_com_api
        '400':
          description: Invalid parameters provided by the user
          content:
            application/json:
              schema:
                properties:
                  title:
                    type: string
                    example: Missing required parameter
                  detail:
                    type: string
                    example: redirect_uri
        '401':
          description: >-
            Invalid ShippoToken or unsupported carrier account provided by the
            user
          content:
            application/json:
              schema:
                properties:
                  title:
                    type: string
                    example: Unsupported OAuth Carrier Account
                  detail:
                    type: string
                    example: >-
                      The carrier account 3c49f998b1234a2097ea0911a7e95bea does
                      not support OAuth authorization
        '404':
          description: Invalid carrier account provided by the user
          content:
            application/json:
              schema:
                properties:
                  title:
                    type: string
                    example: Carrier Account not found
                  detail:
                    type: string
                    example: >-
                      Carrier Account not found for object_id:
                      3c49f998b1234a2097ea0911a7e95bea
      x-codeSamples:
        - label: cURL
          lang: cURL
          source: >-
            curl
            "https://api.goshippo.com/carrier_accounts/2ccf5af209bb484cb20190d9cadbb61c/signin/initiate?redirect_uri=https://client.example.com/cb&state=SplxlOBeZQQYbYS6WxSbIA"
            \

            -H "Authorization: ShippoToken <API_TOKEN>"
        - lang: python
          label: Python
          source: >-
            import shippo


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



            res =
            s.carrier_accounts.initiate_oauth2_signin(carrier_account_object_id='<id>',
            redirect_uri='https://enlightened-mortise.com/')


            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.carrierAccounts.initiateOauth2Signin("<id>", "https://enlightened-mortise.com/");

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

            run();
        - lang: csharp
          label: C#
          source: >-
            using Shippo;

            using Shippo.Models.Components;

            using Shippo.Models.Requests;


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


            InitiateOauth2SigninRequest req = new InitiateOauth2SigninRequest()
            {
                CarrierAccountObjectId = "<id>",
                RedirectUri = "https://enlightened-mortise.com/",
            };


            var res = await sdk.CarrierAccounts.InitiateOauth2SigninAsync(req);


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

            require 'vendor/autoload.php';

            use Shippo\API;
            use Shippo\API\Models\Operations;

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

            $request = new Operations\InitiateOauth2SigninRequest(
                carrierAccountObjectId: '<id>',
                redirectUri: 'https://enlightened-mortise.com/',
            );

            $response = $sdk->carrierAccounts->initiateOauth2Signin(
                request: $request
            );

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


            import com.goshippo.shippo_sdk.Shippo;

            import
            com.goshippo.shippo_sdk.models.errors.InitiateOauth2SigninCarrierAccountsResponseBody;

            import
            com.goshippo.shippo_sdk.models.errors.InitiateOauth2SigninCarrierAccountsResponseResponseBody;

            import
            com.goshippo.shippo_sdk.models.errors.InitiateOauth2SigninResponseBody;

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

            import java.lang.Exception;


            public class Application {

                public static void main(String[] args) throws InitiateOauth2SigninResponseBody, InitiateOauth2SigninCarrierAccountsResponseResponseBody, InitiateOauth2SigninCarrierAccountsResponseBody, Exception {

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

                    InitiateOauth2SigninResponse res = sdk.carrierAccounts().initiateOauth2Signin()
                            .carrierAccountObjectId("<id>")
                            .redirectUri("https://enlightened-mortise.com/")
                            .state("Florida")
                            .shippoApiVersion("2018-02-08")
                            .call();

                    // handle response
                }
            }
      tags:
        - Carrier Accounts
  /carrier_accounts/register/new:
    post:
      description: Adds a Shippo carrier account
      operationId: RegisterCarrierAccount
      parameters:
        - $ref: '#/components/parameters/ShippoApiVersionHeader'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              oneOf:
                - $ref: '#/components/schemas/CarrierAccountCanadaPostCreateRequest'
                - $ref: '#/components/schemas/CarrierAccountChronopostCreateRequest'
                - $ref: '#/components/schemas/CarrierAccountColissimoCreateRequest'
                - $ref: '#/components/schemas/CarrierAccountCorreosCreateRequest'
                - $ref: '#/components/schemas/CarrierAccountDeutschePostCreateRequest'
                - $ref: '#/components/schemas/CarrierAccountDHLExpressCreateRequest'
                - $ref: '#/components/schemas/CarrierAccountDpdDeCreateRequest'
                - $ref: '#/components/schemas/CarrierAccountDPDUKCreateRequest'
                - $ref: '#/components/schemas/CarrierAccountFedExCreateRequest'
                - $ref: '#/components/schemas/CarrierAccountHermesUKCreateRequest'
                - $ref: '#/components/schemas/CarrierAccountMondialRelayCreateRequest'
                - $ref: >-
                    #/components/schemas/CarrierAccountPosteItalianeCreateRequest
                - $ref: '#/components/schemas/CarrierAccountUPSCreateRequest'
                - $ref: '#/components/schemas/CarrierAccountUSPSCreateRequest'
                - $ref: '#/components/schemas/CarrierAccountRoyalMailCreateRequest'
                - $ref: '#/components/schemas/CarrierAccountRoyalMailSfCreateRequest'
              discriminator:
                propertyName: carrier
                mapping:
                  canada_post: '#/components/schemas/CarrierAccountCanadaPostCreateRequest'
                  chronopost: '#/components/schemas/CarrierAccountChronopostCreateRequest'
                  colissimo: '#/components/schemas/CarrierAccountColissimoCreateRequest'
                  correos: '#/components/schemas/CarrierAccountCorreosCreateRequest'
                  deutsche_post: '#/components/schemas/CarrierAccountDeutschePostCreateRequest'
                  dhl_express: '#/components/schemas/CarrierAccountDHLExpressCreateRequest'
                  dpd_de: '#/components/schemas/CarrierAccountDpdDeCreateRequest'
                  dpd_uk: '#/components/schemas/CarrierAccountDPDUKCreateRequest'
                  fedex: '#/components/schemas/CarrierAccountFedExCreateRequest'
                  hermes_uk: '#/components/schemas/CarrierAccountHermesUKCreateRequest'
                  mondial_relay: '#/components/schemas/CarrierAccountMondialRelayCreateRequest'
                  poste_italiane: >-
                    #/components/schemas/CarrierAccountPosteItalianeCreateRequest
                  ups: '#/components/schemas/CarrierAccountUPSCreateRequest'
                  usps: '#/components/schemas/CarrierAccountUSPSCreateRequest'
                  royal_mail: '#/components/schemas/CarrierAccountRoyalMailCreateRequest'
                  royal_mail_sf: '#/components/schemas/CarrierAccountRoyalMailSfCreateRequest'
        description: The body of the request.
      responses:
        '201':
          $ref: '#/components/responses/carrierAccountResponse'
        '400':
          $ref: '#/components/responses/badRequestResponse'
      summary: Add a Shippo carrier account
      tags:
        - Carrier Accounts
      x-codeSamples:
        - label: CLI
          lang: cURL
          source: |-
            curl --location --request POST '/carrier_accounts/register/new' \
            --header 'Authorization: ShippoToken {{token}}' \
            --header 'Content-Type: application/json' \
            --data-raw '{
                "carrier": "canada_post",
                "parameters": {
                    "company": "Shippo",
                    "full_name": "Shippo Meister",
                    "email": "hippo@shippo.com",
                    "phone": "1112221122",
                    "canada_post_terms": true
                }
            }'
        - lang: python
          label: Python
          source: >-
            import shippo

            from shippo.models import components


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



            res =
            s.carrier_accounts.register(request=components.CarrierAccountCorreosCreateRequest(
                parameters=components.CarrierAccountCorreosCreateRequestParameters(),
            ))


            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.carrierAccounts.register({
                parameters: {},
              });

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

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

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

            var res = await sdk.CarrierAccounts.RegisterAsync(
                requestBody: RegisterCarrierAccountRequestBody.CreateCarrierAccountCorreosCreateRequest(
                    new CarrierAccountCorreosCreateRequest() {
                        Parameters = new CarrierAccountCorreosCreateRequestParameters() {},
                    }
                ),
                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;

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



            $response = $sdk->carrierAccounts->register(
                requestBody: new Components\CarrierAccountCorreosCreateRequest(
                    parameters: new Components\CarrierAccountCorreosCreateRequestParameters(),
                ),
                shippoApiVersion: '2018-02-08'

            );

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


            import com.goshippo.shippo_sdk.Shippo;

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

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

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

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

            import java.lang.Exception;


            public class Application {

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

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

                    RegisterCarrierAccountResponse res = sdk.carrierAccounts().register()
                            .shippoApiVersion("2018-02-08")
                            .requestBody(RegisterCarrierAccountRequestBody.of(CarrierAccountCorreosCreateRequest.builder()
                                .parameters(CarrierAccountCorreosCreateRequestParameters.builder()
                                    .build())
                                .build()))
                            .call();

                    if (res.carrierAccount().isPresent()) {
                        // handle response
                    }
                }
            }
      x-speakeasy-name-override: register
  /carrier_accounts/reg-status:
    get:
      description: >-
        Returns the registration status for the given account for the given
        carrier
      operationId: GetCarrierRegistrationStatus
      parameters:
        - in: query
          description: filter by specific carrier
          name: carrier
          required: true
          schema:
            type: string
            enum:
              - ups
              - usps
              - canada_post
        - $ref: '#/components/parameters/ShippoApiVersionHeader'
      responses:
        '200':
          $ref: '#/components/responses/carrierAccountRegistrationStatusResponse'
        '400':
          $ref: '#/components/responses/badRequestResponse'
      summary: Get Carrier Registration status
      tags:
        - Carrier Accounts
      x-speakeasy-name-override: getRegistrationStatus
      x-codeSamples:
        - lang: python
          label: Python
          source: >-
            import shippo

            from shippo.models import operations


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



            res =
            s.carrier_accounts.get_registration_status(carrier=operations.Carrier.USPS)


            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.carrierAccounts.getRegistrationStatus("usps");

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

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

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

            var res = await sdk.CarrierAccounts.GetRegistrationStatusAsync(
                carrier: Carrier.Usps,
                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\Operations;

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



            $response = $sdk->carrierAccounts->getRegistrationStatus(
                carrier: Operations\Carrier::Usps,
                shippoApiVersion: '2018-02-08'

            );

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


            import com.goshippo.shippo_sdk.Shippo;

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

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

            import java.lang.Exception;


            public class Application {

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

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

                    GetCarrierRegistrationStatusResponse res = sdk.carrierAccounts().getRegistrationStatus()
                            .carrier(Carrier.USPS)
                            .shippoApiVersion("2018-02-08")
                            .call();

                    if (res.carrierAccountRegistrationStatus().isPresent()) {
                        // handle response
                    }
                }
            }
  /customs/declarations:
    get:
      description: Returns a list of all customs declaration objects
      operationId: ListCustomsDeclarations
      parameters:
        - $ref: '#/components/parameters/PageNumberQueryParam'
        - $ref: '#/components/parameters/ResultsPerPageDefault5QueryParam'
        - $ref: '#/components/parameters/ShippoApiVersionHeader'
      responses:
        '200':
          $ref: '#/components/responses/customsDeclarationPaginatedResponse'
        '400':
          $ref: '#/components/responses/badRequestResponse'
      summary: List all customs declarations
      tags:
        - Customs Declarations
      x-codeSamples:
        - label: cURL
          lang: cURL
          source: |-
            curl https://api.goshippo.com/customs/declarations/ \
            -H "Authorization: ShippoToken <API_TOKEN>"
        - lang: python
          label: Python
          source: |-
            import shippo

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


            res = s.customs_declarations.list()

            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.customsDeclarations.list();

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

            run();
        - lang: php
          label: PHP
          source: |-
            declare(strict_types=1);

            require 'vendor/autoload.php';

            use Shippo\API;

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



            $response = $sdk->customsDeclarations->list(
                page: 1,
                results: 5,
                shippoApiVersion: '2018-02-08'

            );

            if ($response->customsDeclarationPaginatedList !== null) {
                // handle response
            }
        - lang: csharp
          label: C#
          source: |-
            using Shippo;
            using Shippo.Models.Components;

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

            var res = await sdk.CustomsDeclarations.ListAsync(
                page: 1,
                results: 5,
                shippoApiVersion: "2018-02-08"
            );

            // handle response
        - lang: java
          label: Java
          source: >-
            package hello.world;


            import com.goshippo.shippo_sdk.Shippo;

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

            import java.lang.Exception;


            public class Application {

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

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

                    ListCustomsDeclarationsResponse res = sdk.customsDeclarations().list()
                            .page(1L)
                            .results(5L)
                            .shippoApiVersion("2018-02-08")
                            .call();

                    if (res.customsDeclarationPaginatedList().isPresent()) {
                        // handle response
                    }
                }
            }
    post:
      description: Creates a new customs declaration object
      operationId: CreateCustomsDeclaration
      parameters:
        - $ref: '#/components/parameters/ShippoApiVersionHeader'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CustomsDeclarationCreateRequest'
        description: CustomsDeclaration details.
      responses:
        '201':
          $ref: '#/components/responses/customsDeclarationResponse'
        '400':
          $ref: '#/components/responses/badRequestResponse'
      summary: Create a new customs declaration
      tags:
        - Customs Declarations
      x-codeSamples:
        - label: cURL
          lang: cURL
          source: |-
            curl https://api.goshippo.com/customs/declarations/ \
            -H "Authorization: ShippoToken " \
            -H "Content-Type: application/json"  \
            -d '{          
                  "contents_type": "MERCHANDISE",
                  "non_delivery_option": "RETURN",
                  "certify": true,
                  "certify_signer": "Simon Kreuz",
                  "incoterm": "DDU",
                  "items": [{
                            "description": "T-shirt",
                            "quantity": 20,
                            "net_weight": "5",
                            "mass_unit": "lb",
                            "value_amount": "200",
                            "value_currency": "USD",
                            "tariff_number": "",
                            "origin_country": "US"
                    }]
            }'
        - lang: python
          label: Python
          source: >-
            import shippo

            from shippo.models import components


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



            res =
            s.customs_declarations.create(request=components.CustomsDeclarationCreateRequest(
                b13a_filing_option=components.CustomsDeclarationB13AFilingOptionEnum.FILED_ELECTRONICALLY,
                certify=True,
                certify_signer='Shawn Ippotle',
                contents_explanation='T-Shirt purchase',
                duties_payor=components.DutiesPayor(
                    account='2323434543',
                    type=components.CustomsDeclarationCreateRequestType.THIRD_PARTY,
                    address=components.CustomsDeclarationCreateRequestAddress(
                        name='Patrick Kavanagh',
                        zip='80331',
                        country='DE',
                    ),
                ),
                exporter_identification=components.CustomsExporterIdentification(
                    eori_number='PL123456790ABCDE',
                    tax_id=components.CustomsTaxIdentification(
                        number='123456789',
                        type=components.CustomsTaxIdentificationType.EIN,
                    ),
                ),
                invoice='#123123',
                metadata='Order ID #123123',
                address_importer=components.AddressImporter(
                    name='Shwan Ippotle',
                    company='Shippo',
                    street1='Blumenstraße',
                    street3='',
                    street_no='22',
                    city='München',
                    state='CA',
                    zip='80331',
                    country='DE',
                    phone='80331',
                    email='shippotle@shippo.com',
                    is_residential=True,
                ),
                contents_type=components.CustomsDeclarationContentsTypeEnum.MERCHANDISE,
                eel_pfc=components.CustomsDeclarationEelPfcEnum.NOEEI_30_37_A,
                incoterm=components.CustomsDeclarationIncotermEnum.DDP,
                items=[
                    components.CustomsItemCreateRequest(
                        description='T-Shirt',
                        mass_unit=components.WeightUnitEnum.LB,
                        metadata='Order ID "123454"',
                        net_weight='5',
                        origin_country='<value>',
                        quantity=20,
                        sku_code='HM-123',
                        hs_code='0901.21',
                        value_amount='200',
                        value_currency='USD',
                    ),
                ],
                non_delivery_option=components.CustomsDeclarationNonDeliveryOptionEnum.RETURN,
                test=True,
            ))


            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.customsDeclarations.create({
                b13aFilingOption: "FILED_ELECTRONICALLY",
                certify: true,
                certifySigner: "Shawn Ippotle",
                contentsExplanation: "T-Shirt purchase",
                dutiesPayor: {
                  account: "2323434543",
                  type: "THIRD_PARTY",
                  address: {
                    name: "Patrick Kavanagh",
                    zip: "80331",
                    country: "DE",
                  },
                },
                exporterIdentification: {
                  eoriNumber: "PL123456790ABCDE",
                  taxId: {
                    number: "123456789",
                    type: "EIN",
                  },
                },
                invoice: "#123123",
                metadata: "Order ID #123123",
                addressImporter: {
                  name: "Shwan Ippotle",
                  company: "Shippo",
                  street1: "Blumenstraße",
                  street3: "",
                  streetNo: "22",
                  city: "München",
                  state: "CA",
                  zip: "80331",
                  country: "DE",
                  phone: "80331",
                  email: "shippotle@shippo.com",
                  isResidential: true,
                },
                contentsType: "MERCHANDISE",
                eelPfc: "NOEEI_30_37_a",
                incoterm: "DDP",
                items: [
                  {
                    description: "T-Shirt",
                    massUnit: "lb",
                    metadata: "Order ID \"123454\"",
                    netWeight: "5",
                    originCountry: "<value>",
                    quantity: 20,
                    skuCode: "HM-123",
                    hsCode: "0901.21",
                    valueAmount: "200",
                    valueCurrency: "USD",
                  },
                ],
                nonDeliveryOption: "RETURN",
                test: true,
              });

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

            run();
        - lang: php
          label: PHP
          source: >-
            declare(strict_types=1);


            require 'vendor/autoload.php';


            use Shippo\API;

            use Shippo\API\Models\Components;


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

            $customsDeclarationCreateRequest = new
            Components\CustomsDeclarationCreateRequest(
                b13aFilingOption: Components\CustomsDeclarationB13AFilingOptionEnum::FiledElectronically,
                certify: true,
                certifySigner: 'Shawn Ippotle',
                contentsExplanation: 'T-Shirt purchase',
                dutiesPayor: new Components\DutiesPayor(
                    account: '2323434543',
                    type: Components\CustomsDeclarationCreateRequestType::ThirdParty,
                    address: new Components\CustomsDeclarationCreateRequestAddress(
                        name: 'Patrick Kavanagh',
                        zip: '80331',
                        country: 'DE',
                    ),
                ),
                exporterIdentification: new Components\CustomsExporterIdentification(
                    eoriNumber: 'PL123456790ABCDE',
                    taxId: new Components\CustomsTaxIdentification(
                        number: '123456789',
                        type: Components\CustomsTaxIdentificationType::Ein,
                    ),
                ),
                invoice: '#123123',
                metadata: 'Order ID #123123',
                addressImporter: new Components\AddressImporter(
                    name: 'Shwan Ippotle',
                    company: 'Shippo',
                    street1: 'Blumenstraße',
                    street3: '',
                    streetNo: '22',
                    city: 'München',
                    state: 'CA',
                    zip: '80331',
                    country: 'DE',
                    phone: '80331',
                    email: 'shippotle@shippo.com',
                    isResidential: true,
                ),
                contentsType: Components\CustomsDeclarationContentsTypeEnum::Merchandise,
                eelPfc: Components\CustomsDeclarationEelPfcEnum::NOEEI3037A,
                incoterm: Components\CustomsDeclarationIncotermEnum::Ddp,
                items: [
                    new Components\CustomsItemCreateRequest(
                        description: 'T-Shirt',
                        massUnit: Components\WeightUnitEnum::Lb,
                        metadata: 'Order ID "123454"',
                        netWeight: '5',
                        originCountry: '<value>',
                        quantity: 20,
                        skuCode: 'HM-123',
                        hsCode: '0901.21',
                        valueAmount: '200',
                        valueCurrency: 'USD',
                    ),
                ],
                nonDeliveryOption: Components\CustomsDeclarationNonDeliveryOptionEnum::Return,
                test: true,
            );


            $response = $sdk->customsDeclarations->create(
                customsDeclarationCreateRequest: $customsDeclarationCreateRequest,
                shippoApiVersion: '2018-02-08'

            );


            if ($response->customsDeclaration !== null) {
                // handle response
            }
        - lang: csharp
          label: C#
          source: |-
            using Shippo;
            using Shippo.Models.Components;
            using System.Collections.Generic;

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

            var res = await sdk.CustomsDeclarations.CreateAsync(
                customsDeclarationCreateRequest: new CustomsDeclarationCreateRequest() {
                    B13aFilingOption = CustomsDeclarationB13AFilingOptionEnum.FiledElectronically,
                    Certify = true,
                    CertifySigner = "Shawn Ippotle",
                    ContentsExplanation = "T-Shirt purchase",
                    DutiesPayor = new DutiesPayor() {
                        Account = "2323434543",
                        Type = CustomsDeclarationCreateRequestType.ThirdParty,
                        Address = new CustomsDeclarationCreateRequestAddress() {
                            Name = "Patrick Kavanagh",
                            Zip = "80331",
                            Country = "DE",
                        },
                    },
                    ExporterIdentification = new CustomsExporterIdentification() {
                        EoriNumber = "PL123456790ABCDE",
                        TaxId = new CustomsTaxIdentification() {
                            Number = "123456789",
                            Type = CustomsTaxIdentificationType.Ein,
                        },
                    },
                    Invoice = "#123123",
                    Metadata = "Order ID #123123",
                    AddressImporter = new AddressImporter() {
                        Name = "Shwan Ippotle",
                        Company = "Shippo",
                        Street1 = "Blumenstraße",
                        Street3 = "",
                        StreetNo = "22",
                        City = "München",
                        State = "CA",
                        Zip = "80331",
                        Country = "DE",
                        Phone = "80331",
                        Email = "shippotle@shippo.com",
                        IsResidential = true,
                    },
                    ContentsType = CustomsDeclarationContentsTypeEnum.Merchandise,
                    EelPfc = CustomsDeclarationEelPfcEnum.Noeei3037A,
                    Incoterm = CustomsDeclarationIncotermEnum.Ddp,
                    Items = new List<CustomsItemCreateRequest>() {
                        new CustomsItemCreateRequest() {
                            Description = "T-Shirt",
                            MassUnit = WeightUnitEnum.Lb,
                            Metadata = "Order ID \"123454\"",
                            NetWeight = "5",
                            OriginCountry = "<value>",
                            Quantity = 20,
                            SkuCode = "HM-123",
                            HsCode = "0901.21",
                            ValueAmount = "200",
                            ValueCurrency = "USD",
                        },
                    },
                    NonDeliveryOption = CustomsDeclarationNonDeliveryOptionEnum.Return,
                    Test = true,
                },
                shippoApiVersion: "2018-02-08"
            );

            // handle response
        - lang: java
          label: Java
          source: >-
            package hello.world;


            import com.goshippo.shippo_sdk.Shippo;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            import java.lang.Exception;

            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();

                    CreateCustomsDeclarationResponse res = sdk.customsDeclarations().create()
                            .shippoApiVersion("2018-02-08")
                            .customsDeclarationCreateRequest(CustomsDeclarationCreateRequest.builder()
                                .certify(true)
                                .certifySigner("Shawn Ippotle")
                                .contentsType(CustomsDeclarationContentsTypeEnum.MERCHANDISE)
                                .items(List.of(
                                    CustomsItemCreateRequest.builder()
                                        .description("T-Shirt")
                                        .massUnit(WeightUnitEnum.LB)
                                        .netWeight("5")
                                        .originCountry("<value>")
                                        .quantity(20L)
                                        .valueAmount("200")
                                        .valueCurrency("USD")
                                        .metadata("Order ID \"123454\"")
                                        .skuCode("HM-123")
                                        .hsCode("0901.21")
                                        .build()))
                                .nonDeliveryOption(CustomsDeclarationNonDeliveryOptionEnum.RETURN)
                                .b13aFilingOption(CustomsDeclarationB13AFilingOptionEnum.FILED_ELECTRONICALLY)
                                .contentsExplanation("T-Shirt purchase")
                                .dutiesPayor(DutiesPayor.builder()
                                    .account("2323434543")
                                    .type(CustomsDeclarationCreateRequestType.THIRD_PARTY)
                                    .address(CustomsDeclarationCreateRequestAddress.builder()
                                        .name("Patrick Kavanagh")
                                        .zip("80331")
                                        .country("DE")
                                        .build())
                                    .build())
                                .exporterIdentification(CustomsExporterIdentification.builder()
                                    .eoriNumber("PL123456790ABCDE")
                                    .taxId(CustomsTaxIdentification.builder()
                                        .number("123456789")
                                        .type(CustomsTaxIdentificationType.EIN)
                                        .build())
                                    .build())
                                .invoice("#123123")
                                .metadata("Order ID #123123")
                                .addressImporter(AddressImporter.builder()
                                    .name("Shwan Ippotle")
                                    .company("Shippo")
                                    .street1("Blumenstraße")
                                    .street3("")
                                    .streetNo("22")
                                    .city("München")
                                    .state("CA")
                                    .zip("80331")
                                    .country("DE")
                                    .phone("80331")
                                    .email("shippotle@shippo.com")
                                    .isResidential(true)
                                    .build())
                                .eelPfc(CustomsDeclarationEelPfcEnum.NOEEI3037_A)
                                .incoterm(CustomsDeclarationIncotermEnum.DDP)
                                .test(true)
                                .build())
                            .call();

                    if (res.customsDeclaration().isPresent()) {
                        // handle response
                    }
                }
            }
  /customs/declarations/{CustomsDeclarationId}:
    get:
      description: Returns an existing customs declaration using an object ID
      operationId: GetCustomsDeclaration
      parameters:
        - description: Object ID of the customs declaration
          in: path
          name: CustomsDeclarationId
          required: true
          schema:
            type: string
        - $ref: '#/components/parameters/PageNumberQueryParam'
        - $ref: '#/components/parameters/ShippoApiVersionHeader'
      responses:
        '200':
          $ref: '#/components/responses/customsDeclarationResponse'
        '400':
          $ref: '#/components/responses/badRequestResponse'
      summary: Retrieve a customs declaration
      tags:
        - Customs Declarations
      x-codeSamples:
        - label: cURL
          lang: cURL
          source: >-
            curl
            https://api.goshippo.com/customs/declarations/e2197a54da9d470480f4f8796cc419cb
            \

            -H "Authorization: ShippoToken <API_TOKEN>"
        - lang: python
          label: Python
          source: |-
            import shippo

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


            res = s.customs_declarations.get(customs_declaration_id='<id>')

            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.customsDeclarations.get("<id>");

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

            run();
        - lang: php
          label: PHP
          source: |-
            declare(strict_types=1);

            require 'vendor/autoload.php';

            use Shippo\API;

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



            $response = $sdk->customsDeclarations->get(
                customsDeclarationId: '<id>',
                page: 1,
                shippoApiVersion: '2018-02-08'

            );

            if ($response->customsDeclaration !== null) {
                // handle response
            }
        - lang: csharp
          label: C#
          source: |-
            using Shippo;
            using Shippo.Models.Components;

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

            var res = await sdk.CustomsDeclarations.GetAsync(
                customsDeclarationId: "<id>",
                page: 1,
                shippoApiVersion: "2018-02-08"
            );

            // handle response
        - lang: java
          label: Java
          source: >-
            package hello.world;


            import com.goshippo.shippo_sdk.Shippo;

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

            import java.lang.Exception;


            public class Application {

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

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

                    GetCustomsDeclarationResponse res = sdk.customsDeclarations().get()
                            .customsDeclarationId("<id>")
                            .page(1L)
                            .shippoApiVersion("2018-02-08")
                            .call();

                    if (res.customsDeclaration().isPresent()) {
                        // handle response
                    }
                }
            }
  /customs/items:
    get:
      description: Returns a list all customs items objects.
      operationId: ListCustomsItems
      parameters:
        - $ref: '#/components/parameters/PageNumberQueryParam'
        - $ref: '#/components/parameters/ResultsPerPageQueryParam'
        - $ref: '#/components/parameters/ShippoApiVersionHeader'
      responses:
        '200':
          $ref: '#/components/responses/customsItemPaginatedResponse'
        '400':
          $ref: '#/components/responses/badRequestResponse'
      summary: List all customs items
      tags:
        - Customs Items
      x-codeSamples:
        - label: cURL
          lang: cURL
          source: |-
            curl  https://api.goshippo.com/customs/items/ \
            -H "Authorization: ShippoToken <API_TOKEN>"
        - lang: python
          label: Python
          source: |-
            import shippo

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


            res = s.customs_items.list()

            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.customsItems.list();

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

            run();
        - lang: php
          label: PHP
          source: |-
            declare(strict_types=1);

            require 'vendor/autoload.php';

            use Shippo\API;

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



            $response = $sdk->customsItems->list(
                page: 1,
                results: 25,
                shippoApiVersion: '2018-02-08'

            );

            if ($response->customsItemPaginatedList !== null) {
                // handle response
            }
        - lang: csharp
          label: C#
          source: |-
            using Shippo;
            using Shippo.Models.Components;

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

            var res = await sdk.CustomsItems.ListAsync(
                page: 1,
                results: 25,
                shippoApiVersion: "2018-02-08"
            );

            // handle response
        - lang: java
          label: Java
          source: >-
            package hello.world;


            import com.goshippo.shippo_sdk.Shippo;

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

            import java.lang.Exception;


            public class Application {

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

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

                    ListCustomsItemsResponse res = sdk.customsItems().list()
                            .page(1L)
                            .results(25L)
                            .shippoApiVersion("2018-02-08")
                            .call();

                    if (res.customsItemPaginatedList().isPresent()) {
                        // handle response
                    }
                }
            }
    post:
      description: Creates a new customs item object.
      operationId: CreateCustomsItem
      parameters:
        - $ref: '#/components/parameters/ShippoApiVersionHeader'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CustomsItemCreateRequest'
        description: CustomsItem details.
      responses:
        '201':
          $ref: '#/components/responses/customsItemResponse'
        '400':
          $ref: '#/components/responses/badRequestResponse'
      summary: Create a new customs item
      tags:
        - Customs Items
      x-codeSamples:
        - label: cURL
          lang: cURL
          source: |-
            curl  https://api.goshippo.com/customs/items/ \
            -H "Authorization: ShippoToken <API_TOKEN>" \
            -d description="T-Shirt" \
            -d quantity=2 \
            -d net_weight="400" \
            -d mass_unit="g" \
            -d value_amount="20" \
            -d value_currency="USD" \
            -d tariff_number="" \
            -d origin_country="US" \
            -d metadata="Order ID '123123'"
        - lang: python
          label: Python
          source: >-
            import shippo

            from shippo.models import components


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



            res =
            s.customs_items.create(request=components.CustomsItemCreateRequest(
                description='T-Shirt',
                mass_unit=components.WeightUnitEnum.LB,
                metadata='Order ID "123454"',
                net_weight='5',
                origin_country='<value>',
                quantity=20,
                sku_code='HM-123',
                hs_code='0901.21',
                value_amount='200',
                value_currency='USD',
            ))


            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.customsItems.create({
                description: "T-Shirt",
                massUnit: "lb",
                metadata: "Order ID \"123454\"",
                netWeight: "5",
                originCountry: "<value>",
                quantity: 20,
                skuCode: "HM-123",
                hsCode: "0901.21",
                valueAmount: "200",
                valueCurrency: "USD",
              });

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

            run();
        - lang: php
          label: PHP
          source: |-
            declare(strict_types=1);

            require 'vendor/autoload.php';

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

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

            $customsItemCreateRequest = new Components\CustomsItemCreateRequest(
                description: 'T-Shirt',
                massUnit: Components\WeightUnitEnum::Lb,
                metadata: 'Order ID "123454"',
                netWeight: '5',
                originCountry: '<value>',
                quantity: 20,
                skuCode: 'HM-123',
                hsCode: '0901.21',
                valueAmount: '200',
                valueCurrency: 'USD',
            );

            $response = $sdk->customsItems->create(
                customsItemCreateRequest: $customsItemCreateRequest,
                shippoApiVersion: '2018-02-08'

            );

            if ($response->customsItem !== null) {
                // handle response
            }
        - lang: csharp
          label: C#
          source: |-
            using Shippo;
            using Shippo.Models.Components;

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

            var res = await sdk.CustomsItems.CreateAsync(
                customsItemCreateRequest: new CustomsItemCreateRequest() {
                    Description = "T-Shirt",
                    MassUnit = WeightUnitEnum.Lb,
                    Metadata = "Order ID \"123454\"",
                    NetWeight = "5",
                    OriginCountry = "<value>",
                    Quantity = 20,
                    SkuCode = "HM-123",
                    HsCode = "0901.21",
                    ValueAmount = "200",
                    ValueCurrency = "USD",
                },
                shippoApiVersion: "2018-02-08"
            );

            // handle response
        - lang: java
          label: Java
          source: >-
            package hello.world;


            import com.goshippo.shippo_sdk.Shippo;

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

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

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

            import java.lang.Exception;


            public class Application {

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

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

                    CreateCustomsItemResponse res = sdk.customsItems().create()
                            .shippoApiVersion("2018-02-08")
                            .customsItemCreateRequest(CustomsItemCreateRequest.builder()
                                .description("T-Shirt")
                                .massUnit(WeightUnitEnum.LB)
                                .netWeight("5")
                                .originCountry("<value>")
                                .quantity(20L)
                                .valueAmount("200")
                                .valueCurrency("USD")
                                .metadata("Order ID \"123454\"")
                                .skuCode("HM-123")
                                .hsCode("0901.21")
                                .build())
                            .call();

                    if (res.customsItem().isPresent()) {
                        // handle response
                    }
                }
            }
  /customs/items/{CustomsItemId}:
    get:
      description: Returns an existing customs item using an object ID
      operationId: GetCustomsItem
      parameters:
        - description: Object ID of the customs item
          in: path
          name: CustomsItemId
          required: true
          schema:
            type: string
        - $ref: '#/components/parameters/PageNumberQueryParam'
        - $ref: '#/components/parameters/ShippoApiVersionHeader'
      responses:
        '200':
          $ref: '#/components/responses/customsItemResponse'
        '400':
          $ref: '#/components/responses/badRequestResponse'
      summary: Retrieve a customs item
      tags:
        - Customs Items
      x-codeSamples:
        - label: cURL
          lang: cURL
          source: >-
            curl 
            https://api.goshippo.com/customs/items/55358464c7b740aca199b395536981bd
            \

            -H "Authorization: ShippoToken <API_TOKEN>"
        - lang: python
          label: Python
          source: |-
            import shippo

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


            res = s.customs_items.get(customs_item_id='<id>')

            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.customsItems.get("<id>");

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

            run();
        - lang: php
          label: PHP
          source: |-
            declare(strict_types=1);

            require 'vendor/autoload.php';

            use Shippo\API;

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



            $response = $sdk->customsItems->get(
                customsItemId: '<id>',
                page: 1,
                shippoApiVersion: '2018-02-08'

            );

            if ($response->customsItem !== null) {
                // handle response
            }
        - lang: csharp
          label: C#
          source: |-
            using Shippo;
            using Shippo.Models.Components;

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

            var res = await sdk.CustomsItems.GetAsync(
                customsItemId: "<id>",
                page: 1,
                shippoApiVersion: "2018-02-08"
            );

            // handle response
        - lang: java
          label: Java
          source: >-
            package hello.world;


            import com.goshippo.shippo_sdk.Shippo;

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

            import java.lang.Exception;


            public class Application {

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

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

                    GetCustomsItemResponse res = sdk.customsItems().get()
                            .customsItemId("<id>")
                            .page(1L)
                            .shippoApiVersion("2018-02-08")
                            .call();

                    if (res.customsItem().isPresent()) {
                        // handle response
                    }
                }
            }
  /live-rates:
    post:
      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'
      summary: Generate a live rates request
      tags:
        - Rates at Checkout
      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
                    }
                }
            }
  /live-rates/settings/parcel-template:
    get:
      description: >-
        Retrieve and display the currently configured default parcel template
        for live rates.
      operationId: GetDefaultParcelTemplate
      parameters:
        - $ref: '#/components/parameters/ShippoApiVersionHeader'
      responses:
        '200':
          $ref: '#/components/responses/defaultParcelTemplateResponse'
        '400':
          $ref: '#/components/responses/badRequestResponse'
      summary: Show current default parcel template
      tags:
        - Rates at Checkout
      x-codeSamples:
        - label: cURL
          lang: cURL
          source: |-
            curl https://api.goshippo.com/live-rates/settings/parcel-template \
              -H "Authorization: ShippoToken <API_TOKEN>" \
              -H "Content-Type: application/json"
        - lang: python
          label: Python
          source: >-
            import shippo

            from shippo.models import operations


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



            res =
            s.rates_at_checkout.get_default_parcel_template(request=operations.GetDefaultParcelTemplateRequest())


            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.getDefaultParcelTemplate({});

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

            run();
        - lang: csharp
          label: C#
          source: >-
            using Shippo;

            using Shippo.Models.Components;


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


            var res = await
            sdk.RatesAtCheckout.GetDefaultParcelTemplateAsync(shippoApiVersion:
            "2018-02-08");


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

            require 'vendor/autoload.php';

            use Shippo\API;

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



            $response = $sdk->ratesAtCheckout->getDefaultParcelTemplate(
                shippoApiVersion: '2018-02-08'
            );

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


            import com.goshippo.shippo_sdk.Shippo;

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

            import java.lang.Exception;


            public class Application {

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

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

                    GetDefaultParcelTemplateResponse res = sdk.ratesAtCheckout().getDefaultParcelTemplate()
                            .shippoApiVersion("2018-02-08")
                            .call();

                    if (res.defaultParcelTemplate().isPresent()) {
                        // handle response
                    }
                }
            }
      x-speakeasy-name-override: getDefaultParcelTemplate
    put:
      description: >-
        Update the currently configured default parcel template for live rates.
        The object_id in the request payload should identify the user parcel
        template to be the new default.
      operationId: UpdateDefaultParcelTemplate
      parameters:
        - $ref: '#/components/parameters/ShippoApiVersionHeader'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DefaultParcelTemplateUpdateRequest'
      responses:
        '200':
          $ref: '#/components/responses/defaultParcelTemplateResponse'
        '400':
          $ref: '#/components/responses/badRequestResponse'
      summary: Update default parcel template
      tags:
        - Rates at Checkout
      x-codeSamples:
        - label: cURL
          lang: cURL
          source: >-
            curl -X PUT
            https://api.goshippo.com/live-rates/settings/parcel-template \

            -H "Authorization: ShippoToken <API_TOKEN>" \

            -d '
              {
                "object_id": "b958d3690bb04bb8b2986724872750f5"
              }
            '
        - lang: python
          label: Python
          source: >-
            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.update_default_parcel_template(request=components.DefaultParcelTemplateUpdateRequest(
                object_id='b958d3690bb04bb8b2986724872750f5',
            ))


            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.updateDefaultParcelTemplate({
                objectId: "b958d3690bb04bb8b2986724872750f5",
              });

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

            run();
        - lang: csharp
          label: C#
          source: >-
            using Shippo;

            using Shippo.Models.Components;


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


            var res = await
            sdk.RatesAtCheckout.UpdateDefaultParcelTemplateAsync(
                shippoApiVersion: "2018-02-08",
                defaultParcelTemplateUpdateRequest: new DefaultParcelTemplateUpdateRequest() {
                    ObjectId = "b958d3690bb04bb8b2986724872750f5",
                }
            );


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


            require 'vendor/autoload.php';


            use Shippo\API;

            use Shippo\API\Models\Components;


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

            $defaultParcelTemplateUpdateRequest = new
            Components\DefaultParcelTemplateUpdateRequest(
                objectId: 'b958d3690bb04bb8b2986724872750f5',
            );


            $response = $sdk->ratesAtCheckout->updateDefaultParcelTemplate(
                shippoApiVersion: '2018-02-08',
                defaultParcelTemplateUpdateRequest: $defaultParcelTemplateUpdateRequest

            );


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


            import com.goshippo.shippo_sdk.Shippo;

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

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

            import java.lang.Exception;


            public class Application {

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

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

                    UpdateDefaultParcelTemplateResponse res = sdk.ratesAtCheckout().updateDefaultParcelTemplate()
                            .shippoApiVersion("2018-02-08")
                            .defaultParcelTemplateUpdateRequest(DefaultParcelTemplateUpdateRequest.builder()
                                .objectId("b958d3690bb04bb8b2986724872750f5")
                                .build())
                            .call();

                    if (res.defaultParcelTemplate().isPresent()) {
                        // handle response
                    }
                }
            }
      x-speakeasy-name-override: updateDefaultParcelTemplate
    delete:
      description: Clears the currently configured default parcel template for live rates.
      operationId: DeleteDefaultParcelTemplate
      parameters:
        - $ref: '#/components/parameters/ShippoApiVersionHeader'
      responses:
        '204':
          description: The parcel template was successfully deleted.
        '400':
          $ref: '#/components/responses/badRequestResponse'
      summary: Clear current default parcel template
      tags:
        - Rates at Checkout
      x-codeSamples:
        - label: cURL
          lang: cURL
          source: >-
            curl -X DELETE
            https://api.goshippo.com/live-rates/settings/parcel-template \

            -H "Authorization: ShippoToken <API_TOKEN>" \
        - lang: python
          label: Python
          source: >-
            import shippo

            from shippo.models import operations


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



            s.rates_at_checkout.delete_default_parcel_template(request=operations.DeleteDefaultParcelTemplateRequest())


            # Use the SDK ...
        - lang: typescript
          label: Typescript
          source: |-
            import { Shippo } from "shippo";

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

            async function run() {
              await shippo.ratesAtCheckout.deleteDefaultParcelTemplate({});


            }

            run();
        - lang: csharp
          label: C#
          source: >-
            using Shippo;

            using Shippo.Models.Components;


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


            await
            sdk.RatesAtCheckout.DeleteDefaultParcelTemplateAsync(shippoApiVersion:
            "2018-02-08");


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

            require 'vendor/autoload.php';

            use Shippo\API;

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



            $response = $sdk->ratesAtCheckout->deleteDefaultParcelTemplate(
                shippoApiVersion: '2018-02-08'
            );

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


            import com.goshippo.shippo_sdk.Shippo;

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

            import java.lang.Exception;


            public class Application {

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

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

                    DeleteDefaultParcelTemplateResponse res = sdk.ratesAtCheckout().deleteDefaultParcelTemplate()
                            .shippoApiVersion("2018-02-08")
                            .call();

                    // handle response
                }
            }
      x-speakeasy-name-override: deleteDefaultParcelTemplate
  /manifests:
    get:
      description: Returns a list of all manifest objects.
      operationId: ListManifests
      parameters:
        - $ref: '#/components/parameters/PageNumberQueryParam'
        - $ref: '#/components/parameters/ResultsPerPageDefault5QueryParam'
        - $ref: '#/components/parameters/ShippoApiVersionHeader'
      responses:
        '200':
          $ref: '#/components/responses/manifestPaginatedResponse'
        '400':
          $ref: '#/components/responses/badRequestResponse'
      summary: List all manifests
      tags:
        - Manifests
      x-codeSamples:
        - label: cURL
          lang: cURL
          source: |-
            curl https://api.goshippo.com/manifests/ \
            -H "Authorization: ShippoToken <API_TOKEN>"
        - lang: python
          label: Python
          source: |-
            import shippo

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


            res = s.manifests.list()

            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.manifests.list();

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

            run();
        - lang: php
          label: PHP
          source: |-
            declare(strict_types=1);

            require 'vendor/autoload.php';

            use Shippo\API;

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



            $response = $sdk->manifests->list(
                page: 1,
                results: 5,
                shippoApiVersion: '2018-02-08'

            );

            if ($response->manifestPaginatedList !== null) {
                // handle response
            }
        - lang: csharp
          label: C#
          source: |-
            using Shippo;
            using Shippo.Models.Components;

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

            var res = await sdk.Manifests.ListAsync(
                page: 1,
                results: 5,
                shippoApiVersion: "2018-02-08"
            );

            // handle response
        - lang: java
          label: Java
          source: >-
            package hello.world;


            import com.goshippo.shippo_sdk.Shippo;

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

            import java.lang.Exception;


            public class Application {

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

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

                    ListManifestsResponse res = sdk.manifests().list()
                            .page(1L)
                            .results(5L)
                            .shippoApiVersion("2018-02-08")
                            .call();

                    if (res.manifestPaginatedList().isPresent()) {
                        // handle response
                    }
                }
            }
    post:
      description: Creates a new manifest object.
      operationId: CreateManifest
      parameters:
        - $ref: '#/components/parameters/ShippoApiVersionHeader'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ManifestCreateRequest'
        description: Manifest details and contact info.
      responses:
        '201':
          $ref: '#/components/responses/manifestResponse'
        '400':
          $ref: '#/components/responses/badRequestResponse'
      summary: Create a new manifest
      tags:
        - Manifests
      x-codeSamples:
        - label: cURL
          lang: cURL
          source: >-
            curl https://api.goshippo.com/manifests/ \

            -H "Authorization: ShippoToken <API_TOKEN>" \

            -d carrier_account="b741b99f95e841639b54272834bc478c", \

            -d shipment_date="2014-05-16T23:59:59Z" \

            -d address_from="d799c2679e644279b59fe661ac8fa488" \

            -d transactions=["64bba01845ef40d29374032599f22588",
            "c169aa586a844cc49da00d0272b590e1"] \

            -d async=false
        - lang: python
          label: Python
          source: |-
            import shippo
            from shippo.models import components

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


            res = s.manifests.create(request=components.ManifestCreateRequest(
                carrier_account='adcfdddf8ec64b84ad22772bce3ea37a',
                shipment_date='2014-05-16T23:59:59Z',
                transactions=[
                    'adcfdddf8ec64b84ad22772bce3ea37a',
                ],
                address_from=components.AddressCreateRequest(
                    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,
                ),
            ))

            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.manifests.create({
                carrierAccount: "adcfdddf8ec64b84ad22772bce3ea37a",
                shipmentDate: "2014-05-16T23:59:59Z",
                transactions: [
                  "adcfdddf8ec64b84ad22772bce3ea37a",
                ],
                addressFrom: {
                  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,
                },
              });

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

            run();
        - lang: php
          label: PHP
          source: |-
            declare(strict_types=1);

            require 'vendor/autoload.php';

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

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

            $manifestCreateRequest = new Components\ManifestCreateRequest(
                carrierAccount: 'adcfdddf8ec64b84ad22772bce3ea37a',
                shipmentDate: '2014-05-16T23:59:59Z',
                transactions: [
                    'adcfdddf8ec64b84ad22772bce3ea37a',
                ],
                addressFrom: new Components\AddressCreateRequest(
                    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,
                ),
            );

            $response = $sdk->manifests->create(
                manifestCreateRequest: $manifestCreateRequest,
                shippoApiVersion: '2018-02-08'

            );

            if ($response->manifest !== null) {
                // handle response
            }
        - lang: csharp
          label: C#
          source: |-
            using Shippo;
            using Shippo.Models.Components;
            using System.Collections.Generic;

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

            var res = await sdk.Manifests.CreateAsync(
                manifestCreateRequest: new ManifestCreateRequest() {
                    CarrierAccount = "adcfdddf8ec64b84ad22772bce3ea37a",
                    ShipmentDate = "2014-05-16T23:59:59Z",
                    Transactions = new List<string>() {
                        "adcfdddf8ec64b84ad22772bce3ea37a",
                    },
                    AddressFrom = ManifestCreateRequestAddressFrom.CreateAddressCreateRequest(
                        new AddressCreateRequest() {
                            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,
                        }
                    ),
                },
                shippoApiVersion: "2018-02-08"
            );

            // handle response
        - lang: java
          label: Java
          source: >-
            package hello.world;


            import com.goshippo.shippo_sdk.Shippo;

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

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

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

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

            import java.lang.Exception;

            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();

                    CreateManifestResponse res = sdk.manifests().create()
                            .shippoApiVersion("2018-02-08")
                            .manifestCreateRequest(ManifestCreateRequest.builder()
                                .carrierAccount("adcfdddf8ec64b84ad22772bce3ea37a")
                                .shipmentDate("2014-05-16T23:59:59Z")
                                .addressFrom(ManifestCreateRequestAddressFrom.of(AddressCreateRequest.builder()
                                    .country("US")
                                    .name("Shwan Ippotle")
                                    .company("Shippo")
                                    .street1("215 Clayton St.")
                                    .street3("")
                                    .streetNo("")
                                    .city("San Francisco")
                                    .state("CA")
                                    .zip("94117")
                                    .phone("+1 555 341 9393")
                                    .email("shippotle@shippo.com")
                                    .isResidential(true)
                                    .metadata("Customer ID 123456")
                                    .validate(true)
                                    .build()))
                                .transactions(List.of(
                                    "adcfdddf8ec64b84ad22772bce3ea37a"))
                                .build())
                            .call();

                    if (res.manifest().isPresent()) {
                        // handle response
                    }
                }
            }
  /manifests/{ManifestId}:
    get:
      description: Returns an existing manifest using an object ID.
      operationId: GetManifest
      parameters:
        - description: Object ID of the manifest to update
          in: path
          name: ManifestId
          required: true
          schema:
            type: string
        - $ref: '#/components/parameters/ShippoApiVersionHeader'
      responses:
        '200':
          $ref: '#/components/responses/manifestResponse'
        '400':
          $ref: '#/components/responses/badRequestResponse'
      summary: Retrieve a manifest
      tags:
        - Manifests
      x-codeSamples:
        - label: cURL
          lang: cURL
          source: >-
            curl
            https://api.goshippo.com/manifests/0fadebf6f60c4aca95fa01bcc59c79ae
            \

            -H "Authorization: ShippoToken <API_TOKEN>"
        - lang: python
          label: Python
          source: |-
            import shippo

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


            res = s.manifests.get(manifest_id='<id>')

            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.manifests.get("<id>");

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

            run();
        - lang: php
          label: PHP
          source: |-
            declare(strict_types=1);

            require 'vendor/autoload.php';

            use Shippo\API;

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



            $response = $sdk->manifests->get(
                manifestId: '<id>',
                shippoApiVersion: '2018-02-08'

            );

            if ($response->manifest !== null) {
                // handle response
            }
        - lang: csharp
          label: C#
          source: |-
            using Shippo;
            using Shippo.Models.Components;

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

            var res = await sdk.Manifests.GetAsync(
                manifestId: "<id>",
                shippoApiVersion: "2018-02-08"
            );

            // handle response
        - lang: java
          label: Java
          source: >-
            package hello.world;


            import com.goshippo.shippo_sdk.Shippo;

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

            import java.lang.Exception;


            public class Application {

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

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

                    GetManifestResponse res = sdk.manifests().get()
                            .manifestId("<id>")
                            .shippoApiVersion("2018-02-08")
                            .call();

                    if (res.manifest().isPresent()) {
                        // handle response
                    }
                }
            }
  /orders:
    get:
      description: Returns a list of all order objects.
      operationId: ListOrders
      parameters:
        - $ref: '#/components/parameters/PageNumberQueryParam'
        - $ref: '#/components/parameters/ResultsPerPageQueryParam'
        - $ref: '#/components/parameters/ShippoApiVersionHeader'
        - description: Filter orders by order status
          in: query
          name: order_status[]
          required: false
          schema:
            items:
              $ref: '#/components/schemas/OrderStatusEnum'
            type: array
        - description: Filter orders by shop app
          in: query
          name: shop_app
          required: false
          schema:
            $ref: '#/components/schemas/OrderShopAppEnum'
        - description: >-
            Filter orders created after the input date and time (ISO 8601 UTC
            format).  This is based on the 

            `placed_at` field, meaning when the order has been placed, not when
            the order object was created.
          in: query
          name: start_date
          required: false
          schema:
            type: string
        - description: >-
            Filter orders created before the input date and time (ISO 8601 UTC
            format).  This is based on the 

            `placed_at` field, meaning when the order has been placed, not when
            the order object was created.
          in: query
          name: end_date
          required: false
          schema:
            type: string
      responses:
        '200':
          $ref: '#/components/responses/orderPaginatedResponse'
        '400':
          $ref: '#/components/responses/badRequestResponse'
      summary: List all orders
      tags:
        - Orders
      x-codeSamples:
        - label: cURL
          lang: cURL
          source: |-
            curl https://api.goshippo.com/orders/ \
            -H "Authorization: ShippoToken <API_TOKEN>"
        - lang: python
          label: Python
          source: |-
            import shippo
            from shippo.models import components, operations

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


            res = s.orders.list(request=operations.ListOrdersRequest(
                order_status=[
                    components.OrderStatusEnum.PAID,
                ],
                shop_app=components.OrderShopAppEnum.SHIPPO,
            ))

            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.orders.list({
                orderStatus: [
                  "PAID",
                ],
                shopApp: "Shippo",
              });

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

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

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

            ListOrdersRequest req = new ListOrdersRequest() {
                OrderStatus = new List<OrderStatusEnum>() {
                    OrderStatusEnum.Paid,
                },
                ShopApp = OrderShopAppEnum.Shippo,
            };

            var res = await sdk.Orders.ListAsync(req);

            // 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\Models\Operations;

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

            $request = new Operations\ListOrdersRequest(
                orderStatus: [
                    Components\OrderStatusEnum::Paid,
                ],
                shopApp: Components\OrderShopAppEnum::Shippo,
            );

            $response = $sdk->orders->list(
                request: $request
            );

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

            import com.goshippo.shippo_sdk.Shippo;
            import com.goshippo.shippo_sdk.models.components.OrderShopAppEnum;
            import com.goshippo.shippo_sdk.models.components.OrderStatusEnum;
            import com.goshippo.shippo_sdk.models.operations.ListOrdersRequest;
            import com.goshippo.shippo_sdk.models.operations.ListOrdersResponse;
            import java.lang.Exception;
            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();

                    ListOrdersRequest req = ListOrdersRequest.builder()
                            .orderStatus(List.of(
                                OrderStatusEnum.PAID))
                            .shopApp(OrderShopAppEnum.SHIPPO)
                            .build();

                    ListOrdersResponse res = sdk.orders().list()
                            .request(req)
                            .call();

                    if (res.orderPaginatedList().isPresent()) {
                        // handle response
                    }
                }
            }
    post:
      description: Creates a new order object.
      operationId: CreateOrder
      parameters:
        - $ref: '#/components/parameters/ShippoApiVersionHeader'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OrderCreateRequest'
        description: Order details.
      responses:
        '201':
          $ref: '#/components/responses/orderResponse'
        '400':
          $ref: '#/components/responses/badRequestResponse'
      summary: Create a new order
      tags:
        - Orders
      x-codeSamples:
        - label: cURL
          lang: cURL
          source: |-
            curl https://api.goshippo.com/orders/ \
            -H "Authorization: ShippoToken <API_TOKEN>" \
            -d '{
                    "to_address": {
                        "city": "San Francisco",
                        "company": "Shippo",
                        "country": "US",
                        "email": "shippotle@shippo.com",
                        "name": "Mr Hippo",
                        "phone": "15553419393",
                        "state": "CA",
                        "street1": "215 Clayton St.",
                        "zip": "94117"
                    },
                    "line_items": [
                        {
                            "quantity": 1,
                            "sku": "HM-123",
                            "title": "Hippo Magazines",
                            "total_price": "12.10",
                            "currency": "USD",
                            "weight": "0.40",
                            "weight_unit": "lb"
                        }
                    ],
                    "placed_at": "2016-09-23T01:28:12Z",
                    "order_number": "#1068",
                    "order_status": "PAID",
                    "shipping_cost": "12.83",
                    "shipping_cost_currency": "USD",
                    "shipping_method": "USPS First Class Package",
                    "subtotal_price": "12.10",
                    "total_price": "24.93",
                    "total_tax": "0.00",
                    "currency": "USD",
                    "weight": "0.40",
                    "weight_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.orders.create(request=components.OrderCreateRequest(
                currency='USD',
                notes='This customer is a VIP',
                order_number='#1068',
                order_status=components.OrderStatusEnum.PAID,
                placed_at='2016-09-23T01:28:12Z',
                shipping_cost='12.83',
                shipping_cost_currency='USD',
                shipping_method='USPS First Class Package',
                subtotal_price='12.1',
                total_price='24.93',
                total_tax='0.0',
                weight='0.4',
                weight_unit=components.WeightUnitEnum.LB,
                from_address=components.AddressCreateRequest(
                    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,
                ),
                to_address=components.AddressCreateRequest(
                    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.LineItemBase(
                        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,
                    ),
                ],
            ))

            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.orders.create({
                currency: "USD",
                notes: "This customer is a VIP",
                orderNumber: "#1068",
                orderStatus: "PAID",
                placedAt: "2016-09-23T01:28:12Z",
                shippingCost: "12.83",
                shippingCostCurrency: "USD",
                shippingMethod: "USPS First Class Package",
                subtotalPrice: "12.1",
                totalPrice: "24.93",
                totalTax: "0.0",
                weight: "0.4",
                weightUnit: "lb",
                fromAddress: {
                  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,
                },
                toAddress: {
                  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",
                  },
                ],
              });

              // 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.Orders.CreateAsync(
                orderCreateRequest: new OrderCreateRequest() {
                    Currency = "USD",
                    Notes = "This customer is a VIP",
                    OrderNumber = "#1068",
                    OrderStatus = OrderStatusEnum.Paid,
                    PlacedAt = "2016-09-23T01:28:12Z",
                    ShippingCost = "12.83",
                    ShippingCostCurrency = "USD",
                    ShippingMethod = "USPS First Class Package",
                    SubtotalPrice = "12.1",
                    TotalPrice = "24.93",
                    TotalTax = "0.0",
                    Weight = "0.4",
                    WeightUnit = WeightUnitEnum.Lb,
                    FromAddress = new AddressCreateRequest() {
                        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,
                    },
                    ToAddress = new AddressCreateRequest() {
                        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<LineItemBase>() {
                        new LineItemBase() {
                            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,
                        },
                    },
                },
                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();

            $orderCreateRequest = new Components\OrderCreateRequest(
                currency: 'USD',
                notes: 'This customer is a VIP',
                orderNumber: '#1068',
                orderStatus: Components\OrderStatusEnum::Paid,
                placedAt: '2016-09-23T01:28:12Z',
                shippingCost: '12.83',
                shippingCostCurrency: 'USD',
                shippingMethod: 'USPS First Class Package',
                subtotalPrice: '12.1',
                totalPrice: '24.93',
                totalTax: '0.0',
                weight: '0.4',
                weightUnit: Components\WeightUnitEnum::Lb,
                fromAddress: new Components\AddressCreateRequest(
                    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,
                ),
                toAddress: new Components\AddressCreateRequest(
                    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\LineItemBase(
                        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,
                    ),
                ],
            );

            $response = $sdk->orders->create(
                orderCreateRequest: $orderCreateRequest,
                shippoApiVersion: '2018-02-08'

            );

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


            import com.goshippo.shippo_sdk.Shippo;

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

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

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

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

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

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

            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();

                    CreateOrderResponse res = sdk.orders().create()
                            .shippoApiVersion("2018-02-08")
                            .orderCreateRequest(OrderCreateRequest.builder()
                                .placedAt("2016-09-23T01:28:12Z")
                                .toAddress(AddressCreateRequest.builder()
                                    .country("US")
                                    .name("Shwan Ippotle")
                                    .company("Shippo")
                                    .street1("215 Clayton St.")
                                    .street3("")
                                    .streetNo("")
                                    .city("San Francisco")
                                    .state("CA")
                                    .zip("94117")
                                    .phone("+1 555 341 9393")
                                    .email("shippotle@shippo.com")
                                    .isResidential(true)
                                    .metadata("Customer ID 123456")
                                    .validate(true)
                                    .build())
                                .currency("USD")
                                .notes("This customer is a VIP")
                                .orderNumber("#1068")
                                .orderStatus(OrderStatusEnum.PAID)
                                .shippingCost("12.83")
                                .shippingCostCurrency("USD")
                                .shippingMethod("USPS First Class Package")
                                .subtotalPrice("12.1")
                                .totalPrice("24.93")
                                .totalTax("0.0")
                                .weight("0.4")
                                .weightUnit(WeightUnitEnum.LB)
                                .fromAddress(AddressCreateRequest.builder()
                                    .country("US")
                                    .name("Shwan Ippotle")
                                    .company("Shippo")
                                    .street1("215 Clayton St.")
                                    .street3("")
                                    .streetNo("")
                                    .city("San Francisco")
                                    .state("CA")
                                    .zip("94117")
                                    .phone("+1 555 341 9393")
                                    .email("shippotle@shippo.com")
                                    .isResidential(true)
                                    .metadata("Customer ID 123456")
                                    .validate(true)
                                    .build())
                                .lineItems(List.of(
                                    LineItemBase.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)
                                        .build()))
                                .build())
                            .call();

                    if (res.order().isPresent()) {
                        // handle response
                    }
                }
            }
  /orders/{OrderId}:
    get:
      description: Retrieves an existing order using an object ID.
      operationId: GetOrder
      parameters:
        - description: Object ID of the order
          in: path
          name: OrderId
          required: true
          schema:
            type: string
        - $ref: '#/components/parameters/ShippoApiVersionHeader'
      responses:
        '200':
          $ref: '#/components/responses/orderResponse'
        '400':
          $ref: '#/components/responses/badRequestResponse'
      summary: Retrieve an order
      tags:
        - Orders
      x-codeSamples:
        - label: cURL
          lang: cURL
          source: >-
            curl
            https://api.goshippo.com/orders/4f2bc588e4e5446cb3f9fdb7cd5e190b/ \

            -H "Authorization: ShippoToken <API_TOKEN>"
        - lang: python
          label: Python
          source: |-
            import shippo

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


            res = s.orders.get(order_id='<id>')

            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.orders.get("<id>");

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

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

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

            var res = await sdk.Orders.GetAsync(
                orderId: "<id>",
                shippoApiVersion: "2018-02-08"
            );

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

            require 'vendor/autoload.php';

            use Shippo\API;

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



            $response = $sdk->orders->get(
                orderId: '<id>',
                shippoApiVersion: '2018-02-08'

            );

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

            import com.goshippo.shippo_sdk.Shippo;
            import com.goshippo.shippo_sdk.models.operations.GetOrderResponse;
            import java.lang.Exception;

            public class Application {

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

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

                    GetOrderResponse res = sdk.orders().get()
                            .orderId("<id>")
                            .shippoApiVersion("2018-02-08")
                            .call();

                    if (res.order().isPresent()) {
                        // handle response
                    }
                }
            }
  /parcel-templates:
    get:
      description: >-
        List all carrier parcel template objects. <br> Use the following query
        string params to filter the results as needed. <br>

        <ul>

        <li>`include=all` (the default). Includes templates from all carriers
        </li>

        <li>`include=user`. Includes templates only from carriers which the user
        has added (whether or not they're currently enabled) </li>

        <li>`include=enabled`. includes templates only for carriers which the
        user has added and enabled </li>

        <li>`carrier=*token*`. filter by specific carrier, e.g. fedex, usps
        </li>

        </ul>
      operationId: ListCarrierParcelTemplates
      parameters:
        - name: include
          description: filter by user or enabled
          in: query
          schema:
            type: string
            enum:
              - all
              - user
              - enabled
        - name: carrier
          description: filter by specific carrier
          example: fedex
          in: query
          schema:
            type: string
        - $ref: '#/components/parameters/ShippoApiVersionHeader'
      responses:
        '200':
          $ref: '#/components/responses/carrierParcelTemplateListResponse'
        '400':
          $ref: '#/components/responses/badRequestResponse'
      summary: List all carrier parcel templates
      tags:
        - Carrier Parcel Templates
      x-codeSamples:
        - label: cURL
          lang: cURL
          source: |-
            curl https://api.goshippo.com/parcel-templates  \
            -H "Authorization: ShippoToken <API_TOKEN>" \
            -H "Content-Type: application/json"
        - lang: python
          label: Python
          source: |-
            import shippo

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


            res = s.carrier_parcel_templates.list(carrier='fedex')

            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.carrierParcelTemplates.list("fedex");

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

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

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

            var res = await sdk.CarrierParcelTemplates.ListAsync(
                include: Include.Enabled,
                carrier: "fedex",
                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\Operations;

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



            $response = $sdk->carrierParcelTemplates->list(
                include: Operations\IncludeT::Enabled,
                carrier: 'fedex',
                shippoApiVersion: '2018-02-08'

            );

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


            import com.goshippo.shippo_sdk.Shippo;

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

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

            import java.lang.Exception;


            public class Application {

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

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

                    ListCarrierParcelTemplatesResponse res = sdk.carrierParcelTemplates().list()
                            .include(Include.ENABLED)
                            .carrier("fedex")
                            .shippoApiVersion("2018-02-08")
                            .call();

                    if (res.carrierParcelTemplateList().isPresent()) {
                        // handle response
                    }
                }
            }
  /parcel-templates/{CarrierParcelTemplateToken}:
    get:
      description: >-
        Fetches the parcel template information for a specific carrier parcel
        template, identified by the token.
      operationId: GetCarrierParcelTemplate
      parameters:
        - description: The unique string representation of the carrier parcel template
          in: path
          name: CarrierParcelTemplateToken
          required: true
          schema:
            type: string
        - $ref: '#/components/parameters/ShippoApiVersionHeader'
      responses:
        '200':
          $ref: '#/components/responses/carrierParcelTemplateResponse'
        '400':
          $ref: '#/components/responses/badRequestResponse'
      summary: Retrieve a carrier parcel templates
      tags:
        - Carrier Parcel Templates
      x-codeSamples:
        - label: cURL
          lang: cURL
          source: |-
            curl https://api.goshippo.com/parcel-templates/Fedex_Box_Small_1  \
            -H "Authorization: ShippoToken <API_TOKEN>" \
            -H "Content-Type: application/json"
        - lang: python
          label: Python
          source: >-
            import shippo


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



            res =
            s.carrier_parcel_templates.get(carrier_parcel_template_token='<value>')


            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.carrierParcelTemplates.get("<value>");

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

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

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

            var res = await sdk.CarrierParcelTemplates.GetAsync(
                carrierParcelTemplateToken: "<value>",
                shippoApiVersion: "2018-02-08"
            );

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

            require 'vendor/autoload.php';

            use Shippo\API;

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



            $response = $sdk->carrierParcelTemplates->get(
                carrierParcelTemplateToken: '<value>',
                shippoApiVersion: '2018-02-08'

            );

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


            import com.goshippo.shippo_sdk.Shippo;

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

            import java.lang.Exception;


            public class Application {

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

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

                    GetCarrierParcelTemplateResponse res = sdk.carrierParcelTemplates().get()
                            .carrierParcelTemplateToken("<value>")
                            .shippoApiVersion("2018-02-08")
                            .call();

                    if (res.carrierParcelTemplate().isPresent()) {
                        // handle response
                    }
                }
            }
  /parcels:
    get:
      description: Returns a list of all parcel objects.
      operationId: ListParcels
      parameters:
        - $ref: '#/components/parameters/PageNumberQueryParam'
        - $ref: '#/components/parameters/ResultsPerPageQueryParam'
        - $ref: '#/components/parameters/ShippoApiVersionHeader'
      responses:
        '200':
          $ref: '#/components/responses/parcelPaginatedResponse'
        '400':
          $ref: '#/components/responses/badRequestResponse'
      summary: List all parcels
      tags:
        - Parcels
      x-codeSamples:
        - label: cURL
          lang: cURL
          source: |-
            curl https://api.goshippo.com/parcels/ \
              -H "Authorization: ShippoToken <API_TOKEN>"
        - lang: python
          label: Python
          source: |-
            import shippo

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


            res = s.parcels.list()

            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.parcels.list();

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

            run();
        - lang: php
          label: PHP
          source: |-
            declare(strict_types=1);

            require 'vendor/autoload.php';

            use Shippo\API;

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



            $response = $sdk->parcels->list(
                page: 1,
                results: 25,
                shippoApiVersion: '2018-02-08'

            );

            if ($response->parcelPaginatedList !== null) {
                // handle response
            }
        - lang: csharp
          label: C#
          source: |-
            using Shippo;
            using Shippo.Models.Components;

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

            var res = await sdk.Parcels.ListAsync(
                page: 1,
                results: 25,
                shippoApiVersion: "2018-02-08"
            );

            // handle response
        - lang: java
          label: Java
          source: >-
            package hello.world;


            import com.goshippo.shippo_sdk.Shippo;

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

            import java.lang.Exception;


            public class Application {

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

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

                    ListParcelsResponse res = sdk.parcels().list()
                            .page(1L)
                            .results(25L)
                            .shippoApiVersion("2018-02-08")
                            .call();

                    if (res.parcelPaginatedList().isPresent()) {
                        // handle response
                    }
                }
            }
    post:
      description: Creates a new parcel object.
      operationId: CreateParcel
      parameters:
        - $ref: '#/components/parameters/ShippoApiVersionHeader'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              oneOf:
                - $ref: '#/components/schemas/ParcelCreateRequest'
                - $ref: '#/components/schemas/ParcelCreateFromTemplateRequest'
        description: Parcel details.
      responses:
        '201':
          $ref: '#/components/responses/parcelResponse'
        '400':
          $ref: '#/components/responses/badRequestResponse'
      summary: Create a new parcel
      tags:
        - Parcels
      x-codeSamples:
        - label: cURL
          lang: cURL
          source: |-
            curl https://api.goshippo.com/parcels/ \
              -H "Authorization: ShippoToken <API_TOKEN>" \
              -d length=5 \
              -d width=5 \
              -d height=5 \
              -d distance_unit="cm" \
              -d weight=2 \
              -d mass_unit="lb" \
              -d template="" \
              -d metadata="Customer ID 123456"
        - lang: python
          label: Python
          source: |-
            import shippo
            from shippo.models import components

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


            res = s.parcels.create(request=components.ParcelCreateRequest(
                extra=components.ParcelExtra(
                    cod=components.Cod(
                        amount='5.5',
                        currency='USD',
                        payment_method=components.PaymentMethod.CASH,
                    ),
                    insurance=components.ParcelInsurance(
                        amount='5.5',
                        content='Laptop',
                        currency='USD',
                        provider=components.ParcelInsuranceProvider.UPS,
                    ),
                ),
                metadata='Customer ID 123456',
                mass_unit=components.WeightUnitEnum.LB,
                weight='1',
                distance_unit=components.DistanceUnitEnum.IN,
                height='1',
                length='1',
                width='1',
            ))

            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.parcels.create({
                extra: {
                  cod: {
                    amount: "5.5",
                    currency: "USD",
                    paymentMethod: "CASH",
                  },
                  insurance: {
                    amount: "5.5",
                    content: "Laptop",
                    currency: "USD",
                    provider: "UPS",
                  },
                },
                metadata: "Customer ID 123456",
                massUnit: "lb",
                weight: "1",
                distanceUnit: "in",
                height: "1",
                length: "1",
                width: "1",
              });

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

            run();
        - lang: php
          label: PHP
          source: |-
            declare(strict_types=1);

            require 'vendor/autoload.php';

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

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



            $response = $sdk->parcels->create(
                requestBody: new Components\ParcelCreateRequest(
                    extra: new Components\ParcelExtra(
                        cod: new Components\Cod(
                            amount: '5.5',
                            currency: 'USD',
                            paymentMethod: Components\PaymentMethod::Cash,
                        ),
                        insurance: new Components\ParcelInsurance(
                            amount: '5.5',
                            content: 'Laptop',
                            currency: 'USD',
                            provider: Components\ParcelInsuranceProvider::Ups,
                        ),
                    ),
                    metadata: 'Customer ID 123456',
                    massUnit: Components\WeightUnitEnum::Lb,
                    weight: '1',
                    distanceUnit: Components\DistanceUnitEnum::In,
                    height: '1',
                    length: '1',
                    width: '1',
                ),
                shippoApiVersion: '2018-02-08'

            );

            if ($response->parcel !== null) {
                // handle response
            }
        - lang: csharp
          label: C#
          source: |-
            using Shippo;
            using Shippo.Models.Components;

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

            var res = await sdk.Parcels.CreateAsync(
                requestBody: CreateParcelRequestBody.CreateParcelCreateRequest(
                    new ParcelCreateRequest() {
                        Extra = new ParcelExtra() {
                            Cod = new Cod() {
                                Amount = "5.5",
                                Currency = "USD",
                                PaymentMethod = PaymentMethod.Cash,
                            },
                            Insurance = new ParcelInsurance() {
                                Amount = "5.5",
                                Content = "Laptop",
                                Currency = "USD",
                                Provider = ParcelInsuranceProvider.Ups,
                            },
                        },
                        Metadata = "Customer ID 123456",
                        MassUnit = WeightUnitEnum.Lb,
                        Weight = "1",
                        DistanceUnit = DistanceUnitEnum.In,
                        Height = "1",
                        Length = "1",
                        Width = "1",
                    }
                ),
                shippoApiVersion: "2018-02-08"
            );

            // handle response
        - lang: java
          label: Java
          source: >-
            package hello.world;


            import com.goshippo.shippo_sdk.Shippo;

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

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

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

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

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

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

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

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

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

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

            import java.lang.Exception;


            public class Application {

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

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

                    CreateParcelResponse res = sdk.parcels().create()
                            .shippoApiVersion("2018-02-08")
                            .requestBody(CreateParcelRequestBody.of(ParcelCreateRequest.builder()
                                .massUnit(WeightUnitEnum.LB)
                                .weight("1")
                                .distanceUnit(DistanceUnitEnum.IN)
                                .height("1")
                                .length("1")
                                .width("1")
                                .extra(ParcelExtra.builder()
                                    .cod(Cod.builder()
                                        .amount("5.5")
                                        .currency("USD")
                                        .paymentMethod(PaymentMethod.CASH)
                                        .build())
                                    .insurance(ParcelInsurance.builder()
                                        .amount("5.5")
                                        .content("Laptop")
                                        .currency("USD")
                                        .provider(ParcelInsuranceProvider.UPS)
                                        .build())
                                    .build())
                                .metadata("Customer ID 123456")
                                .build()))
                            .call();

                    if (res.parcel().isPresent()) {
                        // handle response
                    }
                }
            }
  /parcels/{ParcelId}:
    get:
      description: >-
        Returns parcel details using an existing parcel object ID (this will not
        return parcel details associated with un-purchased shipment/rate parcel
        object IDs).
      operationId: GetParcel
      parameters:
        - description: Object ID of the parcel
          in: path
          name: ParcelId
          required: true
          schema:
            type: string
        - $ref: '#/components/parameters/ShippoApiVersionHeader'
      responses:
        '200':
          $ref: '#/components/responses/parcelResponse'
        '400':
          $ref: '#/components/responses/badRequestResponse'
      summary: Retrieve an existing parcel
      tags:
        - Parcels
      x-codeSamples:
        - label: cURL
          lang: cURL
          source: >-
            curl
            https://api.goshippo.com/parcels/7df2ecf8b4224763ab7c71fae7ec8274/ \
              -H "Authorization: ShippoToken <API_TOKEN>"
        - lang: python
          label: Python
          source: |-
            import shippo

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


            res = s.parcels.get(parcel_id='<id>')

            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.parcels.get("<id>");

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

            run();
        - lang: php
          label: PHP
          source: |-
            declare(strict_types=1);

            require 'vendor/autoload.php';

            use Shippo\API;

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



            $response = $sdk->parcels->get(
                parcelId: '<id>',
                shippoApiVersion: '2018-02-08'

            );

            if ($response->parcel !== null) {
                // handle response
            }
        - lang: csharp
          label: C#
          source: |-
            using Shippo;
            using Shippo.Models.Components;

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

            var res = await sdk.Parcels.GetAsync(
                parcelId: "<id>",
                shippoApiVersion: "2018-02-08"
            );

            // handle response
        - lang: java
          label: Java
          source: |-
            package hello.world;

            import com.goshippo.shippo_sdk.Shippo;
            import com.goshippo.shippo_sdk.models.operations.GetParcelResponse;
            import java.lang.Exception;

            public class Application {

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

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

                    GetParcelResponse res = sdk.parcels().get()
                            .parcelId("<id>")
                            .shippoApiVersion("2018-02-08")
                            .call();

                    if (res.parcel().isPresent()) {
                        // handle response
                    }
                }
            }
  /pickups:
    post:
      description: >-
        Creates a pickup object. This request is for a carrier to come to a
        specified location to take a package for shipping.
      operationId: CreatePickup
      parameters:
        - $ref: '#/components/parameters/ShippoApiVersionHeader'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PickupCreateRequest'
        description: >-
          Shippo’s pickups endpoint allows you to schedule pickups with USPS and
          DHL Express for eligible shipments that you have already created.
      responses:
        '201':
          $ref: '#/components/responses/pickupResponse'
        '400':
          $ref: '#/components/responses/badRequestResponse'
      summary: Create a pickup
      tags:
        - Pickups
      x-codeSamples:
        - label: cURL
          lang: cURL
          source: |-
            curl https://api.goshippo.com/pickups/  \
            -H "Authorization: ShippoToken <API_TOKEN>" \
            -H "Content-Type: application/json"  \
            -d '{
                  "carrier_account":"6c51273296864869829b96a80fb13ea1",
                  "location":{
                          "building_location_type": "Other",
                          "building_type": "suite",
                          "instructions": "Behind screen door",
                          "address": {
                                  "name": "Mrs Hippo",
                                  "company": "Hungry Hippos",
                                  "street1": "965 Mission St #201",
                                  "city": "San Francisco",
                                  "state": "CA",
                                  "zip": "95122",
                                  "country": "US",
                                  "phone": "+14159876543",
                                  "email": "mrshippo@shippo.com"
                              }
                  },
                  "transactions": ["7439c279b374494c9a80ca24f59e6fc5"],
                  "requested_start_time":"2020-05-12T12:00:00Z",
                  "requested_end_time": "2020-05-12T16:00:00Z",
                  "metadata": "Customer ID 123456",
                  "is_test": false
                }'
        - 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.pickups.create(request=components.PickupBase(
                carrier_account='adcfdddf8ec64b84ad22772bce3ea37a',
                location=components.Location(
                    address=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,
                    ),
                    building_location_type=components.BuildingLocationType.FRONT_DOOR,
                    building_type=components.BuildingType.APARTMENT,
                    instructions='Behind screen door',
                ),
                requested_end_time=dateutil.parser.isoparse('2024-06-17T07:14:55.338Z'),
                requested_start_time=dateutil.parser.isoparse('2024-11-30T17:06:07.804Z'),
                transactions=[
                    'adcfdddf8ec64b84ad22772bce3ea37a',
                ],
            ))

            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.pickups.create({
                carrierAccount: "adcfdddf8ec64b84ad22772bce3ea37a",
                location: {
                  address: {
                    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,
                  },
                  buildingLocationType: "Front Door",
                  buildingType: "apartment",
                  instructions: "Behind screen door",
                },
                requestedEndTime: new Date("2024-06-17T07:14:55.338Z"),
                requestedStartTime: new Date("2024-11-30T17:06:07.804Z"),
                transactions: [
                  "adcfdddf8ec64b84ad22772bce3ea37a",
                ],
              });

              // 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.Pickups.CreateAsync(
                pickupBase: new PickupBase() {
                    CarrierAccount = "adcfdddf8ec64b84ad22772bce3ea37a",
                    Location = new Location() {
                        Address = 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,
                        },
                        BuildingLocationType = BuildingLocationType.FrontDoor,
                        BuildingType = BuildingType.Apartment,
                        Instructions = "Behind screen door",
                    },
                    RequestedEndTime = System.DateTime.Parse("2024-06-17T07:14:55.338Z"),
                    RequestedStartTime = System.DateTime.Parse("2024-11-30T17:06:07.804Z"),
                    Transactions = new List<string>() {
                        "adcfdddf8ec64b84ad22772bce3ea37a",
                    },
                },
                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();

            $pickupBase = new Components\PickupBase(
                carrierAccount: 'adcfdddf8ec64b84ad22772bce3ea37a',
                location: new Components\Location(
                    address: 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,
                    ),
                    buildingLocationType: Components\BuildingLocationType::FrontDoor,
                    buildingType: Components\BuildingType::Apartment,
                    instructions: 'Behind screen door',
                ),
                requestedEndTime: Utils\Utils::parseDateTime('2024-06-17T07:14:55.338Z'),
                requestedStartTime: Utils\Utils::parseDateTime('2024-11-30T17:06:07.804Z'),
                transactions: [
                    'adcfdddf8ec64b84ad22772bce3ea37a',
                ],
            );

            $response = $sdk->pickups->create(
                pickupBase: $pickupBase,
                shippoApiVersion: '2018-02-08'

            );

            if ($response->pickup !== 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.BuildingLocationType;

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

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

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

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

            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();

                    CreatePickupResponse res = sdk.pickups().create()
                            .shippoApiVersion("2018-02-08")
                            .pickupBase(PickupBase.builder()
                                .carrierAccount("adcfdddf8ec64b84ad22772bce3ea37a")
                                .location(Location.builder()
                                    .address(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())
                                    .buildingLocationType(BuildingLocationType.FRONT_DOOR)
                                    .buildingType(BuildingType.APARTMENT)
                                    .instructions("Behind screen door")
                                    .build())
                                .requestedEndTime(OffsetDateTime.parse("2024-06-17T07:14:55.338Z"))
                                .requestedStartTime(OffsetDateTime.parse("2024-11-30T17:06:07.804Z"))
                                .transactions(List.of(
                                    "adcfdddf8ec64b84ad22772bce3ea37a"))
                                .build())
                            .call();

                    if (res.pickup().isPresent()) {
                        // handle response
                    }
                }
            }
  /rates/{RateId}:
    get:
      description: >-
        Returns an existing rate using a rate object ID. Rates older than 390
        days are not returned.
      operationId: GetRate
      parameters:
        - description: Object ID of the rate
          in: path
          name: RateId
          required: true
          schema:
            type: string
        - $ref: '#/components/parameters/ShippoApiVersionHeader'
      responses:
        '200':
          $ref: '#/components/responses/rateResponse'
        '400':
          $ref: '#/components/responses/badRequestResponse'
      summary: Retrieve a rate
      tags:
        - Rates
      x-codeSamples:
        - label: cURL
          lang: cURL
          source: >-
            curl https://api.goshippo.com/rates/ee81fab0372e419ab52245c8952ccaeb
            \
              -H "Authorization: ShippoToken <API_TOKEN>"
        - lang: python
          label: Python
          source: |-
            import shippo

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


            res = s.rates.get(rate_id='<id>')

            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.rates.get("<id>");

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

            run();
        - lang: php
          label: PHP
          source: |-
            declare(strict_types=1);

            require 'vendor/autoload.php';

            use Shippo\API;

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



            $response = $sdk->rates->get(
                rateId: '<id>',
                shippoApiVersion: '2018-02-08'

            );

            if ($response->rate !== null) {
                // handle response
            }
        - lang: csharp
          label: C#
          source: |-
            using Shippo;
            using Shippo.Models.Components;

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

            var res = await sdk.Rates.GetAsync(
                rateId: "<id>",
                shippoApiVersion: "2018-02-08"
            );

            // handle response
        - lang: java
          label: Java
          source: |-
            package hello.world;

            import com.goshippo.shippo_sdk.Shippo;
            import com.goshippo.shippo_sdk.models.operations.GetRateResponse;
            import java.lang.Exception;

            public class Application {

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

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

                    GetRateResponse res = sdk.rates().get()
                            .rateId("<id>")
                            .shippoApiVersion("2018-02-08")
                            .call();

                    if (res.rate().isPresent()) {
                        // handle response
                    }
                }
            }
  /refunds:
    post:
      description: Creates a new refund object.
      operationId: CreateRefund
      parameters:
        - $ref: '#/components/parameters/ShippoApiVersionHeader'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RefundRequestBody'
        description: Refund details
      responses:
        '201':
          $ref: '#/components/responses/refundResponse'
        '400':
          $ref: '#/components/responses/badRequestResponse'
      summary: Create a refund
      tags:
        - Refunds
      x-codeSamples:
        - label: cURL
          lang: cURL
          source: |-
            curl  https://api.goshippo.com/refunds/ \
            -H "Authorization: ShippoToken <API_TOKEN>" \
            -d transaction="4503427478ea45a899e9b54abc4c5803"
        - lang: python
          label: Python
          source: |-
            import shippo
            from shippo.models import components

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


            res = s.refunds.create(request=components.RefundRequestBody(
                async_=False,
                transaction='915d94940ea54c3a80cbfa328722f5a1',
            ))

            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.refunds.create({
                async: false,
                transaction: "915d94940ea54c3a80cbfa328722f5a1",
              });

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

            run();
        - lang: php
          label: PHP
          source: |-
            declare(strict_types=1);

            require 'vendor/autoload.php';

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

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

            $refundRequestBody = new Components\RefundRequestBody(
                async: false,
                transaction: '915d94940ea54c3a80cbfa328722f5a1',
            );

            $response = $sdk->refunds->create(
                refundRequestBody: $refundRequestBody,
                shippoApiVersion: '2018-02-08'

            );

            if ($response->refund !== null) {
                // handle response
            }
        - lang: csharp
          label: C#
          source: |-
            using Shippo;
            using Shippo.Models.Components;

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

            var res = await sdk.Refunds.CreateAsync(
                refundRequestBody: new RefundRequestBody() {
                    Async = false,
                    Transaction = "915d94940ea54c3a80cbfa328722f5a1",
                },
                shippoApiVersion: "2018-02-08"
            );

            // handle response
        - lang: java
          label: Java
          source: >-
            package hello.world;


            import com.goshippo.shippo_sdk.Shippo;

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

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

            import java.lang.Exception;


            public class Application {

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

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

                    CreateRefundResponse res = sdk.refunds().create()
                            .shippoApiVersion("2018-02-08")
                            .refundRequestBody(RefundRequestBody.builder()
                                .transaction("915d94940ea54c3a80cbfa328722f5a1")
                                .async(false)
                                .build())
                            .call();

                    if (res.refund().isPresent()) {
                        // handle response
                    }
                }
            }
  /refunds/:
    get:
      description: Returns a list all refund objects.
      operationId: ListRefunds
      parameters:
        - $ref: '#/components/parameters/ShippoApiVersionHeader'
      responses:
        '200':
          $ref: '#/components/responses/refundPaginatedResponse'
        '400':
          $ref: '#/components/responses/badRequestResponse'
      summary: List all refunds
      tags:
        - Refunds
      x-codeSamples:
        - label: cURL
          lang: cURL
          source: |-
            curl https://api.goshippo.com/refunds/ \
                -H "Authorization: ShippoToken <API_TOKEN>"
        - lang: python
          label: Python
          source: |-
            import shippo
            from shippo.models import operations

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


            res = s.refunds.list(request=operations.ListRefundsRequest())

            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.refunds.list({});

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

            run();
        - lang: php
          label: PHP
          source: |-
            declare(strict_types=1);

            require 'vendor/autoload.php';

            use Shippo\API;

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



            $response = $sdk->refunds->list(
                shippoApiVersion: '2018-02-08'
            );

            if ($response->refundPaginatedList !== null) {
                // handle response
            }
        - lang: csharp
          label: C#
          source: >-
            using Shippo;

            using Shippo.Models.Components;


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


            var res = await sdk.Refunds.ListAsync(shippoApiVersion:
            "2018-02-08");


            // handle response
        - lang: java
          label: Java
          source: >-
            package hello.world;


            import com.goshippo.shippo_sdk.Shippo;

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

            import java.lang.Exception;


            public class Application {

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

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

                    ListRefundsResponse res = sdk.refunds().list()
                            .shippoApiVersion("2018-02-08")
                            .call();

                    if (res.refundPaginatedList().isPresent()) {
                        // handle response
                    }
                }
            }
  /refunds/{RefundId}:
    get:
      description: Returns an existing rate using a rate object ID.
      operationId: GetRefund
      parameters:
        - description: Object ID of the refund to update
          in: path
          name: RefundId
          required: true
          schema:
            type: string
        - $ref: '#/components/parameters/ShippoApiVersionHeader'
      responses:
        '200':
          $ref: '#/components/responses/refundResponse'
        '400':
          $ref: '#/components/responses/badRequestResponse'
      summary: Retrieve a refund
      tags:
        - Refunds
      x-codeSamples:
        - label: cURL
          lang: cURL
          source: >-
            curl
            https://api.goshippo.com/refunds/d7c811cff9e24e4387418876f1ffd371 \

            -H "Authorization: ShippoToken <API_TOKEN>"
        - lang: python
          label: Python
          source: |-
            import shippo

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


            res = s.refunds.get(refund_id='<id>')

            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.refunds.get("<id>");

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

            run();
        - lang: php
          label: PHP
          source: |-
            declare(strict_types=1);

            require 'vendor/autoload.php';

            use Shippo\API;

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



            $response = $sdk->refunds->get(
                refundId: '<id>',
                shippoApiVersion: '2018-02-08'

            );

            if ($response->refund !== null) {
                // handle response
            }
        - lang: csharp
          label: C#
          source: |-
            using Shippo;
            using Shippo.Models.Components;

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

            var res = await sdk.Refunds.GetAsync(
                refundId: "<id>",
                shippoApiVersion: "2018-02-08"
            );

            // handle response
        - lang: java
          label: Java
          source: |-
            package hello.world;

            import com.goshippo.shippo_sdk.Shippo;
            import com.goshippo.shippo_sdk.models.operations.GetRefundResponse;
            import java.lang.Exception;

            public class Application {

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

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

                    GetRefundResponse res = sdk.refunds().get()
                            .refundId("<id>")
                            .shippoApiVersion("2018-02-08")
                            .call();

                    if (res.refund().isPresent()) {
                        // handle response
                    }
                }
            }
  /service-groups:
    get:
      description: Returns a list of service group objects.
      operationId: ListServiceGroups
      parameters:
        - $ref: '#/components/parameters/ShippoApiVersionHeader'
      responses:
        '200':
          $ref: '#/components/responses/serviceGroupListResponse'
        '400':
          $ref: '#/components/responses/badRequestResponse'
      summary: List all service groups
      tags:
        - Service Groups
      x-codeSamples:
        - label: cURL
          lang: cURL
          source: |-
            curl https://api.goshippo.com/service-groups  \
              -H "Authorization: ShippoToken <API_TOKEN>" \
              -H "Content-Type: application/json"
        - lang: python
          label: Python
          source: >-
            import shippo

            from shippo.models import operations


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



            res =
            s.service_groups.list(request=operations.ListServiceGroupsRequest())


            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.serviceGroups.list({});

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

            run();
        - lang: csharp
          label: C#
          source: >-
            using Shippo;

            using Shippo.Models.Components;


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


            var res = await sdk.ServiceGroups.ListAsync(shippoApiVersion:
            "2018-02-08");


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

            require 'vendor/autoload.php';

            use Shippo\API;

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



            $response = $sdk->serviceGroups->list(
                shippoApiVersion: '2018-02-08'
            );

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


            import com.goshippo.shippo_sdk.Shippo;

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

            import java.lang.Exception;


            public class Application {

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

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

                    ListServiceGroupsResponse res = sdk.serviceGroups().list()
                            .shippoApiVersion("2018-02-08")
                            .call();

                    if (res.serviceGroupListResponse().isPresent()) {
                        // handle response
                    }
                }
            }
    post:
      description: Creates a new service group.
      operationId: CreateServiceGroup
      parameters:
        - $ref: '#/components/parameters/ShippoApiVersionHeader'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ServiceGroupCreateRequest'
      responses:
        '201':
          $ref: '#/components/responses/serviceGroupResponse'
        '400':
          $ref: '#/components/responses/badRequestResponse'
      summary: Create a new service group
      tags:
        - Service Groups
      x-codeSamples:
        - label: cURL
          lang: cURL
          source: |-
            curl -X POST https://api.goshippo.com/service-groups  \
            -H "Authorization: ShippoToken <API_TOKEN>" \
            -H "Content-Type: application/json"  \
            -d '{
                    "name": "UPS shipping",
                    "description": "UPS shipping options",
                    "flat_rate": "5",
                    "flat_rate_currency": "USD",
                    "type": "LIVE_RATE",
                    "rate_adjustment": 15,
                    "service_levels": [
                        {
                            "account_object_id": "80feb1633d4a43c898f0058506cfd82d",
                            "service_level_token": "ups_next_day_air_saver"
                        },
                        {
                            "account_object_id": "80feb1633d4a43c898f0058506cfd82d",
                            "service_level_token": "ups_ground"
                        }
                    ]
                }'
        - lang: python
          label: Python
          source: >-
            import shippo

            from shippo.models import components


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



            res =
            s.service_groups.create(request=components.ServiceGroupCreateRequest(
                description='USPS shipping options',
                flat_rate='5',
                flat_rate_currency='USD',
                free_shipping_threshold_currency='USD',
                free_shipping_threshold_min='5',
                name='USPS Shipping',
                rate_adjustment=15,
                type=components.ServiceGroupTypeEnum.FLAT_RATE,
                service_levels=[
                    components.ServiceGroupAccountAndServiceLevel(
                        account_object_id='80feb1633d4a43c898f0058506cfd82d',
                        service_level_token='ups_next_day_air_saver',
                    ),
                ],
            ))


            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.serviceGroups.create({
                description: "USPS shipping options",
                flatRate: "5",
                flatRateCurrency: "USD",
                freeShippingThresholdCurrency: "USD",
                freeShippingThresholdMin: "5",
                name: "USPS Shipping",
                rateAdjustment: 15,
                type: "FLAT_RATE",
                serviceLevels: [
                  {
                    accountObjectId: "80feb1633d4a43c898f0058506cfd82d",
                    serviceLevelToken: "ups_next_day_air_saver",
                  },
                ],
              });

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

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

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

            var res = await sdk.ServiceGroups.CreateAsync(
                serviceGroupCreateRequest: new ServiceGroupCreateRequest() {
                    Description = "USPS shipping options",
                    FlatRate = "5",
                    FlatRateCurrency = "USD",
                    FreeShippingThresholdCurrency = "USD",
                    FreeShippingThresholdMin = "5",
                    Name = "USPS Shipping",
                    RateAdjustment = 15,
                    Type = ServiceGroupTypeEnum.FlatRate,
                    ServiceLevels = new List<ServiceGroupAccountAndServiceLevel>() {
                        new ServiceGroupAccountAndServiceLevel() {
                            AccountObjectId = "80feb1633d4a43c898f0058506cfd82d",
                            ServiceLevelToken = "ups_next_day_air_saver",
                        },
                    },
                },
                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;


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

            $serviceGroupCreateRequest = new
            Components\ServiceGroupCreateRequest(
                description: 'USPS shipping options',
                flatRate: '5',
                flatRateCurrency: 'USD',
                freeShippingThresholdCurrency: 'USD',
                freeShippingThresholdMin: '5',
                name: 'USPS Shipping',
                rateAdjustment: 15,
                type: Components\ServiceGroupTypeEnum::FlatRate,
                serviceLevels: [
                    new Components\ServiceGroupAccountAndServiceLevel(
                        accountObjectId: '80feb1633d4a43c898f0058506cfd82d',
                        serviceLevelToken: 'ups_next_day_air_saver',
                    ),
                ],
            );


            $response = $sdk->serviceGroups->create(
                serviceGroupCreateRequest: $serviceGroupCreateRequest,
                shippoApiVersion: '2018-02-08'

            );


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


            import com.goshippo.shippo_sdk.Shippo;

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

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

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

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

            import java.lang.Exception;

            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();

                    CreateServiceGroupResponse res = sdk.serviceGroups().create()
                            .shippoApiVersion("2018-02-08")
                            .serviceGroupCreateRequest(ServiceGroupCreateRequest.builder()
                                .description("USPS shipping options")
                                .name("USPS Shipping")
                                .type(ServiceGroupTypeEnum.FLAT_RATE)
                                .serviceLevels(List.of(
                                    ServiceGroupAccountAndServiceLevel.builder()
                                        .accountObjectId("80feb1633d4a43c898f0058506cfd82d")
                                        .serviceLevelToken("ups_next_day_air_saver")
                                        .build()))
                                .flatRate("5")
                                .flatRateCurrency("USD")
                                .freeShippingThresholdCurrency("USD")
                                .freeShippingThresholdMin("5")
                                .rateAdjustment(15L)
                                .build())
                            .call();

                    if (res.serviceGroup().isPresent()) {
                        // handle response
                    }
                }
            }
    put:
      description: >-
        Updates an existing service group object. <br>The object_id cannot be
        updated as it is the unique identifier for the object.
      operationId: UpdateServiceGroup
      parameters:
        - $ref: '#/components/parameters/ShippoApiVersionHeader'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ServiceGroupUpdateRequest'
      responses:
        '200':
          $ref: '#/components/responses/serviceGroupResponse'
        '400':
          $ref: '#/components/responses/badRequestResponse'
      summary: Update an existing service group
      tags:
        - Service Groups
      x-codeSamples:
        - label: cURL
          lang: cURL
          source: |-
            curl -X PUT https://api.goshippo.com/service-groups  \
            -H "Authorization: ShippoToken <API_TOKEN>" \
            -H "Content-Type: application/json"  \
            -d '{
                    "object_id": "7552000a5f71473c9378e98fc7322c99",
                    "name": "UPS shipping",
                    "description": "UPS shipping options, updated",
                    "flat_rate": "20",
                    "flat_rate_currency": "USD",
                    "type": "LIVE_RATE",
                    "rate_adjustment": 15,
                    "service_levels": [
                        {
                            "account_object_id": "80feb1633d4a43c898f0058506cfd82d",
                            "service_level_token": "ups_next_day_air_saver"
                        },
                        {
                            "account_object_id": "80feb1633d4a43c898f0058506cfd82d",
                            "service_level_token": "ups_ground"
                        }
                    ]
                }'
        - lang: python
          label: Python
          source: >-
            import shippo

            from shippo.models import components


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



            res =
            s.service_groups.update(request=components.ServiceGroupUpdateRequest(
                description='USPS shipping options',
                flat_rate='5',
                flat_rate_currency='USD',
                free_shipping_threshold_currency='USD',
                free_shipping_threshold_min='5',
                name='USPS Shipping',
                rate_adjustment=15,
                type=components.ServiceGroupTypeEnum.FLAT_RATE,
                object_id='80feb1633d4a43c898f005850',
                is_active=True,
                service_levels=[
                    components.ServiceGroupAccountAndServiceLevel(
                        account_object_id='80feb1633d4a43c898f0058506cfd82d',
                        service_level_token='ups_next_day_air_saver',
                    ),
                    components.ServiceGroupAccountAndServiceLevel(
                        account_object_id='80feb1633d4a43c898f0058506cfd82d',
                        service_level_token='ups_next_day_air_saver',
                    ),
                    components.ServiceGroupAccountAndServiceLevel(
                        account_object_id='80feb1633d4a43c898f0058506cfd82d',
                        service_level_token='ups_next_day_air_saver',
                    ),
                ],
            ))


            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.serviceGroups.update({
                description: "USPS shipping options",
                flatRate: "5",
                flatRateCurrency: "USD",
                freeShippingThresholdCurrency: "USD",
                freeShippingThresholdMin: "5",
                name: "USPS Shipping",
                rateAdjustment: 15,
                type: "FLAT_RATE",
                objectId: "80feb1633d4a43c898f005850",
                isActive: true,
                serviceLevels: [
                  {
                    accountObjectId: "80feb1633d4a43c898f0058506cfd82d",
                    serviceLevelToken: "ups_next_day_air_saver",
                  },
                  {
                    accountObjectId: "80feb1633d4a43c898f0058506cfd82d",
                    serviceLevelToken: "ups_next_day_air_saver",
                  },
                  {
                    accountObjectId: "80feb1633d4a43c898f0058506cfd82d",
                    serviceLevelToken: "ups_next_day_air_saver",
                  },
                ],
              });

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

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

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

            var res = await sdk.ServiceGroups.UpdateAsync(
                shippoApiVersion: "2018-02-08",
                serviceGroupUpdateRequest: new ServiceGroupUpdateRequest() {
                    Description = "USPS shipping options",
                    FlatRate = "5",
                    FlatRateCurrency = "USD",
                    FreeShippingThresholdCurrency = "USD",
                    FreeShippingThresholdMin = "5",
                    Name = "USPS Shipping",
                    RateAdjustment = 15,
                    Type = ServiceGroupTypeEnum.FlatRate,
                    ObjectId = "80feb1633d4a43c898f005850",
                    IsActive = true,
                    ServiceLevels = new List<ServiceGroupAccountAndServiceLevel>() {
                        new ServiceGroupAccountAndServiceLevel() {
                            AccountObjectId = "80feb1633d4a43c898f0058506cfd82d",
                            ServiceLevelToken = "ups_next_day_air_saver",
                        },
                    },
                }
            );

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


            require 'vendor/autoload.php';


            use Shippo\API;

            use Shippo\API\Models\Components;


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

            $serviceGroupUpdateRequest = new
            Components\ServiceGroupUpdateRequest(
                description: 'USPS shipping options',
                flatRate: '5',
                flatRateCurrency: 'USD',
                freeShippingThresholdCurrency: 'USD',
                freeShippingThresholdMin: '5',
                name: 'USPS Shipping',
                rateAdjustment: 15,
                type: Components\ServiceGroupTypeEnum::FlatRate,
                objectId: '80feb1633d4a43c898f005850',
                isActive: true,
                serviceLevels: [
                    new Components\ServiceGroupAccountAndServiceLevel(
                        accountObjectId: '80feb1633d4a43c898f0058506cfd82d',
                        serviceLevelToken: 'ups_next_day_air_saver',
                    ),
                ],
            );


            $response = $sdk->serviceGroups->update(
                shippoApiVersion: '2018-02-08',
                serviceGroupUpdateRequest: $serviceGroupUpdateRequest

            );


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


            import com.goshippo.shippo_sdk.Shippo;

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

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

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

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

            import java.lang.Exception;

            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();

                    UpdateServiceGroupResponse res = sdk.serviceGroups().update()
                            .shippoApiVersion("2018-02-08")
                            .serviceGroupUpdateRequest(ServiceGroupUpdateRequest.builder()
                                .description("USPS shipping options")
                                .name("USPS Shipping")
                                .type(ServiceGroupTypeEnum.FLAT_RATE)
                                .objectId("80feb1633d4a43c898f005850")
                                .isActive(true)
                                .serviceLevels(List.of(
                                    ServiceGroupAccountAndServiceLevel.builder()
                                        .accountObjectId("80feb1633d4a43c898f0058506cfd82d")
                                        .serviceLevelToken("ups_next_day_air_saver")
                                        .build(),
                                    ServiceGroupAccountAndServiceLevel.builder()
                                        .accountObjectId("80feb1633d4a43c898f0058506cfd82d")
                                        .serviceLevelToken("ups_next_day_air_saver")
                                        .build(),
                                    ServiceGroupAccountAndServiceLevel.builder()
                                        .accountObjectId("80feb1633d4a43c898f0058506cfd82d")
                                        .serviceLevelToken("ups_next_day_air_saver")
                                        .build()))
                                .flatRate("5")
                                .flatRateCurrency("USD")
                                .freeShippingThresholdCurrency("USD")
                                .freeShippingThresholdMin("5")
                                .rateAdjustment(15L)
                                .build())
                            .call();

                    if (res.serviceGroup().isPresent()) {
                        // handle response
                    }
                }
            }
  /service-groups/{ServiceGroupId}:
    delete:
      description: Deletes an existing service group using an object ID.
      operationId: DeleteServiceGroup
      parameters:
        - description: Object ID of the service group
          in: path
          name: ServiceGroupId
          required: true
          schema:
            type: string
        - $ref: '#/components/parameters/ShippoApiVersionHeader'
      responses:
        '204':
          description: The service group was successfully deleted.
        '400':
          $ref: '#/components/responses/badRequestResponse'
      summary: Delete a service group
      tags:
        - Service Groups
      x-codeSamples:
        - label: cURL
          lang: cURL
          source: >-
            curl -x DELETE
            https://api.goshippo.com/service-groups/80feb1633d4a43c898f0058506cfd82d 
            \

            -H "Authorization: ShippoToken <API_TOKEN>" \
        - lang: python
          label: Python
          source: |-
            import shippo

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


            s.service_groups.delete(service_group_id='<id>')

            # Use the SDK ...
        - lang: typescript
          label: Typescript
          source: |-
            import { Shippo } from "shippo";

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

            async function run() {
              await shippo.serviceGroups.delete("<id>");


            }

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

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

            await sdk.ServiceGroups.DeleteAsync(
                serviceGroupId: "<id>",
                shippoApiVersion: "2018-02-08"
            );

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

            require 'vendor/autoload.php';

            use Shippo\API;

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



            $response = $sdk->serviceGroups->delete(
                serviceGroupId: '<id>',
                shippoApiVersion: '2018-02-08'

            );

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


            import com.goshippo.shippo_sdk.Shippo;

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

            import java.lang.Exception;


            public class Application {

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

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

                    DeleteServiceGroupResponse res = sdk.serviceGroups().delete()
                            .serviceGroupId("<id>")
                            .shippoApiVersion("2018-02-08")
                            .call();

                    // handle response
                }
            }
  /shipments:
    get:
      description: >-
        Returns a list of all shipment objects.<br><br>

        In order to filter results, you must use the below path parameters. 

        Provided dates should be ISO 8601 UTC dates (timezone offsets are
        currently not supported).<br><br>


        Optional path parameters:<br>
          `object_created_gt`- object(s) created greater than a provided date time<br>
          `object_created_gte` - object(s) created greater than or equal to a provided date time<br>
          `object_created_lt` - object(s) created less than a provided date time<br>
          `object_created_lte` - object(s) created less than or equal to a provided date time<br>

          Date format examples:<br>
            `2017-01-01`<br>
            `2017-01-01T03:30:30` or `2017-01-01T03:30:30.5`<br>
            `2017-01-01T03:30:30Z`<br><br>

          Example URL:<br>
            `https://api.goshippo.com/shipments/?object_created_gte=2017-01-01T00:00:30&object_created_lt=2017-04-01T00:00:30`<br><br>

        Note: Shipment objects older than 390 days are not returned.
      operationId: ListShipments
      parameters:
        - $ref: '#/components/parameters/PageTokenQueryParam'
        - $ref: '#/components/parameters/PageNumberQueryParam'
        - $ref: '#/components/parameters/ResultsPerPageQueryParam'
        - $ref: '#/components/parameters/ObjectCreatedGtQueryParam'
        - $ref: '#/components/parameters/ObjectCreatedGteQueryParam'
        - $ref: '#/components/parameters/ObjectCreatedLtQueryParam'
        - $ref: '#/components/parameters/ObjectCreatedLteQueryParam'
        - $ref: '#/components/parameters/ShippoApiVersionHeader'
      responses:
        '200':
          $ref: '#/components/responses/shipmentPaginatedResponse'
        '400':
          $ref: '#/components/responses/badRequestResponse'
      summary: List all shipments
      tags:
        - Shipments
      x-codeSamples:
        - label: cURL
          lang: cURL
          source: |-
            curl https://api.goshippo.com/shipments/ \
              -H "Authorization: ShippoToken <API_TOKEN>"
        - lang: python
          label: Python
          source: |-
            import shippo
            from shippo.models import operations

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


            res = s.shipments.list(request=operations.ListShipmentsRequest())

            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.shipments.list({});

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

            run();
        - lang: php
          label: PHP
          source: |-
            declare(strict_types=1);

            require 'vendor/autoload.php';

            use Shippo\API;
            use Shippo\API\Models\Operations;

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

            $request = new Operations\ListShipmentsRequest();

            $response = $sdk->shipments->list(
                request: $request
            );

            if ($response->shipmentPaginatedList !== null) {
                // handle response
            }
        - lang: csharp
          label: C#
          source: |-
            using Shippo;
            using Shippo.Models.Components;
            using Shippo.Models.Requests;

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

            ListShipmentsRequest req = new ListShipmentsRequest() {};

            var res = await sdk.Shipments.ListAsync(req);

            // handle response
        - lang: java
          label: Java
          source: >-
            package hello.world;


            import com.goshippo.shippo_sdk.Shippo;

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

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

            import java.lang.Exception;


            public class Application {

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

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

                    ListShipmentsRequest req = ListShipmentsRequest.builder()
                            .build();

                    ListShipmentsResponse res = sdk.shipments().list()
                            .request(req)
                            .call();

                    if (res.shipmentPaginatedList().isPresent()) {
                        // handle response
                    }
                }
            }
    post:
      description: Creates a new shipment object.
      operationId: CreateShipment
      parameters:
        - $ref: '#/components/parameters/ShippoApiVersionHeader'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ShipmentCreateRequest'
        description: Shipment details and contact info.
      responses:
        '201':
          $ref: '#/components/responses/shipmentResponse'
        '400':
          $ref: '#/components/responses/badRequestResponse'
      summary: Create a new shipment
      tags:
        - Shipments
      x-codeSamples:
        - label: cURL
          lang: cURL
          source: |-
            curl https://api.goshippo.com/shipments/ \
              -H "Authorization: ShippoToken <API_TOKEN>" \
              -H "Content-Type: application/json" \
              -d $'{
                  "address_to": {
                      "name": "Mr Hippo",
                      "street1": "965 Mission St #572",
                      "city": "San Francisco",
                      "state": "CA",
                      "zip": "94103",
                      "country": "US",
                      "phone": "4151234567",
                      "email": "mrhippo@shippo.com"
                  },
                  "address_from": {
                      "name": "Mrs Hippo",
                      "street1": "1092 Indian Summer Ct",
                      "city": "San Jose",
                      "state": "CA",
                      "zip": "95122",
                      "country": "US",
                      "phone": "4159876543",
                      "email": "mrshippo@shippo.com"
                  },
                  "parcels": [{
                      "length": "10",
                      "width": "15",
                      "height": "10",
                      "distance_unit": "in",
                      "weight": "1",
                      "mass_unit": "lb"
                  }],
                  "async": false
              }'
        - lang: python
          label: Python
          source: |-
            import shippo
            from shippo.models import components

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


            res = s.shipments.create(request=components.ShipmentCreateRequest(
                extra=components.ShipmentExtra(
                    accounts_receivable_customer_account=components.UPSReferenceFields(
                        prefix='ABC',
                        value='value',
                        ref_sort=1,
                    ),
                    appropriation_number=components.UPSReferenceFields(
                        prefix='ABC',
                        value='value',
                        ref_sort=1,
                    ),
                    bill_of_lading_number=components.UPSReferenceFields(
                        prefix='ABC',
                        value='value',
                        ref_sort=1,
                    ),
                    cod=components.Cod(
                        amount='5.5',
                        currency='USD',
                        payment_method=components.PaymentMethod.CASH,
                    ),
                    cod_number=components.UPSReferenceFields(
                        prefix='ABC',
                        value='value',
                        ref_sort=1,
                    ),
                    customer_reference=components.CustomerReference(
                        ref_sort=1,
                    ),
                    dealer_order_number=components.UPSReferenceFields(
                        prefix='ABC',
                        value='value',
                        ref_sort=1,
                    ),
                    dept_number=components.DepartmentNumber(
                        ref_sort=3,
                    ),
                    fda_product_code=components.UPSReferenceFields(
                        prefix='ABC',
                        value='value',
                        ref_sort=1,
                    ),
                    insurance=components.Insurance(
                        amount='5.5',
                        currency='USD',
                    ),
                    invoice_number=components.InvoiceNumber(
                        ref_sort=2,
                    ),
                    manifest_number=components.UPSReferenceFields(
                        prefix='ABC',
                        value='value',
                        ref_sort=1,
                    ),
                    model_number=components.UPSReferenceFields(
                        prefix='ABC',
                        value='value',
                        ref_sort=1,
                    ),
                    part_number=components.UPSReferenceFields(
                        prefix='ABC',
                        value='value',
                        ref_sort=1,
                    ),
                    po_number=components.PoNumber(
                        ref_sort=2,
                    ),
                    production_code=components.UPSReferenceFields(
                        prefix='ABC',
                        value='value',
                        ref_sort=1,
                    ),
                    purchase_request_number=components.UPSReferenceFields(
                        prefix='ABC',
                        value='value',
                        ref_sort=1,
                    ),
                    rma_number=components.RmaNumber(
                        ref_sort=1,
                    ),
                    salesperson_number=components.UPSReferenceFields(
                        prefix='ABC',
                        value='value',
                        ref_sort=1,
                    ),
                    serial_number=components.UPSReferenceFields(
                        prefix='ABC',
                        value='value',
                        ref_sort=1,
                    ),
                    store_number=components.UPSReferenceFields(
                        prefix='ABC',
                        value='value',
                        ref_sort=1,
                    ),
                    transaction_reference_number=components.UPSReferenceFields(
                        prefix='ABC',
                        value='value',
                        ref_sort=1,
                    ),
                ),
                metadata='Customer ID 123456',
                shipment_date='2021-03-22T12:00:00Z',
                address_from=components.AddressCreateRequest(
                    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,
                ),
                address_return='d799c2679e644279b59fe661ac8fa488',
                address_to=components.AddressCreateRequest(
                    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,
                ),
                customs_declaration=components.CustomsDeclarationCreateRequest(
                    b13a_filing_option=components.CustomsDeclarationB13AFilingOptionEnum.FILED_ELECTRONICALLY,
                    certify=True,
                    certify_signer='Shawn Ippotle',
                    contents_explanation='T-Shirt purchase',
                    duties_payor=components.DutiesPayor(
                        account='2323434543',
                        type=components.CustomsDeclarationCreateRequestType.THIRD_PARTY,
                        address=components.CustomsDeclarationCreateRequestAddress(
                            name='Patrick Kavanagh',
                            zip='80331',
                            country='DE',
                        ),
                    ),
                    exporter_identification=components.CustomsExporterIdentification(
                        eori_number='PL123456790ABCDE',
                        tax_id=components.CustomsTaxIdentification(
                            number='123456789',
                            type=components.CustomsTaxIdentificationType.EIN,
                        ),
                    ),
                    invoice='#123123',
                    metadata='Order ID #123123',
                    address_importer=components.AddressImporter(
                        name='Shwan Ippotle',
                        company='Shippo',
                        street1='Blumenstraße',
                        street3='',
                        street_no='22',
                        city='München',
                        state='CA',
                        zip='80331',
                        country='DE',
                        phone='80331',
                        email='shippotle@shippo.com',
                        is_residential=True,
                    ),
                    contents_type=components.CustomsDeclarationContentsTypeEnum.MERCHANDISE,
                    eel_pfc=components.CustomsDeclarationEelPfcEnum.NOEEI_30_37_A,
                    incoterm=components.CustomsDeclarationIncotermEnum.DDP,
                    items=[
                        components.CustomsItemCreateRequest(
                            description='T-Shirt',
                            mass_unit=components.WeightUnitEnum.LB,
                            metadata='Order ID "123454"',
                            net_weight='5',
                            origin_country='<value>',
                            quantity=20,
                            sku_code='HM-123',
                            hs_code='0901.21',
                            value_amount='200',
                            value_currency='USD',
                        ),
                    ],
                    non_delivery_option=components.CustomsDeclarationNonDeliveryOptionEnum.RETURN,
                    test=True,
                ),
                carrier_accounts=[
                    '065a4a8c10d24a34ab932163a1b87f52',
                    '73f706f4bdb94b54a337563840ce52b0',
                ],
                parcels=[
                    '<value>',
                    components.ParcelCreateRequest(
                        extra=components.ParcelExtra(
                            cod=components.Cod(
                                amount='5.5',
                                currency='USD',
                                payment_method=components.PaymentMethod.CASH,
                            ),
                            insurance=components.ParcelInsurance(
                                amount='5.5',
                                content='Laptop',
                                currency='USD',
                                provider=components.ParcelInsuranceProvider.UPS,
                            ),
                        ),
                        metadata='Customer ID 123456',
                        mass_unit=components.WeightUnitEnum.LB,
                        weight='1',
                        distance_unit=components.DistanceUnitEnum.IN,
                        height='1',
                        length='1',
                        width='1',
                    ),
                    components.ParcelCreateRequest(
                        extra=components.ParcelExtra(
                            cod=components.Cod(
                                amount='5.5',
                                currency='USD',
                                payment_method=components.PaymentMethod.CASH,
                            ),
                            insurance=components.ParcelInsurance(
                                amount='5.5',
                                content='Laptop',
                                currency='USD',
                                provider=components.ParcelInsuranceProvider.UPS,
                            ),
                        ),
                        metadata='Customer ID 123456',
                        mass_unit=components.WeightUnitEnum.LB,
                        weight='1',
                        distance_unit=components.DistanceUnitEnum.IN,
                        height='1',
                        length='1',
                        width='1',
                    ),
                ],
            ))

            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.shipments.create({
                extra: {
                  accountsReceivableCustomerAccount: {
                    prefix: "ABC",
                    value: "value",
                    refSort: 1,
                  },
                  appropriationNumber: {
                    prefix: "ABC",
                    value: "value",
                    refSort: 1,
                  },
                  billOfLadingNumber: {
                    prefix: "ABC",
                    value: "value",
                    refSort: 1,
                  },
                  cod: {
                    amount: "5.5",
                    currency: "USD",
                    paymentMethod: "CASH",
                  },
                  codNumber: {
                    prefix: "ABC",
                    value: "value",
                    refSort: 1,
                  },
                  customerReference: {
                    refSort: 1,
                  },
                  dealerOrderNumber: {
                    prefix: "ABC",
                    value: "value",
                    refSort: 1,
                  },
                  deptNumber: {
                    refSort: 3,
                  },
                  fdaProductCode: {
                    prefix: "ABC",
                    value: "value",
                    refSort: 1,
                  },
                  insurance: {
                    amount: "5.5",
                    currency: "USD",
                  },
                  invoiceNumber: {
                    refSort: 2,
                  },
                  manifestNumber: {
                    prefix: "ABC",
                    value: "value",
                    refSort: 1,
                  },
                  modelNumber: {
                    prefix: "ABC",
                    value: "value",
                    refSort: 1,
                  },
                  partNumber: {
                    prefix: "ABC",
                    value: "value",
                    refSort: 1,
                  },
                  poNumber: {
                    refSort: 2,
                  },
                  productionCode: {
                    prefix: "ABC",
                    value: "value",
                    refSort: 1,
                  },
                  purchaseRequestNumber: {
                    prefix: "ABC",
                    value: "value",
                    refSort: 1,
                  },
                  rmaNumber: {
                    refSort: 1,
                  },
                  salespersonNumber: {
                    prefix: "ABC",
                    value: "value",
                    refSort: 1,
                  },
                  serialNumber: {
                    prefix: "ABC",
                    value: "value",
                    refSort: 1,
                  },
                  storeNumber: {
                    prefix: "ABC",
                    value: "value",
                    refSort: 1,
                  },
                  transactionReferenceNumber: {
                    prefix: "ABC",
                    value: "value",
                    refSort: 1,
                  },
                },
                metadata: "Customer ID 123456",
                shipmentDate: "2021-03-22T12:00:00Z",
                addressFrom: {
                  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,
                },
                addressReturn: "d799c2679e644279b59fe661ac8fa488",
                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,
                },
                customsDeclaration: {
                  b13aFilingOption: "FILED_ELECTRONICALLY",
                  certify: true,
                  certifySigner: "Shawn Ippotle",
                  contentsExplanation: "T-Shirt purchase",
                  dutiesPayor: {
                    account: "2323434543",
                    type: "THIRD_PARTY",
                    address: {
                      name: "Patrick Kavanagh",
                      zip: "80331",
                      country: "DE",
                    },
                  },
                  exporterIdentification: {
                    eoriNumber: "PL123456790ABCDE",
                    taxId: {
                      number: "123456789",
                      type: "EIN",
                    },
                  },
                  invoice: "#123123",
                  metadata: "Order ID #123123",
                  addressImporter: {
                    name: "Shwan Ippotle",
                    company: "Shippo",
                    street1: "Blumenstraße",
                    street3: "",
                    streetNo: "22",
                    city: "München",
                    state: "CA",
                    zip: "80331",
                    country: "DE",
                    phone: "80331",
                    email: "shippotle@shippo.com",
                    isResidential: true,
                  },
                  contentsType: "MERCHANDISE",
                  eelPfc: "NOEEI_30_37_a",
                  incoterm: "DDP",
                  items: [
                    {
                      description: "T-Shirt",
                      massUnit: "lb",
                      metadata: "Order ID \"123454\"",
                      netWeight: "5",
                      originCountry: "<value>",
                      quantity: 20,
                      skuCode: "HM-123",
                      hsCode: "0901.21",
                      valueAmount: "200",
                      valueCurrency: "USD",
                    },
                  ],
                  nonDeliveryOption: "RETURN",
                  test: true,
                },
                carrierAccounts: [
                  "065a4a8c10d24a34ab932163a1b87f52",
                  "73f706f4bdb94b54a337563840ce52b0",
                ],
                parcels: [
                  "<value>",
                  {
                    extra: {
                      cod: {
                        amount: "5.5",
                        currency: "USD",
                        paymentMethod: "CASH",
                      },
                      insurance: {
                        amount: "5.5",
                        content: "Laptop",
                        currency: "USD",
                        provider: "UPS",
                      },
                    },
                    metadata: "Customer ID 123456",
                    massUnit: "lb",
                    weight: "1",
                    distanceUnit: "in",
                    height: "1",
                    length: "1",
                    width: "1",
                  },
                  {
                    extra: {
                      cod: {
                        amount: "5.5",
                        currency: "USD",
                        paymentMethod: "CASH",
                      },
                      insurance: {
                        amount: "5.5",
                        content: "Laptop",
                        currency: "USD",
                        provider: "UPS",
                      },
                    },
                    metadata: "Customer ID 123456",
                    massUnit: "lb",
                    weight: "1",
                    distanceUnit: "in",
                    height: "1",
                    length: "1",
                    width: "1",
                  },
                ],
              });

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

            run();
        - lang: php
          label: PHP
          source: |-
            declare(strict_types=1);

            require 'vendor/autoload.php';

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

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

            $shipmentCreateRequest = new Components\ShipmentCreateRequest(
                extra: new Components\ShipmentExtra(
                    accountsReceivableCustomerAccount: new Components\UPSReferenceFields(
                        prefix: 'ABC',
                        value: 'value',
                        refSort: 1,
                    ),
                    appropriationNumber: new Components\UPSReferenceFields(
                        prefix: 'ABC',
                        value: 'value',
                        refSort: 1,
                    ),
                    billOfLadingNumber: new Components\UPSReferenceFields(
                        prefix: 'ABC',
                        value: 'value',
                        refSort: 1,
                    ),
                    cod: new Components\Cod(
                        amount: '5.5',
                        currency: 'USD',
                        paymentMethod: Components\PaymentMethod::Cash,
                    ),
                    codNumber: new Components\UPSReferenceFields(
                        prefix: 'ABC',
                        value: 'value',
                        refSort: 1,
                    ),
                    customerReference: new Components\CustomerReference(
                        refSort: 1,
                    ),
                    dealerOrderNumber: new Components\UPSReferenceFields(
                        prefix: 'ABC',
                        value: 'value',
                        refSort: 1,
                    ),
                    deptNumber: new Components\DepartmentNumber(
                        refSort: 3,
                    ),
                    fdaProductCode: new Components\UPSReferenceFields(
                        prefix: 'ABC',
                        value: 'value',
                        refSort: 1,
                    ),
                    insurance: new Components\Insurance(
                        amount: '5.5',
                        currency: 'USD',
                    ),
                    invoiceNumber: new Components\InvoiceNumber(
                        refSort: 2,
                    ),
                    manifestNumber: new Components\UPSReferenceFields(
                        prefix: 'ABC',
                        value: 'value',
                        refSort: 1,
                    ),
                    modelNumber: new Components\UPSReferenceFields(
                        prefix: 'ABC',
                        value: 'value',
                        refSort: 1,
                    ),
                    partNumber: new Components\UPSReferenceFields(
                        prefix: 'ABC',
                        value: 'value',
                        refSort: 1,
                    ),
                    poNumber: new Components\PoNumber(
                        refSort: 2,
                    ),
                    productionCode: new Components\UPSReferenceFields(
                        prefix: 'ABC',
                        value: 'value',
                        refSort: 1,
                    ),
                    purchaseRequestNumber: new Components\UPSReferenceFields(
                        prefix: 'ABC',
                        value: 'value',
                        refSort: 1,
                    ),
                    rmaNumber: new Components\RmaNumber(
                        refSort: 1,
                    ),
                    salespersonNumber: new Components\UPSReferenceFields(
                        prefix: 'ABC',
                        value: 'value',
                        refSort: 1,
                    ),
                    serialNumber: new Components\UPSReferenceFields(
                        prefix: 'ABC',
                        value: 'value',
                        refSort: 1,
                    ),
                    storeNumber: new Components\UPSReferenceFields(
                        prefix: 'ABC',
                        value: 'value',
                        refSort: 1,
                    ),
                    transactionReferenceNumber: new Components\UPSReferenceFields(
                        prefix: 'ABC',
                        value: 'value',
                        refSort: 1,
                    ),
                ),
                metadata: 'Customer ID 123456',
                shipmentDate: '2021-03-22T12:00:00Z',
                addressFrom: new Components\AddressCreateRequest(
                    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,
                ),
                addressReturn: 'd799c2679e644279b59fe661ac8fa488',
                addressTo: new Components\AddressCreateRequest(
                    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,
                ),
                customsDeclaration: new Components\CustomsDeclarationCreateRequest(
                    b13aFilingOption: Components\CustomsDeclarationB13AFilingOptionEnum::FiledElectronically,
                    certify: true,
                    certifySigner: 'Shawn Ippotle',
                    contentsExplanation: 'T-Shirt purchase',
                    dutiesPayor: new Components\DutiesPayor(
                        account: '2323434543',
                        type: Components\CustomsDeclarationCreateRequestType::ThirdParty,
                        address: new Components\CustomsDeclarationCreateRequestAddress(
                            name: 'Patrick Kavanagh',
                            zip: '80331',
                            country: 'DE',
                        ),
                    ),
                    exporterIdentification: new Components\CustomsExporterIdentification(
                        eoriNumber: 'PL123456790ABCDE',
                        taxId: new Components\CustomsTaxIdentification(
                            number: '123456789',
                            type: Components\CustomsTaxIdentificationType::Ein,
                        ),
                    ),
                    invoice: '#123123',
                    metadata: 'Order ID #123123',
                    addressImporter: new Components\AddressImporter(
                        name: 'Shwan Ippotle',
                        company: 'Shippo',
                        street1: 'Blumenstraße',
                        street3: '',
                        streetNo: '22',
                        city: 'München',
                        state: 'CA',
                        zip: '80331',
                        country: 'DE',
                        phone: '80331',
                        email: 'shippotle@shippo.com',
                        isResidential: true,
                    ),
                    contentsType: Components\CustomsDeclarationContentsTypeEnum::Merchandise,
                    eelPfc: Components\CustomsDeclarationEelPfcEnum::NOEEI3037A,
                    incoterm: Components\CustomsDeclarationIncotermEnum::Ddp,
                    items: [
                        new Components\CustomsItemCreateRequest(
                            description: 'T-Shirt',
                            massUnit: Components\WeightUnitEnum::Lb,
                            metadata: 'Order ID "123454"',
                            netWeight: '5',
                            originCountry: '<value>',
                            quantity: 20,
                            skuCode: 'HM-123',
                            hsCode: '0901.21',
                            valueAmount: '200',
                            valueCurrency: 'USD',
                        ),
                    ],
                    nonDeliveryOption: Components\CustomsDeclarationNonDeliveryOptionEnum::Return,
                    test: true,
                ),
                carrierAccounts: [
                    '065a4a8c10d24a34ab932163a1b87f52',
                    '73f706f4bdb94b54a337563840ce52b0',
                ],
                parcels: [
                    new Components\ParcelCreateRequest(
                        extra: new Components\ParcelExtra(
                            cod: new Components\Cod(
                                amount: '5.5',
                                currency: 'USD',
                                paymentMethod: Components\PaymentMethod::Cash,
                            ),
                            insurance: new Components\ParcelInsurance(
                                amount: '5.5',
                                content: 'Laptop',
                                currency: 'USD',
                                provider: Components\ParcelInsuranceProvider::Ups,
                            ),
                        ),
                        metadata: 'Customer ID 123456',
                        massUnit: Components\WeightUnitEnum::Lb,
                        weight: '1',
                        distanceUnit: Components\DistanceUnitEnum::In,
                        height: '1',
                        length: '1',
                        width: '1',
                    ),
                ],
            );

            $response = $sdk->shipments->create(
                shipmentCreateRequest: $shipmentCreateRequest,
                shippoApiVersion: '2018-02-08'

            );

            if ($response->shipment !== null) {
                // handle response
            }
        - lang: csharp
          label: C#
          source: |-
            using Shippo;
            using Shippo.Models.Components;
            using System.Collections.Generic;

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

            var res = await sdk.Shipments.CreateAsync(
                shipmentCreateRequest: new ShipmentCreateRequest() {
                    Extra = new ShipmentExtra() {
                        AccountsReceivableCustomerAccount = new UPSReferenceFields() {
                            Prefix = "ABC",
                            Value = "value",
                            RefSort = 1,
                        },
                        AppropriationNumber = new UPSReferenceFields() {
                            Prefix = "ABC",
                            Value = "value",
                            RefSort = 1,
                        },
                        BillOfLadingNumber = new UPSReferenceFields() {
                            Prefix = "ABC",
                            Value = "value",
                            RefSort = 1,
                        },
                        Cod = new Cod() {
                            Amount = "5.5",
                            Currency = "USD",
                            PaymentMethod = PaymentMethod.Cash,
                        },
                        CodNumber = new UPSReferenceFields() {
                            Prefix = "ABC",
                            Value = "value",
                            RefSort = 1,
                        },
                        CustomerReference = new CustomerReference() {
                            RefSort = 1,
                        },
                        DealerOrderNumber = new UPSReferenceFields() {
                            Prefix = "ABC",
                            Value = "value",
                            RefSort = 1,
                        },
                        DeptNumber = new DepartmentNumber() {
                            RefSort = 3,
                        },
                        FdaProductCode = new UPSReferenceFields() {
                            Prefix = "ABC",
                            Value = "value",
                            RefSort = 1,
                        },
                        Insurance = new Insurance() {
                            Amount = "5.5",
                            Currency = "USD",
                        },
                        InvoiceNumber = new InvoiceNumber() {
                            RefSort = 2,
                        },
                        ManifestNumber = new UPSReferenceFields() {
                            Prefix = "ABC",
                            Value = "value",
                            RefSort = 1,
                        },
                        ModelNumber = new UPSReferenceFields() {
                            Prefix = "ABC",
                            Value = "value",
                            RefSort = 1,
                        },
                        PartNumber = new UPSReferenceFields() {
                            Prefix = "ABC",
                            Value = "value",
                            RefSort = 1,
                        },
                        PoNumber = new PoNumber() {
                            RefSort = 2,
                        },
                        ProductionCode = new UPSReferenceFields() {
                            Prefix = "ABC",
                            Value = "value",
                            RefSort = 1,
                        },
                        PurchaseRequestNumber = new UPSReferenceFields() {
                            Prefix = "ABC",
                            Value = "value",
                            RefSort = 1,
                        },
                        RmaNumber = new RmaNumber() {
                            RefSort = 1,
                        },
                        SalespersonNumber = new UPSReferenceFields() {
                            Prefix = "ABC",
                            Value = "value",
                            RefSort = 1,
                        },
                        SerialNumber = new UPSReferenceFields() {
                            Prefix = "ABC",
                            Value = "value",
                            RefSort = 1,
                        },
                        StoreNumber = new UPSReferenceFields() {
                            Prefix = "ABC",
                            Value = "value",
                            RefSort = 1,
                        },
                        TransactionReferenceNumber = new UPSReferenceFields() {
                            Prefix = "ABC",
                            Value = "value",
                            RefSort = 1,
                        },
                    },
                    Metadata = "Customer ID 123456",
                    ShipmentDate = "2021-03-22T12:00:00Z",
                    AddressFrom = AddressFrom.CreateAddressCreateRequest(
                        new AddressCreateRequest() {
                            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,
                        }
                    ),
                    AddressReturn = AddressReturn.CreateStr(
                        "d799c2679e644279b59fe661ac8fa488"
                    ),
                    AddressTo = AddressTo.CreateAddressCreateRequest(
                        new AddressCreateRequest() {
                            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,
                        }
                    ),
                    CustomsDeclaration = ShipmentCreateRequestCustomsDeclaration.CreateCustomsDeclarationCreateRequest(
                        new CustomsDeclarationCreateRequest() {
                            B13aFilingOption = CustomsDeclarationB13AFilingOptionEnum.FiledElectronically,
                            Certify = true,
                            CertifySigner = "Shawn Ippotle",
                            ContentsExplanation = "T-Shirt purchase",
                            DutiesPayor = new DutiesPayor() {
                                Account = "2323434543",
                                Type = CustomsDeclarationCreateRequestType.ThirdParty,
                                Address = new CustomsDeclarationCreateRequestAddress() {
                                    Name = "Patrick Kavanagh",
                                    Zip = "80331",
                                    Country = "DE",
                                },
                            },
                            ExporterIdentification = new CustomsExporterIdentification() {
                                EoriNumber = "PL123456790ABCDE",
                                TaxId = new CustomsTaxIdentification() {
                                    Number = "123456789",
                                    Type = CustomsTaxIdentificationType.Ein,
                                },
                            },
                            Invoice = "#123123",
                            Metadata = "Order ID #123123",
                            AddressImporter = new AddressImporter() {
                                Name = "Shwan Ippotle",
                                Company = "Shippo",
                                Street1 = "Blumenstraße",
                                Street3 = "",
                                StreetNo = "22",
                                City = "München",
                                State = "CA",
                                Zip = "80331",
                                Country = "DE",
                                Phone = "80331",
                                Email = "shippotle@shippo.com",
                                IsResidential = true,
                            },
                            ContentsType = CustomsDeclarationContentsTypeEnum.Merchandise,
                            EelPfc = CustomsDeclarationEelPfcEnum.Noeei3037A,
                            Incoterm = CustomsDeclarationIncotermEnum.Ddp,
                            Items = new List<CustomsItemCreateRequest>() {
                                new CustomsItemCreateRequest() {
                                    Description = "T-Shirt",
                                    MassUnit = WeightUnitEnum.Lb,
                                    Metadata = "Order ID \"123454\"",
                                    NetWeight = "5",
                                    OriginCountry = "<value>",
                                    Quantity = 20,
                                    SkuCode = "HM-123",
                                    HsCode = "0901.21",
                                    ValueAmount = "200",
                                    ValueCurrency = "USD",
                                },
                            },
                            NonDeliveryOption = CustomsDeclarationNonDeliveryOptionEnum.Return,
                            Test = true,
                        }
                    ),
                    CarrierAccounts = new List<string>() {
                        "065a4a8c10d24a34ab932163a1b87f52",
                        "73f706f4bdb94b54a337563840ce52b0",
                    },
                    Parcels = new List<Models.Components.Parcels>() {
                        Parcels.CreateParcelCreateRequest(
                            new ParcelCreateRequest() {
                                Extra = new ParcelExtra() {
                                    Cod = new Cod() {
                                        Amount = "5.5",
                                        Currency = "USD",
                                        PaymentMethod = PaymentMethod.Cash,
                                    },
                                    Insurance = new ParcelInsurance() {
                                        Amount = "5.5",
                                        Content = "Laptop",
                                        Currency = "USD",
                                        Provider = ParcelInsuranceProvider.Ups,
                                    },
                                },
                                Metadata = "Customer ID 123456",
                                MassUnit = WeightUnitEnum.Lb,
                                Weight = "1",
                                DistanceUnit = DistanceUnitEnum.In,
                                Height = "1",
                                Length = "1",
                                Width = "1",
                            }
                        ),
                    },
                },
                shippoApiVersion: "2018-02-08"
            );

            // handle response
        - lang: java
          label: Java
          source: >-
            package hello.world;


            import com.goshippo.shippo_sdk.Shippo;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            import java.lang.Exception;

            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();

                    CreateShipmentResponse res = sdk.shipments().create()
                            .shippoApiVersion("2018-02-08")
                            .shipmentCreateRequest(ShipmentCreateRequest.builder()
                                .addressFrom(AddressFrom.of(AddressCreateRequest.builder()
                                    .country("US")
                                    .name("Shwan Ippotle")
                                    .company("Shippo")
                                    .street1("215 Clayton St.")
                                    .street3("")
                                    .streetNo("")
                                    .city("San Francisco")
                                    .state("CA")
                                    .zip("94117")
                                    .phone("+1 555 341 9393")
                                    .email("shippotle@shippo.com")
                                    .isResidential(true)
                                    .metadata("Customer ID 123456")
                                    .validate(true)
                                    .build()))
                                .addressTo(AddressTo.of(AddressCreateRequest.builder()
                                    .country("US")
                                    .name("Shwan Ippotle")
                                    .company("Shippo")
                                    .street1("215 Clayton St.")
                                    .street3("")
                                    .streetNo("")
                                    .city("San Francisco")
                                    .state("CA")
                                    .zip("94117")
                                    .phone("+1 555 341 9393")
                                    .email("shippotle@shippo.com")
                                    .isResidential(true)
                                    .metadata("Customer ID 123456")
                                    .validate(true)
                                    .build()))
                                .parcels(List.of(
                                    Parcels.of("<value>"),
                                    Parcels.of(ParcelCreateRequest.builder()
                                        .massUnit(WeightUnitEnum.LB)
                                        .weight("1")
                                        .distanceUnit(DistanceUnitEnum.IN)
                                        .height("1")
                                        .length("1")
                                        .width("1")
                                        .extra(ParcelExtra.builder()
                                            .cod(Cod.builder()
                                                .amount("5.5")
                                                .currency("USD")
                                                .paymentMethod(PaymentMethod.CASH)
                                                .build())
                                            .insurance(ParcelInsurance.builder()
                                                .amount("5.5")
                                                .content("Laptop")
                                                .currency("USD")
                                                .provider(ParcelInsuranceProvider.UPS)
                                                .build())
                                            .build())
                                        .metadata("Customer ID 123456")
                                        .build()),
                                    Parcels.of(ParcelCreateRequest.builder()
                                        .massUnit(WeightUnitEnum.LB)
                                        .weight("1")
                                        .distanceUnit(DistanceUnitEnum.IN)
                                        .height("1")
                                        .length("1")
                                        .width("1")
                                        .extra(ParcelExtra.builder()
                                            .cod(Cod.builder()
                                                .amount("5.5")
                                                .currency("USD")
                                                .paymentMethod(PaymentMethod.CASH)
                                                .build())
                                            .insurance(ParcelInsurance.builder()
                                                .amount("5.5")
                                                .content("Laptop")
                                                .currency("USD")
                                                .provider(ParcelInsuranceProvider.UPS)
                                                .build())
                                            .build())
                                        .metadata("Customer ID 123456")
                                        .build())))
                                .extra(ShipmentExtra.builder()
                                    .accountsReceivableCustomerAccount(UPSReferenceFields.builder()
                                        .prefix("ABC")
                                        .value("value")
                                        .refSort(1L)
                                        .build())
                                    .appropriationNumber(UPSReferenceFields.builder()
                                        .prefix("ABC")
                                        .value("value")
                                        .refSort(1L)
                                        .build())
                                    .billOfLadingNumber(UPSReferenceFields.builder()
                                        .prefix("ABC")
                                        .value("value")
                                        .refSort(1L)
                                        .build())
                                    .cod(Cod.builder()
                                        .amount("5.5")
                                        .currency("USD")
                                        .paymentMethod(PaymentMethod.CASH)
                                        .build())
                                    .codNumber(UPSReferenceFields.builder()
                                        .prefix("ABC")
                                        .value("value")
                                        .refSort(1L)
                                        .build())
                                    .customerReference(CustomerReference.builder()
                                        .refSort(1L)
                                        .build())
                                    .dealerOrderNumber(UPSReferenceFields.builder()
                                        .prefix("ABC")
                                        .value("value")
                                        .refSort(1L)
                                        .build())
                                    .deptNumber(DepartmentNumber.builder()
                                        .refSort(3L)
                                        .build())
                                    .fdaProductCode(UPSReferenceFields.builder()
                                        .prefix("ABC")
                                        .value("value")
                                        .refSort(1L)
                                        .build())
                                    .insurance(Insurance.builder()
                                        .amount("5.5")
                                        .currency("USD")
                                        .build())
                                    .invoiceNumber(InvoiceNumber.builder()
                                        .refSort(2L)
                                        .build())
                                    .manifestNumber(UPSReferenceFields.builder()
                                        .prefix("ABC")
                                        .value("value")
                                        .refSort(1L)
                                        .build())
                                    .modelNumber(UPSReferenceFields.builder()
                                        .prefix("ABC")
                                        .value("value")
                                        .refSort(1L)
                                        .build())
                                    .partNumber(UPSReferenceFields.builder()
                                        .prefix("ABC")
                                        .value("value")
                                        .refSort(1L)
                                        .build())
                                    .poNumber(PoNumber.builder()
                                        .refSort(2L)
                                        .build())
                                    .productionCode(UPSReferenceFields.builder()
                                        .prefix("ABC")
                                        .value("value")
                                        .refSort(1L)
                                        .build())
                                    .purchaseRequestNumber(UPSReferenceFields.builder()
                                        .prefix("ABC")
                                        .value("value")
                                        .refSort(1L)
                                        .build())
                                    .rmaNumber(RmaNumber.builder()
                                        .refSort(1L)
                                        .build())
                                    .salespersonNumber(UPSReferenceFields.builder()
                                        .prefix("ABC")
                                        .value("value")
                                        .refSort(1L)
                                        .build())
                                    .serialNumber(UPSReferenceFields.builder()
                                        .prefix("ABC")
                                        .value("value")
                                        .refSort(1L)
                                        .build())
                                    .storeNumber(UPSReferenceFields.builder()
                                        .prefix("ABC")
                                        .value("value")
                                        .refSort(1L)
                                        .build())
                                    .transactionReferenceNumber(UPSReferenceFields.builder()
                                        .prefix("ABC")
                                        .value("value")
                                        .refSort(1L)
                                        .build())
                                    .build())
                                .metadata("Customer ID 123456")
                                .shipmentDate("2021-03-22T12:00:00Z")
                                .addressReturn(AddressReturn.of("d799c2679e644279b59fe661ac8fa488"))
                                .customsDeclaration(ShipmentCreateRequestCustomsDeclaration.of(CustomsDeclarationCreateRequest.builder()
                                    .certify(true)
                                    .certifySigner("Shawn Ippotle")
                                    .contentsType(CustomsDeclarationContentsTypeEnum.MERCHANDISE)
                                    .items(List.of(
                                        CustomsItemCreateRequest.builder()
                                            .description("T-Shirt")
                                            .massUnit(WeightUnitEnum.LB)
                                            .netWeight("5")
                                            .originCountry("<value>")
                                            .quantity(20L)
                                            .valueAmount("200")
                                            .valueCurrency("USD")
                                            .metadata("Order ID \"123454\"")
                                            .skuCode("HM-123")
                                            .hsCode("0901.21")
                                            .build()))
                                    .nonDeliveryOption(CustomsDeclarationNonDeliveryOptionEnum.RETURN)
                                    .b13aFilingOption(CustomsDeclarationB13AFilingOptionEnum.FILED_ELECTRONICALLY)
                                    .contentsExplanation("T-Shirt purchase")
                                    .dutiesPayor(DutiesPayor.builder()
                                        .account("2323434543")
                                        .type(CustomsDeclarationCreateRequestType.THIRD_PARTY)
                                        .address(CustomsDeclarationCreateRequestAddress.builder()
                                            .name("Patrick Kavanagh")
                                            .zip("80331")
                                            .country("DE")
                                            .build())
                                        .build())
                                    .exporterIdentification(CustomsExporterIdentification.builder()
                                        .eoriNumber("PL123456790ABCDE")
                                        .taxId(CustomsTaxIdentification.builder()
                                            .number("123456789")
                                            .type(CustomsTaxIdentificationType.EIN)
                                            .build())
                                        .build())
                                    .invoice("#123123")
                                    .metadata("Order ID #123123")
                                    .addressImporter(AddressImporter.builder()
                                        .name("Shwan Ippotle")
                                        .company("Shippo")
                                        .street1("Blumenstraße")
                                        .street3("")
                                        .streetNo("22")
                                        .city("München")
                                        .state("CA")
                                        .zip("80331")
                                        .country("DE")
                                        .phone("80331")
                                        .email("shippotle@shippo.com")
                                        .isResidential(true)
                                        .build())
                                    .eelPfc(CustomsDeclarationEelPfcEnum.NOEEI3037_A)
                                    .incoterm(CustomsDeclarationIncotermEnum.DDP)
                                    .test(true)
                                    .build()))
                                .carrierAccounts(List.of(
                                    "065a4a8c10d24a34ab932163a1b87f52",
                                    "73f706f4bdb94b54a337563840ce52b0"))
                                .build())
                            .call();

                    if (res.shipment().isPresent()) {
                        // handle response
                    }
                }
            }
  /shipments/{ShipmentId}:
    get:
      description: >-
        Returns an existing shipment using an object ID. Shipment objects older
        than 390 days are not returned.
      operationId: GetShipment
      parameters:
        - description: Object ID of the shipment to update
          in: path
          name: ShipmentId
          required: true
          schema:
            type: string
        - $ref: '#/components/parameters/ShippoApiVersionHeader'
      responses:
        '200':
          $ref: '#/components/responses/shipmentResponse'
        '400':
          $ref: '#/components/responses/badRequestResponse'
      summary: Retrieve a shipment
      tags:
        - Shipments
      x-codeSamples:
        - label: cURL
          lang: cURL
          source: >-
            curl
            https://api.goshippo.com/shipments/7c47d12aa95a4cbb9d90c167cca7bea7
            \
              -H "Authorization: ShippoToken <API_TOKEN>"
        - lang: python
          label: Python
          source: |-
            import shippo

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


            res = s.shipments.get(shipment_id='<id>')

            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.shipments.get("<id>");

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

            run();
        - lang: php
          label: PHP
          source: |-
            declare(strict_types=1);

            require 'vendor/autoload.php';

            use Shippo\API;

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



            $response = $sdk->shipments->get(
                shipmentId: '<id>',
                shippoApiVersion: '2018-02-08'

            );

            if ($response->shipment !== null) {
                // handle response
            }
        - lang: csharp
          label: C#
          source: |-
            using Shippo;
            using Shippo.Models.Components;

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

            var res = await sdk.Shipments.GetAsync(
                shipmentId: "<id>",
                shippoApiVersion: "2018-02-08"
            );

            // handle response
        - lang: java
          label: Java
          source: >-
            package hello.world;


            import com.goshippo.shippo_sdk.Shippo;

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

            import java.lang.Exception;


            public class Application {

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

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

                    GetShipmentResponse res = sdk.shipments().get()
                            .shipmentId("<id>")
                            .shippoApiVersion("2018-02-08")
                            .call();

                    if (res.shipment().isPresent()) {
                        // handle response
                    }
                }
            }
  /shipments/{ShipmentId}/rates:
    get:
      description: >-
        Returns a paginated list of rates associated with a shipment. Rates for
        shipments older than 390 days are not returned.
      operationId: ListShipmentRates
      parameters:
        - description: Object ID of the shipment to update
          in: path
          name: ShipmentId
          required: true
          schema:
            type: string
        - $ref: '#/components/parameters/PageNumberQueryParam'
        - $ref: '#/components/parameters/ResultsPerPageQueryParam'
        - $ref: '#/components/parameters/ShippoApiVersionHeader'
      responses:
        '200':
          $ref: '#/components/responses/ratePaginatedResponse'
        '400':
          $ref: '#/components/responses/badRequestResponse'
      summary: Retrieve shipment rates
      tags:
        - Rates
      x-codeSamples:
        - label: cURL
          lang: cURL
          source: >-
            curl
            https://api.goshippo.com/shipments/5e40ead7cffe4cc1ad45108696162e42/rates/USD
            \
              -H "Authorization: ShippoToken <API_TOKEN>"
        - lang: python
          label: Python
          source: |-
            import shippo

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


            res = s.rates.list_shipment_rates(shipment_id='<id>')

            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.rates.listShipmentRates("<id>");

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

            run();
        - lang: php
          label: PHP
          source: |-
            declare(strict_types=1);

            require 'vendor/autoload.php';

            use Shippo\API;
            use Shippo\API\Models\Operations;

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

            $request = new Operations\ListShipmentRatesRequest(
                shipmentId: '<id>',
            );

            $response = $sdk->rates->listShipmentRates(
                request: $request
            );

            if ($response->ratePaginatedList !== null) {
                // handle response
            }
        - lang: csharp
          label: C#
          source: |-
            using Shippo;
            using Shippo.Models.Components;
            using Shippo.Models.Requests;

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

            ListShipmentRatesRequest req = new ListShipmentRatesRequest() {
                ShipmentId = "<id>",
            };

            var res = await sdk.Rates.ListShipmentRatesAsync(req);

            // handle response
        - lang: java
          label: Java
          source: >-
            package hello.world;


            import com.goshippo.shippo_sdk.Shippo;

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

            import java.lang.Exception;


            public class Application {

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

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

                    ListShipmentRatesResponse res = sdk.rates().listShipmentRates()
                            .shipmentId("<id>")
                            .page(1L)
                            .results(25L)
                            .shippoApiVersion("2018-02-08")
                            .call();

                    if (res.ratePaginatedList().isPresent()) {
                        // handle response
                    }
                }
            }
      x-speakeasy-name-override: listShipmentRates
  /shipments/{ShipmentId}/rates/{CurrencyCode}:
    get:
      description: >-
        Returns all available shipping rates for a shipment object.


        When you create a new valid shipment object, Shippo automatically
        calculates all available rates. Depending on your shipment data, there
        may be none, one or multiple rates.


        By default, the calculated rates will return the price in two currencies
        under the `amount` and `amount_local` keys, respectively. The `amount`
        key will contain the price of a rate expressed in the currency that is
        used in the country from where the parcel originates, and the
        `amount_local` key will contain the price expressed in the currency that
        is used in the country the parcel is shipped to. You can request rates
        with prices expressed in a different currency by adding the currency
        code to the end of the resource URL. The full list of supported
        currencies along with their codes can be viewed on <a
        href="http://openexchangerates.org/api/currencies.json">open exchange
        rates</a>.


        Note: re-requesting the rates with a different currency code will
        re-queue the shipment (i.e. set the Shipment's `status` to `QUEUED`) and
        the converted currency rates will only be available when the Shipment's
        `status` is set to `SUCCESS`.


        Rates for shipments older than 390 days are not returned.
      operationId: ListShipmentRatesByCurrencyCode
      parameters:
        - description: Object ID of the shipment to update
          in: path
          name: ShipmentId
          required: true
          schema:
            type: string
        - description: ISO currency code for the rates
          in: path
          name: CurrencyCode
          required: true
          schema:
            type: string
            default: USD
        - $ref: '#/components/parameters/PageNumberQueryParam'
        - $ref: '#/components/parameters/ResultsPerPageQueryParam'
        - $ref: '#/components/parameters/ShippoApiVersionHeader'
      responses:
        '200':
          $ref: '#/components/responses/ratePaginatedResponse'
        '400':
          $ref: '#/components/responses/badRequestResponse'
      summary: Retrieve shipment rates in currency
      tags:
        - Rates
      x-speakeasy-name-override: listShipmentRatesByCurrencyCode
      x-codeSamples:
        - lang: python
          label: Python
          source: >-
            import shippo

            from shippo.models import operations


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



            res =
            s.rates.list_shipment_rates_by_currency_code(request=operations.ListShipmentRatesByCurrencyCodeRequest(
                shipment_id='<id>',
                currency_code='USD',
            ))


            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.rates.listShipmentRatesByCurrencyCode({
                shipmentId: "<id>",
                currencyCode: "USD",
              });

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

            run();
        - lang: csharp
          label: C#
          source: >-
            using Shippo;

            using Shippo.Models.Components;

            using Shippo.Models.Requests;


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


            ListShipmentRatesByCurrencyCodeRequest req = new
            ListShipmentRatesByCurrencyCodeRequest() {
                ShipmentId = "<id>",
                CurrencyCode = "USD",
            };


            var res = await sdk.Rates.ListShipmentRatesByCurrencyCodeAsync(req);


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

            require 'vendor/autoload.php';

            use Shippo\API;
            use Shippo\API\Models\Operations;

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

            $request = new Operations\ListShipmentRatesByCurrencyCodeRequest(
                shipmentId: '<id>',
                currencyCode: 'USD',
            );

            $response = $sdk->rates->listShipmentRatesByCurrencyCode(
                request: $request
            );

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


            import com.goshippo.shippo_sdk.Shippo;

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

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

            import java.lang.Exception;


            public class Application {

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

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

                    ListShipmentRatesByCurrencyCodeRequest req = ListShipmentRatesByCurrencyCodeRequest.builder()
                            .shipmentId("<id>")
                            .currencyCode("USD")
                            .build();

                    ListShipmentRatesByCurrencyCodeResponse res = sdk.rates().listShipmentRatesByCurrencyCode()
                            .request(req)
                            .call();

                    if (res.ratePaginatedList().isPresent()) {
                        // handle response
                    }
                }
            }
  /tracks:
    post:
      description: >-
        Registers a webhook that will send HTTP notifications to you when the
        status of your tracked package changes. For more details on creating a
        webhook, see our guides on <a
        href="https://docs.goshippo.com/docs/tracking/webhooks/">Webhooks</a>
        and <a
        href="https://docs.goshippo.com/docs/tracking/tracking/">Tracking</a>.
      operationId: CreateTrack
      parameters:
        - $ref: '#/components/parameters/ShippoApiVersionHeader'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TracksRequest'
      responses:
        '200':
          $ref: '#/components/responses/trackResponse'
        '400':
          $ref: '#/components/responses/badRequestResponse'
      summary: Register a tracking webhook
      tags:
        - Tracking Status
      x-codeSamples:
        - label: cURL
          lang: cURL
          source: |-
            curl https://api.goshippo.com/tracks/ \
            -H "Authorization: ShippoToken <API_TOKEN>" \
            -d carrier="usps" \
            -d tracking_number="9205590164917312751089" \
            -d metadata="Order 000123"
        - lang: python
          label: Python
          source: |-
            import shippo
            from shippo.models import components

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


            res = s.tracking_status.create(request=components.TracksRequest(
                carrier='usps',
                metadata='Order 000123',
                tracking_number='9205590164917312751089',
            ))

            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.trackingStatus.create({
                carrier: "usps",
                metadata: "Order 000123",
                trackingNumber: "9205590164917312751089",
              });

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

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

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

            var res = await sdk.TrackingStatus.CreateAsync(
                tracksRequest: new TracksRequest() {
                    Carrier = "usps",
                    Metadata = "Order 000123",
                    TrackingNumber = "9205590164917312751089",
                },
                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;

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

            $tracksRequest = new Components\TracksRequest(
                carrier: 'usps',
                metadata: 'Order 000123',
                trackingNumber: '9205590164917312751089',
            );

            $response = $sdk->trackingStatus->create(
                tracksRequest: $tracksRequest,
                shippoApiVersion: '2018-02-08'

            );

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


            import com.goshippo.shippo_sdk.Shippo;

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

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

            import java.lang.Exception;


            public class Application {

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

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

                    CreateTrackResponse res = sdk.trackingStatus().create()
                            .shippoApiVersion("2018-02-08")
                            .tracksRequest(TracksRequest.builder()
                                .carrier("usps")
                                .trackingNumber("9205590164917312751089")
                                .metadata("Order 000123")
                                .build())
                            .call();

                    if (res.track().isPresent()) {
                        // handle response
                    }
                }
            }
  /tracks/{Carrier}/{TrackingNumber}:
    get:
      description: >-
        Returns the tracking status of a shipment using a carrier name and a
        tracking number.
      operationId: GetTrack
      parameters:
        - description: Tracking number
          in: path
          name: TrackingNumber
          required: true
          schema:
            type: string
        - description: Name of the carrier
          in: path
          name: Carrier
          required: true
          schema:
            type: string
        - $ref: '#/components/parameters/ShippoApiVersionHeader'
      responses:
        '200':
          $ref: '#/components/responses/trackResponse'
        '400':
          $ref: '#/components/responses/badRequestResponse'
      summary: Get a tracking status
      tags:
        - Tracking Status
      x-codeSamples:
        - label: cURL
          lang: cURL
          source: |-
            curl https://api.goshippo.com/tracks/usps/9205590164917312751089 \
            -H "Authorization: ShippoToken <API_TOKEN>"
        - lang: python
          label: Python
          source: >-
            import shippo


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



            res = s.tracking_status.get(tracking_number='<value>',
            carrier='<value>')


            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.trackingStatus.get("<value>", "<value>");

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

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

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

            var res = await sdk.TrackingStatus.GetAsync(
                trackingNumber: "<value>",
                carrier: "<value>",
                shippoApiVersion: "2018-02-08"
            );

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

            require 'vendor/autoload.php';

            use Shippo\API;

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



            $response = $sdk->trackingStatus->get(
                trackingNumber: '<value>',
                carrier: '<value>',
                shippoApiVersion: '2018-02-08'

            );

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

            import com.goshippo.shippo_sdk.Shippo;
            import com.goshippo.shippo_sdk.models.operations.GetTrackResponse;
            import java.lang.Exception;

            public class Application {

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

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

                    GetTrackResponse res = sdk.trackingStatus().get()
                            .trackingNumber("<value>")
                            .carrier("<value>")
                            .shippoApiVersion("2018-02-08")
                            .call();

                    if (res.track().isPresent()) {
                        // handle response
                    }
                }
            }
  /transactions:
    get:
      description: Returns a list of all transaction objects.
      operationId: ListTransactions
      parameters:
        - description: Filter by rate ID
          in: query
          name: rate
          schema:
            type: string
        - description: Filter by object status
          in: query
          name: object_status
          schema:
            $ref: '#/components/schemas/TransactionStatusEnum'
        - description: Filter by tracking status
          in: query
          name: tracking_status
          schema:
            $ref: '#/components/schemas/TrackingStatusEnum'
        - $ref: '#/components/parameters/PageNumberQueryParam'
        - $ref: '#/components/parameters/ResultsPerPageQueryParam'
        - $ref: '#/components/parameters/ShippoApiVersionHeader'
      responses:
        '200':
          $ref: '#/components/responses/transactionPaginatedResponse'
        '400':
          $ref: '#/components/responses/badRequestResponse'
      summary: List all shipping labels
      tags:
        - Transactions
      x-codeSamples:
        - label: cURL
          lang: cURL
          source: |-
            curl https://api.goshippo.com/transactions/ \
              -H "Authorization: ShippoToken <API_TOKEN>"
        - lang: python
          label: Python
          source: >-
            import shippo

            from shippo.models import components, operations


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



            res =
            s.transactions.list(request=operations.ListTransactionsRequest(
                object_status=components.TransactionStatusEnum.SUCCESS,
                tracking_status=components.TrackingStatusEnum.DELIVERED,
            ))


            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.transactions.list({
                objectStatus: "SUCCESS",
                trackingStatus: "DELIVERED",
              });

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

            run();
        - lang: php
          label: PHP
          source: |-
            declare(strict_types=1);

            require 'vendor/autoload.php';

            use Shippo\API;
            use Shippo\API\Models\Components;
            use Shippo\API\Models\Operations;

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

            $request = new Operations\ListTransactionsRequest(
                objectStatus: Components\TransactionStatusEnum::Success,
                trackingStatus: Components\TrackingStatusEnum::Delivered,
            );

            $response = $sdk->transactions->list(
                request: $request
            );

            if ($response->transactionPaginatedList !== null) {
                // handle response
            }
        - lang: csharp
          label: C#
          source: |-
            using Shippo;
            using Shippo.Models.Components;
            using Shippo.Models.Requests;

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

            ListTransactionsRequest req = new ListTransactionsRequest() {
                ObjectStatus = TransactionStatusEnum.Success,
                TrackingStatus = TrackingStatusEnum.Delivered,
            };

            var res = await sdk.Transactions.ListAsync(req);

            // handle response
        - lang: java
          label: Java
          source: >-
            package hello.world;


            import com.goshippo.shippo_sdk.Shippo;

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

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

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

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

            import java.lang.Exception;


            public class Application {

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

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

                    ListTransactionsRequest req = ListTransactionsRequest.builder()
                            .objectStatus(TransactionStatusEnum.SUCCESS)
                            .trackingStatus(TrackingStatusEnum.DELIVERED)
                            .build();

                    ListTransactionsResponse res = sdk.transactions().list()
                            .request(req)
                            .call();

                    if (res.transactionPaginatedList().isPresent()) {
                        // handle response
                    }
                }
            }
    post:
      description: >-
        Creates a new transaction object and purchases the shipping label using
        a rate object that has previously been created. <br> OR <br> Creates a
        new transaction object and purchases the shipping label instantly using
        shipment details, an existing carrier account, and an existing service
        level token.
      operationId: CreateTransaction
      parameters:
        - $ref: '#/components/parameters/ShippoApiVersionHeader'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              oneOf:
                - $ref: '#/components/schemas/TransactionCreateRequest'
                - $ref: '#/components/schemas/InstantTransactionCreateRequest'
        description: Examples.
        x-examples:
          application/json:
            instant-transaction-example:
              summary: Create an instant transaction
              value:
                async: true
                carrier_account: b741b99f95e841639b54272834bc478c
                label_file_type: PDF
                metadata: Order ID
                servicelevel_token: usps_priority
                shipment:
                  address_from:
                    city: San Francisco
                    company: Shippo
                    country: US
                    email: shippotle@shippo.com
                    is_residential: true
                    metadata: Customer ID 123456
                    name: Shwan Ippotle
                    phone: +1 555 341 9393
                    state: CA
                    street1: 215 Clayton St.
                    street2: 215 Clayton St.
                    validate: true
                    zip: 94117
                  address_return:
                    city: San Francisco
                    company: Shippo
                    country: US
                    email: shippotle@shippo.com
                    is_residential: true
                    metadata: Customer ID 123456
                    name: Shwan Ippotle
                    phone: +1 555 341 9393
                    state: CA
                    street1: 215 Clayton St.
                    street2: 215 Clayton St.
                    validate: true
                    zip: 94117
                  address_to:
                    city: San Francisco
                    company: Shippo
                    country: US
                    email: shippotle@shippo.com
                    is_residential: true
                    metadata: Customer ID 123456
                    name: Shwan Ippotle
                    phone: +1 555 341 9393
                    state: CA
                    street1: 215 Clayton St.
                    street2: 215 Clayton St.
                    validate: true
                    zip: 94117
                  parcels:
                    - distance_unit: in
                      height: 1
                      length: 1
                      mass_unit: lb
                      template: USPS_LargeFlatRateBox
                      weight: 1
                      width: 1
            rate-transaction-example:
              summary: Create a rate transaction
              value:
                async: false
                label_file_type: PDF
                metadata: Order ID
                rate: ec9f0d3adc9441449c85d315f0997fd5
      responses:
        '201':
          $ref: '#/components/responses/transactionCreateResponse'
        '400':
          $ref: '#/components/responses/badRequestResponse'
      summary: Create a shipping label
      tags:
        - Transactions
      x-codeSamples:
        - label: cURL
          lang: cURL
          source: >-
            curl --location --request POST
            'https://api.goshippo.com/transactions' \

            --header 'Authorization: ShippoToken {{token}}' \

            --header 'Content-Type: application/json' \

            --header 'SHIPPO-API-VERSION: 2018-02-08' \

            --data-raw '{
              "rate": "a5c9d1bec93149f5bedc3a9374b50970",
              "async": false,
              "label_file_type": "PDF"
            }'
        - lang: python
          label: Python
          source: >-
            import shippo

            from shippo.models import components


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



            res =
            s.transactions.create(request=components.TransactionCreateRequest(
                async_=False,
                label_file_type=components.LabelFileTypeEnum.PDF_4X6,
                metadata='Order ID #12345',
                rate='ec9f0d3adc9441449c85d315f0997fd5',
                order='adcfdddf8ec64b84ad22772bce3ea37a',
            ))


            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.transactions.create({
                async: false,
                labelFileType: "PDF_4x6",
                metadata: "Order ID #12345",
                rate: "ec9f0d3adc9441449c85d315f0997fd5",
                order: "adcfdddf8ec64b84ad22772bce3ea37a",
              });

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

            run();
        - lang: php
          label: PHP
          source: |-
            declare(strict_types=1);

            require 'vendor/autoload.php';

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

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



            $response = $sdk->transactions->create(
                requestBody: new Components\TransactionCreateRequest(
                    async: false,
                    labelFileType: Components\LabelFileTypeEnum::PDF4x6,
                    metadata: 'Order ID #12345',
                    rate: 'ec9f0d3adc9441449c85d315f0997fd5',
                    order: 'adcfdddf8ec64b84ad22772bce3ea37a',
                ),
                shippoApiVersion: '2018-02-08'

            );

            if ($response->transaction !== null) {
                // handle response
            }
        - lang: csharp
          label: C#
          source: |-
            using Shippo;
            using Shippo.Models.Components;

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

            var res = await sdk.Transactions.CreateAsync(
                requestBody: CreateTransactionRequestBody.CreateTransactionCreateRequest(
                    new TransactionCreateRequest() {
                        Async = false,
                        LabelFileType = LabelFileTypeEnum.Pdf4x6,
                        Metadata = "Order ID #12345",
                        Rate = "ec9f0d3adc9441449c85d315f0997fd5",
                        Order = "adcfdddf8ec64b84ad22772bce3ea37a",
                    }
                ),
                shippoApiVersion: "2018-02-08"
            );

            // handle response
        - lang: java
          label: Java
          source: >-
            package hello.world;


            import com.goshippo.shippo_sdk.Shippo;

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

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

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

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

            import java.lang.Exception;


            public class Application {

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

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

                    CreateTransactionResponse res = sdk.transactions().create()
                            .shippoApiVersion("2018-02-08")
                            .requestBody(CreateTransactionRequestBody.of(TransactionCreateRequest.builder()
                                .rate("ec9f0d3adc9441449c85d315f0997fd5")
                                .async(false)
                                .labelFileType(LabelFileTypeEnum.PDF4X6)
                                .metadata("Order ID #12345")
                                .order("adcfdddf8ec64b84ad22772bce3ea37a")
                                .build()))
                            .call();

                    if (res.transaction().isPresent()) {
                        // handle response
                    }
                }
            }
  /transactions/{TransactionId}:
    get:
      description: Returns an existing transaction using an object ID.
      operationId: GetTransaction
      parameters:
        - description: Object ID of the transaction to update
          in: path
          name: TransactionId
          required: true
          schema:
            type: string
        - $ref: '#/components/parameters/ShippoApiVersionHeader'
      responses:
        '200':
          $ref: '#/components/responses/transactionResponse'
        '400':
          $ref: '#/components/responses/badRequestResponse'
      summary: Retrieve a shipping label
      tags:
        - Transactions
      x-codeSamples:
        - label: cURL
          lang: cURL
          source: >-
            curl
            https://api.goshippo.com/transactions/70ae8117ee1749e393f249d5b77c45e0
            \
             -H "Authorization: ShippoToken <API_TOKEN>"
        - lang: python
          label: Python
          source: |-
            import shippo

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


            res = s.transactions.get(transaction_id='<id>')

            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.transactions.get("<id>");

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

            run();
        - lang: php
          label: PHP
          source: |-
            declare(strict_types=1);

            require 'vendor/autoload.php';

            use Shippo\API;

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



            $response = $sdk->transactions->get(
                transactionId: '<id>',
                shippoApiVersion: '2018-02-08'

            );

            if ($response->transaction !== null) {
                // handle response
            }
        - lang: csharp
          label: C#
          source: |-
            using Shippo;
            using Shippo.Models.Components;

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

            var res = await sdk.Transactions.GetAsync(
                transactionId: "<id>",
                shippoApiVersion: "2018-02-08"
            );

            // handle response
        - lang: java
          label: Java
          source: >-
            package hello.world;


            import com.goshippo.shippo_sdk.Shippo;

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

            import java.lang.Exception;


            public class Application {

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

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

                    GetTransactionResponse res = sdk.transactions().get()
                            .transactionId("<id>")
                            .shippoApiVersion("2018-02-08")
                            .call();

                    if (res.transaction().isPresent()) {
                        // handle response
                    }
                }
            }
  /user-parcel-templates:
    get:
      description: Returns a list all of all user parcel template objects.
      operationId: ListUserParcelTemplates
      parameters:
        - $ref: '#/components/parameters/ShippoApiVersionHeader'
      responses:
        '200':
          $ref: '#/components/responses/userParcelTemplateListResponse'
        '400':
          $ref: '#/components/responses/badRequestResponse'
      summary: List all user parcel templates
      tags:
        - User Parcel Templates
      x-codeSamples:
        - label: cURL
          lang: cURL
          source: |-
            curl https://api.goshippo.com/user-parcel-templates  \
            -H "Authorization: ShippoToken <API_TOKEN>" \
            -H "Content-Type: application/json"
        - lang: python
          label: Python
          source: >-
            import shippo

            from shippo.models import operations


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



            res =
            s.user_parcel_templates.list(request=operations.ListUserParcelTemplatesRequest())


            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.userParcelTemplates.list({});

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

            run();
        - lang: csharp
          label: C#
          source: >-
            using Shippo;

            using Shippo.Models.Components;


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


            var res = await sdk.UserParcelTemplates.ListAsync(shippoApiVersion:
            "2018-02-08");


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

            require 'vendor/autoload.php';

            use Shippo\API;

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



            $response = $sdk->userParcelTemplates->list(
                shippoApiVersion: '2018-02-08'
            );

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


            import com.goshippo.shippo_sdk.Shippo;

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

            import java.lang.Exception;


            public class Application {

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

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

                    ListUserParcelTemplatesResponse res = sdk.userParcelTemplates().list()
                            .shippoApiVersion("2018-02-08")
                            .call();

                    if (res.userParcelTemplateList().isPresent()) {
                        // handle response
                    }
                }
            }
    post:
      description: >-
        Creates a new user parcel template. <br>You can choose to create a

        parcel template using a preset carrier template as a starting point, or

        you can create an entirely custom one. To use a preset carrier template,

        pass in a unique template token from <a
        href="/shippoapi/public-api/parcel-templates">this list</a>

        plus the weight fields (**weight** and **weight_unit**). Otherwise, omit

        the template field and pass the other fields, for the weight, length,
        height,

        and depth, as well as their units."
      operationId: CreateUserParcelTemplate
      parameters:
        - $ref: '#/components/parameters/ShippoApiVersionHeader'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UserParcelTemplateCreateRequest'
      responses:
        '200':
          $ref: '#/components/responses/userParcelTemplateResponse'
        '400':
          $ref: '#/components/responses/badRequestResponse'
      summary: Create a new user parcel template
      tags:
        - User Parcel Templates
      x-codeSamples:
        - label: cURL
          lang: cURL
          source: |-
            curl -X POST https://api.goshippo.com/user-parcel-templates  \
              -H "Authorization: ShippoToken <API_TOKEN>" \
              -H "Content-Type: application/json"
              -d '{
                  "name": "My Custom Template",
                  "length": "10",
                  "width": "8",
                  "height": "6",
                  "distance_unit": "in",
                  "weight": "12",
                  "weight_unit": "lb"
              }'
        - lang: python
          label: Python
          source: >-
            import shippo

            from shippo.models import components


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



            res =
            s.user_parcel_templates.create(request=components.UserParcelTemplateWithCarrierTemplateCreateRequest(
                weight='12',
                weight_unit=components.WeightUnitEnum.LB,
            ))


            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.userParcelTemplates.create({
                weight: "12",
                weightUnit: "lb",
              });

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

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

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

            var res = await sdk.UserParcelTemplates.CreateAsync(
                userParcelTemplateCreateRequest: UserParcelTemplateCreateRequest.CreateUserParcelTemplateWithCarrierTemplateCreateRequest(
                    new UserParcelTemplateWithCarrierTemplateCreateRequest() {
                        Weight = "12",
                        WeightUnit = WeightUnitEnum.Lb,
                    }
                ),
                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;

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



            $response = $sdk->userParcelTemplates->create(
                userParcelTemplateCreateRequest: new Components\UserParcelTemplateWithCarrierTemplateCreateRequest(
                    weight: '12',
                    weightUnit: Components\WeightUnitEnum::Lb,
                ),
                shippoApiVersion: '2018-02-08'

            );

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


            import com.goshippo.shippo_sdk.Shippo;

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

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

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

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

            import java.lang.Exception;


            public class Application {

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

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

                    CreateUserParcelTemplateResponse res = sdk.userParcelTemplates().create()
                            .shippoApiVersion("2018-02-08")
                            .userParcelTemplateCreateRequest(UserParcelTemplateCreateRequest.of(UserParcelTemplateWithCarrierTemplateCreateRequest.builder()
                                .weight("12")
                                .weightUnit(WeightUnitEnum.LB)
                                .build()))
                            .call();

                    if (res.userParcelTemplate().isPresent()) {
                        // handle response
                    }
                }
            }
  /user-parcel-templates/{UserParcelTemplateObjectId}:
    delete:
      description: Deletes a user parcel template using an object ID.
      operationId: DeleteUserParcelTemplate
      parameters:
        - description: Object ID of the user parcel template
          in: path
          name: UserParcelTemplateObjectId
          required: true
          schema:
            type: string
        - $ref: '#/components/parameters/ShippoApiVersionHeader'
      responses:
        '204':
          description: The user parcel template was successfully deleted.
        '400':
          $ref: '#/components/responses/badRequestResponse'
      summary: Delete a user parcel template
      tags:
        - User Parcel Templates
      x-codeSamples:
        - label: cURL
          lang: cURL
          source: >-
            curl -X DELETE
            https://api.goshippo.com/user-parcel-templates/{UserParcelTemplateObjectId} 
            \
              -H "Authorization: ShippoToken <API_TOKEN>"
        - lang: python
          label: Python
          source: >-
            import shippo


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



            s.user_parcel_templates.delete(user_parcel_template_object_id='<id>')


            # Use the SDK ...
        - lang: typescript
          label: Typescript
          source: |-
            import { Shippo } from "shippo";

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

            async function run() {
              await shippo.userParcelTemplates.delete("<id>");


            }

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

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

            await sdk.UserParcelTemplates.DeleteAsync(
                userParcelTemplateObjectId: "<id>",
                shippoApiVersion: "2018-02-08"
            );

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

            require 'vendor/autoload.php';

            use Shippo\API;

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



            $response = $sdk->userParcelTemplates->delete(
                userParcelTemplateObjectId: '<id>',
                shippoApiVersion: '2018-02-08'

            );

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


            import com.goshippo.shippo_sdk.Shippo;

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

            import java.lang.Exception;


            public class Application {

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

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

                    DeleteUserParcelTemplateResponse res = sdk.userParcelTemplates().delete()
                            .userParcelTemplateObjectId("<id>")
                            .shippoApiVersion("2018-02-08")
                            .call();

                    // handle response
                }
            }
    get:
      description: |-
        Returns the parcel template information for a specific user parcel
        template, identified by the object ID.
      operationId: GetUserParcelTemplate
      parameters:
        - description: Object ID of the user parcel template
          in: path
          name: UserParcelTemplateObjectId
          required: true
          schema:
            type: string
        - $ref: '#/components/parameters/ShippoApiVersionHeader'
      responses:
        '200':
          $ref: '#/components/responses/userParcelTemplateResponse'
        '400':
          $ref: '#/components/responses/badRequestResponse'
      summary: Retrieves a user parcel template
      tags:
        - User Parcel Templates
      x-codeSamples:
        - label: CLI
          lang: cURL
          source: |-
            curl /user-parcel-templates/{UserParcelTemplateToken}  \
              -H "Authorization: ShippoToken <API_TOKEN>" \
              -H "Content-Type: application/json"
        - lang: python
          label: Python
          source: >-
            import shippo


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



            res =
            s.user_parcel_templates.get(user_parcel_template_object_id='<id>')


            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.userParcelTemplates.get("<id>");

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

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

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

            var res = await sdk.UserParcelTemplates.GetAsync(
                userParcelTemplateObjectId: "<id>",
                shippoApiVersion: "2018-02-08"
            );

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

            require 'vendor/autoload.php';

            use Shippo\API;

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



            $response = $sdk->userParcelTemplates->get(
                userParcelTemplateObjectId: '<id>',
                shippoApiVersion: '2018-02-08'

            );

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


            import com.goshippo.shippo_sdk.Shippo;

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

            import java.lang.Exception;


            public class Application {

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

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

                    GetUserParcelTemplateResponse res = sdk.userParcelTemplates().get()
                            .userParcelTemplateObjectId("<id>")
                            .shippoApiVersion("2018-02-08")
                            .call();

                    if (res.userParcelTemplate().isPresent()) {
                        // handle response
                    }
                }
            }
    put:
      description: Updates an existing user parcel template.
      operationId: UpdateUserParcelTemplate
      parameters:
        - description: Object ID of the user parcel template
          in: path
          name: UserParcelTemplateObjectId
          required: true
          schema:
            type: string
        - $ref: '#/components/parameters/ShippoApiVersionHeader'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UserParcelTemplateUpdateRequest'
      responses:
        '200':
          $ref: '#/components/responses/userParcelTemplateResponse'
        '400':
          $ref: '#/components/responses/badRequestResponse'
      summary: Update an existing user parcel template
      tags:
        - User Parcel Templates
      x-codeSamples:
        - label: cURL
          lang: cURL
          source: >-
            curl
            https://api.goshippo.com/user-parcel-templates/b958d3690bb04bb8b2986724872750f5 
            \

            -H "Authorization: ShippoToken <API_TOKEN>" \

            -H "Content-Type: application/json"
              -d '{
                  "name": "My Custom Template",
                  "length": "10",
                  "width": "8",
                  "height": "6",
                  "distance_unit": "in",
                  "weight": "12",
                  "weight_unit": "lb"
              }'
        - lang: python
          label: Python
          source: >-
            import shippo

            from shippo.models import components


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



            res =
            s.user_parcel_templates.update(user_parcel_template_object_id='<id>',
            user_parcel_template_update_request=components.UserParcelTemplateUpdateRequest(
                distance_unit=components.DistanceUnitEnum.IN,
                height='6',
                length='10',
                name='My Custom Template',
                weight='12',
                weight_unit=components.WeightUnitEnum.LB,
                width='8',
            ))


            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.userParcelTemplates.update("<id>", {
                distanceUnit: "in",
                height: "6",
                length: "10",
                name: "My Custom Template",
                weight: "12",
                weightUnit: "lb",
                width: "8",
              });

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

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

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

            var res = await sdk.UserParcelTemplates.UpdateAsync(
                userParcelTemplateObjectId: "<id>",
                shippoApiVersion: "2018-02-08",
                userParcelTemplateUpdateRequest: new UserParcelTemplateUpdateRequest() {
                    DistanceUnit = DistanceUnitEnum.In,
                    Height = "6",
                    Length = "10",
                    Name = "My Custom Template",
                    Weight = "12",
                    WeightUnit = WeightUnitEnum.Lb,
                    Width = "8",
                }
            );

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


            require 'vendor/autoload.php';


            use Shippo\API;

            use Shippo\API\Models\Components;


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

            $userParcelTemplateUpdateRequest = new
            Components\UserParcelTemplateUpdateRequest(
                distanceUnit: Components\DistanceUnitEnum::In,
                height: '6',
                length: '10',
                name: 'My Custom Template',
                weight: '12',
                weightUnit: Components\WeightUnitEnum::Lb,
                width: '8',
            );


            $response = $sdk->userParcelTemplates->update(
                userParcelTemplateObjectId: '<id>',
                shippoApiVersion: '2018-02-08',
                userParcelTemplateUpdateRequest: $userParcelTemplateUpdateRequest

            );


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


            import com.goshippo.shippo_sdk.Shippo;

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

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

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

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

            import java.lang.Exception;


            public class Application {

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

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

                    UpdateUserParcelTemplateResponse res = sdk.userParcelTemplates().update()
                            .userParcelTemplateObjectId("<id>")
                            .shippoApiVersion("2018-02-08")
                            .userParcelTemplateUpdateRequest(UserParcelTemplateUpdateRequest.builder()
                                .distanceUnit(DistanceUnitEnum.IN)
                                .height("6")
                                .length("10")
                                .name("My Custom Template")
                                .width("8")
                                .weight("12")
                                .weightUnit(WeightUnitEnum.LB)
                                .build())
                            .call();

                    if (res.userParcelTemplate().isPresent()) {
                        // handle response
                    }
                }
            }
  /shippo-accounts:
    get:
      description: Returns a list of Shippo Managed Accounts objects.
      operationId: ListShippoAccounts
      parameters:
        - $ref: '#/components/parameters/PageNumberQueryParam'
        - $ref: '#/components/parameters/ResultsPerPageQueryParam'
        - $ref: '#/components/parameters/ShippoApiVersionHeader'
      responses:
        '200':
          $ref: '#/components/responses/shippoAccountPaginatedResponse'
        '400':
          $ref: '#/components/responses/badRequestResponse'
      summary: List all Shippo Accounts
      tags:
        - Shippo Accounts
      x-codeSamples:
        - lang: python
          label: Python
          source: |-
            import shippo

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


            res = s.shippo_accounts.list()

            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.shippoAccounts.list();

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

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

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

            var res = await sdk.ShippoAccounts.ListAsync(
                page: 1,
                results: 25,
                shippoApiVersion: "2018-02-08"
            );

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

            require 'vendor/autoload.php';

            use Shippo\API;

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



            $response = $sdk->shippoAccounts->list(
                page: 1,
                results: 25,
                shippoApiVersion: '2018-02-08'

            );

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


            import com.goshippo.shippo_sdk.Shippo;

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

            import java.lang.Exception;


            public class Application {

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

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

                    ListShippoAccountsResponse res = sdk.shippoAccounts().list()
                            .page(1L)
                            .results(25L)
                            .shippoApiVersion("2018-02-08")
                            .call();

                    if (res.shippoAccountPaginatedList().isPresent()) {
                        // handle response
                    }
                }
            }
    post:
      description: >-
        Creates a new <a
        href="https://docs.goshippo.com/docs/platformaccounts/platform_using_accounts/">Shippo
        Managed Account</a>.
      operationId: CreateShippoAccount
      parameters:
        - $ref: '#/components/parameters/ShippoApiVersionHeader'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ShippoAccountUpdateRequest'
      responses:
        '201':
          $ref: '#/components/responses/shippoAccountResponse'
        '400':
          $ref: '#/components/responses/badRequestResponse'
      summary: Create a Shippo Account
      tags:
        - Shippo Accounts
      x-codeSamples:
        - lang: python
          label: Python
          source: >-
            import shippo

            from shippo.models import components


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



            res =
            s.shippo_accounts.create(request=components.ShippoAccountUpdateRequest(
                email='hippo@shippo.com',
                first_name='Shippo',
                last_name='Meister',
                company_name='Acme',
            ))


            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.shippoAccounts.create({
                email: "hippo@shippo.com",
                firstName: "Shippo",
                lastName: "Meister",
                companyName: "Acme",
              });

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

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

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

            var res = await sdk.ShippoAccounts.CreateAsync(
                shippoAccountUpdateRequest: new ShippoAccountUpdateRequest() {
                    Email = "hippo@shippo.com",
                    FirstName = "Shippo",
                    LastName = "Meister",
                    CompanyName = "Acme",
                },
                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;


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

            $shippoAccountUpdateRequest = new
            Components\ShippoAccountUpdateRequest(
                email: 'hippo@shippo.com',
                firstName: 'Shippo',
                lastName: 'Meister',
                companyName: 'Acme',
            );


            $response = $sdk->shippoAccounts->create(
                shippoAccountUpdateRequest: $shippoAccountUpdateRequest,
                shippoApiVersion: '2018-02-08'

            );


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


            import com.goshippo.shippo_sdk.Shippo;

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

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

            import java.lang.Exception;


            public class Application {

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

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

                    CreateShippoAccountResponse res = sdk.shippoAccounts().create()
                            .shippoApiVersion("2018-02-08")
                            .shippoAccountUpdateRequest(ShippoAccountUpdateRequest.builder()
                                .email("hippo@shippo.com")
                                .firstName("Shippo")
                                .lastName("Meister")
                                .companyName("Acme")
                                .build())
                            .call();

                    if (res.shippoAccount().isPresent()) {
                        // handle response
                    }
                }
            }
  /shippo-accounts/{ShippoAccountId}:
    get:
      description: Returns a Shippo Managed Account using an object ID.
      operationId: GetShippoAccount
      parameters:
        - $ref: '#/components/parameters/ShippoAccountIdPathParam'
        - $ref: '#/components/parameters/ShippoApiVersionHeader'
      responses:
        '200':
          $ref: '#/components/responses/shippoAccountResponse'
        '400':
          $ref: '#/components/responses/badRequestResponse'
      summary: Retrieve a Shippo Account
      tags:
        - Shippo Accounts
      x-codeSamples:
        - lang: python
          label: Python
          source: |-
            import shippo

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


            res = s.shippo_accounts.get(shippo_account_id='<id>')

            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.shippoAccounts.get("<id>");

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

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

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

            var res = await sdk.ShippoAccounts.GetAsync(
                shippoAccountId: "<id>",
                shippoApiVersion: "2018-02-08"
            );

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

            require 'vendor/autoload.php';

            use Shippo\API;

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



            $response = $sdk->shippoAccounts->get(
                shippoAccountId: '<id>',
                shippoApiVersion: '2018-02-08'

            );

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


            import com.goshippo.shippo_sdk.Shippo;

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

            import java.lang.Exception;


            public class Application {

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

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

                    GetShippoAccountResponse res = sdk.shippoAccounts().get()
                            .shippoAccountId("<id>")
                            .shippoApiVersion("2018-02-08")
                            .call();

                    if (res.shippoAccount().isPresent()) {
                        // handle response
                    }
                }
            }
    put:
      description: Updates a Shippo Managed Account using an object ID.
      operationId: UpdateShippoAccount
      parameters:
        - $ref: '#/components/parameters/ShippoAccountIdPathParam'
        - $ref: '#/components/parameters/ShippoApiVersionHeader'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ShippoAccountUpdateRequest'
      responses:
        '200':
          $ref: '#/components/responses/shippoAccountResponse'
        '400':
          $ref: '#/components/responses/badRequestResponse'
      summary: Update a Shippo Account
      tags:
        - Shippo Accounts
      x-codeSamples:
        - lang: python
          label: Python
          source: >-
            import shippo

            from shippo.models import components


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



            res = s.shippo_accounts.update(shippo_account_id='<id>',
            shippo_account_update_request=components.ShippoAccountUpdateRequest(
                email='hippo@shippo.com',
                first_name='Shippo',
                last_name='Meister',
                company_name='Acme',
            ))


            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.shippoAccounts.update("<id>", {
                email: "hippo@shippo.com",
                firstName: "Shippo",
                lastName: "Meister",
                companyName: "Acme",
              });

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

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

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

            var res = await sdk.ShippoAccounts.UpdateAsync(
                shippoAccountId: "<id>",
                shippoApiVersion: "2018-02-08",
                shippoAccountUpdateRequest: new ShippoAccountUpdateRequest() {
                    Email = "hippo@shippo.com",
                    FirstName = "Shippo",
                    LastName = "Meister",
                    CompanyName = "Acme",
                }
            );

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


            require 'vendor/autoload.php';


            use Shippo\API;

            use Shippo\API\Models\Components;


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

            $shippoAccountUpdateRequest = new
            Components\ShippoAccountUpdateRequest(
                email: 'hippo@shippo.com',
                firstName: 'Shippo',
                lastName: 'Meister',
                companyName: 'Acme',
            );


            $response = $sdk->shippoAccounts->update(
                shippoAccountId: '<id>',
                shippoApiVersion: '2018-02-08',
                shippoAccountUpdateRequest: $shippoAccountUpdateRequest

            );


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


            import com.goshippo.shippo_sdk.Shippo;

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

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

            import java.lang.Exception;


            public class Application {

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

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

                    UpdateShippoAccountResponse res = sdk.shippoAccounts().update()
                            .shippoAccountId("<id>")
                            .shippoApiVersion("2018-02-08")
                            .shippoAccountUpdateRequest(ShippoAccountUpdateRequest.builder()
                                .email("hippo@shippo.com")
                                .firstName("Shippo")
                                .lastName("Meister")
                                .companyName("Acme")
                                .build())
                            .call();

                    if (res.shippoAccount().isPresent()) {
                        // handle response
                    }
                }
            }
  /webhooks:
    post:
      description: >-
        Creates a new webhook to send notifications to a URL when a specific
        event occurs.
      summary: Create a new webhook
      operationId: createWebhook
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebhookUpdateRequest'
      responses:
        '201':
          description: Webhook created successfully
          $ref: '#/components/responses/webhookResponse'
      tags:
        - Webhooks
      x-codeSamples:
        - lang: python
          label: Python
          source: >-
            import shippo

            from shippo.models import components


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



            res =
            s.webhooks.create_webhook(request=components.WebhookUpdateRequest(
                event=components.WebhookEventTypeEnum.BATCH_CREATED,
                url='https://example.com/shippo-webhook',
                active=True,
                is_test=False,
            ))


            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.webhooks.createWebhook({
                event: "batch_created",
                url: "https://example.com/shippo-webhook",
                active: true,
                isTest: false,
              });

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

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

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

            WebhookUpdateRequest req = new WebhookUpdateRequest() {
                Event = WebhookEventTypeEnum.BatchCreated,
                Url = "https://example.com/shippo-webhook",
                Active = true,
                IsTest = false,
            };

            var res = await sdk.Webhooks.CreateWebhookAsync(req);

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

            require 'vendor/autoload.php';

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

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

            $request = new Components\WebhookUpdateRequest(
                event: Components\WebhookEventTypeEnum::BatchCreated,
                url: 'https://example.com/shippo-webhook',
                active: true,
                isTest: false,
            );

            $response = $sdk->webhooks->createWebhook(
                request: $request
            );

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


            import com.goshippo.shippo_sdk.Shippo;

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

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

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

            import java.lang.Exception;


            public class Application {

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

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

                    WebhookUpdateRequest req = WebhookUpdateRequest.builder()
                            .event(WebhookEventTypeEnum.BATCH_CREATED)
                            .url("https://example.com/shippo-webhook")
                            .active(true)
                            .isTest(false)
                            .build();

                    CreateWebhookResponse res = sdk.webhooks().createWebhook()
                            .request(req)
                            .call();

                    if (res.webhook().isPresent()) {
                        // handle response
                    }
                }
            }
    get:
      summary: List all webhooks
      description: Returns a list of all webhooks you have created.
      operationId: listWebhooks
      responses:
        '200':
          description: List of webhooks
          $ref: '#/components/responses/webhookPaginatedResponse'
      tags:
        - Webhooks
      x-codeSamples:
        - lang: python
          label: Python
          source: |-
            import shippo

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


            res = s.webhooks.list_webhooks()

            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.webhooks.listWebhooks();

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

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

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

            var res = await sdk.Webhooks.ListWebhooksAsync();

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

            require 'vendor/autoload.php';

            use Shippo\API;

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



            $response = $sdk->webhooks->listWebhooks(

            );

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


            import com.goshippo.shippo_sdk.Shippo;

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

            import java.lang.Exception;


            public class Application {

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

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

                    ListWebhooksResponse res = sdk.webhooks().listWebhooks()
                            .call();

                    if (res.webhookPaginatedList().isPresent()) {
                        // handle response
                    }
                }
            }
  /webhooks/{webhookId}:
    get:
      summary: Retrieve a specific webhook
      description: Returns the details of a specific webhook using the webhook object ID.
      operationId: getWebhook
      parameters:
        - name: webhookId
          description: Object ID of the webhook to retrieve
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Webhook details
          $ref: '#/components/responses/webhookResponse'
      tags:
        - Webhooks
      x-codeSamples:
        - lang: python
          label: Python
          source: |-
            import shippo

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


            res = s.webhooks.get_webhook(webhook_id='<id>')

            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.webhooks.getWebhook("<id>");

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

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

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

            var res = await sdk.Webhooks.GetWebhookAsync(webhookId: "<id>");

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

            require 'vendor/autoload.php';

            use Shippo\API;

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



            $response = $sdk->webhooks->getWebhook(
                webhookId: '<id>'
            );

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

            import com.goshippo.shippo_sdk.Shippo;
            import com.goshippo.shippo_sdk.models.operations.GetWebhookResponse;
            import java.lang.Exception;

            public class Application {

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

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

                    GetWebhookResponse res = sdk.webhooks().getWebhook()
                            .webhookId("<id>")
                            .call();

                    if (res.webhook().isPresent()) {
                        // handle response
                    }
                }
            }
    put:
      description: Updates an existing webhook using the webhook object ID.
      summary: Update an existing webhook
      operationId: updateWebhook
      parameters:
        - name: webhookId
          description: Object ID of the webhook to retrieve
          in: path
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebhookUpdateRequest'
      responses:
        '200':
          description: Webhook updated successfully
          $ref: '#/components/responses/webhookResponse'
      tags:
        - Webhooks
      x-codeSamples:
        - lang: python
          label: Python
          source: >-
            import shippo

            from shippo.models import components


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



            res =
            s.webhooks.update_webhook(webhook_update_request=components.WebhookUpdateRequest(
                event=components.WebhookEventTypeEnum.BATCH_CREATED,
                url='https://example.com/shippo-webhook',
                active=True,
                is_test=False,
            ), webhook_id='<id>')


            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.webhooks.updateWebhook({
                event: "batch_created",
                url: "https://example.com/shippo-webhook",
                active: true,
                isTest: false,
              }, "<id>");

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

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

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

            var res = await sdk.Webhooks.UpdateWebhookAsync(
                webhookId: "<id>",
                webhookUpdateRequest: new WebhookUpdateRequest() {
                    Event = WebhookEventTypeEnum.BatchCreated,
                    Url = "https://example.com/shippo-webhook",
                    Active = true,
                    IsTest = false,
                }
            );

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

            require 'vendor/autoload.php';

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

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

            $webhookUpdateRequest = new Components\WebhookUpdateRequest(
                event: Components\WebhookEventTypeEnum::BatchCreated,
                url: 'https://example.com/shippo-webhook',
                active: true,
                isTest: false,
            );

            $response = $sdk->webhooks->updateWebhook(
                webhookId: '<id>',
                webhookUpdateRequest: $webhookUpdateRequest

            );

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


            import com.goshippo.shippo_sdk.Shippo;

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

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

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

            import java.lang.Exception;


            public class Application {

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

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

                    UpdateWebhookResponse res = sdk.webhooks().updateWebhook()
                            .webhookId("<id>")
                            .webhookUpdateRequest(WebhookUpdateRequest.builder()
                                .event(WebhookEventTypeEnum.BATCH_CREATED)
                                .url("https://example.com/shippo-webhook")
                                .active(true)
                                .isTest(false)
                                .build())
                            .call();

                    if (res.webhook().isPresent()) {
                        // handle response
                    }
                }
            }
    delete:
      summary: Delete a specific webhook
      description: Deletes a specific webhook using the webhook object ID.
      operationId: deleteWebhook
      parameters:
        - name: webhookId
          description: Object ID of the webhook to delete
          in: path
          required: true
          schema:
            type: string
      responses:
        '204':
          description: Webhook deleted successfully
      tags:
        - Webhooks
      x-codeSamples:
        - lang: python
          label: Python
          source: |-
            import shippo

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


            s.webhooks.delete_webhook(webhook_id='<id>')

            # Use the SDK ...
        - lang: typescript
          label: Typescript
          source: |-
            import { Shippo } from "shippo";

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

            async function run() {
              await shippo.webhooks.deleteWebhook("<id>");


            }

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

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

            await sdk.Webhooks.DeleteWebhookAsync(webhookId: "<id>");

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

            require 'vendor/autoload.php';

            use Shippo\API;

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



            $response = $sdk->webhooks->deleteWebhook(
                webhookId: '<id>'
            );

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


            import com.goshippo.shippo_sdk.Shippo;

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

            import java.lang.Exception;


            public class Application {

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

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

                    DeleteWebhookResponse res = sdk.webhooks().deleteWebhook()
                            .webhookId("<id>")
                            .call();

                    // handle response
                }
            }
components:
  parameters:
    PageTokenQueryParam:
      description: The page token for paginated results
      in: query
      name: page_token
      required: false
      schema:
        type: string
    PageNumberQueryParam:
      description: The page number you want to select
      in: query
      name: page
      schema:
        type: integer
        format: int64
        default: 1
    ResultsPerPageQueryParam:
      description: The number of results to return per page (max 100)
      in: query
      name: results
      schema:
        type: integer
        format: int64
        maximum: 100
        default: 25
    ResultsPerPageDefault5QueryParam:
      description: The number of results to return per page (max 100, default 5)
      in: query
      name: results
      schema:
        type: integer
        format: int64
        maximum: 100
        default: 5
    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
    ObjectCreatedGtQueryParam:
      description: Object(s) created greater than a provided date and time.
      in: query
      name: object_created_gt
      required: false
      schema:
        type: string
    ObjectCreatedGteQueryParam:
      description: Object(s) created greater than or equal to a provided date and time.
      in: query
      name: object_created_gte
      required: false
      schema:
        type: string
    ObjectCreatedLtQueryParam:
      description: Object(s) created lesser than a provided date and time.
      in: query
      name: object_created_lt
      required: false
      schema:
        type: string
    ObjectCreatedLteQueryParam:
      description: Object(s) created lesser than or equal to a provided date and time.
      in: query
      name: object_created_lte
      required: false
      schema:
        type: string
    ShippoAccountIdPathParam:
      description: Object ID of the ShippoAccount
      in: path
      name: ShippoAccountId
      required: true
      schema:
        type: string
  responses:
    carrierParcelTemplateListResponse:
      description: List of carrier parcel templates
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/CarrierParcelTemplateList'
    userParcelTemplateListResponse:
      description: List of user parcel templates
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/UserParcelTemplateList'
    trackResponse:
      description: Tracking status
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Track'
    serviceGroupResponse:
      description: Service group
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ServiceGroup'
    serviceGroupListResponse:
      description: List of service groups
      content:
        application/json:
          schema:
            items:
              $ref: '#/components/schemas/ServiceGroup'
            type: array
    defaultParcelTemplateResponse:
      description: Default parcel template
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/DefaultParcelTemplate'
    transactionPaginatedResponse:
      description: Paginated list of transactions
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/TransactionPaginatedList'
    invoiceResponse:
      description: Invoice
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Invoice'
    invoicePaginatedResponse:
      description: Paginated list of invoices
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/InvoicePaginatedList'
    invoiceItemsPaginatedResponse:
      description: Paginated list of invoice items
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/InvoiceItemPaginatedList'
    addressPaginatedResponse:
      description: Paginated list of addresses
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/AddressPaginatedList'
    customsDeclarationPaginatedResponse:
      description: Paginated list of customs declarations
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/CustomsDeclarationPaginatedList'
    customsItemPaginatedResponse:
      description: Paginated list of customs items
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/CustomsItemPaginatedList'
    manifestPaginatedResponse:
      description: Paginated list of manifests
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ManifestPaginatedList'
    refundPaginatedResponse:
      description: Paginated list of refunds
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/RefundPaginatedList'
    orderPaginatedResponse:
      description: Paginated list of orders
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/OrderPaginatedList'
    parcelPaginatedResponse:
      description: Paginated list of parcels
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ParcelPaginatedList'
    ratePaginatedResponse:
      description: Paginated list of rates
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/RatePaginatedList'
    shipmentPaginatedResponse:
      description: Paginated list of shipments
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ShipmentPaginatedList'
    badRequestResponse:
      description: Bad request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/BadRequest'
    carrierAccountResponse:
      description: Carrier account
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/CarrierAccount'
    carrierAccountPaginatedResponse:
      description: Paginated list of carrier accounts
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/CarrierAccountPaginatedList'
    liveRatePaginatedResponse:
      description: Paginated list of live rates
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/LiveRatePaginatedList'
    addressResponse:
      description: Address
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Address'
    batchResponse:
      description: Batch
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Batch'
    carrierParcelTemplateResponse:
      description: Carrier parcel template
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/CarrierParcelTemplate'
    customsDeclarationResponse:
      description: Customs declaration
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/CustomsDeclaration'
    customsItemResponse:
      description: Customs item
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/CustomsItem'
    manifestResponse:
      description: Manifest
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Manifest'
    orderResponse:
      description: Order
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Order'
    parcelResponse:
      description: Parcel
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Parcel'
    pickupResponse:
      description: Pickup
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Pickup'
    rateResponse:
      description: Rate
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Rate'
    refundResponse:
      description: Refund
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Refund'
    shipmentResponse:
      description: Shipment
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Shipment'
    transactionResponse:
      description: Transaction
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Transaction'
    transactionCreateResponse:
      description: Created transaction
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Transaction'
    userParcelTemplateResponse:
      description: User parcel template
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/UserParcelTemplate'
    shippoAccountPaginatedResponse:
      description: Paginated list of Shippo accounts
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ShippoAccountPaginatedList'
    shippoAccountResponse:
      description: Shippo account
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ShippoAccount'
    webhookResponse:
      description: Webhook
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Webhook'
    webhookPaginatedResponse:
      description: Paginated list of webhooks
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/WebhookPaginatedList'
    carrierAccountRegistrationStatusResponse:
      description: Carrier account registration status
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/CarrierAccountRegistrationStatus'
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: Authorization
      x-token-prefix: ShippoToken
      x-token-format: ShippoToken {token}
      x-default: ShippoToken shippo_test_d41a6f04796998570c521a50828eae8e3cccf0eb
      description: |
        API key authentication using the ShippoToken scheme.
        Format: Authorization: ShippoToken <API_TOKEN>
        Example: Authorization: ShippoToken shippo_live_abc123
    shippoOAuth:
      type: oauth2
      description: |
        OAuth2 authentication with Shippo.
        Users will be redirected to Shippo to authorize access to their account.
      flows:
        clientCredentials:
          tokenUrl: https://goshippo.com/oauth/access_token
          scopes:
            '*': Full access to Shippo API
        authorizationCode:
          authorizationUrl: https://goshippo.com/oauth/authorize
          tokenUrl: https://goshippo.com/oauth/access_token
          scopes:
            '*': Full access to Shippo API
  schemas:
    PaginatedList:
      properties:
        next:
          example: baseurl?page=3&results=10
          type: string
        previous:
          example: baseurl?page=1&results=10
          type: string
      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
    Address:
      x-tags:
        - Addresses
      allOf:
        - $ref: '#/components/schemas/AddressBase'
        - properties:
            is_complete:
              example: true
              type: boolean
              description: >-
                Complete addresses contain all required
                values.<br><br>Incomplete addresses have failed one or multiple 

                validations.<br>Incomplete Addresses are eligible for requesting
                rates but lack at least one required 

                value for purchasing labels.
            latitude:
              description: Latitude of address
              type:
                - number
                - string
            longitude:
              description: Longitude of address
              type:
                - number
                - string
            object_created:
              example: '2014-07-09T02:19:13.174Z'
              format: date-time
              type: string
              description: Date and time of Address creation.
            object_id:
              example: d799c2679e644279b59fe661ac8fa488
              type: string
              description: |-
                Unique identifier of the given Address object. 
                This ID is required to create a Shipment object.
            object_owner:
              example: shippotle@shippo.com
              type: string
              description: Username of the user who created the Address object.
            object_updated:
              example: '2014-07-09T02:19:13.174Z'
              format: date-time
              type: string
              description: >-
                Date and time of last Address update. Since you cannot update
                Addresses after they were created, this time 

                stamp reflects the time when the Address was changed by Shippo's
                systems for the last time, e.g., during the 

                approximation of one or more values.
            validation_results:
              $ref: '#/components/schemas/AddressValidationResults'
            test:
              type: boolean
              example: false
              description: Indicates whether the object has been created in test mode.
          required:
            - country
    AddressTo:
      allOf:
        - $ref: '#/components/schemas/Address'
      description: >-
        <a href="/shippoapi/public-api/addresses">Address</a> object of the
        recipient / buyer. Will be returned expanded by default.
    AddressFrom:
      allOf:
        - $ref: '#/components/schemas/Address'
      description: >-
        <a href="/shippoapi/public-api/addresses">Address</a> object of the
        sender / seller. Will be returned expanded by default.
    AddressReturn:
      allOf:
        - $ref: '#/components/schemas/Address'
      description: >-
        ID of the Address object where the shipment will be sent back to if it
        is not delivered 

        (Only available for UPS, USPS, and Fedex shipments). <br/> 

        If this field is not set, your shipments will be returned to the
        address_from.
    AddressCreateRequest:
      allOf:
        - $ref: '#/components/schemas/AddressBase'
        - properties:
            validate:
              description: Set to true to validate Address object.
              example: true
              type: boolean
          required:
            - country
    AddressFromCreateRequest:
      allOf:
        - $ref: '#/components/schemas/AddressCreateRequest'
      description: >-
        <a href="/shippoapi/public-api/addresses">Address</a> object of the
        sender / seller. Will be returned expanded by default..
    AddressToCreateRequest:
      allOf:
        - $ref: '#/components/schemas/AddressCreateRequest'
      description: >-
        <a href="/shippoapi/public-api/addresses">Address</a> object of the
        recipient / buyer. Will be returned expanded by default.
    AddressCompleteCreateRequest:
      allOf:
        - $ref: '#/components/schemas/AddressBase'
        - properties:
            validate:
              example: true
              type: boolean
          required:
            - name
            - street1
            - city
            - state
            - zip
            - country
    AddressPickupCompleteCreateRequest:
      allOf:
        - $ref: '#/components/schemas/AddressCompleteCreateRequest'
      description: >-
        The pickup 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.
    AddressPaginatedList:
      allOf:
        - $ref: '#/components/schemas/PaginatedList'
        - properties:
            results:
              items:
                $ref: '#/components/schemas/AddressTo'
              type: array
    AddressImporter:
      description: Object that represents the address of the importer
      type: object
      properties:
        name:
          description: First and Last Name of the addressee
          example: Shwan Ippotle
          type: string
        company:
          example: Shippo
          type: string
          description: Company Name
        street1:
          description: >-
            First street line, 35 character limit. Usually street number and
            street name (except for DHL Germany, see street_no).
          example: Blumenstraße
          type: string
        street2:
          type: string
          description: Second street line, 35 character limit.
        street3:
          type: string
          example: ''
          description: >-
            Third street line, 35 character limit. 

            Only accepted for USPS international shipments, UPS domestic and UPS
            international shipments.
        street_no:
          type: string
          example: '22'
          description: >-
            Street number of the addressed building. 

            This field can be included in street1 for all carriers except for
            DHL Germany.
        city:
          description: Name of a city
          example: München
          type: string
        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.
          example: CA
          type: string
        zip:
          description: Postal code of an Address.
          example: '80331'
          type: string
        country:
          example: DE
          type: string
          description: >-
            Example: `US` or `DE`. All accepted values can be found on the 

            <a href="http://www.iso.org/" target="blank">Official ISO
            Website</a>.

            Sending a country is always required.
        phone:
          example: '80331'
          type: string
          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.    
        email:
          example: shippotle@shippo.com
          type: string
          description: E-mail address of the contact person, RFC3696/5321-compliant.
        is_residential:
          example: true
          type: boolean
          description: >-
            Indicates whether the address provided is a residential address or
            not.
    AddressValidationResults:
      description: >-
        Object that contains information regarding if an address had been
        validated or not. Also contains any messages 

        generated during validation. Children keys are
        <code>is_valid</code>(boolean) and <code>messages</code>(array).
      properties:
        is_valid:
          example: false
          type: boolean
        messages:
          items:
            $ref: '#/components/schemas/AddressValidationResultsMessage'
          type: array
      type: object
    AddressValidationResultsMessage:
      properties:
        code:
          type: string
          example: Unknown Street
          description: >-
            See <a href="/shippoapi/public-api/address-validation-codes">Address
            Validation Codes</a>
        source:
          type: string
          example: Shippo Address Validator
          description: >-
            See <a
            href="/shippoapi/public-api/address-validation-source">Address
            Validation Source</a>
        text:
          example: >-
            City, State and ZIP Code are valid, but street address is not a
            match.
          type: string
        type:
          example: address_warning
          type: string
      type: object
    AddressValidationResultsMessageCodeEnum:
      type: string
      enum:
        - 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
      x-speakeasy-include: true
    AddressValidationResultsMessageSourceEnum:
      type: string
      enum:
        - Shippo Address Validator
        - UPS
      x-speakeasy-include: true
    Alcohol:
      description: Indicates that a shipment contains Alcohol (Fedex and UPS only).
      properties:
        contains_alcohol:
          type: boolean
          description: >-
            Mandatory for Fedex and UPS. Specifies that the package contains
            Alcohol.
        recipient_type:
          enum:
            - licensee
            - consumer
          description: >-
            Mandatory for Fedex only. License type of the recipient of the
            Alcohol Package.
      type: object
    AmountAndCurrencyCharged:
      description: >-
        The amount and currency that was charged after possible currency
        conversion occurred.
      properties:
        amount:
          description: The money amount
          example: '5.52'
          type: string
        currency:
          description: >-
            The currency that 'amount' is in. The official ISO 4217 currency
            codes are used, e.g. "USD" or "EUR".

            <a href="http://www.xe.com/iso4217.php" target="blank">ISO 4217
            Standard</a>.
          example: USD
          type: string
      type: object
    AmountAndCurrencyInvoiced:
      description: The amount and currency.
      properties:
        amount:
          description: The money amount
          example: '5.52'
          type: string
        currency:
          description: >-
            The currency that 'amount' is in. The official ISO 4217 currency
            codes are used, e.g. "USD" or "EUR".

            <a href="http://www.xe.com/iso4217.php" target="blank">ISO 4217
            Standard</a>.
          example: USD
          type: string
      type: object
    ConversionAmount:
      description: Invoice Item's amount after currency conversion took place.
      properties:
        rate:
          example: '0.89'
          type: string
          description: >-
            Currency conversion rate, relative to USD, that was used to
            calculate the converted amount.
        time:
          type: string
          format: date-time
          description: Date and time the currency conversion took place.
        amount:
          description: The money amount after currency conversion.
          example: '4.91'
          type: string
        currency:
          description: >-
            The currency that 'amount' is in. The official ISO 4217 currency
            codes are used, e.g. "USD" or "EUR".

            <a href="http://www.xe.com/iso4217.php" target="blank">ISO 4217
            Standard</a>.
          example: USD
          type: string
      type: object
    BatchBase:
      properties:
        default_carrier_account:
          description: >-
            ID of the Carrier Account object to use as the default for all
            shipments in this Batch. 

            The carrier account can be changed on a per-shipment basis by
            changing the carrier_account in the 

            corresponding BatchShipment object.
          example: 078870331023437cb917f5187429b093
          type: string
        default_servicelevel_token:
          description: >-
            Token of the service level to use as the default for all shipments
            in this Batch. 

            The servicelevel can be changed on a per-shipment basis by changing
            the servicelevel_token in the 

            corresponding BatchShipment object. <a
            href="/shippoapi/public-api/service-levels">Servicelevel tokens can
            be found here.</a>
          example: usps_priority
          type: string
        label_filetype:
          $ref: '#/components/schemas/LabelFileTypeEnum'
        metadata:
          description: >-
            A string of up to 100 characters that can be filled with any
            additional information you want to attach to the object.
          example: 'BATCH #1'
          maxLength: 100
          type: string
      required:
        - default_carrier_account
        - default_servicelevel_token
      type: object
    Batch:
      x-tags:
        - Batches
      allOf:
        - $ref: '#/components/schemas/BatchBase'
        - properties:
            batch_shipments:
              $ref: '#/components/schemas/BatchShipmentPaginatedList'
            label_url:
              description: >-
                An array of URLs each pointing to a merged file of 100 labels
                each
              items:
                type: string
              type: array
            object_created:
              description: Date and time of Batch creation
              example: '2016-01-04T00:15:44.394Z'
              type: string
            object_id:
              description: Unique identifier of the given Batch object
              example: 5ef63c54f5bf45d3b1f8fb37dcb1c5f4
              type: string
            object_owner:
              description: Username of the user who created the Batch object.
              example: shippo@shippo.com
              type: string
            object_results:
              description: >-
                An object containing the following
                counts:<br>`creation_succeeded`<br>`creation_failed`<br>`purchase_succeeded`<br>`purchase_failed`
              properties:
                creation_failed:
                  example: 3
                  format: int64
                  type: integer
                creation_succeeded:
                  example: 5
                  format: int64
                  type: integer
                purchase_failed:
                  example: 0
                  format: int64
                  type: integer
                purchase_succeeded:
                  example: 0
                  format: int64
                  type: integer
              required:
                - purchase_failed
                - purchase_succeeded
                - creation_failed
                - creation_succeeded
              type: object
            object_updated:
              description: Date and time of last update to the Batch
              example: '2016-01-04T00:48:13.841Z'
              type: string
            status:
              description: >-
                Batches that are `VALIDATING` are being created and
                validated<br>

                `VALID` batches can be purchased<br>

                `INVALID` batches cannot be purchased, `INVALID` BatchShipments
                must be removed<br>

                Batches that are in the `PURCHASING` state are being
                purchased<br>

                `PURCHASED` batches are finished purchasing.
              enum:
                - VALIDATING
                - VALID
                - INVALID
                - PURCHASING
                - PURCHASED
              example: VALID
              type: string
            test:
              example: false
              type: boolean
          required:
            - object_id
            - object_owner
            - status
            - object_created
            - object_updated
            - batch_shipments
            - object_results
            - label_url
    BatchCreateRequest:
      allOf:
        - $ref: '#/components/schemas/BatchBase'
        - properties:
            batch_shipments:
              description: >-
                Array of BatchShipment objects. The response keeps the same
                order as in the request array.
              items:
                $ref: '#/components/schemas/BatchShipmentCreateRequest'
              type: array
          required:
            - batch_shipments
    BatchShipmentBase:
      properties:
        carrier_account:
          description: >-
            Object ID of the carrier account to be used for this shipment (will
            override batch default)
          example: a4391cd4ab974f478f55dc08b5c8e3b3
          type: string
        metadata:
          description: >-
            A string of up to 100 characters that can be filled with any
            additional information you want 

            to attach to the object.
          example: 'SHIPMENT #1'
          maxLength: 100
          type: string
        servicelevel_token:
          description: >-
            A token that sets the shipping method for the batch, overriding the
            batch default. 

            Servicelevel tokens can be found <a
            href="/shippoapi/public-api/service-levels">in this list</a> 

            or <a
            href="/shippoapi/public-api/carrier-accounts/listcarrieraccounts">at
            this endpoint</a>.
          example: fedex_ground
          type: string
      type: object
    BatchShipment:
      title: Batch Shipment
      x-tags:
        - Batches
      description: >-
        The batch shipment object is a wrapper around a shipment object, which
        include shipment-specific information

        for batch processing.


        Note: batch shipments can only be created on the batch endpoint, either
        when creating a batch object or by through

        the `/batches/{BATCH_OBJECT_ID}/add_shipments` endpoint
      allOf:
        - $ref: '#/components/schemas/BatchShipmentBase'
        - properties:
            messages:
              description: List of Shipment and Transaction error messages.
              type: array
              items: {}
            object_id:
              description: >-
                Object ID of this batch shipment. Can be used in the
                remove_shipments endpoint.
              example: e11c95a6788d4ddcaa22f03175838740
              type: string
            shipment:
              description: >-
                Object ID of the shipment object created for this batch
                shipment.
              example: adcfdddf8ec64b84ad22772bce3ea37a
              type: string
            status:
              description: >-
                `INVALID` batch shipments cannot be purchased and will have to
                be removed, fixed, and added to the batch again.<br>

                `VALID` batch shipments can be purchased. <br>

                Batch shipments with the status `TRANSACTION_FAILED` were not
                able to be purchased and the error will be displayed on the
                message field<br> 

                `INCOMPLETE` batch shipments have an issue with the Address and
                will need to be removed, fixed, and added to the batch again.
              enum:
                - INVALID
                - VALID
                - INCOMPLETE
                - TRANSACTION_FAILED
              example: INVALID
              type: string
            transaction:
              description: >-
                Object ID of the transaction object created for this batch
                shipment.
              example: 4c33736a67e2450da88b38c42deef6b7
              type: string
          required:
            - shipment
            - object_id
            - status
    BatchShipmentCreateRequest:
      allOf:
        - $ref: '#/components/schemas/BatchShipmentBase'
        - properties:
            shipment:
              $ref: '#/components/schemas/ShipmentCreateRequest'
      required:
        - shipment
      type: object
    BatchShipmentPaginatedList:
      allOf:
        - $ref: '#/components/schemas/PaginatedList'
        - description: >-
            Array of <a
            href="/shippoapi/public-api/batches/batchshipment">BatchShipment</a>
            objects. 

            The response keeps the same order as in the request array.
          properties:
            results:
              items:
                $ref: '#/components/schemas/BatchShipment'
              type: array
    Billing:
      description: Specify billing details (UPS, FedEx, and DHL Germany only).
      properties:
        account:
          type: string
          description: >-
            Account number to be billed. (For DHL Germany, leave this field
            blank.)
        country:
          type: string
          format: iso-3166
          description: >-
            Country iso2 code of account number to be billed (required for UPS
            third party billing only).
        participation_code:
          type: string
          description: >-
            2 digit code used to override your default participation code
            associated with your DHL Germany account.
        type:
          enum:
            - SENDER
            - RECIPIENT
            - THIRD_PARTY
            - THIRD_PARTY_CONSIGNEE
            - COLLECT
          description: Party to be billed. (Leave blank for DHL Germany.)
        zip:
          type: string
          description: >-
            ZIP code of account number to be billed (required for UPS if there
            is a zip on the billing account).
      type: object
    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
    CarrierParcelTemplateList:
      properties:
        results:
          items:
            $ref: '#/components/schemas/CarrierParcelTemplate'
          type: array
      type: object
    CarrierParcelTemplate:
      x-tags:
        - Carrier Parcel Templates
      properties:
        carrier:
          description: The name of the carrier that provides this parcel template
          example: FedEx
          type: string
        distance_unit:
          $ref: '#/components/schemas/DistanceUnitEnum'
        height:
          description: >-
            The height of the package, in units specified by the distance_unit
            attribute
          example: '1.5'
          type: string
        is_variable_dimensions:
          description: >-
            True if the carrier parcel template allows custom dimensions, such
            as USPS Softpack.
          example: false
          type: boolean
        length:
          description: >-
            The length of the package, in units specified by the distance_unit
            attribute
          example: '12.375'
          type: string
        name:
          description: The name of the carrier parcel template
          example: FedEx® Small Box (S1)
          type: string
        token:
          description: The unique string representation of the carrier parcel template
          example: FedEx_Box_Small_1
          type: string
        width:
          description: >-
            The width of the package, in units specified by the distance_unit
            attribute
          example: '10.875'
          type: string
      title: Carrier Parcel Template
      type: object
    ConnectExistingOwnAccountRequest:
      title: Account parameters
      properties:
        account_id:
          example: '321123'
          type: string
        active:
          type: boolean
        carrier:
          example: fedex
          type: string
        metadata:
          example: FEDEX Account
          type: string
        parameters:
          oneOf:
            - $ref: '#/components/schemas/ConnectExistingOwnAccountParameters'
            - $ref: '#/components/schemas/FedExConnectExistingOwnAccountParameters'
            - $ref: '#/components/schemas/UPSConnectExistingOwnAccountParameters'
        test:
          example: false
          type: boolean
      required:
        - carrier
        - account_id
        - parameters
      type: object
    CustomerReference:
      description: Specify the reference field on the label (FedEx and UPS only).
      properties:
        prefix:
          type: string
          description: >-
            Custom prefix for customer reference field (ZPL labels only). Up to
            11 characters, including trailing 

            spaces. Empty string indicates removal of default prefix. To use the
            default prefix, do not include

            this property.
        value:
          type: string
          maxLength: 40
          description: >-
            Optional text to be printed on the shipping label for customer
            reference. Up to 40 characters. If

            this is provided, reference_1 will be ignored.


            **Carrier-Specific Constraints:**

            | Carrier | Constraints |

            |:---|:---|

            | FedEx | Max 40 characters (Express services); Max 30 characters
            (Ground services) |
        ref_sort:
          type: integer
          description: >-
            Order UPS reference fields are printed on ZPL labels. For UPS
            shipments, if you choose to set `ref_sort` for one reference, you
            must set `ref_sort` for all other supported UPS references using
            unique integers.
          example: 1
      type: object
    CustomsDeclarationBase:
      properties:
        aes_itn:
          description: |-
            **required if eel_pfc is `AES_ITN`**<br>
            AES / ITN reference of the shipment.
          type: string
        b13a_filing_option:
          type: string
        b13a_number:
          description: >-
            **must be provided if and only if b13a_filing_option is
            provided**<br>

            Represents:<br> the Proof of Report (POR) Number when
            b13a_filing_option is `FILED_ELECTRONICALLY`;<br> 

            the Summary ID Number when b13a_filing_option is
            `SUMMARY_REPORTING`;<br> 

            or the Exemption Number when b13a_filing_option is `NOT_REQUIRED`.
          type: string
        certificate:
          type: string
          description: Certificate reference of the shipment.
        certify:
          example: true
          type: boolean
          description: >-
            Expresses that the certify_signer has provided all information of
            this customs declaration truthfully.
        certify_signer:
          example: Shawn Ippotle
          type: string
          description: >-
            Name of the person who created the customs declaration and is
            responsible for the validity of all 

            information provided.
        commercial_invoice:
          type: boolean
        contents_explanation:
          description: |-
            **required if contents_type is `OTHER`**<br>
            Explanation of the type of goods of the shipment.
          example: T-Shirt purchase
          type: string
        disclaimer:
          type: string
          maxLength: 1000
          description: >-
            Disclaimer for the shipment and customs information that have been
            provided.


            **Carrier-Specific Constraints:**

            | Carrier | Constraints |

            |:---|:---|

            | FedEx | Max 554 characters |
        duties_payor:
          description: >-
            Specifies who will pay the duties for the shipment. Only accepted
            for FedEx shipments.
          type: object
          properties:
            account:
              type: string
              description: Account number to be billed for duties.
              example: '2323434543'
            type:
              enum:
                - SENDER
                - RECIPIENT
                - THIRD_PARTY
              description: Party to be billed for duties.
              example: THIRD_PARTY
            address:
              type: object
              properties:
                name:
                  type: string
                  description: Name of the party to be billed for duties.
                  example: Patrick Kavanagh
                zip:
                  type: string
                  description: Postal code of the party to be billed for duties.
                  example: '80331'
                country:
                  type: string
                  description: Country ISO code of account number to be billed.
                  example: DE
        exporter_identification:
          $ref: '#/components/schemas/CustomsExporterIdentification'
        exporter_reference:
          type: string
          description: Exporter reference of an export shipment.
        importer_reference:
          type: string
          description: Importer reference of an import shipment.
        is_vat_collected:
          type: boolean
          description: >-
            Indicates whether the shipment's destination VAT has been collected.
            May be required for some destinations.
        invoice:
          example: '#123123'
          type: string
          maxLength: 15
          description: Invoice reference of the shipment.
        license:
          type: string
          description: License reference of the shipment.
        metadata:
          example: 'Order ID #123123'
          type: string
          description: >-
            A string of up to 100 characters that can be filled with any
            additional information you 

            want to attach to the object.
        notes:
          type: string
          description: Additional notes to be included in the customs declaration.
      required:
        - certify_signer
        - certify
        - non_delivery_option
        - contents_type
      type: object
    CustomsDeclarationB13AFilingOption:
      type: string
      example: FILED_ELECTRONICALLY
      description: >-
        B13A Option details are obtained by filing a B13A Canada Export
        Declaration via the Canadian Export Reporting System (CERS). 

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

        Allowed values available <a
        href="/shippoapi/public-api/customs-declaration-b13a-filing-option">here</a>
    CustomsDeclarationB13AFilingOptionEnum:
      allOf:
        - $ref: '#/components/schemas/CustomsDeclarationB13AFilingOption'
        - enum:
            - FILED_ELECTRONICALLY
            - SUMMARY_REPORTING
            - NOT_REQUIRED
    CustomsDeclarationContentsType:
      type: string
      description: >-
        Type of goods of the shipment.  

        Allowed values available <a
        href="/shippoapi/public-api/customs-declaration-contents-type">here</a>
      example: MERCHANDISE
    CustomsDeclarationContentsTypeEnum:
      allOf:
        - $ref: '#/components/schemas/CustomsDeclarationContentsType'
        - enum:
            - DOCUMENTS
            - GIFT
            - SAMPLE
            - MERCHANDISE
            - HUMANITARIAN_DONATION
            - RETURN_MERCHANDISE
            - OTHER
    CustomsDeclarationEelPfc:
      type: string
      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 available <a
        href="/shippoapi/public-api/customs-declaration-eelpfc">here</a>
      example: NOEEI_30_37_a
    CustomsDeclarationEelPfcEnum:
      allOf:
        - $ref: '#/components/schemas/CustomsDeclarationEelPfc'
        - enum:
            - NOEEI_30_37_a
            - NOEEI_30_37_h
            - NOEEI_30_37_f
            - NOEEI_30_36
            - AES_ITN
    CustomsDeclarationIncoterm:
      type: string
      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,
        FedEx, and DPD UK.

        If expecting DAP for other carriers, please use DDU.

        Allowed values available <a
        href="/shippoapi/public-api/customs-declaration-incoterm">here</a>

        Carrier-specific restrictions are in the table below.


        **Carrier-Specific Constraints:**

        | Carrier | Constraints |

        |:---|:---|

        | FedEx | Must be one of DDP, DDU, FCA, DAP |
      example: DDP
    CustomsDeclarationIncotermEnum:
      allOf:
        - $ref: '#/components/schemas/CustomsDeclarationIncoterm'
        - enum:
            - DDP
            - DDU
            - FCA
            - DAP
            - eDAP
    CustomsDeclarationNonDeliveryOption:
      type: string
      description: >-
        Indicates how the carrier should proceed in case the shipment can't be
        delivered.

        Allowed values available <a
        href="/shippoapi/public-api/customs-declaration-non-delivery-option">here</a>
      example: RETURN
    CustomsDeclarationNonDeliveryOptionEnum:
      allOf:
        - $ref: '#/components/schemas/CustomsDeclarationNonDeliveryOption'
        - enum:
            - ABANDON
            - RETURN
    CustomsDeclaration:
      title: Customs Declaration
      x-tags:
        - Customs Declarations
      allOf:
        - $ref: '#/components/schemas/CustomsDeclarationBase'
        - properties:
            address_importer:
              type: string
              example: 257ba08436604d2aaf069caafe7acb2a
              description: Object ID of the Importer address.
            b13a_filing_option:
              $ref: '#/components/schemas/CustomsDeclarationB13AFilingOption'
            contents_type:
              $ref: '#/components/schemas/CustomsDeclarationContentsType'
            eel_pfc:
              $ref: '#/components/schemas/CustomsDeclarationEelPfc'
            incoterm:
              $ref: '#/components/schemas/CustomsDeclarationIncoterm'
            invoiced_charges:
              $ref: '#/components/schemas/CustomsInvoicedCharges'
            items:
              example:
                - 5087f181d1dc4b14b73fdbf636498886
              items:
                type: string
              type: array
              description: Distinct Parcel content items as Customs Items object_ids.
            non_delivery_option:
              $ref: '#/components/schemas/CustomsDeclarationNonDeliveryOption'
            object_created:
              example: '2014-07-17T01:01:08.306Z'
              format: date-time
              type: string
              description: Date and time of object creation.
            object_id:
              example: e2197a54da9d470480f4f8796cc419cb
              type: string
              description: Unique identifier of the given object.
            object_owner:
              example: shippotle@shippo.com
              type: string
              description: Username of the user who created the object.
            object_state:
              $ref: '#/components/schemas/ObjectStateEnum'
            object_updated:
              example: '2014-07-17T01:01:08.306Z'
              format: date-time
              type: string
              description: Date and time of last object update.
            test:
              example: true
              type: boolean
              description: Indicates whether the object has been created in test mode.
          required:
            - items
    CustomsDeclarationCreateRequest:
      allOf:
        - $ref: '#/components/schemas/CustomsDeclarationBase'
        - properties:
            address_importer:
              $ref: '#/components/schemas/AddressImporter'
            b13a_filing_option:
              $ref: '#/components/schemas/CustomsDeclarationB13AFilingOptionEnum'
            contents_type:
              $ref: '#/components/schemas/CustomsDeclarationContentsTypeEnum'
            eel_pfc:
              $ref: '#/components/schemas/CustomsDeclarationEelPfcEnum'
            incoterm:
              $ref: '#/components/schemas/CustomsDeclarationIncotermEnum'
            items:
              items:
                $ref: '#/components/schemas/CustomsItemCreateRequest'
              type: array
            non_delivery_option:
              $ref: '#/components/schemas/CustomsDeclarationNonDeliveryOptionEnum'
            test:
              example: true
              type: boolean
          required:
            - items
    CustomsDeclarationPaginatedList:
      allOf:
        - $ref: '#/components/schemas/PaginatedList'
        - properties:
            results:
              items:
                $ref: '#/components/schemas/CustomsDeclaration'
              type: array
    CustomsExporterIdentification:
      description: >-
        Additional exporter identification that may be required to ship in
        certain countries
      properties:
        eori_number:
          example: PL123456790ABCDE
          type: string
          description: >-
            Economic Operators' Registration and Identification (EORI) number.
            Must start with a 2 character 

            country code followed by a 6-17 character alphanumeric identifier
            (e.g. PL1234567890ABCDE).

            <a
            href="https://ec.europa.eu/taxation_customs/business/customs-procedures/general-overview/economic-operators-registration-identification-number-eori_en">More
            information on EORI.</a>
        tax_id:
          $ref: '#/components/schemas/CustomsTaxIdentification'
      type: object
    CustomsInvoicedCharges:
      description: >-
        Additional invoiced charges to be shown on the Customs Declaration
        Commercial Invoice.
      properties:
        currency:
          type: string
          format: iso-4217
          description: >-
            Currency for the invoiced charges amounts incurred on the end
            consumer.
        total_shipping:
          type: string
          description: Total shipping paid by the buyer.
        total_taxes:
          type: string
          description: Total taxes paid by the buyer.
        total_duties:
          type: string
          description: Total duties paid by the buyer.
        other_fees:
          type: string
          description: Other fees paid by the buyer.
      required:
        - currency
      type: object
    CustomsItemBase:
      properties:
        description:
          example: T-Shirt
          type: string
          description: Text description of your item.
        eccn_ear99:
          type: string
          description: >-
            Export Control Classification Number, required on some exports from
            the United States.
        mass_unit:
          $ref: '#/components/schemas/WeightUnitEnum'
        metadata:
          example: Order ID "123454"
          type: string
          description: >-
            A string of up to 100 characters that can be filled with any
            additional information you 

            want to attach to the object.
        net_weight:
          example: '5'
          type: string
          description: Total weight of this item, i.e. quantity * weight per item.
        origin_country:
          type: string
          description: >-
            Country of origin of the item. Example: `US` or `DE`. 

            All accepted values can be found on the <a
            href="http://www.iso.org/" target="_blank">Official ISO Website</a>.
        quantity:
          example: 20
          format: int64
          type: integer
          description: >-
            Quantity of this item in the shipment you send.  Must be greater
            than 0.
        sku_code:
          description: SKU code of the item, which is required by some carriers.
          example: HM-123
          type: string
        hs_code:
          description: >-
            HS code of the item, which is required by some carriers. If
            `tariff_number` is not provided, `hs_code` will be used.  If both
            `hs_code` and `tariff_number` are provided, `tariff_number` will be
            used. 50 character limit.
          example: '0901.21'
          type: string
        tariff_number:
          type: string
          description: >-
            The tariff number of the item. If `tariff_number` is not provided,
            `hs_code` will be used. If both `hs_code` and `tariff_number` are
            provided, `tariff_number` will be used. 12 character limit.
        value_amount:
          example: '200'
          type: string
          description: Total value of this item, i.e. quantity * value per item.
        value_currency:
          example: USD
          type: string
          description: >-
            Currency used for value_amount. The <a
            href="http://www.xe.com/iso4217.php">official ISO 4217</a> 

            currency codes are used, e.g.  `USD` or `EUR`.
      required:
        - description
        - quantity
        - net_weight
        - mass_unit
        - value_amount
        - value_currency
        - origin_country
      type: object
    CustomsItem:
      title: Customs Item
      x-tags:
        - Customs Items
      allOf:
        - $ref: '#/components/schemas/CustomsItemBase'
        - properties:
            object_created:
              example: '2014-07-17T00:49:20.631Z'
              format: date-time
              type: string
              description: Date and time of object creation.
            object_id:
              example: d799c2679e644279b59fe661ac8fa488
              type: string
              description: Unique identifier of the given object.
            object_owner:
              example: shippotle@shippo.com
              type: string
              description: Username of the user who created the object.
            object_state:
              $ref: '#/components/schemas/ObjectStateEnum'
            object_updated:
              example: '2014-07-17T00:49:20.631Z'
              format: date-time
              type: string
              description: Date and time of last object update.
            test:
              type: boolean
              description: Indicates whether the object has been created in test mode.
    CustomsItemCreateRequest:
      allOf:
        - $ref: '#/components/schemas/CustomsItemBase'
      x-speakeasy-name-override: CustomsItemCreateRequest
      x-speakeasy-include: true
    CustomsItemPaginatedList:
      allOf:
        - $ref: '#/components/schemas/PaginatedList'
        - properties:
            results:
              items:
                $ref: '#/components/schemas/CustomsItem'
              type: array
    CustomsTaxIdentification:
      description: >-
        Tax identification that may be required to ship in certain countries.
        Typically used to assess duties on 

        goods that are crossing a border.
      properties:
        number:
          example: '123456789'
          type: string
          maxLength: 15
          description: Tax identification number.
        type:
          example: EIN
          enum:
            - EIN
            - VAT
            - IOSS
            - ARN
          description: >-
            Type of tax identification.

            * `EIN` - Employer Identification Number, also known as a Federal
            Tax Identification Number.

            * `VAT` - Value Added Tax identification number.

            * `IOSS` - Import One-Stop Shop

            * `ARN` - Australian Taxation Office Reference Number
      type: object
    DangerousGoodsBiologicalMaterial:
      description: Container for specifying the presence of biological material.
      properties:
        contains:
          type: boolean
          description: Indicates if the shipment contains biological material.
      type: object
    DangerousGoodsLithiumBatteries:
      description: Container for specifying the presence of lithium batteries.
      properties:
        contains:
          type: boolean
          description: Indicates if the shipment contains lithium batteries.
      type: object
    DangerousGoodsObject:
      description: >-
        Container for specifying the presence of dangerous materials. This is
        specific to USPS, and if any contents

        are provided, only certain USPS service levels will be eligible. For
        more information, see our

        <a href="https://docs.goshippo.com/docs/shipments/hazmat/">guide on
        hazardous or dangerous materials shipping</a>.
      properties:
        contains:
          type: boolean
          description: Indicates if the shipment contains dangerous goods.
        biological_material:
          $ref: '#/components/schemas/DangerousGoodsBiologicalMaterial'
        lithium_batteries:
          $ref: '#/components/schemas/DangerousGoodsLithiumBatteries'
      type: object
    DefaultParcelTemplate:
      title: Default Parcel Template
      x-tags:
        - Rates at Checkout
      properties:
        result:
          $ref: '#/components/schemas/UserParcelTemplate'
      type: object
    DefaultParcelTemplateUpdateRequest:
      properties:
        object_id:
          example: b958d3690bb04bb8b2986724872750f5
          type: string
      type: object
    DepartmentNumber:
      description: Specify the department number field on the label (FedEx and UPS only).
      properties:
        prefix:
          type: string
          description: >-
            Custom prefix for department number field (ZPL labels only). Up to
            11 characters, including trailing 

            spaces. Empty string indicates removal of default prefix. To use the
            default prefix, do not include

            this property.
        value:
          type: string
          maxLength: 40
          description: >-
            Optional text to be printed on the shipping label for department
            number. Up to 40 characters.


            **Carrier-Specific Constraints:**

            | Carrier | Constraints |

            |:---|:---|

            | FedEx | Max 30 characters |
        ref_sort:
          type: integer
          description: >-
            Order UPS reference fields are printed on ZPL labels. For UPS
            shipments, if you choose to set `ref_sort` for one reference, you
            must set `ref_sort` for all other supported UPS references using
            unique integers.
          example: 3
      type: object
    DryIce:
      description: Specify that the package contains Dry Ice (FedEx, Veho, and UPS only).
      properties:
        contains_dry_ice:
          type: boolean
          description: Mandatory. Specifies that the package contains Dry Ice.
        weight:
          type: string
          description: >-
            Mandatory. Units must be in Kilograms. Cannot be greater than
            package weight.
      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
    LiveRatePaginatedList:
      allOf:
        - $ref: '#/components/schemas/PaginatedList'
        - properties:
            count:
              example: 123
              format: int64
              type: integer
            results:
              items:
                $ref: '#/components/schemas/LiveRate'
              type: array
    Location:
      description: Location where the parcel(s) will be picked up.
      properties:
        address:
          $ref: '#/components/schemas/AddressPickupCompleteCreateRequest'
        building_location_type:
          enum:
            - Back Door
            - Ring Bell
            - Security Deck
            - Shipping Dock
            - Front Door
            - Knock on Door
            - In/At Mailbox
            - Mail Room
            - Office
            - Other
            - Reception
            - Side Door
          example: Front Door
          type: string
          description: >-
            Where your parcels will be available for pickup. "Security Deck" and
            "Shipping Dock" are only 

            supported for DHL Express.
        building_type:
          enum:
            - apartment
            - building
            - department
            - floor
            - room
            - suite
          example: apartment
          type: string
          description: The type of building where the pickup is located.
        instructions:
          example: Behind screen door
          type: string
          description: >-
            Pickup instructions for the courier. This is a mandatory field if
            the building_location_type is "Other".
      required:
        - building_location_type
        - address
      type: object
    ManifestBase:
      properties:
        carrier_account:
          example: adcfdddf8ec64b84ad22772bce3ea37a
          type: string
          description: ID of carrier account
        shipment_date:
          example: '2014-05-16T23:59:59Z'
          type: string
          description: |-
            All shipments to be submitted on this day will be closed out. 
            Must be in the format `2014-01-18T00:35:03.463Z` (ISO 8601 date).
        transactions:
          example:
            - adcfdddf8ec64b84ad22772bce3ea37a
          items:
            type: string
          type: array
          description: >-
            IDs transactions to use. If you set this to null or not send this
            parameter, 

            Shippo will automatically assign all applicable transactions.
      required:
        - carrier_account
        - shipment_date
      type: object
    Manifest:
      x-tags:
        - Manifests
      allOf:
        - $ref: '#/components/schemas/ManifestBase'
        - properties:
            address_from:
              example: d799c2679e644279b59fe661ac8fa488
              type: string
              description: >-
                ID of the Address object that should be used as pickup address
                for the scan form. 

                The USPS will validate this address before creating the scan
                form.
            documents:
              example:
                - >-
                  https://shippo-delivery.s3.amazonaws.com/0fadebf6f60c4aca95fa01bcc59c79ae.pdf?Signature=tlQU3RECwdHUQJQadwqg5bAzGFQ%3D&Expires=1402803835&AWSAccessKeyId=AKIAJTHP3LLFMYAWALIA
              items:
                type: string
              type: array
              description: An array containing the URLs to all returned manifest documents.
            errors:
              items:
                type: string
              type: array
              description: >-
                An array of codes and messages describing the error that
                occurred if any.
            object_created:
              format: date-time
              type: string
              description: Date and time of object creation.
            object_id:
              example: adcfdddf8ec64b84ad22772bce3ea37a
              type: string
              description: Unique identifier of the given object.
            object_owner:
              example: shippotle@shippo.com
              type: string
              description: Username of the user who created the object.
            object_updated:
              format: date-time
              type: string
              description: Date and time of last object update.
            status:
              enum:
                - QUEUED
                - SUCCESS
                - ERROR
              example: SUCCESS
              type: string
              description: Indicates the status of the manifest.
          required:
            - status
            - object_created
            - object_updated
            - object_id
            - object_owner
            - documents
            - address_from
    ManifestCreateRequest:
      allOf:
        - $ref: '#/components/schemas/ManifestBase'
        - properties:
            address_from:
              oneOf:
                - $ref: '#/components/schemas/AddressCreateRequest'
                - type: string
                  description: >-
                    ID of the Address object that should be used as pickup
                    address for the scan form. 

                    The USPS will validate this address before creating the scan
                    form.
            async:
              type: boolean
          required:
            - address_from
      type: object
    ManifestPaginatedList:
      allOf:
        - $ref: '#/components/schemas/PaginatedList'
        - properties:
            results:
              items:
                $ref: '#/components/schemas/Manifest'
              type: array
    OrderBase:
      properties:
        currency:
          description: >-
            **Required if total_price is provided**<br>

            Currency of the <code>total_price</code> and <code>total_tax</code>
            amounts.
          example: USD
          type: string
        notes:
          description: Custom buyer- or seller-provided notes about the order.
          example: This customer is a VIP
          type: string
        order_number:
          description: >-
            An alphanumeric identifier for the order used by the seller/buyer.
            This identifier doesn't need to be unique.
          example: '#1068'
          type: string
        order_status:
          $ref: '#/components/schemas/OrderStatusEnum'
        placed_at:
          description: >-
            Date and time when the order was placed. This datetime can be
            different from the datetime of the order object creation on Shippo.
          example: '2016-09-23T01:28:12Z'
          type: string
        shipping_cost:
          description: >-
            Amount paid by the buyer for shipping. This amount can be different
            from the price the seller will actually pay for shipping.
          example: '12.83'
          type: string
        shipping_cost_currency:
          description: |-
            **Required if shipping_cost is provided**<br>
            Currency of the <code>shipping_cost</code> amount.
          example: USD
          type: string
        shipping_method:
          description: >-
            Shipping method (carrier + service or other free text description)
            chosen by the buyer. 

            This value can be different from the shipping method the seller will
            actually choose.
          example: USPS First Class Package
          type: string
        subtotal_price:
          example: '12.1'
          type: string
        total_price:
          description: Total amount paid by the buyer for this order.
          example: '24.93'
          type: string
        total_tax:
          description: Total tax amount paid by the buyer for this order.
          example: '0.0'
          type: string
        weight:
          example: '0.4'
          type: string
          description: Total weight of the order.
        weight_unit:
          $ref: '#/components/schemas/WeightUnitEnum'
      required:
        - placed_at
      type: object
    OrderStatusEnum:
      type: string
      description: >-
        Current state of the order. See the <a
        href="https://docs.goshippo.com/docs/orders/orders/">orders
        tutorial</a> 

        for the logic of how the status is handled.
      enum:
        - UNKNOWN
        - AWAITPAY
        - PAID
        - REFUNDED
        - CANCELLED
        - PARTIALLY_FULFILLED
        - SHIPPED
      example: PAID
    Order:
      x-tags:
        - Orders
      allOf:
        - $ref: '#/components/schemas/OrderBase'
        - properties:
            from_address:
              $ref: '#/components/schemas/AddressFrom'
            to_address:
              $ref: '#/components/schemas/AddressTo'
            line_items:
              description: >-
                Array of <a href="/shippoapi/public-api/orders/lineitem">line
                item</a> objects representing the items in this order. 

                All objects will be returned expanded by default.
              items:
                $ref: '#/components/schemas/LineItem'
              type: array
            object_id:
              example: adcfdddf8ec64b84ad22772bce3ea37a
              type: string
              description: Unique identifier of the order object.
            object_owner:
              example: shippotle@shippo.com
              type: string
              description: Username of the user who created the object.
            shop_app:
              $ref: '#/components/schemas/OrderShopAppEnum'
            transactions:
              items:
                type: object
              type: array
              description: >-
                Array of <a
                href="/shippoapi/public-api/transactions">transaction</a>
                objects representing all shipping labels purchased for this
                order.

                All objects are returned expanded with a limited number of
                fields by default.
          required:
            - to_address
    OrderShopAppEnum:
      type: string
      description: >-
        Platform the order was created on and, if applicable, imported from. 

        Orders created via the Shippo API or dashboard will have the value
        "Shippo".
      example: Shippo
      enum:
        - Amazon
        - Bigcommerce
        - CSV_Import
        - eBay
        - ePages
        - Etsy
        - Godaddy
        - Magento
        - Shippo
        - Shopify
        - Spreecommerce
        - StripeRelay
        - Walmart
        - Weebly
        - WooCommerce
    OrderCreateRequest:
      allOf:
        - $ref: '#/components/schemas/OrderBase'
        - properties:
            from_address:
              $ref: '#/components/schemas/AddressFromCreateRequest'
            to_address:
              $ref: '#/components/schemas/AddressToCreateRequest'
            line_items:
              description: >-
                Array of <a href="/shippoapi/public-api/orders/lineitem">line
                item</a> objects representing the items in this order. 

                All objects will be returned expanded by default.
              items:
                $ref: '#/components/schemas/LineItemCreateRequest'
              type: array
          required:
            - to_address
    OrderPaginatedList:
      allOf:
        - $ref: '#/components/schemas/PaginatedList'
        - properties:
            results:
              items:
                $ref: '#/components/schemas/Order'
              type: array
    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
    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:
              description: Indicates whether the object has been created in test mode.
              type: boolean
      required:
        - length
        - width
        - height
        - distance_unit
        - weight
        - mass_unit
      type: object
    ParcelCreateFromTemplateRequest:
      allOf:
        - $ref: '#/components/schemas/ParcelBase'
        - properties:
            template:
              $ref: '#/components/schemas/ParcelTemplateEnumSet'
      required:
        - template
        - weight
        - mass_unit
      type: object
    ParcelCreateRequest:
      allOf:
        - $ref: '#/components/schemas/ParcelBase'
        - $ref: '#/components/schemas/ParcelDimensions'
      required:
        - length
        - width
        - height
        - distance_unit
        - weight
        - mass_unit
      type: object
    ParcelPaginatedList:
      allOf:
        - $ref: '#/components/schemas/PaginatedList'
        - properties:
            results:
              items:
                $ref: '#/components/schemas/Parcel'
              type: array
    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
    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
    PickupBase:
      properties:
        carrier_account:
          example: adcfdddf8ec64b84ad22772bce3ea37a
          type: string
          description: >-
            The object ID of your USPS or DHL Express carrier account. 

            You can retrieve this from your Rate requests or our <a
            href="/shippoapi/public-api/carrier-accounts">Carrier Accounts</a>
            endpoint.
        location:
          $ref: '#/components/schemas/Location'
        metadata:
          type: string
          description: >-
            A string of up to 100 characters that can be filled with any
            additional information you 

            want to attach to the object.
        requested_end_time:
          format: date-time
          type: string
          description: >-
            The latest that you requested your parcels to be available for
            pickup. 

            Expressed in the timezone specified in the response.
        requested_start_time:
          format: date-time
          type: string
          description: >-
            The earliest that you requested your parcels to be ready for
            pickup. 

            Expressed in the timezone specified in the response.
        transactions:
          example:
            - adcfdddf8ec64b84ad22772bce3ea37a
          items:
            type: string
          type: array
          description: >-
            The transaction(s) object ID(s) for the parcel(s) that need to be
            picked up.
      required:
        - carrier_account
        - location
        - transactions
        - requested_start_time
        - requested_end_time
      type: object
    Pickup:
      x-tags:
        - Pickups
      allOf:
        - $ref: '#/components/schemas/PickupBase'
        - properties:
            object_created:
              format: date-time
              type: string
              description: Date and time of Pickup creation.
            object_id:
              type: string
              description: Unique identifier of the given Pickup object.
            object_updated:
              format: date-time
              type: string
              description: Date and time of last Pickup update.
            confirmed_start_time:
              type: string
              format: datetime
              example: '2020-05-09T12:00:00Z'
              description: >-
                The earliest that your parcels will be ready for pickup,
                confirmed by the carrier. 

                Expressed in the timezone specified in the response.
            confirmed_end_time:
              type: string
              format: datetime
              example: '2020-05-09T23:59:59.999Z'
              description: >-
                The latest that your parcels will be available for pickup,
                confirmed by the carrier. 

                Expressed in the timezone specified in the response.
            cancel_by_time:
              type: string
              format: datetime
              example: '2020-05-09T08:00:00Z'
              description: >-
                The latest time to cancel a pickup. Expressed in the timezone
                specified in the response. 

                To cancel a pickup, you will need to contact the carrier
                directly. 

                The ability to cancel a pickup through Shippo may be released in
                future iterations.
            status:
              type: string
              example: CONFIRMED
              description: Indicates the status of the pickup.
              enum:
                - PENDING
                - CONFIRMED
                - ERROR
                - CANCELLED
            confirmation_code:
              type: string
              example: WTC310058750
              description: >-
                Pickup's confirmation code returned by the carrier. 

                To edit or cancel a pickup, you will need to contact USPS or DHL
                Express directly and provide your `confirmation_code`.
            timezone:
              type: string
              example: US/Pacific
              description: >-
                The pickup time windows will be in the time zone specified here,
                not UTC.
            messages:
              type: array
              items:
                type: string
              example: []
              description: >-
                An array containing strings of any messages generated during
                validation.
            is_test:
              type: boolean
              description: Indicates whether the object has been created in test mode.
    PickupCreateRequest:
      allOf:
        - $ref: '#/components/schemas/PickupBase'
    BadRequest:
      additionalProperties: true
      type: object
    PoNumber:
      description: Specify the PO number field on the label (FedEx and UPS only).
      properties:
        prefix:
          type: string
          description: >-
            Custom prefix for PO number field (ZPL labels only). Up to 11
            characters, including trailing 

            spaces. Empty string indicates removal of default prefix. To use the
            default prefix, do not include

            this property.
        value:
          type: string
          maxLength: 40
          description: >-
            Optional text to be printed on the shipping label for PO number. Up
            to 40 characters. If

            this is provided, reference_2 will be ignored.


            **Carrier-Specific Constraints:**

            | Carrier | Constraints |

            |:---|:---|

            | FedEx | Max 30 characters |
        ref_sort:
          type: integer
          description: >-
            Order UPS reference fields are printed on ZPL labels. For UPS
            shipments, if you choose to set `ref_sort` for one reference, you
            must set `ref_sort` for all other supported UPS references using
            unique integers.
          example: 2
      type: object
    CarrierAccountPaginatedList:
      allOf:
        - $ref: '#/components/schemas/PaginatedList'
        - properties:
            results:
              items:
                $ref: '#/components/schemas/CarrierAccountWithExtraInfo'
              type: array
    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".
    Rate:
      x-tags:
        - Rates
      allOf:
        - $ref: '#/components/schemas/RateAmountAndCurrency'
        - properties:
            arrives_by:
              type: string
              example: '08:30:00'
              description: >-
                Predicted time the carrier will deliver the package in the
                destination's local time zone. In the format `HH:MM:SS`.
            attributes:
              items:
                enum:
                  - BESTVALUE
                  - CHEAPEST
                  - FASTEST
                type: string
              type: array
              description: >-
                An array containing specific attributes of this Rate in context
                of the entire shipment. 

                Attributes can be assigned `CHEAPEST`, `FASTEST`, or
                `BESTVALUE`.
            carrier_account:
              example: 078870331023437cb917f5187429b093
              type: string
              description: >-
                Object ID of the carrier account that has been used to retrieve
                the rate.
            duration_terms:
              example: Delivery in 1 to 3 business days
              type: string
              description: >-
                Further clarification of the transit times. 

                Often, this includes notes that the transit time as given in
                "days" is only an average, not a guaranteed time.
            estimated_days:
              example: 2
              format: int64
              type: integer
              description: >-
                Estimated transit time (duration) in days of the Parcel at the
                given servicelevel. 

                Please note that this is not binding, but only an average value
                as given by the provider. 

                Shippo is not able to guarantee any transit times.
            included_insurance_price:
              example: '1.05'
              type: string
              description: >-
                Cost to the user to insure the Rate for the requested amount of
                coverage, if insurance coverage was requested. 

                Expressed in the currency used in the sender's country. Will be
                null if no insurance coverage was requested, or if insurance is
                requested from a non-standard insurance provider. 

                Please note this price is already included in the `amount` and
                `amount_local` fields on the Rate. Do not add this field to
                them.
            messages:
              $ref: '#/components/schemas/ResponseMessageList'
            object_created:
              format: date-time
              type: string
              description: Date and time of Rate creation.
            object_id:
              example: adcfdddf8ec64b84ad22772bce3ea37a
              type: string
              description: Unique identifier of the given Rate object.
            object_owner:
              example: pp@gmail.com
              type: string
              description: Username of the user who created the rate object.
            provider:
              example: USPS
              type: string
              description: Carrier offering the rate, e.g., `FedEx` or `Deutsche Post DHL`.
            provider_image_75:
              example: https://cdn2.goshippo.com/providers/75/USPS.png
              type: string
              description: >-
                URL to the provider logo with max. dimensions of 75*75px. 

                Please refer to the provider's Logo Usage Guidelines before
                using the logo.
            provider_image_200:
              example: https://cdn2.goshippo.com/providers/200/USPS.png
              type: string
              description: >-
                URL to the provider logo with max. dimensions of 200*200px. 

                Please refer to the provider's Logo Usage Guidelines before
                using the logo.
            servicelevel:
              $ref: '#/components/schemas/ServiceLevelWithParent'
            shipment:
              example: adcfdddf8ec64b84ad22772bce3ea37a
              type: string
            test:
              type: boolean
              description: Indicates whether the object has been created in test mode.
            zone:
              type: string
              example: '1'
              description: >-
                The parcel's transit zone token. These tokens can vary depending
                on the provider.
          required:
            - object_created
            - object_id
            - object_owner
            - shipment
            - attributes
            - amount
            - currency
            - amount_local
            - currency_local
            - provider
            - servicelevel
            - carrier_account
      type: object
    RatePaginatedList:
      allOf:
        - $ref: '#/components/schemas/PaginatedList'
        - properties:
            results:
              items:
                $ref: '#/components/schemas/Rate'
              type: array
    ResponseMessageList:
      items:
        $ref: '#/components/schemas/ResponseMessage'
      type: array
    ResponseMessage:
      description: >-
        Message returned with supporting information from a request. In some
        cases this can be an error message, 

        for example a timeout from a carrier. If available, the origin of the
        message is displayed in `source`.
      properties:
        source:
          description: Origin of message
          example: UPS
          type: string
        code:
          description: Classification of message
          example: carrier_timeout
          type: string
        text:
          description: Message content
          example: UPS API did not respond. Please try again in a few minutes.
          type: string
      type: object
    Refund:
      x-tags:
        - Refunds
      properties:
        object_created:
          format: date-time
          type: string
          description: Date and time of object creation.
        object_id:
          example: adcfdddf8ec64b84ad22772bce3ea37a
          type: string
          description: Unique identifier of the given object.
        object_owner:
          example: shippotle@shippo.com
          type: string
          description: Username of the user who created the object.
        object_updated:
          format: date-time
          type: string
          description: Date and time of last object update.
        status:
          enum:
            - QUEUED
            - PENDING
            - SUCCESS
            - ERROR
          example: SUCCESS
          type: string
          description: Indicates the status of the Refund.
        test:
          type: boolean
          description: Indicates whether the object has been created in test mode.
        transaction:
          example: 915d94940ea54c3a80cbfa328722f5a1
          type: string
          description: Object ID of the Transaction to be refunded.
      type: object
    RefundRequestBody:
      properties:
        async:
          example: false
          type: boolean
        transaction:
          example: 915d94940ea54c3a80cbfa328722f5a1
          type: string
      required:
        - transaction
      type: object
    RefundPaginatedList:
      allOf:
        - $ref: '#/components/schemas/PaginatedList'
        - properties:
            results:
              items:
                $ref: '#/components/schemas/Refund'
              type: array
    RmaNumber:
      description: Specify the RMA number field on the label (FedEx and UPS only).
      properties:
        prefix:
          type: string
          description: >-
            Custom prefix for RMA number field (ZPL labels only). Up to 11
            characters, including trailing 

            spaces. Empty string indicates removal of default prefix. To use the
            default prefix, do not include

            this property.
        value:
          type: string
          maxLength: 40
          description: >-
            Optional text to be printed on the shipping label for RMA number. Up
            to 40 characters.


            **Carrier-Specific Constraints:**

            | Carrier | Constraints |

            |:---|:---|

            | FedEx | Max 20 characters |
        ref_sort:
          type: integer
          description: >-
            Order UPS reference fields are printed on ZPL labels. For UPS
            shipments, if you choose to set `ref_sort` for one reference, you
            must set `ref_sort` for all other supported UPS references using
            unique integers.
          example: 1
      type: object
    ServiceGroupBase:
      properties:
        description:
          example: USPS shipping options
          type: string
          description: Description for the service group
        flat_rate:
          description: |-
            String representation of an amount to be returned as the flat rate
            if 1. The service group is of type `LIVE_RATE` and no matching rates
            were found; or 2. The service group is of type `FLAT_RATE`. Either
            integers or decimals are accepted. Required unless type is
            `FREE_SHIPPING`
          example: '5'
          type: string
        flat_rate_currency:
          description: required unless type is `FREE_SHIPPING`. (ISO 4217 currency)
          example: USD
          type: string
        free_shipping_threshold_currency:
          description: optional unless type is `FREE_SHIPPING`. (ISO 4217 currency)
          example: USD
          type: string
        free_shipping_threshold_min:
          description: >-
            For service groups of type `FREE_SHIPPING`, this field must be
            required to configure the minimum 

            cart total (total cost of items in the cart) for this service group
            to be returned for rates at 

            checkout. Optional unless type is `FREE_SHIPPING`
          example: '5'
          type: string
        name:
          example: USPS Shipping
          type: string
          description: >-
            Name for the service group that will be shown to customers in the
            response
        rate_adjustment:
          example: 15
          format: int64
          type: integer
          description: >-
            The amount in percent (%) that the service group's returned rate
            should be adjusted. For example, if this field is set to 5 and the
            matched rate price is $5.00, the returned value of the service group
            will be $5.25. Negative integers are also accepted and will discount
            the rate price by the defined percentage amount.
        type:
          $ref: '#/components/schemas/ServiceGroupTypeEnum'
      type: object
    ServiceGroupTypeEnum:
      description: >-
        The type of the service group.<br> 

        `LIVE_RATE` - Shippo will make a rating request and return real-time
        rates for the shipping group, only falling back to the specified flat
        rate amount if no rates match a service level in the service group.<br> 

        `FLAT_RATE` - Returns a shipping option with the specified flat rate
        amount.<br> 

        `FREE_SHIPPING` - Returns a shipping option with a price of $0 only if
        the total cost of items exceeds the amount defined by
        `free_shipping_threshold_min`
      enum:
        - LIVE_RATE
        - FLAT_RATE
        - FREE_SHIPPING
      example: FLAT_RATE
      type: string
    ServiceGroup:
      title: Service Group
      x-tags:
        - Service Groups
      allOf:
        - $ref: '#/components/schemas/ServiceGroupBase'
        - properties:
            object_id:
              description: The unique identifier of the given Service Group object.
              example: 80feb1633d4a43c898f005850
              type: string
            is_active:
              description: True if the service group is enabled, false otherwise.
              example: true
              type: boolean
            service_levels:
              items:
                $ref: '#/components/schemas/ServiceGroupAccountAndServiceLevel'
              type: array
          required:
            - name
            - description
            - type
            - service_levels
            - object_id
    ServiceGroupCreateRequest:
      allOf:
        - $ref: '#/components/schemas/ServiceGroupBase'
        - properties:
            service_levels:
              items:
                $ref: '#/components/schemas/ServiceGroupAccountAndServiceLevel'
              type: array
        - required:
            - name
            - description
            - type
            - service_levels
    ServiceGroupUpdateRequest:
      allOf:
        - $ref: '#/components/schemas/ServiceGroupBase'
        - properties:
            object_id:
              description: The unique identifier of the given Service Group object.
              example: 80feb1633d4a43c898f005850
              type: string
            is_active:
              description: True if the service group is enabled, false otherwise.
              example: true
              type: boolean
            service_levels:
              items:
                $ref: '#/components/schemas/ServiceGroupAccountAndServiceLevel'
              type: array
        - required:
            - name
            - description
            - type
            - service_levels
            - object_id
            - is_active
    ServiceGroupAccountAndServiceLevel:
      properties:
        account_object_id:
          example: 80feb1633d4a43c898f0058506cfd82d
          type: string
          description: ID of a Carrier Account object
        service_level_token:
          example: ups_next_day_air_saver
          type: string
          description: >-
            Service level token, e.g. `usps_priority` or `fedex_ground`.<br>

            See <a href="/shippoapi/public-api/service-levels">Service
            Levels</a>.
      type: object
    ServiceLevel:
      description: Contains details regarding the service level for the given rate.
      properties:
        name:
          example: Priority Mail Express
          type: string
          description: >-
            Name of the Rate's servicelevel, e.g. `International Priority` or
            `Standard Post`. 

            A servicelevel commonly defines the transit time of a Shipment
            (e.g., Express vs. Standard), along with other properties. 

            These names vary depending on the provider.
        terms:
          type: string
          description: Further clarification of the service.
        token:
          example: usps_priority_express
          type: string
          description: >-
            Token of the Rate's servicelevel, e.g. `usps_priority` or
            `fedex_ground`. 

            See <a
            href="/shippoapi/public-api/service-levels">servicelevels</a>.
        extended_token:
          type: string
          description: >-
            Unique, extended version of the Service Level "token". 

            Guaranteed to be unique across all Service Levels, and may help
            offer insight into the specific Service Level it describes.
      type: object
      x-speakeasy-include: true
    ServiceLevelWithParent:
      allOf:
        - $ref: '#/components/schemas/ServiceLevel'
        - properties:
            parent_servicelevel:
              allOf:
                - $ref: '#/components/schemas/ServiceLevel'
                - description: >-
                    Used for some Service Levels to link to the more "generic"
                    version of this Service Level - for example, 

                    if this Service Level is a variation specific to shipments
                    to Europe("ups_saver_eu"), the "parent" is 

                    the fully generic version ("ups_saver"). Helpful when
                    displaying Service Levels to users. Has the same 

                    structure of the servicelevel - "name", "token", "terms",
                    and "extended_token", or it is otherwise null.
    ShipmentBase:
      properties:
        extra:
          $ref: '#/components/schemas/ShipmentExtra'
        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.
        shipment_date:
          example: '2021-03-22T12:00:00Z'
          type: string
          description: >-
            Date the shipment will be tendered to the carrier. Must be in the
            format `2014-01-18T00:35:03.463Z`. 

            Defaults to current date and time if no value is provided. Please
            note that some carriers require this value to

            be in the future, on a working day, or similar.
      type: object
    Shipment:
      x-tags:
        - Shipments
      allOf:
        - $ref: '#/components/schemas/ShipmentBase'
        - description: Shipment represents the parcel as retrieved from the database
          properties:
            address_from:
              $ref: '#/components/schemas/AddressFrom'
            address_return:
              $ref: '#/components/schemas/AddressReturn'
            address_to:
              $ref: '#/components/schemas/AddressTo'
            carrier_accounts:
              items:
                type: string
              type: array
              description: >-
                An array of object_ids of the carrier account objects to be used
                for getting shipping rates for this shipment. 

                If no carrier account object_ids are set in this field, Shippo
                will attempt to generate rates using all the 

                carrier accounts that have the `active` field set.
            customs_declaration:
              $ref: '#/components/schemas/CustomsDeclaration'
            messages:
              $ref: '#/components/schemas/ResponseMessageList'
            object_created:
              format: date-time
              type: string
              description: Date and time of Shipment creation.
            object_id:
              example: adcfdddf8ec64b84ad22772bce3ea37a
              type: string
              description: Unique identifier of the given Shipment object.
            object_owner:
              example: pp@gmail.com
              type: string
              description: Username of the user who created the Shipment object.
            object_updated:
              format: date-time
              type: string
              description: Date and time of last Shipment update.
            parcels:
              items:
                $ref: '#/components/schemas/Parcel'
              type: array
              description: List of Parcel objects to be shipped.
            rates:
              items:
                $ref: '#/components/schemas/Rate'
              type: array
              description: >-
                An array with all available rates. If <code>async</code> has
                been set to <code>false</code> in the request,

                this will be populated with all available rates in the response.
                Otherwise rates will be created

                asynchronously and this array will initially be empty.
            status:
              enum:
                - ERROR
                - QUEUED
                - SUCCESS
                - WAITING
              example: QUEUED
              type: string
              description: >-
                `Waiting` shipments have been successfully submitted but not yet
                been processed. 

                `Queued` shipments are currently being processed. 

                `Success` shipments have been processed successfully, meaning
                that rate generation has concluded. 

                `Error` does not occur currently and is reserved for future use.
            test:
              type: boolean
              description: Indicates whether the object has been created in test mode.
          required:
            - address_to
            - address_from
            - parcels
            - object_created
            - object_updated
            - object_id
            - object_owner
            - status
            - rates
            - carrier_accounts
            - messages
            - metadata
    ShipmentCreateRequest:
      allOf:
        - $ref: '#/components/schemas/ShipmentBase'
        - properties:
            address_from:
              oneOf:
                - $ref: '#/components/schemas/AddressCreateRequest'
                - type: string
                  example: d799c2679e644279b59fe661ac8fa488
                  description: >-
                    <a href="/shippoapi/public-api/addresses">Address</a>
                    `object_id` of a previously created address.
            address_return:
              oneOf:
                - $ref: '#/components/schemas/AddressCreateRequest'
                - type: string
                  example: d799c2679e644279b59fe661ac8fa488
                  description: >-
                    <a href="/shippoapi/public-api/addresses">Address</a>
                    `object_id` of a previously created address.
            address_to:
              oneOf:
                - $ref: '#/components/schemas/AddressCreateRequest'
                - type: string
                  example: d799c2679e644279b59fe661ac8fa489
                  description: >-
                    <a href="/shippoapi/public-api/addresses">Address</a>
                    `object_id` of a previously created address.
            customs_declaration:
              oneOf:
                - $ref: '#/components/schemas/CustomsDeclarationCreateRequest'
                - type: string
                  example: adcfdddf8ec64b84ad22772bce3ea37a
                  description: >-
                    <a href="/shippoapi/public-api/customs-declarations">Customs
                    Declaration</a> `object_id` of a previously

                    created customs declaration.
            async:
              type: boolean
            carrier_accounts:
              items:
                type: string
              type: array
              description: >-
                List of <a href="/shippoapi/public-api/carrier-accounts">Carrier
                Accounts</a> `object_id`s used to filter 

                the returned rates.  If set, only rates from these carriers will
                be returned.
              example:
                - 065a4a8c10d24a34ab932163a1b87f52
                - 73f706f4bdb94b54a337563840ce52b0
            parcels:
              type: array
              description: |-
                List of parcels to be shipped.

                **Carrier-Specific Constraints:**
                | Carrier | Constraints |
                |:---|:---|
                | FedEx | Max 30 items |
              items:
                oneOf:
                  - $ref: '#/components/schemas/ParcelCreateRequest'
                  - $ref: '#/components/schemas/ParcelCreateFromTemplateRequest'
                  - type: string
                    description: >-
                      <a href="/shippoapi/public-api/parcels">Parcel</a>
                      `object_id` of a previously created parcel.
          required:
            - address_to
            - address_from
            - parcels
    ShipmentPaginatedList:
      allOf:
        - $ref: '#/components/schemas/PaginatedList'
        - properties:
            results:
              items:
                $ref: '#/components/schemas/Shipment'
              type: array
    ShipmentExtra:
      title: Shipment Extra
      x-tags:
        - Shipments
      description: An object holding optional extra services to be requested.
      properties:
        accounts_receivable_customer_account:
          description: >-
            UPS only. Adds custom accounts receivable customer account reference
            to UPS labels.
          $ref: '#/components/schemas/UPSReferenceFields'
        alcohol:
          $ref: '#/components/schemas/Alcohol'
        ancillary_endorsement:
          enum:
            - FORWARDING_SERVICE_REQUESTED
            - RETURN_SERVICE_REQUESTED
          description: >-
            Specify an ancillary service endorsement to provide the USPS with
            instructions on how to handle undeliverable-as-addressed pieces (DHL
            eCommerce only).
        appropriation_number:
          description: UPS only. Adds custom appropriation number reference to UPS labels.
          $ref: '#/components/schemas/UPSReferenceFields'
        authority_to_leave:
          type: boolean
          description: >-
            Request `true` to give carrier permission to leave the parcel in a
            safe place if no one answers the 

            door (where supported). When set to `false`, if no one is available
            to receive the item, the parcel 

            will not be left (*surcharges may be applicable).
        bill_of_lading_number:
          description: UPS only. Adds custom bill of lading number reference to UPS labels.
          $ref: '#/components/schemas/UPSReferenceFields'
        billing:
          $ref: '#/components/schemas/Billing'
        bypass_address_validation:
          type: boolean
          description: Bypasses address validation (USPS, UPS, & LaserShip only).
        carbon_neutral:
          type: boolean
          description: Request carbon offsets by passing true (UPS only).
        carrier_hub_id:
          type: string
          description: Identifies the carrier injection site.
        carrier_hub_travel_time:
          type: integer
          description: >-
            Travel time in hours from fulfillment center to carrier injection
            site.
        COD:
          $ref: '#/components/schemas/COD'
        cod_number:
          description: UPS only. Adds custom COD number reference to UPS labels.
          $ref: '#/components/schemas/UPSReferenceFields'
        container_type:
          type: string
          description: Specify container type.
        critical_pull_time:
          type: string
          description: >-
            Carrier arrival time to pickup packages from the fulfillment
            center. 

            UTC format: `%Y-%m-%dT%H:%M:%SZ`
        customer_branch:
          type: string
          description: Specify customer branch (Lasership only).
        customer_reference:
          $ref: '#/components/schemas/CustomerReference'
        dangerous_goods:
          $ref: '#/components/schemas/DangerousGoodsObject'
        dangerous_goods_code:
          enum:
            - '01'
            - '02'
            - '03'
            - '04'
            - '05'
            - '06'
            - '07'
            - '08'
            - '09'
          description: >-
            Dangerous Goods Code (DHL eCommerce only). See <a
            href="https://api-legacy.dhlecs.com/docs/v2/appendix.html#dangerous-goods">Category
            Codes</a>
        dealer_order_number:
          description: UPS only. Adds custom dealer order number reference to UPS labels.
          $ref: '#/components/schemas/UPSReferenceFields'
        delivery_instructions:
          type: string
          description: >-
            Specify delivery instructions. Up to 500 characters. (FedEx and
            OnTrac only).
        dept_number:
          $ref: '#/components/schemas/DepartmentNumber'
        dry_ice:
          $ref: '#/components/schemas/DryIce'
        fda_product_code:
          description: UPS only. Adds custom FDA product code reference to UPS labels.
          $ref: '#/components/schemas/UPSReferenceFields'
        fulfillment_center:
          type: string
          description: The fulfilment center where the package originates from.
        insurance:
          $ref: '#/components/schemas/Insurance'
        invoice_number:
          $ref: '#/components/schemas/InvoiceNumber'
        is_return:
          type: boolean
          description: >-
            This field specifies if it is a scan-based return shipment. See the
            <a href="https://docs.goshippo.com/docs/shipments/returns/">Create a
            return shipment</a> section for more details.
        lasership_attrs:
          description: >-
            Specify Lasership Attributes (Lasership only). Multiple options
            accepted.
          items:
            $ref: '#/components/schemas/ShipmentExtraLasershipAttributesEnum'
          type: array
        lasership_declared_value:
          type: string
          description: Declared value (Lasership only). Defaults to `50.00`.
        manifest_number:
          description: UPS only. Adds custom manifest number reference to UPS labels.
          $ref: '#/components/schemas/UPSReferenceFields'
        model_number:
          description: UPS only. Adds custom model number reference to UPS labels.
          $ref: '#/components/schemas/UPSReferenceFields'
        part_number:
          description: UPS only. Adds custom part number reference to UPS labels.
          $ref: '#/components/schemas/UPSReferenceFields'
        po_number:
          $ref: '#/components/schemas/PoNumber'
        preferred_delivery_timeframe:
          enum:
            - '10001200'
            - '12001400'
            - '14001600'
            - '16001800'
            - '18002000'
            - '19002100'
          description: >-
            Required for DHL Germany Paket Sameday. Designates a desired
            timeframe for delivery. Format is `HHMMHHMM`
        premium:
          type: boolean
          description: >-
            Add premium service to a shipment (DHL Germany international
            shipments only).
        production_code:
          description: UPS only. Adds custom product code reference to UPS labels.
          $ref: '#/components/schemas/UPSReferenceFields'
        purchase_request_number:
          description: >-
            UPS only. Adds custom purchase request number reference to UPS
            labels.
          $ref: '#/components/schemas/UPSReferenceFields'
        qr_code_requested:
          type: boolean
          description: >-
            Request a QR code for a given transaction when creating a shipping
            label (USPS domestic and Evri UK only).
        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. For DHL eCommerce, this field can be
            used for billing reference.


            **Carrier-Specific Constraints:**

            | Carrier | Constraints |

            |:---|:---|

            | FedEx | Max 30 characters |
        request_retail_rates:
          type: boolean
          description: >-
            Returns retail rates instead of account-based rates (UPS and FedEx
            only).
        return_service_type:
          type: string
          description: >-
            Request additional return option for return shipments (UPS and
            Lasership only).
          oneOf:
            - $ref: '#/components/schemas/ShipmentExtraReturnServiceTypeUPSEnum'
            - $ref: '#/components/schemas/ShipmentExtraReturnServiceTypeLasershipEnum'
        rma_number:
          $ref: '#/components/schemas/RmaNumber'
        saturday_delivery:
          type: boolean
          description: Marks shipment as to be delivered on a Saturday.
        salesperson_number:
          description: UPS only. Adds custom salesperson number reference to UPS labels.
          $ref: '#/components/schemas/UPSReferenceFields'
        serial_number:
          description: UPS only. Adds custom serial number reference to UPS labels.
          $ref: '#/components/schemas/UPSReferenceFields'
        signature_confirmation:
          enum:
            - STANDARD
            - ADULT
            - CERTIFIED
            - INDIRECT
            - CARRIER_CONFIRMATION
          description: >-
            Request standard or adult signature confirmation. You can
            alternatively request Certified Mail (USPS only) 

            or Indirect signature (FedEx only) or Carrier Confirmation (Deutsche
            Post only).
        store_number:
          description: UPS only. Adds custom store number reference to UPS labels.
          $ref: '#/components/schemas/UPSReferenceFields'
        transaction_reference_number:
          description: UPS only. Adds custom transaction reference number to UPS labels.
          $ref: '#/components/schemas/UPSReferenceFields'
        usmca_eligible:
          type: boolean
          description: >-
            UPS only. Request USMCA (United States-Mexico-Canada Agreement)
            preferential tariff treatment. 

            When enabled, it includes the USMCA eligibility declaration in
            customs documentation.


            Supported routes and value limits:

            - USA/Canada → Mexico: ≤ $1,000 USD

            - Canada/Mexico → USA: ≤ $2,500 USD  

            - USA/Mexico → Canada: ≤ $3,300 CAD


            Only for declaration-only shipments, full USMCA - FormType 04
            (Certificate of Origin) is not supported.
      type: object
    ShipmentExtraReturnServiceTypeUPSEnum:
      type: string
      enum:
        - PRINT_AND_MAIL
        - ATTEMPT_1
        - ATTEMPT_3
        - ELECTRONIC_LABEL
    ShipmentExtraReturnServiceTypeLasershipEnum:
      type: string
      enum:
        - NO_RETURN
    ShipmentExtraLasershipAttributesEnum:
      type: string
      enum:
        - TwoPersonDelivery
        - Explosive
        - Alcohol
        - Hazmat
        - ControlledSubstance
        - Refrigerated
        - DryIce
        - Perishable
        - NoRTS
    UPSReferenceFields:
      properties:
        prefix:
          type: string
          description: Custom prefix text.
          example: ABC
        value:
          type: string
          description: Label reference text. 35 character limit.
          example: value
        ref_sort:
          type: integer
          description: >-
            Order UPS reference fields are printed on ZPL labels. For UPS
            shipments, if you choose to set `ref_sort` for one reference, you
            must set `ref_sort` for all other supported UPS references using
            unique integers.
          example: 1
    ConnectExistingOwnAccountParameters:
      title: Account parameters
      description: >
        An array of additional parameters for the account, such as e.g. password
        or token. Please check our 

        <a
        href="https://docs.goshippo.com/docs/carriers/carrieraccounts/">carrier
        accounts guide</a> 

        for the parameters per carrier.

        To protect account information, this field will be masked in any API
        response.

        In the case of masked fields, they should be handled carefully.


        Fields also must consider: 

        - Not providing a *fields* in parameters will not result in a change to
        any configured value 

        - Providing a value in a *masked field* with ****** (exactly 6
        asterisks) will not change the configured value 

        - Providing *field* with null will clear the configured value 

        - Providing *field* with any other value will change the configured
        value and may affect the behavior of the account.
      additionalProperties: true
    Insurance:
      description: >-
        To add 3rd party insurance powered by <a
        href="https://docs.goshippo.com/docs/shipments/shippinginsurance/">XCover</a>, 

        specify <br> `amount`, `content`, and `currency`. <br> Alternatively,
        you can choose carrier provided insurance 

        by additionally specifying `provider` (UPS, FedEx and OnTrac only).
        <br><br> If you do not want to add insurance 

        to your shipment, do not set these parameters.
      properties:
        amount:
          example: '5.5'
          type: string
          description: Declared value of the goods you want to insure.
        content:
          type: string
          description: Description of package content.
        currency:
          example: USD
          type: string
          format: iso-4217
          description: |-
            Currency for the amount value.
            Currently only USD is supported for FedEx and UPS.
        provider:
          enum:
            - FEDEX
            - UPS
            - ONTRAC
          description: >-
            To have insurance cover provided by a carrier directly instead of
            Shippo's provider (XCover), set `provider` to `FEDEX`, `UPS`, or
            `ONTRAC`.
      type: object
    InvoiceNumber:
      description: Specify the invoice number field on the label (FedEx and UPS only).
      properties:
        prefix:
          type: string
          description: >-
            Custom prefix for invoice number field (ZPL labels only). Up to 11
            characters, including trailing 

            spaces. Empty string indicates removal of default prefix. To use the
            default prefix, do not include

            this property.
        value:
          type: string
          maxLength: 40
          description: >-
            Optional text to be printed on the shipping label for invoice
            number. Up to 40 characters. If

            provided, this will be used on the label instead of
            shipment.customs_declaration.invoice.


            **Carrier-Specific Constraints:**

            | Carrier | Constraints |

            |:---|:---|

            | FedEx | Max 30 characters |
        ref_sort:
          type: integer
          description: >-
            Order UPS reference fields are printed on ZPL labels. For UPS
            shipments, if you choose to set `ref_sort` for one reference, you
            must set `ref_sort` for all other supported UPS references using
            unique integers.
          example: 2
      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
    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.
    LineItemCreateRequest:
      allOf:
        - $ref: '#/components/schemas/LineItemBase'
    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
    Track:
      x-tags:
        - Tracking Status
      properties:
        address_from:
          $ref: '#/components/schemas/TrackingStatusFromLocation'
        address_to:
          $ref: '#/components/schemas/TrackingStatusToLocation'
        carrier:
          example: usps
          type: string
          description: >-
            Name of the carrier of the shipment to track. See <a
            href="/shippoapi/public-api/carriers">Carriers</a>.
        eta:
          format: date-time
          type: string
          description: >-
            The estimated time of arrival according to the carrier, this might
            be updated by carriers during the life of the shipment.
        messages:
          items:
            type: string
          type: array
        metadata:
          example: Order 000123
          type: string
          description: >-
            A string of up to 100 characters that can be filled with any
            additional information you want to attach to the object.
        original_eta:
          example: '2021-07-23T00:00:00Z'
          format: date-time
          type: string
          description: >-
            The estimated time of arrival according to the carrier at the time
            the shipment first entered the system.
        servicelevel:
          $ref: '#/components/schemas/ServiceLevelWithParent'
        tracking_history:
          items:
            $ref: '#/components/schemas/TrackingStatus'
          type: array
          description: >-
            A list of tracking events, following the same structure as
            <code>tracking_status</code>. 

            It contains a full history of all tracking statuses, starting with
            the earlier tracking event first.
        tracking_number:
          example: '9205590164917312751089'
          type: string
          description: Tracking number to track.
        tracking_status:
          $ref: '#/components/schemas/TrackingStatus'
        transaction:
          type: string
          description: >-
            The <code>object_id</code> of the transaction associated with this
            tracking object. 

            This field is visible only to the object owner of the transaction.
      required:
        - carrier
        - tracking_number
        - tracking_history
        - messages
      type: object
    TrackingStatus:
      description: The latest tracking information of this shipment.
      properties:
        location:
          $ref: '#/components/schemas/TrackingStatusLocation'
        object_created:
          format: date-time
          type: string
        object_id:
          type: string
        object_updated:
          format: date-time
          type: string
        status:
          $ref: '#/components/schemas/TrackingStatusEnum'
        substatus:
          $ref: '#/components/schemas/TrackingStatusSubstatus'
        status_date:
          example: '2016-07-23T00:00:00Z'
          format: date-time
          type: string
          description: >-
            Date and time when the carrier scanned this tracking event. This is
            displayed in UTC.
        status_details:
          example: Your shipment has been delivered at the destination mailbox.
          type: string
          description: The human-readable description of the status.
      required:
        - object_created
        - object_updated
        - object_id
        - status
        - status_details
      type: object
    TrackingStatusEnum:
      example: DELIVERED
      type: string
      description: Indicates the high level status of the shipment.
      enum:
        - UNKNOWN
        - PRE_TRANSIT
        - TRANSIT
        - DELIVERED
        - RETURNED
        - FAILURE
    TrackingStatusLocationBase:
      properties:
        city:
          example: Las Vegas
          type: string
        country:
          example: US
          type: string
        state:
          example: NV
          type: string
        zip:
          example: '89101'
          type: string
      type: object
    TrackingStatusLocation:
      allOf:
        - $ref: '#/components/schemas/TrackingStatusLocationBase'
      description: >-
        An object containing zip, city, state and country information of the
        tracking event.
    TrackingStatusFromLocation:
      allOf:
        - $ref: '#/components/schemas/TrackingStatusLocationBase'
      description: The sender address with city, state, zip and country information.
    TrackingStatusToLocation:
      allOf:
        - $ref: '#/components/schemas/TrackingStatusLocationBase'
      description: The recipient address with city, state, zip and country information.
    TrackingStatusSubstatus:
      description: A finer-grained classification of the tracking event.
      properties:
        code:
          example: information_received
          type: string
          description: >-
            A code that represents the substatus of the shipment. See the <a
            href="https://docs.goshippo.com/docs/tracking/tracking/#event-definitions">Event
            Definitions</a> for more information.
        text:
          example: Information about the package received.
          type: string
          description: >-
            A human-readable description of the substatus. See the <a
            href="https://docs.goshippo.com/docs/tracking/tracking/#event-definitions">Event
            Definitions</a> for more information.
        action_required:
          type: boolean
          description: >-
            Indicates whether the substatus requires action from the shipper or
            recipient to complete delivery.
      required:
        - code
        - text
        - action_required
      type: object
    TracksRequest:
      properties:
        carrier:
          example: usps
          type: string
          description: Name of the carrier of the shipment to track.
        metadata:
          description: >-
            A string of up to 100 characters that can be filled with any
            additional information you want to attach to the object.
          example: Order 000123
          type: string
        tracking_number:
          description: Tracking number to track.
          example: '9205590164917312751089'
          type: string
      required:
        - carrier
        - tracking_number
      type: object
    Transaction:
      x-tags:
        - Transactions
      properties:
        commercial_invoice_url:
          type: string
          description: >-
            A URL pointing to the commercial invoice as a 8.5x11 inch PDF file. 

            A value will only be returned if the Transactions has been processed
            successfully and if the shipment is international.
        created_by:
          anyOf:
            - type: object
              description: >-
                An object with details about the user who created the
                Transaction (purchased the label).

                A value will be returned only for Transactions that can be
                associated with a specific user, e.g. when a logged-in

                user purchases a label via the Shippo Web application; but not
                for Transactions purchased e.g. via the API using a ShippoToken,

                which is associated with the account but not any specific user.
              properties:
                first_name:
                  type: string
                  example: Shwan
                last_name:
                  type: string
                  example: Ippotle
                username:
                  type: string
                  example: shippotle@shippo.com
            - type: 'null'
        eta:
          type: string
          description: The estimated time of arrival according to the carrier.
        label_file_type:
          $ref: '#/components/schemas/LabelFileTypeEnum'
        label_url:
          example: >-
            https://shippo-delivery.s3.amazonaws.com/70ae8117ee1749e393f249d5b77c45e0.pdf?Signature=vDw1ltcyGveVR1OQoUDdzC43BY8%3D&Expires=1437093830&AWSAccessKeyId=AKIAJTHP3LLFMYAWALIA
          type: string
          description: >-
            A URL pointing directly to the label in the format you've set in
            your settings. 

            A value will only be returned if the Transactions has been processed
            successfully.
        messages:
          $ref: '#/components/schemas/ResponseMessageList'
        metadata:
          type: string
          description: >-
            A string of up to 100 characters that can be filled with any
            additional information you want to 

            attach to the object.
        object_created:
          format: date-time
          type: string
          description: Date and time of Transaction creation.
        object_id:
          example: 915d94940ea54c3a80cbfa328722f5a1
          type: string
          description: Unique identifier of the given Transaction object.
        object_owner:
          example: shippotle@shippo.com
          type: string
          description: Username of the user who created the Transaction object.
        object_state:
          $ref: '#/components/schemas/ObjectStateEnum'
        object_updated:
          format: date-time
          type: string
          description: Date and time of last Transaction update.
        parcel:
          example: e94c7fdfdc7b495dbb390a28d929d90a
          type: string
          description: Object ID of the Parcel object that is being shipped.
        qr_code_url:
          example: >-
            https://shippo-delivery.s3.amazonaws.com/96_qr_code.pdf?Signature=PEdWrp0mFWAGwJp7FW3b%2FeA2eyY%3D&Expires=1385930652&AWSAccessKeyId=AKIAJTHP3LLFMYAWALIA
          type: string
          description: >-
            A URL pointing directly to the QR code in PNG format. 

            A value will only be returned if requested using qr_code_requested
            flag and the carrier provides such an option.
        rate:
          oneOf:
            - $ref: '#/components/schemas/CoreRate'
            - example: ec9f0d3adc9441449c85d315f0997fd5
              type: string
          description: >-
            ID of the Rate object for which a Label has to be obtained.  

            If you purchase a label by calling the transaction endpoint without
            a rate (instalabel), 

            this field will be a simplified Rate object in the Transaction model
            returned from the POST request.

            </br>Note, only rates less than 7 days old can be purchased to
            ensure up-to-date pricing.
        status:
          $ref: '#/components/schemas/TransactionStatusEnum'
        test:
          type: boolean
          description: Indicates whether the object has been created in test mode.
        tracking_number:
          example: '9499907123456123456781'
          type: string
          description: >-
            The carrier-specific tracking number that can be used to track the
            Shipment. 

            A value will only be returned if the Rate is for a trackable
            Shipment and if the Transactions has been processed successfully.
        tracking_status:
          $ref: '#/components/schemas/TrackingStatusEnum'
        tracking_url_provider:
          example: >-
            https://tools.usps.com/go/TrackConfirmAction_input?origTrackNum=9499907123456123456781
          type: string
          description: >-
            A link to track this item on the carrier-provided tracking website. 

            A value will only be returned if tracking is available and the
            carrier provides such a service.
      type: object
    TransactionStatusEnum:
      enum:
        - WAITING
        - QUEUED
        - SUCCESS
        - ERROR
        - REFUNDED
        - REFUNDPENDING
        - REFUNDREJECTED
      example: SUCCESS
      type: string
      description: Indicates the status of the Transaction.
    TransactionCreateRequest:
      title: Create request to purchase label with a Rate
      properties:
        async:
          example: false
          type: boolean
          default: true
        label_file_type:
          $ref: '#/components/schemas/LabelFileTypeEnum'
        metadata:
          example: 'Order ID #12345'
          type: string
        rate:
          example: ec9f0d3adc9441449c85d315f0997fd5
          type: string
        order:
          example: adcfdddf8ec64b84ad22772bce3ea37a
          type: string
      required:
        - rate
      type: object
    InstantTransactionCreateRequest:
      title: Create request to purchase label without a Rate (Instalabel)
      properties:
        async:
          example: false
          type: boolean
          default: false
        carrier_account:
          example: b741b99f95e841639b54272834bc478c
          type: string
        label_file_type:
          example: PDF
          type: string
          enum:
            - PNG
            - PNG_2.3x7.5
            - PDF
            - PDF_2.3x7.5
            - PDF_4x6
            - PDF_4x8
            - PDF_A4
            - PDF_A6
            - ZPLII
        metadata:
          example: 'Order ID #12345'
          type: string
        servicelevel_token:
          example: usps_priority
          type: string
        shipment:
          $ref: '#/components/schemas/ShipmentCreateRequest'
        order:
          example: adcfdddf8ec64b84ad22772bce3ea37a
          type: string
      required:
        - shipment
        - carrier_account
        - servicelevel_token
      type: object
    CoreRate:
      allOf:
        - $ref: '#/components/schemas/RateAmountAndCurrency'
        - properties:
            object_id:
              example: adcfdddf8ec64b84ad22772bce3ea37a
              type: string
              description: Unique identifier of the Rate object.
            provider:
              example: USPS
              type: string
              description: Carrier offering the rate, e.g., `FedEx` or `Deutsche Post DHL`.
            carrier_account:
              example: 078870331023437cb917f5187429b093
              type: string
              description: >-
                Object ID of the carrier account that has been used to retrieve
                the rate.
            servicelevel_name:
              description: >-
                Service level name, e.g. `Priority Mail` or `FedEx Ground®`. 

                A service level commonly defines the transit time of a Shipment
                (e.g., Express vs. Standard), 

                along with other properties.  These names vary depending on the
                provider.<br>

                See <a href="/shippoapi/public-api/service-levels">Service
                Levels</a>.
              example: Priority Mail
              type: string
            servicelevel_token:
              description: >-
                Token of the Rate's servicelevel, e.g. `usps_priority` or
                `fedex_ground`.

                See <a
                href="/shippoapi/public-api/service-levels">servicelevels</a>.
              example: fedex_ground
              type: string
      type: object
    TransactionPaginatedList:
      allOf:
        - $ref: '#/components/schemas/PaginatedList'
        - properties:
            results:
              items:
                $ref: '#/components/schemas/Transaction'
              type: array
    Invoice:
      properties:
        object_id:
          example: ec9f0d3adc9441449c85d315f0997fd5
          type: string
          description: Unique identifier of the given Invoice object
        object_created:
          format: date-time
          type: string
          description: Date and time of Invoice creation.
        object_updated:
          format: date-time
          type: string
          description: Date and time of last Invoice update.
        shippo_account:
          example: 915d94940ea54c3a80cbfa328722f5a1
          type: string
          description: Unique identifier of the user who the Invoice has been issued to.
        invoice_number:
          example: '234167'
          type: string
          description: >-
            Human readable unique identifier of the given Invoice object that is
            displayed in the web app.
        status:
          $ref: '#/components/schemas/InvoiceStatusEnum'
        invoice_closed:
          format: date-time
          type: string
          description: >-
            Date and time of when the Invoice was posted and no new Invoice
            Items were added. Field will be null when invoice is still in the
            draft status.
        invoice_paid_date:
          format: date-time
          type: string
          description: >-
            Date and time of when the Invoice was successfully paid. Field will
            be null when invoice is not in the paid status.
        total_invoiced:
          $ref: '#/components/schemas/AmountAndCurrencyInvoiced'
        total_charged:
          $ref: '#/components/schemas/AmountAndCurrencyCharged'
      type: object
    InvoicePaginatedList:
      allOf:
        - $ref: '#/components/schemas/PaginatedList'
        - properties:
            results:
              items:
                $ref: '#/components/schemas/Invoice'
              type: array
    InvoiceStatusEnum:
      enum:
        - DRAFT
        - POSTED
        - PAID
        - UNCOLLECTIBLE
        - VOID
      example: POSTED
      type: string
      description: The status of the Invoice.
    InvoiceItem:
      properties:
        object_id:
          example: ec9f0d3adc9441449c85d315f0997fd5
          type: string
          description: Unique identifier of the given Invoice Item object.
        object_created:
          format: date-time
          type: string
          description: Date and time of Invoice Item creation.
        object_updated:
          format: date-time
          type: string
          description: Date and time of last Invoice Item update.
        shippo_account:
          example: 915d94940ea54c3a80cbfa328722f5a1
          type: string
          description: >-
            Unique identifier of the user who the Invoice Item has been issued
            to.
        type:
          $ref: '#/components/schemas/InvoiceItemTypesEnum'
          example: SUBSCRIPTION_PLAN_FEE
          type: string
        description:
          example: monthly subscription plan fee for 2019-08-24
          type: string
          description: Additional information about what the Invoice Item is for.
        amount:
          example: '5.54'
          type: string
          description: The money amount that the Invoice Item represents.
        currency:
          example: USD
          type: string
          description: >-
            The currency that 'amount' is in. The official ISO 4217 currency
            codes are used, e.g. "USD" or "EUR".

            <a href="http://www.xe.com/iso4217.php" target="blank">ISO 4217
            Standard</a>.
        charge_conversion:
          $ref: '#/components/schemas/ConversionAmount'
        invoice:
          example: 011044d8405e43bd8b1efe1c21f967df
          type: string
          description: Unique identifier of the Invoice that the Invoice Item belongs to.
        transaction:
          example: 915d94940ea54c3a80cbfa328722f5a1
          type: string
          description: >-
            Unique identifier of the Transaction that the Invoice Item
            represents. Not all Invoice Items are linked to a transaction.
      type: object
    InvoiceItemTypesEnum:
      type: string
      enum:
        - LABEL_PAYMENT
        - LABEL_SURCHARGE
        - LABEL_REFUND
        - ONE_OFF_CREDIT
        - TRACK_FEE
        - ADDRESS_VALIDATION_FEE
        - SUBSCRIPTION_PLAN_FEE
        - PROMO_CODE_CREDIT
        - PREAUTH_CAPTURE
        - LABEL_PAYMENT_ADJUSTMENT
        - LABEL_REFUND_ADJUSTMENT
      description: >
        The type of the Invoice Item.

        |Type| Description|

        |:---|:---|

        | LABEL_PAYMENT | Invoice Item for the payment of a label. |

        | LABEL_SURCHARGE | Invoice Item for a surcharge of a label. See <a
        href="https://support.goshippo.com/hc/en-us/articles/115004734443-Understanding-Postal-Surcharges-in-Shippo">
        here </a> for more information. |

        | LABEL_REFUND | Invoice Item for a refund of a label. |

        | ONE_OFF_CREDIT | Invoice Item for credit given by Shippo. |

        | TRACK_FEE | Invoice Item for fees associated with tracking services. |

        | ADDRESS_VALIDATION_FEE | Invoice Item for fees associated with global
        address validation services. |

        | SUBSCRIPTION_PLAN_FEE | Invoice Item for subscription plan fees. |

        | PROMO_CODE_CREDIT | Invoice Item for promotional code related credits.
        |

        | PREAUTH_CAPTURE | Invoice Item for preauthorization capture.
        Represents a credit. See <a
        href="https://support.goshippo.com/hc/en-us/articles/4407966198171-Pre-Authorization-Charges-for-New-Accounts-in-Shippo">
        here </a> for more information. |

        | LABEL_PAYMENT_ADJUSTMENT | Invoice Item for adjustments on label
        purchases. |

        | LABEL_REFUND_ADJUSTMENT | Invoice Item for adjustments on label
        refunds. |
    InvoiceItemPaginatedList:
      allOf:
        - $ref: '#/components/schemas/PaginatedList'
        - properties:
            results:
              items:
                $ref: '#/components/schemas/InvoiceItem'
              type: array
    FedExConnectExistingOwnAccountParameters:
      title: FedEx account parameters
      description: >
        In the case of masked fields, they should be handled carefully.


        Fields also must consider: 

        - Not providing a *fields* in parameters will not result in a change to
        any configured value 

        - Providing a value in a *masked field* with ****** (exactly 6
        asterisks) will not change the configured value 

        - Providing *field* with null will clear the configured value 

        - Providing *field* with any other value will change the configured
        value and may affect the behavior of the account.
      properties:
        first_name:
          type: string
          description: First name of the account holder
        last_name:
          type: string
          description: Last name of the account holder
        phone_number:
          type: string
          description: Phone number of the account holder
        from_address_st:
          type: string
          description: Street address of the account holder
        from_address_city:
          type: string
          description: City of the account holder
        from_address_state:
          type: string
          description: State of the account holder
        from_address_zip:
          type: string
          description: Zip code of the account holder
        from_address_country_iso2:
          type: string
          format: iso-3166-1-alpha-2
          description: Country of the account holder
        use_multi_factor_registration:
          type: boolean
          description: >-
            Must be true. FedEx accounts are registered using the multi-factor
            registration workflow.
        verification_option:
          type: string
          description: >-
            Determines the verification option to use for the account
            registration (Enum: SMS, EMAIL, CALL, INVOICE).
          enum:
            - SMS
            - EMAIL
            - CALL
            - INVOICE
        verification_pin:
          type: string
          description: (optional) The PIN to verify the account.
        verification_invoice_number:
          type: string
          description: (optional) The invoice number to verify the account.
        verification_invoice_amount:
          type: string
          format: decimal
          example: '340'
          description: (optional) The invoice amount to verify the account.
        verification_invoice_date:
          type: string
          format: date
          pattern: ^\d{4}-\d{2}-\d{2}$
          example: '2024-03-09'
          description: >-
            (optional) The invoice date to verify the account. In the format
            `YYYY-MM-DD`.
        verification_invoice_currency:
          type: string
          format: iso-4217
          example: USD
          description: (optional) The invoice currency to verify the account.
      required:
        - first_name
        - last_name
        - phone_number
        - from_address_st
        - from_address_city
        - from_address_state
        - from_address_zip
        - from_address_country_iso2
        - use_multi_factor_registration
        - verification_option
      type: object
    UPSConnectExistingOwnAccountParameters:
      title: UPS account parameters
      description: >-
        An array of additional parameters for the account, such as e.g. password
        or token.

        Please check the <a
        href="https://docs.goshippo.com/docs/carriers/carrieraccounts/">carrier
        accounts tutorial</a> page for the parameters per carrier.<br> 

        To protect account information, this field will be masked in any API
        response.

        In the case of masked fields, they should be handled carefully.


        Fields also must consider: 

        - Not providing a *fields* in parameters will not result in a change to
        any configured value 

        - Providing a value in a *masked field* with ****** (exactly 6
        asterisks) will not change the configured value 

        - Providing *field* with null will clear the configured value 

        - Providing *field* with any other value will change the configured
        value and may affect the behavior of the account.
      properties:
        account_number:
          description: The UPS account number
          example: 94567e
          type: string
        aia_country_iso2:
          description: >-
            Only required if has_invoice is true. Country associated with the
            account that issued the invoice
          example: US
          type: string
        billing_address_city:
          example: San Francisco
          type: string
        billing_address_country_iso2:
          example: US
          maxLength: 2
          minLength: 2
          type: string
        billing_address_state:
          example: CA
          maxLength: 2
          minLength: 2
          type: string
        billing_address_street1:
          example: 731 Market St
          type: string
        billing_address_street2:
          description: Empty string acceptable for billing_address_street2
          example: STE 200
          type: string
        billing_address_zip:
          example: '94103'
          maxLength: 5
          minLength: 5
          type: string
        collec_country_iso2:
          example: US
          maxLength: 2
          minLength: 2
          type: string
        collec_zip:
          description: Zip code of the collection/pickup address
          example: '94103'
          maxLength: 5
          minLength: 5
          type: string
        company:
          description: >-
            Company name. Full name is acceptable in this field if the user has
            no company name
          example: Shippo
          type: string
        currency_code:
          description: >-
            Only required if has_invoice is true. 3-letter currency code
            associated with invoice_value
          example: USD
          maxLength: 3
          minLength: 3
          type: string
        email:
          example: hippo@shippo.com
          type: string
        full_name:
          example: Shippo Meister
          type: string
        has_invoice:
          description: >-
            true if user has been issued a UPS invoice within the past 90 days
            for the US or Canada; and 45 days for any other countries. User can
            use data from any of the last 3 invoices
          type: boolean
        invoice_controlid:
          description: Only required if aia_country_iso2 is US and has_invoice is true.
          example: '1234'
          maxLength: 4
          minLength: 4
          type: string
        invoice_date:
          description: >-
            Only required if has_invoice is true. Date the invoice was issued.
            yyyymmdd format
          example: '20210529'
          type: string
        invoice_number:
          example: '1112234'
          maxLength: 15
          minLength: 1
          type: string
        invoice_value:
          description: >-
            Only required if has_invoice is true. Max 16 digits before decimal
            and 2 digits after decimal
          example: '11.23'
          type: string
        phone:
          example: '1112223333'
          type: string
        title:
          description: >-
            User's title, e.g. including but not limited to Manager, Doctor,
            Artist, Engineer, Mr, Ms, Mrs, Mx
          example: Manager
          type: string
        ups_agreements:
          description: >-
            Whether the user agrees to the UPS terms and conditions or not.
            Error 400 will be returned if passed in as false
          type: boolean
      required:
        - ups_agreements
        - account_number
        - title
        - company
        - full_name
        - phone
        - billing_address_street1
        - billing_address_city
        - billing_address_zip
        - billing_address_state
        - billing_address_country_iso2
        - collec_zip
        - collec_country_iso2
        - has_invoice
        - email
      type: object
    CarrierAccountBase:
      properties:
        account_id:
          description: >-
            Unique identifier of the account. Please check the <a
            href="https://docs.goshippo.com/docs/carriers/carrieraccounts/">carrier
            accounts tutorial</a> 

            page for the `account_id` per carrier.<br> 

            To protect account information, this field will be masked in any API
            response.
          example: '****'
          type: string
        active:
          type: boolean
          description: >-
            Determines whether the account is active. When creating a shipment,
            if no `carrier_accounts` are explicitly 

            passed Shippo will query all carrier accounts that have this field
            set. By default, this is set to True.
        carrier:
          example: usps
          type: string
          description: >-
            Carrier token, see <a
            href="/shippoapi/public-api/carriers">Carriers</a><br>

            Please check the <a
            href="https://docs.goshippo.com/docs/carriers/carrieraccounts/">carrier
            accounts tutorial</a> page for all supported carriers.
        parameters:
          oneOf:
            - $ref: '#/components/schemas/ConnectExistingOwnAccountParameters'
            - $ref: '#/components/schemas/FedExConnectExistingOwnAccountParameters'
            - $ref: '#/components/schemas/UPSConnectExistingOwnAccountParameters'
      required:
        - carrier
        - account_id
      type: object
    CarrierAccountWithExtraInfo:
      allOf:
        - $ref: '#/components/schemas/CarrierAccount'
        - properties:
            object_info:
              type: object
              description: Holds internal state relevant to users.
              properties:
                authentication:
                  type: object
                  properties:
                    type:
                      type: string
                      description: Authentication method used by this account.
                      enum:
                        - default
                        - oauth
                    status:
                      type: string
                      description: >-
                        Current authentication status. Possible values:
                        'disconnected' (authorization lost, reconnect needed),
                        'connected' (authorized and active),
                        'authorization_pending' (awaiting initial authorization
                        flow).
                      enum:
                        - disconnected
                        - connected
                        - authorization_pending
                verification:
                  type: object
                  properties:
                    policy:
                      type: string
                      description: >-
                        Policy to indicate if the Account needs multi-factor
                        verification.
                      enum:
                        - required
                        - not-required
    CarrierAccount:
      title: Carrier Account
      x-tags:
        - Carrier Accounts
      allOf:
        - $ref: '#/components/schemas/CarrierAccountBase'
        - properties:
            carrier_name:
              example: USPS
              description: >-
                Carrier name, see <a
                href="/shippoapi/public-api/carriers">Carriers</a><br>
            is_shippo_account:
              example: false
              type: boolean
            metadata:
              type: string
            object_id:
              example: 6aa34d5f6865448fbb1ee93636e98999
              type: string
              description: Unique identifier of the carrier account object.
            object_owner:
              example: bob+22@gmail.com
              type: string
              description: Username of the user who created the carrier account object.
            service_levels:
              items:
                $ref: '#/components/schemas/CarrierAccountServiceLevel'
              type: array
            test:
              example: false
              type: boolean
              description: Indicates whether the object has been created in test mode.
    CarrierAccountServiceLevel:
      description: Contains details regarding the service level for the carrier account.
      properties:
        name:
          example: Priority Mail Express
          type: string
          description: >-
            Service level name, e.g. `Priority Mail` or `FedEx Ground®`. 

            A service level commonly defines the transit time of a Shipment
            (e.g., Express vs. Standard), along with other properties. 

            These names vary depending on the provider.<br>

            See <a href="/shippoapi/public-api/service-levels">Service
            Levels</a>.
        token:
          example: usps_priority_express
          type: string
          description: >-
            Service level token, e.g. `usps_priority` or `fedex_ground`.<br>

            See <a href="/shippoapi/public-api/service-levels">Service
            Levels</a>.
        supports_return_labels:
          example: true
          type: boolean
          description: Whether or not the service level supports return labels.
      type: object
    CarrierAccountUpdateRequest:
      allOf:
        - $ref: '#/components/schemas/CarrierAccountBase'
    CarrierAccountRegistrationStatus:
      properties:
        carrier_account:
          example: 99dc410d295b4a168993cc38809cb123
          type: string
        object_created:
          format: date-time
          type: string
        object_owner:
          example: tom@gmail.com
          type: string
        object_updated:
          format: date-time
          type: string
        status:
          example: PENDING_TERMS
          type: string
      type: object
    CarrierAccountCanadaPostCreateRequest:
      title: Shippo Canada Post account
      properties:
        carrier:
          type: string
          const: canada_post
        parameters:
          $ref: '#/components/schemas/CarrierAccountCanadaPostCreateParameters'
      required:
        - carrier
        - parameters
      type: object
    CarrierAccountCanadaPostCreateParameters:
      properties:
        canada_post_terms:
          description: >-
            Whether or not the user agrees to Canada Post's terms. If passed in
            as false, request will fail with error 400
          type: boolean
        company:
          example: Shippo
          type: string
        email:
          example: hippo@shippo.com
          type: string
        full_name:
          example: Shippo Meister
          type: string
        phone:
          description: Needs to be a valid phone number and cannot be null
          example: '1112223333'
          type: string
      required:
        - company
        - phone
        - full_name
        - email
        - canada_post_terms
      type: object
    CarrierAccountChronopostCreateRequest:
      title: Shippo Chronopost account
      properties:
        carrier:
          type: string
          const: chronopost
        parameters:
          type: object
      required:
        - carrier
        - parameters
      type: object
    CarrierAccountColissimoCreateRequest:
      title: Shippo Colissimo account
      properties:
        carrier:
          type: string
          const: colissimo
        parameters:
          type: object
      required:
        - carrier
        - parameters
      type: object
    CarrierAccountCorreosCreateRequest:
      title: Shippo Correos account
      properties:
        carrier:
          type: string
          const: correos
        parameters:
          type: object
      required:
        - carrier
        - parameters
      type: object
    CarrierAccountDeutschePostCreateRequest:
      title: Shippo Deutsche Post account
      properties:
        carrier:
          type: string
          const: deutsche_post
        parameters:
          type: object
      required:
        - carrier
        - parameters
      type: object
    CarrierAccountDHLExpressCreateRequest:
      title: Shippo DHL Express account
      properties:
        carrier:
          type: string
          const: dhl_express
        parameters:
          $ref: '#/components/schemas/CarrierAccountDHLExpressCreateRequestParameters'
      required:
        - carrier
        - parameters
      type: object
    CarrierAccountDHLExpressCreateRequestParameters:
      properties:
        user_accepted_terms_and_conditions:
          description: >-
            Whether or not the user agrees to the DHL Express Terms and
            Conditions. If passed in as false, request will fail with error 400
          type: boolean
      required:
        - user_accepted_terms_and_conditions
      type: object
    CarrierAccountDpdDeCreateRequest:
      title: Shippo DPD DE account
      properties:
        carrier:
          type: string
          const: dpd_de
        parameters:
          type: object
      required:
        - carrier
        - parameters
      type: object
    CarrierAccountDPDUKCreateRequest:
      title: Shippo DPD UK account
      properties:
        carrier:
          type: string
          const: dpd_uk
        parameters:
          type: object
      required:
        - carrier
        - parameters
      type: object
    CarrierAccountFedExCreateRequest:
      title: Shippo FedEx account
      properties:
        carrier:
          type: string
          const: fedex
        parameters:
          type: object
      required:
        - carrier
        - parameters
      type: object
    CarrierAccountHermesUKCreateRequest:
      title: Shippo Evri UK account
      properties:
        carrier:
          type: string
          const: hermes_uk
        parameters:
          type: object
      required:
        - carrier
        - parameters
      type: object
    CarrierAccountMondialRelayCreateRequest:
      title: Shippo Mondial Relay account
      properties:
        carrier:
          type: string
          const: mondial_relay
        parameters:
          type: object
      required:
        - carrier
        - parameters
      type: object
    CarrierAccountPosteItalianeCreateRequest:
      title: Shippo Poste Italiane account
      properties:
        carrier:
          type: string
          const: poste_italiane
        parameters:
          type: object
      required:
        - carrier
        - parameters
      type: object
    CarrierAccountUPSCreateRequest:
      title: Shippo UPS account
      properties:
        carrier:
          type: string
          const: ups
        parameters:
          $ref: '#/components/schemas/CarrierAccountUPSCreateRequestParameters'
      required:
        - carrier
      type: object
    CarrierAccountUSPSCreateRequest:
      title: Shippo USPS account
      properties:
        carrier:
          const: usps
          type: string
        parameters:
          type: object
      required:
        - carrier
        - parameters
      type: object
    CarrierAccountRoyalMailCreateRequest:
      title: Shippo Royal Mail account
      properties:
        carrier:
          type: string
          const: royal_mail
        parameters:
          $ref: '#/components/schemas/CarrierAccountRoyalMailCreateRequestParameters'
      required:
        - carrier
        - parameters
      type: object
    CarrierAccountRoyalMailSfCreateRequest:
      title: Shippo Royal Mail Storefeeder account
      properties:
        carrier:
          type: string
          const: royal_mail_sf
        parameters:
          $ref: >-
            #/components/schemas/CarrierAccountRoyalMailSfCreateRequestParameters
      required:
        - carrier
        - parameters
      type: object
    CarrierAccountUPSCreateRequestParameters:
      properties:
        billing_address_city:
          example: San Francisco
          type: string
        billing_address_country_iso2:
          example: US
          maxLength: 2
          minLength: 2
          type: string
        billing_address_state:
          example: CA
          maxLength: 2
          minLength: 2
          type: string
        billing_address_street1:
          example: 731 Market St
          type: string
        billing_address_street2:
          description: Empty string acceptable for billing_address_street2
          example: STE 200
          type: string
        billing_address_zip:
          example: '94103'
          maxLength: 5
          minLength: 5
          type: string
        company:
          description: >-
            Company name. Full name is acceptable in this field if the user has
            no company name
          example: Shippo
          type: string
        email:
          example: hippo@shippo.com
          type: string
        full_name:
          example: Shippo Meister
          type: string
        phone:
          description: Needs to be a valid phone number and cannot be null
          example: '1112223333'
          type: string
        pickup_address_city:
          description: User's pickup address city.
          example: San Francisco
          type: string
        pickup_address_country_iso2:
          description: User's pickup street 1.
          example: US
          maxLength: 2
          minLength: 2
          type: string
        pickup_address_same_as_billing_address:
          example: false
          type: boolean
        pickup_address_state:
          description: User's pickup address state.
          example: CA
          maxLength: 2
          minLength: 2
          type: string
        pickup_address_street1:
          description: User's pickup address street 1.
          example: 731 Market St
          type: string
        pickup_address_street2:
          description: User's pickup street 2.
          example: STE 200
          type: string
        pickup_address_zip:
          description: User's pickup address zip code.
          example: '94103'
          maxLength: 5
          minLength: 5
          type: string
        ups_agreements:
          description: >-
            Whether the user agrees to the UPS terms and conditions or not.
            Error 400 will be returned if passed in as false
          type: boolean
      required:
        - ups_agreements
        - billing_address_street1
        - billing_address_city
        - billing_address_zip
        - billing_address_state
        - billing_address_country_iso2
        - pickup_address_street1
        - pickup_address_city
        - pickup_address_zip
        - pickup_address_state
        - pickup_address_country_iso2
      type: object
    CarrierAccountRoyalMailCreateRequestParameters:
      properties:
        client_id:
          description: The client ID assigned to the user
          type: string
        client_secret:
          description: The secret that corresponds to the supplied client ID
          type: string
        partner_token:
          description: A unique identifier for your OBA account
          type: string
      required:
        - client_id
        - client_secret
        - partner_token
    CarrierAccountRoyalMailSfCreateRequestParameters:
      properties:
        royal_mail_sf_agreements:
          type: boolean
      required:
        - royal_mail_sf_agreements
    UserParcelTemplateBase:
      properties:
        distance_unit:
          $ref: '#/components/schemas/DistanceUnitEnum'
          description: >-
            The measure unit used for length, width and height. Required, but if
            using a preset carrier template then this field must be empty.
        height:
          description: >-
            The height of the package, in units specified by the `distance_unit`
            attribute. Required, but if using a preset carrier template then
            this field must be empty.
          example: '6'
          type: string
        length:
          description: >-
            The length of the package, in units specified by the `distance_unit`
            attribute. Required, but if using a preset carrier template then
            this field must be empty.
          example: '10'
          type: string
        name:
          description: The name of the User Parcel Template
          example: My Custom Template
          type: string
        weight:
          description: >-
            The weight of the package, in units specified by the weight_unit
            attribute.
          example: '12'
          type: string
        weight_unit:
          $ref: '#/components/schemas/WeightUnitEnum'
        width:
          description: >-
            The width of the package, in units specified by the `distance_unit`
            attribute. Required, but if using a preset carrier template then
            this field must be empty.
          example: '8'
          type: string
      type: object
    UserParcelTemplateWithoutCarrierTemplateCreateRequest:
      allOf:
        - $ref: '#/components/schemas/UserParcelTemplateBase'
        - title: A request to create or update a new parcel template.
          required:
            - name
            - length
            - width
            - height
            - distance_unit
    UserParcelTemplateUpdateRequest:
      allOf:
        - $ref: '#/components/schemas/UserParcelTemplateBase'
        - required:
            - name
            - length
            - width
            - height
            - distance_unit
    UserParcelTemplateWithCarrierTemplateCreateRequest:
      title: A request to create or update a new parcel template.
      properties:
        template:
          description: The object representing the carrier parcel template
          type: string
        weight:
          description: >-
            The weight of the package, in units specified by the weight_unit
            attribute.
          example: '12'
          type: string
        weight_unit:
          $ref: '#/components/schemas/WeightUnitEnum'
      type: object
    UserParcelTemplateCreateRequest:
      oneOf:
        - $ref: >-
            #/components/schemas/UserParcelTemplateWithCarrierTemplateCreateRequest
        - $ref: >-
            #/components/schemas/UserParcelTemplateWithoutCarrierTemplateCreateRequest
    UserParcelTemplateList:
      properties:
        results:
          items:
            $ref: '#/components/schemas/UserParcelTemplate'
          type: array
      type: object
    UserParcelTemplate:
      title: User Parcel Template
      x-tags:
        - User Parcel Templates
      allOf:
        - $ref: '#/components/schemas/UserParcelTemplateBase'
        - properties:
            object_created:
              description: Date and time of User Parcel Template creation
              example: '2013-12-11T19:38:09.729Z'
              format: date-time
              type: string
            object_id:
              description: Unique identifier of the given User Parcel Template object
              example: b958d3690bb04bb8b2986724872750f5
              type: string
            object_owner:
              description: Username of the user who created the User Parcel Template object
              example: shippotle@shippo.com
              type: string
            object_updated:
              description: Date and time of last update on User Parcel Template
              example: '2013-12-12T19:38:09.729Z'
              format: date-time
              type: string
            template:
              $ref: '#/components/schemas/CarrierParcelTemplate'
          title: The fields of a parcel template before saving it to the db.
    WebhookBase:
      type: object
      properties:
        event:
          type: string
          description: Type of event that triggers the webhook.
          example: track_updated
        url:
          type: string
          description: URL webhook events are sent to.
          example: https://example.com/shippo-webhook
        active:
          type: boolean
          description: Determines whether the webhook is active or not.
          example: true
        is_test:
          type: boolean
          description: Determines whether the webhook is a test webhook or not.
          example: false
    Webhook:
      x-tags:
        - Webhooks
      allOf:
        - $ref: '#/components/schemas/WebhookBase'
        - properties:
            object_created:
              type: string
              format: date-time
              description: Timestamp of the creation of the webhook.
            object_id:
              type: string
              description: >-
                Unique identifier of the webhook. This can be used to retrieve
                or delete the webhook.
            object_updated:
              type: string
              format: date-time
              description: Timestamp of the last update of the webhook.
            object_owner:
              type: string
              description: Username of the user who created the webhook.
      required:
        - event
        - url
    WebhookUpdateRequest:
      allOf:
        - $ref: '#/components/schemas/WebhookBase'
        - properties:
            event:
              $ref: '#/components/schemas/WebhookEventTypeEnum'
      required:
        - event
        - url
    WebhookEventTypeEnum:
      description: Type of event that triggered the webhook.
      type: string
      enum:
        - transaction_created
        - transaction_updated
        - track_updated
        - batch_created
        - batch_purchased
        - all
    WebhookPaginatedList:
      allOf:
        - $ref: '#/components/schemas/PaginatedList'
        - properties:
            count:
              type: integer
            results:
              type: array
              items:
                $ref: '#/components/schemas/Webhook'
    WebhookPayloadBase:
      description: Content of the webhook posted to the external URL
      properties:
        event:
          $ref: '#/components/schemas/WebhookEventTypeEnum'
        test:
          type: boolean
          description: Determines whether the webhook is a test webhook or not.
      type: object
    WebhookPayloadTransaction:
      allOf:
        - $ref: '#/components/schemas/WebhookPayloadBase'
        - properties:
            data:
              $ref: '#/components/schemas/Transaction'
      type: object
    WebhookPayloadBatch:
      allOf:
        - $ref: '#/components/schemas/WebhookPayloadBase'
        - properties:
            data:
              type: string
              description: >-
                A string containing the batch object ID, of the form 'batch
                {batchId} (created|processing complete)'.
      type: object
    WebhookPayloadTrack:
      allOf:
        - $ref: '#/components/schemas/WebhookPayloadBase'
        - properties:
            data:
              $ref: '#/components/schemas/Track'
    WebhookPayload:
      title: Webhook Payload
      x-tags:
        - Webhooks
      description: >-
        The payload is the body of the POST request Shippo sends to the URL
        specified at the time of webhook registration.
      oneOf:
        - $ref: '#/components/schemas/WebhookPayloadTrack'
        - $ref: '#/components/schemas/WebhookPayloadBatch'
        - $ref: '#/components/schemas/WebhookPayloadTransaction'
      discriminator:
        propertyName: event
        mapping:
          track_updated: '#/components/schemas/WebhookPayloadTrack'
          batch_created: '#/components/schemas/WebhookPayloadBatch'
          batch_purchased: '#/components/schemas/WebhookPayloadBatch'
          transaction_created: '#/components/schemas/WebhookPayloadTransaction'
          transaction_updated: '#/components/schemas/WebhookPayloadTransaction'
      x-speakeasy-include: true
    CarriersEnum:
      type: string
      enum:
        - airterra
        - apc_postal
        - apg
        - aramex
        - asendia_us
        - australia_post
        - axlehire
        - better_trucks
        - borderguru
        - boxberry
        - bring
        - canada_post
        - chronopost
        - collect_plus
        - correios_br
        - correos_espana
        - colissimo
        - deutsche_post
        - dhl_benelux
        - dhl_ecommerce
        - dhl_express
        - dhl_germany_c2c
        - dhl_germany
        - dpd_de
        - dpd_uk
        - estafeta
        - fastway_australia
        - fedex
        - globegistics
        - gls_us
        - gophr
        - gso
        - hermes_germany_b2c
        - hermes_uk
        - hongkong_post
        - lasership
        - lso
        - mondial_relay
        - new_zealand_post
        - nippon_express
        - ontrac
        - parcelforce
        - passport
        - pcf
        - poste_italiane
        - posti
        - purolator
        - royal_mail
        - royal_mail_sf
        - rr_donnelley
        - russian_post
        - skypostal
        - stuart
        - swyft
        - uds
        - ups
        - usps
        - veho
      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 |
    ObjectStateEnum:
      type: string
      enum:
        - VALID
        - INVALID
      description: Indicates the validity of the enclosing object
    ServiceLevelUSPSEnum:
      type: string
      enum:
        - usps_priority
        - usps_priority_express
        - usps_media_mail
        - usps_priority_mail_international
        - usps_priority_mail_express_international
        - usps_first_class_package_international_service
        - usps_ground_advantage
      description: >
        |Token | Service name|

        |:---|:---|

        | usps_priority | Priority Mail|

        | usps_priority_express | Priority Mail Express|

        | usps_media_mail | Media Mail, only for existing Shippo customers with
        grandfathered Media Mail option.|

        | 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 |
    ServiceLevelFedExEnum:
      type: string
      enum:
        - fedex_ground
        - fedex_home_delivery
        - fedex_smart_post
        - fedex_ground_economy
        - fedex_2_day
        - fedex_2_day_am
        - fedex_express_saver
        - fedex_standard_overnight
        - fedex_priority_overnight
        - fedex_first_overnight
        - fedex_international_economy
        - fedex_international_priority
        - fedex_international_first
        - fedex_europe_first_international_priority
        - fedex_international_connect_plus
        - fedex_first
        - fedex_priority
        - fedex_priority_express
        - fedex_economy_select
        - fedex_regional_economy
        - fedex_first_overnight_extra_hours
        - fedex_international_priority_express
        - fedex_next_day_mid_morning
        - fedex_priority_overnight_extra_hours
        - fedex_standard_overnight_extra_hours
      description: >
        |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_europe_first_international_priority | FedEx International
        First®|

        | fedex_international_connect_plus | FedEx International Connect Plus|

        | fedex_first | FedEx First |

        | fedex_priority | FedEx Priority |

        | fedex_priority_express | FedEx Priority Express|

        | fedex_economy_select | FedEx® Economy |

        | fedex_regional_economy | FedEx® Regional Economy |

        | fedex_first_overnight_extra_hours | First Overnight® EH |

        | fedex_international_priority_express | International Priority® Express
        |

        | fedex_next_day_mid_morning | Next Day Mid Morning |

        | fedex_priority_overnight_extra_hours | Priority Overnight® EH |

        | fedex_standard_overnight_extra_hours | Standard Overnight® EH |
    ServiceLevelUPSEnum:
      type: string
      enum:
        - ups_standard
        - ups_ground
        - ups_saver
        - ups_3_day_select
        - ups_second_day_air
        - ups_second_day_air_am
        - ups_next_day_air
        - ups_next_day_air_saver
        - ups_next_day_air_early_am
        - ups_mail_innovations_bpm_flat
        - ups_mail_innovations_bpm_parcel
        - ups_mail_innovations_irregular
        - ups_mail_innovations_media_mail
        - ups_mail_innovations_parcel
        - ups_mail_innovations_standard_flat
        - ups_surepost
        - ups_surepost_bound_printed_matter
        - ups_surepost_lightweight
        - ups_surepost_media
        - ups_express
        - ups_express_1200
        - ups_express_plus
        - ups_expedited
        - ups_express_early
        - ups_access_point_economy
      description: |
        |Token | Service name|
        |:---|:---|
        | ups_standard | Standard℠|
        | ups_ground | Ground|
        | ups_saver | Saver®|
        | ups_3_day_select | 3 Day Select®|
        | ups_second_day_air | 2nd Day Air®|
        | ups_second_day_air_am | 2nd Day Air® A.M.|
        | ups_next_day_air | Next Day Air®|
        | ups_next_day_air_saver | Next Day Air Saver®|
        | ups_next_day_air_early_am | Next Day Air® Early|
        | ups_mail_innovations_bpm_flat | Mail Innovations BPM Flat |
        | ups_mail_innovations_bpm_parcel | Mail Innovations BPM Parcel |
        | ups_mail_innovations_irregular | Mail Innovations Irregular |
        | ups_mail_innovations_media_mail | Mail Innovations Media Mail |
        | ups_mail_innovations_parcel | Mail Innovations Parcel |
        | ups_mail_innovations_standard_flat | Mail Innovations Standard Flat |
        | ups_surepost | Surepost|
        | ups_surepost_bound_printed_matter | SurePost® Bound Printed Matter|
        | ups_surepost_lightweight | Surepost Lightweight|
        | ups_surepost_media | SurePost® Media|
        | ups_express | Express®|
        | ups_express_1200 | Express 12:00|
        | ups_express_plus | Express Plus®|
        | ups_expedited | Expedited®|
        | ups_express_early | Express® Early|
        | ups_access_point_economy | Access Point™ Economy|
    ServiceLevelAirterraEnum:
      type: string
      enum:
        - airterra_ground
        - airterra_postal
      description: |
        |Token | Service name|
        |:---|:---|
        | airterra_ground | GroundXC|
        | airterra_postal | FastPost|
    ServiceLevelSwyftEnum:
      type: string
      enum:
        - same_day
        - next_day
      description: |
        |Token | Service name|
        |:---|:---|
        | same_day | Next Day|
        | next_day | Next Day|
    ServiceLevelAPGEnum:
      type: string
      enum:
        - epacket
        - epacket_plus
        - eparcel_premium
        - apg_eparcel_expedited
      description: |
        |Token | Service name|
        |:---|:---|
        | epacket | ePacket|
        | epacket_plus | ePacket Plus|
        | eparcel_premium | eParcel premium|
        | apg_eparcel_expedited | eParcel Expedited|
    ServiceLevelUDSEnum:
      type: string
      enum:
        - uds_next_day
      description: |
        |Token | Service name|
        |:---|:---|
        | uds_next_day | Next Day|
    ServiceLevelAPCPostalEnum:
      type: string
      enum:
        - apc_postal_parcelconnect_expedited
        - apc_postal_parcelconnect_priority
        - apc_postal_parcelconnect_priority_delcon
        - apc_postal_parcelconnect_priority_pqw
        - apc_postal_parcelconnect_book_service
        - apc_postal_parcelconnect_standard
        - apc_postal_parcelconnect_epmi
        - apc_postal_parcelconnect_epacket
        - apc_postal_parcelconnect_epmei
      description: >
        |Token | Service name|

        |:---|:---|

        | apc_postal_parcelconnect_expedited | parcelConnect Expedited|

        | apc_postal_parcelconnect_priority | parcelConnect Priority|

        | apc_postal_parcelconnect_priority_delcon | parcelConnect Priority
        Delcon|

        | apc_postal_parcelconnect_priority_pqw | parcelConnect Priority PQW|

        | apc_postal_parcelconnect_book_service | parcelConnect Book Service|

        | apc_postal_parcelconnect_standard | parcelConnect Standard|

        | apc_postal_parcelconnect_epmi | parcelConnect ePMI|

        | apc_postal_parcelconnect_epacket | parcelConnect ePacket|

        | apc_postal_parcelconnect_epmei | parcelConnect ePMEI|
    ServiceLevelAsendiaEnum:
      type: string
      enum:
        - asendia_us_priority_tracked
        - asendia_us_international_express
        - asendia_us_international_priority_airmail
        - asendia_us_international_surface_airlift
        - asendia_us_priority_mail_international
        - asendia_us_priority_mail_express_international
        - asendia_us_epacket
        - asendia_us_other
      description: >
        |Token | Service name|

        |:---|:---|

        | asendia_us_priority_tracked | Asendia USA Priority Tracked|

        | asendia_us_international_express | Asendia USA International Express|

        | asendia_us_international_priority_airmail | Asendia USA International
        Priority Airmail|

        | asendia_us_international_surface_airlift | Asendia USA International
        Surface Air Lift|

        | asendia_us_priority_mail_international | Asendia USA Priority Mail
        International|

        | asendia_us_priority_mail_express_international | Asendia USA Priority
        Mail Express International|

        | asendia_us_epacket | Asendia USA International ePacket|

        | asendia_us_other | Asendia USA Other Services (custom)|
    ServiceLevelAustraliaPostEnum:
      type: string
      enum:
        - australia_post_express_post
        - australia_post_parcel_post
        - australia_post_pack_and_track_international
        - australia_post_international_airmail
        - australia_post_express_post_international
        - australia_post_express_courier_international
        - australia_post_international_express
        - australia_post_international_standard
        - australia_post_international_economy
        - australia_post_parcel_post_return
      description: >
        |Token | Service name|

        |:---|:---|

        | australia_post_express_post | Express Post|

        | australia_post_parcel_post | Parcel Post|

        | australia_post_pack_and_track_international | Pack and Track
        International|

        | australia_post_international_airmail | International Airmail|

        | australia_post_express_post_international | Express Post
        International|

        | australia_post_express_courier_international | Express Courier
        International|

        | australia_post_international_express | International Express|

        | australia_post_international_standard | International Standard|

        | australia_post_international_economy | International Economy|

        | australia_post_parcel_post_return | Parcel Post Return|
    ServiceLevelBetterTrucksEnum:
      type: string
      enum:
        - better_trucks_same_day
        - better_trucks_next_day
      description: |
        |Token | Service name|
        |:---|:---|
        | better_trucks_same_day | Same Day|
        | better_trucks_next_day | Next Day|
    ServiceLevelJitsuEnum:
      type: string
      enum:
        - axlehire_same_day
        - axlehire_next_day
      description: |
        |Token | Service name|
        |:---|:---|
        | axlehire_same_day | Same Day|
        | axlehire_next_day | Next Day|
    ServiceLevelCanadaPostEnum:
      type: string
      enum:
        - canada_post_regular_parcel
        - canada_post_expedited_parcel
        - canada_post_priority
        - canada_post_xpresspost
        - canada_post_xpresspost_international
        - canada_post_xpresspost_usa
        - canada_post_expedited_parcel_usa
        - canada_post_tracked_packet_usa
        - canada_post_small_packet_usa_air
        - canada_post_tracked_packet_international
        - canada_post_small_packet_international_air
        - canada_post_small_packet_international_surface
        - canada_post_international_parcel_surface
        - canada_post_international_parcel_air
      description: >
        |Token | Service name|

        |:---|:---|

        | canada_post_regular_parcel | Regular Parcel|

        | canada_post_expedited_parcel | Expedited Parcel|

        | canada_post_priority | Priority|

        | canada_post_xpresspost | Xpresspost|

        | canada_post_xpresspost_international | Xpresspost International|

        | canada_post_xpresspost_usa | Xpresspost USA|

        | canada_post_expedited_parcel_usa | Expedited Parcel USA|

        | canada_post_tracked_packet_usa | Tracked Packet USA|

        | canada_post_small_packet_usa_air | Small Packet USA Air|

        | canada_post_tracked_packet_international | Tracked Packet
        International|

        | canada_post_small_packet_international_air | Small Package
        International Air|

        | canada_post_small_packet_international_surface  | Small Packet
        International Surface

        | canada_post_international_parcel_surface  | International Parcel
        Surface

        | canada_post_international_parcel_air  | International Parcel Air
    ServiceLevelColissimoEnum:
      type: string
      enum:
        - colissimo_home
        - colissimo_pick_up_point
        - colissimo_return_mainland_france
      description: |
        |Token | Service name|
        |:---|:---|
        | colissimo_home | Domicile|
        | colissimo_pick_up_point | Point Retrait|
        | colissimo_return_mainland_france | Retour France|
    ServiceLevelChronopostEnum:
      type: string
      enum:
        - chronopost_13
        - chronopost_10
        - chronopost_18
        - chronopost_relais_fr
        - chronopost_classic
        - chronopost_express
      description: |
        |Token | Service name|
        |:---|:---|
        | chronopost_13 | Chrono 13|
        | chronopost_10 | Chrono 10|
        | chronopost_18| Chrono 18|
        | chronopost_relais_fr | Chrono Point Relais|
        | chronopost_classic | Chrono Classic International|
        | chronopost_express | Chrono Express International|
    ServiceLevelCorreosEspanaEnum:
      type: string
      enum:
        - correos_standard_home
        - correos_premium_home
      description: |
        |Token | Service name|
        |:---|:---|
        | correos_standard_home| Paquete Estándar|
        | correos_premium_home | Paquete Premium|
    ServiceLevelPurolatorEnum:
      type: string
      enum:
        - purolator_ground
        - purolator_ground9_am
        - purolator_ground1030_am
        - purolator_ground_distribution
        - purolator_ground_evening
        - purolator_ground_us
        - purolator_express
        - purolator_express9_am
        - purolator_express1030_am
        - purolator_express_evening
        - purolator_express_us
        - purolator_express_us9_am
        - purolator_express_us1030_am
        - purolator_express_us1200
        - purolator_express_international
        - purolator_express_international9_am
        - purolator_express_international1030_am
        - purolator_express_international1200
      description: >
        |Token | Service name|

        |:---|:---|

        | purolator_ground | Ground|

        | purolator_ground9_am | Ground 9am|

        | purolator_ground1030_am | Ground 10:30am|

        | purolator_ground_distribution | Ground Distribution|

        | purolator_ground_evening | Ground Evening|

        | purolator_ground_us | Ground US|

        | purolator_express | Express|

        | purolator_express9_am | Express 9am|

        | purolator_express1030_am | Express 10am|

        | purolator_express_evening | Express Evening|

        | purolator_express_us | Express US|

        | purolator_express_us9_am | Express US 9am|

        | purolator_express_us1030_am | Express US 10:30am|

        | purolator_express_us1200 | Express US 12pm|

        | purolator_express_international | Express International|

        | purolator_express_international9_am | Express International 9am|

        | purolator_express_international1030_am | Express International
        10:30am|

        | purolator_express_international1200 | Express International 12pm|
    ServiceLevelDHLExpressEnum:
      type: string
      enum:
        - dhl_express_domestic_express_doc
        - dhl_express_economy_select_doc
        - dhl_express_worldwide_nondoc
        - dhl_express_worldwide_doc
        - dhl_express_worldwide
        - dhl_express_worldwide_eu_doc
        - dhl_express_break_bulk_express_doc
        - dhl_express_express_9_00_nondoc
        - dhl_express_economy_select_nondoc
        - dhl_express_break_bulk_economy_doc
        - dhl_express_express_9_00_doc
        - dhl_express_express_10_30_doc
        - dhl_express_express_10_30_nondoc
        - dhl_express_express_12_00_doc
        - dhl_express_europack_nondoc
        - dhl_express_express_envelope_doc
        - dhl_express_express_12_00_nondoc
        - dhl_express_express_12_doc
        - dhl_express_worldwide_b2c_doc
        - dhl_express_worldwide_b2c_nondoc
        - dhl_express_medical_express
        - dhl_express_express_easy_nondoc
      description: |
        |Token | Service name|
        |:---|:---|
        | dhl_express_domestic_express_doc | Domestic Express Doc|
        | dhl_express_economy_select_doc | Economy Select Doc|
        | dhl_express_worldwide_nondoc | Express Worldwide Nondoc|
        | dhl_express_worldwide_doc | Express Worldwide Doc|
        | dhl_express_worldwide | Worldwide|
        | dhl_express_worldwide_eu_doc | Express Worldwide EU Doc|
        | dhl_express_break_bulk_express_doc | Break Bulk Express Doc|
        | dhl_express_express_9_00_nondoc | Express 9:00 NonDoc|
        | dhl_express_economy_select_nondoc | Economy Select NonDoc|
        | dhl_express_break_bulk_economy_doc | Break Bulk Economy Doc|
        | dhl_express_express_9_00_doc | Express 9:00 Doc|
        | dhl_express_express_10_30_doc | Express 10:30 Doc|
        | dhl_express_express_10_30_nondoc | Express 10:30 NonDoc|
        | dhl_express_express_12_00_doc | Express 12:00 Doc|
        | dhl_express_europack_nondoc | Europack NonDoc|
        | dhl_express_express_envelope_doc | Express Envelope Doc|
        | dhl_express_express_12_00_nondoc | Express 12:00 NonDoc|
        | dhl_express_express_12_doc | Domestic Express 12:00|
        | dhl_express_worldwide_b2c_doc | Express Worldwide (B2C) Doc|
        | dhl_express_worldwide_b2c_nondoc | Express Worldwide (B2C) NonDoc|
        | dhl_express_medical_express | Medical Express|
        | dhl_express_express_easy_nondoc | Express Easy NonDoc|
    ServiceLevelDHLeCommerceEnum:
      type: string
      enum:
        - dhl_ecommerce_marketing_parcel_expedited
        - dhl_ecommerce_globalmail_business_ipa
        - dhl_ecommerce_parcel_international_direct
        - dhl_ecommerce_parcels_expedited_max
        - dhl_ecommerce_bpm_ground
        - dhl_ecommerce_priority_expedited
        - dhl_ecommerce_globalmail_packet_ipa
        - dhl_ecommerce_globalmail_packet_isal
        - dhl_ecommerce_easy_return_plus
        - dhl_ecommerce_marketing_parcel_ground
        - dhl_ecommerce_first_class_parcel_expedited
        - dhl_ecommerce_globalmail_business_priority
        - dhl_ecommerce_parcels_expedited
        - dhl_ecommerce_globalmail_business_isal
        - dhl_ecommerce_parcel_plus_expedited_max
        - dhl_ecommerce_globalmail_packet_plus
        - dhl_ecommerce_parcels_ground
        - dhl_ecommerce_expedited
        - dhl_ecommerce_parcel_plus_ground
        - dhl_ecommerce_parcel_international_standard
        - dhl_ecommerce_bpm_expedited
        - dhl_ecommerce_parcel_international_expedited
        - dhl_ecommerce_globalmail_packet_priority
        - dhl_ecommerce_easy_return_light
        - dhl_ecommerce_parcel_plus_expedited
        - dhl_ecommerce_globalmail_business_standard
        - dhl_ecommerce_ground
        - dhl_ecommerce_globalmail_packet_standard
      description: >
        |Token | Service name|

        |:---|:---|

        | dhl_ecommerce_marketing_parcel_expedited | Marketing Parcel Expedited|

        | dhl_ecommerce_globalmail_business_ipa | GlobalMail Business IPA|

        | dhl_ecommerce_parcel_international_direct | Parcel International
        Direct|

        | dhl_ecommerce_parcels_expedited_max | Parcels Expedited Max|

        | dhl_ecommerce_bpm_ground | Bounded Printed Matter Ground|

        | dhl_ecommerce_priority_expedited | Priority Expedited|

        | dhl_ecommerce_globalmail_packet_ipa | GlobalMail Packet IPA|

        | dhl_ecommerce_globalmail_packet_isal | GlobalMail Packet ISAL|

        | dhl_ecommerce_easy_return_plus | Easy Return Plus|

        | dhl_ecommerce_marketing_parcel_ground | Marketing Parcel Ground|

        | dhl_ecommerce_first_class_parcel_expedited | First Class Parcel
        Expedited|

        | dhl_ecommerce_globalmail_business_priority | GlobalMail Business
        Priority|

        | dhl_ecommerce_parcels_expedited | Parcels Expedited|

        | dhl_ecommerce_globalmail_business_isal | GlobalMail Business ISAL|

        | dhl_ecommerce_parcel_plus_expedited_max | Parcel Plus Expedited Max|

        | dhl_ecommerce_globalmail_packet_plus | GlobalMail Packet Plus|

        | dhl_ecommerce_parcels_ground | Parcels Ground|

        | dhl_ecommerce_expedited | Expedited|

        | dhl_ecommerce_parcel_plus_ground | Parcel Plus Ground|

        | dhl_ecommerce_parcel_international_standard | Parcel International
        Standard|

        | dhl_ecommerce_bpm_expedited | Bounded Printed Matter Expedited|

        | dhl_ecommerce_parcel_international_expedited | Parcel International
        Expedited|

        | dhl_ecommerce_globalmail_packet_priority | GlobalMail Packet Priority|

        | dhl_ecommerce_easy_return_light | Easy Return Light|

        | dhl_ecommerce_parcel_plus_expedited | Parcel Plus Expedited|

        | dhl_ecommerce_globalmail_business_standard | GlobalMail Packet
        Standard|

        | dhl_ecommerce_ground | Ground|

        | dhl_ecommerce_globalmail_packet_standard | GlobalMail Business
        Standard|
    ServiceLevelDHLGermanyEnum:
      type: string
      enum:
        - dhl_germany_europaket
        - dhl_germany_paket
        - dhl_germany_paket_connect
        - dhl_germany_paket_international
        - dhl_germany_paket_priority
        - dhl_germany_paket_sameday
      description: |
        |Token | Service name|
        |:---|:---|
        | dhl_germany_europaket | DHL Germany Europaket|
        | dhl_germany_paket | DHL Germany Paket|
        | dhl_germany_paket_connect | DHL Germany Paket Connect|
        | dhl_germany_paket_international | DHL Germany Paket International|
        | dhl_germany_paket_priority | DHL Germany Paket Priority|
        | dhl_germany_paket_sameday | DHL Germany Paket Sameday|
    ServiceLevelDPDDEEnum:
      type: string
      enum:
        - dpd_de_classic
      description: |
        |Token | Service name|
        |:---|:---|
        | dpd_de_classic | DPD Classic|
    ServiceLevelDPDUKEnum:
      type: string
      enum:
        - dpd_uk_ship_to_shop
        - dpd_uk_1030
        - dpd_uk_1200
        - dpd_uk_saturday
        - dpd_uk_saturday_1030
        - dpd_uk_saturday_1200
        - dpd_uk_sunday
        - dpd_uk_sunday_1030
        - dpd_uk_sunday_1200
        - dpd_uk_next_day
        - dpd_uk_two_day
        - dpd_uk_classic
        - dpd_uk_air_classic
        - dpd_uk_air_express
        - dpd_uk_direct
        - dpd_uk_direct_tracked_mail
        - dpd_uk_pickup_returns
      description: |
        |Token | Service name|
        |:---|:---|
        | dpd_uk_ship_to_shop | Ship to shop|
        | dpd_uk_1030 | Door to door 10.30 next day|
        | dpd_uk_1200 | Door to door 12.00 next day|
        | dpd_uk_saturday | Saturday Delivery|
        | dpd_uk_saturday_1030 | Saturday Delivery 10.30|
        | dpd_uk_saturday_1200 | Saturday Delivery 12.00|
        | dpd_uk_sunday | Sunday Delivery|
        | dpd_uk_sunday_1030 | Sunday Delivery 10.30|
        | dpd_uk_sunday_1200 | Sunday Delivery 12.00|
        | dpd_uk_next_day | Next day|
        | dpd_uk_two_day | Two day|
        | dpd_uk_classic | DPD Classic|
        | dpd_uk_air_classic | DPD Air Classic|
        | dpd_uk_air_express | DPD Air Express|
        | dpd_uk_direct | DPD Direct|
        | dpd_uk_direct_tracked_mail| DPD Tracked Mail|
        | dpd_uk_pickup_returns | Pickup Returns|
    ServiceLevelDeutschePostEnum:
      type: string
      enum:
        - deutsche_post_postkarte
        - deutsche_post_standardbrief
        - deutsche_post_kompaktbrief
        - deutsche_post_grossbrief
        - deutsche_post_maxibrief
        - deutsche_post_maxibrief_plus
        - deutsche_post_warenpost_international_xs
        - deutsche_post_warenpost_international_s
        - deutsche_post_warenpost_international_m
        - deutsche_post_warenpost_international_l
      description: |
        |Token | Service name|
        |:---|:---|
        | deutsche_post_postkarte | Postkarte|
        | deutsche_post_standardbrief | Standardbrief|
        | deutsche_post_kompaktbrief | Kompaktbrief|
        | deutsche_post_grossbrief | Grossbrief|
        | deutsche_post_maxibrief | Maxibrief|
        | deutsche_post_maxibrief_plus | Maxibrief Plus|
        | deutsche_post_warenpost_international_xs | Warenpost International XS|
        | deutsche_post_warenpost_international_s | Warenpost International S|
        | deutsche_post_warenpost_international_m | Warenpost International M|
        | deutsche_post_warenpost_international_l | Warenpost International L|
    ServiceLevelAramexAustraliaEnum:
      type: string
      enum:
        - fastway_australia_parcel
        - fastway_australia_satchel
        - fastway_australia_box_small
        - fastway_australia_box_medium
        - fastway_australia_box_large
      description: |
        |Token | Service name|
        |:---|:---|
        | fastway_australia_parcel | Parcel|
        | fastway_australia_satchel | Satchel|
        | fastway_australia_box_small | Box Small|
        | fastway_australia_box_medium | Box Medium|
        | fastway_australia_box_large | Box Large|
    ServiceLevelGlobegisticsEnum:
      type: string
      enum:
        - globegistics_priority_mail_express_international
        - globegistics_priority_mail_international
        - globegistics_priority_mail_express_international_pds
        - globegistics_priority_mail_international_pds
        - globegistics_epacket
        - globegistics_ecom_tracked_ddp
        - globegistics_ecom_packet_ddp
        - globegistics_ecom_priority_mail_international_ddp
        - globegistics_ecom_priority_mail_express_international_ddp
        - globegistics_ecom_extra
        - globegistics_ecom_international_priority_airmail
        - globegistics_ecom_international_surface_airlift
      description: >
        |Token | Service name|

        |:---|:---|

        | globegistics_priority_mail_express_international | Globegistics
        Priority Mail Express International|

        | globegistics_priority_mail_international | Globegistics Priority Mail
        International|

        | globegistics_priority_mail_express_international_pds | Globegistics
        Priority Mail Express International PreSort Drop Ship|

        | globegistics_priority_mail_international_pds | Globegistics Priority
        Mail International PreSort Drop Ship|

        | globegistics_epacket | Globegistics ePacket|

        | globegistics_ecom_tracked_ddp | Globegistics eCom Tracked DDP|

        | globegistics_ecom_packet_ddp | Globegistics eCom Packet DDP|

        | globegistics_ecom_priority_mail_international_ddp | Globegistics eCom
        Priority Mail International DDP|

        | globegistics_ecom_priority_mail_express_international_ddp |
        Globegistics eCom Priority Mail Express International DDP|

        | globegistics_ecom_extra | Globegistics eCom Extra|

        | globegistics_ecom_international_priority_airmail | Globegistics eCom
        International Priority Airmail|

        | globegistics_ecom_international_surface_airlift | Globegistics eCom
        International Surface Air Lift|
    ServiceLevelGLSUSEnum:
      type: string
      enum:
        - gls_us_cps
        - gls_us_eps
        - gls_us_ess
        - gls_us_nps
        - gls_us_pds
        - gls_us_sds
      description: |
        |Token | Service name|
        |:---|:---|
        | gls_us_cps | GSO Ground|
        | gls_us_eps | Early Priority Overnight|
        | gls_us_ess | Early Saturday Delivery|
        | gls_us_nps | Noon Priority Overnight|
        | gls_us_pds | Priority Overnight|
        | gls_us_sds | Saturday Delivery|
    ServiceLevelLSOEnum:
      type: string
      enum:
        - lso_ground
        - lso_economy_next_day
        - lso_saturday_delivery
        - lso_2nd_day
        - lso_priority_next_day
        - lso_early_overnight
      description: |
        |Token | Service name|
        |:---|:---|
        | lso_ground | Ground|
        | lso_economy_next_day | Economy Next Day|
        | lso_saturday_delivery | Saturday Delivery|
        | lso_2nd_day | 2nd Day|
        | lso_priority_next_day | Priority Next Day|
        | lso_early_overnight | Early Overnight|
    ServiceLevelMondialRelayEnum:
      type: string
      enum:
        - mondial_relay_pointrelais
      description: |
        |Token | Service name|
        |:---|:---|
        | mondial_relay_pointrelais | Point Relais|
    ServiceLevelParcelforceEnum:
      type: string
      enum:
        - parcelforce_express48
        - parcelforce_express24
        - parcelforce_expressam
      description: |
        |Token | Service name|
        |:---|:---|
        | parcelforce_express48 | Express 48|
        | parcelforce_express24 | Express 24|
        | parcelforce_expressam | Express AM|
    ServiceLevelPostItalianeEnum:
      type: string
      enum:
        - poste_italiane_delivery_business_express
      description: >
        |Token | Service name|

        |:---|:---|

        | poste_italiane_delivery_business_express | Poste Delivery Business
        Express|
    ServiceLevelePostGlobalEnum:
      type: string
      enum:
        - rr_donnelley_domestic_economy_parcel
        - rr_donnelley_domestic_priority_parcel
        - rr_donnelley_domestic_parcel_bpm
        - rr_donnelley_priority_domestic_priority_parcel_bpm
        - rr_donnelley_priority_parcel_delcon
        - rr_donnelley_priority_parcel_nondelcon
        - rr_donnelley_economy_parcel
        - rr_donnelley_ipa
        - rr_donnelley_courier
        - rr_donnelley_isal
        - rr_donnelley_epacket
        - rr_donnelley_pmi
        - rr_donnelley_emi
      description: >
        |Token | Service name|

        |:---|:---|

        | rr_donnelley_domestic_economy_parcel | Domestic Economy Parcel|

        | rr_donnelley_domestic_priority_parcel | Domestic Priority Parcel |

        | rr_donnelley_domestic_parcel_bpm | Domestic Parcel BPM|

        | rr_donnelley_priority_domestic_priority_parcel_bpm | Domestic Priority
        Parcel BPM|

        | rr_donnelley_priority_parcel_delcon | International Priority Parcel
        DelCon|

        | rr_donnelley_priority_parcel_nondelcon | International Priority Parcel
        NonDelcon|

        | rr_donnelley_economy_parcel | Economy Parcel Service |

        | rr_donnelley_ipa | International Priority Airmail (IPA)|

        | rr_donnelley_courier | International Courier|

        | rr_donnelley_isal | International Surface Air Lift (ISAL)|

        | rr_donnelley_epacket | e-Packet|

        | rr_donnelley_pmi | Priority Mail International|

        | rr_donnelley_emi | Express Mail International|
    ServiceLevelRoyalMailEnum:
      type: string
      enum:
        - royal_mail_tracked_letter_boxable_24_no_signature
        - royal_mail_tracked_letter_boxable_48_no_signature
        - royal_mail_tracked_24_returns
        - royal_mail_tracked_48_returns
        - royal_mail_special_delivery_guaranteed_1pm
        - royal_mail_special_delivery_guaranteed_9am
        - royal_mail_24
        - royal_mail_48
        - royal_mail_signed_for_first_class
        - royal_mail_signed_for_second_class
        - royal_mail_standard_first_class
        - royal_mail_standard_second_class
        - royal_mail_tracked_24_no_signature
        - royal_mail_tracked_48_no_signature
        - royal_mail_intl_bus_mail_lrg_ltr_zone_sort_pri
        - royal_mail_intl_bus_parcels_tracked_zone_sort
        - royal_mail_intl_bus_parcels_tracked_country_priced
        - royal_mail_intl_bus_parcels_tracked_signed_zone_srt
        - royal_mail_24_flat_rate
        - royal_mail_48_flat_rate
      description: >
        |Token | Service name|

        |:---|:---|

        | royal_mail_tracked_letter_boxable_24_no_signature | Royal Mail Tracked
        Letter-Boxable 24 No Signature|

        | royal_mail_tracked_letter_boxable_48_no_signature | Royal Mail Tracked
        Letter-Boxable 48 No Signature|

        | royal_mail_tracked_24_returns | Royal Mail Tracked Returns 24|

        | royal_mail_tracked_48_returns | Royal Mail Tracked Returns 48|

        | royal_mail_special_delivery_guaranteed_1pm | Special Delivery
        Guaranteed by 1pm

        | royal_mail_special_delivery_guaranteed_9am | Special Delivery
        Guaranteed by 9am

        | royal_mail_24 | RoyalMail 24

        | royal_mail_48 | RoyalMail 48

        | royal_mail_signed_for_first_class | Signed for First Class

        | royal_mail_signed_for_second_class | Signed for Second Class

        | royal_mail_standard_first_class | Standard First Class

        | royal_mail_standard_second_class | Standard Second Class

        | royal_mail_tracked_24_no_signature | Royal Mail Tracked 24 No
        Signature

        | royal_mail_tracked_48_no_signature | Royal Mail Tracked 48 No
        Signature

        | royal_mail_intl_bus_mail_lrg_ltr_zone_sort_pri | International
        Business Mail Large Letter Zone Sort Priority

        | royal_mail_intl_bus_parcels_tracked_zone_sort | International Business
        Parcels Tracked Zone Sort

        | royal_mail_intl_bus_parcels_tracked_country_priced | International
        Business Parcels Tracked Country Priced

        | royal_mail_intl_bus_parcels_tracked_signed_zone_srt | International
        Business Parcels & Signed Zone Sort

        | royal_mail_24_flat_rate | Royal Mail 24 Parcel Flat Rate

        | royal_mail_48_flat_rate | Royal Mail 48 Parcel Flat Rate
    ServiceLevelRoyalMailSFEnum:
      type: string
      enum:
        - royal_mail_sf_tracked_48
        - royal_mail_sf_tracked_48_for_post_office_drop
        - royal_mail_sf_international_tracked
        - royal_mail_sf_tracked_48_with_signature_confirmation
        - >-
          royal_mail_sf_tracked_48_for_post_office_drop_with_signature_confirmation
        - royal_mail_sf_tracked_24
        - royal_mail_sf_tracked_24_for_post_office_drop
        - >-
          royal_mail_sf_tracked_24_for_post_office_drop_with_signature_confirmation
        - royal_mail_sf_international_tracked_for_post_office_drop
        - royal_mail_sf_international_tracked_with_signature_confirmation
        - >-
          royal_mail_sf_international_tracked_for_post_office_drop_with_signature_confirmation
      description: >
        |Token | Service name|

        |:---|:---|

        | royal_mail_sf_tracked_48 | Royal Mail Tracked 48|

        | royal_mail_sf_tracked_48_for_post_office_drop | Royal Mail Tracked 48
        for Post Office Drop|

        | royal_mail_sf_international_tracked | Royal Mail International Tracked
        |

        | royal_mail_sf_tracked_48_with_signature_confirmation | Royal Mail
        Tracked 48 with Signature |

        |
        royal_mail_sf_tracked_48_for_post_office_drop_with_signature_confirmation
        | Royal Mail Tracked 48 for Post Office Drop with Signature |

        | royal_mail_sf_tracked_24 | Royal Mail Tracked 24 |

        | royal_mail_sf_tracked_24_for_post_office_drop | Royal Mail Tracked 24
        for Post Office Drop |

        |
        royal_mail_sf_tracked_24_for_post_office_drop_with_signature_confirmation
        | Royal Mail Tracked 24 for Post Office Drop with Signature |

        | royal_mail_sf_international_tracked_for_post_office_drop | Royal Mail
        International Tracked for Post Office Drop |

        | royal_mail_sf_international_tracked_with_signature_confirmation |
        Royal Mail International Tracked with Signature |

        |
        royal_mail_sf_international_tracked_for_post_office_drop_with_signature_confirmation
        | Royal Mail International Tracked for Post Office Drop with Signature
        |  
    ServiceLevelOnTracEnum:
      type: string
      enum:
        - ontrac_ground
        - ontrac_sunrise_gold
        - ontrac_sunrise
      description: |
        |Token | Service name|
        |:---|:---|
        | ontrac_ground | Ground|
        | ontrac_sunrise_gold | Sunrise Gold|
        | ontrac_sunrise | Sunrise|
    ServiceLevelLasershipEnum:
      type: string
      enum:
        - lasership_routed_delivery
      description: |
        |Token | Service name|
        |:---|:---|
        | lasership_routed_delivery | Routed Delivery|
    ServiceLevelVehoEnum:
      type: string
      enum:
        - veho_ground_plus
        - veho_premium_economy
      description: |
        |Token | Service name|
        |:---|:---|
        | veho_ground_plus | Veho Ground Plus |
        | veho_premium_economy | Veho Premium Economy
    ServiceLevelEvriUKEnum:
      type: string
      enum:
        - hermes_uk_courier_service
        - hermes_uk_parcelshop_dropoff
        - hermes_uk_parcelshop_dropoff_nextday
        - hermes_uk_postable
        - hermes_uk_postable_nextday
      description: |
        |Token | Service name|
        |:---|:---|
        | hermes_uk_courier_service | Courier Collection|
        | hermes_uk_parcelshop_dropoff | ParcelShop Drop-Off|
        | hermes_uk_parcelshop_dropoff_nextday | ParcelShop Drop-Off Next Day|
        | hermes_uk_postable | Postable|
        | hermes_uk_postable_nextday | Postable Next Day|
    ServiceLevelEnumSet:
      oneOf:
        - $ref: '#/components/schemas/ServiceLevelUSPSEnum'
        - $ref: '#/components/schemas/ServiceLevelFedExEnum'
        - $ref: '#/components/schemas/ServiceLevelUPSEnum'
        - $ref: '#/components/schemas/ServiceLevelAirterraEnum'
        - $ref: '#/components/schemas/ServiceLevelAPCPostalEnum'
        - $ref: '#/components/schemas/ServiceLevelAsendiaEnum'
        - $ref: '#/components/schemas/ServiceLevelAustraliaPostEnum'
        - $ref: '#/components/schemas/ServiceLevelAPGEnum'
        - $ref: '#/components/schemas/ServiceLevelBetterTrucksEnum'
        - $ref: '#/components/schemas/ServiceLevelCanadaPostEnum'
        - $ref: '#/components/schemas/ServiceLevelChronopostEnum'
        - $ref: '#/components/schemas/ServiceLevelCorreosEspanaEnum'
        - $ref: '#/components/schemas/ServiceLevelColissimoEnum'
        - $ref: '#/components/schemas/ServiceLevelPurolatorEnum'
        - $ref: '#/components/schemas/ServiceLevelDHLExpressEnum'
        - $ref: '#/components/schemas/ServiceLevelDHLeCommerceEnum'
        - $ref: '#/components/schemas/ServiceLevelDHLGermanyEnum'
        - $ref: '#/components/schemas/ServiceLevelDPDDEEnum'
        - $ref: '#/components/schemas/ServiceLevelDPDUKEnum'
        - $ref: '#/components/schemas/ServiceLevelDeutschePostEnum'
        - $ref: '#/components/schemas/ServiceLevelAramexAustraliaEnum'
        - $ref: '#/components/schemas/ServiceLevelGlobegisticsEnum'
        - $ref: '#/components/schemas/ServiceLevelGLSUSEnum'
        - $ref: '#/components/schemas/ServiceLevelLSOEnum'
        - $ref: '#/components/schemas/ServiceLevelMondialRelayEnum'
        - $ref: '#/components/schemas/ServiceLevelParcelforceEnum'
        - $ref: '#/components/schemas/ServiceLevelPostItalianeEnum'
        - $ref: '#/components/schemas/ServiceLevelePostGlobalEnum'
        - $ref: '#/components/schemas/ServiceLevelRoyalMailEnum'
        - $ref: '#/components/schemas/ServiceLevelRoyalMailSFEnum'
        - $ref: '#/components/schemas/ServiceLevelOnTracEnum'
        - $ref: '#/components/schemas/ServiceLevelJitsuEnum'
        - $ref: '#/components/schemas/ServiceLevelLasershipEnum'
        - $ref: '#/components/schemas/ServiceLevelEvriUKEnum'
        - $ref: '#/components/schemas/ServiceLevelUDSEnum'
        - $ref: '#/components/schemas/ServiceLevelVehoEnum'
        - $ref: '#/components/schemas/ServiceLevelSwyftEnum'
      x-speakeasy-include: true
    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 4.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|
    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
    LabelFileTypeEnum:
      description: >-
        Print format of the <a
        href="https://docs.goshippo.com/docs/shipments/shippinglabelsizes/">label</a>.
        If empty, will use the default format set from 

        <a href="https://apps.goshippo.com/settings/labels">the Shippo
        dashboard.</a>
      enum:
        - PNG
        - PNG_2.3x7.5
        - PDF
        - PDF_2.3x7.5
        - PDF_4x6
        - PDF_4x8
        - PDF_A4
        - PDF_A5
        - PDF_A6
        - ZPLII
      example: PDF_4x6
      type: string
    WeightUnitEnum:
      description: The unit used for weight.
      enum:
        - g
        - kg
        - lb
        - oz
      example: lb
      type: string
    DistanceUnitEnum:
      enum:
        - cm
        - in
        - ft
        - m
        - mm
        - yd
      example: in
      type: string
      description: The measure unit used for length, width and height.
    ShippoAccountBase:
      properties:
        email:
          example: hippo@shippo.com
          type: string
        first_name:
          example: Shippo
          type: string
        last_name:
          example: Meister
          type: string
        company_name:
          example: Acme
          type: string
      type: object
    ShippoAccountUpdateRequest:
      allOf:
        - $ref: '#/components/schemas/ShippoAccountBase'
      required:
        - first_name
        - last_name
        - email
        - company_name
      title: >-
        ShippoAccountUpdateRequest represents the fields of a shippo account
        before saving it to the db.
      type: object
    ShippoAccount:
      title: Shippo Account
      x-tags:
        - Shippo Accounts
      allOf:
        - $ref: '#/components/schemas/ShippoAccountBase'
        - properties:
            object_created:
              format: date-time
              type: string
            object_id:
              example: adcfdddf8ec64b84ad22772bce3ea37a
              type: string
            object_updated:
              format: date-time
              type: string
      required:
        - first_name
        - last_name
        - email
      type: object
    ShippoAccountPaginatedList:
      allOf:
        - $ref: '#/components/schemas/PaginatedList'
        - properties:
            results:
              items:
                $ref: '#/components/schemas/ShippoAccount'
              type: array
webhooks:
  batch:
    post:
      requestBody:
        description: Batch created or purchased
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebhookPayloadBatch'
      responses:
        '200':
          description: The data was successfully received
  track:
    post:
      requestBody:
        description: Tracking status updated
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebhookPayloadTrack'
      responses:
        '200':
          description: The data was successfully received
  transaction:
    post:
      requestBody:
        description: Transaction created or updated
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebhookPayloadTransaction'
      responses:
        '200':
          description: The data was successfully received
x-speakeasy-globals:
  parameters:
    - $ref: '#/components/parameters/ShippoApiVersionHeader'
x-speakeasy-name-override:
  - operationId: ^Create.*
    methodNameOverride: create
  - operationId: ^Delete.*
    methodNameOverride: delete
  - operationId: ^Get.*
    methodNameOverride: get
  - operationId: ^List.*
    methodNameOverride: list
  - operationId: ^Update.*
    methodNameOverride: update
