openapi: 3.1.0 info: title: Shippo external API. version: '2018-02-08' x-logo: url: https://docs.goshippo.com/images/shippo-logo.svg contact: name: Shippo Developer Platform url: https://goshippo.com/contact/ description: Use this API to integrate with the Shippo service servers: - url: https://api.goshippo.com security: - APIKeyHeader: [] tags: - name: Overview description: |-


First-time users and those looking for specific integration tutorials, see our full API documentation and guides.
Download the API Specification yaml file

API Resources

All API URLs listed in this documentation are relative to https://api.goshippo.com/. For example, the `/addresses/` resource is reachable at `https://api.goshippo.com/addresses/`.

Authentication

The API requires Shippo's token HTTP Authentication with your Shippo token (live or test). In order to authenticate properly, please put `Authorization: ShippoToken ` in your header. You can find your token on the Shippo API settings page. For more information about authentication and test mode, please visit our Authentication guide. The API is available via Secure Socket Layer (SSL) only. All requests to the Shippo API must use TLS version 1.2 or higher.

Request & Response Data

Request data is passed to the API by POSTing JSON objects 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.

REST & Disposable Objects

The Shippo API is built around REST principles. 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.

API Version

This reference guide supports the Shippo API version: `2018-02-08` . To see reference guides for older API versions, see our legacy reference guide. For more information about Shippo API versions, see our API versions guide. - 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. # Parcel Extras The following values are supported for the `extra` field of the parcel object. - 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. # Shipment Extras The following values are supported for the `extra` field of the shipment object. - 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. # Manifest Errors The following codes and messages are the possible errors that may occur when creating Manifests. - 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. # Webhook Payload The payload is the body of the POST request Shippo sends to the URL specified at the time of webhook registration. - name: Tracking Status description: |-


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

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 Test token for tracking, you need to use Shippo's predefined tokens for testing different tracking statuses. You can find more information in our Tracking tutorial 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. # Batch Shipment 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 - 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. # Line Item


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.

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. - 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 Service Group configuration 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: - name: Service Levels description: - name: Parcel Templates description: |- A predefined package used by one or multiple carriers. See below for all available values and the corresponding tokens. 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. - 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 guide for more details. - name: Customs Declaration B13A Filing Option description: - name: Customs Declaration Contents Type description: - name: Customs Declaration EEL/PFC description: - name: Customs Declaration Incoterm description: - name: Customs Declaration Non Delivery Option description: - name: Address Validation Source description: - name: Address Validation Codes description: 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 shippo_test_3a47d23c032ca626fce863c48d0f93d63a394396" - lang: python label: Python source: |- import shippo s = shippo.Shippo( api_key_header="ShippoToken ", shippo_api_version='2018-02-08', ) res = s.addresses.list(page=1, results=5) if res is not None: # handle response pass - label: Ruby lang: Ruby source: |- # List all addresses Shippo::Address.all() - lang: typescript label: Typescript source: |- import { Shippo } from "shippo"; const shippo = new Shippo({ apiKeyHeader: "ShippoToken ", shippoApiVersion: "2018-02-08", }); async function run() { const result = await shippo.addresses.list(1, 5); // Handle the result console.log(result) } run(); - label: PHP lang: PHP source: |- // List all addresses Shippo_Address::all(); - lang: csharp label: C# source: |- using Shippo; using Shippo.Models.Components; using Shippo.Models.Requests; var sdk = new ShippoSDK( apiKeyHeader: "ShippoToken ", shippoApiVersion: "2018-02-08"); var res = await sdk.Addresses.ListAsync( page: 1, results: 5, shippoApiVersion: "2018-02-08"); // 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 shippo_test_3a47d23c032ca626fce863c48d0f93d63a394396" \ -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 ", 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 - label: Ruby lang: Ruby source: |- # Create address object address_from = Shippo::Address.create( :name => "Shawn Ippotle", :company => "Shippo", :street1 => "Clayton St.", :street_no => "215", :street2 => "", :city => "San Francisco", :state => "CA", :zip => "94117", :country => "US", :phone => "+1 555 341 9393", :email => "shippotle@shippo.com" ) - lang: typescript label: Typescript source: |- import { Shippo } from "shippo"; const shippo = new Shippo({ apiKeyHeader: "ShippoToken ", 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(); - label: PHP lang: PHP source: |- // Create address object $fromAddress = Shippo_Address::create( array( "name" => "Shawn Ippotle", "company" => "Shippo", "street1" => "215 Clayton St.", "city" => "San Francisco", "state" => "CA", "zip" => "94117", "country" => "US", "phone" => "+1 555 341 9393", "email" => "shippotle@shippo.com" )); - lang: csharp label: C# source: |- using Shippo; using Shippo.Models.Components; using Shippo.Models.Requests; var sdk = new ShippoSDK( apiKeyHeader: "ShippoToken ", 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 /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 shippo_test_3a47d23c032ca626fce863c48d0f93d63a394396" - lang: python label: Python source: |- import shippo s = shippo.Shippo( api_key_header="ShippoToken ", shippo_api_version='2018-02-08', ) res = s.addresses.get(address_id='') if res is not None: # handle response pass - label: Ruby lang: Ruby source: |- # Retrieve an existing address by object_id Shippo::Address.get('d799c2679e644279b59fe661ac8fa488') - lang: typescript label: Typescript source: |- import { Shippo } from "shippo"; const shippo = new Shippo({ apiKeyHeader: "ShippoToken ", shippoApiVersion: "2018-02-08", }); async function run() { const result = await shippo.addresses.get(""); // Handle the result console.log(result) } run(); - label: PHP lang: PHP source: |- // Retrieve an existing address by object_id Shippo_Address::retrieve('d799c2679e644279b59fe661ac8fa488'); - lang: csharp label: C# source: |- using Shippo; using Shippo.Models.Components; using Shippo.Models.Requests; var sdk = new ShippoSDK( apiKeyHeader: "ShippoToken ", shippoApiVersion: "2018-02-08"); var res = await sdk.Addresses.GetAsync( addressId: "", shippoApiVersion: "2018-02-08"); // 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 shippo_test_3a47d23c032ca626fce863c48d0f93d63a394396" - lang: python label: Python source: |- import shippo s = shippo.Shippo( api_key_header="ShippoToken ", shippo_api_version='2018-02-08', ) res = s.addresses.validate(address_id='') if res is not None: # handle response pass - label: Ruby lang: Ruby source: |- # Validate an existing address by object_id Shippo::Address.get("d799c2679e644279b59fe661ac8fa488").validate() - lang: typescript label: Typescript source: |- import { Shippo } from "shippo"; const shippo = new Shippo({ apiKeyHeader: "ShippoToken ", shippoApiVersion: "2018-02-08", }); async function run() { const result = await shippo.addresses.validate(""); // Handle the result console.log(result) } run(); - label: PHP lang: PHP source: |- // Validate an existing address by object_id Shippo_Address::validate('d799c2679e644279b59fe661ac8fa488'); - lang: csharp label: C# source: |- using Shippo; using Shippo.Models.Components; using Shippo.Models.Requests; var sdk = new ShippoSDK( apiKeyHeader: "ShippoToken ", shippoApiVersion: "2018-02-08"); var res = await sdk.Addresses.ValidateAsync( addressId: "", shippoApiVersion: "2018-02-08"); // 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 shippo_test_3a47d23c032ca626fce863c48d0f93d63a394396" \ -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 ", 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=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=[ 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.USPSParcelTemplate.USPS_FLAT_RATE_GIFT_CARD_ENVELOPE, ), ], ), ), ], )) if res is not None: # handle response pass - label: Ruby lang: Ruby source: |- Shippo::batch.create({ :default_carrier_account => DEFAULT_CARRIER_ACCOUNT, :default_servicelevel_token => 'usps_priority', :label_filetype => 'ZPLII', :metadata => 'BATCH #170', :batch_shipments => [ { :shipment => { :address_from => address_from_one, :address_to => address_to_one, :parcel => parcel_one, :async => false } }, { :shipment => { :address_from => address_from_two, :address_to => address_to_two, :parcel => parcel_two, :async => false } } ] }) - lang: typescript label: Typescript source: |- import { Shippo } from "shippo"; const shippo = new Shippo({ apiKeyHeader: "ShippoToken ", 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: { 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: [ { 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_FlatRateGiftCardEnvelope", }, ], }, }, ], }); // Handle the result console.log(result) } run(); - label: PHP lang: PHP source: |- $batch = Shippo_Batch::create(array( 'default_carrier_account' => $carrier, 'default_servicelevel_token' => 'usps_priority', 'label_filetype' => 'PDF_4x6', 'metadata' => '', 'batch_shipments' => array( array( 'shipment' => array( 'address_from' => array( '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' => array( 'name' => 'Mrs Hippo', 'company' => '', 'street1' => 'Broadway 1', 'street2' => '', 'city' => 'New York', 'state' => 'NY', 'zip' => '10007', 'country' => 'US', 'phone' => '4151234567', 'email' => 'mrshippo@shippo.com' ), 'parcels' => array( array( 'length' => '5', 'width' => '5', 'height' => '5', 'distance_unit' => 'in', 'weight' => '2', 'mass_unit' => 'oz' ) ) ) ) ) )) - 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 ", 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() { 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.CreateAddressFromAddressCreateRequest( 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.CreateAddressReturnAddressCreateRequest( 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.CreateAddressToStr( "d799c2679e644279b59fe661ac8fa489", ), CustomsDeclaration = ShipmentCreateRequestCustomsDeclaration.CreateShipmentCreateRequestCustomsDeclarationStr( "adcfdddf8ec64b84ad22772bce3ea37a", ), CarrierAccounts = new List() { "065a4a8c10d24a34ab932163a1b87f52", "73f706f4bdb94b54a337563840ce52b0", }, Parcels = new List() { Parcels.CreateParcelsParcelCreateFromTemplateRequest( new ParcelCreateFromTemplateRequest() { 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 = Shippo.Models.Components.WeightUnitEnum.Lb, Weight = "1", Template = ParcelTemplateEnumSet.CreateParcelTemplateEnumSetUSPSParcelTemplate( Shippo.Models.Components.USPSParcelTemplate.USPSFlatRateGiftCardEnvelope, ), }, ), }, }, }, }, }, shippoApiVersion: "2018-02-08"); // handle response /batches/{BatchId}: get: description: |- Returns a batch using an object ID.
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`.
For more details on filtering results, see our guide on filtering. operationId: GetBatch parameters: - description: Object ID of the batch in: path name: BatchId required: true schema: type: string - $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/?page=2&object_results=creation_failed \ -H "Authorization: ShippoToken shippo_test_3a47d23c032ca626fce863c48d0f93d63a394396" - lang: python label: Python source: |- import shippo s = shippo.Shippo( api_key_header="ShippoToken ", shippo_api_version='2018-02-08', ) res = s.batches.get(batch_id='') if res is not None: # handle response pass - label: Ruby lang: Ruby source: Shippo::batch.retrieve(batch_object_id) - lang: typescript label: Typescript source: |- import { Shippo } from "shippo"; const shippo = new Shippo({ apiKeyHeader: "ShippoToken ", shippoApiVersion: "2018-02-08", }); async function run() { const result = await shippo.batches.get(""); // Handle the result console.log(result) } run(); - label: PHP lang: PHP source: Shippo_Batch::retrieve($batch_object_id) - lang: csharp label: C# source: |- using Shippo; using Shippo.Models.Components; using Shippo.Models.Requests; var sdk = new ShippoSDK( apiKeyHeader: "ShippoToken ", shippoApiVersion: "2018-02-08"); var res = await sdk.Batches.GetAsync( batchId: "", shippoApiVersion: "2018-02-08"); // 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//add_shipments \ -H "Authorization: ShippoToken shippo_test_3a47d23c032ca626fce863c48d0f93d63a394396" \ -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 ", shippo_api_version='2018-02-08', ) res = s.batches.add_shipments(batch_id='', 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='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=[ 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 ", 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: "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: [ { 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: csharp label: C# source: |- using Shippo; using Shippo.Models.Components; using Shippo.Models.Requests; using System.Collections.Generic; var sdk = new ShippoSDK( apiKeyHeader: "ShippoToken ", shippoApiVersion: "2018-02-08"); var res = await sdk.Batches.AddShipmentsAsync( batchId: "", requestBody: new List() { 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.CreateAddressFromStr( "d799c2679e644279b59fe661ac8fa488", ), AddressReturn = AddressReturn.CreateAddressReturnStr( "d799c2679e644279b59fe661ac8fa488", ), AddressTo = AddressTo.CreateAddressToAddressCreateRequest( 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.CreateShipmentCreateRequestCustomsDeclarationStr( "adcfdddf8ec64b84ad22772bce3ea37a", ), CarrierAccounts = new List() { "065a4a8c10d24a34ab932163a1b87f52", "73f706f4bdb94b54a337563840ce52b0", }, Parcels = new List() { Parcels.CreateParcelsParcelCreateRequest( 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 = Shippo.Models.Components.WeightUnitEnum.Lb, Weight = "1", DistanceUnit = Shippo.Models.Components.DistanceUnitEnum.In, Height = "1", Length = "1", Width = "1", }, ), }, }, }, }, shippoApiVersion: "2018-02-08"); // 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//purchase \ -H "Authorization: ShippoToken shippo_test_3a47d23c032ca626fce863c48d0f93d63a394396" - lang: python label: Python source: |- import shippo s = shippo.Shippo( api_key_header="ShippoToken ", shippo_api_version='2018-02-08', ) res = s.batches.purchase(batch_id='') if res is not None: # handle response pass - lang: typescript label: Typescript source: |- import { Shippo } from "shippo"; const shippo = new Shippo({ apiKeyHeader: "ShippoToken ", shippoApiVersion: "2018-02-08", }); async function run() { const result = await shippo.batches.purchase(""); // 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 ", shippoApiVersion: "2018-02-08"); var res = await sdk.Batches.PurchaseAsync( batchId: "", shippoApiVersion: "2018-02-08"); // 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//remove_shipments \ -H "Authorization: ShippoToken shippo_test_3a47d23c032ca626fce863c48d0f93d63a394396" \ -H "Content-Type: application/json" \ -d '[ "aa7dea463a5a48b0b8fb21f90e72d779", "f11b46440c144ce3b97fb5ddf02b8c71", "5400f9078f764b1bbb121bcd08de127f", "2ab2b452392545908d2cef8861a39c35" ]' - lang: python label: Python source: |- import shippo s = shippo.Shippo( api_key_header="ShippoToken ", shippo_api_version='2018-02-08', ) res = s.batches.remove_shipments(batch_id='', request_body=[ '', ]) if res is not None: # handle response pass - lang: typescript label: Typescript source: |- import { Shippo } from "shippo"; const shippo = new Shippo({ apiKeyHeader: "ShippoToken ", shippoApiVersion: "2018-02-08", }); async function run() { const result = await shippo.batches.removeShipments("", [ "", ]); // 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 ", shippoApiVersion: "2018-02-08"); var res = await sdk.Batches.RemoveShipmentsAsync( batchId: "", requestBody: new List() { "", }, shippoApiVersion: "2018-02-08"); // 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.
Using it appends the property `service_levels` to each carrier account.
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 shippo_test_3a47d23c032ca626fce863c48d0f93d63a394396" - lang: python label: Python source: |- import shippo from shippo.models import operations s = shippo.Shippo( api_key_header="ShippoToken ", shippo_api_version='2018-02-08', ) res = s.carrier_accounts.list(request=operations.ListCarrierAccountsRequest()) if res is not None: # handle response pass - label: Ruby lang: Ruby source: |- # List all carrier accounts Shippo::CarrierAccount.all() - lang: typescript label: Typescript source: |- import { Shippo } from "shippo"; const shippo = new Shippo({ apiKeyHeader: "ShippoToken ", shippoApiVersion: "2018-02-08", }); async function run() { const result = await shippo.carrierAccounts.list({}); // Handle the result console.log(result) } run(); - label: PHP lang: PHP source: |- // List all carrier accounts Shippo_CarrierAccount::all(); - lang: csharp label: C# source: |- using Shippo; using Shippo.Models.Components; using Shippo.Models.Requests; var sdk = new ShippoSDK( apiKeyHeader: "ShippoToken ", shippoApiVersion: "2018-02-08"); ListCarrierAccountsRequest req = new ListCarrierAccountsRequest() {}; var res = await sdk.CarrierAccounts.ListAsync(req); // 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 ", 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='Jena', last_name='Nienow', phone_number='', from_address_st='', from_address_city='', from_address_state='', from_address_zip='', from_address_country_iso2='', ), test=False, )) if res is not None: # handle response pass - label: Ruby lang: Ruby source: |- # Create a carrier account fedex_account = Shippo::CarrierAccount.create( :carrier => 'fedex', :account_id => '321123', :parameters => {:meter => '789987'}, :active => true) - lang: typescript label: Typescript source: |- import { Shippo } from "shippo"; const shippo = new Shippo({ apiKeyHeader: "ShippoToken ", shippoApiVersion: "2018-02-08", }); async function run() { const result = await shippo.carrierAccounts.create({ accountId: "321123", carrier: "fedex", metadata: "FEDEX Account", parameters: { firstName: "Jena", lastName: "Nienow", phoneNumber: "", fromAddressSt: "", fromAddressCity: "", fromAddressState: "", fromAddressZip: "", fromAddressCountryIso2: "", }, test: false, }); // Handle the result console.log(result) } run(); - label: PHP lang: PHP source: |- $fedex_account = Shippo_CarrierAccount::create(array( 'carrier' => 'fedex', 'account_id' => '321123', 'parameters' => array('meter' => '789987'), 'active' => true )); - lang: csharp label: C# source: |- using Shippo; using Shippo.Models.Components; using Shippo.Models.Requests; var sdk = new ShippoSDK( apiKeyHeader: "ShippoToken ", shippoApiVersion: "2018-02-08"); var res = await sdk.CarrierAccounts.CreateAsync( connectExistingOwnAccountRequest: new ConnectExistingOwnAccountRequest() { AccountId = "321123", Carrier = "fedex", Metadata = "FEDEX Account", Parameters = ConnectExistingOwnAccountRequestParameters.CreateConnectExistingOwnAccountRequestParametersFedExConnectExistingOwnAccountParameters( new FedExConnectExistingOwnAccountParameters() { FirstName = "Jena", LastName = "Nienow", PhoneNumber = "", FromAddressSt = "", FromAddressCity = "", FromAddressState = "", FromAddressZip = "", FromAddressCountryIso2 = "", }, ), Test = false, }, shippoApiVersion: "2018-02-08"); // 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 shippo_test_3a47d23c032ca626fce863c48d0f93d63a394396" - lang: python label: Python source: |- import shippo s = shippo.Shippo( api_key_header="ShippoToken ", shippo_api_version='2018-02-08', ) res = s.carrier_accounts.get(carrier_account_id='') if res is not None: # handle response pass - label: Ruby lang: Ruby source: |- # Retrieve an existing carrier account by object_id Shippo::CarrierAccount.get('b741b99f95e841639b54272834bc478c'); - lang: typescript label: Typescript source: |- import { Shippo } from "shippo"; const shippo = new Shippo({ apiKeyHeader: "ShippoToken ", shippoApiVersion: "2018-02-08", }); async function run() { const result = await shippo.carrierAccounts.get(""); // Handle the result console.log(result) } run(); - label: PHP lang: PHP source: |- // Retrieve an existing carrier account by object_id Shippo_CarrierAccount::retrieve('b741b99f95e841639b54272834bc478c'); - lang: csharp label: C# source: |- using Shippo; using Shippo.Models.Components; using Shippo.Models.Requests; var sdk = new ShippoSDK( apiKeyHeader: "ShippoToken ", shippoApiVersion: "2018-02-08"); var res = await sdk.CarrierAccounts.GetAsync( carrierAccountId: "", shippoApiVersion: "2018-02-08"); // 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 shippo_test_3a47d23c032ca626fce863c48d0f93d63a394396" \ -d parameters='{ "meter": "123987" }' - lang: python label: Python source: |- import shippo from shippo.models import components s = shippo.Shippo( api_key_header="ShippoToken ", shippo_api_version='2018-02-08', ) res = s.carrier_accounts.update(carrier_account_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=False, ), )) if res is not None: # handle response pass - label: Ruby lang: Ruby source: |- # To update a carrier account we need the account's object_id. # If you haven't stored it in your system, retrieve it first. # You can list all your accounts like this. accounts = Shippo::CarrierAccount.all() puts accounts # Now you can update the account with the corresponding object_id. fedex_account = Shippo::CarrierAccount.update('b741b99f95e841639b54272834bc478c', :active => true) - lang: typescript label: Typescript source: |- import { Shippo } from "shippo"; const shippo = new Shippo({ apiKeyHeader: "ShippoToken ", shippoApiVersion: "2018-02-08", }); async function run() { const result = await shippo.carrierAccounts.update("", { 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: false, }, }); // Handle the result console.log(result) } run(); - label: PHP lang: PHP source: |- // To update a carrier account we need the account's object_id. // If you haven't stored it in your system, retrieve it first. // You can list all your accounts like this. $accounts = Shippo_CarrierAccount::all(); var_dump($accounts); // Now you can update the account with the corresponding object_id. $fedex_account = Shippo_CarrierAccount::update('b741b99f95e841639b54272834bc478c', array('active' => true)); - lang: csharp label: C# source: |- using Shippo; using Shippo.Models.Components; using Shippo.Models.Requests; var sdk = new ShippoSDK( apiKeyHeader: "ShippoToken ", shippoApiVersion: "2018-02-08"); var res = await sdk.CarrierAccounts.UpdateAsync( carrierAccountId: "", shippoApiVersion: "2018-02-08", carrierAccountBase: new CarrierAccountBase() { AccountId = "****", Carrier = "usps", Parameters = CarrierAccountBaseParameters.CreateCarrierAccountBaseParametersUPSConnectExistingOwnAccountParameters( 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 /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 shippo_test_3a47d23c032ca626fce863c48d0f93d63a394396" - lang: python label: Python source: |- import shippo s = shippo.Shippo( api_key_header="ShippoToken ", shippo_api_version='2018-02-08', ) res = s.carrier_accounts.initiate_oauth2_signin(carrier_account_object_id='', redirect_uri='http://fine-cummerbund.biz', state='') if res is not None: # handle response pass - lang: typescript label: Typescript source: |- import { Shippo } from "shippo"; const shippo = new Shippo({ apiKeyHeader: "ShippoToken ", shippoApiVersion: "2018-02-08", }); async function run() { const result = await shippo.carrierAccounts.initiateOauth2Signin("", "http://fine-cummerbund.biz", ""); // 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 ", shippoApiVersion: "2018-02-08"); InitiateOauth2SigninRequest req = new InitiateOauth2SigninRequest() { CarrierAccountObjectId = "", RedirectUri = "http://fine-cummerbund.biz", }; var res = await sdk.CarrierAccounts.InitiateOauth2SigninAsync(req); // 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/CarrierAccountSendleCreateRequest' description: Examples. 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 ", shippo_api_version='2018-02-08', ) res = s.carrier_accounts.register(request=components.CarrierAccountColissimoCreateRequest( carrier='colissimo', parameters=components.CarrierAccountColissimoCreateRequestParameters(), )) if res is not None: # handle response pass - lang: typescript label: Typescript source: |- import { Shippo } from "shippo"; const shippo = new Shippo({ apiKeyHeader: "ShippoToken ", shippoApiVersion: "2018-02-08", }); async function run() { const result = await shippo.carrierAccounts.register({ carrier: "colissimo", parameters: {}, }); // 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 ", shippoApiVersion: "2018-02-08"); var res = await sdk.CarrierAccounts.RegisterAsync( requestBody: RegisterCarrierAccountRequestBody.CreateRegisterCarrierAccountRequestBodyCarrierAccountColissimoCreateRequest( new CarrierAccountColissimoCreateRequest() { Carrier = "colissimo", Parameters = new CarrierAccountColissimoCreateRequestParameters() {}, }, ), shippoApiVersion: "2018-02-08"); // 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 ", 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 ", 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 ", shippoApiVersion: "2018-02-08"); var res = await sdk.CarrierAccounts.GetRegistrationStatusAsync( carrier: Shippo.Models.Requests.Carrier.Usps, shippoApiVersion: "2018-02-08"); // handle response /customs/declarations: get: description: Returns a 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 shippo_test_3a47d23c032ca626fce863c48d0f93d63a394396" - lang: python label: Python source: |- import shippo s = shippo.Shippo( api_key_header="ShippoToken ", shippo_api_version='2018-02-08', ) res = s.customs_declarations.list(page=1, results=5) if res is not None: # handle response pass - label: Ruby lang: Ruby source: |- # List all customs delcarations Shippo::CustomsDeclaration.all() - lang: typescript label: Typescript source: |- import { Shippo } from "shippo"; const shippo = new Shippo({ apiKeyHeader: "ShippoToken ", shippoApiVersion: "2018-02-08", }); async function run() { const result = await shippo.customsDeclarations.list(1, 5); // Handle the result console.log(result) } run(); - label: PHP lang: PHP source: |- // List all customs declarations Shippo_CustomsDeclaration::all(); - lang: csharp label: C# source: |- using Shippo; using Shippo.Models.Components; using Shippo.Models.Requests; var sdk = new ShippoSDK( apiKeyHeader: "ShippoToken ", shippoApiVersion: "2018-02-08"); var res = await sdk.CustomsDeclarations.ListAsync( page: 1, results: 5, shippoApiVersion: "2018-02-08"); // 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 ", 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', 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='', 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 - label: Ruby lang: Ruby source: |- customs_item = { :description => "T-Shirt", :quantity => 20, :net_weight => "1", :mass_unit => "lb", :value_amount => "200", :value_currency => "USD", :origin_country => "US" } customs_declaration = Shippo::CustomsDeclaration.create( :contents_type => "MERCHANDISE", :contents_explanation => "T-Shirt purchase", :non_delivery_option => "RETURN", :certify => true, :certify_signer => "Simon Kreuz", :items => [customs_item] ) - lang: typescript label: Typescript source: |- import { Shippo } from "shippo"; const shippo = new Shippo({ apiKeyHeader: "ShippoToken ", 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", 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: "", quantity: 20, skuCode: "HM-123", hsCode: "0901.21", valueAmount: "200", valueCurrency: "USD", }, ], nonDeliveryOption: "RETURN", test: true, }); // Handle the result console.log(result) } run(); - label: PHP lang: PHP source: |- $customs_item = array( 'description'=> 'T-Shirt', 'quantity'=> '20', 'net_weight'=> '1', 'mass_unit'=> 'lb', 'value_amount'=> '200', 'value_currency'=> 'USD', 'origin_country'=> 'US'); $customs_declaration = Shippo_CustomsDeclaration::create( array( 'contents_type'=> 'MERCHANDISE', 'contents_explanation'=> 'T-Shirt purchase', 'non_delivery_option'=> 'RETURN', 'certify'=> 'true', 'certify_signer'=> 'Simon Kreuz', 'items'=> array($customs_item) )); - 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 ", 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", 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 = Shippo.Models.Components.CustomsDeclarationContentsTypeEnum.Merchandise, EelPfc = CustomsDeclarationEelPfcEnum.Noeei3037A, Incoterm = CustomsDeclarationIncotermEnum.Ddp, Items = new List() { new CustomsItemCreateRequest() { Description = "T-Shirt", MassUnit = Shippo.Models.Components.WeightUnitEnum.Lb, Metadata = "Order ID \"123454\"", NetWeight = "5", OriginCountry = "", Quantity = 20, SkuCode = "HM-123", HsCode = "0901.21", ValueAmount = "200", ValueCurrency = "USD", }, }, NonDeliveryOption = Shippo.Models.Components.CustomsDeclarationNonDeliveryOptionEnum.Return, Test = true, }, shippoApiVersion: "2018-02-08"); // 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 shippo_test_3a47d23c032ca626fce863c48d0f93d63a394396" - lang: python label: Python source: |- import shippo s = shippo.Shippo( api_key_header="ShippoToken ", shippo_api_version='2018-02-08', ) res = s.customs_declarations.get(customs_declaration_id='', page=1) if res is not None: # handle response pass - label: Ruby lang: Ruby source: |- # Retrieve an existing customs declaration by object_id Shippo::CustomsDeclaration.get('b741b99f95e841639b54272834bc478c') - lang: typescript label: Typescript source: |- import { Shippo } from "shippo"; const shippo = new Shippo({ apiKeyHeader: "ShippoToken ", shippoApiVersion: "2018-02-08", }); async function run() { const result = await shippo.customsDeclarations.get("", 1); // Handle the result console.log(result) } run(); - label: PHP lang: PHP source: |- // Retrieve an existing customs declaration by object_id Shippo_CustomsDeclaration::retrieve('e2197a54da9d470480f4f8796cc419cb'); - lang: csharp label: C# source: |- using Shippo; using Shippo.Models.Components; using Shippo.Models.Requests; var sdk = new ShippoSDK( apiKeyHeader: "ShippoToken ", shippoApiVersion: "2018-02-08"); var res = await sdk.CustomsDeclarations.GetAsync( customsDeclarationId: "", page: 1, shippoApiVersion: "2018-02-08"); // 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 shippo_test_3a47d23c032ca626fce863c48d0f93d63a394396" - lang: python label: Python source: |- import shippo s = shippo.Shippo( api_key_header="ShippoToken ", shippo_api_version='2018-02-08', ) res = s.customs_items.list(page=1, results=25) if res is not None: # handle response pass - label: Ruby lang: Ruby source: |- # List all customs items Shippo::CustomsItem.all() - lang: typescript label: Typescript source: |- import { Shippo } from "shippo"; const shippo = new Shippo({ apiKeyHeader: "ShippoToken ", shippoApiVersion: "2018-02-08", }); async function run() { const result = await shippo.customsItems.list(1, 25); // Handle the result console.log(result) } run(); - label: PHP lang: PHP source: |- // List all customs items Shippo_CustomsItem::all(); - lang: csharp label: C# source: |- using Shippo; using Shippo.Models.Components; using Shippo.Models.Requests; var sdk = new ShippoSDK( apiKeyHeader: "ShippoToken ", shippoApiVersion: "2018-02-08"); var res = await sdk.CustomsItems.ListAsync( page: 1, results: 25, shippoApiVersion: "2018-02-08"); // 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 shippo_test_3a47d23c032ca626fce863c48d0f93d63a394396" \ -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 ", 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='', 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 ", 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: "", quantity: 20, skuCode: "HM-123", hsCode: "0901.21", valueAmount: "200", valueCurrency: "USD", }); // Handle the result console.log(result) } run(); - label: PHP lang: PHP source: |- // Create customs item $customs_item = Shippo_CustomsItem::create( array( "description" => 'T-Shirt', "quantity" => 2, "net_weight" => '400', "mass_unit" => 'g', "value_amount" => '20', "value_currency" => 'USD', "tariff_number" => '', "origin_country" => 'US', "metadata" => 'Order ID #123123' ) ); - lang: csharp label: C# source: |- using Shippo; using Shippo.Models.Components; using Shippo.Models.Requests; var sdk = new ShippoSDK( apiKeyHeader: "ShippoToken ", shippoApiVersion: "2018-02-08"); var res = await sdk.CustomsItems.CreateAsync( customsItemCreateRequest: new CustomsItemCreateRequest() { Description = "T-Shirt", MassUnit = Shippo.Models.Components.WeightUnitEnum.Lb, Metadata = "Order ID \"123454\"", NetWeight = "5", OriginCountry = "", Quantity = 20, SkuCode = "HM-123", HsCode = "0901.21", ValueAmount = "200", ValueCurrency = "USD", }, shippoApiVersion: "2018-02-08"); // 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 shippo_test_3a47d23c032ca626fce863c48d0f93d63a394396" - lang: python label: Python source: |- import shippo s = shippo.Shippo( api_key_header="ShippoToken ", shippo_api_version='2018-02-08', ) res = s.customs_items.get(customs_item_id='', page=1) if res is not None: # handle response pass - label: Ruby lang: Ruby source: |- # Retrieve an existing customs item by object_id Shippo::CustomsItem.get('55358464c7b740aca199b395536981bd') - lang: typescript label: Typescript source: |- import { Shippo } from "shippo"; const shippo = new Shippo({ apiKeyHeader: "ShippoToken ", shippoApiVersion: "2018-02-08", }); async function run() { const result = await shippo.customsItems.get("", 1); // Handle the result console.log(result) } run(); - label: PHP lang: PHP source: |- // Retrieve an existing customs item by object_id Shippo_CustomsItem::retrieve('55358464c7b740aca199b395536981bd'); - lang: csharp label: C# source: |- using Shippo; using Shippo.Models.Components; using Shippo.Models.Requests; var sdk = new ShippoSDK( apiKeyHeader: "ShippoToken ", shippoApiVersion: "2018-02-08"); var res = await sdk.CustomsItems.GetAsync( customsItemId: "", page: 1, shippoApiVersion: "2018-02-08"); // 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 " \ -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 ", shippo_api_version='2018-02-08', ) res = s.rates_at_checkout.create(request=components.LiveRateCreateRequest( address_from='', address_to='', 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 ", shippoApiVersion: "2018-02-08", }); async function run() { const result = await shippo.ratesAtCheckout.create({ addressFrom: "", addressTo: "", 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 Shippo.Models.Requests; using System.Collections.Generic; var sdk = new ShippoSDK( apiKeyHeader: "ShippoToken ", shippoApiVersion: "2018-02-08"); var res = await sdk.RatesAtCheckout.CreateAsync( liveRateCreateRequest: new LiveRateCreateRequest() { AddressFrom = LiveRateCreateRequestAddressFrom.CreateLiveRateCreateRequestAddressFromStr( "", ), AddressTo = LiveRateCreateRequestAddressTo.CreateLiveRateCreateRequestAddressToStr( "", ), LineItems = new List() { 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.CreateLiveRateCreateRequestParcelStr( "5df144dca289442cv7a06", ), }, shippoApiVersion: "2018-02-08"); // 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 " \ -H "Content-Type: application/json" - lang: python label: Python source: |- import shippo s = shippo.Shippo( api_key_header="ShippoToken ", shippo_api_version='2018-02-08', ) res = s.rates_at_checkout.get_default_parcel_template() if res is not None: # handle response pass - lang: typescript label: Typescript source: |- import { Shippo } from "shippo"; const shippo = new Shippo({ apiKeyHeader: "ShippoToken ", 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; using Shippo.Models.Requests; var sdk = new ShippoSDK( apiKeyHeader: "ShippoToken ", shippoApiVersion: "2018-02-08"); var res = await sdk.RatesAtCheckout.GetDefaultParcelTemplateAsync(shippoApiVersion: "2018-02-08"); // 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 shippo_test_3a47d23c032ca626fce863c48d0f93d63a394396" \ -d ' { "object_id": "b958d3690bb04bb8b2986724872750f5" } ' - lang: python label: Python source: |- import shippo s = shippo.Shippo( api_key_header="ShippoToken ", shippo_api_version='2018-02-08', ) res = s.rates_at_checkout.update_default_parcel_template(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 ", shippoApiVersion: "2018-02-08", }); async function run() { const result = await shippo.ratesAtCheckout.updateDefaultParcelTemplate("b958d3690bb04bb8b2986724872750f5"); // 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 ", shippoApiVersion: "2018-02-08"); var res = await sdk.RatesAtCheckout.UpdateDefaultParcelTemplateAsync( shippoApiVersion: "2018-02-08", defaultParcelTemplateUpdateRequest: new DefaultParcelTemplateUpdateRequest() { ObjectId = "b958d3690bb04bb8b2986724872750f5", }); // 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 shippo_test_3a47d23c032ca626fce863c48d0f93d63a394396" \ - lang: python label: Python source: |- import shippo s = shippo.Shippo( api_key_header="ShippoToken ", shippo_api_version='2018-02-08', ) s.rates_at_checkout.delete_default_parcel_template() # Use the SDK ... - lang: typescript label: Typescript source: |- import { Shippo } from "shippo"; const shippo = new Shippo({ apiKeyHeader: "ShippoToken ", shippoApiVersion: "2018-02-08", }); async function run() { await shippo.ratesAtCheckout.deleteDefaultParcelTemplate(); } run(); - lang: csharp label: C# source: |- using Shippo; using Shippo.Models.Components; using Shippo.Models.Requests; var sdk = new ShippoSDK( apiKeyHeader: "ShippoToken ", shippoApiVersion: "2018-02-08"); await sdk.RatesAtCheckout.DeleteDefaultParcelTemplateAsync(shippoApiVersion: "2018-02-08"); 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 shippo_test_3a47d23c032ca626fce863c48d0f93d63a394396" - lang: python label: Python source: |- import shippo s = shippo.Shippo( api_key_header="ShippoToken ", shippo_api_version='2018-02-08', ) res = s.manifests.list(page=1, results=5) if res is not None: # handle response pass - label: Ruby lang: Ruby source: |- # List all manifests Shippo::Manifest.all() - lang: typescript label: Typescript source: |- import { Shippo } from "shippo"; const shippo = new Shippo({ apiKeyHeader: "ShippoToken ", shippoApiVersion: "2018-02-08", }); async function run() { const result = await shippo.manifests.list(1, 5); // Handle the result console.log(result) } run(); - label: PHP lang: PHP source: |- // List all manifests Shippo_Manifest::all(); - lang: csharp label: C# source: |- using Shippo; using Shippo.Models.Components; using Shippo.Models.Requests; var sdk = new ShippoSDK( apiKeyHeader: "ShippoToken ", shippoApiVersion: "2018-02-08"); var res = await sdk.Manifests.ListAsync( page: 1, results: 5, shippoApiVersion: "2018-02-08"); // 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 shippo_test_3a47d23c032ca626fce863c48d0f93d63a394396" \ -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 ", 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 - label: Ruby lang: Ruby source: |- manifest = Shippo::Manifest.create( :carrier_account => "b741b99f95e841639b54272834bc478c", :shipment_date => "2014-05-16T23:59:59Z", :transactions => ["64bba01845ef40d29374032599f22588", "c169aa586a844cc49da00d0272b590e1"] ) - lang: typescript label: Typescript source: |- import { Shippo } from "shippo"; const shippo = new Shippo({ apiKeyHeader: "ShippoToken ", 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(); - label: PHP lang: PHP source: |- $manifest = Shippo_Manifest::create( array( 'carrier_account'=> 'b741b99f95e841639b54272834bc478c', 'shipment_date'=> '2014-05-16T23:59:59Z', 'transactions'=> array('64bba01845ef40d29374032599f22588', 'c169aa586a844cc49da00d0272b590e1') )); - 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 ", shippoApiVersion: "2018-02-08"); var res = await sdk.Manifests.CreateAsync( manifestCreateRequest: new ManifestCreateRequest() { CarrierAccount = "adcfdddf8ec64b84ad22772bce3ea37a", ShipmentDate = "2014-05-16T23:59:59Z", Transactions = new List() { "adcfdddf8ec64b84ad22772bce3ea37a", }, AddressFrom = ManifestCreateRequestAddressFrom.CreateManifestCreateRequestAddressFromAddressCreateRequest( 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 /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 shippo_test_3a47d23c032ca626fce863c48d0f93d63a394396" - lang: python label: Python source: |- import shippo s = shippo.Shippo( api_key_header="ShippoToken ", shippo_api_version='2018-02-08', ) res = s.manifests.get(manifest_id='') if res is not None: # handle response pass - label: Ruby lang: Ruby source: |- # Retrieve an existing manifest by object_id Shippo::Manifest.get('0fadebf6f60c4aca95fa01bcc59c79ae') - lang: typescript label: Typescript source: |- import { Shippo } from "shippo"; const shippo = new Shippo({ apiKeyHeader: "ShippoToken ", shippoApiVersion: "2018-02-08", }); async function run() { const result = await shippo.manifests.get(""); // Handle the result console.log(result) } run(); - label: PHP lang: PHP source: |- // Retrieve an existing manifest by object_id Shippo_Manifest::retrieve('0fadebf6f60c4aca95fa01bcc59c79ae'); - lang: csharp label: C# source: |- using Shippo; using Shippo.Models.Components; using Shippo.Models.Requests; var sdk = new ShippoSDK( apiKeyHeader: "ShippoToken ", shippoApiVersion: "2018-02-08"); var res = await sdk.Manifests.GetAsync( manifestId: "", shippoApiVersion: "2018-02-08"); // 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 shippo_test_3a47d23c032ca626fce863c48d0f93d63a394396" - lang: python label: Python source: |- import shippo from shippo.models import components, operations s = shippo.Shippo( api_key_header="ShippoToken ", 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 ", 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 ", shippoApiVersion: "2018-02-08"); ListOrdersRequest req = new ListOrdersRequest() { OrderStatus = new List() { Shippo.Models.Components.OrderStatusEnum.Paid, }, ShopApp = OrderShopAppEnum.Shippo, }; var res = await sdk.Orders.ListAsync(req); // 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 shippo_test_3a47d23c032ca626fce863c48d0f93d63a394396" \ -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 ", 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 ", 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 Shippo.Models.Requests; using System.Collections.Generic; var sdk = new ShippoSDK( apiKeyHeader: "ShippoToken ", 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() { 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 /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 shippo_test_3a47d23c032ca626fce863c48d0f93d63a394396" - lang: python label: Python source: |- import shippo s = shippo.Shippo( api_key_header="ShippoToken ", shippo_api_version='2018-02-08', ) res = s.orders.get(order_id='') if res is not None: # handle response pass - lang: typescript label: Typescript source: |- import { Shippo } from "shippo"; const shippo = new Shippo({ apiKeyHeader: "ShippoToken ", shippoApiVersion: "2018-02-08", }); async function run() { const result = await shippo.orders.get(""); // 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 ", shippoApiVersion: "2018-02-08"); var res = await sdk.Orders.GetAsync( orderId: "", shippoApiVersion: "2018-02-08"); // handle response /parcel-templates: get: description: |- List all carrier parcel template objects.
Use the following query string params to filter the results as needed.
  • `include=all` (the default). Includes templates from all carriers
  • `include=user`. Includes templates only from carriers which the user has added (whether or not they're currently enabled)
  • `include=enabled`. includes templates only for carriers which the user has added and enabled
  • `carrier=*token*`. filter by specific carrier, e.g. fedex, usps
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 shippo_test_3a47d23c032ca626fce863c48d0f93d63a394396" \ -H "Content-Type: application/json" - lang: python label: Python source: |- import shippo from shippo.models import operations s = shippo.Shippo( api_key_header="ShippoToken ", shippo_api_version='2018-02-08', ) res = s.carrier_parcel_templates.list(include=operations.Include.ENABLED, 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 ", shippoApiVersion: "2018-02-08", }); async function run() { const result = await shippo.carrierParcelTemplates.list("enabled", "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 ", shippoApiVersion: "2018-02-08"); var res = await sdk.CarrierParcelTemplates.ListAsync( include: Include.Enabled, carrier: "fedex", shippoApiVersion: "2018-02-08"); // 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 shippo_test_3a47d23c032ca626fce863c48d0f93d63a394396" \ -H "Content-Type: application/json" - lang: python label: Python source: |- import shippo s = shippo.Shippo( api_key_header="ShippoToken ", shippo_api_version='2018-02-08', ) res = s.carrier_parcel_templates.get(carrier_parcel_template_token='') if res is not None: # handle response pass - lang: typescript label: Typescript source: |- import { Shippo } from "shippo"; const shippo = new Shippo({ apiKeyHeader: "ShippoToken ", shippoApiVersion: "2018-02-08", }); async function run() { const result = await shippo.carrierParcelTemplates.get(""); // 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 ", shippoApiVersion: "2018-02-08"); var res = await sdk.CarrierParcelTemplates.GetAsync( carrierParcelTemplateToken: "", shippoApiVersion: "2018-02-08"); // 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 shippo_test_3a47d23c032ca626fce863c48d0f93d63a394396" - lang: python label: Python source: |- import shippo s = shippo.Shippo( api_key_header="ShippoToken ", shippo_api_version='2018-02-08', ) res = s.parcels.list(page=1, results=25) if res is not None: # handle response pass - label: Ruby lang: Ruby source: |- # List all parcels Shippo::Parcel.all() - lang: typescript label: Typescript source: |- import { Shippo } from "shippo"; const shippo = new Shippo({ apiKeyHeader: "ShippoToken ", shippoApiVersion: "2018-02-08", }); async function run() { const result = await shippo.parcels.list(1, 25); // Handle the result console.log(result) } run(); - label: PHP lang: PHP source: |- // List all parcels Shippo_Parcel::all(); - lang: csharp label: C# source: |- using Shippo; using Shippo.Models.Components; using Shippo.Models.Requests; var sdk = new ShippoSDK( apiKeyHeader: "ShippoToken ", shippoApiVersion: "2018-02-08"); var res = await sdk.Parcels.ListAsync( page: 1, results: 25, shippoApiVersion: "2018-02-08"); // 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 shippo_test_3a47d23c032ca626fce863c48d0f93d63a394396" \ -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 ", 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 - label: Ruby lang: Ruby source: |- # Create parcel object parcel = Shippo::Parcel.create( :length => 5, :width => 1, :height => 5.555, :distance_unit => :cm, :weight => 2, :mass_unit => :lb ) - lang: typescript label: Typescript source: |- import { Shippo } from "shippo"; const shippo = new Shippo({ apiKeyHeader: "ShippoToken ", 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(); - label: PHP lang: PHP source: |- // Create parcel object $parcel = Shippo_Parcel::create(array( "length"=> "5", "width"=> "5", "height"=> "5", "distance_unit"=> "in", "weight"=> "2", "mass_unit"=> "lb", )); - lang: csharp label: C# source: |- using Shippo; using Shippo.Models.Components; using Shippo.Models.Requests; var sdk = new ShippoSDK( apiKeyHeader: "ShippoToken ", shippoApiVersion: "2018-02-08"); var res = await sdk.Parcels.CreateAsync( requestBody: CreateParcelRequestBody.CreateCreateParcelRequestBodyParcelCreateRequest( 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 = Shippo.Models.Components.WeightUnitEnum.Lb, Weight = "1", DistanceUnit = Shippo.Models.Components.DistanceUnitEnum.In, Height = "1", Length = "1", Width = "1", }, ), shippoApiVersion: "2018-02-08"); // 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 shippo_test_3a47d23c032ca626fce863c48d0f93d63a394396" - lang: python label: Python source: |- import shippo s = shippo.Shippo( api_key_header="ShippoToken ", shippo_api_version='2018-02-08', ) res = s.parcels.get(parcel_id='') if res is not None: # handle response pass - label: Ruby lang: Ruby source: |- # Retrieve an existing parcel by object_id Shippo::Parcel.get('fcd9c72b564d4bfa8c03299ed6545132') - lang: typescript label: Typescript source: |- import { Shippo } from "shippo"; const shippo = new Shippo({ apiKeyHeader: "ShippoToken ", shippoApiVersion: "2018-02-08", }); async function run() { const result = await shippo.parcels.get(""); // Handle the result console.log(result) } run(); - label: PHP lang: PHP source: |- // Retrieve an existing parcel by object_id Shippo_Parcel::retrieve('fcd9c72b564d4bfa8c03299ed6545132'); - lang: csharp label: C# source: |- using Shippo; using Shippo.Models.Components; using Shippo.Models.Requests; var sdk = new ShippoSDK( apiKeyHeader: "ShippoToken ", shippoApiVersion: "2018-02-08"); var res = await sdk.Parcels.GetAsync( parcelId: "", shippoApiVersion: "2018-02-08"); // 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 shippo_test_3a47d23c032ca626fce863c48d0f93d63a394396" \ -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 ", 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('2023-06-18T07:14:55.676Z'), requested_start_time=dateutil.parser.isoparse('2023-06-21T08:42:38.998Z'), 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 ", 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("2023-06-18T07:14:55.676Z"), requestedStartTime: new Date("2023-06-21T08:42:38.998Z"), transactions: [ "adcfdddf8ec64b84ad22772bce3ea37a", ], }); // 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 ", 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 = Shippo.Models.Components.BuildingLocationType.FrontDoor, BuildingType = BuildingType.Apartment, Instructions = "Behind screen door", }, RequestedEndTime = System.DateTime.Parse("2023-06-18T07:14:55.676Z"), RequestedStartTime = System.DateTime.Parse("2023-06-21T08:42:38.998Z"), Transactions = new List() { "adcfdddf8ec64b84ad22772bce3ea37a", }, }, shippoApiVersion: "2018-02-08"); // handle response /rates/{RateId}: get: description: Returns an existing rate using a rate object ID. 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 shippo_test_3a47d23c032ca626fce863c48d0f93d63a394396" - lang: python label: Python source: |- import shippo s = shippo.Shippo( api_key_header="ShippoToken ", shippo_api_version='2018-02-08', ) res = s.rates.get(rate_id='') if res is not None: # handle response pass - label: Ruby lang: Ruby source: |- # Wait for rates to be generated timeout_rates_request = 10 # seconds while ["QUEUED","WAITING"].include? shipment.status do Timeout::timeout(timeout_rates_request) do shipment = Shippo::Shipment.get(shipment["object_id"]) end end # Retrieve all rates rates = shipment.rates() - lang: typescript label: Typescript source: |- import { Shippo } from "shippo"; const shippo = new Shippo({ apiKeyHeader: "ShippoToken ", shippoApiVersion: "2018-02-08", }); async function run() { const result = await shippo.rates.get(""); // Handle the result console.log(result) } run(); - label: PHP lang: PHP source: |- // Check if rate generation has been finished $attempts = 0; while ( ( $shipment["status"] == "QUEUED" || $shipment["status"] == "WAITING" ) && $attempts < 10 ){ $shipment = Shippo_Shipment::retrieve( $shipment["object_id"] ); $attempts += 1; } // Retrieve all rates $rates = Shippo_Shipment::get_shipping_rates( array( 'id'=> $shipment["object_id"] ) ); - lang: csharp label: C# source: |- using Shippo; using Shippo.Models.Components; using Shippo.Models.Requests; var sdk = new ShippoSDK( apiKeyHeader: "ShippoToken ", shippoApiVersion: "2018-02-08"); var res = await sdk.Rates.GetAsync( rateId: "", shippoApiVersion: "2018-02-08"); // 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 shippo_test_3a47d23c032ca626fce863c48d0f93d63a394396" \ -d transaction="4503427478ea45a899e9b54abc4c5803" - lang: python label: Python source: |- import shippo s = shippo.Shippo( api_key_header="ShippoToken ", shippo_api_version='2018-02-08', ) res = s.refunds.create(transaction='915d94940ea54c3a80cbfa328722f5a1', async_=False) if res is not None: # handle response pass - label: Ruby lang: Ruby source: refund = Shippo::Refund.create(:transaction => "35ed59f23a514ecfa2faeaed93a00086", :async => false) - lang: typescript label: Typescript source: |- import { Shippo } from "shippo"; const shippo = new Shippo({ apiKeyHeader: "ShippoToken ", shippoApiVersion: "2018-02-08", }); async function run() { const result = await shippo.refunds.create("915d94940ea54c3a80cbfa328722f5a1", false); // Handle the result console.log(result) } run(); - label: PHP lang: PHP source: $refund = Shippo_Refund::create( array("transaction" => "35ed59f23a514ecfa2faeaed93a00086", "async" => false)); - lang: csharp label: C# source: |- using Shippo; using Shippo.Models.Components; using Shippo.Models.Requests; var sdk = new ShippoSDK( apiKeyHeader: "ShippoToken ", shippoApiVersion: "2018-02-08"); var res = await sdk.Refunds.CreateAsync( refundRequestBody: new RefundRequestBody() { Async = false, Transaction = "915d94940ea54c3a80cbfa328722f5a1", }, shippoApiVersion: "2018-02-08"); // 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 shippo_test_3a47d23c032ca626fce863c48d0f93d63a394396" - lang: python label: Python source: |- import shippo s = shippo.Shippo( api_key_header="ShippoToken ", shippo_api_version='2018-02-08', ) res = s.refunds.list() if res is not None: # handle response pass - label: Ruby lang: Ruby source: |- # List all refunds Shippo::Refund.all() - lang: typescript label: Typescript source: |- import { Shippo } from "shippo"; const shippo = new Shippo({ apiKeyHeader: "ShippoToken ", shippoApiVersion: "2018-02-08", }); async function run() { const result = await shippo.refunds.list(); // Handle the result console.log(result) } run(); - label: PHP lang: PHP source: |- // List all refunds Shippo_Refund::all(); - lang: csharp label: C# source: |- using Shippo; using Shippo.Models.Components; using Shippo.Models.Requests; var sdk = new ShippoSDK( apiKeyHeader: "ShippoToken ", shippoApiVersion: "2018-02-08"); var res = await sdk.Refunds.ListAsync(shippoApiVersion: "2018-02-08"); // 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 shippo_test_3a47d23c032ca626fce863c48d0f93d63a394396" - lang: python label: Python source: |- import shippo s = shippo.Shippo( api_key_header="ShippoToken ", shippo_api_version='2018-02-08', ) res = s.refunds.get(refund_id='') if res is not None: # handle response pass - label: Ruby lang: Ruby source: |- # Retrieve an existing refund by object_id Shippo::Refund.get('d7c811cff9e24e4387418876f1ffd371') - lang: typescript label: Typescript source: |- import { Shippo } from "shippo"; const shippo = new Shippo({ apiKeyHeader: "ShippoToken ", shippoApiVersion: "2018-02-08", }); async function run() { const result = await shippo.refunds.get(""); // Handle the result console.log(result) } run(); - label: PHP lang: PHP source: |- // Retrieve an existing refund by object_id Shippo_Refund::retrieve('d7c811cff9e24e4387418876f1ffd371'); - lang: csharp label: C# source: |- using Shippo; using Shippo.Models.Components; using Shippo.Models.Requests; var sdk = new ShippoSDK( apiKeyHeader: "ShippoToken ", shippoApiVersion: "2018-02-08"); var res = await sdk.Refunds.GetAsync( refundId: "", shippoApiVersion: "2018-02-08"); // 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 " \ -H "Content-Type: application/json" - lang: python label: Python source: |- import shippo s = shippo.Shippo( api_key_header="ShippoToken ", shippo_api_version='2018-02-08', ) res = s.service_groups.list() if res is not None: # handle response pass - lang: typescript label: Typescript source: |- import { Shippo } from "shippo"; const shippo = new Shippo({ apiKeyHeader: "ShippoToken ", 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; using Shippo.Models.Requests; var sdk = new ShippoSDK( apiKeyHeader: "ShippoToken ", shippoApiVersion: "2018-02-08"); var res = await sdk.ServiceGroups.ListAsync(shippoApiVersion: "2018-02-08"); // 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 shippo_test_3a47d23c032ca626fce863c48d0f93d63a394396" \ -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 ", 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 ", 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 Shippo.Models.Requests; using System.Collections.Generic; var sdk = new ShippoSDK( apiKeyHeader: "ShippoToken ", 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 = Shippo.Models.Components.ServiceGroupTypeEnum.FlatRate, ServiceLevels = new List() { new ServiceGroupAccountAndServiceLevel() { AccountObjectId = "80feb1633d4a43c898f0058506cfd82d", ServiceLevelToken = "ups_next_day_air_saver", }, }, }, shippoApiVersion: "2018-02-08"); // handle response put: description: Updates an existing service group object.
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 shippo_test_3a47d23c032ca626fce863c48d0f93d63a394396" \ -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 ", 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', ), ], )) if res is not None: # handle response pass - lang: typescript label: Typescript source: |- import { Shippo } from "shippo"; const shippo = new Shippo({ apiKeyHeader: "ShippoToken ", 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", }, ], }); // 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 ", 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 = Shippo.Models.Components.ServiceGroupTypeEnum.FlatRate, ObjectId = "80feb1633d4a43c898f005850", IsActive = true, ServiceLevels = new List() { new ServiceGroupAccountAndServiceLevel() { AccountObjectId = "80feb1633d4a43c898f0058506cfd82d", ServiceLevelToken = "ups_next_day_air_saver", }, }, }); // 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 shippo_test_3a47d23c032ca626fce863c48d0f93d63a394396" \ - lang: python label: Python source: |- import shippo s = shippo.Shippo( api_key_header="ShippoToken ", shippo_api_version='2018-02-08', ) s.service_groups.delete(service_group_id='') # Use the SDK ... - lang: typescript label: Typescript source: |- import { Shippo } from "shippo"; const shippo = new Shippo({ apiKeyHeader: "ShippoToken ", shippoApiVersion: "2018-02-08", }); async function run() { await shippo.serviceGroups.delete(""); } run(); - lang: csharp label: C# source: |- using Shippo; using Shippo.Models.Components; using Shippo.Models.Requests; var sdk = new ShippoSDK( apiKeyHeader: "ShippoToken ", shippoApiVersion: "2018-02-08"); await sdk.ServiceGroups.DeleteAsync( serviceGroupId: "", shippoApiVersion: "2018-02-08"); /shipments: get: description: |- Returns a list of all shipment objects.

In order to filter results, you must use the below path parameters. A maximum date range of 90 days is permitted. Provided dates should be ISO 8601 UTC dates (timezone offsets are currently not supported).

Optional path parameters:
`object_created_gt`- object(s) created greater than a provided date time
`object_created_gte` - object(s) created greater than or equal to a provided date time
`object_created_lt` - object(s) created less than a provided date time
`object_created_lte` - object(s) created less than or equal to a provided date time
Date format examples:
`2017-01-01`
`2017-01-01T03:30:30` or `2017-01-01T03:30:30.5`
`2017-01-01T03:30:30Z`

Example URL:
`https://api.goshippo.com/shipments/?object_created_gte=2017-01-01T00:00:30&object_created_lt=2017-04-01T00:00:30` operationId: ListShipments parameters: - $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 shippo_test_3a47d23c032ca626fce863c48d0f93d63a394396" - lang: python label: Python source: |- import shippo from shippo.models import operations s = shippo.Shippo( api_key_header="ShippoToken ", shippo_api_version='2018-02-08', ) res = s.shipments.list(request=operations.ListShipmentsRequest()) if res is not None: # handle response pass - label: Ruby lang: Ruby source: |- # List all shipments Shippo::Shipment.list() - lang: typescript label: Typescript source: |- import { Shippo } from "shippo"; const shippo = new Shippo({ apiKeyHeader: "ShippoToken ", shippoApiVersion: "2018-02-08", }); async function run() { const result = await shippo.shipments.list({}); // Handle the result console.log(result) } run(); - label: PHP lang: PHP source: |- // List all shipments Shippo_Shipment::all(); - lang: csharp label: C# source: |- using Shippo; using Shippo.Models.Components; using Shippo.Models.Requests; var sdk = new ShippoSDK( apiKeyHeader: "ShippoToken ", shippoApiVersion: "2018-02-08"); ListShipmentsRequest req = new ListShipmentsRequest() {}; var res = await sdk.Shipments.ListAsync(req); // 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 shippo_test_3a47d23c032ca626fce863c48d0f93d63a394396" \ -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 ", 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=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=[ 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.USPSParcelTemplate.USPS_FLAT_RATE_GIFT_CARD_ENVELOPE, ), ], )) if res is not None: # handle response pass - label: Ruby lang: Ruby source: |- # Create the shipment object shipment = Shippo::Shipment.create( :address_from => address_from, :address_to => address_to, :parcels => parcel, :async => false ) - lang: typescript label: Typescript source: |- import { Shippo } from "shippo"; const shippo = new Shippo({ apiKeyHeader: "ShippoToken ", 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: { 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: [ { 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_FlatRateGiftCardEnvelope", }, ], }); // Handle the result console.log(result) } run(); - label: PHP lang: PHP source: |- // Create shipment object $shipment = Shippo_Shipment::create( array( "address_from" => $fromAddress, "address_to" => $toAddress, "parcels" => $parcel, "async" => false ) ); - 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 ", 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.CreateAddressFromAddressCreateRequest( 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.CreateAddressReturnAddressCreateRequest( 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.CreateAddressToStr( "d799c2679e644279b59fe661ac8fa489", ), CustomsDeclaration = ShipmentCreateRequestCustomsDeclaration.CreateShipmentCreateRequestCustomsDeclarationStr( "adcfdddf8ec64b84ad22772bce3ea37a", ), CarrierAccounts = new List() { "065a4a8c10d24a34ab932163a1b87f52", "73f706f4bdb94b54a337563840ce52b0", }, Parcels = new List() { Parcels.CreateParcelsParcelCreateFromTemplateRequest( new ParcelCreateFromTemplateRequest() { 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 = Shippo.Models.Components.WeightUnitEnum.Lb, Weight = "1", Template = ParcelTemplateEnumSet.CreateParcelTemplateEnumSetUSPSParcelTemplate( Shippo.Models.Components.USPSParcelTemplate.USPSFlatRateGiftCardEnvelope, ), }, ), }, }, shippoApiVersion: "2018-02-08"); // handle response /shipments/{ShipmentId}: get: description: Returns an existing shipment using an object ID 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 shippo_test_3a47d23c032ca626fce863c48d0f93d63a394396" - lang: python label: Python source: |- import shippo s = shippo.Shippo( api_key_header="ShippoToken ", shippo_api_version='2018-02-08', ) res = s.shipments.get(shipment_id='') if res is not None: # handle response pass - label: Ruby lang: Ruby source: |- # Retrieve an existing shipment by object_id Shippo::Shipment.get('89436997a794439ab47999701e60392e') - lang: typescript label: Typescript source: |- import { Shippo } from "shippo"; const shippo = new Shippo({ apiKeyHeader: "ShippoToken ", shippoApiVersion: "2018-02-08", }); async function run() { const result = await shippo.shipments.get(""); // Handle the result console.log(result) } run(); - label: PHP lang: PHP source: |- // Retrieve an existing shipment by object_id Shippo_Shipment::retrieve('89436997a794439ab47999701e60392e'); - lang: csharp label: C# source: |- using Shippo; using Shippo.Models.Components; using Shippo.Models.Requests; var sdk = new ShippoSDK( apiKeyHeader: "ShippoToken ", shippoApiVersion: "2018-02-08"); var res = await sdk.Shipments.GetAsync( shipmentId: "", shippoApiVersion: "2018-02-08"); // handle response /shipments/{ShipmentId}/rates: get: description: Returns a paginated list of rates associated with a shipment 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 shippo_test_3a47d23c032ca626fce863c48d0f93d63a394396" - lang: python label: Python source: |- import shippo s = shippo.Shippo( api_key_header="ShippoToken ", shippo_api_version='2018-02-08', ) res = s.rates.list_shipment_rates(shipment_id='', page=1, results=25) if res is not None: # handle response pass - label: Ruby lang: Ruby source: |- # Get rates for shipment by object_id Shippo.Shipment.rates('5e40ead7cffe4cc1ad45108696162e42') - lang: typescript label: Typescript source: |- import { Shippo } from "shippo"; const shippo = new Shippo({ apiKeyHeader: "ShippoToken ", shippoApiVersion: "2018-02-08", }); async function run() { const result = await shippo.rates.listShipmentRates("", 1, 25); // Handle the result console.log(result) } run(); - label: PHP lang: PHP source: |- // Get rates for shipment by object_id Shippo_Shipment::get_shipping_rates( array( 'id' => '5e40ead7cffe4cc1ad45108696162e42', 'currency' => 'USD' ) ); - lang: csharp label: C# source: |- using Shippo; using Shippo.Models.Components; using Shippo.Models.Requests; var sdk = new ShippoSDK( apiKeyHeader: "ShippoToken ", shippoApiVersion: "2018-02-08"); ListShipmentRatesRequest req = new ListShipmentRatesRequest() { ShipmentId = "", }; var res = await sdk.Rates.ListShipmentRatesAsync(req); // 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 open exchange rates. 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`. 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 ", shippo_api_version='2018-02-08', ) res = s.rates.list_shipment_rates_by_currency_code(request=operations.ListShipmentRatesByCurrencyCodeRequest( shipment_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 ", shippoApiVersion: "2018-02-08", }); async function run() { const result = await shippo.rates.listShipmentRatesByCurrencyCode({ shipmentId: "", 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 ", shippoApiVersion: "2018-02-08"); ListShipmentRatesByCurrencyCodeRequest req = new ListShipmentRatesByCurrencyCodeRequest() { ShipmentId = "", CurrencyCode = "USD", }; var res = await sdk.Rates.ListShipmentRatesByCurrencyCodeAsync(req); // 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 Webhooks and Tracking. 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 shippo_test_3a47d23c032ca626fce863c48d0f93d63a394396" \ -d carrier="usps" \ -d tracking_number="9205590164917312751089" \ -d metadata="Order 000123" - lang: python label: Python source: |- import shippo s = shippo.Shippo( api_key_header="ShippoToken ", shippo_api_version='2018-02-08', ) res = s.tracking_status.create(carrier='usps', tracking_number='9205590164917312751089', metadata='Order 000123') if res is not None: # handle response pass - lang: typescript label: Typescript source: |- import { Shippo } from "shippo"; const shippo = new Shippo({ apiKeyHeader: "ShippoToken ", shippoApiVersion: "2018-02-08", }); async function run() { const result = await shippo.trackingStatus.create("usps", "9205590164917312751089", "Order 000123"); // 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 ", 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 /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 shippo_test_3a47d23c032ca626fce863c48d0f93d63a394396" - lang: python label: Python source: |- import shippo s = shippo.Shippo( api_key_header="ShippoToken ", shippo_api_version='2018-02-08', ) res = s.tracking_status.get(tracking_number='', carrier='') if res is not None: # handle response pass - lang: typescript label: Typescript source: |- import { Shippo } from "shippo"; const shippo = new Shippo({ apiKeyHeader: "ShippoToken ", shippoApiVersion: "2018-02-08", }); async function run() { const result = await shippo.trackingStatus.get("", ""); // 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 ", shippoApiVersion: "2018-02-08"); var res = await sdk.TrackingStatus.GetAsync( trackingNumber: "", carrier: "", shippoApiVersion: "2018-02-08"); // 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 shippo_test_3a47d23c032ca626fce863c48d0f93d63a394396" - lang: python label: Python source: |- import shippo from shippo.models import components, operations s = shippo.Shippo( api_key_header="ShippoToken ", 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 - label: Ruby lang: Ruby source: |- # List all transactions Shippo::Transaction.all() - lang: typescript label: Typescript source: |- import { Shippo } from "shippo"; const shippo = new Shippo({ apiKeyHeader: "ShippoToken ", shippoApiVersion: "2018-02-08", }); async function run() { const result = await shippo.transactions.list({ objectStatus: "SUCCESS", trackingStatus: "DELIVERED", }); // Handle the result console.log(result) } run(); - label: PHP lang: PHP source: |- // List all transactions Shippo_Transaction::all(); - lang: csharp label: C# source: |- using Shippo; using Shippo.Models.Components; using Shippo.Models.Requests; var sdk = new ShippoSDK( apiKeyHeader: "ShippoToken ", shippoApiVersion: "2018-02-08"); ListTransactionsRequest req = new ListTransactionsRequest() { ObjectStatus = TransactionStatusEnum.Success, TrackingStatus = TrackingStatusEnum.Delivered, }; var res = await sdk.Transactions.ListAsync(req); // handle response post: description: Creates a new transaction object and purchases the shipping label using a rate object that has previously been created.
OR
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 ", 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', )) if res is not None: # handle response pass - label: Ruby lang: Ruby source: |- # Get the first rate in the rates results. # Customize this based on your business logic. rate = shipment.rates.first # Purchase the desired rate. transaction = Shippo::Transaction.create( :rate => rate["object_id"], :label_file_type => "PDF", :async => false ) # label_url and tracking_number if transaction["status"] == "SUCCESS" puts "Label sucessfully generated:" puts "label_url: #{transaction.label_url}" puts "tracking_number: #{transaction.tracking_number}" else puts "Error generating label:" puts transaction.messages end - lang: typescript label: Typescript source: |- import { Shippo } from "shippo"; const shippo = new Shippo({ apiKeyHeader: "ShippoToken ", shippoApiVersion: "2018-02-08", }); async function run() { const result = await shippo.transactions.create({ async: false, labelFileType: "PDF_4x6", metadata: "Order ID #12345", rate: "ec9f0d3adc9441449c85d315f0997fd5", }); // Handle the result console.log(result) } run(); - label: PHP lang: PHP source: |- // Get the first rate in the rates results. // Customize this based on your business logic. $rate = $shipment["rates"][0]; // Purchase the desired rate. $transaction = Shippo_Transaction::create( array( 'rate' => $rate["object_id"], 'label_file_type' => "PDF", 'async' => false ) ); // Retrieve label url and tracking number or error message if ($transaction["status"] == "SUCCESS"){ echo( $transaction["label_url"] ); echo("\n"); echo( $transaction["tracking_number"] ); }else { echo( $transaction["messages"] ); } - 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 ", shippoApiVersion: "2018-02-08"); var res = await sdk.Transactions.CreateAsync( requestBody: CreateTransactionRequestBody.CreateCreateTransactionRequestBodyTransactionCreateRequest( new TransactionCreateRequest() { Async = false, LabelFileType = LabelFileTypeEnum.Pdf4x6, Metadata = "Order ID #12345", Rate = "ec9f0d3adc9441449c85d315f0997fd5", }, ), shippoApiVersion: "2018-02-08"); // 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 shippo_test_3a47d23c032ca626fce863c48d0f93d63a394396" - lang: python label: Python source: |- import shippo s = shippo.Shippo( api_key_header="ShippoToken ", shippo_api_version='2018-02-08', ) res = s.transactions.get(transaction_id='') if res is not None: # handle response pass - label: Ruby lang: Ruby source: |- # Retrieve an existing transaction by object_id Shippo::Transaction.get('70ae8117ee1749e393f249d5b77c45e0') - lang: typescript label: Typescript source: |- import { Shippo } from "shippo"; const shippo = new Shippo({ apiKeyHeader: "ShippoToken ", shippoApiVersion: "2018-02-08", }); async function run() { const result = await shippo.transactions.get(""); // Handle the result console.log(result) } run(); - label: PHP lang: PHP source: |- // Retrieve an existing transaction by object_id Shippo_Transaction::retrieve('70ae8117ee1749e393f249d5b77c45e0'); - lang: csharp label: C# source: |- using Shippo; using Shippo.Models.Components; using Shippo.Models.Requests; var sdk = new ShippoSDK( apiKeyHeader: "ShippoToken ", shippoApiVersion: "2018-02-08"); var res = await sdk.Transactions.GetAsync( transactionId: "", shippoApiVersion: "2018-02-08"); // 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 shippo_test_3a47d23c032ca626fce863c48d0f93d63a394396" \ -H "Content-Type: application/json" - lang: python label: Python source: |- import shippo s = shippo.Shippo( api_key_header="ShippoToken ", shippo_api_version='2018-02-08', ) res = s.user_parcel_templates.list() if res is not None: # handle response pass - lang: typescript label: Typescript source: |- import { Shippo } from "shippo"; const shippo = new Shippo({ apiKeyHeader: "ShippoToken ", 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; using Shippo.Models.Requests; var sdk = new ShippoSDK( apiKeyHeader: "ShippoToken ", shippoApiVersion: "2018-02-08"); var res = await sdk.UserParcelTemplates.ListAsync(shippoApiVersion: "2018-02-08"); // handle response post: description: |- Creates a new user parcel template.
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 this list 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 " \ -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 ", 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 ", 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; using Shippo.Models.Requests; var sdk = new ShippoSDK( apiKeyHeader: "ShippoToken ", shippoApiVersion: "2018-02-08"); var res = await sdk.UserParcelTemplates.CreateAsync( userParcelTemplateCreateRequest: UserParcelTemplateCreateRequest.CreateUserParcelTemplateCreateRequestUserParcelTemplateWithCarrierTemplateCreateRequest( new UserParcelTemplateWithCarrierTemplateCreateRequest() { Weight = "12", WeightUnit = WeightUnitEnum.Lb, }, ), shippoApiVersion: "2018-02-08"); // 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 " - lang: python label: Python source: |- import shippo s = shippo.Shippo( api_key_header="ShippoToken ", shippo_api_version='2018-02-08', ) s.user_parcel_templates.delete(user_parcel_template_object_id='') # Use the SDK ... - lang: typescript label: Typescript source: |- import { Shippo } from "shippo"; const shippo = new Shippo({ apiKeyHeader: "ShippoToken ", shippoApiVersion: "2018-02-08", }); async function run() { await shippo.userParcelTemplates.delete(""); } run(); - lang: csharp label: C# source: |- using Shippo; using Shippo.Models.Components; using Shippo.Models.Requests; var sdk = new ShippoSDK( apiKeyHeader: "ShippoToken ", shippoApiVersion: "2018-02-08"); await sdk.UserParcelTemplates.DeleteAsync( userParcelTemplateObjectId: "", shippoApiVersion: "2018-02-08"); 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 " \ -H "Content-Type: application/json" - lang: python label: Python source: |- import shippo s = shippo.Shippo( api_key_header="ShippoToken ", shippo_api_version='2018-02-08', ) res = s.user_parcel_templates.get(user_parcel_template_object_id='') if res is not None: # handle response pass - lang: typescript label: Typescript source: |- import { Shippo } from "shippo"; const shippo = new Shippo({ apiKeyHeader: "ShippoToken ", shippoApiVersion: "2018-02-08", }); async function run() { const result = await shippo.userParcelTemplates.get(""); // 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 ", shippoApiVersion: "2018-02-08"); var res = await sdk.UserParcelTemplates.GetAsync( userParcelTemplateObjectId: "", shippoApiVersion: "2018-02-08"); // 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 shippo_test_3a47d23c032ca626fce863c48d0f93d63a394396" \ -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 ", shippo_api_version='2018-02-08', ) res = s.user_parcel_templates.update(user_parcel_template_object_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 ", shippoApiVersion: "2018-02-08", }); async function run() { const result = await shippo.userParcelTemplates.update("", { 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; using Shippo.Models.Requests; var sdk = new ShippoSDK( apiKeyHeader: "ShippoToken ", shippoApiVersion: "2018-02-08"); var res = await sdk.UserParcelTemplates.UpdateAsync( userParcelTemplateObjectId: "", shippoApiVersion: "2018-02-08", userParcelTemplateUpdateRequest: new UserParcelTemplateUpdateRequest() { DistanceUnit = Shippo.Models.Components.DistanceUnitEnum.In, Height = "6", Length = "10", Name = "My Custom Template", Weight = "12", WeightUnit = WeightUnitEnum.Lb, Width = "8", }); // 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 ", shippo_api_version='2018-02-08', ) res = s.shippo_accounts.list(page=1, results=25) if res is not None: # handle response pass - lang: typescript label: Typescript source: |- import { Shippo } from "shippo"; const shippo = new Shippo({ apiKeyHeader: "ShippoToken ", shippoApiVersion: "2018-02-08", }); async function run() { const result = await shippo.shippoAccounts.list(1, 25); // 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 ", shippoApiVersion: "2018-02-08"); var res = await sdk.ShippoAccounts.ListAsync( page: 1, results: 25, shippoApiVersion: "2018-02-08"); // handle response post: description: Creates a new Shippo Managed Account. 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 ", 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 ", 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; using Shippo.Models.Requests; var sdk = new ShippoSDK( apiKeyHeader: "ShippoToken ", 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 /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 ", shippo_api_version='2018-02-08', ) res = s.shippo_accounts.get(shippo_account_id='') if res is not None: # handle response pass - lang: typescript label: Typescript source: |- import { Shippo } from "shippo"; const shippo = new Shippo({ apiKeyHeader: "ShippoToken ", shippoApiVersion: "2018-02-08", }); async function run() { const result = await shippo.shippoAccounts.get(""); // 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 ", shippoApiVersion: "2018-02-08"); var res = await sdk.ShippoAccounts.GetAsync( shippoAccountId: "", shippoApiVersion: "2018-02-08"); // 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 ", shippo_api_version='2018-02-08', ) res = s.shippo_accounts.update(shippo_account_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 ", shippoApiVersion: "2018-02-08", }); async function run() { const result = await shippo.shippoAccounts.update("", { 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; using Shippo.Models.Requests; var sdk = new ShippoSDK( apiKeyHeader: "ShippoToken ", shippoApiVersion: "2018-02-08"); var res = await sdk.ShippoAccounts.UpdateAsync( shippoAccountId: "", shippoApiVersion: "2018-02-08", shippoAccountUpdateRequest: new ShippoAccountUpdateRequest() { Email = "hippo@shippo.com", FirstName = "Shippo", LastName = "Meister", CompanyName = "Acme", }); // 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 ", 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 ", 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 ", shippoApiVersion: "2018-02-08"); WebhookUpdateRequest req = new WebhookUpdateRequest() { Event = Shippo.Models.Components.WebhookEventTypeEnum.BatchCreated, Url = "https://example.com/shippo-webhook", Active = true, IsTest = false, }; var res = await sdk.Webhooks.CreateWebhookAsync(req); // 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 ", 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 ", 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 ", shippoApiVersion: "2018-02-08"); var res = await sdk.Webhooks.ListWebhooksAsync(); // 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 ", shippo_api_version='2018-02-08', ) res = s.webhooks.get_webhook(webhook_id='') if res is not None: # handle response pass - lang: typescript label: Typescript source: |- import { Shippo } from "shippo"; const shippo = new Shippo({ apiKeyHeader: "ShippoToken ", shippoApiVersion: "2018-02-08", }); async function run() { const result = await shippo.webhooks.getWebhook(""); // 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 ", shippoApiVersion: "2018-02-08"); var res = await sdk.Webhooks.GetWebhookAsync(webhookId: ""); // 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 ", shippo_api_version='2018-02-08', ) res = s.webhooks.update_webhook(webhook_id='', webhook_update_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 ", 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, }); // 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 ", shippoApiVersion: "2018-02-08"); var res = await sdk.Webhooks.UpdateWebhookAsync( webhookId: "", webhookUpdateRequest: new WebhookUpdateRequest() { Event = Shippo.Models.Components.WebhookEventTypeEnum.BatchCreated, Url = "https://example.com/shippo-webhook", Active = true, IsTest = false, }); // 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 ", shippo_api_version='2018-02-08', ) s.webhooks.delete_webhook(webhook_id='') # Use the SDK ... - lang: typescript label: Typescript source: |- import { Shippo } from "shippo"; const shippo = new Shippo({ apiKeyHeader: "ShippoToken ", shippoApiVersion: "2018-02-08", }); async function run() { await shippo.webhooks.deleteWebhook(""); } run(); - lang: csharp label: C# source: |- using Shippo; using Shippo.Models.Components; using Shippo.Models.Requests; var sdk = new ShippoSDK( apiKeyHeader: "ShippoToken ", shippoApiVersion: "2018-02-08"); await sdk.Webhooks.DeleteWebhookAsync(webhookId: ""); 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 components: parameters: 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 API version guide. in: header name: SHIPPO-API-VERSION schema: type: string example: '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: '' content: application/json: schema: $ref: '#/components/schemas/CarrierParcelTemplateList' userParcelTemplateListResponse: description: '' content: application/json: schema: $ref: '#/components/schemas/UserParcelTemplateList' trackResponse: description: '' content: application/json: schema: $ref: '#/components/schemas/Track' serviceGroupResponse: description: '' content: application/json: schema: $ref: '#/components/schemas/ServiceGroup' serviceGroupListResponse: description: '' content: application/json: schema: items: $ref: '#/components/schemas/ServiceGroup' type: array defaultParcelTemplateResponse: description: '' content: application/json: schema: $ref: '#/components/schemas/DefaultParcelTemplate' transactionPaginatedResponse: description: '' content: application/json: schema: $ref: '#/components/schemas/TransactionPaginatedList' invoiceResponse: description: '' content: application/json: schema: $ref: '#/components/schemas/Invoice' invoicePaginatedResponse: description: '' content: application/json: schema: $ref: '#/components/schemas/InvoicePaginatedList' invoiceItemsPaginatedResponse: description: '' content: application/json: schema: $ref: '#/components/schemas/InvoiceItemPaginatedList' addressPaginatedResponse: description: '' content: application/json: schema: $ref: '#/components/schemas/AddressPaginatedList' customsDeclarationPaginatedResponse: description: '' content: application/json: schema: $ref: '#/components/schemas/CustomsDeclarationPaginatedList' customsItemPaginatedResponse: description: '' content: application/json: schema: $ref: '#/components/schemas/CustomsItemPaginatedList' manifestPaginatedResponse: description: '' content: application/json: schema: $ref: '#/components/schemas/ManifestPaginatedList' refundPaginatedResponse: description: '' content: application/json: schema: $ref: '#/components/schemas/RefundPaginatedList' orderPaginatedResponse: description: '' content: application/json: schema: $ref: '#/components/schemas/OrderPaginatedList' parcelPaginatedResponse: description: '' content: application/json: schema: $ref: '#/components/schemas/ParcelPaginatedList' ratePaginatedResponse: description: '' content: application/json: schema: $ref: '#/components/schemas/RatePaginatedList' shipmentPaginatedResponse: description: '' content: application/json: schema: $ref: '#/components/schemas/ShipmentPaginatedList' badRequestResponse: description: '' content: application/json: schema: $ref: '#/components/schemas/BadRequest' carrierAccountResponse: description: '' content: application/json: schema: $ref: '#/components/schemas/CarrierAccount' carrierAccountPaginatedResponse: description: '' content: application/json: schema: $ref: '#/components/schemas/CarrierAccountPaginatedList' liveRatePaginatedResponse: description: '' content: application/json: schema: $ref: '#/components/schemas/LiveRatePaginatedList' addressResponse: description: '' content: application/json: schema: $ref: '#/components/schemas/Address' batchResponse: description: '' content: application/json: schema: $ref: '#/components/schemas/Batch' carrierParcelTemplateResponse: description: '' content: application/json: schema: $ref: '#/components/schemas/CarrierParcelTemplate' customsDeclarationResponse: description: '' content: application/json: schema: $ref: '#/components/schemas/CustomsDeclaration' customsItemResponse: description: '' content: application/json: schema: $ref: '#/components/schemas/CustomsItem' manifestResponse: description: '' content: application/json: schema: $ref: '#/components/schemas/Manifest' orderResponse: description: '' content: application/json: schema: $ref: '#/components/schemas/Order' parcelResponse: description: '' content: application/json: schema: $ref: '#/components/schemas/Parcel' pickupResponse: description: '' content: application/json: schema: $ref: '#/components/schemas/Pickup' rateResponse: description: '' content: application/json: schema: $ref: '#/components/schemas/Rate' refundResponse: description: '' content: application/json: schema: $ref: '#/components/schemas/Refund' shipmentResponse: description: '' content: application/json: schema: $ref: '#/components/schemas/Shipment' transactionResponse: description: '' content: application/json: schema: $ref: '#/components/schemas/Transaction' transactionCreateResponse: description: '' content: application/json: schema: $ref: '#/components/schemas/Transaction' userParcelTemplateResponse: description: '' content: application/json: schema: $ref: '#/components/schemas/UserParcelTemplate' shippoAccountPaginatedResponse: description: '' content: application/json: schema: $ref: '#/components/schemas/ShippoAccountPaginatedList' shippoAccountResponse: description: '' content: application/json: schema: $ref: '#/components/schemas/ShippoAccount' webhookResponse: description: '' content: application/json: schema: $ref: '#/components/schemas/Webhook' webhookPaginatedResponse: description: '' content: application/json: schema: $ref: '#/components/schemas/WebhookPaginatedList' carrierAccountRegistrationStatusResponse: description: '' content: application/json: schema: $ref: '#/components/schemas/CarrierAccountRegistrationStatus' securitySchemes: APIKeyHeader: in: header name: Authorization type: apiKey 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**
First and Last Name of the addressee example: Shwan Ippotle type: string company: example: Shippo type: string description: Company Name street1: description: |- **required for purchase**
First street line, 35 character limit. Usually street number and street name (except for DHL Germany, see street_no). example: 215 Clayton St. 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: '' 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**
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. example: San Francisco type: string state: description: |- **required for purchase for some countries**
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: |- **required for purchase**
Postal code of an Address. When creating a Quote Addresses, sending a ZIP is optional but will yield more accurate Rates. example: '94117' type: string country: example: US type: string description: |- ISO 3166-1 alpha-2 country codes and country names can be used. For most consistent results, we reccomend 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 guide for a list of country codes. Sending a country is always required. phone: example: +1 555 341 9393 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 metadata: example: Customer ID 123456 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. type: object Address: allOf: - $ref: '#/components/schemas/AddressBase' - properties: is_complete: example: true type: boolean description: |- Complete addresses contain all required values.

Incomplete addresses have failed one or multiple validations.
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: Address object of the recipient / buyer. Will be returned expanded by default. AddressFrom: allOf: - $ref: '#/components/schemas/Address' description: Address 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).
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: Address object of the sender / seller. Will be returned expanded by default.. AddressToCreateRequest: allOf: - $ref: '#/components/schemas/AddressCreateRequest' description: Address 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**
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 Official ISO Website. 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. AddressImporterResponse: properties: object_id: description: ID of importer address object example: 7506ccbb65a34a8a9ac2cc4a89e820d2 type: string 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 is_valid(boolean) and messages(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 Address Validation Codes source: type: string example: Shippo Address Validator description: See Address Validation Source 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". ISO 4217 Standard. 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". ISO 4217 Standard. 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". ISO 4217 Standard. 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. Servicelevel tokens can be found here. 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: 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 Address object. example: shippo@shippo.com type: string object_results: description: An object containing the following counts:
`creation_succeeded`
`creation_failed`
`purchase_succeeded`
`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
`VALID` batches can be purchased
`INVALID` batches cannot be purchased, `INVALID` BatchShipments must be removed
Batches that are in the `PURCHASING` state are being purchased
`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 in this list or at this endpoint. example: fedex_ground type: string type: object BatchShipment: allOf: - $ref: '#/components/schemas/BatchShipmentBase' - properties: messages: description: List of Shipment and Transaction error messages. type: array 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.
`VALID` batch shipments can be purchased.
Batch shipments with the status `TRANSACTION_FAILED` were not able to be purchased and the error will be displayed on the message field
`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 BatchShipment 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 UPS 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: 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: CarrierParcelTemplate represents the fields of a template before saving it to the db. 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 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. 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`**
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**
Represents:
the Proof of Report (POR) Number when b13a_filing_option is `FILED_ELECTRONICALLY`;
the Summary ID Number when b13a_filing_option is `SUMMARY_REPORTING`;
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`**
Explanation of the type of goods of the shipment. example: T-Shirt purchase type: string disclaimer: type: string description: Disclaimer for the shipment and customs information that have been provided. 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 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). More information on reporting commercial exports from Canada. Allowed values available here 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 here 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 here 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 and DPD UK. If expecting DAP for other carriers, please use DDU. Allowed values available here 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 here example: RETURN CustomsDeclarationNonDeliveryOptionEnum: allOf: - $ref: '#/components/schemas/CustomsDeclarationNonDeliveryOption' - enum: - ABANDON - RETURN CustomsDeclaration: 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). More information on EORI. 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 Official ISO Website. 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 official ISO 4217 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: 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 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 guide on hazardous or dangerous materials shipping. 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: 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 description: Optional text to be printed on the shipping label for department number. Up to 40 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 ShipmentExtra: 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 Category Codes 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 Create a return shipment 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 description: Optional text to be printed on the shipping label if supported by carrier. Up to 50 characters. reference_2: type: string 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. 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' 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 carrier accounts guide for the parameters per carrier. To protect account information, this field will be masked in any API response. additionalProperties: true Insurance: description: |- To add 3rd party insurance powered by XCover, specify
`amount`, `content`, and `currency`.
Alternatively, you can choose carrier provided insurance by additionally specifying `provider` (UPS, FedEx and OnTrac only).

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 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. 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 total_price 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 total_weight value of the order object. example: '0.4' type: string weight_unit: $ref: '#/components/schemas/WeightUnitEnum' type: object LineItem: 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 Address - $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 Address - $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 LiveRate: 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: 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 ManifestErrors: properties: generic_carrier_error: type: string description: There is an error from the carrier that requires investigation. Please contact support with the object ID of this response. carrier_account_invalid_credentials: type: string description: The carrier account contains invalid credentials. Please update your carrier account with valid credentials. carrier_account_access_denied: type: string description: There is an issue with your carrier account. Please contact support with the information of your account manager at the carrier and the object ID of this response. manifest_invalid_transactions: type: string description: For this carrier, all shipments must be manifested on the same day that they are created regardless of shipment date. manifest_no_transactions: type: string description: There are no shipments in the manifest. Please check that the shipment date of the shipments matches the shipment date of the manifest. address_from_missing_zip: type: string description: The sender address is missing the zip. Please update the sender address and try again. address_from_invalid_zip1: type: string description: The sender address contains an invalid zip. Please update the sender address and try again. address_from_invalid_zip2: type: string description: The sender address contains an invalid zip. Please update the sender address and try again. You can also try removing the last 4 digits of the zip. address_from_missing_city: type: string description: The sender address is missing the city. Please update the sender address and try again. address_from_invalid_city: type: string description: The sender address contains an invalid city. Please update the sender address and try again. address_from_missing_state: type: string description: The sender address is missing the state. Please update the sender address and try again. address_from_invalid_state: type: string description: The sender address contains an invalid state. Please update the sender address and try again. address_from_missing_name: type: string description: The sender address is missing the name. Please update the sender address and try again. shipment_date_missing: type: string description: The shipment date is missing. Please update the shipment date and try again. shipment_date_invalid: type: string description: The shipment date is invalid. Please update the shipment date and try again. 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**
Currency of the total_price and total_tax 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**
Currency of the shipping_cost 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 orders tutorial for the logic of how the status is handled. enum: - UNKNOWN - AWAITPAY - PAID - REFUNDED - CANCELLED - PARTIALLY_FULFILLED - SHIPPED example: PAID Order: allOf: - $ref: '#/components/schemas/OrderBase' - properties: from_address: $ref: '#/components/schemas/AddressFrom' to_address: $ref: '#/components/schemas/AddressTo' line_items: description: |- Array of line item 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: string type: array description: |- Array of transaction 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 line item 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: 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: description: |- An object holding optional extra services to be requested for each parcel in a multi-piece shipment. See the Parcel Extra table below for all available services. properties: COD: $ref: '#/components/schemas/COD' insurance: $ref: '#/components/schemas/ParcelInsurance' reference_1: type: string description: Optional text to be printed on the shipping label if supported by carrier. Up to 50 characters. reference_2: type: string description: Optional text to be printed on the shipping label if supported by carrier. Up to 50 characters. type: object ParcelInsurance: description: To add insurace to your parcel, specify `amount`, `content` and `currency`.

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 Carrier Accounts 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: 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 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. 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 official ISO 4217 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 official ISO 4217 currency codes are used, e.g. `USD` or "EUR". Rate: 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: 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 description: Optional text to be printed on the shipping label for RMA number. Up to 40 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.
`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.
`FLAT_RATE` - Returns a shipping option with the specified flat rate amount.
`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: 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/ServiceLevelWithParent' 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`.
See Service Levels. 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 servicelevels. 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 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: 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 async has been set to false 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: Address `object_id` of a previously created address. address_return: oneOf: - $ref: '#/components/schemas/AddressCreateRequest' - type: string example: d799c2679e644279b59fe661ac8fa488 description: Address `object_id` of a previously created address. address_to: oneOf: - $ref: '#/components/schemas/AddressCreateRequest' - type: string example: d799c2679e644279b59fe661ac8fa489 description: Address `object_id` of a previously created address. customs_declaration: oneOf: - $ref: '#/components/schemas/CustomsDeclarationCreateRequest' - type: string example: adcfdddf8ec64b84ad22772bce3ea37a description: |- Customs Declaration `object_id` of a previously created customs declaration. async: type: boolean carrier_accounts: items: type: string type: array description: |- List of Carrier Accounts `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 items: oneOf: - $ref: '#/components/schemas/ParcelCreateRequest' - $ref: '#/components/schemas/ParcelCreateFromTemplateRequest' - type: string description: Parcel `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 Track: 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 Carriers. 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 tracking_status. 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 object_id 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 Event Definitions for more information. text: example: Information about the package received. type: string description: A human-readable description of the substatus. See the Event Definitions 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: 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.
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 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' 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.
See Service Levels. example: Priority Mail type: string servicelevel_token: description: |- Token of the Rate's servicelevel, e.g. `usps_priority` or `fedex_ground`. See servicelevels. 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". ISO 4217 Standard. 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 here 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 here 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 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 required: - first_name - last_name - phone_number - from_address_st - from_address_city - from_address_state - from_address_zip - from_address_country_iso2 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 carrier accounts tutorial page for the parameters per carrier.
To protect account information, this field will be masked in any API response. 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 CreateNewOwnUPSAccountRequest: properties: account_id: description: This field is required as input to the API, but is not used for UPS. Use the empty string. type: string active: type: boolean carrier: example: ups type: string metadata: example: UPS Account type: string parameters: $ref: '#/components/schemas/UPSCreateNewOwnAccountParameters' test: example: false type: boolean required: - account_id - parameters - active type: object UPSCreateNewOwnAccountParameters: 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: example: '1112223333' type: string pickup_address_city: description: User's pickup address city. Only required if pickup_address_same_as_billing_address is false example: San Francisco type: string pickup_address_country_iso2: description: User's pickup street 1. Only required if pickup_address_same_as_billing_address is false 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. Only required if pickup_address_same_as_billing_address is false example: CA maxLength: 2 minLength: 2 type: string pickup_address_street1: description: User's pickup address street 1. Only required if pickup_address_same_as_billing_address is false example: 731 Market St type: string pickup_address_street2: description: User's pickup street 2. Only used if pickup_address_same_as_billing_address is false, empty string acceptable example: STE 200 type: string pickup_address_zip: description: User's pickup address zip code. Only required if pickup_address_same_as_billing_address is false 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 - email - full_name - company - phone - billing_address_street1 - billing_address_city - billing_address_zip - billing_address_state - billing_address_country_iso2 - pickup_address_same_as_billing_address type: object CarrierAccountBase: properties: account_id: description: |- Unique identifier of the account. Please check the carrier accounts tutorial page for the `account_id` per carrier.
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 Carriers
Please check the carrier accounts tutorial 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 CarrierAccount: allOf: - $ref: '#/components/schemas/CarrierAccountBase' - properties: carrier_name: example: USPS description: Carrier name, see Carriers
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.
See Service Levels. token: example: usps_priority_express type: string description: |- Service level token, e.g. `usps_priority` or `fedex_ground`.
See Service Levels. 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: example: canada_post type: string 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: example: chronopost type: string parameters: type: object required: - carrier - parameters type: object CarrierAccountColissimoCreateRequest: title: Shippo Colissimo account properties: carrier: example: colissimo type: string parameters: type: object required: - carrier - parameters type: object CarrierAccountCorreosCreateRequest: title: Shippo Correos account properties: carrier: example: correos type: string parameters: type: object required: - carrier - parameters type: object CarrierAccountDeutschePostCreateRequest: title: Shippo Deutsche Post account properties: carrier: example: deutsche_post type: string parameters: type: object required: - carrier - parameters type: object CarrierAccountDHLExpressCreateRequest: title: Shippo DHL Express account properties: carrier: example: dhl_express type: string 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: example: dpd_de type: string parameters: type: object required: - carrier - parameters type: object CarrierAccountDPDUKCreateRequest: title: Shippo DPD UK account properties: carrier: example: dpd_uk type: string parameters: type: object required: - carrier - parameters type: object CarrierAccountFedExCreateRequest: title: Shippo FedEx account properties: carrier: example: fedex type: string parameters: type: object required: - carrier - parameters type: object CarrierAccountHermesUKCreateRequest: title: Shippo Evri UK account properties: carrier: example: hermes_uk type: string parameters: type: object required: - carrier - parameters type: object CarrierAccountMondialRelayCreateRequest: title: Shippo Mondial Relay account properties: carrier: example: mondialrelay type: string parameters: type: object required: - carrier - parameters type: object CarrierAccountPosteItalianeCreateRequest: title: Shippo Poste Italiane account properties: carrier: example: poste_italiane type: string parameters: type: object required: - carrier - parameters type: object CarrierAccountUPSCreateRequest: title: Shippo UPS account properties: carrier: example: ups type: string parameters: $ref: '#/components/schemas/CarrierAccountUPSCreateRequestParameters' required: - carrier type: object CarrierAccountUSPSCreateRequest: title: Shippo USPS account properties: carrier: example: usps type: string parameters: type: object required: - carrier - parameters type: object CarrierAccountSendleCreateRequest: title: Shippo Sendle account properties: carrier: example: sendle type: string parameters: type: object 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 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: 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: 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: 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 - cdl - chronopost - collect_plus - correios_br - correos_espana - couriersplease - 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 - orangeds - parcelforce - passport - pcf - poste_italiane - posti - purolator - royal_mail - rr_donnelley - russian_post - sendle - 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| | cdl | CDL| | chronopost | Chronopost| | collect_plus | CollectPlus| | correios_br | CorreiosBR| | correos_espana | Correos España | | couriersplease | Couriers Please| | 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| | orangeds | OrangeDS| | parcelforce | Parcelforce| | passport | Passport| | pcf | PCF| | poste_italiane | Poste Italiane | | posti | Posti| | purolator | Purolator| | royal_mail | Royal Mail| | rr_donnelley | ePost Global| | russian_post | Russian Post| | sendle | Sendle| | 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 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| ServiceLevelCDLEnum: type: string enum: - cdl_next_day description: | |Token | Service name| |:---|:---| | cdl_next_day | Next Day| 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| ServiceLevelCouriersPleaseEnum: type: string enum: - couriersplease_domestic_priority_auth_to_leave - couriersplease_domestic_priority_sign_required - couriersplease_gold_domestic_auth_to_leave - couriersplease_gold_domestic_sign_required - couriersplease_off_peak_auth_to_leave - couriersplease_off_peak_sign_required - couriersplease_parcel_auth_to_leave - couriersplease_parcel_sign_required - couriersplease_road_express - couriersplease_satchel_auth_to_leave - couriersplease_satchel_sign_required description: | |Token | Service name| |:---|:---| | couriersplease_domestic_priority_auth_to_leave | Domestic Priority - Authority To Leave/POPPoints| | couriersplease_domestic_priority_sign_required | Domestic Priority - Signature Required| | couriersplease_gold_domestic_auth_to_leave | Gold Domestic - Authority To Leave/POPPoints| | couriersplease_gold_domestic_sign_required | Gold Domestic - Signature Required| | couriersplease_off_peak_auth_to_leave | Off Peak - Authority To Leave/POPPoints| | couriersplease_off_peak_sign_required | Off Peak - Signature Required| | couriersplease_parcel_auth_to_leave | Parcel - Authority To Leave| | couriersplease_parcel_sign_required | Parcel - Signature Required| | couriersplease_road_express | Road Express| | couriersplease_satchel_auth_to_leave | Satchel - Authority To Leave| | couriersplease_satchel_sign_required | Satchel - Signature Required| 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 Ttacked 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 ServiceLevelSendleEnum: type: string enum: - sendle_parcel - sendle_standard_dropoff description: | |Token | Service name| |:---|:---| | sendle_parcel | Sendle Parcel| | sendle_standard_dropoff | Sendle Standard Dropoff| 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_next_day description: | |Token | Service name| |:---|:---| | veho_next_day | Veho Next Day | 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/ServiceLevelCDLEnum' - $ref: '#/components/schemas/ServiceLevelChronopostEnum' - $ref: '#/components/schemas/ServiceLevelCouriersPleaseEnum' - $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/ServiceLevelSendleEnum' - $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 & International) | 0.00 x 0.00 x 0.00 in| | UPS_MI_BPM_Flat | BPM Flat (Mail Innovations - Domestic & International) | 0.00 x 0.00 x 0.00 in| | UPS_MI_BPM_Parcel | BPM Parcel (Mail Innovations - Domestic & 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'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| ParcelTemplateCouriersPleaseEnum: type: string title: Couriers Please Parcel Template enum: - couriersplease_500g_satchel - couriersplease_1kg_satchel - couriersplease_3kg_satchel - couriersplease_5kg_satchel description: | |Token | Name | Dimensions| |:---|:---|:---| | couriersplease_500g_satchel | 500g Satchel | 22.00 x 33.50 x 0.10 cm| | couriersplease_1kg_satchel | 1kg Satchel | 28.00 x 35.00 x 0.10 cm| | couriersplease_3kg_satchel | 3kg Satchel | 34.00 x 42.00 x 0.10 cm| | couriersplease_5kg_satchel | 5kg Satchel | 43.70 x 59.70 x 0.10 cm| 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/ParcelTemplateCouriersPleaseEnum' - $ref: '#/components/schemas/ParcelTemplateAramexAustraliaEnum' x-speakeasy-include: true LabelFileTypeEnum: description: |- Print format of the label. If empty, will use the default format set from the Shippo dashboard. 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: 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 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 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