> ## Agent Instructions > Shippo is a multi-carrier shipping API. For agent integrations that execute shipping operations (rates, labels, tracking, address validation, customs), connect the hosted Shippo MCP server at https://mcp.shippo.com (per-user OAuth; setup at /guides/mcp-server). To search and read this documentation from an agent, a docs search MCP is available at https://docs.goshippo.com/mcp. Shipping workflow knowledge (agent skills and a knowledge pack) is published at https://github.com/goshippo/ai. For REST integrations start at /guides/api-quickstart; test mode uses shippo_test_ API keys. # Address book Source: https://docs.goshippo.com/address-api/address-book Store, retrieve, update, and delete addresses using the Shippo Addresses API address book. An address book is a digital store for addresses. It stores addresses and helps you update, retrieve, and delete addresses. Using the Addresses API means you do not need to create your own storage solution for this common challenge. Using an address book is also a great way to improve the customer checkout experience. Enabling your customers to save their addresses during checkout simplifies future purchases with your business. **Note** Address object IDs cannot be used with previous versions of the Shippo API. There is a limit of 3,000 addresses that can be stored. ## Create an address book entry To store an address for later use in the Addresses API, follow this example. Note, you cannot save identical addresses. ```json cURL theme={null} curl -i -X POST \ https://api.goshippo.com/v2/addresses \ -H 'Authorization: ShippoToken ' \ -H 'Content-Type: application/json' \ -d '{ "name": "Wilson", "organization": "Shippo", "email": "user@shippo.com", "phone": "+1-4155550132", "address_line_1": "731 Market Street", "address_line_2": "#200", "city_locality": "San Francisco", "state_province": "CA", "postal_code": "94103", "country_code": "US", "address_type": "residential" }' ``` ```json Create address response theme={null} { "id": "7cf70f716ad0459cbd0de8652689192b", "address": { "name": "Wilson", "email": "user@shippo.com", "phone": "+1-4155550132", "organization": "Shippo", "address_line_1": "731 Market Street", "address_line_2": "#200", "city_locality": "San Francisco", "state_province": "CA", "postal_code": "94103", "country_code": "US", "address_type": "residential" }, "updated_at": "2019-08-24T14:15:22Z", "created_at": "2019-08-24T14:15:22Z" } ``` ## Retrieve addresses You can retrieve an address using an address object ID. If you don't know the object ID for an address, see the example to retrieve multiple addresses. To retrieve a single address using an object ID, follow this example. ```json cURL theme={null} curl -i -X GET \ 'https://api.goshippo.com/v2/addresses/{address_id}' \ -H 'Authorization: ShippoToken ' ``` ```json Retrieve single address response theme={null} { "id": "5029d2e1d0994bd0a8efd7d12485539d", "address": { "name": "Wilson", "email": "user@shippo.com", "phone": "+1-4155550132", "organization": "Shippo", "address_line_1": "731 Market Street", "address_line_2": "#200", "city_locality": "San Francisco", "state_province": "CA", "postal_code": "94103", "country_code": "US", "address_type": "residential" }, "updated_at": "2023-11-16T10:13:59.887946Z", "created_at": "2023-11-16T10:13:59.887946Z" } ``` To retrieve multiple addresses with a single call, follow this example. You can reduce the number of returned results using the following parameters. | Parameter | Description | | --------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `limit` | Limits the number of returned addresses. For example, if 20 records match your query and `limit` is set to 5, only the first 5 addresses are returned | | `offset` | The number of addresses to skip in the result set. For example, if 100 addresses match your query, if you offset 50 and limit 20, then you get addresses 50-70 | | `search` | Only addresses that contains this string anywhere in the address will be returned | ```json cURL theme={null} curl -i -X GET \ 'https://api.goshippo.com/v2/addresses?offset=0&limit=30&search=string' \ -H 'Authorization: ShippoToken ' ``` ```json Retrieve multiple addresses response theme={null} { "offset": 0, "limit": 30, "count": 3, "results": [ { "id": "5029d2e1d0994bd0a8efd7d12485539d", "address": { "name": "Wilson", "email": "user@shippo.com", "phone": "+1-4155550132", "organization": "Shippo", "address_line_1": "731 Market Street", "address_line_2": "#200", "city_locality": "San Francisco", "state_province": "CA", "postal_code": "94103", "country_code": "US", "address_type": "residential" }, "updated_at": "2023-11-16T10:13:59.887946Z", "created_at": "2023-11-16T10:13:59.887946Z" }, { "id": "45472328338149bda583cd6abec7fd75", "address": { "name": "Wilson 2", "email": "user@shippo.com", "phone": "+1-4155550132", "organization": "Shippo", "address_line_1": "731 Market Street", "address_line_2": "#200", "city_locality": "San Francisco", "state_province": "CA", "postal_code": "94103", "country_code": "US", "address_type": "residential" }, "updated_at": "2023-11-17T16:26:53.951934Z", "created_at": "2023-11-17T16:26:53.951934Z" }, { "id": "81c1dc22258344dea6a78565797ffd44", "address": { "name": "Wilson 2", "email": "user@shippo.com", "phone": "+1-4155550132", "organization": "Shippo 2", "address_line_1": "731 Market Street", "address_line_2": "#200", "city_locality": "San Francisco", "state_province": "CA", "postal_code": "94103", "country_code": "US", "address_type": "residential" }, "updated_at": "2023-11-17T16:27:13.130576Z", "created_at": "2023-11-17T16:27:13.130576Z" } ] } ``` ## Update an address To update an existing address, follow this example. ```json cURL theme={null} curl -i -X PUT \ 'https://api.goshippo.com/v2/addresses/{address_id}' \ -H 'Authorization: ShippoToken ' \ -H 'Content-Type: application/json' \ -d '{ "name": "Wilson", "organization": "Shippo", "email": "user@shippo.com", "phone": "+1-4155550132", "address_line_1": "731 Market Street", "address_line_2": "#200", "city_locality": "San Francisco", "state_province": "CA", "postal_code": "94103", "country_code": "US", "address_type": "residential" }' ``` ## Delete addresses To delete an address that you have created, follow this example. ```json cURL theme={null} curl -i -X DELETE \ 'https://api.goshippo.com/v2/addresses/{address_id}' \ -H 'Authorization: ShippoToken ' ``` # Addresses API introduction Source: https://docs.goshippo.com/address-api/address-intro Get started with the Shippo Addresses API for storing, validating, and parsing addresses in your application. The Shippo Addresses API is a suite of dedicated tools for managing addresses in your application. Some applications of the Addresses API include the following. * Storing, managing, and retrieving addresses. * Checking addresses to ensure they are valid. * Parsing and importing an address from a string. *** Before you begin, examples in this guide assume you have a [Shippo API token](/guides/authentication). In the code examples, when you see ``, replace it with your own token. When testing and learning, we recommend using a [test token](/guides/testing). # Address parser Source: https://docs.goshippo.com/address-api/address-parser Convert an address string into a structured address object using the Shippo Addresses API parser. A parser is a tool for analyzing a string with some predefined rules. Using the Addresses API parser, you can convert a string into a correctly formatted address object. The parser expects an address string in the following formats. * For best results, use a comma `,` as a delimiter. * Your address must follow this order: `address_line_1`, `address_line_2`, `city_locality`, `state_province`, `postal_code`, `country_code`. * `phone` and `email` can be in any part of the string. ```string Good string example ✅ theme={null} 11605 W Belleview Ave, Littleton, Colorado, 80127, US ``` ```string Bad string example ❌ theme={null} Colorado 11605 W Belleview Ave Littleton 80127 US ``` ## Parse a string Follow this example to parse a string to an address object. ```json cURL theme={null} curl -i -X GET \ 'https://api.goshippo.com/v2/addresses/parse?address=Shippo%20731%20Market%20St%20%23200%2C%20San%20Francisco%2C%20CA%2094103%20US%20shippo%40shippo.com%20%2B1-555-999-8888' \ -H 'Authorization: ShippoToken ' ``` ```json Response theme={null} { "email": "shippo@shippo.com", "phone": "+1-555-999-8888", "address_line_1": "731 MARKET ST", "address_line_2": "#200", "city_locality": "SAN FRANCISCO", "state_province": "CA", "postal_code": "94103", "country_code": "US" } ``` ## Try Address Parser Use this demo to learn about the Shippo Address Parser. This demo takes an address as an input, and then displays the response from the Address Parser method as visualized content and as a JSON object. # Address validation Source: https://docs.goshippo.com/address-api/address-validate Validate shipping addresses with the Shippo API to prevent failed deliveries and correction surcharges. Address validation is a service that tests your address to check if it is valid. By checking for invalid addresses and instantly correcting them to ensure accurate addresses, this helps prevent failed deliveries and address correction surcharges and allows you to protect your bottom line. You can have customers validate addresses through the Addresses API during checkout or you can validate addresses while you are creating labels. The returned results include a `validation_result` that indicates if the address is valid. If the validation identifies changes needed in order to make your address valid, the API response recommends a new address in `recommended_address`. ## Using address validation If you are interested in using Shippo’s Address Validation API or have any questions about pricing, please [contact our sales team](https://goshippo.com/contact/sales). ## Validate an address To validate an address, follow this example. ```json cURL theme={null} curl -i -X GET \ 'https://api.goshippo.com/v2/addresses/validate?address_line_1=320J Outerbelt Street&city_locality=Columbus&state_province=OH&postal_code=43213&country_code=US&organization=Shippo' \ -H 'Authorization: ShippoToken ' ``` ```json Validate address response theme={null} { "original_address": { "address_line_1": "320J Outerbelt Street", "city_locality": "Columbus", "state_province": "OH", "postal_code": "43213", "country_code": "US", "organization": "Shippo" }, "recommended_address": { "address_line_1": "320 Outerbelt St", "address_line_2": "Ste J", "city_locality": "Columbus", "state_province": "OH", "postal_code": "43213", "country_code": "US", "organization": "Shippo", "complete_address": "Shippo; 320 Outerbelt St Ste J; Columbus OH 43213-1537; US", "confidence_result": { "score": "high", "code": "postal_data_match", "description": "The address has been completely verified to the most granular level possible." } }, "analysis": { "validation_result": { "value": "partially_valid", "reasons": [ { "code": "address_abbreviation_fixed", "description": "Address inputted was standardized for abbreviations according to postal authority rules." } ] }, "address_type": "commercial", "changed_attributes": [ "address_line_2", "address_line_1" ] }, "geo": { "latitude": 39.98725, "longitude": -82.83042 } } ```
## Try address validation Try our Address Validation API using any example address from the dropdown below. You can find the breakdown of the address validation result, and the raw API response as a JSON object. ## Migrate address validation If you use the [legacy Shippo validation](/addresses/address-validation), you may choose to update your integration to use the latest Addresses API. Use this guide to understand what has changed and what you need to do to use the latest version. The legacy address validation supported two methods for address validation. 1. When [creating a new address object](/addresses/address-validation#how-to-validate-addresses) using the `validate` option. 2. Validating [existing Address objects](/addresses/address-validation#validate-existing-address-objects). The latest Address API validation does not support validating addresses using the object ID of an address. The changes are as follows. step 1 icon Address fields are passed as query parameters instead of fields in the body of the request. ```shell Address V2 validation theme={null} curl -i -X GET \ 'https://api.goshippo.com/v2/addresses/validate?address_line_1=215 Clayton St&city_locality=San Francisco&state_province=CA&postal_code=94117&country_code=US&organization=Shippo' \ -H 'Authorization: ShippoToken ' ``` ```shell legacy Address validation theme={null} curl -i https://api.goshippo.com/addresses/\ -H "Authorization: ShippoToken "\ -d company="Shippo"\ -d street1="215 Clayton St."\ -d city="San Francisco"\ -d state="CA"\ -d zip=94117\ -d country="US"\ -d validate=true ``` step 2 icon The path must be prefixed with `/v2`. ```shell Address V2 theme={null} https://api.goshippo.com/v2/addresses/ ``` ```shell legacy Address theme={null} https://api.goshippo.com/addresses/ ``` step 3 icon The returned response includes a richer details about the validated address including the following. * A `recommended_address`. * A `confidence_result` with a `score` and `description` describing the quality of the recommended address. * `analysis` that includes details about the validation. * `changed_attributes` that lists which values changed between the `original_address` and the `recommended_address`. ```json Address V2 response theme={null} { "original_address": { "address_line_1": "965 Mission St # 572", "address_line_2": "#200", "city_locality": "San Francisco", "state_province": "CA", "postal_code": "94103-2921", "country_code": "US", "name": "Mr. Hippo" }, "analysis": { "validation_result": { "value": "valid", "reasons": [ { "code": "address_found", "description": "The entire address is present in the database." } ] }, "address_type": "commercial" }, "geo": { "latitude": 37.78152, "longitude": -122.40786 } } ``` ```json legacy Address response theme={null} { "object_created": "2024-02-15T16:04:06.649Z", "object_updated": "2024-02-15T16:04:06.674Z", "object_id": "3af6fd3321c3468caeb5cf6d5545de36", "is_complete": true, "validation_results": { "is_valid": true, "messages": [ { "source": "Shippo Address Validator", "code": "Default Match", "type": "address_warning", "text": "More information, such as an apartment or suite number, may give a more specific address." } ] }, "object_owner": "adrian.collins@goshippo.com", "name": "Mr Hippo", "company": "", "street_no": "", "street1": "965 Mission St # 572", "street2": "", "street3": "", "city": "San Francisco", "state": "CA", "zip": "94103-2921", "country": "US", "longitude": -122.40786, "latitude": 37.78152, "phone": "4151234567", "email": "mrhippo@goshippo.com", "is_residential": false, "metadata": "", "test": true } ``` step 4 icon The returned address is not stored. step 5 icon The following fields have changed. | V1 Address Field | V2 Address Field | Notes | | --------------------------- | ---------------- | ------------------------------ | | \*\* Deprecated Fields \*\* | | | | is\_complete | | | | object\_created | | | | object\_updated | | | | object\_id | | | | object\_owner | | | | street\_no | | | | street3 | | | | phone | | | | email | | | | test | | | | validation\_results | | Moved to analysis but modified | | metadata | | | | V1 Address Field | V2 Address Field | Notes | | ----------------------------------------------------------- | ---------------- | ----- | | \*\* original\_address \*\*, \*\* recommended\_address \*\* | | | | name | name | | | company | organization | | | street1 | address\_line\_1 | | | street2 | address\_line\_2 | | | city | city\_locality | | | state | state\_province | | | zip | postal\_code | | | country | country\_code | | | V1 Address Field | V2 Address Field | Notes | | ------------------------------------------------------------------------------------------------------- | ------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | \*\* recommended\_address (exclusive fields) \*\* | | | | \*\* recommended\_address is present if we believe there is a more accurate version of the address \*\* | | | | | complete\_address | The full address in one string whenever available | | | confidence\_result | Contains the score field which takes values of high, medium, low; contains the code field which is the machine readable explanation to the score; and the description field which is the human friendly explanation to the score. | | V1 Address Field | V2 Address Field | Notes | | ----------------------------- | --------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | \*\* analysis \*\* | | | | is\_residential | address\_type | changed from boolean to an enum. `residential`, `commercial`, `unknown`, `po_box`, `military` | | validation\_results | validation\_results | changed from boolean to an object. | | validation\_results.is\_valid | validation\_results.value | Changed from Bool to enum. `valid`, `partially_valid`, `invalid` | | validation\_results.messages | validation\_results.reasons | Each reason is an object containing the code and the description. The code is the machine readable explanation to why the address is valid, partially valid, or invalid. And the description is the human friendly value for the same. | | | changed\_attributes | list of fields changed in the recommended address from the original address. | | V1 Address Field | V2 Address Field | Notes | | ---------------- | ---------------- | ----- | | \*\* geo \*\* | | | | | latitude | | | | longitude | | # Address validation Source: https://docs.goshippo.com/addresses/address-validation Validate addresses before creating labels using the Shippo API to avoid failed deliveries and surcharges. To prevent failed deliveries and address correction surcharges, validate your addresses through our API before you create labels. ## Address validation logic The Shippo address validation method verifies an Address by checking whether we have a matching verified deliverable address. The following results are possible: * **Address is valid**: The source address is valid and unique. The API will return a new, cleaned address object with the `validation_results` object's field `is_valid` is set to `true`. * **Address is invalid**: The address validator has processed the address, but could not find a match. There are three possible reasons: (1) the address doesn't exist, (2) the address isn't deliverable, or (3) the address is too ambiguous. The API will return a new address object with the `validation_results` object's `is_valid` field set to `false`. The API also returns messages indicating why the validation failed. It is also worth noting that if the address object you created is missing information necessary for creating a shipment, the `is_complete` field will be `false`. The address validator also returns whether the address is residential or commercial via the `is_residential` flag. If the residential/commercial type could not be determined, the value will be null. ## How to validate addresses Validating addresses is easy. In your Address POST request, add a field `validate` set to `true`: **Request:** ```shell cURL theme={null} curl https://api.goshippo.com/addresses/\ -H "Authorization: ShippoToken "\ -d name="Shawn Ippotle"\ -d company="Shippo"\ -d street1="215 Clayton St."\ -d city="San Francisco"\ -d state="CA"\ -d zip=94117\ -d country="US"\ -d email="shippotle@shippo.com"\ -d validate=true ``` ```python Python theme={null} shippo_sdk.addresses.create( components.AddressCreateRequest( name="Shawn Ippotle", company="Shippo", street1="215 Clayton St.", city="San Francisco", state="CA", zip="94117", country="US", email="shippotle@shippo.com", validate = True ) ) ``` ```php PHP theme={null} $fromAddress = Shippo_Address::create( array( "name" => "Shawn Ippotle", "company" => "Shippo", "street1" => "215 Clayton St.", "city" => "San Francisco", "state" => "CA", "zip" => "94117", "country" => "US", "email" => "shippotle@shippo.com", "validate" => true )); ``` ```typescript TypeScript theme={null} const address = await shippo.addresses.create({ name: "Shawn Ippotle", company: "Shippo", street1: "215 Clayton St.", city: "San Francisco", state: "CA", zip: "94117", country: "US", email: "shippotle@shippo.com", validate: true }); ``` ```java Java theme={null} HashMap addressMap = new HashMap(); addressMap.put("name", "Mr. Hippo"); addressMap.put("company", "Shippo"); addressMap.put("street1", "215 Clayton St."); addressMap.put("city", "San Francisco"); addressMap.put("state", "CA"); addressMap.put("zip", "94117"); addressMap.put("country", "US"); addressMap.put("phone", "+1 555 341 9393"); addressMap.put("email", "support@goshipppo.com"); addressMap.put("validate", "true"); Address createAddress = Address.create(addressMap); ``` ```csharp C# theme={null} Address address = await sdk.Addresses.CreateAsync( new AddressCreateRequest() { Name = "Shawn Ippotle", Company = "Shippo", Street1 = "215 Clayton St.", City = "San Francisco", State = "CA", Zip = "94117", Country = "US", Email = "shippotle@shippo.com", Validate = true, } ); ``` You will get a response in the following format: **Response:** ```json theme={null} { "object_created": "2015-03-30T23:47:11.574Z", "object_updated": "2015-03-30T23:47:11.596Z", "object_id": "67183b2e81e9421f894bfbcdc4236b16", "is_complete": false, "validation_results": { "is_valid": false, "messages": [ { "source": "USPS", "code": "Address Not Found", "type": "address_error", "text": "The address as submitted could not be found. Please check for excessive abbreviations in the street address line or in the City name." } ] }, "object_owner": "shippotle@shippo.com", "name": "Shawn Ippotle", "company": "Shippo", "street_no": "", "street1": "215 HIPPO ST.", "street2": "", "city": "SAN FRANCISCO", "state": "CA", "zip": "94107", "country": "US", "phone": "", } ``` ## Validate existing Address objects To validate existing addresses, simply make a GET request to the validate endpoint at ``` https://api.goshippo.com/addresses//validate/ ``` For example: ```shell cURL theme={null} curl https://api.goshippo.com/addresses/d799c2679e644279b59fe661ac8fa488/validate/\ -H "Authorization: ShippoToken " ``` ```python Python theme={null} shippo_sdk.addresses.validate('d799c2679e644279b59fe661ac8fa488') ``` ```php PHP theme={null} Shippo_Address::validate('d799c2679e644279b59fe661ac8fa488'); ``` ```typescript TypeScript theme={null} shippo.addresses.validate("d799c2679e644279b59fe661ac8fa488") ``` ```java Java theme={null} Address.validate("d799c2679e644279b59fe661ac8fa488"); ``` ```csharp C# theme={null} await sdk.Addresses.ValidateAsync("d799c2679e644279b59fe661ac8fa488"); ``` This call returns the same response JSON as the sample response above. *** ## Global address validation The way to validate global addresses (non-U.S.) would operate the same as U.S. addresses. The key difference that you'll notice is in the response that you get back. Global address validation has additional messages for specifying the precision of the address that is returned (i.e. street level, neighborhood level, state level, rooftop level, etc.). If you attempt to validate a non-U.S. address using your Test API token, we will simply pass back the address information without performing any validation. Please be aware that if you simply switch from using your Test token to using your Live token, you *will* incur charges for using your Live token for validating Global addresses. **Response:** ```json theme={null} { "object_created": "2017-07-26T17:52:37.305Z", "object_updated": "2017-07-26T17:52:37.351Z", "object_id": "b7f9709df3914d1ca6efe4c30e7b0572", "is_complete": true, "validation_results": { "is_valid": true, "messages": [ { "source": "Shippo Address Validator", "type": "address_correction", "code": "administrative_area_change", "text": "The administrative area (state or province) was added or changed." }, { "source": "Shippo Address Validator", "code": "geocoded_rooftop", "text": "The record was geocoded down to rooftop level, meaning the point is within the property boundaries (most often the center)." }, { "source": "Shippo Address Validator", "code": "premises_full", "text": "The address has been verified to the Premise (House or Building) Level, which is the highest level possible with the reference data." } ] }, "object_owner": "hippo@shippo.com", "name": "Hippo Shippo", "company": "Shippo", "street_no": "2", "street1": "Unter den Linden", "street2": "", "street3": "", "city": "Berlin", "state": "", "zip": "10117", "country": "DE", "longitude": "13.39751", "latitude": "52.51785", "phone": "14151234567", "email": "hippo@shippo.com", "is_residential": null, "metadata": "", "test": false } ``` ### Messages The messaging structure for global addresses will give details about what was changed and the specificity of your results. You will find these messages in the `messages` field which is an array comprised of all messages returned in processing your address validation request. * **type**: this field contains a token that you can use for understanding the type of message that was created. Below is a comprehensive list of the message types that can be returned: * address\_error * address\_warning * address\_correction * geocode\_level * geocode\_error * service\_error * **code**: the code further specifies the type of warning, error or message. Some examples are: * administrative\_area\_change * geocoded\_rooftop * premises\_full * **text**: this field contains a text description of the message. Below are some examples of the text that will accompany the above message codes. * *The address could not be verified at least up to the postal code level.* * *Street could not be matched to a unique street name. Please add more details to the street name.* * *The address matched multiple records, please enter more information to locate a unique address.* * **source**: this field describes where the message is coming from, which is always set to"Shippo Address Validator". ```json theme={null} { ... "is_complete": true, "validation_results": { "is_valid": true, "messages": [ { "source": "Shippo Address Validator", "type": "address_correction", "code": "administrative_area_change", "text": "The administrative area (state or province) was added or changed." }, { "source": "Shippo Address Validator", "type": "geocode_level", "code": "geocoded_rooftop", "text": "The record was geocoded down to rooftop level, meaning the point is within the property boundaries (most often the center)." }, { "source": "Shippo Address Validator", "type": "address_warning", "code": "premises_full", "text": "The address has been verified to the Premise (House or Building) Level, which is the highest level possible with the reference data." } ] }, "object_owner": "hippo@shippo.com", ... } ``` *** ## Bypass address validation for label purchase When purchasing shipping labels you can bypass the carrier's built-in address validation of some carriers by setting the Shipment object's `extra` field `bypass_address_validation` to `true`: ```json theme={null} { /* insert other required shipment fields */ "extra": { "bypass_address_validation": true } } ``` # Shippo API release notes Source: https://docs.goshippo.com/api-concepts/api-change-log Track backwards-compatible and backwards-incompatible changes in each Shippo API version release. We will be documenting all backwards-incompatible and backwards-compatible changes associated with each new API version here. [Learn more about how Shippo API versioning works and upgrade to the latest.](/api-concepts/api-versioning) **Note** To learn about updates to Shippo Elements view the [Shippo Elements release notes](/shipping-elements/elements-change-log). ## Version 2018-02-08 ### Jul 23 2026 Minor: The Shippo MCP server is now listed in [Claude's connector directory](https://claude.ai/directory/connectors/shippo) and [ChatGPT's app directory](https://chatgpt.com/plugins/plugin_asdk_app_6a3be8ce7d0c81918cb8bcc8f6d0008e), so in Claude (claude.ai and Claude Desktop) and in ChatGPT you can add Shippo from the directory in one click and sign in with your Shippo account; there is no API key to manage. See the [MCP Server guide](/guides/mcp-server). ### Jul 16 2026 Minor: For MCP clients that can only launch local (stdio) servers, we published [`@shippo/shippo-mcp`](https://www.npmjs.com/package/@shippo/shippo-mcp) v3, a thin local bridge to the hosted Shippo MCP server. It signs you in with OAuth in your browser; there is no API key to manage. See the [MCP Server guide](/guides/mcp-server). ### Jul 10 2026 Minor: The Shippo MCP server is now listed in the official [MCP Registry](https://registry.modelcontextprotocol.io/) as `com.shippo/shippo-mcp`, so MCP clients with registry-based discovery can find and add it by name. ### Jun 24 2026 Patch: FedEx rate responses now correctly return both the standard rate and the FedEx One Rate variant for eligible service levels, distinguishable via `servicelevel.terms: "ONERATE"` sharing the same `servicelevel.token` as the standard rate. See [Carrier capabilities: FedEx](/carriers/carrier-capabilities#fedex). ### Jun 4 2026 Minor: Shippo now offers a hosted MCP (Model Context Protocol) server at `https://mcp.shippo.com`. Connect AI assistants such as Claude, ChatGPT, and Cursor to your Shippo account to compare rates, buy labels, track packages, and validate addresses in natural language. Sign in with your Shippo account; there is no API key to manage. See the [MCP Server guide](/guides/mcp-server). ### Apr 7 2026 Minor: We've removed CDL from our list of supported carriers. ### Apr 6 2026 Minor: Shipment and Rate objects are now only retrievable for up to 390 days after creation. This applies to the following endpoints: * [`GET /shipments`](/api-reference/shipments/list-all-shipments) * [`GET /shipments/{ShipmentId}`](/api-reference/shipments/retrieve-a-shipment) * [`GET /shipments/{ShipmentId}/rates`](/api-reference/rates/retrieve-shipment-rates) * [`GET /rates/{RateId}`](/api-reference/rates/retrieve-a-rate) ### Mar 5 2026 Minor: The Shippo API now supports `include_package_details` as an optional boolean parameter in the Tracking `POST` request to return carrier-provided `weight` and `dimensions` in tracking responses for UPS and FedEx. See [Including package details](/tracking/tracking#including-package-details). ### Mar 4 2026 Minor: To support the new multi-factor verification flow for FedEx accounts, we created a new field on the `GET /carrier_accounts` endpoint to indicate if the verification process is required or not. Review the [List Carrier Accounts](/api-reference/carrier-accounts/list-all-carrier-accounts) documentation for more details ### Mar 2 2026 Minor: ETA field for USPS tracking now uses USPS's Predicted Delivery Date as a fallback to the current Expected Delivery Date. This changes only the source of the ETA for USPS deliveries and has no impact on the API schema. ### Jan 19 2026 Minor: We've removed Sendle from our list of supported carriers. ### Jan 13 2026 Minor: Existing FedEx BYOA account users need to re-register their accounts before 3/31, or their label purchases may be disrupted. See our [FedEx Reconnecting Your Account Guide](/carriers/fed-ex-reconnecting-account) for step-by-step instructions. ### April 30 2025 Minor: We've enabled Windsor Framework to handle shipments from Great Britain to Northern Ireland as international shipments. ### Feb 19 2025 Minor: We've enabled Ground Plus and Premium Economy service levels for Veho ### Jan 14 2025 Patch: If the shipment was lost and its delivery failed we expect carriers to conduct an investigation in some cases and provide more tracking history events in case they are able to recover the shipment. ### Dec 17 2024 Minor: We've removed CouriersPlease from our list of supported carriers. ### Dec 16 2024 Minor: Switzerland are changing their requirements for shipping into the country. For more details, see [our guide](/international-shipping/international-shipping#shipping-to-switzerland-ch). ### Nov 26 2024 Minor: We've removed OrangeDS from our list of supported carriers. ### Oct 17 2024 Patch: Australia Post eParcel rate requests no longer filter out service levels with optional signature confirmation when the user does not explicitly request signature confirmation. ### Oct 8 2024 We have added an automated email to inform you when your [Pro Plan](https://support.goshippo.com/hc/en-us/articles/360003855652-Shippo-Subscription-Plan-Overview#h_01HNGBRQ4NXCKXWMCYQSQHC666) Free Trials start and expire. ### Sep 12 2024 Minor: On `Sep 16 at 00:00:00 CDT` we will enable CeC NSA account holders whose USPS rates are based on Merchant Rate Cards (MRC) to charge Commercial Plus Pricing (CPP) rates. They will receive Rural Partner Rate Cards (PRC) for a limited list of destination zip codes. ### Sep 11 2024 Minor: We've enabled Fedex Home Delivery® service level for Shippo's Fedex account. ### Sep 9 2024 Patch: We've fixed an issue where certain address `street2` formats were not printed on labels. ### Aug 29 2024 Patch: We've fixed an issue where some UPS tracking histories contained premature `delivered` events. ### Aug 15 2024 Patch: We have fixed an issue where tracking invoice item descriptions were incorrectly displaying "International address validation fee" ### Aug 13 2024 Minor: We've removed Parcel and Yodel from our list of supported carriers. ### Aug 7 2024 Patch: We have resolved an issue where logged-in users without a saved payment method could become stuck during partner-initiated OAuth authorization requests. ### Aug 5 2024 Minor: We've updated the Shippo API to support parcel tracking for a large number of carriers previously unsupported. See our [guide for details](/tracking/tracking-carrier). ### Jul 30 2024 Patch: We've removed a step in label purchase which prompted users to add a new payment method if they had unpaid invoices. ### Jul 15 2024 Minor: We've removed Maergo from our list of supported carriers. ### Jun 25 2024 Minor: We've added support for the Sendle drop off service. ### Jun 24 2024 Patch: Previously, when you purchased a shipping label through Shippo, the [tracking status](/api-reference/tracking-status/get-a-tracking-status) for that shipment would start with `UNKNOWN`. We've updated our tracking life cycle to start with `PRE_TRANSIT`. Review our [definitions of tracking events](/tracking/tracking#event-definitions) for more details. ### Jun 14 2024 Minor: The carrier AxleHire has changed its name to Jitsu. We have updated our guides to reflect this new name. To support our existing customers already using this carrier, we will continue to use the `axlehire` token. ### Jun 10 2024 Minor: As part of our continuing work to improve our SDKs, we've release a new [C# SDK for the Shippo API](/guides/client-libraries#c). ### May 10 2024 Minor: We've updated our UPS integration to include more label reference fields for ZPL II labels. See our [carrier reference fields](/carriers/carrier-reference-fields#add-additional-details-to-a-ups-label) guide for more details. ### Apr 30 2024 Minor: We've further increased the number of parcels you can send in a multi-piece shipment for UPS up to 200 parcels. Read our [multi-piece shipping guide](/shipments/multi-piece-shipment#create-an-extended-multi-piece-shipment) for more details. ### Apr 29 2024 Patch: We've made updates our [address validation](/api-reference/addresses/validate-an-address) process to improve how we classify the response. Now, the returned `validation_results` provide clearer `text` descriptions, helping you identify and correct any issues with an address. ### Apr 24 2024 Minor: We've increased the number of parcels you can send in a multi-piece shipment for UPS. Read our [multi-piece shipping guide](/shipments/multi-piece-shipment#create-a-multi-piece-shipment) for more details. ### Apr 24 2024 Minor: We've release a new [Javascript SDK for the Shippo API](/guides/client-libraries#nodejs). ### Apr 9 2024 Minor: In the future UPS will require users to use OAuth to authorize Shippo to perform some actions, like requesting rates or buying labels, on your behalf. To support this, we have created a new endpoint `carriers/{carrier_account_id}/signin/initiate` that directs a user to an OAuth flow. Review our [Carrier authorization using OAuth](/carriers/carrier-o-auth) guide for more details. ### Apr 8 2024 Minor: We've updated the Shippo API to support our new policy for automatically refunding unused USPS labels. From now on, we will no longer automatically refund unused USPS labels. You must create a request to receive a refund for unused labels. See our [Refunding labels](/billing-and-invoices/refunding-labels) guide for more information. ### Apr 1 2024 Minor: We are updating our API SDKs. As part of this work, we've released a [Python SDK for the Shippo API](/guides/client-libraries#python). ### Mar 1 2024 Minor: Our shipping insurance provider, XCover, have updated their terms. For shipments originating from the US, XCover now has a 25% deductible for Jewelry/Watches, Antiques/Artwork, and Glassware/Ceramics. See our [guide](/shipments/shipping-insurance#insurance-for-single-package-shipments-using-xcover) for details. ### Feb 28 2024 Minor: We’ve add support for the carrier [Veho](/carriers/carrier-capabilities#veho). ### Dec 8 2023 Minor: We've added support for A5 PDF labels for [Australia Post](/carriers/carrier-capabilities#australia-post) shipments. ### Aug 31 2023 Minor: We have added [XCover](https://www.xcover.com/en-us/help/partners/shippo) as our new insurance provider. To add XCover insurance to your packages, follow our [Shipping insurance](/shipments/shipping-insurance) guide. ### Aug 18 2023 Minor: We've updated our API to improve the accuracy of the time in transit information for all domestic USPS shipping rates. ### Jul 31 2023 Minor: FedEx have retired their Collect on Delivery (COD) service for FedEx Express and FedEx Ground COD service for shipments within and to the US from Canada. Now, when you create a shipment in the Shippo API and [include the option for COD](/api-reference/shipments/list-all-shipments), the rates returned will not include rates from FedEx. ### Jul 9 2023 Minor: We've added a new service level token to enable [USPS Ground Advantage](https://www.usps.com/ship/ground-advantage.htm). To use USPS Ground Advantage, use the token `usps_ground_advantage`. See the full list of [service tokens in our reference guide](/api-reference/service-groups/list-all-service-groups) for more information. ### Jun 15 2023 Minor: Hazardous materials or hazmat are items that can cause harm to people. When shipping with USPS, you must declare if your parcel contains hazmat items. To support our users compliance shipping hazmat items with USPS, we've added the `dangerous_goods` field to our `shipments`. See our [hazmat guide](/shipments/hazmat) for more details. ### Mar 10 2023 Minor: In the [Shipment Extras](/api-reference/shipments/list-all-shipments) object, we've added new fields to support FedEx labels. Shipment Extras now includes the fields `customer_reference`, `po_number`, `invoice_number`, `dept_number`, and `rma_number`. ### Apr 25 2023 Minor: We've added [Platform Accounts](/platform-accounts/platform-accounts) to our API. Using a Platform Account, you can create and control Managed Shippo Accounts. Managed Shippo Accounts are headless accounts that are typically used by Marketplaces, e-commerce platforms, and third-party logistics. Using a Platform Account, you can make requests to the Shippo API on behalf of your Managed Accounts. Use Shippo Platform Accounts to create a shipping experience that is seamless to your end customers. ### Dec 14 2022 Minor: You can now use QR codes for UPS. Generated QR codes can be brought to a carrier location to print labels for outbound and return shipments. ### Dec 9 2022 Minor: We’ve added support for insuring DHL eCommerce packages using our insurance provider, Shipsurance. ### Dec 7 2022 Patch: Previously, for Australia Post, some ZPL formatted labels were formatted incorrectly. We’ve fixed this formatting issue. ### Nov 23 2022 Patch: For Australia Post, some customers received this error message "The carrier API timed out. Please try again. If this error persists please contact support.". We have resolved this issue. ### Nov 17 2022 Minor: We’ve added the option to include the IOSS number for DPD UK using the API carrier request call. ### Nov 16 2022 Minor: For the carrier APG, we’ve added support for the service level “APG eParcel Expedited". Patch: Previously, for some DPD packages, the status field would not be updated when the package was delivered. This has now been fixed. ### Nov 10 2022 Minor: FedEx has changed the names of it’s service Smartpost to Ground Economy. To support this we have added the service level token `fedex_ground_economy`. Any request made using the old token, `fedex_smart_post`, will be given the Ground Economy service level. Minor: We have removed support for GLS DE and GLS FR. ### Nov 8 2022 Minor: For the carrier LaserShip, we’ve added support for users to define the critical\_pull\_time HH:MM format in carrier account parameters. ### Nov 2 2022 Patch: We’ve fixed an issue where the Orders endpoint was failing to update for batch entry. ### Oct 25 2022 Minor: We’ve add support for the carrier Better Trucks. Minor: For Evri, we’ve updated our tracking URL for Evri from the old Hermes UK URL. Patch: We’ve improved our error code reporting for Lasership. ### Oct 19 2022 Minor: For APG, we’ve added support additional service of Destroy for undeliverable packages. ### Sep 28 2022 Patch: We fixed an issue with the carrier APG that required a “state” in the address object. Minor: For Evri, we’ve added Puerto Rico (PR) and Virgin Islands US (VI) as destination countries for parcelshop drop off service level Patch: We’ve added a fix that removes special characters in post codes for DPD UK. Minor: We’ve added Shippo carrier accounts for Post IT and Mondial. You can now use these carriers with the Shippo account. ### Sep 27 2022 Minor: We’ve added support for the carrier DPD DE. ### Sep 21 2022 Patch: For the carrier Evri we’ve fixed the issue causing the error message "Content Values do not add up to Parcel Value". ### Sep 15 2022 Minor: We’ve added Shippo carrier accounts for Chronopost. You can now use these carriers using the Shippo account. ### Sep 13 2022 Minor: We’ve add the carrier UDS to our list of supported carriers. ### Sep 9 2022 Minor: We’ve added support for our Canadian users to access the Shippo UPS account. This means that Shippo customers in Canada can benefit from the great rates we’ve negotiated with UPS. ### Sep 8 2022 Minor: We now support test mode for the carrier Swyft. ### Sep 1 2022 Minor: Previously we supported Evri only for domestic shipments. Now, we support Evri deliveries to European and the rest of the world from the UK. Minor: We now support test mode for the carrier UDS. ### Jun 21 2022 Minor: The carrier Poste Italiane is now supported in the Shippo API. ### Jun 20 2022 Minor: We’ve added the carriers APG and Correos to our list of supported carriers. ### May 13 2022 Minor: The carrier Chronopost is now supported in the Shippo API. ### May 10 2022 Minor: Shippo’s customs now support Merchant Tax ID/VAT for international shipments. ### May 7th 2022 Minor: Shippo’s customs now support the EORI number for shipments to/from the EU & UK. ### Mar 2nd 2022 Minor: The carrier Colissimo is now part of list of supported carriers. ### Jan 14th 2022 Minor: We’ve added X Delivery to list of supported carriers ### Dec 14th 2021 Minor: You can now use the carrier DPD UK in the Shippo API ### July 28th 2021 Minor: We’ve added Royal Mail to our list of supported carriers. ### Jul 15th 2022 Minor: Our Customs Declaration object now includes the field `is_vat_collected`. You can use this field to indicate whether the shipment’s destination VAT has been collected. This is required for some destinations. ### Jun 16th 2022 Patch: We’ve fixed a bug to ensure only valid service levels are returned when getting shipping rates. ### Dec 10th 2021 Minor: Previously, when calling our list parcels endpoint, you might have received a very long list of results. To help, we’ve added pagination to help control the results you see. ### Aug 17 2021 Minor: We’ve added `extended_token` and `parent_servicelevel` fields to our Rates object. These fields give you clearer insight into specific service levels quoted in a Rate. Some service levels, like those for UPS, are grouped, and are represented by a generic token. For example, the token `ups_expedited` represents service levels including `ups_expedited_ca` and `ups_expedited_eu`. In this example, `parent_servicelevel` would return `ups_expedited`. `Extended_token` could return one of `ups_expedited_ca` and `ups_expedited_eu`. ### May 10 2021 Minor: The carrier GLS US is now supported in our API. ### Apr 9 2021 Minor: In customs declarations, you can now add a tax identification number and Employer Identification Number. These are required for some international shipment. ### Sep 10 2020 Minor: To aid international shipments, we’ve added some new customs fields. In our customs declarations, we’ve added the fields to support B13A. We’ve also added fields in our customs items to support ECCN. ### Aug 7 2020 Minor: We’ve added support for the carrier PCF to our API. ### July 30 2020 Minor: We’ve added a field for qr codes to the Transaction object. If supported by the carrier, the `qr_code_url` will contain a link to a QR code image. ### Apr 4 2020 Minor: We’ve added the carrier OrangeDS to our list of supported carriers. ### Feb 24 2020 Minor: You can use the carrier LSO to ship packages using our API. ### May 10 2019 Minor: The Shipment object now includes the field `alternate_address_to` that you can use to set an alternate delivery address. ### Apr 24 2019 Minor: The Customs Declaration object now includes a `duty_payor` field. Using this field you can define who is paying for the duties of international shipments. This is required by some carriers. ### Dec 19th 2018 Minor: We’ve added support for the carrier CDL to our API. ### Oct 19 2018 Minor: We’ve added AxleHire to our list of supported carriers. ### Sept 5 2018 Minor: We’ve added a new `validation_status` field ot our Orders endpoint. Now, when you retrieve an Order, you will get an `validation_status` parameter to show if the created Order object is `pending`, `valid`, or `invalid`. ### Aug 28 2018 Minor: We’ve added an error field to our Orders endpoint. Now, when you retrieve an Order, you will get an “error” parameter that includes any error messages associated with your Order object. ### Apr 13 2018 Minor: For security reasons, the `account_id` and `parameters` fields will be censored in the response objects for Carrier Accounts. ### Mar 19 2018 Minor: We’ve added Globegistics to our list of supported carriers. ### Feb 15 2018 Minor: We've added support for the carrier CouriersPlease to our API. ### Jan 22 2018 Minor: You can use the carrier Sendle to ship packages using our API. ### 8 Feb 2018 Minor: PRE\_TRANSIT will be added to the list of possible values in `status`. Minor: PRE\_TRANSIT will be added to the list of possible values in `status` and `tracking_status` for `track_updated` and `transaction_updated` events, respectively. ## Version 2017-08-01 ### Webhooks `Shippo-API-Version` will be included in the headers of all webhook responses to indicate the api version being used. New events have been added to our webhooks: * `transaction_updated` -- will be triggered when a transaction in your account is updated, and will provide the updated transaction. * `transaction_created` -- will be triggered when a transaction in your account is created, and will provide the updated transaction. A new fields have been added in the body of the webhook payload: * `event_type` will have one of the following values: `transaction_created`, `transaction_updated`, `track_updated`, `batch_created`, or `batch_updated`. Please see our [Webhooks](/tracking/webhooks) tutorials for examples of using these new fields and events. ### All Endpoints The `count` field has been removed. If making a GET request to any endpoint without an `object_id` specified in the URI (i.e. /transactions, /shipments, /addresses) you will no longer see the `count` field in the body of the response. ### Rates In rate objects, the `days` field has been renamed to `estimated_days` to make it clear that this is an estimate. ### Transactions The `tracking_history` field has been deprecated from the Transactions object. The Transactions object will still have the most recent `tracking_status` on it, but to get a full tracking history, you would need to subscribe a[webhook](/tracking/webhooks) to the `tracking_update` event or query the [Tracks](/api-reference/tracking-status/get-a-tracking-status) endpoint. ## Version 2017-03-29 ### Major Update: Refactored and Deprecated Fields In this API version, we've cleaned up many stale attributes across various endpoints in the API to make them more intuitive and true to operational use cases. Please explore the following to see if any changes will affect your implementation. The changes to our Shipments endpoint for [returns](/shipments/returns) now makes it possible to create return labels without having to reference a previous transaction. Changes have been made to the following endpoints: [Addresses](/api-reference/addresses/list-all-addresses), [Shipments](/api-reference/shipments/list-all-shipments), [Rates](/api-reference/rates/retrieve-a-rate), [Transactions](/api-reference/transactions/list-all-shipping-labels), [Batches](/api-reference/batches/create-a-batch), and [Refunds](/api-reference/refunds/list-all-refunds). For more detailed information, please see the [full API references](/api-reference/addresses/list-all-addresses). ### Addresses Request: * Deprecated: * `object_purpose` Response: * Deprecated: * `ip` * `object_purpose` * `object_state` * `object_source` * Added: * `is_complete` --- boolean used to indicate if an address is fully entered, making it possible to use for purchasing a label. * `validation_results` --- 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). * Updated: * `messages` has been moved into new `validation_results` field. ### Shipments Request: * Deprecated: * `object_purpose` * Updated: * `submission_date` is now `shipment_date` * `return_of` is now `is_return`, also has been changed to a boolean and is no longer a top-level key and has been moved into extra field. This will flag a shipment to be created as a scan-based label. * `object_status` is now `status` * `insurance_amount` is now `amount`, moved into newly added`insurance` field inside `extra`object. * `insurance_currency` is now `currency`, moved into newly added `insurance` field inside `extra` object. * `insurance_provider` is now `provider`, moved into newly added `insurance` field. * `insurance_content` is now `content`, moved into newly added `insurance` field. * `reference_1` & `reference_2` moved to `extra` field. * `parcel` is now `parcels` and has been changed to an array. * Added: * `insurance`, an object within the `extra` object with previous top level and `extra` level insurance fields as keys of the `insurance` object. Response: * Deprecated: * `object_state` * `submission_type` * `object_purpose` * `rates_url` * Updated: * `rates_list` is now `rates` * `submission_date` is now `shipment_date` * `return_of` is now `is_return`, also has been changed to a boolean and is no longer a top-level key and has been moved into the `extra` field. This will set the shipment as a return shipment, which makes the label scan-based. See our docs on [Returns](/shipments/returns) for more information. * `object_status` is now `status` * `insurance_amount` is now `amount`, moved into newly added`insurance` field. * `insurance_currency` is now `currency`, moved into newly added `insurance` field. * `insurance_content` is now `content`, moved into newly added `insurance` field. * `insurance_provider` is now `provider`, moved into newly added `insurance` field. * `reference_1` & `reference_2` moved to `extra` field. * `address_to`,`address_from`, `address_return`, and `parcel` are now expanded to include full address or parcel information, in addition to their `object_id`. * `parcel` is now `parcels` and has been changed to an array. * Added: * `insurance`, an object within the `extra` object with previous insurance fields as keys of the `insurance` object. ### Rates Request: * Deprecated: * GET on /rates/ will no longer return a list of rates. GET on /rates/`{object_id}` will still work as indicated. Response: * Deprecated: * `object_state` * `object_purpose` * `object_updated` * `trackable` * `delivery_attempts` * `rates_url` * Updated: * `servicelevel_name`, `servicelevel_token`, and `servicelevel_terms` have been renamed to `name`, `token`, and `terms`(respectively) and moved into the newly created `servicelevel`field. * Added: * `servicelevel`, object that contains renamed fields: `name`, `token`, and `terms`(previously `servicelevel_name`, `servicelevel_token`, and `servicelevel_terms`) ### Transactions Response: * Deprecated: * `customs_note` * `submission_note` * Updated: * `object_state` is now `status` * `rate` field is expanded with full rate details for insta-label calls. ### Manifest Request: * Updated: * `submission_date` is now `shipment_date` Response: * Updated: * `submission_date` is now `shipment_date` ### Batches Response: * Updated: * `object_status` is now `status` ### Refunds Response: * Updated: * `object_status` is now `status` ### Parcel Request: * Updated: * `reference_1` and `reference_2` can be added in the `extra` field of Parcel for multi-parcel shipments. See [Multi-Piece Shipments](/shipments/multi-piece-shipment) for more information. ## Version 2016-10-25 ### Major Update: New Test Token used to set Shippo to test mode. You will now be able use all Shippo API functionalities from end-to-end in test mode by authenticating requests with a Test Token. Previously, to test out Shippo, you had to set carrier accounts to test mode. Now all users will have have two different tokens: one for test mode and one for live mode. [See our detailed documentation on Test Mode.](/guides/testing) ### For users continuing to use API version 2014-02-11 You will have the option of using the Test Token while remaining on the older version of the Shippo API. * Test Token can be used for test mode without affecting your existing implementation. See our [Test Mode documentation](/guides/testing) to learn more about functionalities. * Functionalities of your existing Private Auth Token will remain the same -- now renamed as "Live Token". * All tokens will now begin with `"shippo_live_"` or `"shippo_test_"`. This will not affect any existing implementation with old tokens, however we recommend using the new format going forward. ### For users upgrading to API version 2016-10-25 Using the Test Token and Live Token will affect how your test and live data are returned and displayed. Test and Live Data * When using the Test Token, you will only be able to create and request test data sets such as addresses, rates, and carriers etc. No live data can be requested or returned. * When using the Live Token, you will only be able to create and request live data. No test data can be requested or returned. * Shipment object will now return 3 variables for `test` * True -- All Rates returned in Shipment were tests * False -- All Rates returned in Shipment were live * None -- Rates returned in Shipment were both tests and live The following are some common scenarios. 1. If you create a Shipment with Live Token using an Address object created with a Test Token, you will receive a 404 response (not found). Vice versa is also true. If you retrieve an object\_id created in live mode with a Test Token, you will receive a 403 (bad request) response. 2. If you request a list of Transaction objects, or Shipment objects with the Test Token, only test Transactions or Shipments will be returned. Vice versa is also true, when making requests in live mode. Carrier account configuration When you upgrade to the latest version, the `test` attribute of the carrier object will become read-only. * User-owned carrier accounts (where you have plugged in your own carrier credentials) that have been set to `test: true` at the time of upgrade will only appear and work when request with a Test Token. * User-owned carrier accounts (where you have plugged in your own carrier credentials) that have been set to `test: false` at the time of upgrade will only appear and work when request with a Live Token. * Shippo-owned carrier accounts [(see carrier capabilities for full list)](/carriers/carrier-capabilities) object\_ids will appear and be functional when requested with a Test Token or a Live Token. We recommend setting all carrier accounts to `test: false` [(including on your dashboard)](https://goshippo.com/user/carriers/) before upgrading so that existing carrier accounts are set to live mode. This will help with minimizing changes necessary for the upgrade. "test" attribute Certain objects will now be returning a new `"test"` attribute. * Transaction object will no longer return the "was\_test" attribute, instead it will return "test". * Address, Parcel, Refund, Customs Declaration, and Customs Items objects will now return a new "test" attribute. * Possible values for "test": * True -- the object was created in test mode * False -- the object was created in live mode * Other objects (such as Carrier Accounts and Rates) will keep returning "test" if they did in past. # Expand response Source: https://docs.goshippo.com/api-concepts/api-expand Learn how to use the expand query parameter to include full object details in Shippo API responses. In some Shippo API responses, instead of returning parameters, the endpoint will return the object ID of the object that contains the parameters. This is available for a number of Shippo objects. For example, in the transaction response, the `rate` is returned as an object ID. The Shippo API is designed in this way to manage the size of the response. **Request:** ```shell Get a transaction theme={null} curl --location 'https://api.goshippo.com/transactions/3e294ad43f7e417889c3c3766df2589b' \ --header 'Authorization: ShippoToken ' \ --header 'Content-Type: application/json' ``` **Response:** ```json response sample theme={null} { "object_state": "VALID", "status": "SUCCESS", "object_created": "2024-04-23T16:03:01.881Z", "object_updated": "2024-04-23T16:03:04.906Z", "object_id": "3e294ad43f7e417889c3c3766df2589b", "object_owner": "mrhippo@goshippo.com", "test": true, "rate": "819282d7ec8d4b1db3d03bbf8f0e1a7d", "tracking_number": "EB000098472US", "tracking_status": "UNKNOWN", } ``` You can choose to expand an object using the query parameter `expand`. When you expand an object, the returned response includes the parameters in that object. **Request:** ```shell Get a transaction including expand request theme={null} curl --location 'https://api.goshippo.com/transactions/3e294ad43f7e417889c3c3766df2589b?expand="rate"' \ --header 'Authorization: ShippoToken ' \ --header 'Content-Type: application/json' ``` **Response:** ```json Get a transaction including expand response theme={null} { "object_state": "VALID", "status": "SUCCESS", "object_created": "2024-04-23T16:03:01.881Z", "object_updated": "2024-04-23T16:03:04.906Z", "object_id": "3e294ad43f7e417889c3c3766df2589b", "object_owner": "mrhippo@goshippo.com", "test": true, "rate": { "object_id": "819282d7ec8d4b1db3d03bbf8f0e1a7d", "amount": "76.66", "currency": "USD", "amount_local": "71.95", "currency_local": "EUR", "provider": "USPS", "servicelevel_name": "Priority Mail Express International", "servicelevel_token": "usps_priority_mail_express_international", "carrier_account": "b19e750708384303ac19ca693fe037ce" }, "tracking_number": "EB000098472US", "tracking_status": "UNKNOWN", } ``` You can choose to expand multiple objects together at once using an array. ```shell Get a transaction including expand multiple objects theme={null} curl --location 'https://api.goshippo.com/transactions/3e294ad43f7e417889c3c3766df2589b?expand=["rate","parcel"]' \ --header 'Authorization: ShippoToken ' \ --header 'Content-Type: application/json' ``` This method does not support recursion. # API objects Source: https://docs.goshippo.com/api-concepts/api-objects Understand how Shippo API objects and object IDs work, and learn how to create, retrieve, and use them. ## What is a Shippo API Object? Read this guide to understand how the Shippo API uses objects and object IDs. In the Shippo API, objects use used to stored information. Objects are stored in the Shippo database. Examples of objects include addresses, carrier accounts, transactions, and labels. Each object has an associated object ID. Each object ID is unique and you can use the object ID to reference and use the data in the object. Use POST requests to create objects, GET requests to retrieve objects, and PUT requests to update objects. Most objects in the Shippo API are immutable. This means that once you have created an object, you cannot change it. Instead, you must create a new one with the updated values. `Carrier Accounts`, `Service Groups`, and `User Parcel Templates` are the only objects that you can update. ## How to use a Shippo API object Follow this example to help understand how to use Shippo API objects. Before starting this example, make sure you have generated your [test token](/guides/authentication). In each example, replace `` with the test token you have generated. ### Step 1 Create an address object ```shell cURL theme={null} curl https://api.goshippo.com/addresses/ \ -H "Authorization: ShippoToken " \ -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" ``` ```Python Python theme={null} import shippo from shippo.models import components shippo_sdk = shippo.Shippo(api_key_header="") shippo_sdk.addresses.create( components.AddressCreateRequest( name="Shawn Ippotle", company="Shippo", street1="215 Clayton St.", city="San Francisco", state="CA", zip="94117", country="US", # iso2 country code phone="+1 555 341 9393", email="shippotle@shippo.com" ) ) ``` ```PHP PHP theme={null} require_once('lib/Shippo.php'); Shippo::setApiKey(""); // 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" )); ``` ```typescript TypeScript theme={null} // Create address object const shippo = new Shippo({apiKeyHeader: ''}); const addressFrom = await shippo.addresses.create({ name: "Shawn Ippotle", company: "Shippo", street1: "215 Clayton St.", city: "San Francisco", state: "CA", zip: "94117", country: "US", // iso2 country code phone: "+1 555 341 9393", email: "shippotle@shippo.com", }); ``` The expected response is a view of the address object that includes the address you created along with its metadata. It includes the object ID, `"object_id"` that you can use to reference the object. ```json theme={null} { "is_complete": true, "object_created":"2022-07-09T02:19:13.174Z", "object_updated":"2022-07-09T02:19:13.174Z", "object_id":"d799c2679e644279b59fe661ac8fa488", "object_owner":"shippotle@shippo.com", "validation_results": {}, "name":"Shawn Ippotle", "company":"Shippo", "street_no": "", "street1":"215 Clayton St.", "street2":"", "street3":"", "city":"San Francisco", "state":"CA", "zip":"94117", "country":"US", "longitude": null, "latitude": null, "phone":"15553419393", "email":"shippotle@shippo.com", "is_residential":true, "metadata":"Customer ID 123456" } ``` ### Step 2 Use this object ID to retrieve the address details ```shell cURL theme={null} curl https://api.goshippo.com/addresses/d799c2679e644279b59fe661ac8fa488/ \ -H "Authorization: ShippoToken " ``` ```Python Python theme={null} # Retrieve an existing address by object_id shippo_sdk.addresses.get("d799c2679e644279b59fe661ac8fa488") ``` ```PHP PHP theme={null} // Retrieve an existing address by object_id Shippo_Address::retrieve('d799c2679e644279b59fe661ac8fa488'); ``` ```typescript TypeScript theme={null} // Retrieve an existing address by object_id shippo.addresses.get('d799c2679e644279b59fe661ac8fa488'); ``` In this example, `d799c2679e644279b59fe661ac8fa488` is the object ID of the address you have created. The expected response is a view of the address object that includes the address you created along with its metadata. The same response you received when you created the address object. ```json theme={null} { "is_complete": true, "object_created":"2014-07-09T02:19:13.174Z", "object_updated":"2014-07-09T02:19:13.174Z", "object_id":"d799c2679e644279b59fe661ac8fa488", "object_owner":"shippotle@shippo.com", "validation_results": {}, "name":"Shawn Ippotle", "company":"Shippo", "street_no": "", "street1":"215 Clayton St.", "street2":"", "street3":"", "city":"San Francisco", "state":"CA", "zip":"94117", "country":"US", "longitude": null, "latitude": null, "phone":"15553419393", "email":"shippotle@shippo.com", "is_residential":true, "metadata":"Customer ID 123456", "test": true } ``` ## Shippo API object list The following is a list of objects created in the Shippo API. | Object | Object Name | | ----------------------------------------------------------------------------------------------- | -------------------------- | | [Address Object](/api-reference/addresses/list-all-addresses) | AddressId | | [Parcel Object](/api-reference/parcels/list-all-parcels) | ParcelId | | [User Parcel Object](/api-reference/user-parcel-templates/list-all-user-parcel-templates) | UserParcelTemplateObjectId | | [Shipment Object](/api-reference/shipments/list-all-shipments) | ShipmentId | | [Rate Object](/api-reference/rates/retrieve-a-rate) | RateId | | [Transaction Object](/api-reference/transactions/list-all-shipping-labels) | TransactionId | | [Batch Object](/api-reference/batches/create-a-batch) | BatchId | | [Customs Item Object](/api-reference/customs-items/list-all-customs-items) | CustomsItemId | | [Customs Declaration Object](/api-reference/customs-declarations/list-all-customs-declarations) | CustomsDeclarationId | | [Carrier Account Object](/api-reference/carrier-accounts/list-all-carrier-accounts) | CarrierAccountId | | [Manifest Object](/api-reference/manifests/list-all-manifests) | ManifestId | | [Pickup Object](/api-reference/pickups/create-a-pickup) | PickupId | | [Order Object](/api-reference/orders/list-all-orders) | OrderId | | [Refund Object](/api-reference/refunds/list-all-refunds) | RefundId | | [Invoice Object](/api-reference/addresses/list-all-addresses) | InvoiceObjectId | | [Service Group Object](/api-reference/service-groups/list-all-service-groups) | ServiceGroupId | | [Shippo Account Object](/api-reference/shippo-accounts/list-all-shippo-accounts) | ShippoAccountId | # Shippo API upgrade guide Source: https://docs.goshippo.com/api-concepts/api-upgrade-guides/upgrade-guide Step-by-step instructions to identify your current Shippo API version and safely upgrade to the latest. ## What does the API version mean? The Shippo API has multiple versions. A new version is created any time we make “breaking changes” to our API. These are changes to our API that could cause your integration to not work correctly anymore. We use versions to significantly improve and develop new features in our API, without affecting our existing users' experience. Versions allow you to continue to use older versions of the API until you’re ready to update your system to the latest version. ## Why should I upgrade? We recommend staying up-to-date with the latest API version to take advantage of the latest improvements and features added to the Shippo API. ## Which Shippo API version do I use today? There are two ways to set the Shippo API version. The first way to set the version of the Shippo API you use, is linked to your account and was set when you first created your Shippo account. To see your current API version linked with your account, follow these steps. 1. Log in to the [Shippo API Portal](https://portal.goshippo.com/api-config/api) 2. In the left menu, under "API Configuration", click “Developer keys” 3. Find the “API Version” section, your current API version is listed next to “Current version:” UI showing where API version is displayed The second way that the Shippo API version is selected is within the code you use to integrate with the Shippo API. The API version specified in your code takes precedence over the version you have set in your Shippo account. If you do not specify a version in your code, the version set in your Shippo account is used. If you’ve integrated with the Shippo API through one of our [client libraries](/guides/client-libraries), refer to the library examples to check if your client library supports selecting your Shippo API version. If you’ve integrated with the Shippo API using cURL, your API version may be set using the a header. For example `-H "Shippo-API-Version: YYYY-MM-DD”`. ## Upgrade ### Before you upgrade 1. Identify your current API version. 2. In your own code identify the Shippo endpoints you currently use. 3. Review our [changelog](/api-concepts/api-change-log) to see the changes to the endpoints that you use. 4. For your current API version, review the appropriate upgrade guides to quickly identify which object fields have changed. * If you are upgrading from v20140211, use [this guide](/api-concepts/api-upgrade-guides/v20140211-to-2018). * If you are upgrading from v20161025, use [this guide](/api-concepts/api-upgrade-guides/v20161025-to-2018). * If you are upgrading from v20170329, use [this guide](/api-concepts/api-upgrade-guides/v20170329-to-2018). * If you are upgrading from v20170801, use [this guide](/api-concepts/api-upgrade-guides/v20170801-to-2018). ### Upgrading a cURL integration To upgrade safely, follow these steps. We recommend that you upgrade each API call one at a time. 1. Identify an API call to the Shippo API. 2. Change your authorization token to a [test token](/guides/testing). Using the test token means that you will not get charged and your live data will not be affected. 3. Manually add or change the Shippo API version in your API calls using the header `Shippo-API-Version`, setting your API version to the latest` `2018-02-08\`. For example: ```shell theme={null} curl https://api.goshippo.com/shipments/\ -H "Authorization: ShippoToken "\ -H "Shippo-API-Version: 2018-02-08"\ -d '{ ... }' ``` 4. Test the API call to confirm it is functioning as expected. 5. Complete steps 1 - 3 for each API call. 6. After you’ve tested each Shippo API call that your integration uses and you are confident it is functioning as expected, change your API token back to your live token and re-verify that they are functioning as expected. We recommend you keep the `Shippo-API-Version` in your API call as it is the preferred way to set your version. 7. After your final test, upgrade your API version linked with your Shippo account. **Warning** Warning: You cannot reverse an upgrade. 8. Follow the steps in [Which Shippo API version I’m I using today?](#which-shippo-api-version-do-i-use-today) and click “Updates available”. Image showing update is available 9. Review the warnings and when ready, check the confirmation checkbox, and click “Upgrade”. The process will take a couple of minutes to complete. Reminder: Do not do this until you have completely validated that the latest version works for your integration. Warning display before upgrading default API version ### Upgrading a client library integration If you’ve integrated with the Shippo API through one of our [client libraries](/guides/client-libraries), refer to the library examples to check if your client library supports selecting your Shippo API version. **note** We no longer actively maintain our client libraries. However, you can use them as a starting point and update them for your needs and future changes to our APIs. For more details about how you can use the Shippo API with your preferred language, see our [client libraries guide](/guides/client-libraries). #### Client library upgrade by selecting API version If your client library does support the option to set the API version, follow these steps. 1. Change your authorization token to a [test token](/guides/testing). Using the test token means that you will not get charged and your live data will not be affected. 2. Manually add or change the Shippo API version in your script. For example, in Python, use this command. ```python theme={null} shippo.config.api_version = "2018-02-08" ``` 3. Test your integration to confirm it is functioning as expected. 4. After you’ve tested your integration and you are confident it is functioning as expected, change your API token back to your live token and re-verify that it is functioning as expected. 5. After your final test, upgrade your API version linked with your Shippo account. Follow the steps [7,8, and 9](#upgrading-a-curl-integration). #### Client library upgrade using Shippo account API version If your client library does not support the option for selecting the Shippo API version, the API version you use is set in your Shippo account. To upgrade, follow these steps. 1. Change your authorization token to a [test token](/guides/testing). Using the test token means that you will not get charged and your live data will not be affected. 2. Upgrade, following steps [7,8, and 9](#upgrading-a-curl-integration). 3. Test your integration to confirm it is functioning as expected. 4. After you’ve tested your integration and you are confident it is functioning as expected, change your API token back to your live token and re-verify that they are functioning as expected. # Upgrading from v20140211 to v20180208 Source: https://docs.goshippo.com/api-concepts/api-upgrade-guides/v20140211-to-2018 Review deprecated and added fields when upgrading from Shippo API v20140211 to v20180208. If you have already integrated with the Shippo API v20140211 and are now planning to upgrade to the latest version (v20180208), you can use this guide to identify which objects have changed between versions. In these tables you will find the fields within each object have that have deprecated. In some cases, you can see a replacement field that has been added in v20180208. ## Deprecated ◎ and added ◉ fields ### Orders | Resource | Deprecated fields from v20140211 ◎ | Fields added in v20180208 ◉ | | ---------- | ---------------------------------- | ------------------------------- | | **Orders** | address\_from | from\_address | | | created\_at | | | | hidden | | | | items | | | | to\_address.ip | | | | to\_address.messages | | | | to\_address.object\_purpose | | | | to\_address.object\_source | | | | to\_address.object\_state | | | | | placed\_at | | | | test | | | | to\_address.is\_complete | | | | to\_address.validation\_results | | | | | ### Batches | Resource | Deprecated fields from v20140211 ◎ | Fields added in v20180208 ◉ | | ----------- | ---------------------------------- | --------------------------- | | **Batches** | object\_status | status | | | | | ### Carrier Accounts | Resource | Deprecated fields from v20140211 ◎ | Fields added in v20180208 ◉ | | -------------------- | ---------------------------------- | --------------------------- | | **Carrier Accounts** | | carrier\_images | | | | carrier\_images.200 | | | | carrier\_images.75 | | | | carrier\_name | | | | | ### Manifests | Resource | Deprecated fields from v20140211 ◎ | Fields added in v20180208 ◉ | | ------------- | ---------------------------------- | --------------------------- | | **Manifests** | is\_test | | | | object\_status | status | | | submission\_date | | | | | shipment\_date | | | | | ### Refund | Resource | Deprecated fields from v20140211 ◎ | Fields added in v20180208 ◉ | | ---------- | ---------------------------------- | --------------------------- | | **Refund** | object\_status | status | | | | | ### Customs Declaration | Resource | Deprecated fields from v20140211 ◎ | Fields added in v20180208 ◉ | | ------------------------ | ---------------------------------- | --------------------------- | | **Customs Declarations** | | address\_importer | | | | b13a\_filing\_option | | | | b13a\_number | | | | duties\_payor | | | | exporter\_identification | | | | invoiced\_charges | | | | is\_vat\_collected | | | | | ### Customs Items | Resource | Deprecated fields from v20140211 ◎ | Fields added in v20180208 ◉ | | ----------------- | ---------------------------------- | --------------------------- | | **Customs Items** | | eccn\_ear9 | | | | | ### Tracks | Resource | Deprecated fields from v20140211 ◎ | Fields added in v20180208 ◉ | | ---------- | ---------------------------------- | --------------------------- | | **Tracks** | | tracking\_status.substatus | | | | substatus.text | | | | substatus.code | | | | substatus.action\_required | | | | description | | | | | ### Transactions | Resource | Deprecated fields from v20140211 ◎ | Fields added in v20180208 ◉ | | ---------------- | ---------------------------------- | --------------------------- | | **Transactions** | customs\_note | | | | notification\_email\_from | | | | notification\_email\_other | | | | notification\_email\_to | | | | object\_status | status | | | pickup\_date | | | | submission\_note | | | | tracking\_history | | | | was\_test | test | | | | billing.payments | | | | billing | | | | qr\_code\_url | | | | | ### Rates | Resource | Deprecated fields from v20140211 ◎ | Fields added in v20180208 ◉ | | --------- | ---------------------------------- | --------------------------------- | | **Rates** | available\_shippo | | | | days | estimated\_days | | | delivery\_attempts | | | | inbound\_endpoint | | | | insurance | | | | insurance\_amount | | | | insurance\_amount\_local | | | | insurance\_currency | | | | insurance\_currency\_local | | | | object\_purpose | | | | object\_state | | | | object\_updated | | | | outbound\_endpoint | | | | servicelevel\_name | servicelevel.name | | | servicelevel\_terms | servicelevel.terms | | | servicelevel\_token | servicelevel.token | | | trackable | | | | | servicelevel.extended\_token | | | | servicelevel.parent\_servicelevel | | | | included\_insurance\_price | | | | servicelevel | | | | | ### Shipments | Resource | Deprecated fields from v20140211 ◎ | Fields added in v20180208 ◉ | | ------------- | ---------------------------------- | ----------------------------------- | | **Shipments** | insurance\_amount | | | | insurance\_currency | | | | object\_purpose | | | | object\_state | | | | object\_status | | | | parcel | | | | rates\_list | | | | rates\_url | | | | reference\_1 | | | | reference\_2 | | | | return\_of | | | | submission\_date | | | | submission\_type | | | | | address\_from.is\_complete | | | | address\_from.validation\_results | | | | address\_from.name | | | | address\_from.street3 | | | | address\_from.zip | | | | address\_from.city | | | | address\_from.state | | | | address\_from.test | | | | address\_from.object\_id | | | | status | | | | address\_to.is\_complete | | | | address\_from.company | | | | address\_from.is\_residential | | | | address\_from.email | | | | address\_from.country | | | | address\_from.phone | | | | address\_from.street2 | | | | address\_from.street1 | | | | address\_from.street\_no | | | | address\_to.object\_id | | | | address\_return.city | | | | address\_return.company | | | | address\_return.country | | | | address\_return.email | | | | address\_return.is\_complete | | | | address\_return.is\_residential | | | | address\_return.name | | | | address\_return.object\_id | | | | address\_return.phone | | | | address\_return.state | | | | address\_return.street1 | | | | address\_return.street2 | | | | address\_return.street3 | | | | address\_return.street\_no | | | | address\_return.test | | | | address\_return.validation\_results | | | | address\_return.zip | | | | address\_to.city | | | | address\_to.company | | | | address\_to.country | | | | address\_to.email | | | | address\_to.is\_residential | | | | address\_to.name | | | | address\_to.phone | | | | address\_to.state | | | | address\_to.street1 | | | | address\_to.street2 | | | | address\_to.street3 | | | | address\_to.street\_no | | | | address\_to.test | | | | address\_to.validation\_results | | | | address\_to.zip | | | | alternate\_address\_to | | | | rates | | | | parcels | | | | shipment\_date | | | | | | Resource | Deprecated fields from v20140211 ◎ | Fields added in v20180208 ◉ | | ------------- | ---------------------------------- | --------------------------- | | **Addresses** | ip | | | | messages | | | | object\_purpose | | | | object\_source | | | | object\_state | | | | | is\_complete | | | | validation\_results | ## Updated fields ◐ The following object fields have changed type in v20180208 since v20140211: | Resource | Field | Field type in v20140211 | Field type changed to in v20180208 | | ---------------- | ---------------- | ----------------------- | ---------------------------------- | | **Orders** | weight | int | decimal | | **Transactions** | tracking\_status | obj | str | | **Shipments** | address\_from | str | Obj or address object id as a str | | | address\_to | str | Obj or address object id as a str | | | address\_return | str | Obj or address object id as a str | # Upgrading from v20161025 to v20180208 Source: https://docs.goshippo.com/api-concepts/api-upgrade-guides/v20161025-to-2018 Review deprecated and added fields when upgrading from Shippo API v20161025 to v20180208. If you have already integrated with the Shippo API v20161025 and are now planning to upgrade to the latest version (v20180208), you can use this guide to identify which objects have changed between versions. In these tables you will find the fields within each object have that have deprecated. In some cases, you can see a replacement field that has been added in v20180208. ## Deprecated ◎ and added ◉ fields ### Orders | Resource | Deprecated fields from v20161025 ◎ | Fields added in v20180208 ◉ | | ---------- | ---------------------------------- | ------------------------------- | | **Orders** | address\_from | from\_address | | | created\_at | | | | hidden | | | | items | | | | to\_address.ip | | | | to\_address.messages | | | | to\_address.object\_purpose | | | | to\_address.object\_source | | | | to\_address.object\_state | | | | | placed\_at | | | | test | | | | to\_address.is\_complete | | | | to\_address.validation\_results | | | | | ### Batches | Resource | Deprecated fields from v20161025 ◎ | Fields added in v20180208 ◉ | | ----------- | ---------------------------------- | --------------------------- | | **Batches** | object\_status | status | | | | | ### Carrier Accounts | Resource | Deprecated fields from v20161025 ◎ | Fields added in v20180208 ◉ | | -------------------- | ---------------------------------- | --------------------------- | | **Carrier Accounts** | | carrier\_images | | | | carrier\_images.300 | | | | carrier\_images.425 | | | | carrier\_name | | | | | ### Manifests | Resource | Deprecated fields from v20161025 ◎ | Fields added in v20180208 ◉ | | ------------- | ---------------------------------- | --------------------------- | | **Manifests** | is\_test | | | | object\_status | status | | | submission\_date | | | | | shipment\_date | | | | | ### Refund | Resource | Deprecated fields from v20161025 ◎ | Fields added in v20180208 ◉ | | ---------- | ---------------------------------- | --------------------------- | | **Refund** | object\_status | status | | | | | ### Customs Declarations | Resource | Deprecated fields from v20161025 ◎ | Fields added in v20180208 ◉ | | ------------------------ | ---------------------------------- | --------------------------- | | **Customs Declarations** | | address\_importer | | | | b13a\_filing\_option | | | | b13a\_number | | | | duties\_payor | | | | exporter\_identification | | | | invoiced\_charges | | | | is\_vat\_collected | | | | | ### Customs Items | Resource | Deprecated fields from v20161025 ◎ | Fields added in v20180208 ◉ | | ----------------- | ---------------------------------- | --------------------------- | | **Customs Items** | | eccn\_ear9 | | | | | ### Tracks | Resource | Deprecated fields from v20161025 ◎ | Fields added in v20180208 ◉ | | ---------- | ---------------------------------- | --------------------------- | | **Tracks** | | tracking\_status.substatus | | | | substatus.text | | | | substatus.code | | | | substatus.action\_required | | | | description | | | | | ### Transactions | Resource | Deprecated fields from v20161025 ◎ | Fields added in v20180208 ◉ | | ---------------- | ---------------------------------- | --------------------------- | | **Transactions** | customs\_note | | | | notification\_email\_from | | | | notification\_email\_other | | | | notification\_email\_to | | | | object\_status | status | | | pickup\_date | | | | submission\_note | | | | tracking\_history | | | | was\_test | test | | | | billing.payments | | | | billing | | | | qr\_code\_url | | | | | ### Rates | Resource | Deprecated fields from v20161025 ◎ | Fields added in v20180208 ◉ | | --------- | ---------------------------------- | --------------------------------- | | **Rates** | available\_shippo | | | | days | estimated\_days | | | delivery\_attempts | | | | inbound\_endpoint | | | | insurance | | | | insurance\_amount | | | | insurance\_amount\_local | | | | insurance\_currency | | | | insurance\_currency\_local | | | | object\_purpose | | | | object\_state | | | | object\_updated | | | | outbound\_endpoint | | | | servicelevel\_name | servicelevel.name | | | servicelevel\_terms | servicelevel.terms | | | servicelevel\_token | servicelevel.token | | | trackable | | | | | servicelevel.extended\_token | | | | servicelevel.parent\_servicelevel | | | | included\_insurance\_price | | | | servicelevel | | | | | ### Shipments | Resource | Deprecated fields from v20161025 ◎ | Fields added in v20180208 ◉ | | ------------- | ---------------------------------- | ----------------------------------- | | **Shipments** | insurance\_amount | | | | insurance\_currency | | | | object\_purpose | | | | object\_state | | | | object\_status | | | | parcel | | | | rates\_list | | | | rates\_url | | | | reference\_1 | | | | reference\_2 | | | | return\_of | | | | submission\_date | | | | submission\_type | | | | | address\_from.is\_complete | | | | address\_from.validation\_results | | | | address\_from.name | | | | address\_from.street3 | | | | address\_from.zip | | | | address\_from.city | | | | address\_from.state | | | | address\_from.test | | | | address\_from.object\_id | | | | status | | | | address\_to.is\_complete | | | | address\_from.company | | | | address\_from.is\_residential | | | | address\_from.email | | | | address\_from.country | | | | address\_from.phone | | | | address\_from.street2 | | | | address\_from.street1 | | | | address\_from.street\_no | | | | address\_to.object\_id | | | | address\_return.city | | | | address\_return.company | | | | address\_return.country | | | | address\_return.email | | | | address\_return.is\_complete | | | | address\_return.is\_residential | | | | address\_return.name | | | | address\_return.object\_id | | | | address\_return.phone | | | | address\_return.state | | | | address\_return.street1 | | | | address\_return.street2 | | | | address\_return.street3 | | | | address\_return.street\_no | | | | address\_return.test | | | | address\_return.validation\_results | | | | address\_return.zip | | | | address\_to.city | | | | address\_to.company | | | | address\_to.country | | | | address\_to.email | | | | address\_to.is\_residential | | | | address\_to.name | | | | address\_to.phone | | | | address\_to.state | | | | address\_to.street1 | | | | address\_to.street2 | | | | address\_to.street3 | | | | address\_to.street\_no | | | | address\_to.test | | | | address\_to.validation\_results | | | | address\_to.zip | | | | alternate\_address\_to | | | | rates | | | | parcels | | | | shipment\_date | | | | | ### Addresses | Resource | Deprecated fields from v20161025 ◎ | Fields added in v20180208 ◉ | | ------------- | ---------------------------------- | --------------------------- | | **Addresses** | ip | | | | messages | | | | object\_purpose | | | | object\_source | | | | object\_state | | | | | is\_complete | | | | validation\_results | ## Updated fields ◐ The following object fields have changed type in v20180208 since v20161025: | Resource | Field | Field type in v20161025 | Field type changed to in v20180208 | | ---------------- | ---------------- | ----------------------- | ---------------------------------- | | **Orders** | weight | int | decimal | | **Transactions** | tracking\_status | obj | str | | **Shipments** | address\_from | str | Obj or address object id as a str | | | address\_to | str | Obj or address object id as a str | | | address\_return | str | Obj or address object id as a str | # Upgrading from v20170329 to v20180208 Source: https://docs.goshippo.com/api-concepts/api-upgrade-guides/v20170329-to-2018 Review deprecated and added fields when upgrading from Shippo API v20170329 to v20180208. If you have already integrated with the Shippo API v20170329 and are now planning to upgrade to the latest version (v20180208), you can use this guide to identify which objects have changed between versions. In these tables you will find the fields within each object have that have deprecated. In some cases, you can see a replacement field that has been added in v20180208. ## Deprecated ◎ and added ◉ fields | Resource | Deprecated fields from v20170329 ◎ | Fields added in v20180208 ◉ | | ---------- | ---------------------------------- | ------------------------------- | | **Orders** | address\_from | from\_address | | | created\_at | | | | hidden | | | | items | | | | to\_address.ip | | | | to\_address.messages | | | | to\_address.object\_purpose | | | | to\_address.object\_source | | | | to\_address.object\_state | | | | | | | | | placed\_at | | | | test | | | | to\_address.is\_complete | | | | to\_address.validation\_results | | | | | ### Carrier Accounts | Resource | Deprecated fields from v20170329 ◎ | Fields added in v20180208 ◉ | | -------------------- | ---------------------------------- | --------------------------- | | **Carrier Accounts** | | carrier\_images | | | | carrier\_images.200 | | | | carrier\_images.75 | | | | carrier\_name | | | | | ### Customs Declarations | Resource | Deprecated fields from v20170329 ◎ | Fields added in v20180208 ◉ | | ------------------------ | ---------------------------------- | --------------------------- | | **Customs Declarations** | | address\_importer | | | | b13a\_filing\_option | | | | b13a\_number | | | | duties\_payor | | | | exporter\_identification | | | | invoiced\_charges | | | | is\_vat\_collected | | | | | ### Customs Items | Resource | Deprecated fields from v20170329 ◎ | Fields added in v20180208 ◉ | | ----------------- | ---------------------------------- | --------------------------- | | **Customs Items** | | eccn\_ear9 | | | | | ### Tracks | Resource | Deprecated fields from v20170329 ◎ | Fields added in v20180208 ◉ | | ---------- | ---------------------------------- | --------------------------- | | **Tracks** | | tracking\_status.substatus | | | | substatus.text | | | | substatus.code | | | | substatus.action\_required | | | | description | | | | | ### Transactions | Resource | Deprecated fields from v20170329 ◎ | Fields added in v20180208 ◉ | | ---------------- | ---------------------------------- | --------------------------- | | **Transactions** | tracking\_history | | | | | qr\_code\_url | | | | | ### Rates | Resource | Deprecated fields from v20170329 ◎ | Fields added in v20180208 ◉ | | --------- | ---------------------------------- | --------------------------------- | | **Rates** | days | estimated\_days | | | | included\_insurance\_price | | | | servicelevel.extended\_token | | | | | | | | servicelevel.parent\_servicelevel | | | | | ### Shipments | Resource | Deprecated fields from v20170329 ◎ | Fields added in v20180208 ◉ | | ------------- | ---------------------------------- | --------------------------- | | **Shipments** | | alternate\_address\_to | ## Updated fields ◐ The following object fields have changed type in v20180208 since v20170329: | Resource | Field | Field type in v20170329 | Field type changed to in v20180208 | | ---------------- | ---------------- | ----------------------- | ---------------------------------- | | **Orders** | weight | int | decimal | | **Transactions** | tracking\_status | obj | str | # Upgrading from v20170801 to v20180208 Source: https://docs.goshippo.com/api-concepts/api-upgrade-guides/v20170801-to-2018 Review the fields added when upgrading from Shippo API v20170801 to v20180208, with no deprecations. If you have already integrated with the Shippo API v20170801 and are now planning to upgrade to the latest version (v20180208), you can use this guide to identify which objects have changed between versions. No keys from v20170801 have been depreciated or changed type in v20180208. The following response keys have been added in v20180208 since v20170329: ## Added ◉ fields ### Carrier Accounts | Resource | Fields added in v20180208 ◉ | | -------------------- | --------------------------- | | **Carrier Accounts** | carrier\_images | | | carrier\_images.200 | | | carrier\_images.75 | | | carrier\_name | | | | ### Customs Declarations | Resource | Fields added in v20180208 ◉ | | ------------------------ | --------------------------- | | **Customs Declarations** | b13a\_filing\_option | | | b13a\_number | | | duties\_payor | | | exporter\_identification | | | invoiced\_charges | | | is\_vat\_collected | | | | ### Customs Items | Resource | Fields added in v20180208 ◉ | | ----------------- | --------------------------- | | **Customs Items** | eccn\_ear9 | | | | ### Tracks | Resource | Fields added in v20180208 ◉ | | ---------- | --------------------------- | | **Tracks** | description | | | | ### Transactions | Resource | Fields added in v20180208 ◉ | | ---------------- | --------------------------- | | **Transactions** | qr\_code\_url | | | | ### Rates | Resource | Fields added in v20180208 ◉ | | --------- | --------------------------------- | | **Rates** | included\_insurance\_price | | | servicelevel.extended\_token | | | servicelevel.parent\_servicelevel | | | | ### Shipments | Resource | Fields added in v20180208 ◉ | | ------------- | --------------------------- | | **Shipments** | alternate\_address\_to | # API versions Source: https://docs.goshippo.com/api-concepts/api-versioning Learn how Shippo API versioning works, how to set your version, and how to test before upgrading. The Shippo API uses versioning to roll out backwards-incompatible changes over time. ## About versioning The API version will control the API and webhook behaviors, such as parameters accepted in requests, and response properties. Your account is automatically set to the latest version when you sign up for Shippo. A new version of the API is released when backwards-incompatible changes are made to the API. To avoid breaking your code, we will never force you to upgrade until you're ready. We will be releasing backwards-compatible changes without introducing new versions. Your code will be able to handle these changes no matter what version it's on. Examples of backwards-compatible changes: * Adding new API endpoints * Adding new optional response attributes to an existing resource * Adding new optional request attributes ## Release notes and communication Backwards-incompatible changes will be documented in the [release](/api-concepts/api-change-log) as part of every version release. Documentation will provide in-depth explanations of the changes. ## Upgrade your API version We recommend staying up-to-date with the current API version to take advantage of latest improvements to the Shippo API. To see your current version and upgrade to the latest, visit the [Developer keys menu](https://portal.goshippo.com/api-config/api) on the Shippo Developer portal. Versioning of the Shippo API will be released as dates, displayed as: `YYYY-MM-DD`. You can set the version in each API call using the header parameter `Shippo-API-Version`. If you do not set the `Shippo-API-Version`, the Shippo API will use your [default API version](/api-concepts/api-upgrade-guides/upgrade-guide#which-shippo-api-version-do-i-use-today). ## Test before upgrading To test your code under a different API version before committing the change, you can set the API version on a specific request by setting a header with the version you are testing. The version will be set for subsequent requests until it's changed back. Users can only upgrade their API to the latest version. Once you've upgraded your API version, you cannot roll back to an earlier version. Please make sure to test thoroughly before doing so. ```shell cURL theme={null} curl https://api.goshippo.com/shipments/\ -H "Authorization: ShippoToken "\ -H "Shippo-API-Version: YYYY-MM-DD"\ -d '{ ... }' # now this API request uses the API version "YYYY-MM-DD" ``` ```Python Python theme={null} import shippo shippo_sdk = shippo.Shippo(api_key_header="", shippo_api_version='YYYY-MM-DD') # now all api requests will use the API version "YYYY-MM-DD" ``` ```PHP PHP theme={null} require_once('lib/Shippo.php'); Shippo::setApiKey(""); Shippo::setApiVersion("YYYY-MM-DD"); # now all subsequent requests use the API version "YYYY-MM-DD" ``` ```typescript TypeScript theme={null} const shippo = new Shippo({apiKeyHeader: '', shippoApiVersion: 'YYYY-MM-DD'}); // now all subsequent requests use the API version "YYYY-MM-DD" ``` ```Java Java theme={null} import com.shippo.Shippo; Shippo.setApiKey(); Shippo.setApiVersion("YYYY-MM-DD"); # now all subsequent requests use the API version "YYYY-MM-DD" ``` ```cs C# theme={null} using Shippo; ShippoSDK sdk = new ShippoSDK( apiKeyHeader: "", shippoApiVersion: "YYYY-MM-DD" ); // now all subsequent requests use the API version "YYYY-MM-DD" ``` # HTTP response status codes Source: https://docs.goshippo.com/api-concepts/apihttp-status-codes Reference guide for HTTP response status codes returned by the Shippo API, from 200 OK to 5xx errors. | Code | Description | | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | 200/201 | OK. Everything worked as expected. | | 204 | OK. Everything worked OK but no values were returned. | | 400 | Bad request. The request you made was not accepted. This can be due to issues including missing a required parameter. | | 401 | Unauthorized. Occurs for issues with authentication such as you didn't provide a token or the token you provided does not exist. | | 404 | Not found. The requested resource doesn't exist. | | 409 | Conflict. There was a conflict in your request. This could be caused by things like too many concurrent calls or if you tried to create a duplicate address in your address book. | | 422 | Unprocessable entity . Your request contained content that could not be processed by the Shippo API. | | 429 | Rate limit exceeded. You have made too many requests to the Shippo API. See our [rates limit guide](/api-concepts/rate-limits). | | 5xx | Server error. Something has gone wrong with the Shippo server. | # Asynchronous API response handling Source: https://docs.goshippo.com/api-concepts/asynchronus-api-call Learn how asynchronous API responses work in Shippo and when to use sync versus async requests. By default, the Shippo API returns rates and labels asynchronously. We recommend to use synchronous responses for most implementations. In the current API version, you need to explicitly opt into sync responses by setting the `async` parameter in the POST body to `false`. ## What are asynchronous responses? Asynchronous responses mean that Shippo won't be returning rates or label you have requested immediately. After your Rates or Label API POST call, you will get a successful response from the Shippo API, but without the actual rates or label. This allows your implementation to do other tasks while Shippo is retrieving your data. Here's a sample schema for how asynchronous API responses work, in this case for Rate requests: ![Shippo async flow chart](https://shippo-static.s3.amazonaws.com/img/various/async-calls.png) ## When does it make sense to use asynchronous responses? It takes time for Shippo to call upstream API(s), such as the USPS or FedEx API, to retrieve rates and/or label. By using asynchronous responses, your rates or label requests won't block the rest of your code, and you can proceed with other tasks in the meantime. The best way to handle asynchronous API responses is to access the corresponding API resource (Rate or Transaction) one or multiple times after object creation. As soon as a carrier has returned a rate or label, it will be accessible in the corresponding Shippo API resource. # Filtering Source: https://docs.goshippo.com/api-concepts/filtering Learn how to use query parameters to filter and paginate results from Shippo API endpoints. When querying an endpoint to return multiple results back, you can use query string parameters to filter the results that you are getting back. Shippo currently supports a [results](#results) parameter and some [date filtering](#date-filtering) parameters (only currently supported on the Shipments endpoint). By default, you will only get 5 results back if you do not specify a `results` query string parameter. **Note** If you do not specify a `results` query string parameter, the Shippo API will only return a certain number of results. The default number of results is subject to change and depends on the resource you are calling. Many resources, such as shipments, transactions, and orders return 25 by default. Use a `results` query string parameter less than 200. A `results` query string parameter greater than 200 will cause your results to be truncated. ## Results The response will be paginated by the number specified in the `results` query string parameter. For example, for carrier accounts, by default you would only see 5 per page, with a `next` field indicating if there is another page of results. A `previous` field will give any previous pages if you're not currently looking at the first page. ## Example URL: `https://api.goshippo.com/carrier_accounts/?results=10` Response: ```json theme={null} { "next": null, "previous": null, "results": [ { "carrier": "parcelforce", "object_id": "bef77ddbd2a5455eba8fcd4511eef645", "object_owner": "shippotle@shippo.com", "account_id": "shippo_parcelforce_account", "parameters": {"expresslink_password": "******"}, "test": true, "active": true, "is_shippo_account": true, "metadata":"" }, { "carrier": "usps", "object_id": "2da62634606540c082f3612afe95ecae", "object_owner": "shippotle@shippo.com", "account_id": "shippo_usps_account", "parameters": {"is_commercial": false}, "test": true, "active": true, "is_shippo_account": true, "metadata": "" }, { "carrier": "deutsche_post", "object_id": "595d9cb0c0e14497bf07e75ecfec6c6d", "object_owner": "shippotle@shippo.com", "account_id": "shippo_deutsche_post_account", "parameters": [], "test": true, "active": true, "is_shippo_account": true, "metadata": "" }, { "carrier": "uber", "object_id": "fd7f11a74c8847778fe41fed06b7fdd4", "object_owner": "shippotle@shippo.com", "account_id": "shippo_uber_account", "parameters": [], "test": true, "active": true, "is_shippo_account": true, "metadata": "" }, { "carrier": "dhl_express", "object_id": "3d05ffe6076741228dfea04385050c0d", "object_owner": "shippotle@shippo.com", "account_id": "shippo_dhlexpress_account", "parameters": [], "test": true, "active": true, "is_shippo_account": true, "metadata": "" }, { "carrier": "fedex", "object_id": "86a7793d3788422a8169cfae9c87ed26", "object_owner": "shippotle@shippo.com", "account_id": "86753099", "parameters": { "meter": "112233445", "smartpost_id": 5531 }, "test": true, "active": true, "is_shippo_account": false, "metadata": "" }, { "carrier": "dhl_germany", "object_id": "0bff0a09251d478cb919ead06709d96c", "object_owner": "shippotle@shippo.com", "account_id": "2222222222", "parameters": { "default_participation_code": "01", "business_customer_portal_password": "pass", "business_customer_portal_username": "2222222222_01", "tracking_password": "", "tracking_account": "" }, "test": true, "active": true, "is_shippo_account": false, "metadata": "" }, { "carrier": "fedex", "object_id": "8d6dbc109aaf4bb983d534f1556ddc16", "object_owner": "shippotle@shippo.com", "account_id": "86753098", "parameters": { "meter": "112233446", "smartpost_id": 5531 }, "test": true, "active": true, "is_shippo_account": false, "metadata": "Test Account" }, { "carrier": "canada_post", "object_id": "518402beb1f24e608af7be9d85a0f71b", "object_owner": "shippotle@shippo.com", "account_id": "3f937e0b21ef06f7", "parameters": { "payment_method": "CreditCard", "api_password": "secure_p@$$w0rd", "contract_id": null, "is_platform_account": true, "customer_number": "0086753098" }, "test": true, "active": true, "is_shippo_account": false, "metadata": "" }, { "carrier": "ups", "object_id": "2716480a9d7b4b31837c0dacd7d481f3", "object_owner": "shippotle@shippo.com", "account_id": "shippotle", "parameters": { "cost_center": "", "password": "secure_p@ssw0rd", "account_number": "SH1PP0", "usps_endorsement": null, "surepost": "" }, "test": true, "active": true, "is_shippo_account": false, "metadata": "" } ] } ``` You can see in the above response the amount of carrier accounts happen to line up with the amount we requested back, but if we requested 7 results, there would only be 7 carriers in the response with a url in the `next` field. *** ## Date filtering When querying the [Shipments endpoint](/api-reference/shipments/list-all-shipments) you can have an additional way to filter results by limiting the date range. We expect a date formatted to the ISO 8601 standard, and you can see some example below of what that looks like. You can retrieve any 90 day range (or smaller) of shipments by using the following query string 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/?results=10&object_created_gte=2017-08-01T00:00:00&object_created_lte=2017-08-31T00:00:00` ```json theme={null} { "next": "https://api.goshippo.com/shipments/?object_created_gte=2017-08-01T00%3A00%3A00&object_created_lte=2017-08-31T00%3A00%3A00&results=10&page=2", "previous": null, "results": [ { "address_from": {...}, "address_return": {...}, "address_to": {...}, "carrier_accounts": [], "customs_declaration": null, "extra": [], "messages": [], "metadata": "", "object_created": "2017-08-03T23:21:20.884Z", "object_id": "4a310649f51f4b15aeeabb6457b50d04", "object_owner": "shippotle@shippo.com", "object_updated": "2017-08-03T23:22:28.553Z", "parcels": [...], "rates": [...], "shipment_date": "2017-08-03T23:22:28.553Z", "status": "SUCCESS", "test": true }, { "address_from": {...}, "address_return": {...}, "address_to": {...}, "carrier_accounts": [], "customs_declaration": null, "extra": [], "messages": [], "metadata": "", "object_created": "2017-08-05T21:11:46.431Z", "object_id": "76055268f88c46e8b337e2058bc61186", "object_owner": "shippotle@shippo.com", "object_updated": "2017-08-05T21:11:46.431Z", "parcels": [...], "rates": [...], "shipment_date": "2017-08-05T21:11:46.431Z", "status": "SUCCESS", "test": true } ] } ``` **Note** The format of the `page` query parameter in the `next` and `prev` fields is subject to change and specifically may not necessarily be an integer. The above response includes all shipments created on or after August 1, 2017 up to and including August 31, 2017. If `object_created_gt` and `object_created_lt` were used, it would only retrieve shipments *between* those dates. You can use any combination of `object_created_gt`/`object_created_gte` and `object_created_lt`/`object_created_lte` to filter how you need. You just need to be sure that the date range is 90 days or less. # Glossary Source: https://docs.goshippo.com/api-concepts/glossary Definitions of common shipping and Shippo API terms, from address validation to white-label integrations. At Shippo, our business is shipping. Most of the terms we use are common but sometimes we'll use terms that you may not be familiar with. Other times we might use terms you are familiar with but we use them in a different context. This guide is a collection of terms and descriptions that we use when we talk about the Shippo API. [A](#a) | [B](#b) | [C](#c) | [D](#d) | [E](#e) | [F](#f) | [G](#g) | [H](#h) | [I](#i) | [J](#j) | [L](#l) | [M](#m) | [O](#o) | [P](#p) | [Q](#q) | [R](#r) | [S](#s) | [T](#t) | [W](#w) | [Z](#z) *** ## A ### Address validation One of the most common reasons why a parcel delivery fails is because an incorrect or poorly formed address is used. [Address validation](/address-api/address-validate) is a Shippo service that checks your address for errors before creating a shipping label. Where applicable, the service provides a corrected address you can use for your shipment. ### API Portal The [Shippo API Portal](https://portal.goshippo.com) is a single control panel for API users to manage their API-based shipping operations. Users can access invoice downloads, detailed analytics, developer tools, admin functionality, team management, and more. ### Automations Shippo has a feature that can be used within Shippo's webApp called automations which will help automate your shipping flow. *** ## B ### Batch A [batch](/shipments/batch-label-creation) is a technique for creating multiple labels at once. ### BYOA Bring Your Own "carrier" Account. Shippo offers the ability to connect your carrier (BYOA) or you can use one of [Shippo's carrier accounts](#shippo-carrier-account). *** ## C ### Carrier A carrier is a company or service who delivers purchased goods to customers. Examples of carriers include USPS, DHL, and FedEx ### Customs Customs refers to the government agency responsible for regulating the [import and export](/international-shipping/international-shipping) of goods into and out of a country. ## D ### DAP Delivery at Place (DAP) is an [incoterm](#incoterm). It means that the seller is responsible for delivering the goods to a specified place in the buyer's country, and they cover all costs and risks associated with transporting the goods to that location. Once the goods arrive at the agreed-upon place, the buyer takes over responsibility for import duties, taxes, and further transportation. ### DDU Delivery Duty Unpaid (DDP) is an [incoterm](#incoterm). It means the seller is responsible for delivering the goods to a specified location in the buyer's country, but they do not cover import duties, taxes, or customs clearance. Once the goods arrive at the agreed-upon destination, the buyer is responsible for paying any import duties, taxes, and handling customs clearance. ### DDP Delivery Duty Paid (DDP) is an [incoterm](#incoterm). It means the seller assumes maximum responsibility for the delivery of goods. The seller is responsible for all costs and risks associated with transporting the goods to the buyer's location, including import duties, taxes, and customs clearance. ### Dimensional Weight Dimensional weight (also known as dim weight) is a measuring method in which the total size of your parcel is measured against the total weight. *** ## E ### Elements Elements or [Shippo Shipping Elements](/shipping-elements/index) is a suite of embeddable shipping components. It is a product that you can use to add shipping directly into your website without developing the user interface or the code behind it. *** ## F ### Filtering [Filtering](/api-concepts/filtering) is a feature of the Shippo API where you can define which results are returned from an API call. *** ## G ### Gray label A gray label integration is how we describe a platform integration where users have their own Shippo accounts. The platform uses their user's Shippo account to create and manage shipments. Gray label integrations are often described alongside [white label](#white-label) integrations. *** ## H ### HS Code Harmonized System Code (HS Code) is a standardized classification used to identify products in international trade. It is required by all carriers for international shipping. The term is often used interchangeably with tariff number. ### Hazmat Hazmat is hazardous or dangerous materials. In shipping there are special requirements when [shipping hazmat materials](/shipments/hazmat). *** ## I ### Instalabel Insatlabel is a feature of the Shippo API where the API can be configured to purchase a label with a [single API call](/guides/single-call) instead of the more common two label call. ### Incoterm Incoterms are a set of internationally recognized trade terms that define the responsibilities of buyers and sellers in international trade transactions. They define things like who is responsible for delivery and transport, export and import clearance, and any associated tariffs. ### Insurance [Shipping insurance](/shipments/shipping-insurance) is a service that provides coverage for goods while they are in transit, protecting against potential losses or damages that might occur during shipping. This type of insurance can be purchased by either the seller or the buyer, depending on the terms of the transaction, and is typically offered by shipping carriers, third-party insurers, or logistics companies. *** ## J ### JWT JSON Web Token (JWT) is a URL-safe token used for securely transmitting information between parties as a JSON object. For your client-side applications, we recommend using a [JWT to securely authenticate](/guides/authentication-using-jwt). *** ## L ### Label A shipping label is a document, usually affixed to your parcel, that contains all the information needed to get a parcel from its source to its destination. Some of the information can include information such as, destination address, parcel contents, service level, tracking details, and special instructions. A new label must be created for each shipment. *** ## M ### Manifest [Manifests and USPS SCAN forms](/manifests-and-pickups/manifest-and-scan-forms) allow merchants to create a single piece of paper they can hand to the carrier at pickup time. The manifest has a list of all the parcels the carrier is going to be picking up that day and greatly speeds up the process of the carrier accepting each of the day's parcels. ### Metadata Metadata is freeform text that can be used with some Shippo API objects. Metadata can be used in numerous different ways to help interact with Shippo API data. ### Multi-piece Shipments with multiple parcels sent to the same destination can be grouped together in a multi-piece shipment to save money. *** ## O ### OAuth Open Authorization (OAuth) is a standard for access delegation. In the Shippo API, it's commonly used for [gray label](#gray-label) integrations. ### Object ID In the Shippo API, [objects](/api-concepts/api-objects) are used to store information. Objects can store information like addresses, shipments, and rates. Each object has an associated object ID. Each object ID is unique and you can use the object ID to reference and use the data in the object. ### Orders An [order](/orders/orders) is the act of a customer agreeing to purchase goods from a merchant. The Shippo API includes the order endpoints The orders endpoint allows you to load orders from your system to the Shippo dashboard and to create, retrieve, list, and manage orders programmatically. ### Outbound label An outbound label is a label that is generated for sending a parcel from the sender (merchant) to the recipient (customer). This is not the same as a [return label](#return). *** ## P ### Parcel A parcel is an item to be shipped. ### Platform account Shippo Platform accounts a special kind of account that enables you to control other Shippo accounts, known as Managed Shippo Accounts. This is a popular solution for many applications including marketplaces that support merchants. ### Pickup Pickup refers to a service where a carrier collects a parcel directly from the sender's location for delivery to the recipient. ### Portal See [Shippo API Portal](#api-portal) *** ## Q ### QR code Quick Response (QR) code is a type of barcode that can be scanned using a smartphone or a QR code reader to quickly access information. QR codes are becoming more common in shipping. For example, some carriers provide a service where a user can use a QR to print a shipping label at parcel drop-off location. *** ## R ### Rate Rates are the cost and service levels associated with a shipment. Each Rate returned will have an object ID to identify each unique rate. ### Return A return is when a shipped item is sent back from the recipient to the original sender. ### Rate shopping [Rate shopping](/shipments/rate-shopping-with-carriers) is the practice of comparing costs and services levels of different shipping options to find the option that works best for your shipment. *** ## S ### SDK A Software Development Kit (SDK), is a collection of tools, libraries, documentation, and code samples that developers use to create applications for specific platforms. Shippo provides [SDKs](/guides/client-libraries) in a number of languages to support our developer community. ### Shipping Shipping is the act of transporting goods from a sender to a recipient. ### Shipment A shipment object in the Shippo API represents a package that you intend to ship. It includes details about the sender, recipient, package dimensions, weight, and other attributes necessary for shipping. The shipment is used to request rates from shipping carriers. Each Shipment is identified by an object ID. ### Shippo carrier account Shippo carrier accounts are accounts that Shippo owns. You get access to these carrier accounts when you log into your shippo account. Using Shippo carrier accounts you can purchase labels immediately, without creating your own account with a carrier. The cost to purchase labels is billed through your Shippo account. Using Shippo carrier accounts you can benefit from discounts negotiated by Shippo. ### Service level Shipping service levels refer to the various options provided by carriers that define the speed, cost, and delivery terms of shipping parcels. *** ## T ### Tracking number A tracking number is a unique identifying number that you can use to show the location of your parcel. ### Test token Shippo uses API tokens to authenticate your access to the Shippo API. Shippo has two types of tokens. A live token and a [test token](/guides/testing). Use your test token when you are developing and testing your integration. Using a test token means you will not incur charges. You can use live tokens and test tokens interchangeably. This means you can develop your integration using your test token. When you are ready for production, the only change needed is to replace your test token with your live token. ### Tariff number Often used interchangeably with [HS Code](#hs-code), is a standardized classification used to identify products in international trade. ### Transaction A transaction is the purchase of a shipping label from a shipping provider for a specific service. You can print purchased labels and use them to ship a parcel with a carrier, such as USPS or FedEx. For each transaction, there is an object ID associated with it. *** ## W ### Webhook A [webhook](/tracking/webhooks) is a way for one application to send real-time data or notifications to another application over the web. Webhooks allow systems to communicate with each other by delivering updates or events automatically, without the need for constant polling or manual intervention. ### White label Similar to [gray label](#gray-label), a white label integration is how we describe a platform integration where users do not have their Shippo accounts. A white label or unbranded integration means you provide shipping to your users, but they don't see that it is enabled by another party. A white label integration can be supported through a single Shippo account or through a [Platform account](#platform-account). Shippo will charge you for all the shipments processed through this account. ### Web app The [Shippo web app](https://www.goshippo.com) is the web interface for Shippo. You can use the web app to manage all your shipping needs directly from a browser. The web app includes a large number of features including order management and label creation. *** ## Z ### ZPL Zebra Programming Language (ZPL) is a specialized language used for designing and generating labels on Zebra printers, which are commonly used for [printing shipping labels](/shipments/shipping-label-sizes). # IP addresses and domains Source: https://docs.goshippo.com/api-concepts/ip-addresses-and-domains Find the domain names and IP addresses you need to allowlist for your Shippo API integration. **note** On April 8th 2024, we are updating our IPs for the Shippo API domains. Under most circumstances, this will have no impact on you and your merchants and no changes are required by you. In a small number of cases, if custom traffic filters have been created by your team for Shippo API access, they will need to be updated before this date. If you have applied custom traffic filters, API calls to Shippo may fail if the new IP range is not allowed. To test if you may be impacted by this change, run the following command from your network. ```shell theme={null} curl -o /dev/null -s -w "%{http_code}\n" https://goshippo.com ``` If `200` response is returned, no further action is required. If any other response is returned, you may need to update your custom traffic filters. Refer to the [IP Addresses](#ip-addresses) section for the list of updated IP addresses. ## Domain names For your integration to work with the Shippo API, it must be able to communicate with our qualified domain names. Depending on how your integration operates, you may need to add them to an allowlist. The following list of domain names may be used to communicate with the Shippo API. ``` api.goshippo.com platform-api.goshippo.com ``` ## IP addresses The IP addresses that the Shippo API may resolve to are listed in the [Cloudflare IP Ranges guide](https://www.cloudflare.com/en-gb/ips/). ## Webhook IP addresses Refer to our [Webhook security guide](/tracking/webhook-security) for details on IP addresses used by our webhooks. # Rate limits Source: https://docs.goshippo.com/api-concepts/rate-limits View per-endpoint rate limits for the Shippo API and learn what to do if you need higher limits. Shippo has different rate limits depending on the endpoint and the HTTP verb that is being used (GET, POST, PUT, etc...). Below are the different rate limits defined within Shippo. **All listed rate limits are per minute. Exceeding the rate limit will give a `429` error.** ## Limits | **Endpoint** | POST PUT Live / Test | GET(single) Live / Test | GET(multiple) Live / Test | PUT Live / Test | | ------------------- | -------------------- | ----------------------- | ------------------------- | --------------- | | Address | 500 / 50 | 4000 / 400 | 50 / 10 | 500 / 50 | | Parcel | 500 / 50 | 4000 / 400 | 50 / 10 | 500 / 50 | | Shipment | 500 / 50 | 4000 / 400 | 50 / 10 | 500 / 50 | | Rate | 500 / 50 | 4000 / 400 | 50 / 10 | 500 / 50 | | Transaction | 500 / 50 | 4000 / 400 | 50 / 10 | 500 / 50 | | Customs Item | 500 / 50 | 4000 / 400 | 50 / 10 | 500 / 50 | | Customs Declaration | 500 / 50 | 4000 / 400 | 50 / 10 | 500 / 50 | | Refund | 500 / 50 | 4000 / 400 | 50 / 10 | 500 / 50 | | Manifest | 500 / 50 | 4000 / 400 | 50 / 10 | 500 / 50 | | Carrier Account | 500 / 50 | 4000 / 400 | 50 / 10 | 500 / 50 | | Batch | 50 / 10 | 400 / 40 | 50 / 10 | -- | | Tracking | 750 / 50 | 500 / 50 | -- | -- | ## GET Single vs GET Multiple * GET **Single** -- `https://api.goshippo.com/endpoint/:object_id` request a specific object from that endpoint using the object's `object_id`. * GET **Multiple** -- `https://api.goshippo.com/endpoint/` request a list of objects from a given endpoint. See our [Filtering tutorial](/api-concepts/filtering) for details on returning specific results. ## Need higher limits? [Contact us](https://goshippo.com/contact/sales/) if you require higher rate limits than those found above. # Create a new address Source: https://docs.goshippo.com/api-reference/address-book/create-a-new-address /api-reference/addressesapi/address_v2.yaml post /v2/addresses Stores a new address to your address book # Delete an address Source: https://docs.goshippo.com/api-reference/address-book/delete-an-address /api-reference/addressesapi/address_v2.yaml delete /v2/addresses/{address_id} Removes an existing address from your address book using an object ID # Retrieve a single address Source: https://docs.goshippo.com/api-reference/address-book/retrieve-a-single-address /api-reference/addressesapi/address_v2.yaml get /v2/addresses/{address_id} Returns an existing address using an object ID # Retrieve addresses Source: https://docs.goshippo.com/api-reference/address-book/retrieve-addresses /api-reference/addressesapi/address_v2.yaml get /v2/addresses Returns a list of addresses based on search criteria # Update an address Source: https://docs.goshippo.com/api-reference/address-book/update-an-address /api-reference/addressesapi/address_v2.yaml put /v2/addresses/{address_id} Updates values in an existing address # Create a new address Source: https://docs.goshippo.com/api-reference/addresses/create-a-new-address /spec/shippoapi/public-api.yaml post /addresses Creates a new address object. You can use address objects to create new shipments, calculate rates, and to create orders. # List all addresses Source: https://docs.goshippo.com/api-reference/addresses/list-all-addresses /spec/shippoapi/public-api.yaml get /addresses Returns a list of all address objects that have been created in this account. # Retrieve an address Source: https://docs.goshippo.com/api-reference/addresses/retrieve-an-address /spec/shippoapi/public-api.yaml get /addresses/{AddressId} Returns an existing address using an object ID. # Validate an address Source: https://docs.goshippo.com/api-reference/addresses/validate-an-address /spec/shippoapi/public-api.yaml get /addresses/{AddressId}/validate Validates an existing address using an object ID # Batch Source: https://docs.goshippo.com/api-reference/batch /spec/shippoapi/public-api.yaml webhook batch # Add shipments to a batch Source: https://docs.goshippo.com/api-reference/batches/add-shipments-to-a-batch /spec/shippoapi/public-api.yaml post /batches/{BatchId}/add_shipments Adds batch shipments to an existing batch. # Create a batch Source: https://docs.goshippo.com/api-reference/batches/create-a-batch /spec/shippoapi/public-api.yaml post /batches 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. # Purchase a batch Source: https://docs.goshippo.com/api-reference/batches/purchase-a-batch /spec/shippoapi/public-api.yaml post /batches/{BatchId}/purchase 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 # Remove shipments from a batch Source: https://docs.goshippo.com/api-reference/batches/remove-shipments-from-a-batch /spec/shippoapi/public-api.yaml post /batches/{BatchId}/remove_shipments Removes shipments from an existing batch shipment. # Retrieve a batch Source: https://docs.goshippo.com/api-reference/batches/retrieve-a-batch /spec/shippoapi/public-api.yaml get /batches/{BatchId} 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](https://docs.goshippo.com/docs/api_concepts/filtering/). # Add a Shippo carrier account Source: https://docs.goshippo.com/api-reference/carrier-accounts/add-a-shippo-carrier-account /spec/shippoapi/public-api.yaml post /carrier_accounts/register/new Adds a Shippo carrier account # Connect an existing carrier account using OAuth 2.0 Source: https://docs.goshippo.com/api-reference/carrier-accounts/connect-an-existing-carrier-account-using-oauth-20 /spec/shippoapi/public-api.yaml get /carrier_accounts/{CarrierAccountObjectId}/signin/initiate Used by client applications to setup or reconnect an existing carrier account with carriers that support OAuth 2.0 # Create a new carrier account Source: https://docs.goshippo.com/api-reference/carrier-accounts/create-a-new-carrier-account /spec/shippoapi/public-api.yaml post /carrier_accounts Creates a new carrier account or connects an existing carrier account to the Shippo account. # Get Carrier Registration status Source: https://docs.goshippo.com/api-reference/carrier-accounts/get-carrier-registration-status /spec/shippoapi/public-api.yaml get /carrier_accounts/reg-status Returns the registration status for the given account for the given carrier # List all carrier accounts Source: https://docs.goshippo.com/api-reference/carrier-accounts/list-all-carrier-accounts /spec/shippoapi/public-api.yaml get /carrier_accounts 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. # Retrieve a carrier account Source: https://docs.goshippo.com/api-reference/carrier-accounts/retrieve-a-carrier-account /spec/shippoapi/public-api.yaml get /carrier_accounts/{CarrierAccountId} Returns an existing carrier account using an object ID. # Update a carrier account Source: https://docs.goshippo.com/api-reference/carrier-accounts/update-a-carrier-account /spec/shippoapi/public-api.yaml put /carrier_accounts/{CarrierAccountId} Updates an existing carrier account object. The account_id and carrier can't be updated. This is because they form the unique identifier together. # List all carrier parcel templates Source: https://docs.goshippo.com/api-reference/carrier-parcel-templates/list-all-carrier-parcel-templates /spec/shippoapi/public-api.yaml get /parcel-templates 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=`: filter by specific carrier, e.g. `fedex`, `usps` # Retrieve a carrier parcel templates Source: https://docs.goshippo.com/api-reference/carrier-parcel-templates/retrieve-a-carrier-parcel-templates /spec/shippoapi/public-api.yaml get /parcel-templates/{CarrierParcelTemplateToken} Fetches the parcel template information for a specific carrier parcel template, identified by the token. # Create a new customs declaration Source: https://docs.goshippo.com/api-reference/customs-declarations/create-a-new-customs-declaration /spec/shippoapi/public-api.yaml post /customs/declarations Creates a new customs declaration object # List all customs declarations Source: https://docs.goshippo.com/api-reference/customs-declarations/list-all-customs-declarations /spec/shippoapi/public-api.yaml get /customs/declarations Returns a list of all customs declaration objects # Retrieve a customs declaration Source: https://docs.goshippo.com/api-reference/customs-declarations/retrieve-a-customs-declaration /spec/shippoapi/public-api.yaml get /customs/declarations/{CustomsDeclarationId} Returns an existing customs declaration using an object ID # Create a new customs item Source: https://docs.goshippo.com/api-reference/customs-items/create-a-new-customs-item /spec/shippoapi/public-api.yaml post /customs/items Creates a new customs item object. # List all customs items Source: https://docs.goshippo.com/api-reference/customs-items/list-all-customs-items /spec/shippoapi/public-api.yaml get /customs/items Returns a list all customs items objects. # Retrieve a customs item Source: https://docs.goshippo.com/api-reference/customs-items/retrieve-a-customs-item /spec/shippoapi/public-api.yaml get /customs/items/{CustomsItemId} Returns an existing customs item using an object ID # Create a new manifest Source: https://docs.goshippo.com/api-reference/manifests/create-a-new-manifest /spec/shippoapi/public-api.yaml post /manifests Creates a new manifest object. # List all manifests Source: https://docs.goshippo.com/api-reference/manifests/list-all-manifests /spec/shippoapi/public-api.yaml get /manifests Returns a list of all manifest objects. # Retrieve a manifest Source: https://docs.goshippo.com/api-reference/manifests/retrieve-a-manifest /spec/shippoapi/public-api.yaml get /manifests/{ManifestId} Returns an existing manifest using an object ID. # Create a new order Source: https://docs.goshippo.com/api-reference/orders/create-a-new-order /spec/shippoapi/public-api.yaml post /orders Creates a new order object. # List all orders Source: https://docs.goshippo.com/api-reference/orders/list-all-orders /spec/shippoapi/public-api.yaml get /orders Returns a list of all order objects. # Retrieve an order Source: https://docs.goshippo.com/api-reference/orders/retrieve-an-order /spec/shippoapi/public-api.yaml get /orders/{OrderId} Retrieves an existing order using an object ID. # API Reference Overview Source: https://docs.goshippo.com/api-reference/overview Learn about the Shippo API — authentication, request format, versioning, and core REST principles. First-time users and those looking for specific integration tutorials, see our [full API documentation and guides](/guides/api-quickstart). Download the [API Specification yaml file](/spec/shippoapi/public-api.yaml). ## API Resources All API URLs listed in this documentation are relative to **[https://api.goshippo.com/](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, put `Authorization: ShippoToken ` in your request header. You can find your token on the [Shippo API settings page](https://goshippo.com/user/apikeys/). For more information about authentication and test mode, see our [Authentication guide](/guides/authentication). 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 is also formatted as a 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](http://en.wikipedia.org/wiki/Representational_State_Transfer). 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](/guides/legacy-reference). For more information about Shippo API versions, see our [API versions guide](/api-concepts/api-versioning). # Parcel Templates Source: https://docs.goshippo.com/api-reference/parcel-templates/index Predefined parcel templates with preset dimensions for supported carriers. Use these tokens when creating parcels. # Create a new parcel Source: https://docs.goshippo.com/api-reference/parcels/create-a-new-parcel /spec/shippoapi/public-api.yaml post /parcels Creates a new parcel object. # List all parcels Source: https://docs.goshippo.com/api-reference/parcels/list-all-parcels /spec/shippoapi/public-api.yaml get /parcels Returns a list of all parcel objects. # Retrieve an existing parcel Source: https://docs.goshippo.com/api-reference/parcels/retrieve-an-existing-parcel /spec/shippoapi/public-api.yaml get /parcels/{ParcelId} Returns parcel details using an existing parcel object ID (this will not return parcel details associated with un-purchased shipment/rate parcel object IDs). # Parse Address Source: https://docs.goshippo.com/api-reference/parser/parse-address /api-reference/addressesapi/address_v2.yaml get /v2/addresses/parse Parses a single string into an Address model # Create a pickup Source: https://docs.goshippo.com/api-reference/pickups/create-a-pickup /spec/shippoapi/public-api.yaml post /pickups Creates a pickup object. This request is for a carrier to come to a specified location to take a package for shipping. # Clear current default parcel template Source: https://docs.goshippo.com/api-reference/rates-at-checkout/clear-current-default-parcel-template /spec/shippoapi/public-api.yaml delete /live-rates/settings/parcel-template Clears the currently configured default parcel template for live rates. # Generate a live rates request Source: https://docs.goshippo.com/api-reference/rates-at-checkout/generate-a-live-rates-request /spec/shippoapi/public-api.yaml post /live-rates 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. # Show current default parcel template Source: https://docs.goshippo.com/api-reference/rates-at-checkout/show-current-default-parcel-template /spec/shippoapi/public-api.yaml get /live-rates/settings/parcel-template Retrieve and display the currently configured default parcel template for live rates. # Update default parcel template Source: https://docs.goshippo.com/api-reference/rates-at-checkout/update-default-parcel-template /spec/shippoapi/public-api.yaml put /live-rates/settings/parcel-template 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. # Retrieve a rate Source: https://docs.goshippo.com/api-reference/rates/retrieve-a-rate /spec/shippoapi/public-api.yaml get /rates/{RateId} Returns an existing rate using a rate object ID. Rates older than 390 days are not returned. # Retrieve shipment rates Source: https://docs.goshippo.com/api-reference/rates/retrieve-shipment-rates /spec/shippoapi/public-api.yaml get /shipments/{ShipmentId}/rates Returns a paginated list of rates associated with a shipment. Rates for shipments older than 390 days are not returned. # Retrieve shipment rates in currency Source: https://docs.goshippo.com/api-reference/rates/retrieve-shipment-rates-in-currency /spec/shippoapi/public-api.yaml get /shipments/{ShipmentId}/rates/{CurrencyCode} 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](http://openexchangerates.org/api/currencies.json). Note: re-requesting the rates with a different currency code will re-queue the shipment (i.e. set the Shipment's `status` to `QUEUED`) and the converted currency rates will only be available when the Shipment's `status` is set to `SUCCESS`. Rates for shipments older than 390 days are not returned. # Create a refund Source: https://docs.goshippo.com/api-reference/refunds/create-a-refund /spec/shippoapi/public-api.yaml post /refunds Creates a new refund object. # List all refunds Source: https://docs.goshippo.com/api-reference/refunds/list-all-refunds /spec/shippoapi/public-api.yaml get /refunds/ Returns a list all refund objects. # Retrieve a refund Source: https://docs.goshippo.com/api-reference/refunds/retrieve-a-refund /spec/shippoapi/public-api.yaml get /refunds/{RefundId} Returns an existing rate using a rate object ID. # Create a new service group Source: https://docs.goshippo.com/api-reference/service-groups/create-a-new-service-group /spec/shippoapi/public-api.yaml post /service-groups Creates a new service group. # Delete a service group Source: https://docs.goshippo.com/api-reference/service-groups/delete-a-service-group /spec/shippoapi/public-api.yaml delete /service-groups/{ServiceGroupId} Deletes an existing service group using an object ID. # List all service groups Source: https://docs.goshippo.com/api-reference/service-groups/list-all-service-groups /spec/shippoapi/public-api.yaml get /service-groups Returns a list of service group objects. # Update an existing service group Source: https://docs.goshippo.com/api-reference/service-groups/update-an-existing-service-group /spec/shippoapi/public-api.yaml put /service-groups Updates an existing service group object. The object_id cannot be updated as it is the unique identifier for the object. # Service Levels Source: https://docs.goshippo.com/api-reference/service-levels/index Service level tokens for all supported carriers. Use these tokens when creating shipments, transactions, and rates. # Create a new shipment Source: https://docs.goshippo.com/api-reference/shipments/create-a-new-shipment /spec/shippoapi/public-api.yaml post /shipments Creates a new shipment object. # List all shipments Source: https://docs.goshippo.com/api-reference/shipments/list-all-shipments /spec/shippoapi/public-api.yaml get /shipments Returns a list of all shipment objects. To filter results, use the optional query parameters below. Provided dates should be ISO 8601 UTC dates (timezone offsets are currently not supported). - `object_created_gt`: object(s) created after the provided date time - `object_created_gte`: object(s) created at or after the provided date time - `object_created_lt`: object(s) created before the provided date time - `object_created_lte`: object(s) created at or before the 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` Note: Shipment objects older than 390 days are not returned. # Retrieve a shipment Source: https://docs.goshippo.com/api-reference/shipments/retrieve-a-shipment /spec/shippoapi/public-api.yaml get /shipments/{ShipmentId} Returns an existing shipment using an object ID. Shipment objects older than 390 days are not returned. # Create a Shippo Account Source: https://docs.goshippo.com/api-reference/shippo-accounts/create-a-shippo-account /spec/shippoapi/public-api.yaml post /shippo-accounts Creates a new [Shippo Managed Account](https://docs.goshippo.com/docs/platformaccounts/platform_using_accounts/). # List all Shippo Accounts Source: https://docs.goshippo.com/api-reference/shippo-accounts/list-all-shippo-accounts /spec/shippoapi/public-api.yaml get /shippo-accounts Returns a list of Shippo Managed Accounts objects. # Retrieve a Shippo Account Source: https://docs.goshippo.com/api-reference/shippo-accounts/retrieve-a-shippo-account /spec/shippoapi/public-api.yaml get /shippo-accounts/{ShippoAccountId} Returns a Shippo Managed Account using an object ID. # Update a Shippo Account Source: https://docs.goshippo.com/api-reference/shippo-accounts/update-a-shippo-account /spec/shippoapi/public-api.yaml put /shippo-accounts/{ShippoAccountId} Updates a Shippo Managed Account using an object ID. # Track Source: https://docs.goshippo.com/api-reference/track /spec/shippoapi/public-api.yaml webhook track # Get a tracking status Source: https://docs.goshippo.com/api-reference/tracking-status/get-a-tracking-status /spec/shippoapi/public-api.yaml get /tracks/{Carrier}/{TrackingNumber} Returns the tracking status of a shipment using a carrier name and a tracking number. # Register a tracking webhook Source: https://docs.goshippo.com/api-reference/tracking-status/register-a-tracking-webhook /spec/shippoapi/public-api.yaml post /tracks 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](https://docs.goshippo.com/docs/tracking/webhooks/) and [Tracking](https://docs.goshippo.com/docs/tracking/tracking/). # Transaction Source: https://docs.goshippo.com/api-reference/transaction /spec/shippoapi/public-api.yaml webhook transaction # Create a shipping label Source: https://docs.goshippo.com/api-reference/transactions/create-a-shipping-label /spec/shippoapi/public-api.yaml post /transactions Creates a new transaction object and purchases the shipping label using a rate object that has previously been created. Alternatively, creates a new transaction object and purchases the shipping label instantly using shipment details, an existing carrier account, and an existing service level token. # List all shipping labels Source: https://docs.goshippo.com/api-reference/transactions/list-all-shipping-labels /spec/shippoapi/public-api.yaml get /transactions Returns a list of all transaction objects. # Retrieve a shipping label Source: https://docs.goshippo.com/api-reference/transactions/retrieve-a-shipping-label /spec/shippoapi/public-api.yaml get /transactions/{TransactionId} Returns an existing transaction using an object ID. # Create a new user parcel template Source: https://docs.goshippo.com/api-reference/user-parcel-templates/create-a-new-user-parcel-template /spec/shippoapi/public-api.yaml post /user-parcel-templates 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](/shippoapi/public-api/parcel-templates) 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." # Delete a user parcel template Source: https://docs.goshippo.com/api-reference/user-parcel-templates/delete-a-user-parcel-template /spec/shippoapi/public-api.yaml delete /user-parcel-templates/{UserParcelTemplateObjectId} Deletes a user parcel template using an object ID. # List all user parcel templates Source: https://docs.goshippo.com/api-reference/user-parcel-templates/list-all-user-parcel-templates /spec/shippoapi/public-api.yaml get /user-parcel-templates Returns a list all of all user parcel template objects. # Retrieves a user parcel template Source: https://docs.goshippo.com/api-reference/user-parcel-templates/retrieves-a-user-parcel-template /spec/shippoapi/public-api.yaml get /user-parcel-templates/{UserParcelTemplateObjectId} Returns the parcel template information for a specific user parcel template, identified by the object ID. # Update an existing user parcel template Source: https://docs.goshippo.com/api-reference/user-parcel-templates/update-an-existing-user-parcel-template /spec/shippoapi/public-api.yaml put /user-parcel-templates/{UserParcelTemplateObjectId} Updates an existing user parcel template. # Validate address Source: https://docs.goshippo.com/api-reference/validation/validate-address /api-reference/addressesapi/address_v2.yaml get /v2/addresses/validate Returns validation test results along with a recommended address. Validates both US and international addresses. **US required combinations** - state_province + city_locality + address_line_1 - or address_line_1 + postal_code **International required combinations** - city_locality + address_line_1 # Create a new webhook Source: https://docs.goshippo.com/api-reference/webhooks/create-a-new-webhook /spec/shippoapi/public-api.yaml post /webhooks Creates a new webhook to send notifications to a URL when a specific event occurs. # Delete a specific webhook Source: https://docs.goshippo.com/api-reference/webhooks/delete-a-specific-webhook /spec/shippoapi/public-api.yaml delete /webhooks/{webhookId} Deletes a specific webhook using the webhook object ID. # List all webhooks Source: https://docs.goshippo.com/api-reference/webhooks/list-all-webhooks /spec/shippoapi/public-api.yaml get /webhooks Returns a list of all webhooks you have created. # Retrieve a specific webhook Source: https://docs.goshippo.com/api-reference/webhooks/retrieve-a-specific-webhook /spec/shippoapi/public-api.yaml get /webhooks/{webhookId} Returns the details of a specific webhook using the webhook object ID. # Update an existing webhook Source: https://docs.goshippo.com/api-reference/webhooks/update-an-existing-webhook /spec/shippoapi/public-api.yaml put /webhooks/{webhookId} Updates an existing webhook using the webhook object ID. # Refunding labels Source: https://docs.goshippo.com/billing-and-invoices/refunding-labels Learn how to request refunds for unused shipping labels via the Shippo API, including refund statuses and carrier policies. You can request a refund for any successfully created but unused shipping labels. Refunds include the shipment's postage, additional insurance (if applicable), and any per-label creation fee. Refunds are subject to the policies of the applicable carrier. ## Create a refund To refund a shipping label, POST the Transaction object ID of the label to the [Refund Endpoint](/api-reference/refunds/list-all-refunds). ```shell cURL theme={null} curl https://api.goshippo.com/refunds/\ -H "Authorization: ShippoToken "\ -d transaction="4503427478ea45a899e9b54abc4c5803" ``` ```python Python theme={null} refund = shippo_sdk.refunds.create(transaction="35ed59f23a514ecfa2faeaed93a00086", async_=False) ``` ```php PHP theme={null} $refund = Shippo_Refund::create( array("transaction" => "35ed59f23a514ecfa2faeaed93a00086", "async" => false)); ``` ```typescript TypeScript theme={null} const refund = await shippo.refunds.create("35ed59f23a514ecfa2faeaed93a00086", false); ``` ```java Java theme={null} HashMap createRefundMap = new HashMap(); createRefundMap.put("transaction", "35ed59f23a514ecfa2faeaed93a00086"); createRefundMap.put("async", false); Refund.create(createRefundMap); ``` ```csharp C# theme={null} Refund refund = await sdk.Refunds.CreateAsync( new RefundRequestBody() { Async = false, Transaction = "35ed59f23a514ecfa2faeaed93a00086", } ); ``` At the moment, you may only request a refund for one shipping label at a time. The API will return the following response: ```shell theme={null} { "object_created": "2014-04-21T07:12:41.044Z", "object_id": "bd7b8379a2e847bcb0818125943dde5d", "object_owner": "shippotle@shippo.com", "object_updated": "2014-04-21T07:12:41.045Z", "status": "QUEUED", "transaction": "35ed59f23a514ecfa2faeaed93a00086" } ``` Possible statuses include: * `QUEUED`: The request is being processed by Shippo. * `PENDING`: Waiting for more tracking data from carriers, this could take up to 14 days. * `ERROR`: Refund rejected, the shipment was found to be used. * `SUCCESS`: Refund accepted, a negative line item will be added to your next Shippo invoice. ## Information about refunds * Refunds include the cost of the shipping label, insurance (if applicable), and the Shippo label fee. * Please note that all refund requests must be submitted within 90 days from the day you purchased the label. * Once a refund has been claimed, you cannot use the shipping label for sending packages -- it will be rejected. * Refund requests are processed within 14 business days from the date the refund was requested, provided the label has not been used. * Refund requests will be rejected if the label is used or scanned by the carrier. Contact [Shippo customer support](https://support.goshippo.com/hc/en-us/requests/new) for more information. * You will see refunds appear as a negative line item in your next Shippo invoice. * Although some carriers don't charge you until a package is scanned into their system, you would still need to refund an unused shipping label in Shippo to refund the Shippo label fee and any insurance that you had purchased through Shippo. * As a reminder, USPS labels must be used within 30 days of purchase. If you have a USPS label you purchased and do not intend to use, you can request a label refund. # Carrier accounts Source: https://docs.goshippo.com/carriers/carrier-accounts Connect Shippo carrier accounts or your own carrier accounts to get shipping rates and purchase labels through the API. The Shippo API uses carrier accounts to connect to carriers to use their services, such as purchasing a label. You can use the Shippo API to add, modify, and deactivate which carriers your Shippo account uses. Using the Shippo API, you can connect multiple carrier accounts giving you rates from multiple carriers when you create a shipment. Shippo supports two types of carrier accounts. 1. Shippo carrier account. These are Shippo’s accounts with specific carriers. Using Shippo carrier accounts you can purchase labels immediately, without creating your account with a carrier. The cost to purchase labels is billed through your Shippo account. Using Shippo carrier accounts you can benefit from discounts negotiated by Shippo. 2. Your own carrier accounts. These are accounts that you have created yourself with a supported carrier. You can add your carrier account details to your Shippo account, allowing Shippo to manage your label creation. The cost of purchasing labels is billed through the account you created with your carrier. ## Connecting Shippo carrier accounts By default, you have access to Shippo's carrier accounts for U.S. outbound shipments to retrieve shipping rates and purchase labels. When Shippo adds new carrier accounts, they are automatically enabled on your account. **note** UPS requires Terms and Conditions to be accepted, so you must use the Shippo Web App and navigate to the Carriers Settings page and click "Activate Account" for UPS to view and accept the Terms and Conditions. Before starting the UPS OAuth authentication flow, it is critical to add every UPS account number to your ups.com user ID. See [this guide](/carriers/adding-ups-accounts/adding-an-account) for instructions. ## Connecting your own carrier account You can connect your own carrier accounts using the [Shippo Web App](https://support.goshippo.com/hc/en-us/articles/360024209911-How-to-Connect-Your-Own-Carrier-Account) or through the API. Follow this guide to learn about connecting your carriers using the Shippo API. Shippo supports all carriers [listed below](#account-structure-by-carrier) for your own carrier accounts. To connect your carrier account to your Shippo account, you must create a carrier account object. Each carrier account has different properties that must be shared with Shippo. Refer to the [list below](#account-structure-by-carrier) to identify which properties are required for your chosen carrier. **Note** Before continuing, you must have created your account with your chosen carrier and obtained the required properties as [listed below](#account-structure-by-carrier). The Carrier Account object can be created ([POST](/api-reference/carrier-accounts/create-a-new-carrier-account)), modified or de-activated ([PUT](/api-reference/carrier-accounts/update-a-carrier-account)), or retrieved ([GET](/api-reference/carrier-accounts/retrieve-a-carrier-account)). You can also list ([GET](/api-reference/carrier-accounts/list-all-carrier-accounts)) all accounts. To connect your own carrier account and create a carrier account object, follow this example. ```shell cURL theme={null} curl -X POST https://api.goshippo.com/carrier_accounts/\ -H "Authorization: ShippoToken " \ -H 'Content-Type: application/json' \ -d '{ "carrier": "fedex", "account_id": "", "parameters": { "first_name": "", "last_name": "", "phone_number": "", "from_address_st": "", "from_address_city": "", "from_address_state": "", "from_address_zip": "", "from_address_country_iso2": "", "use_multi_factor_registration": true, "verification_option": "" } }' ``` ```python Python theme={null} fedex_account = shippo_sdk.carrier_accounts.create( components.ConnectExistingOwnAccountRequest( carrier="fedex", account_id="", parameters={ "first_name": "", "last_name": "", "phone_number": "", "from_address_st": "", "from_address_city": "", "from_address_state": "", "from_address_zip": "", "from_address_country_iso2": "", "use_multi_factor_registration": True, "verification_option": "" }, active=True ) ) ``` ```php PHP theme={null} $fedex_account = Shippo_CarrierAccount::create(array( 'carrier' => 'fedex', 'account_id' => '', 'parameters' => array('first_name' => '', 'last_name' => 'YOUR_LAST_NAME', 'phone_number' => '', 'from_address_st' => '', 'from_address_city' => '', 'from_address_state' => '', 'from_address_zip' => '', 'from_address_country_iso2' => '', 'use_multi_factor_registration' => true, 'verification_option' => ''), 'test' => false, 'active' => true )); ``` ```typescript TypeScript theme={null} const fedExParameters: FedExConnectExistingOwnAccountParameters = { firstName: "", lastName: "", phoneNumber: "", fromAddressSt: "", fromAddressCity: "", fromAddressState: "", fromAddressZip: "", fromAddressCountryIso2: "", useMultiFactorRegistration: true, verificationOption: "" } const fedExAccount = await shippo.carrierAccounts.create({ carrier: CarriersEnum.Fedex.valueOf(), accountId: "", parameters: fedExParameters, test: true, active: true }); ``` ```java Java theme={null} HashMap accountMap = new HashMap(); accountMap.put("carrier", "fedex"); accountMap.put("account_id", ""); accountMap.put("parameters", new HashMap() { { put("first_name", ""); put("last_name", "YOUR_LAST_NAME"); put("phone_number", ""); put("from_address_st", ""); put("from_address_city", ""); put("from_address_state", ""); put("from_address_zip", ""); put("from_address_country_iso2", ""); put("use_multi_factor_registration", true); put("verification_option", ""); } }); accountMap.put("test", Boolean.FALSE); accountMap.put("active", Boolean.TRUE); CarrierAccount fedex_account = CarrierAccount.create(accountMap); ``` ```cs C# theme={null} CarrierAccount fedexAccount = await sdk.CarrierAccounts.CreateAsync( new ConnectExistingOwnAccountRequest() { Carrier = CarriersEnum.Fedex.Value(), AccountId = "", Parameters = ConnectExistingOwnAccountRequestParameters.CreateFedExConnectExistingOwnAccountParameters( new FedExConnectExistingOwnAccountParameters() { FirstName = "", LastName = "", PhoneNumber = "", FromAddressSt = "", FromAddressCity = "", FromAddressState = "", FromAddressZip = "", FromAddressCountryIso2 = "", UseMultiFactorRegistration = true, VerificationOption = "", } ), Active = true, Test = false, } ); ``` For FedEx, the shipping address in `from_address_*` must match what you have on file with FedEx (see your [fedex.com profile](https://fedex.com)). The `verification_option` and verification fields (`verification_pin`, `verification_invoice_number`, `verification_invoice_amount`, `verification_invoice_date`, `verification_invoice_currency`) are optional and depend on the verification method you use (SMS, EMAIL, CALL, or INVOICE). The API will respond with the JSON serialized carrier account object: ```json theme={null} { "account_id": "", "active": true, "carrier": "fedex", "object_id": "b741b99f95e841639b54272834bc478c", "object_owner": "shippotle@shippo.com", "parameters": { "first_name": "", "last_name": "YOUR_LAST_NAME", "phone_number": "", "from_address_st": "", "from_address_city": "", "from_address_state": "", "from_address_zip": "", "from_address_country_iso2": "", "use_multi_factor_registration": true, "verification_option": "" }, "test": false, "active": true, "is_shippo_account": false, "metadata": "" } ``` Refer to our [carrier capabilities](/carriers/carrier-capabilities) for a full list of supported carriers and their capabilities. ## Using carrier accounts in Shipments You can specify which carrier accounts you want to use on a per-shipment basis by passing in each account's `object_id` in the shipment's `carrier_accounts` field as a list. If you don't specify which accounts to use, Shippo will use all your active accounts for this shipment. ```shell cURL theme={null} curl https://api.goshippo.com/shipments/\ -H "Authorization: ShippoToken "\ -d address_from="d799c2679e644279b59fe661ac8fa488"\ -d address_to="42236bcf36214f62bcc6d7f12f02a849"\ -d parcels=["7df2ecf8b4224763ab7c71fae7ec8274"]\ -d carrier_accounts=["b741b99f95e841639b54272834bc478c", "b741b99f95e841639b54272834bc478c" ]\ -d async=false ``` ```python Python theme={null} shipment = shippo_sdk.shipments.create( components.ShipmentCreateRequest( address_from=address_from, address_to=address_to, parcels=[parcel], carrier_accounts=['b741b99f95e841639b54272834bc478c'], async_=False ) ) ``` ```php PHP theme={null} $shipment = Shippo_Shipment::create(array( 'address_from'=> $fromAddress, 'address_to'=> $toAddress, 'parcels'=> array($parcel), 'carrier_accounts' => array('b741b99f95e841639b54272834bc478c'), 'async' => false )); ``` ```typescript TypeScript theme={null} const shipment = await shippo.shipments.create({ addressFrom: addressFrom, addressTo: addressTo, parcels: [parcel], carrierAccounts: ['b741b99f95e841639b54272834bc478c'], async: false }); ``` ```java Java theme={null} HashMap shipmentMap = new HashMap(); shipmentMap.put("address_to", toAddressMap); shipmentMap.put("address_from", fromAddressMap); shipmentMap.put("parcels", parcelMap); shipmentMap.put("carrier_accounts", new String[]{"b741b99f95e841639b54272834bc478c"}); shipmentMap.put("async", false); Shipment shipment = Shipment.create(shipmentMap); ``` ```cs C# theme={null} Shipment shipment = await sdk.Shipments.CreateAsync( new ShipmentCreateRequest() { AddressFrom = addressFrom, AddressTo = addressTo, Parcels = new List() { parcel }, CarrierAccounts = new List() { "b741b99f95e841639b54272834bc478c" }, Async = false, } ); ``` ## Filtering carrier accounts You can filter carrier accounts by `carrier` and `account_id`: ```shell cURL theme={null} curl https://api.goshippo.com/carrier_accounts/?carrier=fedex\ -H "Authorization: ShippoToken "\ ``` ```python Python theme={null} shippo_sdk.carrier_accounts.list( operations.ListCarrierAccountsRequest( carrier=components.CarriersEnum.FEDEX ) ) ``` ```php PHP theme={null} Shippo_CarrierAccount::all(array('carrier'=> 'fedex')) ``` ```typescript TypeScript theme={null} shippo.carrierAccounts.list({ carrier: CarriersEnum.Fedex }); ``` ```java Java theme={null} CarrierAccount.getByCarrier("fedex"); ``` ```cs C# theme={null} await sdk.CarrierAccounts.ListAsync( new ListCarrierAccountsRequest() { Carrier = CarriersEnum.Fedex, } ); ``` ## Account structure by carrier Each carrier has its own type of fields. Browse the list below to find the required fields for the carriers you want to use. ### APC Postal *** ```json theme={null} { "carrier": "apc_postal", "account_id": "12345", // APC Postal Account ID "parameters": { "processing_site": "NJ" // APC Postal Processing Site }, ... } ``` ### APG *** ```json theme={null} { "carrier": "apg", "account_id": "12345", // Unique identificator of account "parameters": { "account_id": "shippo", // APG Account username "password": "shippo", // APG Account password "sender_code": "sti.us.sender_code" // APG Sender Code } } ``` ### Asendia *** ```json theme={null} { "carrier": "asendia_us", "account_id": "123", // Asendia account number "parameters": { "asendia_user_login": "usertesting", // Asendia user login "asendia_user_password": "1234512345", // Asendia user password "ftp_username": "testtest", "ftp_password": "xyz123", "company_name": "Your Company Name", // Required (displays on manifest) "permit_no": "234" }, ... } ``` ### Australia Post *** #### Australia Post eParcel ```json theme={null} { "carrier": "australia_post", "account_id": "123456", // Australia Post account number "parameters": { "api_key": "yourapikey", // Australia Post API key "password": "testpass" // Australia Post password }, ... } ``` #### Australia Post MyPost ```json theme={null} { "account_id": "12345", "carrier": "australia_post", "parameters": { "is_mypost": true, "merchant_token": "yourPartnerToken" }, "test": false, "active": true } ``` ### BetterTrucks *** ```json theme={null} { "carrier": "better_trucks", "account_id": "100", // unique identifier of account "parameters": { "api_key": "XXXX-XXXXX-XXXXX", // API Key provided by BetterTrucks "account_id": "100" // Identifier for account }, "test": false, "active": true } ``` ### Canada Post *** ```json theme={null} { "carrier": "canada_post", "account_id": "shippo_api", // Canada Post API username "parameters": { "api_password": "HipposDontLie!", // Canada Post API password "customer_number": "413781", // Canada Post customer number "contract_id": "910412", // Canada Post contract number (optional) "payment_method": "Account" // Payment method for account, 'CreditCard' or 'Account' (optional) "use_manifests": true // Indicates that shipments will be linked with a manifest (contract customers only; optional) }, ... } ``` ### Deutsche Post *** ```json theme={null} { "carrier": "deutsche_post", "account_id": "test@test.com", // Deutsche Post username "parameters": { "password": "testpass" // Deutsche Post password }, ... } ``` ### DHL eCommerce *** ```json theme={null} { "carrier": "dhl_ecommerce", "account_id": "dhl_ecommerce", // Custom account identifier "parameters": { "username": "HipposDontLie!", // DHL eCommerce client ID "password": "shipshippo", // DHL eCommerce client secret "pickup_no": "123123", // DHL eCommerce pickup number "facility_code": "23" // DHL eCommerce facility code }, ... } ``` ### DHL Express *** ```json theme={null} { "carrier": "dhl_express", "account_id": "123456789", // DHL account number "parameters": { "password": "", // Password from DHL Express "site_id": "", // Site ID from DHL Express (from DHL account manager/rep or email) "payment_country": "US" // ISO2 code of the country associated with the account }, "active": true, "is_shippo_account": false } ``` ### DHL Germany *** ```json theme={null} { "carrier": "dhl_germany", "account_id": "2222222222", // The first 10 digits of your DHL account number "parameters": { "business_customer_portal_username": "dhl_shippo", // DHL username for www.dhl-geschaeftskundenportal.de "business_customer_portal_password": "HipposDontLie!", // DHL password for www.dhl-geschaeftskundenportal.de "default_participation_code": "01", // The last 2 digits of your DHL account number "tracking_account": "978346", // DHL tracking account (optional) "tracking_password": "HipposAreBack!" // DHL tracking password (optional) }, ... } ``` ### DPD UK *** ```json theme={null} { "carrier": "dpd_uk", "account_id": "abc123", // DPD UK Account Name "parameters": { "username": "USERNAME", // DPD UK Username "password": "PASSWORD" // DPD UK Password }, ... } ``` ### ePost Global *** ```json theme={null} { "carrier": "rr_donnelley", "account_id": "1111", "parameters": { "processing_site": "LAX" "company_name": "Company" }, ... } ``` ### EVRi UK *** **Note** Hermes UK have changed their name to EVRi. To support existing customers already using this carrier, we have continued to use the `hermes` name in our API configuration. ```json theme={null} { "carrier": "hermes_uk", "account_id": "hermes_account_1", "parameters": { "hermes_uk_api_user": "user-name", "hermes_uk_api_password": "1234qwerty", "hermes_uk_client_id": 123, "hermes_uk_client_name": "CompanyName", "hermes_uk_parcel_shop_api_user": "ABC1234", "hermes_uk_parcel_shop_api_password": "12345678" }, ... } ``` ### FedEx *** ```json theme={null} { "carrier": "fedex", "account_id": "321123", //Fedex account number "parameters": { "first_name": "Hippo", //Your first name "last_name": "Hippovich", // Your last name "phone_number": "1234567890", // Your phone number "from_address_st": "250 Union St", // Shipping address must match what you have on file with FedEx (see fedex.com profile) "from_address_city": "San Francisco", "from_address_state": "CA", "from_address_zip": "94133", "from_address_country_iso2": "US", "use_multi_factor_registration": true, //Determines use of the multi-factor registration workflow. If true, the account will be registered using the multi-factor registration workflow. If false, the account will be registered using the standard registration workflow. "verification_option": "SMS", //Determines the verification option to use for the account registration (Enum: SMS, EMAIL, CALL, INVOICE). "verification_pin": "12345", //(optional) The PIN to verify the account. "verification_invoice_number": "9922232", //(optional) The invoice number to verify the account. "verification_invoice_amount": "340", //(optional) The invoice amount to verify the account. "verification_invoice_date": "2024-03-09", //(optional) The invoice date to verify the account. In the format `YYYY-MM-DD`. "verification_invoice_currency": "12345" //(optional) The invoice currency to verify the account. }, "active": true, "test": false } ``` ### Globegistics *** ```json theme={null} { "carrier": "globegistics", "account_id": "Name of this account", // The name of this account on Shippo "parameters": { "account_number": "123456", // Globegistics Account Number "api_key": "123456789", // Globegistics API Key }, ... } ``` ### GLS US *** ```json theme={null} { "carrier": "gls_us", "account_id": "1111", // GLS US account number "parameters": { "api_token": "your_account_pw", // GLS US account password "username": "your_account_username", // GLS US account username }, ... } ``` ### LaserShip *** ```json theme={null} { "carrier": "lasership", "account_id": "01isf7yzmpsbfy02172gyu2ek78", // LaserShip API key "parameters": { "lasership_apiid": "c27908r07cc20r893270adsc0402", // LaserShip API ID "critical_pull_time": "16:00" }, ... } ``` ### Mondial Relay *** ```json theme={null} { "carrier": "mondialrelay", "account_id": "9328271", // Mondial Relay merchant ID "parameters": { "key": "JBHOS29JH19N7V6SJ89MK10K" // Mondial Relay key }, ... } ``` ### OnTrac *** ```json theme={null} { "carrier": "ontrac", "account_id": "37", // OnTrac account number "parameters": { "password": "testpass" // OnTrac provided password }, ... } ``` ### Purolator *** ```json theme={null} "carrier": "purolator", "account_id": "shippo_purolator", // Purolator account number "parameters": { "production_key": "345345", // Purolator production key "production_key_password": "abcdef" // Purolator production key password }, ... } ``` ### Swyft *** ```json theme={null} { "carrier": "swyft", "object_owner": "user@shippo.com", "account_id": "unique_account_id", "parameters": { "api_key": "11111-22222-33333-44444" // Swyft API Key }, "test": false, "active": true, "is_shippo_account": false, "metadata": "Account Name", "carrier_name": "Swyft" } ``` ### UDS *** ```json theme={null} { "carrier": "uds", "account_id": "12345", // UDS Client ID "parameters": { "client_key": "grteehj54tjgf", // UDS Client Key "UDS_TRACK_API_USER_ID": "shippo", // UDS Username for tracking "UDS_TRACK_API_PASSWORD": "shippo", // UDS Password for tracking } } ``` ### UPS *** ```json theme={null} { "carrier": "ups", "active": true, "metadata": "UPS Account", "account_id": "myupsuser", // UPS user ID "parameters": { "account_number": "AB1234", // UPS account number "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, "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, "surepost": false, // Add Surepost rating (optional) "cost_center": "shippo", // Mail Innovations cost center (optional) "usps_endorsement": "3", // Mail Innovations USPS endorsement (optional) "customer_id": "1234", // Mail Innovations UPS customer ID (optional) "customer_guid": "1234-abcde" // Mail Innovations UPS customer GUID (optional) }, "test": false } ``` ### Veho *** ```json theme={null} { "carrier": “veho”, "account_id": "Name of this account", // The name of this account on Shippo "parameters": { "api_key": "123456789", // Veho API Key }, "test": false, "active": true, } ``` # Carrier capabilities Source: https://docs.goshippo.com/carriers/carrier-capabilities View supported features, service areas, and account requirements for each carrier available through the Shippo API. Shippo provides access to a global network of shipping providers. Each carriers has its own rules and restrictions, you can find details here. APC postal logo ## APC Postal Countries served:\ US to international destinations Supported features: * Shipping rates * Shipping labels * Tracking * Manifests * Instalabel single call label generation * [Reference fields](/carriers/carrier-reference-fields) * [Label formats](/shipments/shipping-label-sizes#shipping-label-format-sizes): PNG, 4×6 inch PDF, 8.5×11 inch PDF, ZPL II Account information required: * APC Postal Account Number * APC Postal Processing Site *** APG logo ## APG Countries Served:\ US outbound international shipments to Australia, New Zealand, United Kingdom, Singapore, and Israel. Supported features: * Shipping labels * Tracking * [Reference fields](/carriers/carrier-reference-fields) * [Label formats](/shipments/shipping-label-sizes#shipping-label-format-sizes): PNG, 2.3×7.5 inch PNG, 8.5×11 inch PDF, 4×6 inch PDF, 2.3×7.5 inch PDF, ZPL II, A4 PDF, A6 PDF Account information required: * APG Username * APG Password * APG Sender Code *** Asendia logo ## Asendia Service area:\ United States outbound shipments to international destinations only Supported features: * Shipping rates * Shipping labels * Tracking * Manifests * Signature confirmation * [Reference fields](/carriers/carrier-reference-fields) * [Label formats](/shipments/shipping-label-sizes#shipping-label-format-sizes): PNG, 4×6 inch PDF, 8.5×11 inch PDF, ZPL II Account information required: * Asendia User Login * Asendia User Password * Asendia FTP Username * Asendia FTP Password * Company Name Registered with Asendia * Asendia Permit Number * Asendia Rate Table (optional, to display rates before purchasing. Please contact [support@shippo.com](mailto:support@shippo.com) for more details) *** Australia Post logo ## Australia Post Countries served:\ Australia outbound shipments to domestic and international destinations Supported features: * Shipping rates * Shipping labels * Australia address validation * Tracking * Manifests * [Reference fields](/carriers/carrier-reference-fields) * [Label formats](/shipments/shipping-label-sizes#shipping-label-format-sizes): 4×6 inch PDF, 8.5×11 inch PDF, A4 PDF, A5 PDF, A6 PDF, ZPL II * Signature confirmation **note** Australia Post supports ZPL II for [CN22 labels](https://auspost.com.au/business/shipping/international-shipping/cn22-changes) but do support ZPL II for CN23 labels. Account information required: * Australia Post account number * Australia Post API key\ [(see our FAQ on how to get get your Australia Post API key)](http://support.goshippo.com/hc/en-us/articles/210122883-How-do-I-connect-my-Australia-Post-account-with-Shippo-) * Australia Post password *** Aramex logo ## Aramex Australia Shippo offers a Shippo carrier account upon sign up. Countries served:\ Australia outbound shipments to domestic destinations only Supported features: * Shipping rates * Shipping labels * Tracking * [Label formats](/shipments/shipping-label-sizes#shipping-label-format-sizes): PNG, 4×6 inch PDF, 8.5×11 inch PDF, A4 PDF, A6 PDF, ZPL II *** Better Trucks logo ## Better Trucks Countries served:\ United States outbound shipments to domestic destinations Supported features: * Shipping rates * Shipping labels * Tracking * Instalabel single call label generation * [Label formats](/shipments/shipping-label-sizes#shipping-label-format-sizes): PNG, 4×6 inch PDF, PDF A4 & PDF A6 labels *** Canada Post logo ## Canada Post Countries served:\ Canadian outbound shipments to domestic and international destinations Supported features: * Shipping rates * Shipping labels * Tracking * Manifest * [Reference fields](/carriers/carrier-reference-fields) * [Label formats](/shipments/shipping-label-sizes#shipping-label-format-sizes): 8.5×11 inch PDF, 4×6 inch PDF Account information required: * Canada Post customer number * Canada Post API username and password\ [(see our FAQ on how to ger your Canada Post API usernames and password)](http://support.goshippo.com/hc/en-us/articles/201772755-Where-do-I-get-my-Canada-Post-API-username-and-password-) * Canada Post contract ID (if you are a contract customer) * Canada Post payment method\ (If you are a contract customer, select credit card or account) **Test Mode:** Canada Post requires a different API username and password for test mode. [Read our FAQ to see how to get your test credentials.](http://support.goshippo.com/hc/en-us/articles/201772755-Where-do-I-get-my-Canada-Post-API-username-and-password-) *** Chronopost logo ## Chronopost Countries served:\ France outbound shipments to domestic destinations only Supported features: * Shipping rates * Shipping labels * Tracking * Instalabel single call label generation * Signature Confirmation * [Label formats](/shipments/shipping-label-sizes#shipping-label-format-sizes): PNG, 4×6 inch PDF, A4 PDF, A6 PDF *** Colissimo logo ## Colissimo Countries served:\ France outbound shipments to domestic destinations Supported features: * Shipping rates * Shipping labels * Tracking * Instalabel single call label generation * [Label formats](/shipments/shipping-label-sizes#shipping-label-format-sizes): PNG, 4×6 inch PDF, PDF A4 & PDF A6 labels *** Correos logo ## Correos Countries served:\ Spain outbound shipments to domestic destinations only Supported features: * Shipping rates * Shipping labels * Tracking * Instalabel single call label generation * [Label formats](/shipments/shipping-label-sizes#shipping-label-format-sizes): PNG, 4×6 inch PDF, 8.5×11 inch PDF, A4 PDF, A6 PDF *** Deutsche Post logo ## Deutsche Post Shippo offers a default Shippo carrier account upon sign up. Countries served:\ Germany outbound shipments to domestic and international destinations Supported features: * Shipping rates * Shipping labels * Tracking * [Label formats](/shipments/shipping-label-sizes#shipping-label-format-sizes): PNG, 4×6 inch PDF, 8.5×11 inch PDF * Instalabel single call label generation *** DHL eCommerce logo ## DHL eCommerce Countries served:\ United States outbound shipments to domestic and international destinations only Supported features: * Shipping labels * Tracking * Dangerous goods support * Manifests * [Reference fields](/carriers/carrier-reference-fields) * [Label formats](/shipments/shipping-label-sizes#shipping-label-format-sizes): 8.5×11 inch PDF, 4×6 inch PDF, A4 PDF, A6 PDF, ZPL II * Instalabel single call label generation * Signature Confirmation Account information required: * DHL eCommerce Client ID * DHL eCommerce Password * DHL eCommerce Pickup Number * DHL eCommerce Facility Code *** DHL Express logo ## DHL Express For international shipments originating from United States, Shippo offers a discounted Shippo carrier account upon sign up. Countries served:\ Global Supported features: * Discounted shipping rates * Shipping labels * Tracking * Instalabel single call label generation * [Reference fields](/carriers/carrier-reference-fields) * [Label formats](/shipments/shipping-label-sizes#shipping-label-format-sizes): 8.5×11 inch PDF, 4×6 inch PDF, ZPL II Account information required:\ For all other outbound countries, and U.S. businesses who'd like to use their own DHL accounts, please enter: * DHL Express account number * Contact us at `support@shippo.com` if you have your own DHL Express account to access your rates. * To use your own DHL Express account with Shippo, your account will need to be whitelisted by your DHL Express account manager. Please contact your DHL Express account manager and let them know you would like to connect to Shippo to access your rates. *** DHL Germany logo ## DHL Germany Countries served:\ German and Austria outbound shipments to domestic and international destinations Supported features: * Shipping rates * Shipping labels * Tracking * [Reference fields](/carriers/carrier-reference-fields)s * [Label formats](/shipments/shipping-label-sizes#shipping-label-format-sizes): 4×6 inch PDF, 4×8 inch PDF, 8.5×11 inch PDF, PNG, A4 PDF, A6 PDF Account information required: To use your own account, you'll need: * DHL Germany account number (The first 10 digits of your DHL account number) * DHL Germany business customer portal username (DHL username for [www.dhl-geschaeftskundenportal.de](http://www.dhl-geschaeftskundenportal.de)) * DHL Germany business customer portal password (DHL password for [www.dhl-geschaeftskundenportal.de](http://www.dhl-geschaeftskundenportal.de)) * DHL Germany default participation code (The last 2 digits of your DHL account number) * DHL Germany tracking username (optional, only used for tracking) * DHL Germany tracking password (optional, only used for tracking) **Test Mode:** DHL Germany requires a different credentials for test mode. It can be found on add carrier account page. *** DPD UK logo ## DPD UK Countries served:\ UK outbound shipments to domestic destinations only Supported features: * Shipping rates * Shipping labels * Tracking * Scan based billing * [Label formats](/shipments/shipping-label-sizes#shipping-label-format-sizes): PNG, 4×6 inch PDF, 4×8 inch PDF, A4 PDF, A6 PDF Restrictions: * Only the Two Day service can be used to ship to Ireland and islands (i.e. IM, JE, GG, IE). * Packages under 30kg. * For the package to be applicable for drop-off at a parcel shop, it should be under 20kg in weight. For dimension, the L*H*W should be less than 60cm*60cm*60cm OR no two sides to exceed 1.2m collectively. If these weight and dimension restrictions are not met, the parcel will only be available for courier collection. *** DPD DE logo ## DPD DE Countries served:\ Germany outbound shipments to domestic destinations only Supported features: * Shipping rates * Shipping labels * Tracking * Scan based billing * [Label formats](/shipments/shipping-label-sizes#shipping-label-format-sizes): PNG, 4×6 inch PDF, 4×8 inch PDF, A4 PDF, A6 PDF Restrictions: * Packages under 20kg are allowed for DPD Classic. * Packages should have a length of up to 100 cm and length plus girth should be up to 250cm. *** ePost Global logo ## ePost Global Countries served:\ US-originated domestic and international shipments Supported features: * Shipping labels * Tracking * Manifests * [Label formats](/shipments/shipping-label-sizes#shipping-label-format-sizes): PNG, 4×6 inch PDF, 8.5×11 inch PDF, ZPL II * Instalabel single call label generation *** Evri logo ## Evri Countries served:\ UK outbound shipments to AT, BE, CZ, DK, FI, FR, DE, HU, IE, IT, LU, MC, NL, PT, SK, ES, SE, and UK Supported Features: * Shipping rates * Shipping labels * Tracking * Signature service * Scan based billing * [QR code](/shipments/qr-code) for in-store label printing * [Reference fields](/carriers/carrier-reference-fields) * [Label formats](/shipments/shipping-label-sizes#shipping-label-format-sizes): PNG, 8.5×11 inch PDF, 4×6 inch PDF, ZPL II, A4 PDF, A6 PDF * Evri ParcelShop Service, use locations to find a nearby ParcelShop * Evri Courier Collection Service, have parcel picked up Restrictions: * Certain remote zip codes will incur a remote delivery surcharge (i.e. IM,HS,ZE). * Packages under 15kg. *** FedEx logo ## FedEx [**Don't have a FedEx account? Open a discounted FedEx account now with Shippo!**](https://advantagemember.van.fedex.com/7502/) Countries served:\ Global Supported features: * Shipping rates * Shipping labels * Tracking * Signature confirmation * 3rd party billing * Multi-piece shipments * Instalabel single call label generation * [Reference fields](/carriers/carrier-reference-fields) * [Label formats](/shipments/shipping-label-sizes#shipping-label-format-sizes): PNG, 8.5×11 inch PDF, 4×6 inch PDF, ZPL II, A4 PDF, A6 PDF **note** When using your own FexEx account with [Instalabel single call label generation](/guides/single-call), the response rate amount will be \$0. The label generated is still valid and FedEx will still charge your account. **FedEx One Rate** For eligible service levels, FedEx returns a One Rate variant alongside the standard rate. Identify it by `servicelevel.terms: "ONERATE"` — it shares the same `servicelevel.token` as the standard-rate object but is a separate rate with its own `amount`. For example, a `fedex_2_day` response may include one rate with `terms: ""` at $26.34 and another with `terms: "ONERATE"` at $11.75. To purchase the One Rate option, create a transaction against the `ONERATE` rate object like any other rate — Shippo passes the required flag to FedEx automatically, no extra field needed. Account information required: * FedEx account number * FedEx Smartpost hub ID (required for FedEx Smartpost) **Test Mode:** FedEx requires a different account and for test mode. Please connect a FedEx test account on Shippo with your test mode credentials from the [FedEx Web Services portal](http://www.fedex.com/us/developer/web-services/index.html). *** Globegistics logo ## Globegistics Countries served:\ US to international destinations Supported features: * Shipping rates * Shipping labels * Manifests * Tracking * Instalabel single call label generation * [Reference fields](/carriers/carrier-reference-fields) * [Label formats](/shipments/shipping-label-sizes#shipping-label-format-sizes): PNG, 4×6 inch PDF, 8.5×11 inch PDF Account information required: * Globegistics Account Number * Globegistics API Key *** GLS United States logo ## GLS United States Service area:\ Western United States Supported features: * Shipping rates * Shipping labels * Tracking * Signature Confirmation * [Reference fields](/carriers/carrier-reference-fields) * [Label formats](/shipments/shipping-label-sizes#shipping-label-format-sizes): PNG, 8.5×11 inch PDF, 4×6 inch PDF, ZPL II * Instalabel single call label generation Account information required: * GLS US account number * GLS US account username * GLS US account password *** Jitsu logo ## Jitsu Countries served:\ United States outbound shipments to domestic destinations Supported features: * Shipping rates * Shipping labels * Tracking * Instalabel single call label generation * [Label formats](/shipments/shipping-label-sizes#shipping-label-format-sizes): PNG, 4×6 inch PDF, ZPL II *** Lasership logo ## Lasership Service area:\ Eastern United States Supported features: * Support for [Routed Delivery](https://lasership.com/services/custom-delivery-solutions/) and more services * Shipping labels * Tracking * [Reference fields](/carriers/carrier-reference-fields) * [Label formats](/shipments/shipping-label-sizes#shipping-label-format-sizes): PNG, 4×6 inch PDF, 8.5×11 inch PDF, A4 PDF, A6 PDF, ZPL II Account information required: * LaserShip API Key * LaserShip API ID * Critical pull time *** Mondial Relay logo ## Mondial Relay Countries served:\ France outbound shipments to domestic destinations only Supported features: * Shipping labels * Tracking * Location finder * [Label formats](/shipments/shipping-label-sizes#shipping-label-format-sizes): 8.5×11 inch PDF Shippo offers highly discounted rates -- you don't need to have your own account!\ If you prefer to use your own account, you'll need: * Mondial Relay merchant ID * Mondial Relay key Mondial Relay requires a different merchant ID and key for test mode. *** OnTrac logo ## OnTrac Service area:\ Western United States Supported features: * Shipping rates * Shipping labels * Tracking * [Label formats](/shipments/shipping-label-sizes#shipping-label-format-sizes): PNG, 4×6 inch PDF, 8.5×11 inch PDF, A4 PDF, A6 PDF, ZPL II * Signature confirmation * 3rd party billing * Collection on delivery (COD) * Saturday delivery * Carrier insurance * [Reference fields](/carriers/carrier-reference-fields) * Instalabel single call label generation Account information required: * OnTrac account number * OnTrac API Password Please email [softwaresupport@ontrac.com](mailto:softwaresupport@ontrac.com) or call 877-225-6837 to request your OnTrac API password. *** Poste Italiane logo ## Poste Italiane Countries served:\ Italy outbound shipments to domestic destinations only Supported features: * Shipping labels * Tracking * [Label formats](/shipments/shipping-label-sizes#shipping-label-format-sizes): 8.5×11 inch PDF, PDF A4, PDF A6 Shippo offers highly discounted rates – you don’t need to have your own account! *** Purolator logo ## Purolator Countries served:\ Canadian outbound shipments to domestic and international destinations Supported features: * Shipping rates * Shipping labels * Tracking * Manifests * Signature Confirmation * [Label formats](/shipments/shipping-label-sizes#shipping-label-format-sizes): 8.5×11 inch PDF, ZPL II * Instalabel single call label generation Account information required:\ Please register with the [Purolator Resource Center](https://eship.purolator.com/SITE/en/createnewuser.aspx) first. Select: "I'm integrating Purolator E-Ship Web Services into a website or application that won't be re-sold." * Purolator production key * Purolator production key password * Purolator account number *** Royal Mail logo ## Royal Mail OBA (BYOA) Countries served:\ UK outbound shipments to domestic destinations only. * Shipping rates * Shipping labels * Tracking * Label Cancellation/Refunds * Returns * [Label formats](/shipments/shipping-label-sizes#shipping-label-format-sizes): 2.3 x 7.5 inch PDF, 2.3 x 7.5 inch PNG, 4 x 8 inch PDF, 4×6 inch PDF, 8.5×11 inch PDF, A4 PDF, A5 PDF, A6 PDF, ZPL II, PNG Please note that Royal Mail refunds are only allowed 12 days after the label was purchased. *** Royal Mail logo ## Royal Mail Tracked To access **Royal Mail Tracked 24 and 48**, you can use Shippo’s account. This means you can start shipping with Royal Mail right away — no need to create and manage your own carrier account. With Royal Mail through Shippo you can: * Ship to any domestic address in Great Britain and Northern Ireland * Access next-day delivery (Tracked 24) or 2-3 day delivery (Tracked 48), with or without signature * Print label [formats](/shipments/shipping-label-sizes#shipping-label-format-sizes): 4×6 inch PDF, A4 PDF or generate QR codes for printer-free drop-off * Drop off packages at Post Offices, lockers, Parcel Post Boxes, or partner shops * Track all shipments via the Shippo API * Label Cancellation/Refunds *** Swyft logo ## Swyft Service Area:\ New York City, Chicago, Los Angeles, and Atlanta Supported features: * Shipping labels * Tracking * [Reference fields](/carriers/carrier-reference-fields) * [Label formats](/shipments/shipping-label-sizes#shipping-label-format-sizes): PNG, 2.3×7.5 inch PNG, 8.5×11 inch PDF, 4×6 inch PDF, 2.3×7.5 inch PDF, ZPL II, A4 PDF, A6 PDF Account information required: * Swyft API Key *** UDS logo ## UDS Service Area:\ Illinois, Idaho, Southern Wisconsin Supported features: * Shipping labels * Tracking * [Reference fields](/carriers/carrier-reference-fields) * [Label formats](/shipments/shipping-label-sizes#shipping-label-format-sizes): PNG, 2.3×7.5 inch PNG, 8.5×11 inch PDF, 4×6 inch PDF, 2.3×7.5 inch PDF, ZPL II, A4 PDF, A6 PDF Account information required: * Client ID * Client Key * Username * Password *** UPS logo ## UPS Countries served:\ Global Supported features: * Shipping rates * Shipping labels * Tracking * Signature confirmation * 3rd party billing * Collection on delivery (COD) * Multi-piece shipments * [Reference fields](/carriers/carrier-reference-fields) * [Label formats](/shipments/shipping-label-sizes#shipping-label-format-sizes): PNG, 8.5×11 inch PDF, 4×6 inch PDF, ZPL II * Instalabel single call label generation **note** When using your own UPS account with [Instalabel single call label generation](/guides/single-call), the response rate amount will be \$0. The label generated is still valid and UPS will still charge your account. Instalabel single call label generation is not available for UPS Digital Access Program accounts. **To access your negotiated UPS rates,** please connect your account through the UPS full setup workflow from the [Carriers tab](https://goshippo.com/user/carriers/) on your dashboard. [Learn more here.](http://support.goshippo.com/hc/en-us/articles/204781715-How-do-I-connect-my-UPS-account-with-Shippo-). Account information required: * UPS User ID * UPS account number * UPS Password * UPS Mail Innovations cost center identifier (required for UPS Mail Innovations) * UPS Mail Innovations USPS endorsement (required for UPS Mail Innovations) *** USPS logo ## USPS Shippo offers a discounted Shippo carrier account upon sign up. Countries served:\ United States outbound shipments to domestic and international destinations Supported features: * Discounted shipping rates * Shipping labels * Tracking * Manifests * Signature confirmation * Scan-based return labels * [QR code](/shipments/qr-code) for in-store label printing * [Reference fields](/carriers/carrier-reference-fields) * [Label formats](/shipments/shipping-label-sizes#shipping-label-format-sizes): PNG, 2.3×7.5 inch PNG, 8.5×11 inch PDF, 4×6 inch PDF, 2.3×7.5 inch PDF, ZPL II, A4 PDF, A6 PDF * Instalabel single call label generation Shipments to Military Mail (APO, DPO, FPO, MPO), U.S. Territories, and Freely Associated States requires Customs Forms. *** Veho logo ## Veho Countries served: United States outbound shipments to domestic destinations Supported features: * Shipping rates * Shipping labels * Refund * Multi-piece support * [Label formats](/shipments/shipping-label-sizes#shipping-label-format-sizes): PNG, 4×6 inch PDF, 4×8 inch PDF, A4 PDF, A6 PDF, ZPL II * Instalabel single call label generation * Tracking Account information required: * Veho API Key Restrictions: * Maximum weight: 50 lbs * Maximum dimensions: 72 inches for each dimension (height, length, and width) *** # Carrier authorization using OAuth Source: https://docs.goshippo.com/carriers/carrier-o-auth Authorize carrier accounts like UPS using OAuth so Shippo can request rates and buy labels on your behalf. To protect your account security, some carriers (for example UPS) require you to use [OAuth](https://oauth.net/2/) to authorize Shippo to perform some actions, like requesting rates or buying labels, on your behalf. This means you must verify your identity before you can start using that carrier account. This guide is intended for [platforms](/partner-integration/business-cases#platforms) who provide access to shipping services for their merchants. Depending on how you manage your merchants accounts, it may be useful for you to review our [Platform accounts guide](/platform-accounts/platform-accounts). Follow this guide to learn how to connect a carrier to a merchant, especially if the carrier needs OAuth authorization. If you already have an existing carrier account connected to Shippo, you may still need to verify your identity to remain compliant with that carrier's terms and conditions. **INFO** Before you begin, this guide assumes you have already created your own account with your carrier. **Note** Before starting the UPS OAuth authentication flow, it is critical to add every UPS account number to your ups.com user ID. See [this guide](/carriers/adding-ups-accounts/adding-an-account) for instructions. ## Add your carrier If your merchant has already added a carrier and you are using this guide to update that carrier, continue to ([Get your carrier object\_id](#get-your-carrier-object_id)). To add a new carrier, refer to our [Carrier accounts guide](/carriers/carrier-accounts). Each carrier can require unique [parameters](/carriers/carrier-accounts#account-structure-by-carrier) The following example shows how to connect a [UPS account](/carriers/carrier-accounts#ups). **Request:** ```shell Add carrier request theme={null} curl --location --request POST 'https://api.goshippo.com/carrier_accounts/' \ --header 'Authorization: ShippoToken ' \ --header 'SHIPPO-ACCOUNT-ID: ' \ --header 'Content-Type: application/json' \ --data-raw '{ "account_id": "94567e", "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": "Mr Hippo", "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 }' ``` **Response:** ```json Add carrier response theme={null} { "account_id": "94567e", "active": true, "carrier": "ups", "parameters": {}, "carrier_name": "UPS", "is_shippo_account": false, "metadata": "string", "object_id": "6aa34d5f6865448fbb1ee93636e98999", "object_owner": "hippo@shippo.com", "service_levels": [{}], "test": false } ``` Review the response and select the `object_id` of the carrier connected to the account. ## Get your carrier object\_id To find the object ID of a carrier account connected to Shippo, following this example. **Request:** ```shell List carriers request theme={null} curl https://api.goshippo.com/carrier_accounts \ -H "Authorization: ShippoToken " \ -H "SHIPPO-ACCOUNT-ID: " ``` **Response:** ```json List carriers response theme={null} { "next": "baseurl?page=3&results=10", "previous": "baseurl?page=1&results=10", "results": [ { "carrier": "ups", "object_id": "6aa34d5f6865448fbb1ee93636e98999", "object_owner": "hippo@shippo.com", "account_id": "56782", "parameters": {}, "test": true, "active": true, "is_shippo_account": false, "metadata": "", "carrier_name": "UPS", "carrier_images": { "75": "https://shippo-static-v2.s3.amazonaws.com/providers/75/UPS.png", "200": "https://shippo-static-v2.s3.amazonaws.com/providers/200/UPS.png" } } ] } ``` Review the response and select the `object_id` of the appropriate carrier connected to your account. ## Validate your credentials using OAuth The Shippo OAuth validation flow directs you to a site to validate your carrier account. ```shell Start carrier validation request theme={null} curl "https://api.goshippo.com/carrier_accounts/6aa34d5f6865448fbb1ee93636e98999/signin/initiate?redirect_uri=https://client.example.com/cb&state=SplxlOBeZQQYbYS6WxSbIA" \ -H "Authorization: ShippoToken " \ -H "SHIPPO-ACCOUNT-ID: " ``` This call is the beginning of the OAuth process. * The `/signin/initiate` endpoint redirects your user to the Shippo carrier login page to manage the OAuth process. * The `redirect_uri` is the URL we [redirect](https://www.oauth.com/oauth2-servers/redirect-uris/) your user to following carrier OAuth. Use this to return your user back to your application. * Use `state` in your request to prevent CSRF attacks. The consuming application checks that the same value is returned after the user authorizes Shippo. The `state` will be returned as a query string of the `redirect_uri`. **Note** Shippo securely stores your users [refresh token](https://oauth.net/2/refresh-tokens/) meaning we don't require your user to authorize again. However, if there are any issues during the refresh process, we will require your user to authorize again. ## Check your carrier status You can check the status of a connected carrier at any time using the carrier object\_id. ```shell Get carrier account request theme={null} curl https://api.goshippo.com/carrier_accounts/6aa34d5f6865448fbb1ee93636e98999 \ -H "Authorization: ShippoToken " ``` The response includes `object_info` that gives insights into the state of a carrier account's authorization. `object_info` contains `authentication` that contains two elements. * `type`. This is a string that indicates the authentication method used by the account. It can be one of the following. * `default`. Signifying the use of Shippo's standard authentication method. * `oauth`. Indicating that OAuth 2.0 is the authentication method in place for the account. * `status`. This is a string that represents the current authentication status of the carrier account. It can be one of the following enum values. * `authorization_pending`. This status signifies that the account is awaiting the initial authorization flow. It indicates that the OAuth process has been initiated but not yet completed. * `connected`. This indicates that the account is authorized and active, with valid OAuth tokens in place. The account can perform API actions without any additional authorization steps required. * `disconnected`.This status means that the authorization has been lost, and the account needs to reconnect. It suggests that the existing OAuth tokens are either expired or invalidated, and the user must start the authorization flow again. Shippo will keep these tokens up-to-date but we could have rare edge cases where the authorization is lost and we must ask users to reconnect. ```json object_info sample theme={null} { "object_info": { "authentication": { "type": "oauth", "status": "connected" } } } ``` # Carrier reference fields Source: https://docs.goshippo.com/carriers/carrier-reference-fields Add custom reference information like order numbers to your shipping labels using supported carrier reference fields. Some carriers enable you to add reference information to your label. Depending on your application, you could use this to add information like customer order numbers or other reference details to a shipping label. For example, USPS print reference fields at the bottom of the their label. USPS sample label with the location of ref1 and ref2 highlighted ## Supported carriers Not every carrier supports this and different carriers enable this in different ways. Refer to this table for details on Shippo supported carriers that have enabled this feature. | Carrier | Supports `reference_1` | Supports `reference_2` | Limits (characters per field) | Sample | Notes | | ---------------------- | ---------------------- | ---------------------- | ----------------------------- | ------------------------------------------------- | ------------------------------------------------------------------------------------- | | APG | ◉ | ◉ | 50 | | | | Asendia | ◉ | ◉ | 50 | | | | Australia Post | ◉ | ◉ | 50 | | | | Canada Post | ◉ | ◉ | 35 | | | | Couriers Please | ◉ | ◉ | 50 | | `reference_1` and `reference_2` strings are joined | | DHL eCommerce | ◉ | ◉ | 30 | [label](/images/Carriers/label-ref-dhl-ecomm.png) | For domestic shipments, `reference_1` must be provided when `reference_2` is provided | | DHL Germany | ◉ | ◉ | 50 | | | | DHL express | ◉ | ◉ | 50 | [label](/images/Carriers/label-ref-DHL.png) | | | Evri (formerly Hermes) | ◉ | ◉ | 20 | [label](/images/Carriers/label-ref-evri.png) | | | FedEx | ◉ | ◉ | 50 | [label](/images/Carriers/label-ref-fedex.png) | See [note](#add-additional-details-to-a-fedex-label) below for more details | | GLS US | ◉ | ◉ | 50 | | | | Lasership | ◉ | ◉ | 50 | | | | OnTrac | ◉ | ◉ | 50 | | | | Swyft | ◉ | ◉ | 50 | | | | UDS | ◉ | ◎ | 50 | | | | UPS | ◉ | ◉ | 35 | [label](/images/Carriers/label-ref-UPS.png) | | | USPS | ◉ | ◉ | 30 | [label](/images/Carriers/label-ref-USPS.png) | | | Veho | ◉ | ◎ | 50 | [label](/images/Carriers/label-ref-Veho.png) | | ## Add reference details to a Shipment To add reference details to a label for a supported carrier, use the fields `reference_1` and `reference_2` in the [Shipments Extras](/api-reference/shipments/list-all-shipments) object. **note** For versions `2014-02-11` and `2016-10-25`, `reference_1` and `reference_2` are in the [Shipments](/api-concepts/api-change-log#shipments) object. Follow this example showing how to set reference fields. ```shell cURL theme={null} curl https://api.goshippo.com/shipments/ \ -H "Authorization: ShippoToken " \ -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" }], "extra": { "reference_1": "x999000", "reference_2": "Box no 5" }, "async": false }' ``` ## Add reference details to a Parcel You can also define reference details in your parcel. To add reference details to a label for a supported carrier, use the fields `reference_1` and `reference_2` in the [Parcels Extras](/api-reference/parcels/list-all-parcels) object. This can be useful for [multi-piece shipments](/shipments/multi-piece-shipment) where you may choose to add a different reference to each label. If you define both a parcel reference and a shipment reference, the parcel reference will be printed on your label (if your carrier supports it). Follow this example showing how to set different references for each label in a multi-piece shipment. ```shell cURL theme={null} curl https://api.goshippo.com/shipments/ \ -H 'Authorization: ShippoToken ' \ -H 'Content-Type: application/json' \ -d $'{ "address_from": { "name": "Mr Hippo", "street1": "965 Mission Street", "street2": "Suite 480", "city": "San Francisco", "state": "CA", "zip": "94103", "country": "US", "phone": "4151234567", "email": "mrhippo@goshippo.com" }, "address_to": { "name": "Mr Hippo", "street1": "2967 Filbert Dr", "street2": "APT 3", "city": "Walnut Creek", "state": "CA", "zip": "94598", "country": "US", "phone": "4151234567", "email": "mrhippo@goshippo.com" }, "parcels": [{ "weight": "8", "length": "9", "width": "3", "height": "8", "distance_unit": "in", "mass_unit": "lb", "extra": { "reference_1": "Parcel1 ref 1" }}, {"weight": "8", "length": "9", "width": "3", "height": "8", "distance_unit": "in", "mass_unit": "lb", "extra": { "reference_2": "Parcel2 ref 2" } }], "extra": { "signature_required": "DIRECT", "reference_1": "Text shipment ref 1", "reference_2": "Text shipment ref 2" }, "async": false }' ``` The following are the resulting labels. sample multipiece label ## Add additional details to a FedEx label For FedEx, Shippo supports more fields where you can add more information. In the [Shipments Extras](/api-reference/shipments/list-all-shipments) object, you can use the following fields. * `customer_reference` * `po_number` * `dept_number` * `invoice_number` * `rma_number` Follow this example. ```shell cURL theme={null} "extra": { "customer_reference": { "prefix": "REF#", "value": "my ref is 12234" }, "po_number": { "prefix": "PO#", "value": "my number is 12234" }, "dept_number": { "prefix": "DEPT#", "value": "dept number is 555" }, "invoice_number": { "prefix": "INV#", "value": "my number is 5555" }, "rma_number": { "prefix": "RMA#", "value": "rma number is 555" } } ``` Note, these fields are available only on ZPL labels and support up to 11 characters for the prefix and up to 40 characters for the value. * If `customer_reference` is used, reference\_1 will be ignored. * If `po_number` is used, reference\_2 will be ignored. * If `invoice_number` is used, for international shipments, `shipment.customs_declaration.invoice` will be ignored. ### Omnichannel shipping with FedEx You can also customize FedEx’s label prefixes to meet those requirements for omnichannel shipping and label specific SOPs. Note, this applies to ZPL labels only. The following example uses the ARN which is a unique shipment number assigned by Amazon to track the shipments and the LOAD number is a reference number for the shipment. ```shell cURL theme={null} "extra": { "customer_reference": { "prefix": "ARN#", "value": "23256" }, "po_number": { "prefix": "LOAD#", "value": "12234" }, "dept_number": { "prefix": "DP", "value": "555" }, "invoice_number": { "prefix": "invoice #", "value": "2999905" }, "rma_number": { "prefix": "RMA#", "value": "" } } ``` ## Add additional details to a UPS label You can add additional reference fields to UPS ZPL II labels. UPS allows a maximum of five reference fields for a single label. In the [Shipments Extras](/api-reference/shipments/list-all-shipments) object, you can use the following fields. * `accounts_receivable_customer_account` * `appropriation_number` * `bill_of_lading_number` * `cod_number` * `customer_reference` * `dealer_order_number` * `dept_number` * `fda_product_code` * `invoice_number` * `manifest_number` * `model_number` * `part_number` * `po_number` * `production_code` * `purchase_request_number` * `rma_number` * `salesperson_number` * `serial_number` * `store_number` * `transaction_reference_number` Follow this example. ```shell theme={null} "extra": { "accounts_receivable_customer_account": { "prefix": "Accounts Rec:", "value": "", "ref_sort": 1 }, "appropriation_number": { "prefix": "Approp No.:", "value": "", "ref_sort": 2 }, "bill_of_lading_number": { "prefix": "Bill Lading:", "value": "", "ref_sort": 4 }, "cod_number": { "prefix": "COD:", "value": "", "ref_sort": 3 }, "customer_reference": { "prefix": "REF#", "value": "my ref is 12234", "ref_sort": 5 } ``` Use `ref_sort` to define the order your references are printed on your label. If you choose to use `ref_sort`, you cannot use the same number more than once. If you choose to set `ref_sort` for one reference, you must set `ref_sort` for all other supported UPS references. # DHL eCommerce Source: https://docs.goshippo.com/carriers/dh-le-commerce Connect your DHL eCommerce account to Shippo and learn how to get rates and purchase shipping labels. DHL eCommerce is an ideal carrier for third-party logistics businesses offering preferential rates for high-volume shippers. Follow this guide to learn how to use your own DHL eCommerce account with Shippo. **note** Before beginning this guide, you must have your own [DHL eCommerce account](https://www.dhl.com/global-en/home/our-divisions/ecommerce.html). Contact your DHL eCommerce account manager to get the [required parameters](/carriers/carrier-capabilities#dhl-ecommerce) to connect your account to Shippo. ## Get a label from DHL eCommerce ### 1. Connect your account Before you can get rates from DHL eCommerce, you must first add your [account details](/carriers/carrier-accounts#dhl-ecommerce). **Request:** ```shell Connect your DHL eCommerce account theme={null} curl --location --request POST 'https://api.goshippo.com/carrier_accounts/' \ --header 'Authorization: ShippoToken ' \ --header 'Content-Type: application/json' \ --data-raw '{ "account_id": "string", "active": true, "carrier": "dhl_ecommerce", "account_id": "dhl_ecommerce", "parameters": { "username": "HipposDontLie!", // DHL eCommerce client ID "password": "shipshippo", // DHL eCommerce client secret "pickup_no": "123123", // DHL eCommerce pickup number "facility_code": "23" // DHL eCommerce facility code } "test": false }' ``` **Response:** ```json Connect your DHL eCommerce account response theme={null} { "account_id": "****", "active": true, "carrier": "dhl_ecommerce", "parameters": { "username": "HipposDontLie!", // DHL eCommerce client ID "password": "shipshippo", // DHL eCommerce client secret "pickup_no": "123123", // DHL eCommerce pickup number "facility_code": "23" // DHL eCommerce facility code }, "is_shippo_account": false, "metadata": "string", "object_id": "3579ad96a9534ea2bcc3487e703c98a1", "object_owner": "mrhippo@goshippo.com", "test": false } ``` ### 2. Get a rate from carrier To get rates from your preferred carrier only, create a Shipment and use `carrier_accounts` with the object ID of your carrier. The following example uses the object ID of the carrier added in [step 1](#1-connect-your-account). **note** For international shipments, DHL eCommerces will not return a rate while in [test mode](/guides/testing). To get a rate, ensure you are using a live token and your carrier is not in test mode. **Request:** ```shell Get rates request theme={null} curl --location 'https://api.goshippo.com/shipments/' \ --header 'Authorization: ShippoToken ' \ --header 'Content-Type: application/json' \ --data-raw '{ "address_from": { "name": "Mr Hippo", "street1": "965 Mission Street", "street2": "Suite 480", "city": "San Francisco", "state": "CA", "zip": "94103", "country": "US", "phone": "4151234567", "email": "mrhippo@goshippo.com" }, "address_to": { "name": "Mr Hippo", "street1": "2967 Filbert Dr", "street2": "APT 3", "city": "Walnut Creek", "state": "CA", "zip": "94598", "country": "US", "phone": "4151234567", "email": "mrhippo@goshippo.com" }, "parcels": [{ "weight": "8", "length": "9", "width": "3", "height": "8", "distance_unit": "in", "mass_unit": "lb" }], "extra": { "signature_required": "DIRECT" }, "async": false, "carrier_accounts":["3579ad96a9534ea2bcc3487e703c98a1"] }' ``` **Response:** ```json Get rates response theme={null} { "carrier_accounts": [ "3579ad96a9534ea2bcc3487e703c98a1" ], "object_created": "2024-02-09T15:51:51.386Z", "object_updated": "2024-02-09T15:51:51.386Z", "object_id": "ae70f937c08c45c59a0554dee6797270", "object_owner": "adrian.collins@goshippo.com", "status": "SUCCESS", "address_from": { "object_id": "3f45f9e843834fcb9417d120f3a76943", "is_complete": true, "name": "Mr Hippo", "company": "", "street_no": "", "street1": "965 Mission Street", "validation_results": {}, "street2": "Suite 480", "street3": "", "city": "San Francisco", "state": "CA", "zip": "94103", "country": "US", "phone": "4151234567", "email": "mrhippo@goshippo.com", "is_residential": null, "test": true }, "address_to": { "object_id": "886aac005c1a4abcb02c401c4f298d5b", "is_complete": true, "name": "Mr Hippo", "company": "", "street_no": "", "street1": "2967 Filbert Dr", "validation_results": {}, "street2": "APT 3", "street3": "", "city": "Walnut Creek", "state": "CA", "zip": "94598", "country": "US", "phone": "4151234567", "email": "mrhippo@goshippo.com", "is_residential": null, "test": true }, "parcels": [ { "object_state": "VALID", "object_created": "2024-02-09T15:51:51.340Z", "object_updated": "2024-02-09T15:51:51.397Z", "object_id": "0042019fad6a4a53ace731142a568048", "object_owner": "adrian.collins@goshippo.com", "template": null, "extra": {}, "length": "9.0000", "width": "8.0000", "height": "3.0000", "distance_unit": "in", "weight": "8.0000", "mass_unit": "lb", "value_amount": null, "value_currency": null, "metadata": "", "line_items": [], "test": true } ], "shipment_date": "2024-02-09T15:51:51.340Z", "address_return": { "object_id": "3f45f9e843834fcb9417d120f3a76943", "is_complete": true, "name": "Mr Hippo", "company": "", "street_no": "", "street1": "965 Mission Street", "validation_results": {}, "street2": "Suite 480", "street3": "", "city": "San Francisco", "state": "CA", "zip": "94103", "country": "US", "phone": "4151234567", "email": "mrhippo@goshippo.com", "is_residential": null, "test": true }, "customs_declaration": null, "extra": { "signature_required": "DIRECT" }, "rates": [ { "object_created": "2024-02-09T15:51:52.407Z", "object_id": "b94689b62e8c4fda9e37fd8d61c8ebd4", "object_owner": "adrian.collins@goshippo.com", "shipment": "ae70f937c08c45c59a0554dee6797270", "attributes": [ "BESTVALUE", "CHEAPEST" ], "amount": "13.17", "currency": "USD", "amount_local": "13.17", "currency_local": "USD", "provider": "DHL eCommerce", "provider_image_75": "https://shippo-static-v2.s3.amazonaws.com/providers/75/DHL_ecommerce.png", "provider_image_200": "https://shippo-static-v2.s3.amazonaws.com/providers/200/DHL_ecommerce.png", "servicelevel": { "name": "Parcels Ground", "token": "dhl_ecommerce_parcels_ground", "terms": "" }, "estimated_days": 5, "arrives_by": null, "duration_terms": "", "messages": [], "carrier_account": "3579ad96a9534ea2bcc3487e703c98a1", "test": true, "zone": "USPS08" } ], "messages": [], "metadata": "", "test": true, "order": null } }, ``` ### 3. Purchase label To purchase a label, create a Transaction using the object ID of your preferred Rate. **Request:** ```shell Purchase label theme={null} curl --location 'https://api.goshippo.com/transactions/' \ --header 'Authorization: ShippoToken ' \ --header 'Content-Type: application/json' \ --data '{ "rate": "b94689b62e8c4fda9e37fd8d61c8ebd4", "async": false }' ``` **Response:** ```json Purchase label response theme={null} { "object_state": "VALID", "status": "SUCCESS", "object_created": "2024-02-09T15:54:15.760Z", "object_updated": "2024-02-09T15:54:17.003Z", "object_id": "162b77609c574d499daa9c63d813a845", "object_owner": "adrian.collins@goshippo.com", "test": true, "rate": "b94689b62e8c4fda9e37fd8d61c8ebd4", "tracking_number": "420945989261299999999900348426", "tracking_status": "UNKNOWN", "eta": null, "tracking_url_provider": "https://webtrack.dhlglobalmail.com/?trackingnumber=420945989261299999999900348426", "label_url": "https://deliver.goshippo.com/162b77609c574d499daa9c63d813a845.pdf?Expires=1739030056&Signature=Qzu1k~x5dVgmJqX89t1~EjB4p6jeuorKluEaWLh3mBfpz4OesKeugBBw4KywxNdcA6IPNPQcygEtf8AHdQjWt8MBIintLYBRTy0d7cBZNiiw5NOAGvAu5bfG0etnfC9C0alow2DdxJAhs7UhaemIo4~zWBP2nbQmssycaYwcDAGMHqQjBwjEd5-qTpGf0~Xs1az-xFv5eAjibaq47fCrWDo8Ms7ijQXlbOwtLeEYX-dqtQDpNNzBfCpDbRmGLJrz4t3xsDBcIutf78aZQMmwTb~KsYdESt~aKNT65Nz4~4BTj-JwWWjWFykJHZXzTfpc~SI0OLOMbEXU3VNlnM0MTA__&Key-Pair-Id=APKAJRICFXQ2S4YUQRSQ", "commercial_invoice_url": null, "messages": [], "order": null, "metadata": "", "parcel": "0042019fad6a4a53ace731142a568048", "billing": { "payments": [] }, "qr_code_url": null } ``` ### 4. Manifest DHL eCommerce requires that every label generated is added to a manifest. If you do not create a manifest, your labels will remain on hold. For more information on manifests, see our guide on [Manifests and SCAN forms](/manifests-and-pickups/manifest-and-scan-forms). **Request:** ```shell Create manifest request theme={null} curl --location 'https://api.goshippo.com/manifests/' \ --header 'Content-Type: application/json' \ --header 'Authorization: ShippoToken ' \ --data '{ "address_from": { "name": "Mr Hippo", "street1": "965 Mission Street", "street2": "Suite 480", "city": "San Francisco", "state": "CA", "zip": "94103", "country": "US", "phone": "4151234567", "email": "mrhippo@goshippo.com" }, "carrier_account": "3579ad96a9534ea2bcc3487e703c98a1", "shipment_date": "2024-02-09T15:54:17.003Z", "transactions": ["162b77609c574d499daa9c63d813a845","90909er0erfs343sdsd45sdsd45rtg"], "async": false }' ``` **Response:** ```json Create manifest response theme={null} { "object_created": "2024-02-09T16:13:22.583Z", "object_updated": "2024-02-09T16:13:24.634Z", "object_id": "e830855fbc8e42d7b67b0e00c7592d02", "object_owner": "adrian.collins@goshippo.com", "status": "SUCCESS", "errors": [], "provider": "dhl_ecommerce", "shipment_date": "2024-02-09T15:54:17.003Z", "address_from": "5066d8cc1a0849ea9a08da274e42f54b", "documents": [ "https://deliver.goshippo.com/e830855fbc8e42d7b67b0e00c7592d02_USLAX1_53219514020916132300.pdf?Expires=1739031204&Signature=X1s6F1H~WGG5qRhOYEPfr3ISuvD0hXXwfKw-npyZHU6~7wzZPw27rIBVUuCtTyd4n~AP8PNu7vq8dUIdvOLhcgJIO7dCr1fnXmLb~C1ufo3bJfD4uN0wcH883Os0pETbjz0Dd~66AsFcgh58FsexSn0U7jIe5F~7vKaWQJkGd4jXX~Lo7fMtIWtfVNlW6KLzr-L2fD5wvB2x8IkPlzbH8t6t4j3f4GXqebtGibcD8JLDuqsYUq3NpnS4Z0~-aamp560SeD0vbuqwQPhMFo1Fo8Hblmw7c4ZiC~0A03D5vb2X2xnl0EhuqcT4hk~FTf-sGKIj~EJnFi5QlLZXN1ZupA__&Key-Pair-Id=APKAJRICFXQ2S4YUQRSQ" ], "carrier_account": "3579ad96a9534ea2bcc3487e703c98a1", "transactions": ["162b77609c574d499daa9c63d813a845","90909er0erfs343sdsd45sdsd45rtg"] } ``` ## Hazmat / Dangerous goods Before attempting to ship hazardous or dangerous goods with DHL eCommerce, we recommend reviewing the [Hazardous Goods and Unacceptable Shipments](https://www.dhl.com/us-en/home/ecommerce/business-help-center/hazardous-goods-and-unacceptable-shipments.html) guide. To declare hazardous or dangerous goods for DHL eCommerce, use `dangerous_goods_code` in `Extras` when creating a Shipment. Follow this example to declare dangerous goods in your Shipment. ```shell theme={null} curl --location 'https://api.goshippo.com/shipments/' \ --header 'Authorization: ShippoToken ' \ --header 'Content-Type: application/json' \ --data-raw '{ "address_from": { "name": "Mr Hippo", "street1": "965 Mission Street", "street2": "Suite 480", "city": "San Francisco", "state": "CA", "zip": "94103", "country": "US", "phone": "4151234567", "email": "mrhippo@goshippo.com" }, "address_to": { "name": "Mr Hippo", "street1": "2967 Filbert Dr", "street2": "APT 3", "city": "Walnut Creek", "state": "CA", "zip": "94598", "country": "US", "phone": "4151234567", "email": "mrhippo@goshippo.com" }, "parcels": [{ "weight": "8", "length": "9", "width": "3", "height": "8", "distance_unit": "in", "mass_unit": "lb" }], "extra": { "signature_required": "DIRECT", "dangerous_goods_code": "02" }, "async": false, "carrier_accounts":["3579ad96a9534ea2bcc3487e703c98a1"] }' ``` To learn more about DHL eCommerce dangerous goods codes, refer to [DHL dangerous goods codes](#dhl-dangerous-goods-codes). ## Restrictions ### US Territories DHL eCommerce supports shipments from US Territories to the US and from the US to the US Territories. DHL eCommerce does not support shipments between US Territories. ### APO and FPO APO and FPO are abbreviations used by the US Military Postal Service and Army Post Office. DHL eCommerce does not support shipments to, from, or between APO and FPO addresses. ## DHL eCommerce Service level tokens To support our customers who have integrated with Shippo using legacy DHL eCommerce tokens, we have maintained some legacy token naming. Refer to thi stable for more information. | Token | Shippo Service name | DHL Service name | | ----------------------------------------------- | -------------------------------- | -------------------------------------------- | | dhl\_ecommerce\_parcel\_international\_direct | Parcel International Direct | DHL Parcel International Direct | | dhl\_ecommerce\_parcels\_expedited\_max | Parcels Expedited Max | DHL SmartMail Parcel Expedited Max | | dhl\_ecommerce\_bpm\_ground | Bounded Printed Matter Ground | DHL SmartMail Bound Printed Matter Ground | | dhl\_ecommerce\_parcels\_expedited | Parcels Expedited | DHL SmartMail Parcel Expedited | | dhl\_ecommerce\_parcels\_ground | Parcels Ground | DHL SmartMail Parcel Ground | | dhl\_ecommerce\_parcel\_international\_standard | Parcel International Standard | DHL Parcel International Standard | | dhl\_ecommerce\_bpm\_expedited | Bounded Printed Matter Expedited | DHL SmartMail Bound Printed Matter Expedited | | dhl\_ecommerce\_globalmail\_packet\_priority | GlobalMail Packet Priority | DHL GlobalMail Packet Priority | | dhl\_ecommerce\_easy\_return\_light | Easy Return Light | DHL SmartMail Parcel Return Light | | dhl\_ecommerce\_easy\_return\_plus | Easy Return Plus | DHL SmartMail Parcel Return Plus | | dhl\_ecommerce\_marketing\_parcel\_expedited | Marketing Parcel Expedited [^1] | DHL SmartMail Marketing Parcel Expedited | | dhl\_ecommerce\_globalmail\_packet\_ipa | GlobalMail Packet IPA [^1] | DHL GlobalMail Packet- IPA | | dhl\_ecommerce\_marketing\_parcel\_ground | Marketing Parcel Ground [^1] | DHL SmartMail Marketing Parcel Ground | | dhl\_ecommerce\_globalmail\_packet\_plus | GlobalMail Packet Plus [^1] | DHL Packet Plus International | [^1]: These service levels are only available to legacy users. New users will not see these service levels. ## DHL eCommerce reference fields Refer to our [carrier reference fields](/carriers/carrier-reference-fields#supported-carriers) guide for details on reference fields used by DHL eCommerce. To pass billing reference information to DHL eCommerce through the Shippo API, use `reference_2`. ## DHL dangerous goods codes ### Domestic shipments | Category Code | Description | Max. Weight | | ------------- | --------------------------------------------------------------- | ----------- | | 01 | Lithium Metal / Alloy Batteries Contained in Equipment | 11 lbs | | 02 | Lithium Metal / Alloy Batteries Packed with Equipment | 11 lbs | | 03 | Lithium Metal / Alloy Batteries Stand-Alone | 5 lbs | | 04 | Lithium-ion or Lithium Polymer Batteries Contained in Equipment | 11 lbs | | 05 | Lithium-ion or Lithium Polymer Batteries with Equipment | 11 lbs | | 06 | Lithium-ion or Lithium Polymer Batteries Stand-Alone | 5 lbs | | 08 | Limited Quantity / ORM-D | 25 lbs | | 09 | Small Quantity Provision | 25 lbs | ### International shipments | Category Code | Description | Max. Weight | Restrictions | | ------------- | --------------------------------------------------------------- | ----------- | ------------ | | 01 | Lithium Metal / Alloy Batteries Contained in Equipment | 4.4 lbs | Canada Only | | 01 | Lithium Metal / Alloy Batteries Contained in Equipment | 11 lbs | Canada Only | | 02 | Lithium Metal / Alloy Batteries Packed with Equipment | 11 lbs | Canada Only | | 03 | Lithium Metal / Alloy Batteries Stand Alone | 5 lbs | Canada Only | | 04 | Lithium-ion or Lithium Polymer Batteries Contained in Equipment | 4.4 lbs | Canada Only | | 04 | Lithium-ion or Lithium Polymer Batteries Contained in Equipment | 11 lbs | Canada Only | | 05 | Lithium-ion or Lithium Polymer Batteries Packed with Equipment | 11 lbs | Canada Only | | 06 | Lithium-ion or Lithium Polymer Batteries Stand Alone | 5 lbs | Canada Only | | 40 | Limited quantities | 25 lbs | Canada Only | For more details on category codes, refer to the [DHL eCommerce references](https://api.dhlecs.com/docs/references) guide. # ePost Global Source: https://docs.goshippo.com/carriers/e-post-global Learn about ePost Global requirements for including line items in the parcel object for domestic shipment rates and labels. Special requirements for ePost Global domestic shipments API users attempting to retrieve rates or purchase labels for ePost Global domestic shipments must specify an additional line\_items field within the Parcel object. Below is a sample parcel payload with line\_items specified: ```json theme={null} { "length": 5, "width": 5, "height": 5, "distance_unit": "in", "weight": 3, "mass_unit": "lb", "line_items": [ { "manufacture_country": "US", "quantity": 1, "weight_unit": "lb", "weight": 1, "title": "Jeans", "amount": "30", "sku": "HM-112", "currency": "USD" }, ... ] } ``` Create a new shipment as usual with the parcel to obtain a list of rate objects or use single call label creation to purchase labels. Note ePost Global international shipments do not require parcel line\_items. # Get your Carrier Account Details Source: https://docs.goshippo.com/carriers/integration-guides/apg/create-an-account Add your APG carrier account credentials to Shippo so you can generate shipping rates and create labels. To use the carrier APG with Shippo, you must [use your own account](#use-your-own-carrier-account) and share your account details with Shippo. ## Use your own carrier account Follow this guide to add your APG account to Shippo. After adding your account, Shippo can use your account details for generating shipping rates and creating labels. This step requires you to have your APG account id and password. This step should only be completed once. When you have created your carrier account, you can use the carrier `object_id` to reference your carrier. ### HTTP Method POST ### URL ``` https://api.goshippo.com/carrier_accounts/ ``` ### Request Payload | Parameter | Description | | ------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | | carrier\* | `apg` | | account\_id\* | A unique identifier for the account which cannot be changed later. Used only for internal purposes. This should be a username provided by APG | | parameters\* | parameters is an array of additional parameters for the account, such as password or token. Check [APG parameters](#account_params) for more details | | active | Set to `true` to enable account. Set to `false` to disable account. | | test | Set to `true` if you want to set the account in test mode. Using test mode you can generate test labels without incurring a charge | Note: Parameters with an \* are mandatory ### APG Account Parameters | Parameter | Description | | ------------- | ----------------------------------------------------------------- | | account\_id\* | Key to access the API. A string value APG assigns to each client. | | password\* | Key to access the API. A string value APG assigns to each client. | | sender\_code | Code assigned by APG to to each client. Example: “sti.us.client” | ### Response Code 201 ### Example #### Request Sample ```shell cURL theme={null} curl --location --request POST 'https://api.goshippo.com/carrier_accounts/' \ --header 'Authorization: ShippoToken ' \ --header 'Content-Type: application/json' \ --data-raw '{ "carrier": "apg", "object_owner": "billable-user@shippo.com", "account_id": "EXAMPLE_UNIQUE_ACCOUNT_ID", "parameters": { "account_id": "ACCOUNT_ID_PROVIDED_BY_APG_SHOULD_BE_HERE", "password": "PASSWORD_PROVIDED_BY_APG_SHOULD_BE_HERE", "sender_code": "STI.US.EXAMPLE" }, "test": false, //true if it is test account "active": true, "is_shippo_account": false, "metadata": "Metadata_example for APG Account", "carrier_name": "APG" }' ``` #### Response Sample ```json theme={null} "carrier": "apg", "object_id": "2edac0dddcfc4416b2708cc10b2d11e0", "object_owner": "nataliya_eng@shippo.com", "account_id": "UNIQUE_ACCOUNT_ID_HERE", "parameters": { "password": "******", "account_id": "shippo", "sender_code": "sti.us.EXAMPLE" }, "test": false, "active": true, "is_shippo_account": false, "metadata": "APG - Shippo Account - test", "carrier_name": "APG", "carrier_images": { "200": "https://dev-qa-static-shippodev-com.s3.amazonaws.com/providers/200/apg.png", "75": "https://dev-qa-static-shippodev-com.s3.amazonaws.com/providers/75/apg.png" } ``` Once you have retrieved the `object_id` for your carrier, proceed to [Step 2: Create shipment](/carriers/integration-guides/apg/create-shipment). # Create shipment Source: https://docs.goshippo.com/carriers/integration-guides/apg/create-shipment Create an APG shipment with addresses, parcel details, and customs declarations to generate shipping rates. The second step is to create a shipment. The shipment includes all the details about the item you are shipping including * the "from" and "to" addresses * the parcel details * extra parameters * customs declaration, that are required for international shipments Creating a shipment automatically generates a list of shipping rates that you can use to select the best shipping option for you. In these examples, you will see rates from APG but you can also generate rates from other carriers using the carrier\_accounts parameter. ## HTTP Method POST ## URL ``` https://api.goshippo.com/shipments/ ``` ## Request Payload | Parameter | Description | | ---------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | address\_from\* | [Refer to the Address object](#address) | | address\_to\* | [Refer to the Address object](#address) | | parcels\* | [Refer to the Parcel object](#parcel) | | extra | [Refer to the Extra object](#extra) | | customs\_declaration\* | [Refer to the Customs declaration object](#customs_declaration).
Required for international shipments | | carrier\_accounts | An array of object\_ids of the carrier account objects to be used for getting shipping rates for this shipment. This carrier account object\_id is available when an account is created. See [carrier account response sample](#carrier-acc-resp-ex).
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. | | label\_file\_type\* | Allowed values: `PDF`, `PDF_A4`, `PDF_A6`, `PDF_4x6`, `PDF_4x8`, `PDF_SINGLE_8X11`, `PDF_2.3x7.5`, `PNG`, `PNG_2.3x7.5`, `ZPLII` | | metadata | Possible to use to define customer ID | | async | If 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. | Note: Parameters with an \* are mandatory ## Objects ###
Address | Parameter | Description | | --------------- | ---------------------------------------------------------------------------- | | Name\* | First and Last name of the addressee | | Company | Company Name (if applicable) | | Street1\* | First street line, 35 character limit. Usually street number and street name | | Street2 | Second street line, 35 character limit | | City\* | Name of a city | | Zip\* | Postal code of an address | | State\* | State/Province values are required for shipments from/to the US. | | Country\* | ISO 2 country code | | phone | Phone number of the addressee | | email | E-mail address of the contact person, RFC3696/5321-compliant | | is\_residential | `true`(if address is residential) or `false` if not. | ### Parcel | Parameter | Description | | --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | length\* | Length of the Parcel. Up to six digits in front and four digits after the decimal separator are accepted | | width\* | Width of the Parcel. Up to six digits in front and four digits after the decimal separator are accepted | | height\* | Height of the Parcel. Up to six digits in front and four digits after the decimal separator are accepted | | distance\_unit\* | "cm"
"in"
"ft"
"mm"
"m"
"yd" | | weight\* | Weight of the parcel. Up to six digits in front and four digits after the decimal separator are accepted | | mass\_unit\* | "g"
"oz"
"lb"
"kg" | | line\_items\* | Array of object for one or several line items. This section contains the line items’ details that were packed in the relevant parcel. See [line items](#lineitem) object | | custom\_declaration\* | Custom declaration support. See [customs declaration](#customs_declaration) object | ###
Line Items | Parameter | Description | | ---------------------- | --------------------------------------------------- | | title\* | Description of product | | variant\_title | Additional description | | SKU\* | Product’s stock keeping unit | | hs\_code\* | hs\_code | | quantity | quantity | | amount\* | Amount | | currency\* | Currency | | weight\_unit\* | Weight unit for this item’s type | | manufacture\_country\* | [ISO 2 country code](https://www.iso.org/home.html) | ### Customs Declaration **Note** * If shipping to AU or NZ using APG, you must pass an `ARN` on the tax identifiers using `Exporter_identification.tax_id` in your customs declaration. * If shipping to an EU country using APG, you must pass an `IOSS` value on the tax identifiers using `Exporter_identification.tax_id` in your customs declaration. | Parameter | Description | | ------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | contents\_type | Type of goods of the shipment.
Possible values:
`DOCUMENTS`
`GIFT`
`SAMPLE`
`MERCHANDISE`
`HUMANITARIAN_DONATION`
`RETURN_MERCHANDISE`
`OTHER` | | certify | Expresses that the certify\_signer has provided all information of this customs declaration truthfully. Boolean value: `true` or `false`. | | certify\_signer | Name of the person who created the customs declaration and is responsible for the validity of all information provided. | | incoterm | The incoterm reference of the shipment.
Possible values:
`DDU` (For shipments where you expected to use `DAP`, use `DDU` instead)
`DDP` | | is\_vat\_collected | Indicates whether the shipment's destination VAT has been collected. Required for AU/NZ destinations if exporter\_indentification.number is not empty and exporter\_indentification.tax\_id = “ARN” Boolean value: true or false. | | Exporter\_identification | Exporter\_identification should be here as number and tax\_id.
`number` - means tax identification number.
`tax_id` - type of tax identification.

Possible types of tax\_id:
`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

Example:
"exporter\_identification":

"tax\_id":
"type": "IOSS",
"number": "TAXNUMBER12345"


| | items\* | Array of Customs Items object\_ids
Example:

"description": "shirt",
"quantity": 1,
"net\_weight": "1",
"mass\_unit": "oz",
"value\_amount": "10",
"value\_currency": "USD",
"origin\_country": "US",
"tariff\_number": "",
"metadata": "ts mi"
| ###
Extra Details | Parameter | Description | | ----------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | extra: reference\_1 | APG OrderNo. The primary shipment reference used by your organization. It can be the sales order number, the shipment number or any other delivery identification. Optional text to be printed on the shipping label. Up to 50 characters | | extra: carrier\_hub\_id | Identifies the carrier injection site (APG HAWBOrigin). You should only specify this for shipments originating from USA. The following codes are supported hub IDs: `JFK`, `LAX`, `MIA`, `ORD`, `ATL`. | ## Response Code 201 ## Examples ### Request Sample ```shell cURL theme={null} curl --location --request POST 'https://api.goshippo.com/carrier_accounts/' \ --header 'Authorization: ShippoToken ' \ --header 'Content-Type: application/json' \ --data-raw '{ "object_purpose": "PURCHASE", "shipment_date": "2022-12-10T23:59:59Z", "address_from": { "object_purpose": "PURCHASE", "name": "Shipping Manager", "company": "Shippo", "street1": "4727 W 1st St", "street2": "", "city": "New York", "state": "NY", "zip": "10005", "country": "US", "phone": "12028642186", "email": "nataliya_eng@shippo.com", "is_residential": false }, "address_to": { "object_purpose": "PURCHASE", "name": "Nata Lee", "company": "Shipper -2 , Inc.", "street1": "1720 S Grand Ave", "city": "Sydney", "state": "VIC", "zip": "3026", "country": "AU", "phone": "+1 666 147 2589", "email": "nata@gmail.com", "metadata": "", "is_residential": true }, "parcels": { "length": "10", "width": "8", "height": "10", "distance_unit": "cm", "weight": 2, "mass_unit": "kg", "line_items": [ { "title": "Hippo Magazines", "variant_title": "June edition", "sku": "HM-123", "hs_code": "2123", "quantity": 1, "amount": "12.10", "currency": "USD", "weight_unit": "kg", "manufacture_country": "US" }, { "title": "Hippo Magazines -2", "variant_title": "June edition", "sku": "HM-1234", "hs_code": "21234", "quantity": 1, "amount": "15.10", "currency": "USD", "weight_unit": "kg", "manufacture_country": "US" } ] }, "customs_declaration": { "contents_type": "MERCHANDISE", "non_delivery_option": "ABANDON", "certify": true, "certify_signer": "Test Certifier", "incoterm": "DDP", "is_vat_collected": "", "exporter_identification": { "tax_id": { "type": "ARN", "number": "TAXNUMBER12345" } }, "items": [ { "description": "shirt", "quantity": 1, "net_weight": "1", "mass_unit": "oz", "value_amount": "10", "value_currency": "USD", "origin_country": "US", "tariff_number": "", "metadata": "ts mi" } ] }, "extra": { "reference_1": "1234567890", "carrier_hub_id": "ORD" }, "metadata": "Customer ID 123456", "async": false, "label_file_type": "PDF", "carrier_accounts": [ "{{APG_ACC}}" ] }’ ``` ### Response Sample ```json theme={null} { "carrier_accounts": [ "2edac0dddcfc4416b2708cc10b2d11e0" ], "object_created": "2022-12-09T13:27:24.058Z", "object_updated": "2022-12-09T13:27:24.058Z", "object_id": "f2f1bf3f4a004ce2b609f7c19251b15d", "object_owner": "nataliya_eng@shippo.com", "status": "SUCCESS", "address_from": { "object_id": "8d50f611519e4efb89934cc3ee1905c0", "is_complete": true, "name": "Shipping Manager", "company": "", "street_no": "", "street1": "4727 W 1st St", "validation_results": {}, "street2": "", "street3": "", "city": "New York", "state": "NY", "zip": "10005", "country": "US", "phone": "12028642186", "email": "nataliya_eng@shippo.com", "is_residential": false, "test": true }, "address_to": { "object_id": "36e3b76eece54237aa7a1b33bc6b834b", "is_complete": true, "name": "Nata Lee", "company": "Shipper -2 , Inc.", "street_no": "", "street1": "1720 S Grand Ave", "validation_results": {}, "street2": "", "street3": "", "city": "Sydney", "state": "VIC", "zip": "3026", "country": "AU", "phone": "0016661472589", "email": "nata@gmail.com", "is_residential": true, "test": true }, "parcels": [ { "object_state": "VALID", "object_created": "2022-12-09T13:27:23.751Z", "object_updated": "2022-12-09T13:27:24.413Z", "object_id": "9510a3eeb03245a4b53703019894b323", "object_owner": "nataliya_eng@shippo.com", "template": null, "extra": {}, "length": "10.0000", "width": "10.0000", "height": "8.0000", "distance_unit": "cm", "weight": "2.0000", "mass_unit": "kg", "value_amount": null, "value_currency": null, "metadata": "", "line_items": [ "ed20bbd90c4248cd9ab3ea4836a9d407", "964b6b076b034b64b911cb18afbb489a" ], "test": true } ], "shipment_date": "2022-12-10T23:59:59Z", "address_return": { "object_id": "8d50f611519e4efb89934cc3ee1905c0", "is_complete": true, "name": "Shipping Manager", "company": "", "street_no": "", "street1": "4727 W 1st St", "validation_results": {}, "street2": "", "street3": "", "city": "New York", "state": "NY", "zip": "10005", "country": "US", "phone": "12028642186", "email": "nataliya_eng@shippo.com", "is_residential": false, "test": true }, "alternate_address_to": null, "customs_declaration": { "object_created": "2022-12-09T13:27:23.959Z", "object_updated": "2022-12-09T13:27:23.959Z", "object_id": "66b6b7ee811b44a7abddaa4307181afd", "object_owner": "nataliya_eng@shippo.com", "object_state": "VALID", "address_importer": null, "certify_signer": "Test Certifier", "certify": true, "items": [ "249fa7da308d4e41b2af4fed32368d81" ], "non_delivery_option": "ABANDON", "contents_type": "MERCHANDISE", "contents_explanation": "", "exporter_reference": "", "importer_reference": "", "invoice": "", "commercial_invoice": false, "license": "", "certificate": "", "notes": "", "eel_pfc": "", "aes_itn": "", "disclaimer": "", "incoterm": "DDP", "metadata": "", "test": true, "duties_payor": null, "b13a_filing_option": "", "b13a_number": "", "invoiced_charges": null, "exporter_identification": { "tax_id": { "type": "ARN", "number": "TAXNUMBER12345" } }, "is_vat_collected": false }, "extra": { "reference_1": "1234567890", "carrier_hub_id": "ORD" }, "rates": [ { "object_created": "2022-12-09T13:27:26.219Z", "object_id": "faef46ec7aa041adb700d288eb75df9d", "object_owner": "nataliya_eng@shippo.com", "shipment": "f2f1bf3f4a004ce2b609f7c19251b15d", "attributes": [ "CHEAPEST" ], "amount": "6.10", "currency": "USD", "amount_local": "8.99", "currency_local": "AUD", "provider": "APG", "provider_image_75": "https://dev-qa-static-shippodev-com.s3.amazonaws.com/providers/75/apg.png", "provider_image_200": "https://dev-qa-static-shippodev-com.s3.amazonaws.com/providers/200/apg.png", "servicelevel": { "name": "ePacket Plus", "token": "epacket_plus", "terms": "Only delivery tracking in destination country", "extended_token": "epacket_plus", "parent_servicelevel": null }, "estimated_days": null, "arrives_by": null, "duration_terms": "", "messages": [], "carrier_account": "2edac0dddcfc4416b2708cc10b2d11e0", "test": true, "zone": null }, { "object_created": "2022-12-09T13:27:26.219Z", "object_id": "afd962698779489d9210cc7ed0ea0f4a", "object_owner": "nataliya_eng@shippo.com", "shipment": "f2f1bf3f4a004ce2b609f7c19251b15d", "attributes": [], "amount": "9.76", "currency": "USD", "amount_local": "14.38", "currency_local": "AUD", "provider": "APG", "provider_image_75": "https://dev-qa-static-shippodev-com.s3.amazonaws.com/providers/75/apg.png", "provider_image_200": "https://dev-qa-static-shippodev-com.s3.amazonaws.com/providers/200/apg.png", "servicelevel": { "name": "eParcel premium", "token": "eparcel_premium", "terms": "", "extended_token": "eparcel_premium", "parent_servicelevel": null }, "estimated_days": null, "arrives_by": null, "duration_terms": "", "messages": [], "carrier_account": "2edac0dddcfc4416b2708cc10b2d11e0", "test": true, "zone": null } ], "messages": [], "metadata": "Customer ID 123456", "test": true, "order": null } ``` # Multi-parcel support Source: https://docs.goshippo.com/carriers/integration-guides/apg/multiparcel-support Create multi-parcel shipments with APG using the one-step or two-step label creation process in Shippo. This is the method when we create several parcels in shipment. Shippo supports creating multi-parcel shipments for both one step label and 2-steps label creation. The example shown here uses one step label creation. ## HTTP Method POST ## URL ``` https://api.goshippo.com/transactions/ ``` ## Request Payload | Parameter | Description | | ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | parcels\* | Array of parcels.
[Example with 2 parcels](#2parcel-ex) | | label\_file\_type | Allowed values:
`PDF`
`PDF_A4`
`PDF_A6`
`PDF_4x6`
`PDF_4x8`
`PDF_SINGLE_8X11`
`PDF_2.3x7.5`
`PNG`
`PNG_2.3x7.5`
`ZPLII` | ###
Example with 2 parcels ```json theme={null} "parcels": [ { "length": "10", "width": "8", "height": "10", "distance_unit": "cm", "weight": 2, "mass_unit": "kg", "line_items": [ { "title": "Hippo Magazines", "variant_title": "June edition", "sku": "HM-123", "hs_code": "2123", "quantity": 1, "amount": "12.10", "currency": "USD", "weight_unit": "kg", "manufacture_country": "US" }, { "title": "Hippo Magazines -2", "variant_title": "June edition", "sku": "HM-1234", "hs_code": "21234", "quantity": 1, "amount": "15.10", "currency": "USD", "weight_unit": "kg", "manufacture_country": "US" } ] }, { "length": "10", "width": "5", "height": "8", "distance_unit": "cm", "weight": 3, "mass_unit": "kg", "line_items": [ { "title": "Hippo Magazines - 2", "variant_title": "June edition", "sku": "HM-123", "hs_code": "2123", "quantity": 1, "amount": "12.10", "currency": "USD", "weight_unit": "kg", "manufacture_country": "US" } ] } ], ``` ## Response Code 201 Created ## Request Sample ### One step label API with 2 parcels ```shell cURL theme={null} curl --location --request POST 'https://api.goshippo.com/transactions' \ --header 'Authorization: ShippoToken ’ \ --header 'Content-Type: application/json' \ --data-raw '{ { "shipment": { "object_purpose": "PURCHASE", "address_from": { "object_purpose": "PURCHASE", "name": "Shipping Mgr", "company": "Shippo", "street1": "4727 W 1st St", "street2": "", "city": "New York", "state": "NY", "zip": "10005", "country": "US", "phone": "12028642186", "email": "nataliya_eng@shippo.com", "is_residential": false }, "address_to": { "object_purpose": "PURCHASE", "name": "Nata Lee", "street1": "1720 S Grand Ave", "city": "Sydney", "state": "VIC", "zip": "3026", "country": "AU", "phone": "+1 666 147 2589", "email": "nata@gmail.com", "metadata": "", "is_residential": true }, "parcels": [ { "length": "10", "width": "8", "height": "10", "distance_unit": "cm", "weight": 2, "mass_unit": "kg", "line_items": [ { "title": "Hippo Magazines", "variant_title": "June edition", "sku": "HM-123", "hs_code": "2123", "quantity": 1, "amount": "12.10", "currency": "USD", "weight_unit": "kg", "manufacture_country": "US" }, { "title": "Hippo Magazines -2", "variant_title": "June edition", "sku": "HM-1234", "hs_code": "21234", "quantity": 1, "amount": "15.10", "currency": "USD", "weight_unit": "kg", "manufacture_country": "US" } ] }, { "length": "10", "width": "5", "height": "8", "distance_unit": "cm", "weight": 3, "mass_unit": "kg", "line_items": [ { "title": "Hippo Magazines - 2", "variant_title": "June edition", "sku": "HM-123", "hs_code": "2123", "quantity": 1, "amount": "12.10", "currency": "USD", "weight_unit": "kg", "manufacture_country": "US" } ] } ], "customs_declaration": { "contents_type": "MERCHANDISE", "certify": true, "certify_signer": "Test Certifier", "incoterm": "DDP", "is_vat_collected": "paid", "exporter_identification": { "tax_id": { "type": "IOSS", "number": "TAXNUMBER12345" } }, "items": [ { "description": "shirt", "quantity": 1, "net_weight": "1", "mass_unit": "oz", "value_amount": "10", "value_currency": "USD", "origin_country": "US", "tariff_number": "", "metadata": "ts mi" } ] }, "extra": { "reference_1": "123456780", "carrier_hub_id": "ORD" }, "metadata": "Customer ID 123456", "async": false }, "label_file_type": "PDF", "carrier_account": "{{APG_ACC}}", "servicelevel_token": "eparcel_premium" } }' ``` ## Response Sample ```json theme={null} { "object_state": "VALID", "status": "SUCCESS", "object_created": "2022-12-15T10:17:53.981Z", "object_updated": "2022-12-15T10:18:05.066Z", "object_id": "8c38d895e31c49c0b01106437f3d6375", "object_owner": "nataliya_eng@shippo.com", "test": true, "rate": { "object_id": "d576659148574262b540c1d955def30a", "amount": "22.32", "currency": "USD", "amount_local": "32.95", "currency_local": "AUD", "provider": "APG", "servicelevel_name": "eParcel premium", "servicelevel_token": "eparcel_premium", "carrier_account": "2edac0dddcfc4416b2708cc10b2d11e0" }, "tracking_number": "2908932", "tracking_status": "UNKNOWN", "eta": null, "tracking_url_provider": "https://apgecommerce.com/?page_id=18102908932", "label_url": "https://dev-qa-deliver.shippodev.com/8c38d895e31c49c0b01106437f3d6375.pdf?Expires=1702635483&Signature=cx-F9Zon1PeX8zn2v3kSUhETX1uNmQeLDmL4rR2td42mdnOabmUSj-Hi0AiQ1ea3yjPgmLu6oG-nOb7yOa36jsuKaF9RjB22pzpMUVi7PspI8Av~kYRSCAjd4BFgeOI8qNdmSlp5XSuj0LLs1iMU5DnqoSQQZ-SdnHEYfB1DsBOaJKz32S16Zr-pWTAMHxD2JCCiRjRiudpIdno7W4kFJ8aBBPp60DTOyFjj8RQAbNyDtOe3TKngSx6ZmTmzRLZ2RknyU-bJOdA6hJOISgwoF6vcHMtvffr1wIgtzbkC5m7vn8dAsoyozdbAV1bsU-dal~fWDtjBfrjVgWrPFgf~IA__&Key-Pair-Id=APKAJKRDBHOMWKB2OAVQ", "commercial_invoice_url": "https://dev-qa-deliver.shippodev.com/ci_8c38d895e31c49c0b01106437f3d6375.pdf?Expires=1702635485&Signature=kF3QO30vkFsiEmO0mdOy38atSo~SXugd3GkOns~6LxwrnZB5c3wewkO6gKdfIktQf4EejnYp~4cRpWm0Z5rN8FRwD6f5QSF54R~4ZrURq3c3JQ4YjfO7Jba7H-6HAiAP9XzGsQ8rPREz2ckrSvGSF-0fycmEgh5QngF~H9V9r7wf1SDiBM7AOVfCb0zYJeqHrPEwsPy7YOOnXzn~vl7KCAc48lI08yuxeUNcOo1mr0yCJfNaoqOwYVlyd8dGNXsXu~76lP5TZvoMLHshjQYFPr2HguL6ChgEUnFwrks7wjC2btRVDGcBlcnQWi0ndCX56Aag9zqd3ubOHiPQ1pI7fg__&Key-Pair-Id=APKAJKRDBHOMWKB2OAVQ", "messages": [], "order": null, "metadata": "", "parcel": "ac06b161f77f46fc8f2c0edca47251b3", "billing": { "payments": [] }, "qr_code_url": null } ``` # Purchase label Source: https://docs.goshippo.com/carriers/integration-guides/apg/purchase-label Purchase an APG shipping label from a created shipment or generate one in a single API call using Shippo. The final step is to purchase the shipment. This will generate your shipping label. There are two ways to purchase a shipment. 1. You can [purchase the shipment object](#purchase-from-created-shipment) you created in the last step. This is useful when you want to find the best rate and service level for your shipment. 2. You can purchase a label without a [shipment object in a single call](#purchase-label-in-one-call). This is useful when you what to immediately create your label. ## HTTP Method POST ## URL ``` https://api.goshippo.com/transactions/ ``` ## Purchase from created Shipment This is a flow where we first create a shipment object (and get rates for a given shipment). Then, we purchase a label for the provided `rate`. ### Request Payload | Parameter | Description | | ----------------- | ------------------------------------------------------------------------------------------------------------------------------- | | rate\* | ‘object\_id’ of the rate object we get in the create shipments call response. | | parcels | Array of parcels
[Example with 2 parcels](#multi-parcel-ex) | | label\_file\_type | Allowed values:`PDF`, `PDF_A4`, `PDF_A6`, `PDF_4x6`, `PDF_4x8`, `PDF_SINGLE_8X11`, `PDF_2.3x7.5`, `PNG`, `PNG_2.3x7.5`, `ZPLII` | ###
Multiple parcels payload example ```json theme={null} "parcels": [ { "length": "10", "width": "8", "height": "10", "distance_unit": "cm", "weight": 2, "mass_unit": "kg", "line_items": [ { "title": "Hippo Magazines", "variant_title": "June edition", "sku": "HM-123", "hs_code": "2123", "quantity": 1, "amount": "12.10", "currency": "USD", "weight_unit": "kg", "manufacture_country": "US" }, { "title": "Hippo Magazines -2", "variant_title": "June edition", "sku": "HM-1234", "hs_code": "21234", "quantity": 1, "amount": "15.10", "currency": "USD", "weight_unit": "kg", "manufacture_country": "US" } ] }, { "length": "10", "width": "5", "height": "8", "distance_unit": "cm", "weight": 3, "mass_unit": "kg", "line_items": [ { "title": "Hippo Magazines - 2", "variant_title": "June edition", "sku": "HM-123", "hs_code": "2123", "quantity": 1, "amount": "12.10", "currency": "USD", "weight_unit": "kg", "manufacture_country": "US" } ] } ] ``` ### Example #### Request Sample ```shell cURL theme={null} curl --location --request POST 'https://api.goshippo.com/transactions' \ --header 'Authorization: ShippoToken ’ \ --header 'Content-Type: application/json' \ --data-raw '{ "rate": "74800d3fa6734d88ad65b88dc4ed2008", "label_file_type": "PDF", "async": false }' ``` #### Response Sample ```json theme={null} { { "object_state": "VALID", "status": "SUCCESS", "object_created": "2022-12-14T16:31:14.268Z", "object_updated": "2022-12-14T16:31:21.494Z", "object_id": "b470b8cae35544728279664d33cd3abb", "object_owner": "nataliya_eng@shippo.com", "test": true, "rate": "562f1c1a920949789702b67c24d514fe", "tracking_number": "2908922", "tracking_status": "UNKNOWN", "eta": null, "tracking_url_provider": "https://apgecommerce.com/?page_id=18102908922", "label_url": "https://dev-qa-deliver.shippodev.com/b470b8cae35544728279664d33cd3abb.pdf?Expires=1702571481&Signature=X2I6CEAXakpxb3GFiwxa0RwYezqOpMRnRsK55WBYkMrcKB5KttFBZumgjUfLxDmBXjHMDyaX9EBT6iYS4LQXPgu2EGguePYIZzp9vCeSjjzr4fsqR7Qz-g3URrGn~ljI5fa2Cp4kXJ2V9lH7GaPGQkzzRQa7YDBP7JT0Eo3R1gqZt8i3eJin97We-r4hw8DL70rAp5mdPNNZHydg2NQBuHWCLbW6D4a~0GaARlU~dsMqGzKCrfc-MPgCiKYI8FOgLH3yY9mVM7pWILB-MWZ3MOX0EOnnKyHROskBPyS4XbpYGC~kNo2ZihwwZyO2zSHg-AwdTXMEV3XZSOFSYX0lNA__&Key-Pair-Id=APKAJKRDBHOMWKB2OAVQ", "commercial_invoice_url": "https://dev-qa-deliver.shippodev.com/ci_b470b8cae35544728279664d33cd3abb.pdf?Expires=1702571481&Signature=E5ECWAA1x3oKrDN-2zuhwrIjlsX3Z3fr7dfFEqpeeSuTAhn9DJXlM3dMm~ecpuoLn5McoEfFtg0ZnSIQLrlqqJvnbqfUNpPgUrZsjnABpK7tJeCqq8CQQB2ttar8HMNuPe7oSJlljrcfAA93-mjuI~1ddT7rTGOvazIizawpSKmppbPjJdzuvMS~s2YHaaIFQXMl1vFK0PDI6TyKAAJKIpEs3FOaqDnTSXZi1Ym0g3JIQEq2~kNJ6oEZ5jLc-fciO7rwh4qJApSbpAbMic6YkHkrbN0YEbY9tSgCwM7sLwJSnndFqY~6-XvveLSfwRmvNXVZ58qB9FZ82~~qS8Pi~g__&Key-Pair-Id=APKAJKRDBHOMWKB2OAVQ", "messages": [], "order": null, "metadata": "", "parcel": "bf4356b1eda94d30be17662df1ed6e4e", "billing": { "payments": [] }, "qr_code_url": null } } ``` ## Purchase label in one call This is a flow where we create a shipment object from the request payload and return label for it in one call. This is useful if you already know which carrier and service you want to use. ### Request Payload | Parameter | Description | | --------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | shipment\* | [Refer to the Shipment object](#shipment). | | carrier\_account\* | `object_id` of the carrier account to be used for purchasing this label. This carrier account object\_id is available when an account is created. | | servicelevel\_token\* | Name of the service level to use. For APG must be one of the following:
`epacket`
`epacket_plus`
`eparcel_premium`
`apg_eparcel_expedited`
These are case sensitive. | | label\_file\_type\* | Allowed values:
`PDF`
`PDF_A4`
`PDF_A6`
`PDF_4x6`
`PDF_4x8`
`PDF_SINGLE_8X11`
`PDF_2.3x7.5`
`PNG`
`PNG_2.3x7.5`
`ZPLII` | ###
Shipment | Parameter | Description | | --------------- | ------------------------------------------------------------------------------------------------------ | | address\_from\* | [Refer to the Address object](/carriers/integration-guides/apg/create-shipment#address) | | address\_to\* | [Refer to the Address object](/carriers/integration-guides/apg/create-shipment#address) | | parcels\* | List of Parcel objects. [Refer Parcel object](/carriers/integration-guides/apg/create-shipment#parcel) | | extra | [Refer to the Extra object](/carriers/integration-guides/apg/create-shipment#extra) | ### Example #### Request sample for label creation with single call ```shell cURL theme={null} curl --location --request POST 'https://api.goshippo.com/carrier_accounts/' \ --header 'Authorization: ShippoToken ' \ --header 'Content-Type: application/json' \ --data-raw '{ "shipment": { "object_purpose": "PURCHASE", "address_from": { "object_purpose": "PURCHASE", "name": "Shipping Mgr", "company": "Shippo", "street1": "4727 W 1st St", "street2": "", "city": "New York", "state": "NY", "zip": "10005", "country": "US", "phone": "12028642186", "email": "nataliya_eng@shippo.com", "is_residential": false }, "address_to": { "object_purpose": "PURCHASE", "name": "Nata Lee", "street1": "1720 S Grand Ave", "city": "Sydney", "state": "VIC", "zip": "3026", "country": "AU", "phone": "+1 666 147 2589", "email": "nata@gmail.com", "metadata": "", "is_residential": true }, "parcels": { "length": "10", "width": "8", "height": "10", "distance_unit": "cm", "weight": 2, "mass_unit": "kg", "line_items": [ { "title": "Hippo Magazines", "variant_title": "June edition", "sku": "HM-123", "hs_code": "2123", "quantity": 1, "amount": "12.10", "currency": "USD", "weight_unit": "kg", "manufacture_country": "US" } ] }, "customs_declaration": { "contents_type": "MERCHANDISE", "certify": true, "certify_signer": "Test Certifier", "incoterm": "DDP", "is_vat_collected": "paid", "exporter_identification": { "tax_id": { "type": "IOSS", "number": "TAXNUMBER12345" } }, "items": [ { "description": "shirt", "quantity": 1, "net_weight": "1", "mass_unit": "oz", "value_amount": "10", "value_currency": "USD", "origin_country": "US", "tariff_number": "", "metadata": "ts mi" } ] }, "extra": { "reference_1": "123456780", "carrier_hub_id": "ORD" }, "metadata": "Customer ID 123456", "async": false }, "label_file_type": "PDF", "carrier_account": "{{APG_ACC}}", "servicelevel_token": "eparcel_premium" }’ ``` #### Response sample ```json theme={null} { "object_state": "VALID", "status": "SUCCESS", "object_created": "2022-12-14T16:28:24.551Z", "object_updated": "2022-12-14T16:28:37.611Z", "object_id": "b194569f472c4dd9b9175ce498bcb914", "object_owner": "nataliya_eng@shippo.com", "test": true, "rate": { "object_id": "562f1c1a920949789702b67c24d514fe", "amount": "9.92", "currency": "USD", "amount_local": "14.45", "currency_local": "AUD", "provider": "APG", "servicelevel_name": "eParcel premium", "servicelevel_token": "eparcel_premium", "carrier_account": "2edac0dddcfc4416b2708cc10b2d11e0" }, "tracking_number": "2908920", "tracking_status": "UNKNOWN", "eta": null, "tracking_url_provider": "https://apgecommerce.com/?page_id=18102908920", "label_url": "https://dev-qa-deliver.shippodev.com/b194569f472c4dd9b9175ce498bcb914.pdf?Expires=1702571314&Signature=AevKXrScFoYs8a1olpQIAFM0trtLm5ZFiXa4PQwUvCR38AUBLzoPN87xwafHLflD5LgvhvIVsQ9DZ~qR8-UE~Ke9cVciH3HsaU5GTHUEDGWabjghi8NJim4lARzJH38SrwQtRGlhVse9EIgvDt9GGoptyPtz2ypRuvFUhKnbGnSV2E2Qdvmw5rJqdzHNT4eoIZMWWgrh9fBdismZ0CnplnxzaGpxXygUKzbinii~EAzHLsaEYY-AdiaSFi3TJ7agzQj3aoGVjmtdaup20aJ5BGsYcQacNayW-1SlIrrBbtVeYRC8Jm3SyGIgntsAGfO93Zfnrc~CQAsCyjlR0dS1tw__&Key-Pair-Id=APKAJKRDBHOMWKB2OAVQ", "commercial_invoice_url": "https://dev-qa-deliver.shippodev.com/ci_b194569f472c4dd9b9175ce498bcb914.pdf?Expires=1702571317&Signature=iR-md7Vs8i8LxFokLV8TsnvHACaRn-Xj0XxS1djr9IKHYb17LoQEkqlLW7rrj5xXqroRTAxCpRtiFJuu2DclAkMxpdUsise8p4lShODyL0IzU23hyvMWaTnHgPF1rc1PCIsmn-uUvvwJ2je4FhF3rlOj2JsKKnuY0binBsQyyTbwvqhJ1DQ2IleMd85X8Oljj22W5kOop3aVaAw~-laRzAm5Qghot-clCeDvYNDQnbtDKumFE3-K-yGDhudljmlyS3mgnScFz5k0o2Je8bBGTwhmRPTl32O4Tq17QCrbW7v5CwN~bDl6qzrl2efAsns1m74fUfsYeQpausts-ueWpw__&Key-Pair-Id=APKAJKRDBHOMWKB2OAVQ", "messages": [], "order": null, "metadata": "", "parcel": "bf4356b1eda94d30be17662df1ed6e4e", "billing": { "payments": [] }, "qr_code_url": null } ``` # Weights and dimensions rules Source: https://docs.goshippo.com/carriers/integration-guides/apg/weights-and-dimensions-rules Review APG weight limits and dimension rules by destination country and product type for international shipments. | Destination | Destination IsoCountry | Product Type | Weight limit | Dimensions limit | | :------------: | :--------------------: | :--------------: | :--------------: | :--------------------------------------------------------------: | | Australia | AU | ePacket | 2KG | Length \<600mm, L+W+H \< 900mm | | Australia | AU | ePacketPlus | 2KG | Length \<600mm, L+W+H \< 900mm | | Australia | AU | eParcelPremium | 22KG | No one side > 105 cm Length
Dimension \< 0.25 cubic meters | | Australia | AU | EParcelExpedited | 20 KG | (W+H) \* 2 \< 140 cm


Length \< 105 cm | | New Zealand | NZ | EParcelExpedited | 20 KG | (W+H) \* 2 \< 140 cm


Length \< 105 cm | | Guernsey | GG | ePacket | 2KG | L\< 60 cm, L + W + H \< 90cm | | Guernsey | GG | ePacketPlus | 2KG | L\< 60 cm, L + W + H \< 90cm | | Guernsey | GG | eParcelPremium | From 3KG to 17KG | L: 90cm
L+W: 150cm
Volume: 0.113m³ | | Hong Kong | HK | EParcelExpedited | 30 KG | 120cm \*60cm \*60cm | | Hong Kong | HK | eParcelPremium | 30KG | 120cm \*60cm \*60cm | | Isle of Man | IM | ePacket | 2KG | L\< 60 cm, L + W + H \< 90cm | | Isle of Man | IM | ePacketPlus | 2KG | L\< 60 cm, L + W + H \< 90cm | | Isle of Man | IM | eParcelPremium | From 3KG to 17KG | L: 90cm
L+W: 150cm
Volume: 0.113m³ | | Israel | IL | ePacket | 2KG | L\< 60 cm, L + W + H \< 90cm | | Israel | IL | ePacketPlus | 2KG | L\< 60 cm, L + W + H \< 90cm | | Israel | IL | eParcelPremium | 20KG | 100cm \*80cm \*60cm | | Jersey | JE | ePacket | 2KG | L\< 60 cm, L + W + H \< 90cm | | Jersey | JE | ePacketPlus | 2KG | L\< 60 cm, L + W + H \< 90cm | | Jersey | JE | eParcelPremium | From 3KG to 17KG | L: 90cm
L+W: 150cm
Volume: 0.113m³ | | New Zealand | NZ | ePacket | 2KG | L\< 60 cm, L + W + H \< 90cm | | New Zealand | NZ | ePacketPlus | 2KG | L\< 60 cm, L + W + H \< 90cm | | New Zealand | NZ | eParcelPremium | 20KG | (W+H) \* 2 \< 140 cm | | United Kingdom | GB | ePacket | 2KG | L\< 60 cm, L + W + H \< 90cm | | United Kingdom | GB | ePacketPlus | 2KG | L\< 60 cm, L + W + H \< 90cm | | United Kingdom | GB | eParcelPremium | From 3KG to 17KG | L: 90cm
L+W: 150cm
Volume: 0.113m³ | | Singapore | SG | ePacket | 2KG | L\< 60 cm, L + W + H \< 90cm | | Singapore | SG | ePacketPlus | 2KG | L\< 60 cm, L + W + H \< 90cm | | Singapore | SG | eParcelPremium | 30KG | L\<1.4, (L + 2W + 2H ) \< 3m | # Get your Carrier Account Details Source: https://docs.goshippo.com/carriers/integration-guides/better-trucks/create-an-account Add your Better Trucks carrier account to Shippo using your API key and account ID to start creating shipments. To use Better Trucks as your preferred carrier, you must [use your own account](#use-your-own-carrier-account) and share your account details with Shippo. This is useful if you have negotiated your own shipping discounts with your preferred carrier. You can still use all the supported Shippo features. *** ## Use your own carrier account Follow this guide to add your Better Trucks account to Shippo. After adding your account, Shippo can use your account details for generating shipping rates and creating labels. This step requires you to have your Better Trucks account id and password. Don't already have a Better Trucks account? Contact our [support team](https://support.goshippo.com/hc/en-us/requests/new?_ga=2.121852172.681514854.1679393926-750891451.1658151685) to help you get signed up. This step should only be completed once. When you have created your carrier account, you can use the carrier `object_id` to reference your carrier. ### HTTP Method POST ### URL ``` https://api.goshippo.com/carrier_accounts/ ``` ### Request Payload | Parameter | Description | | ------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- | | carrier\* | `better_trucks` | | account\_id\* | A unique identifier for the account which cannot be changed later. Used only for internal purposes | | parameters\* | parameters is an array of additional parameters for the account, such as password or token. Check [Better Trucks parameters](#account_params) for more details | | active | Set to `true` to enable account. Set to `false` to disable account. | | test | Set to `true` if you want to set the account in test mode. Using test mode you can generate test labels without incurring a charge | Note: Parameters with an \* are mandatory ###
Better Trucks Account Parameters | Parameter | Description | | ------------- | --------------------------------------------------------------------------- | | api\_key\* | Key to access the API. A string value Better Trucks assigns to each client. | | account\_id\* | Key to access the API. A string value Better Trucks assigns to each client. | ### Response Code 201 ### Example #### Request Sample ```shell cURL theme={null} curl --location --request POST 'https://api.goshippo.com/carrier_accounts/' \ --header 'Authorization: ShippoToken ' \ --header 'Content-Type: application/json' \ --data-raw '{ "carrier": "better_trucks", "account_id": "Better_truck_account", "parameters": { "api_key": "unique_api_key_should_be_here", "account_id": "unique_account_id_should_be_here" }, "test": true, "active": true }' ``` #### Response Sample ```json theme={null} { "carrier": "better_trucks", "object_id": "a00414e75df144b596673979108bbab5", "object_owner": "nataliya_eng@shippo.com", "account_id": "Better_truck_account", "parameters": { "api_key": "******", "account_id": "UNIQUE_ACCOUNT_ID_HERE" }, "test": false, "active": true, "is_shippo_account": false, "metadata": "", "carrier_name": "BetterTrucks", "carrier_images": { "200": "https://dev-qa-static-shippodev-com.s3.amazonaws.com/providers/200/bettertrucks.png", "75": "https://dev-qa-static-shippodev-com.s3.amazonaws.com/providers/75/bettertrucks.png" } } ``` Once you have retrieved the `object_id` for your carrier, proceed to [Step 2: Create shipment](/carriers/integration-guides/better-trucks/create-shipment). # Create shipment Source: https://docs.goshippo.com/carriers/integration-guides/better-trucks/create-shipment Create a Better Trucks shipment with addresses, parcel details, and extras like signature confirmation to get rates. The second step is to create a shipment. The shipment includes all the details about the item you are shipping including * the "from" and "to" addresses * the parcel details * extra parameters Creating a shipment automatically generates a list of shipping rates that you can use to select the best shipping option for you. ## HTTP Method POST ## URL ``` https://api.goshippo.com/shipments/ ``` ## Request Payload | Parameter | Description | | ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | address\_from\* | [Refer to the Address object](#address) | | address\_to\* | [Refer to the Address object](#address) | | parcels\* | [Refer to the Parcel object](#parcel) | | extra | [Refer to the Extra object](#extra) | | carrier\_accounts | An array of object\_ids of the carrier account objects to be used for getting shipping rates for this shipment. This carrier account object\_id is available when an account is created. See [carrier account response](/carriers/integration-guides/better-trucks/create-an-account#response-sample) sample. 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 to true | | async | If 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 | Note: Parameters with an \* are mandatory ## Objects ### Address | Parameter | Description | | ---------- | ------------------------------------------------------------------------------ | | name\* | First and Last name of the addressee | | company\* | Company Name | | street1\* | First street line, 35 character limit. Usually street number and street name | | street\_no | Street number of the addressed building. This field can be included in street1 | | street2 | Second street line, 35 character limit | | city\* | Name of a city | | zip\* | Postal code of an address | | state\* | State/Province values are required for shipments from/to the US. | | country\* | ISO 2 country code | | phone | Phone number of the addressee | | email | E-mail address of the contact person, RFC3696/5321-compliant | ### Parcel | Parameter | Description | | ---------------- | -------------------------------------------------------------------------------------------------------- | | length\* | Length of the Parcel. Up to six digits in front and four digits after the decimal separator are accepted | | width\* | Width of the Parcel. Up to six digits in front and four digits after the decimal separator are accepted | | height\* | Height of the Parcel. Up to six digits in front and four digits after the decimal separator are accepted | | distance\_unit\* | "cm", "in", "ft", "mm", "m", "yd" | | weight\* | Weight of the parcel. Up to six digits in front and four digits after the decimal separator are accepted | | mass\_unit\* | "g", "oz", "lb", "kg" | ### Extra | Parameter | Description | | ----------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | signature\_confirmation | Sets if signature confirmation is required for this shipment. Possible values `true` or `false` for one of such fields:
- `signature_confirmation`
- `Is_over_21_required` | | alcohol | Need to fill if shipment contains alcohol:
"alcohol":
"contains\_alcohol": false
| ## Response Code 201 ## Examples ### Request Sample for a shipment ```shell cURL theme={null} curl --location --request POST 'https://api.goshippo.com/shipments' \ --header 'Authorization: ShippoToken ' \ --header 'Content-Type: application/json' \ --data-raw '{ "address_from": { "name": "Richard Smith", "company": "Smith & Son", "street1": "4638 Demaret Drive", "street2": "Carls Men", "city": "Agnew", "state": "California", "zip": "60612", "country": "US", "phone": "+15187674210", "email": "rsmith@shippo.com", "is_residential": true, "metadata":"Testing purposes" }, "address_to": { "name": "John doe", "company": "Does Co.", "street1": "1009 Independence", "street2": "Happy Ford", "city": "Capitol Hill", "state": "Washington", "zip": "30064", "country": "US", "phone": "+16783034845", "email": "rchamberlain@shippo.com", "is_residential": true, "metadata": "Testing_purposes" }, "parcels": [ { "weight": "49", "length": "36", "width": "22", "height": "22", "distance_unit": "in", "mass_unit": "lb" } ], "extra": { "signature_confirmation": true, "alcohol": { "contains_alcohol": false } }, "carrier_accounts": [ "{{BETTER_TRUCKS_ACC}}" ], "async": false }’ ``` ### Response Sample for a shipment ```json theme={null} { "carrier_accounts": [ "a00414e75df144b596673979108bbab5" ], "object_created": "2023-01-26T09:51:40.552Z", "object_updated": "2023-01-26T09:51:40.552Z", "object_id": "bccddc15133b485d8353a647992abc46", "object_owner": "nataliya_eng@shippo.com", "status": "SUCCESS", "address_from": { "object_id": "63970df719d24376b52a65dcae9bdf66", "is_complete": true, "name": "Richard Smith", "company": "Smith & Son", "street_no": "", "street1": "4638 Demaret Drive", "validation_results": {}, "street2": "Carls Men", "street3": "", "city": "Agnew", "state": "CA", "zip": "60612", "country": "US", "phone": "0015187674210", "email": "rsmith@shippo.com", "is_residential": true, "test": false }, "address_to": { "object_id": "4c9dd8a1d13748b2a7770e8e0d004180", "is_complete": true, "name": "John doe", "company": "Does Co.", "street_no": "", "street1": "1009 Independence", "validation_results": {}, "street2": "Happy Ford", "street3": "", "city": "Capitol Hill", "state": "WA", "zip": "30064", "country": "US", "phone": "0016783034845", "email": "rchamberlain@shippo.com", "is_residential": true, "test": false }, "parcels": [ { "object_state": "VALID", "object_created": "2023-01-26T09:51:40.509Z", "object_updated": "2023-01-26T09:51:40.597Z", "object_id": "203ce92b5a0944ada594bde482f719ff", "object_owner": "nataliya_eng@shippo.com", "template": null, "extra": {}, "length": "36.0000", "width": "22.0000", "height": "22.0000", "distance_unit": "in", "weight": "49.0000", "mass_unit": "lb", "value_amount": null, "value_currency": null, "metadata": "", "line_items": [], "test": false } ], "shipment_date": "2023-01-26T09:51:40.509Z", "address_return": { "object_id": "63970df719d24376b52a65dcae9bdf66", "is_complete": true, "name": "Richard Smith", "company": "Smith & Son", "street_no": "", "street1": "4638 Demaret Drive", "validation_results": {}, "street2": "Carls Men", "street3": "", "city": "Agnew", "state": "CA", "zip": "60612", "country": "US", "phone": "0015187674210", "email": "rsmith@shippo.com", "is_residential": true, "test": false }, "alternate_address_to": null, "customs_declaration": null, "extra": { "signature_confirmation": true, "alcohol": { "contains_alcohol": false } }, "rates": [ { "object_created": "2023-01-26T09:51:41.097Z", "object_id": "85e1d73986d648bba2b0151e1f90719a", "object_owner": "nataliya_eng@shippo.com", "shipment": "bccddc15133b485d8353a647992abc46", "attributes": [ "CHEAPEST" ], "amount": "48.76", "currency": "USD", "amount_local": "48.76", "currency_local": "USD", "provider": "Better Trucks", "provider_image_75": "https://dev-qa-static-shippodev-com.s3.amazonaws.com/providers/75/bettertrucks.png", "provider_image_200": "https://dev-qa-static-shippodev-com.s3.amazonaws.com/providers/200/bettertrucks.png", "servicelevel": { "name": "Next Day", "token": "better_trucks_next_day", "terms": "", "extended_token": "better_trucks_next_day", "parent_servicelevel": null }, "estimated_days": null, "arrives_by": "13:00:00", "duration_terms": "", "messages": [], "carrier_account": "a00414e75df144b596673979108bbab5", "test": false, "zone": null } ], "messages": [], "metadata": "", "test": false, "order": null } ``` # Purchase label Source: https://docs.goshippo.com/carriers/integration-guides/better-trucks/purchase-label Purchase a Better Trucks shipping label from an existing shipment rate or create one in a single API call. The final step is to purchase the shipment. This will generate your shipping label. There are two ways to purchase a shipment. 1. You can [purchase the shipment object](#purchase-from-created-shipment) you created in the last step 2. You can purchase a label without a [shipment object in a single call](#purchase-label-in-one-call) ## HTTP Method POST ## URL ``` https://api.goshippo.com/transactions/ ``` ## Purchase from created Shipment This is a flow where we first create a shipment object (and get rates for a given shipment). Then, we purchase a label for the provided `rate`. ### Request Payload | Parameter | Description | | ------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | rate\* | `object_id` of the rate object we get in the [create shipments call response](/carriers/integration-guides/better-trucks/create-shipment#request-sample-for-a-shipment). | | label\_file\_type\* | Allowed values: `PDF`, `PDF_A4`, `PDF_A6`, `PDF_4x6`, `PDF_4x8`, `PDF_SINGLE_8X11`, `PDF_2.3x7.5`, `PNG`, `PNG_2.3x7.5`, `ZPLII` | | | | Note: Parameters with an \* are mandatory ### Example #### Request Sample ```shell cURL theme={null} curl --location --request POST 'https://api.goshippo.com/transactions' \ --header 'Authorization: ShippoToken ’ \ --header 'Content-Type: application/json' \ --data-raw '{ "rate": "4af61f01e2a44ecbb6c278a1d573f1ff", "async": false, "label_file_type": "PDF" }’ ``` #### Response Sample ```json theme={null} { "object_state": "VALID", "status": "SUCCESS", "object_created": "2023-02-01T09:38:24.238Z", "object_updated": "2023-02-01T09:38:27.042Z", "object_id": "48ee2ce651894bf3bb37f1af0612bd6a", "object_owner": "expn-prod-test@shippo.com", "test": true, "rate": "4af61f01e2a44ecbb6c278a1d573f1ff", "tracking_number": "BTS_001807L4NVV", "tracking_status": "UNKNOWN", "eta": null, "tracking_url_provider": "https://tracking.bettertrucks.com/Tracking?ShipmentId=jhfBTS_001807L4NVV", "label_url": "https://dev-qa-deliver.shippodev.com/48ee2ce651894bf3bb37f1af0612bd6a.pdf?Expires=1706780306&Signature=OFKPm1PuMuFJKVEnVXAkfw-gJ2SsJmUN1VzeZ66VCUj5r~rmOp5ze~XvEhQTGKR8YjWTjv0dVg3Mo1h9sgQBQmVdPZ0tXIgr1g1NVcGrSYf6duqvv~IczKvdtA2aI2lkMvT-Q4Kb1KvdW37dnJTzCGB2jJBNnz-N44n2j4JEpuNc-Iq6jJlJXPAJHKJPLVAxoI77klfthSSzRN0reCfItSCybDs1a~F2PQ1rKl-wf~60en419OI4JR0C0E-aUjaz~EvBh8e2gBvAU-rmxsB13yJiAI3WtTayCIlATAJ5svdiLvZiKAn6oWkOtwQ6rnX3OcOPVJh1mCUCymvTxdGAgg__&Key-Pair-Id=APKAJKRDBHOMWKB2OAVQ", "commercial_invoice_url": null, "messages": [], "order": null, "metadata": "", "parcel": "ea911c30d3904d9881ebbe698c6d0cca", "billing": { "payments": [] }, "qr_code_url": null } ``` This is an example of the label that is created. Sample label created using a Shipment object ## Purchase label in one call This is a flow where we create a shipment object from the request payload and return label for it in one call ### Request Payload | Parameter | Description | | --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | | shipment\* | [Refer to the Shipment object](#shipment). | | carrier\_account\* | `object_id` of the carrier account to be used for purchasing this label. This carrier account object\_id is available when an account is created. | | servicelevel\_token\* | Name of the service level to use. For now, only `better_trucks_next_day` is supported. This are case sensitive. | | label\_file\_type\* | Allowed values: `PDF`, `PDF_A4`, `PDF_A6`, `PDF_4x6`, `PDF_4x8`, `PDF_SINGLE_8X11`, `PDF_2.3x7.5`, `PNG`, `PNG_2.3x7.5`, ZPLII | ###
Shipment | Parameter | Description | | --------------- | ---------------------------------------------------------------------------------------------------------------- | | address\_from\* | [Refer to the Address object](/carriers/integration-guides/better-trucks/create-shipment#address) | | address\_to\* | [Refer to the Address object](/carriers/integration-guides/better-trucks/create-shipment#address) | | parcels\* | List of Parcel objects. [Refer Parcel object](/carriers/integration-guides/better-trucks/create-shipment#parcel) | | extra | [Refer to the Extra object](/carriers/integration-guides/better-trucks/create-shipment#extra) | ### Examples #### Request sample for a shipment in one call ```shell cURL theme={null} curl --location --request POST 'https://api.goshippo.com/transactions' \ --header 'Authorization: ShippoToken ' \ --header 'Content-Type: application/json' \ --data-raw '{ { "shipment": { "address_from": { "name": "Mr. Hippo", "company": "Shippo & Son", "street1": "1901 W Madison Street", "street2": "Press Box 23", "city": "Chicago", "state": "IL", "zip": "60612", "country": "US", "phone": "+1 555 341 9393", "email": "support@shippo.com" }, "address_to": { "name": "Mrs. Hippo", "company": "Shippo & Co", "street1": "100 STOCKYARD", "city": "Nashville", "state": "TN", "zip": "37201", "country": "US", "metadata": "Customer ID 123456" }, "parcels": [ { "weight": "8", "length": "9", "width": "9", "height": "8", "distance_unit": "in", "mass_unit": "lb" } ], "extra": { "signature_confirmation": true, "alcohol": { "contains_alcohol": false } } }, "carrier_account": "{{BETTER_TRUCKS_ACC}}", "async": false, "servicelevel_token": "better_trucks_next_day", "label_file_type": "PDF_4x6" }' ``` #### Response sample for a shipment in one call ```json theme={null} { "object_state": "VALID", "status": "SUCCESS", "object_created": "2023-01-26T09:52:08.935Z", "object_updated": "2023-01-26T09:52:11.715Z", "object_id": "09ae917f995e494fa3644d2681c4dbc7", "object_owner": "nataliya_eng@shippo.com", "test": false, "rate": { "object_id": "7df6b9381e424b21a682c49aea8c9614", "amount": "6.02", "currency": "USD", "amount_local": "6.02", "currency_local": "USD", "provider": "Better Trucks", "servicelevel_name": "Next Day", "servicelevel_token": "better_trucks_next_day", "carrier_account": "a00414e75df144b596673979108bbab5" }, "tracking_number": "BTS_0018FQYZ3H5", "tracking_status": "UNKNOWN", "eta": null, "tracking_url_provider": "https://tracking.bettertrucks.com/Tracking?ShipmentId=jhfBTS_0018FQYZ3H5", "label_url": "https://dev-qa-deliver.shippodev.com/09ae917f995e494fa3644d2681c4dbc7.pdf?Expires=1706262731&Signature=CtTyLLrL4PB4DD-o7-BTZ9jUB8p2XSCDHmWnZaMoVLFqfSwAsXCfy4MLNRqMceaRfz2uftvWeL5MgsL1TTElKUpuaawgBqaK6nFWj3cxVoWb94skkfiqzqPjqyIL9rsuKg6HxmKEjmQIDfGYjK3r3M2dTBfiauDTB4lueFmKSS41yLdV0JMeJT8y-SY13iBcKTelUMEHNwMiDGQV2D8Cag6nJoTAb-b7Ktw3ogO1xMprqCduv8MuwtvYiYPZfkHzmHdaGZ7YXGNGpH5IkeRvgUFYufzLXRfcYX0e-9d7joRTXmaIOcIRiNrZLdR9TVugg8b87LkciWMjJssCJ7ZW7g__&Key-Pair-Id=APKAJKRDBHOMWKB2OAVQ", "commercial_invoice_url": null, "messages": [], "order": null, "metadata": "", "parcel": "e03be392226849a3a4ee380a9aced3e2", "billing": { "payments": [] }, "qr_code_url": null } ``` This is an example of the label that is created. Example label created form a single call purchase ## Response A successful response includes all the details about your purchased shipment including tracking details and a link to your shipping label. # Track Source: https://docs.goshippo.com/carriers/integration-guides/better-trucks/track Track your Better Trucks shipments using the Shippo Tracking API with the tracking number from your label purchase. If you purchased your shipping label through Shippo, you can also get all the tracking details of your Shipment using the Tracking API. ## HTTP Method POST ## URL ``` https://api.goshippo.com/tracks/better_trucks/track_number_id/ ``` ### Request Payload | Parameter in URL | Description | | ------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | track\_number\_id\* | `tracking_number` value of the transaction response, we get in the transaction call response. [create shipments call response](/carriers/integration-guides/better-trucks/create-shipment#request-sample-for-a-shipment). | ## Response Code 200 OK ### Example #### Request Sample ```shell cURL theme={null} curl --location --request GET 'https://api.goshippo.com/tracks/better_trucks/BTS_0018P2LD557/’\ --header 'Authorization: ShippoToken ’ \ --header 'Content-Type: application/json' \ --data-raw '{ }’ ``` #### Response Sample ```json theme={null} { "tracking_number": "BTS_0018P2LD557", "carrier": "better_trucks", "servicelevel": { "name": null, "token": null }, "transaction": "6ceb8e3fc07446d08c5c5884ccb4b1b4", "address_from": { "city": "Chicago", "state": "IL", "zip": "60612", "country": "US" }, "address_to": { "city": "Nashville", "state": "TN", "zip": "37201", "country": "US" }, "eta": null, "original_eta": null, "metadata": null, "test": false, "tracking_status": null, "tracking_history": [ { "status_date": null, "status_details": "Pre-Transit: Shipment information has been transmitted to the shipping carrier but it has not yet been scanned and picked up.", "location": null, "substatus": null, "object_created": "2023-01-26T18:37:13.668Z", "object_updated": "2023-01-26T18:37:13.668Z", "object_id": "24d41f49a9ac419e8d66f7fae4fce705", "status": "UNKNOWN" } ], "messages": [] } ``` # Get your Carrier Account Details Source: https://docs.goshippo.com/carriers/integration-guides/colissimo/create-an-account Use Shippo's built-in Colissimo account or connect your own Colissimo carrier account to start creating shipments. There are two ways to use a carrier account with Shippo. The first is to [use Shippo's account](#use-the-shippo-carrier-account) with your preferred carrier to create shipping labels. Using Shippo's account makes it easier to get started and means you benefit from the shipping discounts that Shippo has negotiated with the carrier. The second way is to [use your own account](#use-your-own-carrier-account) with your preferred carrier and share your account details with Shippo. This is useful if you have negotiated your own shipping discounts with your preferred carrier. You can still use all the supported Shippo features. ## Use the Shippo carrier account To use the Shippo, Colissimo account, you must retrieve the carrier account `object_id`. This step should only be completed once. In future transactions, you can use the carrier `object_id` to reference your carrier. ### HTTP Method GET ### URL ``` https://api.goshippo.com/carrier_accounts/ ``` ### Example #### Request Sample ```shell cURL theme={null} curl --location --request GET 'https://api.goshippo.com/carrier_accounts?carrier=colissimo' \ --header 'Authorization: ShippoToken ' \ --header 'Content-Type: application/json' ``` #### Response Sample ```json theme={null} { "carrier": "colissimo", "object_id": "4a4dfb5425ea41b6be2e851306284bf5", "object_owner": "test-user@shippo.com", "account_id": "shippo_colissimo_account", "parameters": {}, "test": false, "active": true, "is_shippo_account": true, "metadata": "", "carrier_name": "Colissimo", "carrier_images": { "75": "https://shippo-static.s3.amazonaws.com/providers/75/colissimo.png", "200": "https://shippo-static.s3.amazonaws.com/providers/200/colissimo.png" } } ``` Note: If you did not receive a response like this, the carrier may not have been enabled for your account. Contact [Shippo support](https://support.goshippo.com/hc/en-us/requests/new?_ga=2.259093706.1751315872.1670840488-750891451.1658151685) for more infomation. Once you have retrieved the `object_id` for your carrier, proceed to [Step 2: Create shipment](/carriers/integration-guides/colissimo/create-shipment). *** ## Use your own carrier account If you want to use your own Colissimo account, follow this guide to add your Colissimo account to Shippo. After adding your account, Shippo can use your account details for generating shipping rates and creating labels. This step requires you to have your Colissimo account id and password. This step should only be completed once. When you have created your carrier account, you can use the carrier `object_id` to reference your carrier. ### HTTP Method POST ### URL ``` https://api.goshippo.com/carrier_accounts/ ``` ### Request Payload | Parameter | Description | | ------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | | carrier\* | `colissimo` | | account\_id\* | A unique identifier for the account which cannot be changed later. This should be a username provided by Colissimo | | parameters\* | parameters is an array of additional parameters for the account, such as password or token. Check [Colissimo parameters](#account_params) for more details | | active | Set to `true` to enable account. Set to `false` to disable account. | | test | Set to `true` if you want to set the account in test mode. Using test mode you can generate test labels without incurring a charge | Note: Parameters with an \* are mandatory ### Colissimo Account Parameters | Parameter | Description | | ---------- | ---------------------------------------------------------------------------------------------------------- | | password\* | Password to access the API. Password and account\_id are tied together and should be provided by Colissimo | ### Response Code 201 ### Example #### Request Sample ```shell cURL theme={null} curl --location --request POST 'https://api.goshippo.com/carrier_accounts/' \ --header 'Authorization: ShippoToken ' \ --header 'Content-Type: application/json' \ --data-raw '{ "carrier": "colissimo", "account_id": "collisimo_account", "parameters": { "password": "EXAMPLE_PASSWORD", }, "active": true, "test": true }' ``` #### Response Sample ```json theme={null} { "carrier": "colissimo", "object_id": "4a4dfb5425ea41b6be2e851306284bf5", "object_owner": "test-user@shippo.com", "account_id": "******", "parameters": { "password": "******" }, "test": true, "active": true, "is_shippo_account": false, "metadata": "", "carrier_name": "Colissimo", "carrier_images": { "200": "https://dev-qa-static-shippodev-com.s3.amazonaws.com/providers/200/colissimo.png", "75": "https://dev-qa-static-shippodev-com.s3.amazonaws.com/providers/75/colissimo.png" } } ``` Once you have retrieved the `object_id` for your carrier, proceed to [Step 2: Create shipment](/carriers/integration-guides/colissimo/create-shipment). # Create shipment Source: https://docs.goshippo.com/carriers/integration-guides/colissimo/create-shipment Create a Colissimo shipment with addresses, parcels, and customs declarations for domestic or international shipping. The second step is to create a shipment. The shipment includes all the details about the item you are shipping including * the "from" and "to" addresses * the parcel details * extra parameters * customs declaration, that are required for [international shipments](#request-sample-for-an-international-shipment) Creating a shipment automatically generates a list of shipping rates that you can use to select the best shipping option for you. ## HTTP Method POST ## URL ``` https://api.goshippo.com/shipments/ ``` ## Request Payload | Parameter | Description | | ---------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | address\_from\* | [Refer to the Address object](#address) | | address\_to\* | [Refer to the Address object](#address) | | parcels\* | [Refer to the Parcel object](#parcel) | | extra | [Refer to the Extra object](#extra) | | customs\_declaration\* | [Refer to the Customs declaration object](#customs_declaration). Required for international shipments | | carrier\_accounts | An array of object\_ids of the carrier account objects to be used for getting shipping rates for this shipment. This carrier account object\_id is available when an account is created. 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 to true | | async | If 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 | Note: Parameters with an \* are mandatory ## Objects ### Address | Parameter | Description | | ---------- | ------------------------------------------------------------------------------ | | name\* | First and Last name of the addressee | | company\* | Company Name | | street1\* | First street line, 35 character limit. Usually street number and street name | | street\_no | Street number of the addressed building. This field can be included in street1 | | street2 | Second street line, 35 character limit | | city\* | Name of a city | | zip\* | Postal code of an address | | state\* | State/Province values are required for shipments from/to the US. | | country\* | ISO 2 country code | | phone | Phone number of the addressee | | email | E-mail address of the contact person, RFC3696/5321-compliant | ### Parcel | Parameter | Description | | ---------------- | -------------------------------------------------------------------------------------------------------- | | length\* | Length of the Parcel. Up to six digits in front and four digits after the decimal separator are accepted | | width\* | Width of the Parcel. Up to six digits in front and four digits after the decimal separator are accepted | | height\* | Height of the Parcel. Up to six digits in front and four digits after the decimal separator are accepted | | distance\_unit\* | "cm", "in", "ft", "mm", "m", "yd" | | weight\* | Weight of the parcel. Up to six digits in front and four digits after the decimal separator are accepted | | mass\_unit\* | "g", "oz", "lb", "kg" | ### Extra | Parameter | Description | | ----------------------- | --------------------------------------------------------------------------------------------------------------------------- | | location\_external\_id | Should be set when a Pickup point ID is required. For example for `colissimo_pick_up_point` service level | | signature\_confirmation | Sets if signature confirmation is required for this shipment. Will be used to determine the correct service level. Optional | | reference\_1 | Optional text to be printed on the shipping label. Up to 50 characters | ### Customs Declaration | Parameter | Description | | --------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | certify\* | Boolean. Expresses that the certify\_signer has provided all information of this customs declaration truthfully | | certify\_signer\* | Name of the person who created the customs declaration and is responsible for the validity of all information provided | | items\* | [Refer Items object](#items) | | invoiced\_charges | [Refer Invoiced charges object](#invoiced_charges). An object holding optional invoiced charges data to be printed on the Commercial Invoice. Mandatory for international shipping | | incoterm | The incoterm reference of the shipment. For International Overseas shipment we can not use DDP. For International Shipment DDP, DDU, DAP, Empty can be used | | contents\_type\* | Type of goods of the shipment | | contents\_explanation | This field is mandatory for contents\_type = OTHER | | hs\_code | The HS (Harmonised System) or product code is used by customs officers worldwide to categorise products | | invoice | Invoice reference of the shipment | ### Items | Parameter | Description | | ----------------- | ---------------------------------------------------------------------- | | description | Text description of your item. | | quantity\* | Quantity of this item in the shipment you send. Must be greater than 0 | | net\_weight\* | Total weight of this item, i.e. quantity \* weight per item | | mass\_unit\* | The unit used for net\_weight | | value\_amount\* | Total value of this item, i.e. quantity \* value per item | | value\_currency\* | Currency in which value is specified | | origin\_country\* | ISO 2 country code | ### Invoiced charges | Parameter | Description | | ----------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | currency\* | Currency for the invoiced charges amounts incurred on the end consumer. Needs to be in euros. Check shipment/customs\_declarations/invoiced\_charges/currency, if the currency is other than euros then convert to EUR | | total\_shipping\* | Total shipping paid by the buyer | ## Response Code 201 ## Examples ### Request Sample for a Domestic shipment ```shell cURL theme={null} curl --location --request POST 'https://api.goshippo.com/shipments' \ --header 'Authorization: ShippoToken ' \ --header 'Content-Type: application/json' \ --data-raw '{ "address_from": { "name": "Èmile Zola", "company": "Palais Jacques Coeur", "street1": "3 Place du Berry", "street2": "Rue Jacques Coeur 756", "city": "Cher", "state": "Bourges", "zip": "18000", "country": "FR", "phone": "+1888-999-1500", "email": "Picardie@shippo.com" }, "address_to": { "name": "Chapelaine Carnot", "company": "Louis Ulbach", "street1": "8 Rue de La Vicomté", "street2": "Rue de la Pierre", "city": "Aube", "state": "Troyes", "zip": "10000", "country": "FR", "phone": "+18889575900", "email": "Chapelaine@shippo.com" }, "parcels": [{ "weight": "1", "length": "5", "width": "4", "height": "1", "distance_unit": "cm", "mass_unit": "kg" }], "extra": { "reference_1": "Ship.Label_Chrono_Ok" }, "carrier_accounts": ["4a4dfb5425ea41b6be2e851306284bf5"], "async": false }' ``` ### Response Sample for a Domestic shipment ```json theme={null} { "carrier_accounts": [ "4a4dfb5425ea41b6be2e851306284bf5" ], "object_created": "2022-11-30T12:54:06.091Z", "object_updated": "2022-11-30T12:54:06.547Z", "object_id": "f500a2e404ac42d5bdf00a92283a8e00", "object_owner": "test@shippo.com", "status": "SUCCESS", "address_from": { "object_id": "8024d39aeca24c21a095a2c057ded999", "is_complete": true, "name": "Èmile Zola", "company": "Palais Jacques Coeur", "street_no": "", "street1": "3 Place du Berry", "validation_results": {}, "street2": "Rue Jacques Coeur 756", "street3": "", "city": "Cher", "state": "Bourges", "zip": "18000", "country": "FR", "phone": "0018889991500", "email": "Picardie@shippo.com", "is_residential": null, "test": true }, "address_to": { "object_id": "691f13e12e584d5eaa5b56c870237f3a", "is_complete": true, "name": "Chapelaine Carnot", "company": "Louis Ulbach", "street_no": "", "street1": "8 Rue de La Vicomté", "validation_results": {}, "street2": "Rue de la Pierre", "street3": "", "city": "Aube", "state": "Troyes", "zip": "10000", "country": "FR", "phone": "0018889575900", "email": "Chapelaine@shippo.com", "is_residential": null, "test": true }, "parcels": [ { "object_state": "VALID", "object_created": "2022-11-30T12:54:06.062Z", "object_updated": "2022-11-30T12:54:06.127Z", "object_id": "574491335b634d89b3edaca0b55cf420", "object_owner": "test@shippo.com", "template": null, "extra": {}, "length": "5.0000", "width": "4.0000", "height": "1.0000", "distance_unit": "cm", "weight": "1.0000", "mass_unit": "kg", "value_amount": null, "value_currency": null, "metadata": "", "line_items": [], "test": true } ], "shipment_date": "2022-11-30T12:54:06.177Z", "address_return": { "object_id": "8024d39aeca24c21a095a2c057ded999", "is_complete": true, "name": "Èmile Zola", "company": "Palais Jacques Coeur", "street_no": "", "street1": "3 Place du Berry", "validation_results": {}, "street2": "Rue Jacques Coeur 756", "street3": "", "city": "Cher", "state": "Bourges", "zip": "18000", "country": "FR", "phone": "0018889991500", "email": "Picardie@shippo.com", "is_residential": null, "test": true }, "alternate_address_to": null, "customs_declaration": null, "extra": { "reference_1": "Ship.Label_Chrono_Ok" }, "rates": [ { "object_created": "2022-11-30T12:54:06.518Z", "object_id": "0bd2f0a39733436da688ce2158dd3ad6", "object_owner": "test@shippo.com", "shipment": "f500a2e404ac42d5bdf00a92283a8e00", "attributes": [ "CHEAPEST" ], "amount": "6.74", "currency": "EUR", "amount_local": "6.74", "currency_local": "EUR", "provider": "Colissimo", "provider_image_75": "https://dev-qa-static-shippodev-com.s3.amazonaws.com/providers/75/colissimo.png", "provider_image_200": "https://dev-qa-static-shippodev-com.s3.amazonaws.com/providers/200/colissimo.png", "servicelevel": { "name": "Point Retrait", "token": "colissimo_pick_up_point", "terms": "", "extended_token": "colissimo_pick_up_point", "parent_servicelevel": null }, "estimated_days": null, "arrives_by": null, "duration_terms": "", "messages": [], "carrier_account": "4a4dfb5425ea41b6be2e851306284bf5", "test": true, "zone": "1" }, { "object_created": "2022-11-30T12:54:06.518Z", "object_id": "8f9ad8dd7bf14991ac2a229254256246", "object_owner": "test@shippo.com", "shipment": "f500a2e404ac42d5bdf00a92283a8e00", "attributes": [], "amount": "8.14", "currency": "EUR", "amount_local": "8.14", "currency_local": "EUR", "provider": "Colissimo", "provider_image_75": "https://dev-qa-static-shippodev-com.s3.amazonaws.com/providers/75/colissimo.png", "provider_image_200": "https://dev-qa-static-shippodev-com.s3.amazonaws.com/providers/200/colissimo.png", "servicelevel": { "name": "Domicile", "token": "colissimo_home", "terms": "", "extended_token": "colissimo_home", "parent_servicelevel": null }, "estimated_days": null, "arrives_by": null, "duration_terms": "", "messages": [], "carrier_account": "4a4dfb5425ea41b6be2e851306284bf5", "test": true, "zone": "1" } ], "messages": [], "metadata": "", "test": true, "order": null } ``` ### Request sample for an international shipment ```shell cURL theme={null} curl --location --request POST 'https://api.goshippo.com/shipments' \ --header 'Authorization: ShippoToken ' \ --header 'Content-Type: application/json' \ --data-raw '{ "address_from": { "name": "Èmile Zola", "company": "Palais Jacques Coeur", "street1": "3 Place du Berry", "street2": "Rue Jacques Coeur 756", "city": "Cher", "state": "Bourges", "zip": "18000", "country": "FR", "phone": "+1888-999-1500", "email": "Picardie@shippo.com" }, "address_to": { "name": "Mr. Hippo", "street1": "24 Endell", "city": "London", "state": "", "zip": "W1D 4HS", "country": "GB", "phone": "01159 663055", "email": "mrhippo@shippo.com" }, "parcels": [ { "weight": "1", "length": "5", "width": "4", "height": "1", "distance_unit": "cm", "mass_unit": "kg" } ], "customs_declaration": { "invoiced_charges": { "total_shipping": "10.00", "currency": "EUR" }, "contents_type": "MERCHANDISE", "contents_explanation": "T-Shirt purchase", "invoice": "#123123", "notes": "Notes here", "certify": true, "certify_signer": "Test User", "incoterm": "DDU", "items": [ { "description": "shirt", "quantity": 1, "net_weight": "7", "mass_unit": "oz", "hs_code": "AB123C", "sku_code": "A333BFEQA", "value_amount": "10", "value_currency": "EUR", "origin_country": "FR" } ] }, "carrier_accounts": [ "4a4dfb5425ea41b6be2e851306284bf5" ], "async": false }' ``` ### Response sample for international shipment ```json theme={null} { "carrier_accounts": [ "4a4dfb5425ea41b6be2e851306284bf5" ], "object_created": "2022-12-01T11:09:50.513Z", "object_updated": "2022-12-01T11:09:51.028Z", "object_id": "c9b3601e6ede46ca8732ee1dd16b9b3e", "object_owner": "test@shippo.com", "status": "SUCCESS", "address_from": { "object_id": "30a89b461cad4a2f91d6187d94aba5a8", "is_complete": true, "name": "Èmile Zola", "company": "Palais Jacques Coeur", "street_no": "", "street1": "3 Place du Berry", "validation_results": {}, "street2": "Rue Jacques Coeur 756", "street3": "", "city": "Cher", "state": "Bourges", "zip": "18000", "country": "FR", "phone": "0018889991500", "email": "Picardie@shippo.com", "is_residential": null, "test": true }, "address_to": { "object_id": "f2a9d19e9cde4bbc89dce5a769fcab45", "is_complete": true, "name": "Mr. Hippo", "company": "", "street_no": "", "street1": "24 Endell", "validation_results": {}, "street2": "", "street3": "", "city": "London", "state": "", "zip": "W1D 4HS", "country": "GB", "phone": "01159663055", "email": "mrhippo@shippo.com", "is_residential": null, "test": true }, "parcels": [ { "object_state": "VALID", "object_created": "2022-12-01T11:09:50.291Z", "object_updated": "2022-12-01T11:09:50.575Z", "object_id": "037869846bab4e2987ca054d4f31b97e", "object_owner": "test@shippo.com", "template": null, "extra": {}, "length": "5.0000", "width": "4.0000", "height": "1.0000", "distance_unit": "cm", "weight": "1.0000", "mass_unit": "kg", "value_amount": null, "value_currency": null, "metadata": "", "line_items": [], "test": true } ], "shipment_date": "2022-12-01T11:09:50.656Z", "address_return": { "object_id": "30a89b461cad4a2f91d6187d94aba5a8", "is_complete": true, "name": "Èmile Zola", "company": "Palais Jacques Coeur", "street_no": "", "street1": "3 Place du Berry", "validation_results": {}, "street2": "Rue Jacques Coeur 756", "street3": "", "city": "Cher", "state": "Bourges", "zip": "18000", "country": "FR", "phone": "0018889991500", "email": "Picardie@shippo.com", "is_residential": null, "test": true }, "alternate_address_to": null, "customs_declaration": { "object_created": "2022-12-01T11:09:50.410Z", "object_updated": "2022-12-01T11:09:50.410Z", "object_id": "aa43df470809469688a13ab37e624074", "object_owner": "test@shippo.com", "object_state": "VALID", "address_importer": null, "certify_signer": "Test User", "certify": true, "items": [ "7e39fad7c4e64285ba4224a6962a0bb4" ], "non_delivery_option": "RETURN", "contents_type": "MERCHANDISE", "contents_explanation": "T-Shirt purchase", "exporter_reference": "", "importer_reference": "", "invoice": "#123123", "commercial_invoice": false, "license": "", "certificate": "", "notes": "Notes here", "eel_pfc": "", "aes_itn": "", "disclaimer": "", "incoterm": "DDU", "metadata": "", "test": true, "duties_payor": null, "b13a_filing_option": "", "b13a_number": "", "invoiced_charges": { "total_shipping": "10.00", "total_taxes": null, "total_duties": null, "other_fees": null, "currency": "EUR" }, "exporter_identification": null, "is_vat_collected": null }, "extra": {}, "rates": [ { "object_created": "2022-12-01T11:09:50.997Z", "object_id": "18db7a1211ee4b2d97e1bad0cbb5ca2f", "object_owner": "test@shippo.com", "shipment": "c9b3601e6ede46ca8732ee1dd16b9b3e", "attributes": [ "CHEAPEST" ], "amount": "13.10", "currency": "EUR", "amount_local": "11.26", "currency_local": "GBP", "provider": "Colissimo", "provider_image_75": "https://dev-qa-static-shippodev-com.s3.amazonaws.com/providers/75/colissimo.png", "provider_image_200": "https://dev-qa-static-shippodev-com.s3.amazonaws.com/providers/200/colissimo.png", "servicelevel": { "name": "Domicile", "token": "colissimo_home", "terms": "", "extended_token": "colissimo_home", "parent_servicelevel": null }, "estimated_days": null, "arrives_by": null, "duration_terms": "", "messages": [], "carrier_account": "4a4dfb5425ea41b6be2e851306284bf5", "test": true, "zone": "international_2_gb" } ], "messages": [], "metadata": "", "test": true, "order": null } ``` # Purchase label Source: https://docs.goshippo.com/carriers/integration-guides/colissimo/purchase-label Purchase a Colissimo shipping label from an existing shipment or create one in a single API call through Shippo. The final step is to purchase the shipment. This will generate your shipping label. There are two ways to purchase a shipment. 1. You can [purchase the shipment object](#purchase-from-created-shipment) you created in the last step 2. You can purchase a label without a [shipment object in a single call](#purchase-label-in-one-call) ## HTTP Method POST ## URL ``` https://api.goshippo.com/transactions/ ``` ## Purchase from created Shipment This is a flow where we first create a shipment object (and get rates for a given shipment). Then, we purchase a label for the provided `rate`. ### Request Payload | Parameter | Description | | ------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | rate\* | `object_id` of the rate object we get in the [create shipments call response](/carriers/integration-guides/colissimo/create-shipment#request-sample-for-a-domestic-shipment). | | label\_file\_type\* | Allowed values: `PDF`, `PDF_A4`, `PDF_A6`, `PDF_4x6`, `PDF_4x8`, `PNG`, `ZPLII` | | async | Set to true if you want to poll for the result and receive faster response | Note: Parameters with an \* are mandatory ### Example #### Request Sample ```shell cURL theme={null} curl --location --request POST 'https://api.goshippo.com/transactions' \ --header 'Authorization: ShippoToken ’ \ --header 'Content-Type: application/json' \ --data-raw '{ "rate": "975445f117db48e5b3e85cebebe87ee0", "async": false, "label_file_type": "PDF_A4" }' ``` #### Response Sample ```json theme={null} { "object_state": "VALID", "status": "SUCCESS", "object_created": "2022-11-10T23:47:18.278Z", "object_updated": "2022-11-10T23:47:20.948Z", "object_id": "cbc1a12243db44b9ae56ef3ca502b8c3", "object_owner": "test-use@shippo.com", "test": false, "rate": "975445f117db48e5b3e85cebebe87ee0", "tracking_number": "00024000110003001", "tracking_status": "UNKNOWN", "eta": null, "tracking_url_provider": "you_will_find_your_tracking_url_here", "label_url": "you_will_find_your_label_url_here", "commercial_invoice_url": null, "messages": [], "order": null, "metadata": "", "parcel": "e54ef8c0a27c451690bca6f3b6491264", "billing": { "payments": [] }, "qr_code_url": null } ``` ## Purchase label in one call This is a flow where we create a shipment object from the request payload and return label for it in one call ### Request Payload | Parameter | Description | | --------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | shipment\* | [Refer to the Shipment object](#shipment). | | carrier\_account\* | `object_id` of the carrier account to be used for purchasing this label. This carrier account object\_id is available when an account is created. | | servicelevel\_token\* | Name of the service level to use. Must be one of the following: `colissimo_home`, `colissimo_pick_up_point`, `colissimo_return_mainland_france`. These are case-sensitive. | | label\_file\_type\* | Allowed values: `PDF`, `PDF_A4`, `PDF_A6`, `PDF_4x6`, `PDF_4x8`, `PNG`, `ZPLII` | ### Shipment | Parameter | Description | | ---------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- | | address\_from\* | [Refer to the Address object](/carriers/integration-guides/colissimo/create-shipment#address) | | address\_to\* | [Refer to the Address object](/carriers/integration-guides/colissimo/create-shipment#address) | | parcels\* | List of Parcel objects. [Refer Parcel object](/carriers/integration-guides/colissimo/create-shipment#parcel) | | extra | [Refer to the Extra object](/carriers/integration-guides/colissimo/create-shipment#extra) | | customs\_declaration\* | [Refer to the Customs declaration object](/carriers/integration-guides/colissimo/create-shipment#customs_declaration). Required for international shipments | ### Examples #### Request sample for a domestic shipment ```shell cURL theme={null} curl --location --request POST 'https://api.goshippo.com/transactions' \ --header 'Authorization: ShippoToken ' \ --header 'Content-Type: application/json' \ --data-raw '{ "shipment": { "address_from": { "name": "Èmile Zola", "company": "Palais Jacques Coeur", "street1": "3 Place du Berry", "street2": "Rue Jacques Coeur 756", "city": "Cher", "state": "Bourges", "zip": "18000", "country": "FR", "phone": "+1888-999-1500", "email": "Picardie@shippo.com" }, "address_to": { "name": "Chapelaine Carnot", "company": "Louis Ulbach", "street1": "8 Rue de La Vicomté", "street2": "Rue de la Pierre", "city": "Aube", "state": "Troyes", "zip": "10000", "country": "FR", "phone": "+18889575900", "email": "Chapelaine@shippo.com" }, "parcels": [{ "weight": "1", "length": "5", "width": "4", "height": "1", "distance_unit": "cm", "mass_unit": "kg" }], "extra": { "reference_1": "Ship.Label_Chrono_Ok" } }, "label_file_type": "PNG", "servicelevel_token": "colissimo_home", "carrier_account": "4a4dfb5425ea41b6be2e851306284bf5" }' ``` #### Response sample for a domestic shipment ```json theme={null} { "object_state": "VALID", "status": "SUCCESS", "object_created": "2022-11-11T00:19:44.077Z", "object_updated": "2022-11-11T00:19:46.446Z", "object_id": "c42aabb1755d462395e83150ad74f84b", "object_owner": "test-user@shippo.com", "test": false, "rate": { "object_id": "e9ef8e278a4949d697cc48fead716033", "amount": "8.14", "currency": "EUR", "amount_local": "8.14", "currency_local": "EUR", "provider": "Colissimo", "servicelevel_name": "Domicile", "servicelevel_token": "colissimo_home", "carrier_account": "4a4dfb5425ea41b6be2e851306284bf5" }, "tracking_number": "AT00024000110003000", "tracking_status": "UNKNOWN", "eta": null, "tracking_url_provider": "you_will_find_your_tracking_url_here", "label_url": "you_will_find_your_label_url_here", "commercial_invoice_url": null, "messages": [], "order": null, "metadata": "", "parcel": "56sdfhjlbde8d41dd805de409e7b8a729", "billing": { "payments": [] }, "qr_code_url": null } ``` #### Request sample for an international shipment ```shell cURL theme={null} curl --location --request POST 'https://api.goshippo.com/transactions' \ --header 'Authorization: ShippoToken ' \ --header 'Content-Type: application/json' \ --data-raw '{ "shipment": { "address_from": { "name": "Èmile Zola", "company": "Palais Jacques Coeur", "street1": "3 Place du Berry", "street2": "Rue Jacques Coeur 756", "city": "Cher", "state": "Bourges", "zip": "18000", "country": "FR", "phone": "+1888-999-1500", "email": "Picardie@shippo.com" }, "address_to": { "name": "Mr. Hippo", "street1": "24 Endell", "city": "London", "state": "", "zip": "W1D 4HS", "country": "GB", "phone": "01159 663055", "email": "mrhippo@shippo.com" }, "parcels": [ { "weight": "1", "length": "5", "width": "4", "height": "1", "distance_unit": "cm", "mass_unit": "kg" } ], "customs_declaration": { "invoiced_charges": { "total_shipping": "10.00", "currency": "EUR" }, "contents_type": "MERCHANDISE", "contents_explanation": "T-Shirt purchase", "invoice": "#123123", "notes": "Notes here", "certify": true, "certify_signer": "Test User", "incoterm": "DDU", "items": [ { "description": "shirt", "quantity": 1, "net_weight": "7", "mass_unit": "oz", "hs_code": "61091000", "sku_code": "A333BFEQA", "value_amount": "10", "value_currency": "EUR", "origin_country": "FR" } ] }, "extra": { "reference_1": "Ship.Label_Chrono_Ok" } }, "label_file_type": "PNG", "servicelevel_token": "colissimo_home", "carrier_account": "4a4dfb5425ea41b6be2e851306284bf5" }' ``` #### Response sample for an international shipment ```json theme={null} { "object_state": "VALID", "status": "SUCCESS", "object_created": "2022-11-11T00:19:44.077Z", "object_updated": "2022-11-11T00:19:46.446Z", "object_id": "c42aabb1755d462395e83150ad74f84b", "object_owner": "test-user@shippo.com", "test": false, "rate": { "object_id": "e9ef8e278a4949d697cc48fead716033", "amount": "8.14", "currency": "EUR", "amount_local": "8.14", "currency_local": "EUR", "provider": "Colissimo", "servicelevel_name": "Domicile", "servicelevel_token": "colissimo_home", "carrier_account": "4a4dfb5425ea41b6be2e851306284bf5" }, "tracking_number": "AT00024000110003000", "tracking_status": "UNKNOWN", "eta": null, "tracking_url_provider": "you_will_find_your_tracking_url_here", "label_url": "you_will_find_your_label_url_here", "commercial_invoice_url": null, "messages": [], "order": null, "metadata": "", "parcel": "56sdfhjlbde8d41dd805de409e7b8a729", "billing": { "payments": [] }, "qr_code_url": null } ``` ## Response A successful response includes all the details about your purchased shipment including tracking details and a link to your shipping label. # Create shipment Source: https://docs.goshippo.com/carriers/integration-guides/royal-mail-tracked/create-shipment Create a Royal Mail Tracked shipment with addresses, parcel details, and customs declarations for UK and international shipping. The second step is to create a shipment. The shipment includes all the details about the item you are shipping including * the "from" and "to" addresses * the parcel details * extra parameters * customs declaration, that are required for international shipments (see [Request Example](#request-example) below) Creating a shipment automatically generates a list of shipping rates that you can use to select the best shipping option for you. ## HTTP Method POST ## URL ``` https://api.goshippo.com/shipments/ ``` ## Request Payload | Parameter | Description | | ----------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | address\_from\* | [Refer to the Address object](#address) | | address\_to\* | [Refer to the Address object](#address) | | parcels\* | [Refer to the Parcel object](#parcel) | | extra | [Shipments Extras](/api-reference/shipments/list-all-shipments) | | carrier\_accounts | An array of object\_ids of the carrier account objects to be used for getting shipping rates for this shipment. This carrier account object\_id is available when an account is created. See [carrier account response sample](/carriers/carrier-accounts#connecting-your-own-carrier-account). 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 to true | | async | If 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 | Note: Parameters with an \* are mandatory ## Objects ### Address | Parameter | Description | | ---------- | ------------------------------------------------------------------------------ | | name\* | First and Last name of the addressee | | company\* | Company Name | | street1\* | First street line, 35 character limit. Usually street number and street name | | street\_no | Street number of the addressed building. This field can be included in street1 | | street2 | Second street line, 35 character limit | | city\* | Name of a city | | zip\* | Postal code of an address | | state\* | State/Province values are required for shipments from/to the US. | | country\* | ISO 2 country code | | phone | Phone number of the addressee | | email | E-mail address of the contact person, RFC3696/5321-compliant | ### Parcel | Parameter | Description | | ---------------- | -------------------------------------------------------------------------------------------------------- | | length\* | Length of the Parcel. Up to six digits in front and four digits after the decimal separator are accepted | | width\* | Width of the Parcel. Up to six digits in front and four digits after the decimal separator are accepted | | height\* | Height of the Parcel. Up to six digits in front and four digits after the decimal separator are accepted | | distance\_unit\* | "cm", "in", "ft", "mm", "m", "yd" | | weight\* | Weight of the parcel. Up to six digits in front and four digits after the decimal separator are accepted | | mass\_unit\* | "g", "oz", "lb", "kg" | ## Response Code 201 ## Examples ### Request Example **Note** (Shipments to Northern Ireland require Customs Declaration & Items object) ```shell cURL theme={null} curl --location --request POST 'https://api.goshippo.com/shipments' \ --header 'Authorization: ShippoToken ' \ --header 'Content-Type: application/json' \ --data-raw '{ "async": false, "object_purpose": "PURCHASE", "carrier_accounts": ["aa79df9091b44e03a5de1538585fdd88"], "address_from": { "object_purpose": "PURCHASE", "name": "London Sender", "street1": "10 Downing St", "city": "London", "state": "", "zip": "SW1A 2AA", "country": "GB", "phone": "+44 20 7925 0918", "email": "sender@example.com", "company": "London Logistics" }, "address_to": { "object_purpose": "PURCHASE", "name": "Northern Ireland Recipient", "street1": "123 Causeway Road", "city": "Bushmills", "state": "County Antrim", "zip": "BT57 8SU", "country": "GB", "phone": "+44 28 2073 0918", "email": "recipient.ni@example.com" }, "customs_declaration": { "contents_type": "MERCHANDISE", "non_delivery_option": "RETURN", "certify": true, "certify_signer": "Saurabh Sharan", "incoterm": "DDU", "items": [ { "description": "T-shirt", "quantity": 10, "net_weight": "2", "mass_unit": "lb", "value_amount": "200", "value_currency": "USD", "tariff_number": "1", "sku_code": "TS-WHT-MD", "origin_country": "GB" } ] }, "parcels": { "length": 5, "width": 5, "height": 5, "distance_unit": "in", "weight": 2, "mass_unit": "lb" } }' ``` ### Response Sample ```json theme={null} { "object_id": "ecfa8357e93f40b4a5b247a4794208a6", "object_created": "2025-08-05T05:11:50.747Z", "object_updated": "2025-08-05T05:11:51.633Z", "object_owner": "expn-prod-test@goshippo.com", "test": false, "metadata": "", "messages": [], "extra": {}, "order": null, "carrier_accounts": [ "*****" ], "address_from": { "name": "London Sender", "street1": "10 Downing St", "street2": "", "street3": "", "city": "London", "state": "", "zip": "SW1A 2AA", "country": "GB", "street_no": "", "phone": "00442079250918", "email": "sender@example.com", "company": "London Logistics", "is_residential": null, "test": false, "object_id": "c81c84d3206a42138378a28bc6a37c21", "is_complete": true, "validation_results": {} }, "address_to": { "name": "Northern Ireland Recipient", "street1": "123 Causeway Road", "street2": "", "street3": "", "city": "Bushmills", "state": "County Antrim", "zip": "BT57 8SU", "country": "GB", "street_no": "", "phone": "00442820730918", "email": "recipient.ni@example.com", "company": "", "is_residential": null, "test": false, "object_id": "9523b3754f504c73810eb3ec6520ee79", "is_complete": true, "validation_results": {} }, "parcels": [ { "object_owner": "expn-prod-test@goshippo.com", "object_state": "VALID", "mass_unit": "lb", "template": null, "extra": {}, "metadata": "", "test": false, "object_id": "76bba84bd1824a9fa1b57f1d4d27ef8e", "object_created": "2025-08-05T05:11:50.747Z", "object_updated": "2025-08-05T05:11:50.747Z", "length": "5.0000", "width": "5.0000", "height": "5.0000", "distance_unit": "in", "weight": "2.0000", "line_items": [] } ], "status": "SUCCESS", "shipment_date": "2025-08-05T05:11:50.747Z", "address_return": { "name": "London Sender", "street1": "10 Downing St", "street2": "", "street3": "", "city": "London", "state": "", "zip": "SW1A 2AA", "country": "GB", "street_no": "", "phone": "00442079250918", "email": "sender@example.com", "company": "London Logistics", "is_residential": null, "test": false, "object_id": "c81c84d3206a42138378a28bc6a37c21", "is_complete": true, "validation_results": {} }, "rates": [ { "object_id": "32444e5afe5c4d5fa44de02e4b56870d", "object_created": "2025-08-05T05:11:51.609Z", "object_owner": "expn-prod-test@goshippo.com", "shipment": "ecfa8357e93f40b4a5b247a4794208a6", "amount": "2.96", "currency": "GBP", "amount_local": "2.96", "currency_local": "GBP", "attributes": [ "FASTEST" ], "provider": "Royal Mail SF", "provider_image_75": "https://shippo-static.s3.amazonaws.com/providers/75/royal_mail_sf.png", "provider_image_200": "https://shippo-static.s3.amazonaws.com/providers/200/royal_mail_sf.png", "arrives_by": null, "duration_terms": "Two business days.", "messages": [], "carrier_account": "aa79df9091b44e03a5de1538585fdd88", "zone": null, "test": false, "servicelevel": { "name": "Tracked 48 for Post Office Drop", "token": "royal_mail_sf_tracked_48_for_post_office_drop", "terms": "{\"base_price\": 2.76, \"vat\": 0.00, \"dropoff_surcharge\": 0, \"currency\": \"GBP\", \"total_price\": 2.76}", "extended_token": "royal_mail_sf_tracked_48_for_post_office_drop", "display_name": null, "parent_servicelevel": null }, "estimated_days": 2, "included_insurance_price": null } ], "alternate_address_to": null, "customs_declaration": { "object_owner": "expn-prod-test@goshippo.com", "object_state": "VALID", "certify": true, "certify_signer": "Saurabh Sharan", "non_delivery_option": "RETURN", "contents_type": "MERCHANDISE", "contents_explanation": "", "exporter_reference": "", "importer_reference": "", "invoice": "", "commercial_invoice": false, "license": "", "certificate": "", "aes_itn": "", "incoterm": "DDU", "eel_pfc": "", "b13a_filing_option": "", "b13a_number": "", "disclaimer": "", "notes": "", "metadata": "", "test": false, "is_vat_collected": null, "object_id": "4ab606eef0f74c479d4df6e47963212b", "object_created": "2025-08-05T05:11:50.747Z", "object_updated": "2025-08-05T05:11:50.747Z", "items": [ "e3a0bcbb45044228b127d7efa3ee5d2a" ], "invoiced_charges": null, "address_importer": null, "duties_payor": null, "exporter_identification": null } } ``` Once you have created your shipment, proceed to [Step 3: Purchase label](/carriers/integration-guides/royal-mail-tracked/purchase-label). # Purchase label Source: https://docs.goshippo.com/carriers/integration-guides/royal-mail-tracked/purchase-label Purchase a Royal Mail Tracked shipping label by submitting a rate object ID to the Shippo transactions endpoint. This is a 2nd step of the label purchase flow where we first create a shipment object (and get rates for a given shipment). Then, we purchase a label for the provided ‘rate’. ## HTTP Method POST ## URL ``` https://api.goshippo.com/transactions/ ``` ## Purchase from created Shipment This is a flow where we first create a shipment object (and get rates for a given shipment). Then, we purchase a label for the provided `rate`. ### Request Payload | Parameter | Description | | ------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- | | rate\* | `object_id` of the rate object we get in the [create shipments call response](/carriers/integration-guides/royal-mail-tracked/create-shipment#response-sample). | | label\_file\_type\* | Allowed values: `PDF`, `PDF_A4` | | async | Set to true if you want to poll for the result and receive faster response | Note: Parameters with an \* are mandatory ### Example #### Request Sample ```shell cURL theme={null} curl --location --request POST 'https://api.goshippo.com/transactions' \ --header 'Authorization: ShippoToken ’ \ --header 'Content-Type: application/json' \ --data-raw '{ "rate": "32444e5afe5c4d5fa44de02e4b56870d", "async": false, "label_file_type": "PDF" }' ``` #### Response Sample ```json theme={null} {    "object_state": "VALID",    "status": "SUCCESS",    "object_created": “2025-08-05T21:43:41.829Z”,    "object_updated":“2025-08-05T21:43:41.829Z”,    "object_id": "cbc1a12243db44b9ae56ef3ca502b8c3",    "object_owner": expn-prod-test@goshippo.com",    "test": false,    "rate": "32444e5afe5c4d5fa44de02e4b56870d",    "tracking_number": "TQ966044837GB",    "tracking_status": "PRE_TRANSIT",    "eta": null,    "tracking_url_provider": "",    "label_url": "you_will_find_your_label_url_here",    "commercial_invoice_url": null,    "messages": [],    "order": null,    "metadata": "",    "parcel": "bf276a9f955f43e7b7a75345687b9f4d",    "billing": {        "payments": []    },    "qr_code_url": null } ``` ## Sample Label Below is a sample PDF label for a Royal Mail C2C MCA Tracked 48 for Post Office Drop. After you have created your label and shipped your package, you may request tracking status updates by following the process described in [Step 4: Track](/carriers/integration-guides/royal-mail-tracked/track). # Terms Acceptance Source: https://docs.goshippo.com/carriers/integration-guides/royal-mail-tracked/terms-and-conditions-acceptance Accept Royal Mail Terms and Conditions before your first label purchase via the Shippo Web App or API Portal. A shipper using Royal Mail services needs to acknowledge and accept Royal Mail's Terms and Conditions before their first label purchase. This can be accomplished either via the [Shippo Web App](https://app.goshippo.com), or through the [Shippo API Portal](https://portal.goshippo.com/). ### Terms to be accepted * Postal Service Act 2000 │ Royal Mail Group Ltd * Click & Drop™ Terms and Conditions * Rates for Royal Mail MCA will be sent as part of the POST /shipment response. **Note** Label Purchase will be blocked by Shippo until the terms have been accepted. Once you have accepted the Terms and Conditions, proceed to [Step 2: Create shipment](/carriers/integration-guides/royal-mail-tracked/create-shipment). # Tracking Source: https://docs.goshippo.com/carriers/integration-guides/royal-mail-tracked/track Track Royal Mail Tracked shipments and receive webhook notifications for status changes using the Shippo Tracking API. You can register your webhook(s) for a Shipment (and request the current status at the same time) by POSTing to the tracking endpoint. This way Shippo will send HTTP notifications to your track\_updated webhook(s) whenever the status changes. ## HTTP Method POST ## URL ``` https://api.goshippo.com/tracks/ ``` ### Request Payload | Parameter in POST Data | Description | | ---------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | carrier\* | `royal_mail_sf` | | tracking\_number\* | `tracking_number` value of the transaction response, we get in the transaction call response. [create shipments call response](/carriers/integration-guides/royal-mail-tracked/create-shipment#response-sample). | | metadata | Additional metadata to associate with this tracking request. | ## Response Code 200 OK ### Request Example ```shell cURL theme={null} curl https://api.goshippo.com/tracks/ \     -H "Authorization: ShippoToken " \     -d carrier="royal_mail_sf" \     -d tracking_number="TQ966044837GB" \     -d metadata="Order 000123" ``` ### Response Example ```json theme={null} { "tracking_number": "TQ966044837GB", "carrier": "royal_mail_sf", "servicelevel": { "name": null, "token": null }, "transaction": "5748cf036bce476c9ed3c92a9270edd7", "address_from": { "city": "", "state": "", "zip": "", "country": "GB" }, "address_to": { "city": "", "state": "", "zip": "", "country": "GB" }, "eta": null, "original_eta": null, "metadata": null, "test": false, "tracking_status": { "status_date": "2025-07-24T10:32:52Z", "status_details": "Delivered to Safeplace by", "location": null, "substatus": { "code": "delivered", "text": "Package has been delivered.", "action_required": false }, "object_created": "2025-07-24T12:57:38.73Z", "object_updated": "2025-07-24T12:57:38.73Z", "object_id": "f379269f8c584d278d8abd9a9e2bd2ff", "status": "DELIVERED" }, "tracking_history": [ { "status_date": "2025-07-18T23:39:04Z", "status_details": "Sender despatching item", "location": null, "substatus": { "code": "information_received", "text": "Information about the package received.", "action_required": false }, "object_created": "2025-07-18T23:14:19.94Z", "object_updated": "2025-07-19T03:42:02.857Z", "object_id": "db068dfd371e403ba65cf8c45adff4bc", "status": "PRE_TRANSIT" }, { "status_date": "2025-07-19T16:03:12Z", "status_details": "Accepted at Parcelshop", "location": null, "substatus": { "code": "package_accepted", "text": "Package has been accepted into the carrier network for delivery.", "action_required": false }, "object_created": "2025-07-19T16:53:22.097Z", "object_updated": "2025-07-19T16:53:22.097Z", "object_id": "5e47dc859ac24476b6dfcf876abc9c27", "status": "TRANSIT" }, { "status_date": "2025-07-22T01:36:18Z", "status_details": "Item Received", "location": null, "substatus": { "code": "information_received", "text": "Information about the package received.", "action_required": false }, "object_created": "2025-07-22T05:08:27.592Z", "object_updated": "2025-07-22T05:08:27.592Z", "object_id": "2f048f514f8b474aa28fcb99302cbffc", "status": "TRANSIT" }, { "status_date": "2025-07-23T17:13:45Z", "status_details": "Item Received", "location": null, "substatus": { "code": "delivery_scheduled", "text": "Package is scheduled for delivery.", "action_required": false }, "object_created": "2025-07-23T19:48:10.325Z", "object_updated": "2025-07-23T19:48:10.325Z", "object_id": "c005bb9f1574466284b5372676933cea", "status": "TRANSIT" }, { "status_date": "2025-07-23T17:14:20Z", "status_details": "Item Received", "location": null, "substatus": { "code": "package_accepted", "text": "Package has been accepted into the carrier network for delivery.", "action_required": false }, "object_created": "2025-07-23T19:48:10.325Z", "object_updated": "2025-07-23T19:48:10.325Z", "object_id": "d4af04d33e734623b4476215fdc89573", "status": "TRANSIT" }, { "status_date": "2025-07-24T07:49:07Z", "status_details": "Due to be delivered today", "location": null, "substatus": { "code": "delivery_scheduled", "text": "Package is scheduled for delivery.", "action_required": false }, "object_created": "2025-07-24T08:40:11.324Z", "object_updated": "2025-07-24T08:40:11.324Z", "object_id": "e1412c07a0954efea54c544634c00646", "status": "TRANSIT" }, { "status_date": "2025-07-24T10:32:52Z", "status_details": "Delivered to Safeplace by", "location": null, "substatus": { "code": "delivered", "text": "Package has been delivered.", "action_required": false }, "object_created": "2025-07-24T12:57:38.73Z", "object_updated": "2025-07-24T12:57:38.73Z", "object_id": "f379269f8c584d278d8abd9a9e2bd2ff", "status": "DELIVERED" } ], "messages": [] } ``` # UPS Mail Innovations Source: https://docs.goshippo.com/carriers/ups-mail-innovations Ship lightweight parcels and letters using UPS Mail Innovations through your Shippo integration for US domestic shipments. Shipping lightweight parcels, flat packages, and letters is generally reserved for local mail service. You can ship these lighter weight packages through your Shippo integration using [UPS Mail Innovations](https://www.ups.com/us/en/supplychain/logistics-solutions/mail-innovations.page). UPS Mail Innovations is a shipping and mailing service offered by UPS that utilizes a combination of UPS's ground network and the United States Postal Service (USPS) for delivery. It is designed for small to medium-sized businesses that need to ship a significant volume of lightweight and flat packages. You can ship the following with UPS Mail Innovations * Letters and documents * Flat packages (up to 130 inches in combined length, width, and height) * Packages weighing less than 1 pound **Note** Shippo support UPS Mail Innovations for US domestic shipments only. ## Create a lightweight shipment using the Shippo API ### Find your UPS account object ID If you have already identified the object ID of your UPS account, move to [step 2](#update-your-ups-account). To find the object ID of your UPS account, following the example below. **Request:** ```shell cURL theme={null} curl https://api.goshippo.com/carrier_accounts \ -H "Authorization: ShippoToken " ``` **Response:** ```json Response theme={null} { "next": "baseurl?page=3&results=10", "previous": "baseurl?page=1&results=10", "results": [ { "account_id": "56782", "active": true, "carrier": "UPS", "parameters": { "account_number": "94567e", …. }, "is_shippo_account": false, "metadata": "string", "object_id": "6aa34d5f6865448fbb1ee93636e98999", "object_owner": "bob22@gmail.com", "test": false }, ] } ``` ### Update your UPS account Mail Innovations is an additional service that must be enabled by UPS. Contact your UPS account representative to get the following account details. * customer ID * customer GUID To enable Mail Innovations, use the following example to update your existing UPS account. **note** Alternatively, instead of updating your existing UPS account to enable Mail Innovations, you may choose to create a new UPS account with Mail Innovations already enabled. **Request:** ```shell cURL theme={null} curl https://api.goshippo.com/carrier_accounts/6aa34d5f6865448fbb1ee93636e98999/ \ -X PUT \ -H "Authorization: ShippoToken " \ -d parameters='{ "cost_center": "", "password": "x99pass", "account_number": "94567e", "usps_endorsement": "", "surepost": "", "customer_id": "1234", "customer_guid": "1234-abcde" }' ``` **Response:** ```json Update account response theme={null} { "object_id": "16786b4db03d4d97bc8a213557f1c1e0", "object_owner": "bob22@gmail.com", "carrier": "ups", "account_id": "56782", "parameters": { "cost_center": "", "password": "****", "account_number": "94567e", "usps_endorsement": null, "surepost": "", "customer_id": "8899", "customer_guid": "7896" }, "test": false, "active": true } ``` Use the returned `object_id` in [step 2](#get-ups-mail-innovations-rates) to retrieve rates only from UPS. ### Get UPS Mail Innovations rates To get rates for a UPS Mail Innovations shipment, create a shipment specifying UPS as your preferred carrier by setting `carrier_accounts` to the `object_id` returned from [step 1](#update-your-ups-account). The Shippo API will only return Mail Innovations rates under the following conditions. * You must not specify a parcel template. * You must specify the dimensions of the your parcel (`length`, `width`, `height`) and `weight`. * You will only receive a rate from UPS Mail Innovations if your dimensions fit the required criteria of packages weighing less than 1 pound and having dimensions of less than 130 inches in combined length, width, and height. * If your package is non-rectangular (for example, [rolls or tubes](https://www.ups.com/assets/resources/webcontent/supplychain/media/Qualified-Domestic-Mail.pdf)), you must specify by setting `parcel.metadata` to `Non-rectangular`. Use the following example to get a Mail Innovations rate. **Request:** ```shell cURL theme={null} curl --location 'https://api.goshippo.com/shipments/' \ --header 'Authorization: ShippoToken ' \ --header 'Content-Type: application/json' \ --data-raw '{ "object_purpose": "PURCHASE", "address_from": { "object_purpose": "PURCHASE", "name": "Mr. Hippo", "company": "Lampeez", "street1": "2640 Northaven Road", "street2": "Suite 107", "city": "Dallas", "state": "TX", "zip": "75229", "country": "US", "phone": "6825973270", "email": "bob22@gmail.com" }, "address_to": { "object_purpose": "PURCHASE", "name": "Mrs. Hippo", "company": "Dean Lytle", "street1": "27 Holly Pl", "street_no": "", "street2": "", "city": "Bracey", "state": "VA", "zip": "23919", "country": "US", "phone": "4346364281", "email": "dlytle4087@mail.com", "metadata": "Customer ID 123456" }, "parcels": [{ "length": "12", "width": "10", "height": "5", "distance_unit": "in", "weight": "0.5", "mass_unit": "lb" }], "metadata": "test", "async": false, "carrier_accounts": ["16786b4db03d4d97bc8a213557f1c1e0"] }' ``` **Response:** ```json Response theme={null} "provider": "UPS", "provider_image_75": "https://cdn2.goshippo.com/providers/75/UPS.png", "provider_image_200": "https://cdn2.goshippo.com/providers/200/UPS.png", "servicelevel": { "name": "Mail Innovations Parcel", "token":"ups_mail_innovations_parcel", "terms": "", }, ``` ## Mail Innovations Service level tokens | Token | Service level name | | -------------------------------------- | ------------------------------ | | 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 | # API Quickstart Guide Source: https://docs.goshippo.com/guides/api-quickstart Make your first Shippo API call by creating an address, setting up your token, and testing a request. Follow this guide to make your first Shippo API call. In this guide, you will learn how to create an address using the Shippo API. Building shipping for multiple merchants? A single API account works great for one business. If you're building a platform where other businesses will ship through your integration, there's a different setup that handles per-merchant billing, carrier accounts, and reporting cleanly. [See which integration path is right for you →](/guides/integration-paths) ## Generate your API Token Follow the [Authentication guide](/guides/authentication) to generate your API Token. **Note** When learning about and testing the Shippo API, we recommend using the [test token](/guides/testing). Using your test token means all the calls you make to the Shippo API are free. ## Install the client library for your language ```shell title="cURL" theme={null} # No library needed for cURL ``` ```python title="Python" theme={null} pip install shippo ``` ```php title="PHP" theme={null} // Follow the steps in // https://github.com/goshippo/shippo-php-client ``` ```javascript title="Node.js" theme={null} npm install shippo ``` ```java title="Java" theme={null} // Java npm install shippo ``` ```cs title="C#" theme={null} dotnet add package Shippo ``` ```other title="Other libraries" theme={null} // For a full list of supported libraries, review our client libraries page // https://docs.goshippo.com/guides/client-libraries ``` See our [client libraries](/guides/client-libraries) page for more details. ## Make your first API call To make sure everything is working, make a simple call to create a new address in your Shippo account. You must replace `` with the token you copied from [Step 1](#generate-your-api-token). ```shell title="cURL" theme={null} curl https://api.goshippo.com/addresses/ \ -H "Authorization: ShippoToken " \ -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" ``` ```python title="Python" theme={null} import shippo from shippo.models import components shippo_sdk = shippo.Shippo(api_key_header="") shippo_sdk.addresses.create( components.AddressCreateRequest( name="Shawn Ippotle", company="Shippo", street1="215 Clayton St.", city="San Francisco", state="CA", zip="94117", country="US", # iso2 country code phone="+1 555 341 9393", email="shippotle@shippo.com" ) ) ``` ```php title="PHP" theme={null} require_once('lib/Shippo.php'); Shippo::setApiKey(""); // 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" )); ``` ```typescript title="TypeScript" theme={null} // Create address object const shippo = new Shippo({apiKeyHeader: ''}); const addressFrom = await shippo.addresses.create({ name: "Shawn Ippotle", company: "Shippo", street1: "215 Clayton St.", city: "San Francisco", state: "CA", zip: "94117", country: "US", // iso2 country code phone: "+1 555 341 9393", email: "shippotle@shippo.com", }); ``` ```java title="Java" theme={null} Shippo.setApiKey(''); HashMap addressMap = new HashMap(); addressMap.put("name", "Mr. Hippo"); addressMap.put("company", "Shippo"); addressMap.put("street1", "215 Clayton St."); addressMap.put("city", "San Francisco"); addressMap.put("state", "CA"); addressMap.put("zip", "94117"); addressMap.put("country", "US"); addressMap.put("phone", "+1 555 341 9393"); addressMap.put("email", "support@goshipppo.com"); Address createAddress = Address.create(addressMap); ``` ```cs title="C#" theme={null} using Shippo; using Shippo.Models.Components; ShippoSDK sdk = new ShippoSDK(apiKeyHeader: ""); Address address = await sdk.Addresses.CreateAsync( new AddressCreateRequest() { 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", } ); ``` ```other title="Other libraries" theme={null} // For a full list of supported libraries, review our client libraries page // https://docs.goshippo.com/guides/client-libraries ``` If your request to create a new address was a success, the response should look like the following. If you don't get a response like this, check your code and make sure your API token is correct. ```json theme={null} { "is_complete": true, "object_created":"2022-07-09T02:19:13.174Z", "object_updated":"2022-07-09T02:19:13.174Z", "object_id":"d799c2679e644279b59fe661ac8fa488", "object_owner":"shippotle@shippo.com", "validation_results": {}, "name":"Shawn Ippotle", "company":"Shippo", "street_no": "", "street1":"215 Clayton St.", "street2":"", "street3":"", "city":"San Francisco", "state":"CA", "zip":"94117", "country":"US", "longitude": null, "latitude": null, "phone":"15553419393", "email":"shippotle@shippo.com", "is_residential":true, "metadata":"Customer ID 123456" } ``` ## Next steps You now know how to make API calls using the Shippo API. Your next step is to create your [first shipping label](/guides/generate-shipping-label). You can also start exploring our [API reference](/api-reference/addresses/list-all-addresses) to learn about all the Shippo API features. # Authentication Source: https://docs.goshippo.com/guides/authentication Learn how to authenticate Shippo API requests using live and test API keys, and manage your tokens securely. Shippo authenticates your API requests using your account’s API keys. **note** If your request does not include a key, or includes a deleted or expired key, the Shippo API returns a `401 Unauthorized` error with the following responses, depending on the nature of the error. ```json theme={null} { "detail": "Token does not exist" } ``` Or ```json theme={null} { "detail": "Authentication credentials were not provided." } ``` ## Test mode and live mode You can make Shippo API calls in either test mode or live mode. When you use test mode, you have access to test data and can make test calls. When you use live mode, you have access to live data and can make live calls (like purchasing a label). Each mode has its own set of API keys. | Type | When to use | How to use | Considerations | | --------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | Test mode | As you test and build your Shippo integration, use test mode with your test keys. In test mode, you can use all of the Shippo services like retrieving shipping rates and creating test labels without being charged. | Use your API test token for `Authentication` in [your API calls](#use-your-secure-key). | Rates requested in test mode may differ from actual rates in live mode. Data is not shared between test account and live account.

For a full list of considerations, review our [testing guide](/guides/testing#notes-about-test-mode) | | Live mode | When your integration is ready for production use live mode with your live tokens. In live mode, you can generate shipping rates and purchase real shipping labels. | Use you API live token for `Authentication` in [your API calls](#use-your-secure-key) | Your account will be charged for purchasing labels. | ## Get your API keys ### Create your free Shippo account If you already have a Shippo account, skip ahead to [Step 2](#generate-your-secure-key). In your browser, open the address [https://apps.goshippo.com/join](https://apps.goshippo.com/join). Enter your name, email, a secure password, and click **Get Started**. Follow the prompts to complete your registration. ### Generate your secure key Login to the [Shippo API portal](https://portal.goshippo.com/api-config/api) using your Shippo credentials. generate token UI In the **API Configuration** menu, select **Developer keys**. In **Developer Keys**, there are two options. **Live keys** and **Test keys**. Use **Live keys** for production ready use of the Shippo API. For testing and development, use the [Test key](/guides/testing). * Click **Create new live key** for a live key. * Live keys begin with `shippo_live_`. * Click **Create new test key** for a test key. * Test keys begin with `shippo_test_`. Copy your API key and click **Close**. **Note** You can only see your full API key once. Store it in a secure place. If you lose your API key, you can generate a new one. **Warning** These keys give direct access to your Shippo account. You must store these securely. If you think your key has been compromised, use the dashboard to delete it and generate a new key. ### Use your secure key To use your secure key, make an API call replacing `` with the key you have generated. ```shell theme={null} curl https://api.goshippo.com/shipments/\ -H "Authorization: ShippoToken "\ -H "Content-Type: application/json"\ -d '{...}' ``` # Authentication using JWT Source: https://docs.goshippo.com/guides/authentication-using-jwt Generate JWTs to securely authenticate client-side apps with the Shippo API for white label or gray label integrations. For server-side applications where you can keep API keys secure, follow our [Authentication](/guides/authentication) guide. For your client-side applications, we recommend using a JWT to securely authenticate. Following this guide to generate a JWT for your application. **note** Depending on the path you choose for integration, there is a different set of instructions. Refer to our [integration paths](/guides/integration-paths) for more details. ## Generate a JWT for an eCommerce store If you have an eCommerce store that you want to add shipping to, you can generate a JWT using your own Shippo API key. Follow this example that uses the `embedded/authz/` endpoint to create a JWT. ```shell JWT for eCommerce merchant request theme={null} curl --location --request POST 'https://api.goshippo.com/embedded/authz/' \ --header 'Authorization: ShippoToken ' \ --header 'Content-Type: application/json' \ --data-raw '{ "scope": "embedded:carriers" }' ``` ```json JWT for eCommerce merchant response theme={null} { "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c", "expires_in": "1682364890" } ``` The `token` is the JWT and `expires_in` is a unix timestamp representing when the token expires. ## Generate a JWT for a white label integration If you have not already, review our guide on [Shippo Platform accounts](/platform-accounts/platform-accounts). You must have a Platforms account to create and use Managed Shippo Accounts. If you do not know your customer's Shippo Account ID, refer to this guide to [retrieve your user's Shippo Account ID](/shipping-elements/auth#1-retrieve-your-users-shippo-account-id). To generate a JWT for a Managed account, call the `embedded/authz/` endpoint and set the `object_id` of your customers Shippo Account ID to the `SHIPPO-ACCOUNT-ID` in the header of the call. ```shell JWT for white label request theme={null} curl --location --request POST 'https://api.goshippo.com/embedded/authz/' \ --header 'Authorization: ShippoToken ' \ --header 'SHIPPO-ACCOUNT-ID: e0b382dc7d754c0ca6358c09d5d2bdf7' \ --header 'Content-Type: application/json' \ --data-raw '{ "scope": "embedded:carriers" }' ``` ```json JWT for white label response theme={null} { "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c", "expires_in": "1682364890" } ``` The `token` is the JWT and `expires_in` is a unix timestamp representing when the token expires. ## Generate a JWT for a gray label integration If you have not already, follow the steps in our [guide to request your OAuth key](/o-auth-integrations/o-auth) and get access to a Bearer Token. There are 2 ways you can generate your own JWT for gray label integration. ### 1. Direct Authorization API ```shell JWT for gray label request theme={null} curl --location --request POST 'https://api.goshippo.com/embedded/authz/' \ --header 'Authorization: Bearer \ --header 'Content-Type: application/json' \ --data-raw '{ "scope": "embedded:carriers" }' ``` ```json JWT for gray label response theme={null} { "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c", "expires_in": "1682364890" } ``` The `token` is the JWT and `expires_in` is a unix timestamp representing when the token expires. ### 2. User Server Side Remote Procedure Call to generate JWT ```shell theme={null} service user { rpc DirectAuthorization(DirectAuthorizationRequest) : DirectAuthorizationResponse } message DirectAuthorizationRequest { context requestor: // integration user id requested_subject: // alice's id token_type: 'jwt' } ``` ```json Response theme={null} message DirectAuthorizationResponse { token: // encoded jwt expires: //unix timestamp representing when the token expires } ``` The `token` is the JWT and `expires_in` is a unix timestamp representing when the token expires. ## Use your JWT JWT works the same as an API token. To test your generated JWT, call the [list all carrier parcel templates](/api-reference/carrier-parcel-templates/list-all-carrier-parcel-templates) endpoint. Remember to replace `` with the token you have generated. ```shell Use JWT request theme={null} curl --location --request GET https://api.goshippo.com/parcel-templates \ --header 'Authorization: JWT ' \ --header 'Content-Type: application/json' ``` ```json Use JWT response theme={null} [ { "name": "FedEx® Small Box (S1)", "token": "FedEx_Box_Small_1", "carrier": "FedEx", "is_variable_dimensions": false, "length": "12.375", "width": "10.875", "height": "1.5", "distance_unit": "in" } ] ``` # SDKs Source: https://docs.goshippo.com/guides/client-libraries Find Shippo SDKs for Python, Node.js, Java, C#, PHP, and Go, plus our Postman collection for API testing. **Note** We are currently updating each of our client libraries. Refer to each library source for the latest information. While you can use Shippo's shipping API by making direct HTTP requests to our servers, we provide SDKs for our API to make it easier to access them from a list of supported languages. You can find out more about the available libraries for the language of choice below. *** ### Python logo Python You can install our Python SDK using pip. The source code is available on [GitHub](https://github.com/goshippo/shippo-python-sdk). ```python theme={null} pip install shippo ``` *** ### Node logo Node.JS The Node client library can be installed via [npm](https://www.npmjs.com/package/shippo). The source code is available on [GitHub](https://github.com/goshippo/shippo-javascript-sdk). Supported runtimes are listed [here](https://github.com/goshippo/shippo-javascript-sdk/blob/main/RUNTIMES.md). ```node theme={null} npm install shippo ``` *** ### Java logo Java The Java client library can be installed through different methods The source code and all installation methods are available on [GitHub](https://github.com/goshippo/shippo-java-sdk). The Java package is available in [Maven central repository](https://central.sonatype.com/artifact/com.goshippo/shippo-sdk). ``` pkg:maven/com.goshippo/shippo-sdk@latest ``` *** ### C sharp logo C\# You can install our C# SDK using [NuGet](https://www.nuget.org/packages/Shippo/). The source code is available on [GitHub](https://github.com/goshippo/shippo-csharp-sdk). ```cs C# theme={null} dotnet add package Shippo ``` *** ### PHP logo PHP The PHP client library can be installed through different methods. The source code and all installation methods are available on [GitHub](https://github.com/goshippo/shippo-php-client). *** ## Community-maintained Libraries ### Go logo Go The Go client library was built by [Daniel Kang](https://github.com/d5). The source code and installation methods are available on [GitHub](https://github.com/d5/go-shippo). ## Postman ### Postman logo Shippo Postman Collection [Postman](https://www.getpostman.com/) is an app for easy RESTful API exploration. Use the Shippo Postman Collection to quickly and easily test API requests during development. [![Run in Postman](https://run.pstmn.io/button.svg)](https://god.gw.postman.com/run-collection/22332580-e3f0581d-41f8-4c5c-894e-d9e22a87f6a5?action=collection%2Ffork\&source=rip_markdown\&collection-url=entityId%3D22332580-e3f0581d-41f8-4c5c-894e-d9e22a87f6a5%26entityType%3Dcollection%26workspaceId%3Da131fa9b-fc39-440e-93bb-2586e9e1eb93) # Generate your first label Source: https://docs.goshippo.com/guides/generate-shipping-label Create your first shipping label with the Shippo API using a two-step rate-then-purchase flow or a single API call. **Note** If you would prefer to learn how to create your first shipping label using Postman, see our guide to create your [first shipping label using Postman](/guides/generate-shipping-label-postman). Use the Shippo API to programmatically create shipping labels from any supported carrier. Follow this guide to learn how to create your first label. This guide uses Shippo API objects, to learn more about these read our [API objects guide](/api-concepts/api-objects). **Note** Before starting this guide, follow the [Authentication guide](/guides/authentication) to generate your API Token. In these guides, wherever you see ``, replace it with you own token. When learning about and testing the Shippo API, we recommend using the [test token](/guides/testing). Using your test token means all the calls you make to the Shippo API are free. ## Introduction There are two ways to create shipping labels with the Shippo API 1. [Create a label with two API calls](#create-a-label-with-two-api-calls) If you don't know which carrier and service you want to use, use the two API call method. This retrieves all the available rates for your shipment. You can then choose the rate that works best for you before purchasing it. 2. [Create a label with one API call](#create-a-label-with-one-api-call) If you already know which carrier and service you want to use, you can create a label with a single API call directly. ## Create a label with two API calls To retrieve all available rates and create a shipping label based on one of the rates, you need to follow two simple steps: 1. Create the `shipment` object, consisting of two `address` objects (address from and address to) and at least one `parcels` object (blue objects below). The Shipment response contains the list of available Rates and their associated object IDs. 2. Create the `transaction` object. You pass your chosen `rates` object (green object below) to the transaction call. Calling the transaction endpoint purchases your label. Object Flow Object Flow ### Create a Shipment object Highlighted Shipment Highlighted Shipment To create a [Shipment object](/api-reference/shipments/list-all-shipments), call the shipment endpoint `https://api.goshippo.com/shipments/`. At a minimum, a shipment requires a `address_from`, `address_to`, and `parcels`. **Note** All US addresses are automatically validated. For more information see our [Address Validation guide](/addresses/address-validation). **Request:** ```shell title="cURL" theme={null} curl https://api.goshippo.com/shipments/ \ -H "Authorization: ShippoToken " \ -H "Content-Type: application/json" \ -d '{ "address_from":{ "name":"Mr. Hippo", "street1":"215 Clayton St.", "city":"San Francisco", "state":"CA", "zip":"94117", "country":"US" }, "address_to":{ "name":"Mrs. Hippo", "street1":"965 Mission St.", "city":"San Francisco", "state":"CA", "zip":"94105", "country":"US" }, "parcels":[{ "length":"5", "width":"5", "height":"5", "distance_unit":"in", "weight":"2", "mass_unit":"lb" }], "async": false }' ``` ```Python title="Python" theme={null} import shippo from shippo.models import components shippo_sdk = shippo.Shippo(api_key_header="") address_from = components.AddressCreateRequest( name="Shawn Ippotle", street1="215 Clayton St.", city="San Francisco", state="CA", zip="94117", country="US" ) address_to = components.AddressCreateRequest( name="Mr Hippo", street1="Broadway 1", city="New York", state="NY", zip="10007", country="US" ) parcel = components.ParcelCreateRequest( length="5", width="5", height="5", distance_unit=components.DistanceUnitEnum.IN, weight="2", mass_unit=components.WeightUnitEnum.LB ) shipment = shippo_sdk.shipments.create( components.ShipmentCreateRequest( address_from=address_from, address_to=address_to, parcels=[parcel], async_=False ) ) ``` ```PHP theme={null} require_once('lib/Shippo.php'); Shippo::setApiKey(""); $fromAddress = array( 'name' => 'Shawn Ippotle', 'street1' => '215 Clayton St.', 'city' => 'San Francisco', 'state' => 'CA', 'zip' => '94117', 'country' => 'US' ); $toAddress = array( 'name' => 'Mr Hippo"', 'street1' => 'Broadway 1', 'city' => 'New York', 'state' => 'NY', 'zip' => '10007', 'country' => 'US', 'phone' => '+1 555 341 9393' ); $parcel = array( 'length'=> '5', 'width'=> '5', 'height'=> '5', 'distance_unit'=> 'in', 'weight'=> '2', 'mass_unit'=> 'lb', ); $shipment = Shippo_Shipment::create( array( 'address_from'=> $fromAddress, 'address_to'=> $toAddress, 'parcels'=> array($parcel), 'async'=> false ) ); ``` ```typescript title="TypeScript" theme={null} const shippo = new Shippo({apiKeyHeader: ''}); const addressFrom: AddressCreateRequest = { name: "Shawn Ippotle", street1: "215 Clayton St.", city: "San Francisco", state: "CA", zip: "94117", country: "US" }; const addressTo: AddressCreateRequest = { name: "Mr Hippo", street1: "Broadway 1", city: "New York", state: "NY", zip: "10007", country: "US", }; const parcel: ParcelCreateRequest = { length: "5", width: "5", height: "5", distanceUnit: DistanceUnitEnum.In, weight: "2", massUnit: WeightUnitEnum.Lb }; const parcel2: ParcelCreateRequest = { length: "10", width: "10", height: "10", distanceUnit: DistanceUnitEnum.In, weight: "2", massUnit: WeightUnitEnum.Lb }; const shipment = await shippo.shipments.create({ addressFrom: addressFrom, addressTo: addressTo, parcels: [parcel], async: false }); ``` ```Java title="Java" theme={null} Shippo.setApiKey(''); // To Address HashMap addressToMap = new HashMap(); addressToMap.put("name", "Mr Hippo"); addressToMap.put("company", "Shippo"); addressToMap.put("street1", "215 Clayton St."); addressToMap.put("city", "San Francisco"); addressToMap.put("state", "CA"); addressToMap.put("zip", "94117"); addressToMap.put("country", "US"); // From Address HashMap addressFromMap = new HashMap(); addressFromMap.put("name", "Ms Hippo"); addressFromMap.put("company", "San Diego Zoo"); addressFromMap.put("street1", "2920 Zoo Drive"); addressFromMap.put("city", "San Diego"); addressFromMap.put("state", "CA"); addressFromMap.put("zip", "92101"); addressFromMap.put("country", "US"); // Parcel HashMap parcelMap = new HashMap(); parcelMap.put("length", "5"); parcelMap.put("width", "5"); parcelMap.put("height", "5"); parcelMap.put("distance_unit", "in"); parcelMap.put("weight", "2"); parcelMap.put("mass_unit", "lb"); // Shipment HashMap shipmentMap = new HashMap(); shipmentMap.put("address_to", addressToMap); shipmentMap.put("address_from", addressFromMap); shipmentMap.put("parcels", parcelMap); shipmentMap.put("async", false); Shipment shipment = Shipment.create(shipmentMap); ``` ```cs title="C#" theme={null} using Shippo; using Shippo.Models.Components; ShippoSDK sdk = new ShippoSDK(apiKeyHeader: ""); AddressFrom addressFrom = AddressFrom.CreateAddressCreateRequest( new AddressCreateRequest() { Name = "Shawn Ippotle", Street1 = "215 Clayton St.", City = "San Francisco", State = "CA", Zip = "94117", Country = "US", } ); AddressTo addressTo = AddressTo.CreateAddressCreateRequest( new AddressCreateRequest() { Name = "Mr Hippo", Street1 = "Broadway 1", City = "New York", State = "NY", Zip = "10007", Country = "US", } ); Shippo.Models.Components.Parcels parcel = Shippo.Models.Components.Parcels.CreateParcelCreateRequest( new ParcelCreateRequest() { Length = "5", Width = "5", Height = "5", DistanceUnit = DistanceUnitEnum.In, Weight = "2", MassUnit = WeightUnitEnum.Lb, } ); Shipment shipment = await sdk.Shipments.CreateAsync( new ShipmentCreateRequest() { AddressFrom = addressFrom, AddressTo = addressTo, Parcels = new List() { parcel }, Async = false, } ); ``` The response includes the `object_id` for the `shipment`, `address_from`,`address_to`, and `parcels` as well as `rates`. These `rates` are the available shipping options for your shipment. Review the returned rates to find the one that works best for your shipment. **Response:** ```json theme={null} { "carrier_accounts": [], "object_created": "2022-12-15T11:32:41.707Z", "object_updated": "2022-12-15T11:32:41.845Z", "object_id": "76ca5cbfd24f4b2d96f38ea6834985be", "object_owner": "shippotle@shippo.com", "status": "SUCCESS", "address_from": { "object_id": "e0d64d09edf846d0bd94dda91b299be9", "is_complete": true, "name": "Mr. Hippo", "company": "", "street_no": "", "street1": "215 Clayton St.", "validation_results": {}, "street2": "", "street3": "", "city": "San Francisco", "state": "CA", "zip": "94117", "country": "US", "phone": "", "email": "", "is_residential": null, "test": true }, "address_to": { "object_id": "b2d9219521be4637b5d1baeb70022c33", "is_complete": true, "name": "Mrs. Hippo", "company": "", "street_no": "", "street1": "965 Mission St.", "validation_results": {}, "street2": "", "street3": "", "city": "San Francisco", "state": "CA", "zip": "94105", "country": "US", "phone": "", "email": "", "is_residential": null, "test": true }, "parcels": [ { "object_state": "VALID", "object_created": "2022-12-15T11:32:41.675Z", "object_updated": "2022-12-15T11:32:41.741Z", "object_id": "8c119bb117934dfea19eac1e90230fa5", "object_owner": "shippotle@shippo.com", "template": null, "extra": {}, "length": "5.0000", "width": "5.0000", "height": "5.0000", "distance_unit": "in", "weight": "2.0000", "mass_unit": "lb", "value_amount": null, "value_currency": null, "metadata": "", "line_items": [], "test": true } ], "shipment_date": "2022-12-15T11:32:41.845Z", "address_return": { "object_id": "e0d64d09edf846d0bd94dda91b299be9", "is_complete": true, "name": "Mr. Hippo", "company": "", "street_no": "", "street1": "215 Clayton St.", "validation_results": {}, "street2": "", "street3": "", "city": "San Francisco", "state": "CA", "zip": "94117", "country": "US", "phone": "", "email": "", "is_residential": null, "test": true }, "alternate_address_to": null, "customs_declaration": null, "extra": {}, "rates": [ { "object_created": "2022-12-15T11:32:42.044Z", "object_id": "eab0f0c5689347439a9b87f2380710e5", "object_owner": "shippotle@shippo.com", "shipment": "76ca5cbfd24f4b2d96f38ea6834985be", "attributes": [ ], "amount": "24.30", "currency": "USD", "amount_local": "24.30", "currency_local": "USD", "provider": "USPS", "provider_image_75": "https://shippo-static.s3.amazonaws.com/providers/75/USPS.png", "provider_image_200": "https://shippo-static.s3.amazonaws.com/providers/200/USPS.png", "servicelevel": {}, "estimated_days": 2, "arrives_by": null, "duration_terms": "Overnight delivery to most U.S. locations.", "messages": [ ], "carrier_account": "b19e750708384303ac19ca693fe037ce", "test": true, "zone": "1" }, ... ], "metadata": "", "test": true, "order": null } ], "carrier_accounts": [], "metadata": "Customer ID 123456", "messages": [] } ``` ### Create a Transaction object Highlighted Transaction Highlighted Transaction Calling the transactions endpoint `https://api.goshippo.com/transactions`, creates a `transaction` [object](/api-reference/transactions/list-all-shipping-labels) and purchases your shipping label. Use the `object_id` of the `rates` you have chosen from your `shipment`. If your `shipment` has more than one `rates`, select the `object_id` of the rate that works best for you. You can send an optional `label_file_type` in the transaction call. If you don’t specify this value, the API will use to the default file format, which you can set on the [settings page](https://apps.goshippo.com/settings/account). **Request:** ```shell title="cURL" theme={null} curl https://api.goshippo.com/transactions \ -H "Authorization: ShippoToken " \ -d rate="eab0f0c5689347439a9b87f2380710e5" -d label_file_type="PDF" -d async=false ``` ```Python title="Python" theme={null} # 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_sdk.transactions.create( components.TransactionCreateRequest( rate=rate.object_id, label_file_type=components.LabelFileTypeEnum.PDF, async_=False ) ) # Retrieve label url and tracking number or error message if transaction.status == "SUCCESS": print(transaction.label_url) print(transaction.tracking_number) else: print(transaction.messages) ``` ```PHP title="PHP" theme={null} // 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"] ); } ``` ```typescript title="TypeScript" theme={null} // Get the first rate in the rates results. // Customize this based on your business logic. const rate = shipment.rates[0]; // Purchase the desired rate. const transaction = await shippo.transactions.create({ rate: rate?.objectId, labelFileType: LabelFileTypeEnum.Pdf, async: false }); ``` ```Java title="Java" theme={null} // Get the first rate in the rates results. // Customize this based on your own business logic Rate rate = rates.get(0); Map transactionParameters = new HashMap(); transactionParameters.put("rate", rate.getObjectId()); transactionParameters.put("async", false); Transaction transaction = Transaction.create(transactionParameters); if (transaction.getStatus().equals("SUCCESS")) { System.out.println(String.format("Label url : %s", transaction.getLabelUrl())); System.out.println(String.format("Tracking number : %s", transaction.getTrackingNumber())); } else { System.out.println(String.format("An Error has occured while generating you label. Messages : %s", transaction.getMessages())); } ``` ```cs title="C#" theme={null} // Get the first rate in the rates results. // Customize this based on your business logic. Rate rate = shipment.Rates[0]; Transaction transaction = await sdk.Transactions.CreateAsync( CreateTransactionRequestBody.CreateTransactionCreateRequest( new TransactionCreateRequest() { Rate = rate.ObjectId, LabelFileType = LabelFileTypeEnum.Pdf, Async = false, } ) ); if (transaction.Status == TransactionStatusEnum.Success) { Console.WriteLine($"{transaction.LabelUrl}"); Console.WriteLine($"{transaction.TrackingNumber}"); } else { Console.WriteLine($"{transaction.Messages}"); } ``` The response is the `transaction` object that includes details about your purchased label including a link to download shipping label (`label_url`). **Response:** ```json theme={null} { "object_state": "VALID", "status": "SUCCESS", "object_created": "2022-12-15T11:57:45.631Z", "object_updated": "2022-12-15T11:57:46.670Z", "object_id": "2db03e1bc677420a8c56dc77a60e9386", "object_owner": "shippotle@shippo.com", "test": true, "rate": "eab0f0c5689347439a9b87f2380710e5", "tracking_number": "92701901755477000000000011", "tracking_status": "UNKNOWN", "eta": null, "tracking_url_provider": "https://tools.usps.com/go/TrackConfirmAction_input?origTrackNum=92701901755477000000000011", "label_url": "https://deliver.goshippo.com/2db03e1bc677420a8c56dc77a60e9386.pdf?Expires=1702641466&Signature=dHAPUFOt7qrqQ-cUI2ptZKwO6rdmXQDu0XZS7gaWO9b77Og5O4yYQDaWuQCQ~otPHczkkI-EPPv20jkf3mTfi4oxdHdUX7W4OURzICPWSyDkP~neuNPDp21q5Wnohf5SBxC300NksR~be4Vdg0DygbWS4-aGDN6tQGuTNIWfUrqFuhzY~2DWEdCljt-XDYQLWxOWPD3sh99FaPvqutC2QRtJxmnxQx-A-CZO6XKeP5JNcCiPjc3Ic~3qbrgVdHnEJH6xmtTP6PBxvipsP0sJdZOp7xYAHOlLx4KHEv0Keah0eEy9lEZLfkSoYo6QOLymWf8TAIQplaYPlRY2yhlihw__&Key-Pair-Id=APKAJRICFXQ2S4YUQRSQ", "commercial_invoice_url": null, "messages": [ ], "order": null, "metadata": "Order ID", "parcel": "8c119bb117934dfea19eac1e90230fa5", "billing": { "payments": [ ] }, "qr_code_url": null } ``` This is a sample of a generated label. Sample shipping label ## Create a label with one API call If you already know what service level you’ll be shipping with, you can create a shipping label in one API call through Shippo using our Instalabel feature. **Note** Instalabel creation is available only for a select set of carriers through Shippo. To see if your carrier is supported, see our [carrier capabilities](/carriers/carrier-capabilities) page. Creating an Instalabel with one API call is a POST request to the Transaction endpoint with the nested shipment information, the carrier account, and the service token. Here’s a sample call that instantly creates and returns a shipping label: **Request:** ```shell title="cURL" theme={null} curl https://api.goshippo.com/transactions/ \ -H "Authorization: ShippoToken " \ -H "Content-Type: application/json" \ -d '{ "shipment": { "address_from": { "name": "Mr. Hippo", "street1": "215 Clayton St.", "city": "San Francisco", "state": "CA", "zip": "94117", "country": "US", "phone": "+1 555 341 9393", "email": "support@shippo.com" }, "address_to": { "name": "Mrs. Hippo", "street1": "965 Mission St.", "city": "San Francisco", "state": "CA", "zip": "94105", "country": "US", "phone": "+1 555 341 9393", "email": "support@shippo.com" }, "parcels": [{ "length": "5", "width": "5", "height": "5", "distance_unit": "in", "weight": "2", "mass_unit": "lb" }] }, "carrier_account": "b741b99f95e841639b54272834bc478c", "servicelevel_token": "usps_priority" }' ``` ```Python title="Python" theme={null} import shippo from shippo.models import components shippo_sdk = shippo.Shippo(api_key_header="") address_from = components.AddressCreateRequest( 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" ) address_to = components.AddressCreateRequest( name="Mr Hippo", street1="Broadway 1", city="New York", state="NY", zip="10007", country="US", phone="+1 555 341 9393", email="mrhippo@shippo.com", metadata="Priority Customer" ) parcel = components.ParcelCreateRequest( length="5", width="5", height="5", distance_unit=components.DistanceUnitEnum.IN, weight="2", mass_unit=components.WeightUnitEnum.LB ) shipment = components.ShipmentCreateRequest( address_from=address_from, address_to=address_to, parcels=[parcel], ) transaction = shippo_sdk.transactions.create( components.InstantTransactionCreateRequest( shipment=shipment, carrier_account="b741b99f95e841639b54272834bc478c", servicelevel_token="usps_priority" ) ) ``` ```PHP theme={null} require_once('lib/Shippo.php'); Shippo::setApiKey(""); $fromAddress = 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' ); $toAddress = array( 'name' => 'Mr Hippo"', 'company' => '', 'street1' => 'Broadway 1', 'street2' => '', 'city' => 'New York', 'state' => 'NY', 'zip' => '10007', 'country' => 'US', 'phone' => '+1 555 341 9393', 'email' => 'mrhippo@shippo.com' ); $parcel = array( 'length'=> '5', 'width'=> '5', 'height'=> '5', 'distance_unit'=> 'in', 'weight'=> '2', 'mass_unit'=> 'lb', ); $shipment = array( 'address_from'=> $fromAddress, 'address_to'=> $toAddress, 'parcels'=> array($parcel), ); $transaction = Shippo_Transaction::create( array( 'shipment' => $shipment, 'carrier_account' => 'b741b99f95e841639b54272834bc478c', 'servicelevel_token' => 'usps_priority', ) ); ``` ```typescript title="TypeScript" theme={null} const shippo = new Shippo({apiKeyHeader: ''}); const addressFrom: AddressCreateRequest = { 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", }; const addressTo: AddressCreateRequest = { name: "Mr Hippo", company: "", street1: "Broadway 1", street2: "", city: "New York", state: "NY", zip: "10007", country: "US", phone: "+1 555 341 9393", email: "mrhippo@shippo.com", metadata: "Hippos dont lie" }; const parcel: ParcelCreateRequest = { length: "5", width: "5", height: "5", distanceUnit: DistanceUnitEnum.In, weight: "2", massUnit: WeightUnitEnum.Lb }; const shipment: ShipmentCreateRequest = { addressFrom: addressFrom, addressTo: addressTo, parcels: [parcel], }; const transaction = await shippo.transactions.create({ shipment: shipment, carrierAccount: "078870331023437cb917f5187429b093", servicelevelToken: ServiceLevelUSPSEnum.UspsPriority.valueOf() }); ``` ```Java title="Java" theme={null} Shippo.setApiKey(''); // To Address HashMap addressToMap = new HashMap(); addressToMap.put("name", "Mr Hippo"); addressToMap.put("company", "Shippo"); addressToMap.put("street1", "215 Clayton St."); addressToMap.put("city", "San Francisco"); addressToMap.put("state", "CA"); addressToMap.put("zip", "94117"); addressToMap.put("country", "US"); addressToMap.put("phone", "+1 555 341 9393"); addressToMap.put("email", "mrhippo@goshipppo.com"); // From Address HashMap addressFromMap = new HashMap(); addressFromMap.put("name", "Ms Hippo"); addressFromMap.put("company", "San Diego Zoo"); addressFromMap.put("street1", "2920 Zoo Drive"); addressFromMap.put("city", "San Diego"); addressFromMap.put("state", "CA"); addressFromMap.put("zip", "92101"); addressFromMap.put("country", "US"); addressFromMap.put("email", "mshippo@goshipppo.com"); addressFromMap.put("phone", "+1 619 231 1515"); addressFromMap.put("metadata", "Customer ID 123456"); // Parcel HashMap parcelMap = new HashMap(); parcelMap.put("length", "5"); parcelMap.put("width", "5"); parcelMap.put("height", "5"); parcelMap.put("distance_unit", "in"); parcelMap.put("weight", "2"); parcelMap.put("mass_unit", "lb"); // Shipment HashMap shipmentMap = new HashMap(); shipmentMap.put("address_to", addressToMap); shipmentMap.put("address_from", addressFromMap); shipmentMap.put("parcels", parcelMap); shipmentMap.put("async", false); // Transaction HashMap transactionMap = new HashMap(); transactionMap.put("shipment", shipmentMap); transactionMap.put("servicelevel_token", "usps_priority"); transactionMap.put("carrier_account", "b741b99f95e841639b54272834bc478c"); Transaction transaction = Transaction.create(transactionMap); if (transaction.getStatus().equals("SUCCESS")) { System.out.println(String.format("Label url : %s", transaction.getLabelUrl())); System.out.println(String.format("Tracking number : %s", transaction.getTrackingNumber())); } else { System.out.println(String.format("An Error has occured while generating your label. Messages : %s", transaction.getMessages())); } ``` ```cs title="C#" theme={null} using Shippo; using Shippo.Models.Components; ShippoSDK sdk = new ShippoSDK(apiKeyHeader: ""); AddressFrom addressFrom = AddressFrom.CreateAddressCreateRequest( new AddressCreateRequest() { 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", } ); AddressTo addressTo = AddressTo.CreateAddressCreateRequest( new AddressCreateRequest() { Name = "Mr Hippo", Street1 = "Broadway 1", City = "New York", State = "NY", Zip = "10007", Country = "US", Phone = "+1 555 341 9393", Email = "mrhippo@shippo.com", Metadata = "Priority Customer", } ); Shippo.Models.Components.Parcels parcel = Shippo.Models.Components.Parcels.CreateParcelCreateRequest( new ParcelCreateRequest() { Length = "5", Width = "5", Height = "5", DistanceUnit = DistanceUnitEnum.In, Weight = "2", MassUnit = WeightUnitEnum.Lb, } ); ShipmentCreateRequest shipmentCreateRequest = new ShipmentCreateRequest() { AddressFrom = addressFrom, AddressTo = addressTo, Parcels = new List() { parcel }, }; Transaction transaction = await sdk.Transactions.CreateAsync( CreateTransactionRequestBody.CreateInstantTransactionCreateRequest( new InstantTransactionCreateRequest() { Shipment = shipmentCreateRequest, CarrierAccount = "b741b99f95e841639b54272834bc478c", ServicelevelToken = ServiceLevelUSPSEnum.UspsPriority.Value(), } ) ); ``` The response is the `transaction` object that includes details about the label including a link to your shipping label `label_url`. Shippo automatically creates the corresponding `rate` object, which you can use to retrieve the `amount` of the label. **Response:** ```json theme={null} { "object_state": "VALID", "status": "SUCCESS", "object_created": "2022-12-27T19:14:48.273Z", "object_updated": "2022-12-27T19:14:48.273Z", "object_id": "64bba01845ef40d29374032599f22588", "object_owner": "shippotle@shippo.com", "was_test": false, "rate": { "object_id": "cf6fea899f1848b494d9568e8266e076", "amount": "5.50", "currency": "USD", "amount_local": "5.50", "currency_local": "USD", "provider": "USPS", "servicelevel_name": "Priority Mail", "servicelevel_token": "usps_priority", "carrier_account": "078870331023437cb917f5187429b093", }, "tracking_number": "ZW70QJC", "tracking_status": { "object_created": "2013-12-27T23:17:41.411Z", "object_id": "a21b3d6831c14ceaba6730179ce6e784", "status": "UNKNOWN", "status_details": "", "status_date": "2022-12-28T12:04:04.214Z" }, "tracking_url_provider": "https://tools.usps.com/go/TrackConfirmAction.action?tLabels=ZW70QJC", "eta": "2013-12-30T12:00:00.000Z", "label_url": "https://shippo-delivery.s3.amazonaws.com/96.pdf?Signature=PEdWrp0mFWAGwJp7FW3b%2FeA2eyY%3D&Expires=1385930652&AWSAccessKeyId=AKIAJTHP3LLFMYAWALIA", "commercial_invoice_url": "", "metadata": "", "messages": [] } ``` ## Create a label from selected carriers Creating a `shipment` will generate rates from all carriers connected with your account (including both Shippo carrier accounts and your own carrier accounts). You can modify your API call to return rates from your selected carriers. alt text alt text Follow our guide on [Rate shopping with carriers](/shipments/rate-shopping-with-carriers). # Generate your first label using Postman Source: https://docs.goshippo.com/guides/generate-shipping-label-postman Create your first Shippo shipping label step by step using our Postman collection with video walkthroughs. **Note** If you would prefer to learn how to create your first shipping label using cURL, see our guide to create your [first shipping label](/guides/generate-shipping-label). Use the Shippo API to programmatically create shipping labels from any supported carrier. Follow this guide and videos to learn how to create your first label using our Postman collection. **Note** Before starting this guide, follow the [Authentication guide](/guides/authentication) to generate your API Token. When learning about and testing the Shippo API, we recommend using the [test token](/guides/testing). Using your test token means all the calls you make to the Shippo API are free. ## Introduction To retrieve all available rates and create a shipping label based on one of the rates, you need to follow two simple steps: 1. Create the `Shipment` [object](/api-reference/shipments/create-a-new-shipment), consisting of two `Address` objects (address from and address to) and a `Parcel` object (blue objects below). The Shipment response contains the list of available Rates and their associated object ID. 2. Create the `Transaction` [object](/api-reference/transactions/create-a-shipping-label), i.e. the actual label, for any of the Rates from the Shipment response (green object below). Object Flow Object Flow ## Get started with Postman If you don't already have a Postman account, [create a new account](https://identity.getpostman.com/signup?continue=https%3A%2F%2Fweb.postman.co%2F). To use Postman you will also need to [download Postman](https://www.postman.com/downloads/) or use the [online tool](https://identity.getpostman.com/login?continue=https%3A%2F%2Fweb.postman.co%2F). This is the [link to our Postman collection](https://god.gw.postman.com/run-collection/22332580-e3f0581d-41f8-4c5c-894e-d9e22a87f6a5?action=collection%2Ffork\&source=rip_markdown\&collection-url=entityId%3D22332580-e3f0581d-41f8-4c5c-894e-d9e22a87f6a5%26entityType%3Dcollection%26workspaceId%3Da131fa9b-fc39-440e-93bb-2586e9e1eb93) that you can add to your Postman workspace. This video will help you get started if you're unfamiliar with Postman.