# EasyPost Developer Docs — full text Every EasyPost documentation page concatenated into one document (164 pages). Pages are separated by a --- rule followed by the source URL. To read a single page instead, see https://docs.easypost.com/llms.txt. --- Source: https://docs.easypost.com/docs/addresses # Address `Address` objects represent people, places, and organizations and are used in multiple contexts across the EasyPost API. For example, a `Shipment` requires both a `to_address` and `from_address` to calculate rates and generate postage. Address objects support both domestic and international addresses, identified using ISO 3166 country codes. EasyPost also provides address verification tools to detect deliverability issues, correct minor spelling or formatting errors, and determine whether an address is residential—an important factor in rate calculation for many carriers. --- ## Address object | Property | Type | Description | |----------|------|-------------| | id | string | Unique identifier, begins with "adr_" | | object | string | "Address" | | street1 | string | First line of the address. Note: For U.S. and CA addresses, if street1 exceeds 35 characters, street2 is empty, and the end of street1 contains a recognized unit number format (e.g., “Apt 10”, or “Unit #99833”), the unit number is moved to street2. | | street2 | string | Second line of the address. Note: May be automatically populated if a unit number is moved from street1 during address verification. | | city | string | City the address is located in | | state | string | State or province the address is located in | | zip | string | ZIP or postal code the address is located in | | country | string | ISO 3166 country code for the country the address is located in | | residential | boolean | Whether or not this address would be considered residential | | carrier_facility | string | The specific designation for the address (only relevant if the address is a carrier facility). | | name | string | Name of the person. Both name and company can be included. | | company | string | Name of the organization. Both name and company can be included. | | phone | string | Phone number to reach the person or organization | | email | string | Email to reach the person or organization | | federal_tax_id | string | Federal tax identifier of the person or organization | | state_tax_id | string | State tax identifier of the person or organization | | verifications | Verifications | The result of any verifications requested | Example Object: ```json { "id": "adr_7c2f357c2d1511f087fbac1f6bc539ae", "object": "Address", "created_at": "2025-05-09T20:37:54+00:00", "updated_at": "2025-05-09T20:37:54+00:00", "name": null, "company": "EasyPost", "street1": "417 MONTGOMERY ST", "street2": "FLOOR 5", "city": "SAN FRANCISCO", "state": "CA", "zip": "94104", "country": "US", "phone": "4151234567", "email": null, "mode": "test", "carrier_facility": null, "residential": null, "federal_tax_id": null, "state_tax_id": null, "verifications": {} } ``` --- ## Verifications object | Property | Type | Description | |----------|------|-------------| | zip4 | Verification | Only applicable to US addresses - checks and sets the ZIP+4 | | delivery | Verification | Checks that the address is deliverable and makes minor corrections to spelling or format. US addresses will also have their residential status checked and set. | Example Object: ```json { "zip4": { "success": true, "errors": [], "details": null }, "delivery": { "success": true, "errors": [], "details": { "latitude": 37.79342, "longitude": -122.40288, "time_zone": "America/Los_Angeles" } } } ``` --- ## Verification object | Property | Type | Description | |----------|------|-------------| | success | boolean | The success of the verification | | errors | AddressVerificationFieldError array | All errors that caused the verification to fail | | details | VerificationDetails | Extra data related to the verification | Example Object: ```json { "success": true, "errors": [], "details": { "latitude": 37.79342, "longitude": -122.40288, "time_zone": "America/Los_Angeles" } } ``` --- ## VerificationDetails object | Property | Type | Description | |----------|------|-------------| | latitude | number | The latitude | | longitude | number | The longitude | | time_zone | TZ (string) | The time zone the address is located in, e.g. America/Los_Angeles | Example Object: ```json { "latitude": 37.79342, "longitude": -122.40288, "time_zone": "America/Los_Angeles" } ``` --- ## Address Verification by Country The address verification service supports over 240 countries and territories. Verification levels vary by country. Coverage is continuously expanding to support more global addresses. --- ## Create an Address ### Example: POST /addresses #### cURL ```shell curl -X POST https://api.easypost.com/v2/addresses \ -u "EASYPOST_API_KEY": \ -H 'Content-Type: application/json' \ -d '{ "address": { "street1": "417 MONTGOMERY ST", "street2": "FLOOR 5", "city": "SAN FRANCISCO", "state": "CA", "zip": "94104", "country": "US", "company": "EasyPost", "phone": "415-123-4567" } }' ``` #### Go ```go package example import ( "fmt" "github.com/EasyPost/easypost-go/v6" ) func create() { client := easypost.New("EASYPOST_API_KEY") address, _ := client.CreateAddress( &easypost.Address{ Street1: "417 MONTGOMERY ST", Street2: "FLOOR 5", City: "SAN FRANCISCO", State: "CA", Zip: "94104", Country: "US", Company: "EasyPost", Phone: "415-123-4567", }, &easypost.CreateAddressOptions{}, ) fmt.Println(address) } ``` #### Java ```java package addresses; import com.easypost.exception.EasyPostException; import com.easypost.model.Address; import com.easypost.service.EasyPostClient; import java.util.HashMap; public class Create { public static void main(String[] args) throws EasyPostException { EasyPostClient client = new EasyPostClient("EASYPOST_API_KEY"); HashMap params = new HashMap(); params.put("street1", "417 MONTGOMERY ST"); params.put("street2", "FLOOR 5"); params.put("city", "SAN FRANCISCO"); params.put("state", "CA"); params.put("zip", "94104"); params.put("country", "US"); params.put("company", "EasyPost"); params.put("phone", "415-123-4567"); Address address = client.address.create(params); System.out.println(address); } } ``` #### C# ```csharp using System; using System.Collections.Generic; using System.Threading.Tasks; using EasyPost; using Newtonsoft.Json; namespace EasyPostExamples { public class Examples { public static async Task Main() { var client = new EasyPost.Client(new EasyPost.ClientConfiguration("EASYPOST_API_KEY")); EasyPost.Parameters.Address.Create parameters = new() { Street1 = "417 MONTGOMERY ST", Street2 = "FLOOR 5", City = "SAN FRANCISCO", State = "CA", Zip = "94104", Country = "US", Company = "EasyPost", Phone = "415-123-4567", }; EasyPost.Models.API.Address address = await client.Address.Create(parameters); Console.WriteLine(JsonConvert.SerializeObject(address, Formatting.Indented)); } } } ``` #### Node.js ```javascript const EasyPostClient = require('@easypost/api'); const client = new EasyPostClient('EASYPOST_API_KEY'); (async () => { const address = await client.Address.create({ street1: '417 MONTGOMERY ST', street2: 'FLOOR 5', city: 'SAN FRANCISCO', state: 'CA', zip: '94104', country: 'US', company: 'EasyPost', phone: '415-123-4567', }); console.log(address); })(); ``` #### PHP ```php address->create([ 'street1' => '417 MONTGOMERY ST', 'street2' => 'FLOOR 5', 'city' => 'San Francisco', 'state' => 'CA', 'zip' => '94104', 'country' => 'US', 'company' => 'EasyPost', 'phone' => '415-123-4567' ]); echo $address; ``` #### Python ```python import easypost client = easypost.EasyPostClient("EASYPOST_API_KEY") address = client.address.create( street1="417 MONTGOMERY ST", street2="FLOOR 5", city="SAN FRANCISCO", state="CA", zip="94104", country="US", company="EasyPost", phone="415-123-4567", ) print(address) ``` #### Ruby ```ruby require 'easypost' client = EasyPost::Client.new(api_key: 'EASYPOST_API_KEY') address = client.address.create( street1: '417 MONTGOMERY ST', street2: 'FLOOR 5', city: 'SAN FRANCISCO', state: 'CA', zip: '94104', country: 'US', company: 'EasyPost', phone: '415-123-4567', ) puts address ``` Depending on your use case an `Address` can be used in many different ways. Certain carriers allow rating between two zip codes, but full addresses are required to purchase postage. It is recommended to provide as much information as possible during creation and to reuse these objects whenever possible. `Address` objects can also be created inline while creating another object, for example during `Shipment` creation. [Note: This object is immutable after creation. Review the rendered documentation for details.] --- ### Verify an Address > Important: Address verification is triggered when the `verify` or `verify_strict` parameter is included in the request, **even if the value is `false`**. To prevent verification, omit these parameters entirely. Verifying an `Address` before shipping is a great way to reduce issues with delivery. An address can be verified by including one of the following parameters during creation: - `verify`: Performs standard delivery and ZIP+4 checks. - `verify_strict`: Performs strict verification. If any check fails, the request will return an error. - `verify_carrier`: Allows carrier-grade verification with UPS or FedEx. Must be set to `"ups"` or `"fedex"` and used in combination with `verify` or `verify_strict` (`true`). The most effective time to perform address verification is when the delivery address is entered. If verification fails, request confirmation from the person entering the data, as they may know their address more accurately than the verification process. The examples below demonstrate different verification options, including delivery checks and strict verification. > Note: As of August 25, 2025, EasyPost only abbreviates street names for **USPS** address verification when the validated `street1` field **exceeds 40 characters**. ### Example: Create and Verify #### cURL ```shell curl -X POST https://api.easypost.com/v2/addresses/create_and_verify \ -u "EASYPOST_API_KEY": \ -H 'Content-Type: application/json' \ -d '{ "address": { "street1": "000 unknown street", "city": "Not A City", "state": "ZZ", "zip": "00001", "country": "US", "email": "test@example.com", "phone": "5555555555" } }' ``` #### Go ```go package example import ( "fmt" "github.com/EasyPost/easypost-go/v6" ) func createAndVerify() { client := easypost.New("EASYPOST_API_KEY") address, _ := client.CreateAndVerifyAddress( &easypost.Address{ Street1: "000 unknown street", City: "Not A City", State: "ZZ", Zip: "00001", Country: "US", Email: "test@example.com", Phone: "5555555555", }, &easypost.CreateAddressOptions{}, ) fmt.Println(address) } ``` #### Java ```java package addresses; import com.easypost.exception.EasyPostException; import com.easypost.model.Address; import com.easypost.service.EasyPostClient; import java.util.HashMap; public class CreateAndVerify { public static void main(String[] args) throws EasyPostException { EasyPostClient client = new EasyPostClient("EASYPOST_API_KEY"); HashMap params = new HashMap(); params.put("street1", "000 unknown street"); params.put("city", "Not A City"); params.put("state", "ZZ"); params.put("zip", "00001"); params.put("country", "US"); params.put("email", "test@example.com"); params.put("phone", "5555555555"); Address address = client.address.createAndVerify(params); System.out.println(address); } } ``` #### C# ```csharp using System; using System.Collections.Generic; using System.Threading.Tasks; using EasyPost; using Newtonsoft.Json; namespace EasyPostExamples { public class Examples { public static async Task Main() { var client = new EasyPost.Client(new EasyPost.ClientConfiguration("EASYPOST_API_KEY")); EasyPost.Parameters.Address.Create parameters = new() { Street1 = "000 unknown street", City = "Not A City", State = "ZZ", Zip = "00001", Country = "US", Email = "test@example.com", Phone = "5555555555", }; EasyPost.Models.API.Address address = await client.Address.CreateAndVerify(parameters); Console.WriteLine(JsonConvert.SerializeObject(address, Formatting.Indented)); } } } ``` #### Node.js ```javascript const EasyPostClient = require('@easypost/api'); const client = new EasyPostClient('EASYPOST_API_KEY'); (async () => { const address = await client.Address.createAndVerify({ street1: '000 unknown street', city: 'Not A City', state: 'ZZ', zip: '00001', country: 'US', email: 'test@example.com', phone: '5555555555', }); console.log(address); })(); ``` #### PHP ```php address->createAndVerify([ 'street1' => '000 unknown street', 'city' => 'Not a City', 'state' => 'ZZ', 'zip' => '00001', 'country' => 'US', 'email' => 'test@example.com', 'phone' => '5555555555', ]); echo $address; ``` #### Python ```python import easypost client = easypost.EasyPostClient("EASYPOST_API_KEY") address = client.address.create_and_verify( street1="000 unknown street", city="Not A City", state="ZZ", zip="00001", country="US", email="test@example.com", phone="5555555555", ) print(address) ``` #### Ruby ```ruby require 'easypost' client = EasyPost::Client.new(api_key: 'EASYPOST_API_KEY') address = client.address.create_and_verify( street1: '000 unknown street', city: 'Not A City', state: 'ZZ', zip: '00001', country: 'US', email: 'test@example.com', phone: '5555555555', ) puts address ``` ### Example: Verifying an Address #### cURL ```shell curl -X GET https://api.easypost.com/v2/addresses/adr_.../verify \ -u "EASYPOST_API_KEY": ``` #### Go ```go package example import ( "fmt" "github.com/EasyPost/easypost-go/v6" ) func verify() { client := easypost.New("EASYPOST_API_KEY") address, _ := client.VerifyAddress("adr_...") fmt.Println(address) } ``` #### Java ```java package addresses; import com.easypost.exception.EasyPostException; import com.easypost.model.Address; import com.easypost.service.EasyPostClient; public class Verify { public static void main(String[] args) throws EasyPostException { EasyPostClient client = new EasyPostClient("EASYPOST_API_KEY"); Address address = client.address.verify("adr_..."); System.out.println(address); } } ``` #### C# ```csharp using System; using System.Collections.Generic; using System.Threading.Tasks; using EasyPost; using Newtonsoft.Json; namespace EasyPostExamples { public class Examples { public static async Task Main() { var client = new EasyPost.Client(new EasyPost.ClientConfiguration("EASYPOST_API_KEY")); address = await client.Address.Verify("adr_..."); Console.WriteLine(JsonConvert.SerializeObject(address, Formatting.Indented)); } } } ``` #### Node.js ```javascript const EasyPostClient = require('@easypost/api'); const client = new EasyPostClient('EASYPOST_API_KEY'); (async () => { const address = await client.Address.verifyAddress('adr_...'); console.log(address); })(); ``` #### PHP ```php address->verify('adr_...'); echo $address; ``` #### Python ```python import easypost client = easypost.EasyPostClient("EASYPOST_API_KEY") address = client.address.verify("adr_...") print(address) ``` #### Ruby ```ruby require 'easypost' client = EasyPost::Client.new(api_key: 'EASYPOST_API_KEY') address = client.address.verify('adr_...') puts address ``` ### Example: Strict-Verifying an Address #### cURL ```shell curl -X POST https://api.easypost.com/v2/addresses \ -u "EASYPOST_API_KEY": \ -H 'Content-Type: application/json' \ -d '{ "address": { "street1": "000 unknown street", "city": "Not A City", "state": "ZZ", "zip": "00001", "country": "US", "email": "test@example.com", "phone": "5555555555" }, "verify_strict": true }' ``` #### Go ```go package example import ( "fmt" "github.com/EasyPost/easypost-go/v6" ) func verifyStrictParam() { client := easypost.New("EASYPOST_API_KEY") address, _ := client.CreateAddress( &easypost.Address{ Street1: "000 unknown street", City: "Not A City", State: "ZZ", Zip: "00001", Country: "US", Email: "test@example.com", Phone: "5555555555", }, &easypost.CreateAddressOptions{ VerifyStrict: true, }, ) fmt.Println(address) } ``` #### Java ```java package addresses; import com.easypost.exception.EasyPostException; import com.easypost.model.Address; import com.easypost.service.EasyPostClient; import java.util.HashMap; public class VerifyStrictParam { public static void main(String[] args) throws EasyPostException { EasyPostClient client = new EasyPostClient("EASYPOST_API_KEY"); HashMap params = new HashMap(); params.put("street1", "000 unknown street"); params.put("city", "Not A City"); params.put("state", "ZZ"); params.put("zip", "00001"); params.put("country", "US"); params.put("email", "test@example.com"); params.put("phone", "5555555555"); params.put("verify_strict", true); Address address = client.address.create(params); System.out.println(address); } } ``` #### C# ```csharp using System; using System.Collections.Generic; using System.Threading.Tasks; using EasyPost; using Newtonsoft.Json; namespace EasyPostExamples { public class Examples { public static async Task Main() { var client = new EasyPost.Client(new EasyPost.ClientConfiguration("EASYPOST_API_KEY")); EasyPost.Parameters.Address.Create parameters = new() { Street1 = "000 unknown street", City = "Not A City", State = "ZZ", Zip = "00001", Country = "US", Email = "test@example.com", Phone = "5555555555", VerifyStrict = true }; EasyPost.Models.API.Address address = await client.Address.Create(parameters); Console.WriteLine(JsonConvert.SerializeObject(address, Formatting.Indented)); } } } ``` #### Node.js ```javascript const EasyPostClient = require('@easypost/api'); const client = new EasyPostClient('EASYPOST_API_KEY'); (async () => { const address = await client.Address.create({ verify_strict: true, street1: '000 unknown street', city: 'Not A City', state: 'ZZ', zip: '00001', country: 'US', email: 'test@example.com', phone: '5555555555', }); console.log(address); })(); ``` #### PHP ```php address->create([ 'verify_strict' => true, 'street1' => '000 unknown street', 'city' => 'Not a City', 'state' => 'ZZ', 'zip' => '00001', 'country' => 'US', 'email' => 'test@example.com', 'phone' => '5555555555', ]); echo $address; ``` #### Python ```python import easypost client = easypost.EasyPostClient("EASYPOST_API_KEY") address = client.address.create( verify_strict=True, street1="000 unknown street", city="Not A City", state="ZZ", zip="00001", country="US", email="test@example.com", phone="5555555555", ) print(address) ``` #### Ruby ```ruby require 'easypost' client = EasyPost::Client.new(api_key: 'EASYPOST_API_KEY') address = client.address.create( verify_strict: true, street1: '000 unknown street', city: 'Not A City', state: 'ZZ', zip: '00001', country: 'US', email: 'test@example.com', phone: '5555555555', ) puts address ``` ### Example: Verify an Existing Address #### cURL ```shell curl -X POST https://api.easypost.com/v2/addresses \ -u "EASYPOST_API_KEY": \ -H 'Content-Type: application/json' \ -d '{ "address": { "street1": "000 unknown street", "city": "Not A City", "state": "ZZ", "zip": "00001", "country": "US", "email": "test@example.com", "phone": "5555555555" }, "verify": true }' ``` #### Go ```go package example import ( "fmt" "github.com/EasyPost/easypost-go/v6" ) func verifyParam() { client := easypost.New("EASYPOST_API_KEY") address, _ := client.CreateAddress( &easypost.Address{ Street1: "000 unknown street", City: "Not A City", State: "ZZ", Zip: "00001", Country: "US", Email: "test@example.com", Phone: "5555555555", }, &easypost.CreateAddressOptions{ Verify: true, }, ) fmt.Println(address) } ``` #### Java ```java package addresses; import com.easypost.exception.EasyPostException; import com.easypost.model.Address; import com.easypost.service.EasyPostClient; import java.util.HashMap; public class VerifyParam { public static void main(String[] args) throws EasyPostException { EasyPostClient client = new EasyPostClient("EASYPOST_API_KEY"); HashMap params = new HashMap(); params.put("street1", "000 unknown street"); params.put("city", "Not A City"); params.put("state", "ZZ"); params.put("zip", "00001"); params.put("country", "US"); params.put("email", "test@example.com"); params.put("phone", "5555555555"); params.put("verify", true); Address address = client.address.create(params); System.out.println(address); } } ``` #### C# ```csharp using System; using System.Collections.Generic; using System.Threading.Tasks; using EasyPost; using Newtonsoft.Json; namespace EasyPostExamples { public class Examples { public static async Task Main() { var client = new EasyPost.Client(new EasyPost.ClientConfiguration("EASYPOST_API_KEY")); EasyPost.Parameters.Address.Create parameters = new() { Street1 = "000 unknown street", City = "Not A City", State = "ZZ", Zip = "00001", Country = "US", Email = "test@example.com", Phone = "5555555555", Verify = true }; EasyPost.Models.API.Address address = await client.Address.Create(parameters); Console.WriteLine(JsonConvert.SerializeObject(address, Formatting.Indented)); } } } ``` #### Node.js ```javascript const EasyPostClient = require('@easypost/api'); const client = new EasyPostClient('EASYPOST_API_KEY'); (async () => { const address = await client.Address.create({ verify: true, street1: '000 unknown street', city: 'Not A City', state: 'ZZ', zip: '00001', country: 'US', email: 'test@example.com', phone: '5555555555', }); console.log(address); })(); ``` #### PHP ```php address->create([ 'verify' => true, 'street1' => '000 unknown street', 'city' => 'Not a City', 'state' => 'ZZ', 'zip' => '00001', 'country' => 'US', 'email' => 'test@example.com', 'phone' => '5555555555', ]); echo $address; ``` #### Python ```python import easypost client = easypost.EasyPostClient("EASYPOST_API_KEY") address = client.address.create( verify=True, street1="000 unknown street", city="Not A City", state="ZZ", zip="00001", country="US", email="test@example.com", phone="5555555555", ) print(address) ``` #### Ruby ```ruby require 'easypost' client = EasyPost::Client.new(api_key: 'EASYPOST_API_KEY') address = client.address.create( verify: true, street1: '000 unknown street', city: 'Not A City', state: 'ZZ', zip: '00001', country: 'US', email: 'test@example.com', phone: '5555555555', ) puts address ``` --- ## Retrieve all Addresses ### Example: GET /addresses #### cURL ```shell curl -X GET "https://api.easypost.com/v2/addresses?page_size=5" \ -u "EASYPOST_API_KEY": ``` #### Go ```go package example import ( "fmt" "github.com/EasyPost/easypost-go/v6" ) func list() { client := easypost.New("EASYPOST_API_KEY") addresses, _ := client.ListAddresses( &easypost.ListOptions{ PageSize: 5, }, ) fmt.Println(addresses) } ``` #### Java ```java package addresses; import com.easypost.exception.EasyPostException; import com.easypost.model.AddressCollection; import com.easypost.service.EasyPostClient; import java.util.HashMap; public class All { public static void main(String[] args) throws EasyPostException { EasyPostClient client = new EasyPostClient("EASYPOST_API_KEY"); HashMap params = new HashMap<>(); params.put("page_size", 5); AddressCollection addresses = client.address.all(params); System.out.println(addresses); } } ``` #### C# ```csharp using System; using System.Collections.Generic; using System.Threading.Tasks; using EasyPost; using Newtonsoft.Json; namespace EasyPostExamples { public class Examples { public static async Task Main() { var client = new EasyPost.Client(new EasyPost.ClientConfiguration("EASYPOST_API_KEY")); EasyPost.Parameters.Address.All parameters = new() { PageSize = 5 }; EasyPost.Models.API.AddressCollection addressCollection = await client.Address.All(parameters); Console.WriteLine(JsonConvert.SerializeObject(addressCollection, Formatting.Indented)); } } } ``` #### Node.js ```javascript const EasyPostClient = require('@easypost/api'); const client = new EasyPostClient('EASYPOST_API_KEY'); (async () => { const addresses = await client.Address.all({ page_size: 5, }); console.log(addresses); })(); ``` #### PHP ```php address->all([ 'page_size' => 5 ]); echo $addresses; ``` #### Python ```python import easypost client = easypost.EasyPostClient("EASYPOST_API_KEY") addresses = client.address.all(page_size=5) print(addresses) ``` #### Ruby ```ruby require 'easypost' client = EasyPost::Client.new(api_key: 'EASYPOST_API_KEY') addresses = client.address.all( page_size: 5, ) puts addresses ``` A list of all `Address` objects associated with the given `API Key` can also be retrieved. See the Pagination section of our docs for more details on retrieving all records when multiple pages are available. --- ## Retrieve an Address ### Example: GET /addresses/:id #### cURL ```shell curl -X GET https://api.easypost.com/v2/addresses/adr_... \ -u "EASYPOST_API_KEY": ``` #### Go ```go package example import ( "fmt" "github.com/EasyPost/easypost-go/v6" ) func retrieve() { client := easypost.New("EASYPOST_API_KEY") address, _ := client.GetAddress("adr_...") fmt.Println(address) } ``` #### Java ```java package addresses; import com.easypost.exception.EasyPostException; import com.easypost.model.Address; import com.easypost.service.EasyPostClient; public class Retrieve { public static void main(String[] args) throws EasyPostException { EasyPostClient client = new EasyPostClient("EASYPOST_API_KEY"); Address address = client.address.retrieve("adr_..."); System.out.println(address); } } ``` #### C# ```csharp using System; using System.Collections.Generic; using System.Threading.Tasks; using EasyPost; using Newtonsoft.Json; namespace EasyPostExamples { public class Examples { public static async Task Main() { var client = new EasyPost.Client(new EasyPost.ClientConfiguration("EASYPOST_API_KEY")); EasyPost.Models.API.Address address = await client.Address.Retrieve("adr_..."); Console.WriteLine(JsonConvert.SerializeObject(address, Formatting.Indented)); } } } ``` #### Node.js ```javascript const EasyPostClient = require('@easypost/api'); const client = new EasyPostClient('EASYPOST_API_KEY'); (async () => { const address = await client.Address.retrieve('adr_...'); console.log(address); })(); ``` #### PHP ```php address->retrieve('adr_...'); echo $address; ``` #### Python ```python import easypost client = easypost.EasyPostClient("EASYPOST_API_KEY") address = client.address.retrieve("adr_...") print(address) ``` #### Ruby ```ruby require 'easypost' client = EasyPost::Client.new(api_key: 'EASYPOST_API_KEY') address = client.address.retrieve('adr_...') puts address ``` An `Address` can be retrieved by its `id`. --- Source: https://docs.easypost.com/docs/api-keys # API Keys When performing operations on `API Keys` for a specific user, you must be authenticated using a Production API Key. --- ## API Keys object | Property | Type | Description | |----------|------|-------------| | id | string | The ID of the authenticated User making the request | | children | API Keys array | A list of all Child Users presented with ONLY id, children, and keys | | keys | API Keys array | The list of all API keys active for an account, both for "test" and "production" modes. | Example Object: ```json { "id": "user_060ab38db3c04ffaa60f262e5781a9be", "keys": [ { "object": "ApiKey", "active": true, "key": "", "mode": "test", "created_at": "2022-10-14T17:23:58Z", "id": "ak_eb495dfd453647749dc6471290b33685" }, { "object": "ApiKey", "active": true, "key": "", "mode": "production", "created_at": "2022-10-14T17:23:58Z", "id": "ak_6f4eae3909464f3f807b3af2a687c85b" } ], "children": [ { "id": "user_0ae8cb7000a1438c8598fa5786fdae84", "keys": [ { "object": "ApiKey", "active": true, "key": "", "mode": "test", "created_at": "2022-10-17T17:28:30Z", "id": "ak_3b56830ab851496f946c368cb001c3f4" }, { "object": "ApiKey", "active": true, "key": "", "mode": "production", "created_at": "2022-10-17T17:28:30Z", "id": "ak_e5020ebb06b84733891c0e0e5ce25b27" } ], "children": [] } ] } ``` --- ## API Key object | Property | Type | Description | |----------|------|-------------| | id | string | The ID of the API Key | | object | string | "ApiKey" | | mode | string | "test" or "production" | | key | string | The actual key value to use for authentication | | created_at | datetime | When the API Key was created | | active | boolean | Whether or not the API Key is active | Example Object: ```json { "object": "ApiKey", "active": true, "key": "", "mode": "test", "created_at": "2022-10-14T17:23:58Z", "id": "ak_eb495dfd453647749dc6471290b33685" } ``` --- **Production Only** ## Create an API Key ### Example: POST /api_keys #### cURL ```shell curl -X POST https://api.easypost.com/v2/api_keys \ -u "EASYPOST_API_KEY": \ -H 'Content-Type: application/json' \ -d '{ "mode": "test" }' ``` #### Go ```go package example import ( "fmt" "github.com/EasyPost/easypost-go/v6" ) func create() { client := easypost.New("EASYPOST_API_KEY") apiKey, _ := client.CreateAPIKey("test") fmt.Println(apiKey) } ``` #### Java ```java package api_keys; import com.easypost.exception.EasyPostException; import com.easypost.model.ApiKey; import com.easypost.service.EasyPostClient; public class Create { public static void main(String[] args) throws EasyPostException { EasyPostClient client = new EasyPostClient("EASYPOST_API_KEY"); ApiKey apiKey = client.apiKey.create("test"); System.out.println(apiKey); } } ``` #### C# ```csharp using System; using System.Threading.Tasks; using EasyPost; using EasyPost.Models.API; using Newtonsoft.Json; namespace EasyPostExamples { public class Examples { public static async Task Main() { var client = new EasyPost.Client(new EasyPost.ClientConfiguration("EASYPOST_API_KEY")); ApiKey apiKey = await client.ApiKey.Create("test"); Console.WriteLine(JsonConvert.SerializeObject(apiKey, Formatting.Indented)); } } } ``` #### Node.js ```javascript const EasyPostClient = require('@easypost/api'); const client = new EasyPostClient('EASYPOST_API_KEY'); (async () => { const apiKey = await client.ApiKey.create('test'); console.log(apiKey); })(); ``` #### PHP ```php apiKeys->create('test'); echo $apiKey; ``` #### Python ```python import easypost client = easypost.EasyPostClient("EASYPOST_API_KEY") api_key = client.api_keys.create(mode="test") print(api_key) ``` #### Ruby ```ruby require 'easypost' client = EasyPost::Client.new(api_key: 'EASYPOST_API_KEY') api_key = client.api_key.create('test') puts api_key ``` **Important**: This endpoint only works for `ReferralCustomers` or to manage Child `User`accounts. If you feel this is applicable for your use case, please contact sales. Both Production and Test API Keys can be created for a `User` and all of its children. If the request is authenticated as a Child `User`, only the API Keys for that Child `User` will be created. --- **Production Only** ## Disable an API Key ### Example: POST /api_keys/:id/disable #### cURL ```shell curl -X POST https://api.easypost.com/v2/api_keys/ak_.../disable \ -u "EASYPOST_API_KEY": ``` #### Go ```go package example import ( "fmt" "github.com/EasyPost/easypost-go/v6" ) func disable() { client := easypost.New("EASYPOST_API_KEY") apiKey, _ := client.DisableAPIKey("ak_...") fmt.Println(apiKey) } ``` #### Java ```java package api_keys; import com.easypost.exception.EasyPostException; import com.easypost.model.ApiKey; import com.easypost.service.EasyPostClient; public class Disable { public static void main(String[] args) throws EasyPostException { EasyPostClient client = new EasyPostClient("EASYPOST_API_KEY"); ApiKey apiKey = client.apiKey.disable("ak_..."); System.out.println(apiKey); } } ``` #### C# ```csharp using System; using System.Threading.Tasks; using EasyPost; using EasyPost.Models.API; using Newtonsoft.Json; namespace EasyPostExamples { public class Examples { public static async Task Main() { var client = new EasyPost.Client(new EasyPost.ClientConfiguration("EASYPOST_API_KEY")); ApiKey apiKey = await client.ApiKey.Disable("ak_..."); Console.WriteLine(JsonConvert.SerializeObject(apiKey, Formatting.Indented)); } } } ``` #### Node.js ```javascript const EasyPostClient = require('@easypost/api'); const client = new EasyPostClient('EASYPOST_API_KEY'); (async () => { const apiKey = await client.ApiKey.disable('ak_...'); console.log(apiKey); })(); ``` #### PHP ```php apiKeys->disable('ak_...'); echo $apiKey; ``` #### Python ```python import easypost client = easypost.EasyPostClient("EASYPOST_API_KEY") api_key = client.api_keys.disable("ak_...") print(api_key) ``` #### Ruby ```ruby require 'easypost' client = EasyPost::Client.new(api_key: 'EASYPOST_API_KEY') api_key = client.api_key.disable('ak_...') puts api_key ``` **Important**: This endpoint only works for `ReferralCustomers` or to manage Child `User`accounts. If you feel this is applicable for your use case, please contact sales. Disabling an `API Key` immediately renders it unusable. You can disable Production and Test API Keys, but you must use your Production API Key to authenticate. Please exercise caution when disabling `API Keys`. --- **Production Only** ## Enable an API Key ### Example: POST /api_keys/:id/enable #### cURL ```shell curl -X POST https://api.easypost.com/v2/api_keys/ak_.../enable \ -u "EASYPOST_API_KEY": ``` #### Go ```go package example import ( "fmt" "github.com/EasyPost/easypost-go/v6" ) func enable() { client := easypost.New("EASYPOST_API_KEY") apiKey, _ := client.EnableAPIKey("ak_...") fmt.Println(apiKey) } ``` #### Java ```java package api_keys; import com.easypost.exception.EasyPostException; import com.easypost.model.ApiKey; import com.easypost.service.EasyPostClient; public class Enable { public static void main(String[] args) throws EasyPostException { EasyPostClient client = new EasyPostClient("EASYPOST_API_KEY"); ApiKey apiKey = client.apiKey.enable("ak_..."); System.out.println(apiKey); } } ``` #### C# ```csharp using System; using System.Threading.Tasks; using EasyPost; using EasyPost.Models.API; using Newtonsoft.Json; namespace EasyPostExamples { public class Examples { public static async Task Main() { var client = new EasyPost.Client(new EasyPost.ClientConfiguration("EASYPOST_API_KEY")); ApiKey apiKey = await client.ApiKey.Enable("ak_..."); Console.WriteLine(JsonConvert.SerializeObject(apiKey, Formatting.Indented)); } } } ``` #### Node.js ```javascript const EasyPostClient = require('@easypost/api'); const client = new EasyPostClient('EASYPOST_API_KEY'); (async () => { const apiKey = await client.ApiKey.enable('ak_...'); console.log(apiKey); })(); ``` #### PHP ```php apiKeys->enable('ak_...'); echo $apiKey; ``` #### Python ```python import easypost client = easypost.EasyPostClient("EASYPOST_API_KEY") api_key = client.api_keys.enable("ak_...") print(api_key) ``` #### Ruby ```ruby require 'easypost' client = EasyPost::Client.new(api_key: 'EASYPOST_API_KEY') api_key = client.api_key.enable('ak_...') puts api_key ``` **Important**: This endpoint only works for `ReferralCustomers` or to manage Child `User`accounts. If you feel this is applicable for your use case, please contact sales. You can enable an `API Key` if it is disabled. --- **Production Only** ## Retrieve an API Key ### Example: GET /api_keys #### cURL ```shell curl -X GET https://api.easypost.com/v2/api_keys \ -u "EASYPOST_API_KEY": ``` #### Go ```go package example import ( "fmt" "github.com/EasyPost/easypost-go/v6" ) func retrieve() { client := easypost.New("EASYPOST_API_KEY") // Retrieve all API keys including children apiKeys, _ := client.GetAPIKeys() fmt.Println(apiKeys) // Retrieve API keys for a specific child user childAPIKeys, _ := client.GetAPIKeysForUser("user_...") fmt.Println(childAPIKeys) } ``` #### Java ```java package api_keys; import com.easypost.exception.EasyPostException; import com.easypost.model.ApiKeys; import com.easypost.service.EasyPostClient; public class Retrieve { public static void main(String[] args) throws EasyPostException { EasyPostClient client = new EasyPostClient("EASYPOST_API_KEY"); // Retrieve all API keys including children ApiKeys parentKeys = client.apiKey.all(); System.out.println(parentKeys); // Retrieve API keys for a specific child user ApiKeys childKeys = client.apiKey.retrieveApiKeysForUser("user_..."); System.out.println(childKeys); } } ``` #### C# ```csharp using System; using System.Collections.Generic; using System.Threading.Tasks; using EasyPost; using Newtonsoft.Json; namespace EasyPostExamples { public class Examples { public static async Task Main() { var client = new EasyPost.Client(new EasyPost.ClientConfiguration("EASYPOST_API_KEY")); // Retrieve all API keys including children List apiKeys = await client.ApiKey.All(); Console.WriteLine(JsonConvert.SerializeObject(apiKeys, Formatting.Indented)); // Retrieve API keys for a specific child user List childApiKeys = await client.ApiKey.RetrieveApiKeysForUser("user_..."); Console.WriteLine(JsonConvert.SerializeObject(childApiKeys, Formatting.Indented)); } } } ``` #### Node.js ```javascript const EasyPostClient = require('@easypost/api'); const client = new EasyPostClient('EASYPOST_API_KEY'); (async () => { // Retrieve all API keys including children let apiKeys = await client.ApiKey.all(); console.log(apiKeys); // Retrieve API keys for a specific child user let childApiKeys = await client.ApiKey.retrieveApiKeysForUser('user_...'); console.log(childApiKeys); })(); ``` #### PHP ```php apiKeys->all(); echo $apiKeys; // Retrieve API keys for a specific child user $childApiKeys = $client->apiKeys->retrieveApiKeysForUser('user_...'); echo $childApiKeys; ``` #### Python ```python import easypost client = easypost.EasyPostClient("EASYPOST_API_KEY") # Retrieve all API keys including children api_keys = client.api_keys.all() print(api_keys) # Retrieve API keys for a specific child user child_api_keys = client.api_keys.retrieve_api_keys_for_user("user_...") print(child_api_keys) ``` #### Ruby ```ruby require 'easypost' client = EasyPost::Client.new(api_key: 'EASYPOST_API_KEY') # Retrieve all API keys including children api_keys = client.api_key.all puts api_keys # Retrieve API keys for a specific child user child_api_keys = client.api_key.retrieve_api_keys_for_user('user_...') puts child_api_keys ``` Both Production and Test API Keys will be returned for a `User` and all of its children. If the request is authenticated as a Child `User`, only the API Keys for that Child `User` will be returned. --- **Production Only** ## Delete an API Key ### Example: DELETE /api_keys/:id #### cURL ```shell curl -X DELETE https://api.easypost.com/v2/api_keys/ak_... \ -u "EASYPOST_API_KEY": ``` #### Go ```go package example import ( "fmt" "github.com/EasyPost/easypost-go/v6" ) func delete() { client := easypost.New("EASYPOST_API_KEY") err := client.DeleteAPIKey("ak_...") fmt.Println(err) } ``` #### Java ```java package api_keys; import com.easypost.exception.EasyPostException; import com.easypost.service.EasyPostClient; public class Delete { public static void main(String[] args) throws EasyPostException { EasyPostClient client = new EasyPostClient("EASYPOST_API_KEY"); client.apiKey.delete("ak_..."); } } ``` #### C# ```csharp using System.Threading.Tasks; using EasyPost; namespace EasyPostExamples { public class Examples { public static async Task Main() { var client = new EasyPost.Client(new EasyPost.ClientConfiguration("EASYPOST_API_KEY")); await client.ApiKey.Delete("ak_..."); } } } ``` #### Node.js ```javascript const EasyPostClient = require('@easypost/api'); const client = new EasyPostClient('EASYPOST_API_KEY'); (async () => { await client.ApiKey.delete('ak_...'); })(); ``` #### PHP ```php apiKeys->delete('ak_...'); ``` #### Python ```python import easypost client = easypost.EasyPostClient("EASYPOST_API_KEY") client.api_keys.delete("ak_...") ``` #### Ruby ```ruby require 'easypost' client = EasyPost::Client.new(api_key: 'EASYPOST_API_KEY') client.api_key.delete('ak_...') ``` **Important**: This endpoint only works for `ReferralCustomers` or to manage Child `User`accounts. If you feel this is applicable for your use case, please contact sales. Once an `API Key` is deleted, it cannot be re-enabled, and will no longer be shown in your list of keys. Please exercise caution when deleting `API Key`. --- Source: https://docs.easypost.com/docs/authentication # Authentication The EasyPost API requires secure authentication and careful management of API Keys to access its features. ## API Key Access Before accessing and generating API keys, users must - Set up an EasyPost Wallet - Add a ship-from address These preliminary steps ensures all transactions are tied to a verified location, enhancing security and fraud protection. --- ## Authentication Each request must be authenticated using an API Key, which serves as the Basic Authentication username (no password is required). All communications with the EasyPost API must be secured via TLS v1.2. Improper authentication methods, such as HTTP requests or missing API Keys, will result in request failures. --- ## API Key Types EasyPost offers Test and Production keys: - **Test**: Enables functionality testing at no cost post-signup. - **Production**: Used for live application operations. --- ## API Key Management API Keys can be managed through the EasyPost Dashboard, allowing users to maintain control over their API access. --- ## Security Practices **API Keys should be treated with the same level of security as passwords and kept confidential**. They allow full account access; therefore, exposure to public code or communications should be avoided. A compromised key can be immediately disabled via the API Keys page on the EasyPost Dashboard. --- Source: https://docs.easypost.com/docs/batches # Batch The `Batch` object allows you to perform operations on multiple `Shipments` at once. This includes scheduling a `Pickup`, creating a `ScanForm`, and consolidating labels. Operations performed on `Batches` are asynchronous and take advantage of our webhook infrastructure. --- ## Batch object | Property | Type | Description | |----------|------|-------------| | id | string | Unique, begins with "batch_" | | reference | string | An optional field that may be used in place of ID in some API endpoints | | object | string | "Batch" | | state | string | The overall state. Possible values: "creating" "creation_failed" "created" "purchasing" "purchase_failed" "purchased" "label_generating" "label_generated" | | num_shipments | integer | The number of shipments added | | shipments | BatchShipment array | An array of batch shipments | | status | object | A map of statuses to the count of BatchShipment objects with that status. Valid statuses: "postage_purchased" "postage_purchase_failed" "queued_for_purchase" "creation_failed" | | label_url | string | The label image URL | | scan_form | ScanForm | The created ScanForm | | pickup | Pickup | The created Pickup | | created_at | datetime | When the Batch was created | | updated_at | datetime | When the Batch was last updated | Example Object: ```json { "id": "batch_b148b3715785487597be3f3c56f04884", "object": "Batch", "mode": "test", "state": "creating", "num_shipments": 1, "reference": null, "created_at": "2025-05-09T20:38:21Z", "updated_at": "2025-05-09T20:38:21Z", "scan_form": null, "shipments": [], "status": { "created": 0, "queued_for_purchase": 0, "creation_failed": 0, "postage_purchased": 0, "postage_purchase_failed": 0 }, "pickup": null, "label_url": null } ``` --- ## BatchShipment object | Property | Type | Description | |----------|------|-------------| | id | string | The id of the Shipment. Unique, begins with "shp_" | | reference | string | An optional field that may be used in place of ID in some API endpoints | | batch_status | string | The current status. Possible values are "postage_purchased", "postage_purchase_failed", "queued_for_purchase", and "creation_failed" | | batch_message | string | A human readable message for any errors that occurred during the Batch's life cycle | Example Object: ```json { "batch_status": "created", "batch_message": null, "reference": null, "tracking_code": null, "id": "shp_309a07be648b4df59ee7a85a2c2ed64f" } ``` --- ## Create a Batch ### Example: POST /batches #### cURL ```shell curl -X POST https://api.easypost.com/v2/batches \ -u "EASYPOST_API_KEY": \ -H 'Content-Type: application/json' \ -d '{ "batch": { "shipments": [ { "id": "shp_..." }, { "id": "shp_..." } ] } }' ``` #### Go ```go package example import ( "fmt" "github.com/EasyPost/easypost-go/v6" ) func create() { client := easypost.New("EASYPOST_API_KEY") shipment, _ := client.GetShipment("shp_...") batch, _ := client.CreateBatch(shipment) fmt.Println(batch) } ``` #### Java ```java package batches; import com.easypost.exception.EasyPostException; import com.easypost.model.Batch; import com.easypost.service.EasyPostClient; import java.util.ArrayList; import java.util.HashMap; import java.util.List; public class Create { public static void main(String[] args) throws EasyPostException { EasyPostClient client = new EasyPostClient("EASYPOST_API_KEY"); List> shipmentsList = new ArrayList>(); HashMap shipmentMap = new HashMap(); shipmentMap.put("id", "shp_..."); shipmentsList.add(shipmentMap); HashMap params = new HashMap(); params.put("shipment", shipmentsList); Batch batch = client.batch.create(params); System.out.println(batch); } } ``` #### C# ```csharp using System; using System.Collections.Generic; using System.Threading.Tasks; using EasyPost; using Newtonsoft.Json; namespace EasyPostExamples { public class Examples { public static async Task Main() { var client = new EasyPost.Client(new EasyPost.ClientConfiguration("EASYPOST_API_KEY")); EasyPost.Models.API.Shipment shipment = await client.Shipment.Retrieve("shp_..."); EasyPost.Parameters.Batch.Create parameters = new() { Shipments = new List() { shipment } }; EasyPost.Models.API.Batch batch = await client.Batch.Create(parameters); Console.WriteLine(JsonConvert.SerializeObject(batch, Formatting.Indented)); } } } ``` #### Node.js ```javascript const EasyPostClient = require('@easypost/api'); const client = new EasyPostClient('EASYPOST_API_KEY'); (async () => { const batch = await client.Batch.create({ shipments: [{ id: 'shp_...' }, { id: 'shp_...' }], }); console.log(batch); })(); ``` #### PHP ```php batch->create([ 'shipments' => [ ['id' => 'shp_...'], ['id' => 'shp_...'], ] ]); echo $batch; ``` #### Python ```python import easypost client = easypost.EasyPostClient("EASYPOST_API_KEY") batch = client.batch.create( shipments=[ {"id": "shp_..."}, {"id": "shp_..."}, ], ) print(batch) ``` #### Ruby ```ruby require 'easypost' client = EasyPost::Client.new(api_key: 'EASYPOST_API_KEY') batch = client.batch.create( shipments: [ { id: 'shp_...' }, { id: 'shp_...' }, ], ) puts batch ``` A `Batch` can be created with or without `Shipments`. When created with `Shipments`, the initial `state` will be "creating". Once the `state` changes to "created", a webhook `Event` will be sent. When created with no `Shipments`, the initial state will be "created" and webhook will be sent. > Note: It is recommended to keep each batch under 1,000 shipments. This best practice helps avoid timeout errors during the batch buying process. --- ## Add Shipments to a Batch ### Example: POST /batches/:id/add_shipments #### cURL ```shell curl -X POST https://api.easypost.com/v2/batches/batch_.../add_shipments \ -u "EASYPOST_API_KEY": \ -H 'Content-Type: application/json' \ -d '{ "shipments": [ { "id": "shp_..." }, { "id": "shp_..." } ] }' ``` #### Go ```go package example import ( "fmt" "github.com/EasyPost/easypost-go/v6" ) func addShipments() { client := easypost.New("EASYPOST_API_KEY") shipment, _ := client.GetShipment("shp_...") batch, _ := client.AddShipmentsToBatch("batch_...", shipment) fmt.Println(batch) } ``` #### Java ```java package batches; import com.easypost.exception.EasyPostException; import com.easypost.model.Batch; import com.easypost.service.EasyPostClient; import java.util.ArrayList; import java.util.HashMap; import java.util.List; public class AddShipments { public static void main(String[] args) throws EasyPostException { EasyPostClient client = new EasyPostClient("EASYPOST_API_KEY"); HashMap shipment1 = new HashMap(); shipment1.put("id", "shp_..."); HashMap shipment2 = new HashMap(); shipment2.put("id", "shp_..."); List> shipments = new ArrayList>(); shipments.add(shipment1); shipments.add(shipment2); HashMap params = new HashMap(); params.put("shipments", shipments); Batch batch = client.batch.addShipments("batch_...", params); System.out.println(batch); } } ``` #### C# ```csharp using System; using System.Collections.Generic; using System.Threading.Tasks; using EasyPost; using Newtonsoft.Json; namespace EasyPostExamples { public class Examples { public static async Task Main() { var client = new EasyPost.Client(new EasyPost.ClientConfiguration("EASYPOST_API_KEY")); EasyPost.Models.API.Shipment shipment = await client.Shipment.Retrieve("shp_..."); EasyPost.Parameters.Batch.AddShipments parameters = new() { Shipments = new List { shipment }, }; EasyPost.Models.API.Batch batch = await client.Batch.AddShipments("batch_...", parameters); Console.WriteLine(JsonConvert.SerializeObject(batch, Formatting.Indented)); } } } ``` #### Node.js ```javascript const EasyPostClient = require('@easypost/api'); const client = new EasyPostClient('EASYPOST_API_KEY'); (async () => { const batch = await client.Batch.addShipments('batch_...', ['shp_...', 'shp_...']); console.log(batch); })(); ``` #### PHP ```php batch->addShipments( 'batch_...', [ 'shipments' => [ ['id' => 'shp_...'], ['id' => 'shp_...'], ] ] ); echo $batch; ``` #### Python ```python import easypost client = easypost.EasyPostClient("EASYPOST_API_KEY") batch = client.batch.add_shipments( "batch_...", shipments=[ {"id": "shp_..."}, {"id": "shp_..."}, ], ) print(batch) ``` #### Ruby ```ruby require 'easypost' client = EasyPost::Client.new(api_key: 'EASYPOST_API_KEY') batch = client.batch.add_shipments( 'batch_...', shipments: [ { id: 'shp_...' }, { id: 'shp_...' }, ], ) puts batch ``` Shipments can be added to a `Batch` throughout its life cycle. Just remember that the state change of a `Batch` is asynchronous and will fire a webhook Event when the state change is completed. --- ## Remove Shipments from a Batch ### Example: POST /batches/:id/remove_shipments #### cURL ```shell curl -X POST https://api.easypost.com/v2/batches/batch_.../remove_shipments \ -u "EASYPOST_API_KEY": \ -H 'Content-Type: application/json' \ -d '{ "shipments": [ { "id": "shp_..." } ] }' ``` #### Go ```go package example import ( "fmt" "github.com/EasyPost/easypost-go/v6" ) func removeShipments() { client := easypost.New("EASYPOST_API_KEY") shipment, _ := client.GetShipment("shp_...") batch, _ := client.RemoveShipmentsFromBatch("batch_...", shipment) fmt.Println(batch) } ``` #### Java ```java package batches; import com.easypost.exception.EasyPostException; import com.easypost.model.Batch; import com.easypost.service.EasyPostClient; import java.util.ArrayList; import java.util.HashMap; import java.util.List; public class RemoveShipments { public static void main(String[] args) throws EasyPostException { EasyPostClient client = new EasyPostClient("EASYPOST_API_KEY"); HashMap shipment1 = new HashMap(); shipment1.put("id", "shp_..."); List> shipments = new ArrayList>(); shipments.add(shipment1); HashMap params = new HashMap(); params.put("shipments", shipments); Batch batch = client.batch.removeShipments("batch_...", params); System.out.println(batch); } } ``` #### C# ```csharp using System; using System.Collections.Generic; using System.Threading.Tasks; using EasyPost; using Newtonsoft.Json; namespace EasyPostExamples { public class Examples { public static async Task Main() { var client = new EasyPost.Client(new EasyPost.ClientConfiguration("EASYPOST_API_KEY")); EasyPost.Models.API.Shipment shipment = await client.Shipment.Retrieve("shp_..."); EasyPost.Parameters.Batch.RemoveShipments parameters = new() { Shipments = new List { shipment }, }; EasyPost.Models.API.Batch batch = await client.Batch.RemoveShipments("batch_...", parameters); Console.WriteLine(JsonConvert.SerializeObject(batch, Formatting.Indented)); } } } ``` #### Node.js ```javascript const EasyPostClient = require('@easypost/api'); const client = new EasyPostClient('EASYPOST_API_KEY'); (async () => { const batch = await client.Batch.removeShipments('batch_...', ['shp_...']); console.log(batch); })(); ``` #### PHP ```php batch->removeShipments( 'batch_...', [ 'shipments' => [ ['id' => 'shp_...'] ] ] ); echo $batch; ``` #### Python ```python import easypost client = easypost.EasyPostClient("EASYPOST_API_KEY") batch = client.batch.remove_shipments( "batch_...", shipments=[ { "id": "shp_...", } ], ) print(batch) ``` #### Ruby ```ruby require 'easypost' client = EasyPost::Client.new(api_key: 'EASYPOST_API_KEY') batch = client.batch.remove_shipments( 'batch_...', shipments: [ { id: 'shp_...' }, ], ) puts batch ``` There could be times when a `Shipment` needs to be removed from the `Batch` during its life cycle. Removing a `Shipment` does not remove it from the consolidated label or `ScanForm`. --- ## Buy a Batch ### Example: POST /batches/:id/buy #### cURL ```shell curl -X POST https://api.easypost.com/v2/batches \ -u "EASYPOST_API_KEY": \ -H 'Content-Type: application/json' \ -d '{ "batch": { "shipments": [ "from_address": {"id": "adr_..."}, "to_address": {"id": "adr_..."}, "parcel": {"id": "prcl_..."}, "service": "First", "carrier": "USPS", "carrier_accounts": ["ca_..."] ] } }' curl -X POST https://api.easypost.com/v2/batches/batch_.../buy \ -u "EASYPOST_API_KEY": ``` #### Go ```go package example import ( "fmt" "github.com/EasyPost/easypost-go/v6" ) func buy() { client := easypost.New("EASYPOST_API_KEY") createdBatch, _ := client.CreateBatch( &easypost.Shipment{ FromAddress: &easypost.Address{ ID: "adr_...", }, ToAddress: &easypost.Address{ ID: "adr_...", }, Parcel: &easypost.Parcel{ ID: "prcl_...", }, Service: "First", Carrier: "USPS", CarrierAccountIDs: []string{"ca_..."}, }, ) batch, _ := client.BuyBatch(createdBatch.ID) fmt.Println(batch) } ``` #### Java ```java package batches; import com.easypost.exception.EasyPostException; import com.easypost.model.Batch; import com.easypost.service.EasyPostClient; import java.util.ArrayList; import java.util.HashMap; import java.util.List; public class Buy { public static void main(String[] args) throws EasyPostException { EasyPostClient client = new EasyPostClient("EASYPOST_API_KEY"); List> shipmentsList = new ArrayList>(); HashMap shipmentMap = new HashMap(); HashMap fromAddress = new HashMap(); fromAddress.put("id", "adr_..."); shipmentMap.put("from_address", fromAddress); HashMap toAddress = new HashMap(); toAddress.put("id", "adr_..."); shipmentMap.put("to_address", toAddress); HashMap parcel = new HashMap(); parcel.put("id", "prcl_..."); shipmentMap.put("parcel", parcel); shipmentMap.put("service", "First"); shipmentMap.put("carrier", "USPS"); String[] carrierAccounts = { "ca_..." }; shipmentMap.put("carrier_accounts", carrierAccounts); shipmentsList.add(shipmentMap); HashMap params = new HashMap(); params.put("shipment", shipmentsList); Batch createdBatch = client.batch.create(params); Batch batch = client.batch.buy(createdBatch.getId()); System.out.println(batch); } } ``` #### C# ```csharp using System; using System.Collections.Generic; using System.Threading.Tasks; using EasyPost; using Newtonsoft.Json; namespace EasyPostExamples { public class Examples { public static async Task Main() { var client = new EasyPost.Client(new EasyPost.ClientConfiguration("EASYPOST_API_KEY")); EasyPost.Parameters.Shipment.Create shipmentParameters = new() { ToAddress = new EasyPost.Parameters.Address.Create { Id = "adr_..." }, FromAddress = new EasyPost.Parameters.Address.Create { Id = "adr_..." }, Parcel = new EasyPost.Parameters.Parcel.Create { Id = "prcl_..." }, Service = "First", Carrier = "USPS", CarrierAccountIds = new List { "ca_..." } }; EasyPost.Parameters.Batch.Create parameters = new() { Shipments = new List() { shipmentParameters } }; EasyPost.Models.API.Batch batch = await client.Batch.Create(parameters); EasyPost.Models.API.Batch batch = await client.Batch.Buy(batch.Id); Console.WriteLine(JsonConvert.SerializeObject(batch, Formatting.Indented)); } } } ``` #### Node.js ```javascript const EasyPostClient = require('@easypost/api'); const client = new EasyPostClient('EASYPOST_API_KEY'); (async () => { const createdBatch = await client.Batch.create({ shipments: [ { from_address: { id: 'adr_...' }, to_address: { id: 'adr_...' }, parcel: { id: 'prcl_...' }, service: 'First', carrier: 'USPS', carrier_accounts: ['ca_...'], }, ], }); const batch = await client.Batch.buy(createdBatch.id); console.log(batch); })(); ``` #### PHP ```php batch->create([ 'shipments' => [ ['from_address' => ['id' => 'adr_...']], ['to_address' => ['id' => 'adr_...']], ['parcel' => ['id' => 'prcl_...']], ['service' => 'First'], ['carrier' => 'USPS'], ['carrier_accounts' => ['ca_...']], ] ]); $batch = $client->batch->buy($createdBatch['id']); echo $batch; ``` #### Python ```python import easypost client = easypost.EasyPostClient("EASYPOST_API_KEY") createdBatch = client.batch.create( shipments=[ { "from_address": {"id": "adr_..."}, "to_address": {"id": "adr_..."}, "parcel": {"id": "prcl_..."}, "service": "First", "carrier": "USPS", "carrier_accounts": ["ca_..."], }, ], ) batch = client.batch.buy(createdBatch.id) print(batch) ``` #### Ruby ```ruby require 'easypost' client = EasyPost::Client.new(api_key: 'EASYPOST_API_KEY') created_batch = client.batch.create( shipments: [ { from_address: { id: 'adr_...' }, to_address: { id: 'adr_...' }, parcel: { id: 'prcl_...' }, service: 'First', carrier: 'USPS', carrier_accounts: ['ca_...'], }, ], ) batch = client.batch.buy(created_batch.id) puts batch ``` Once you have added all of your `Shipments` to a `Batch`, issue a buy request to enqueue a background job to purchase the shipments and generate all necessary labels. **Batch Buying Criteria:** To buy a batch, all shipment data must be passed to the batch at the same time the batch is created. Each shipment of a batch **must have** a `from_address`, `to_address`, `parcel`, `service`, `carrier`, and `carrier_accounts` array with the single carrier account ID associated with the service. Purchasing may take anywhere from a few seconds to an hour, depending on the size of the batch, the carrier, and Internet weather. --- ## Batch Labels ### Example: POST /batches/:id/label #### cURL ```shell curl -X POST https://api.easypost.com/v2/batches/batch_.../label \ -u "EASYPOST_API_KEY": \ -H 'Content-Type: application/json' \ -d '{ "file_format": "PDF" }' ``` #### Go ```go package example import ( "fmt" "github.com/EasyPost/easypost-go/v6" ) func label() { client := easypost.New("EASYPOST_API_KEY") batch, _ := client.GetBatchLabels("batch_...", "PDF") fmt.Println(batch) } ``` #### Java ```java package batches; import com.easypost.exception.EasyPostException; import com.easypost.model.Batch; import com.easypost.service.EasyPostClient; import java.util.HashMap; public class Label { public static void main(String[] args) throws EasyPostException { EasyPostClient client = new EasyPostClient("EASYPOST_API_KEY"); HashMap params = new HashMap(); params.put("file_format", "PDF"); Batch batch = client.batch.label("batch_...", params); System.out.println(batch); } } ``` #### C# ```csharp using System; using System.Collections.Generic; using System.Threading.Tasks; using EasyPost; using Newtonsoft.Json; namespace EasyPostExamples { public class Examples { public static async Task Main() { var client = new EasyPost.Client(new EasyPost.ClientConfiguration("EASYPOST_API_KEY")); EasyPost.Parameters.Batch.GenerateLabel parameters = new() { FileFormat = "PDF", }; EasyPost.Models.API.Batch batch = await client.Batch.GenerateLabel("batch_...", parameters); Console.WriteLine(JsonConvert.SerializeObject(batch, Formatting.Indented)); } } } ``` #### Node.js ```javascript const EasyPostClient = require('@easypost/api'); const client = new EasyPostClient('EASYPOST_API_KEY'); (async () => { const batch = await client.Batch.generateLabel('batch_...', 'PDF'); console.log(batch); })(); ``` #### PHP ```php batch->label( 'batch_...', ['file_format' => 'PDF'] ); echo $batchWithLabel; ``` #### Python ```python import easypost client = easypost.EasyPostClient("EASYPOST_API_KEY") batch = client.batch.label("batch_...", file_format="PDF") print(batch) ``` #### Ruby ```ruby require 'easypost' client = EasyPost::Client.new(api_key: 'EASYPOST_API_KEY') batch = client.batch.label( 'batch_...', file_format: 'PDF', ) puts batch ``` One of the advantages of processing `Shipments` in batches is the ability to consolidate the `PostageLabel` into one file. This can only be done once for each batch and all `Shipments` must have a status of "postage_purchased". Available label formats are "PDF", "ZPL" and "EPL2". Like converting a `PostageLabel` format, if this process will change the format of the labels, they must have been created as PNG files. --- ## Manifesting (Scan Form) ### Example: POST /batches/:id/scan_form #### cURL ```shell curl -X POST https://api.easypost.com/v2/batches/batch_.../scan_form \ -u "EASYPOST_API_KEY": ``` #### Go ```go package example import ( "fmt" "github.com/EasyPost/easypost-go/v6" ) func scanForms() { client := easypost.New("EASYPOST_API_KEY") batch, _ := client.CreateBatchScanForms("batch_...", "pdf") fmt.Println(batch) } ``` #### Java ```java package batches; import com.easypost.exception.EasyPostException; import com.easypost.model.Batch; import com.easypost.service.EasyPostClient; public class ScanForms { public static void main(String[] args) throws EasyPostException { EasyPostClient client = new EasyPostClient("EASYPOST_API_KEY"); Batch batch = client.batch.createScanForm("batch_..."); System.out.println(batch); } } ``` #### C# ```csharp using System; using System.Collections.Generic; using System.Threading.Tasks; using EasyPost; using Newtonsoft.Json; namespace EasyPostExamples { public class Examples { public static async Task Main() { var client = new EasyPost.Client(new EasyPost.ClientConfiguration("EASYPOST_API_KEY")); EasyPost.Parameters.Batch.GenerateScanForm parameters = new() { FileFormat = "ZPL", }; EasyPost.Models.API.Batch batch = await client.Batch.GenerateScanForm("batch_...", parameters); Console.WriteLine(JsonConvert.SerializeObject(batch, Formatting.Indented)); } } } ``` #### Node.js ```javascript const EasyPostClient = require('@easypost/api'); const client = new EasyPostClient('EASYPOST_API_KEY'); (async () => { const batch = await client.Batch.createScanForm('batch_...'); console.log(batch); })(); ``` #### PHP ```php batch->createScanForm('batch_...'); echo $batch; ``` #### Python ```python import easypost client = easypost.EasyPostClient("EASYPOST_API_KEY") batch = client.batch.create_scan_form("batch_...") print(batch) ``` #### Ruby ```ruby require 'easypost' client = EasyPost::Client.new(api_key: 'EASYPOST_API_KEY') batch = client.batch.create_scan_form('batch_...') puts batch ``` A `ScanForm` can be created for a `Batch` by its `id`. --- ## Retrieve all Batches ### Example: GET /batches #### cURL ```shell curl -X GET "https://api.easypost.com/v2/batches?page_size=5" \ -u "EASYPOST_API_KEY": ``` #### Go ```go package example import ( "fmt" "github.com/EasyPost/easypost-go/v6" ) func list() { client := easypost.New("EASYPOST_API_KEY") batches, _ := client.ListBatches( &easypost.ListOptions{ PageSize: 5, }, ) fmt.Println(batches) } ``` #### Java ```java package batches; import com.easypost.exception.EasyPostException; import com.easypost.model.BatchCollection; import com.easypost.service.EasyPostClient; import java.util.HashMap; public class All { public static void main(String[] args) throws EasyPostException { EasyPostClient client = new EasyPostClient("EASYPOST_API_KEY"); HashMap params = new HashMap<>(); params.put("page_size", 5); BatchCollection batches = client.batch.all(params); System.out.println(batches); } } ``` #### C# ```csharp using System; using System.Collections.Generic; using System.Threading.Tasks; using EasyPost; using Newtonsoft.Json; namespace EasyPostExamples { public class Examples { public static async Task Main() { var client = new EasyPost.Client(new EasyPost.ClientConfiguration("EASYPOST_API_KEY")); EasyPost.Parameters.Batch.All parameters = new() { PageSize = 5 }; EasyPost.Models.API.BatchCollection batchCollection = await client.Batch.All(parameters); Console.WriteLine(JsonConvert.SerializeObject(batchCollection, Formatting.Indented)); } } } ``` #### Node.js ```javascript const EasyPostClient = require('@easypost/api'); const client = new EasyPostClient('EASYPOST_API_KEY'); (async () => { const batches = await client.Batch.all({ page_size: 5 }); console.log(batches); })(); ``` #### PHP ```php batch->all([ 'page_size' => 5, ]); echo $batches; ``` #### Python ```python import easypost client = easypost.EasyPostClient("EASYPOST_API_KEY") batches = client.batch.all(page_size=5) print(batches) ``` #### Ruby ```ruby require 'easypost' client = EasyPost::Client.new(api_key: 'EASYPOST_API_KEY') batches = client.batch.all( page_size: 5, ) puts batches ``` A list of all `Batch` objects associated with the given `API Key` can also be retrieved. See the Pagination section of our docs for more details on retrieving all records when multiple pages are available. --- ## Retrieve Batch ### Example: GET /batches/:id #### cURL ```shell curl -X GET https://api.easypost.com/v2/batches/batch_... \ -u "EASYPOST_API_KEY": ``` #### Go ```go package example import ( "fmt" "github.com/EasyPost/easypost-go/v6" ) func retrieve() { client := easypost.New("EASYPOST_API_KEY") batch, _ := client.GetBatch("batch_...") fmt.Println(batch) } ``` #### Java ```java package batches; import com.easypost.exception.EasyPostException; import com.easypost.model.Batch; import com.easypost.service.EasyPostClient; public class Retrieve { public static void main(String[] args) throws EasyPostException { EasyPostClient client = new EasyPostClient("EASYPOST_API_KEY"); Batch batch = client.batch.retrieve("batch_..."); System.out.println(batch); } } ``` #### C# ```csharp using System; using System.Collections.Generic; using System.Threading.Tasks; using EasyPost; using Newtonsoft.Json; namespace EasyPostExamples { public class Examples { public static async Task Main() { var client = new EasyPost.Client(new EasyPost.ClientConfiguration("EASYPOST_API_KEY")); Batch batch = await client.Batch.Retrieve("batch_..."); Console.WriteLine(JsonConvert.SerializeObject(batch, Formatting.Indented)); } } } ``` #### Node.js ```javascript const EasyPostClient = require('@easypost/api'); const client = new EasyPostClient('EASYPOST_API_KEY'); (async () => { const batch = await client.Batch.retrieve('batch_...'); console.log(batch); })(); ``` #### PHP ```php batch->retrieve('batch_...'); echo $batch; ``` #### Python ```python import easypost client = easypost.EasyPostClient("EASYPOST_API_KEY") batch = client.batch.retrieve("batch_...") print(batch) ``` #### Ruby ```ruby require 'easypost' client = EasyPost::Client.new(api_key: 'EASYPOST_API_KEY') batch = client.batch.retrieve('batch_...') puts batch ``` A `Batch` can be retrieved by either its `id` or `reference`. However it is recommended to use EasyPost's provided identifiers because uniqueness on `reference` is not enforced. --- Source: https://docs.easypost.com/docs/carrier-accounts # CarrierAccount A `CarrierAccount` encapsulates your credentials with the carrier. The `CarrierAccount` object provides CRUD operations for all `CarrierAccounts`. Each EasyPost account is automatically provided a USPS account managed by EasyPost. Other operations, such as `Shipment` creation, can reference `CarrierAccounts` to reduce the scope of data returned. For instance, you may have multiple warehouses that need to use distinct FedEx SmartPost credentials to request the correct rates. `Rate` objects will include a `carrier_account_id` field which can be used to determine the account used for rating. --- ## CarrierAccount object | Property | Type | Description | |----------|------|-------------| | id | string | Unique, begins with "ca_" | | object | string | "CarrierAccount" | | type | string | The name of the CarrierType | | fields | Fields object | Contains credentials and/or test_credentials, or may be empty | | clone | boolean | If true, only the reference and description are possible to update | | description | string | An optional, user-readable field to help distinguish accounts | | reference | string | An optional field that may be used in place of carrier_account_id in other API endpoints | | readable | string | The name used when displaying a readable value for the type of the account | | credentials | object | Unlike the credentials object contained in fields , this nullable object contains just raw credential pairs for client library consumption. | | test_credentials | object | Unlike the test_credentials object contained in fields , this nullable object contains just raw test_credential pairs for client library consumption. | | billing_type | string | Billing type of the carrier account | | created_at | datetime | When the CarrierAccount was created | | updated_at | datetime | When the CarrierAccount was last updated | Example Object: ```json { "id": "ca_a2cb50e6c5c3451586b3a507db5f163a", "object": "CarrierAccount", "type": "DhlEcsAccount", "clone": false, "created_at": "2025-05-09T20:39:13Z", "updated_at": "2025-05-09T20:39:13Z", "description": "CA Location DHL eCommerce Solutions Account", "reference": null, "billing_type": "carrier", "readable": "DHL eCommerce", "logo": null, "fields": { "credentials": { "client_id": { "visibility": "visible", "label": "DHL eCommerce client ID", "value": "123456" }, "client_secret": { "visibility": "password", "label": "DHL eCommerce client secret", "value": "********" }, "pickup_id": { "visibility": "visible", "label": "DHL eCommerce pickup ID", "value": "123456" }, "distribution_center": { "visibility": "visible", "label": "DHL eCommerce distribution center", "value": "USLAX1" } }, "test_credentials": { "client_id": { "visibility": "visible", "label": "Test DHL eCommerce client ID", "value": "123456" }, "client_secret": { "visibility": "password", "label": "Test DHL eCommerce client secret", "value": "********" }, "pickup_id": { "visibility": "visible", "label": "Test DHL eCommerce pickup ID", "value": "123456" }, "distribution_center": { "visibility": "visible", "label": "Test DHL eCommerce distribution center", "value": "USLAX1" } } }, "credentials": { "client_id": "123456", "client_secret": "********", "pickup_id": "123456", "distribution_center": "USLAX1" }, "test_credentials": { "client_id": "123456", "client_secret": "********", "pickup_id": "123456", "distribution_center": "USLAX1" } } ``` --- ## Fields object | Property | Type | Description | |----------|------|-------------| | credentials | dictionary of string- Field pairs | Credentials used in the production environment. Each key represents a carrier-specific credentials field name. | | test_credentials | dictionary of string- Field pairs | Credentials used in the test environment. Each key represents a carrier-specific credentials field name. | | auto_link | boolean | For USPS, this designates that no credentials are required. | | custom_workflow | boolean | When present, a separate authentication process will be required through the UI to link this account type. | Example Object: ```json { "credentials": { "client_id": { "visibility": "visible", "label": "DHL eCommerce client ID", "value": "123456" }, "client_secret": { "visibility": "password", "label": "DHL eCommerce client secret", "value": "********" }, "pickup_id": { "visibility": "visible", "label": "DHL eCommerce pickup ID", "value": "123456" }, "distribution_center": { "visibility": "visible", "label": "DHL eCommerce distribution center", "value": "USLAX1" } }, "test_credentials": { "client_id": { "visibility": "visible", "label": "Test DHL eCommerce client ID", "value": "123456" }, "client_secret": { "visibility": "password", "label": "Test DHL eCommerce client secret", "value": "********" }, "pickup_id": { "visibility": "visible", "label": "Test DHL eCommerce pickup ID", "value": "123456" }, "distribution_center": { "visibility": "visible", "label": "Test DHL eCommerce distribution center", "value": "USLAX1" } } } ``` --- ## Field object | Property | Type | Description | |----------|------|-------------| | visibility | string | The visibility value is used to control form field types. Discussed in the CarrierType section | | label | string | The label value is used in form rendering to display a more precise field name | | value | string | Checkbox fields use "0" and "1" as false and true, respectively. All other field types present plaintext, partly-masked, or masked credential data for reference. | Example Object: ```json { "visibility": "visible", "label": "DHL eCommerce client ID", "value": "123456" } ``` --- **Production Only** ## Create a CarrierAccount ### Example: POST /carrier_accounts #### cURL ```shell curl -X POST https://api.easypost.com/v2/carrier_accounts \ -u "EASYPOST_API_KEY": \ -H 'Content-Type: application/json' \ -d '{ "carrier_account": { "type": "DhlEcsAccount", "description": "CA Location DHL eCommerce Solutions Account", "reference": "my-reference", "credentials": { "client_id": "123456", "client_secret": "123abc", "distribution_center": "USLAX1", "pickup_id": "123456" }, "test_credentials": { "client_id": "123456", "client_secret": "123abc", "distribution_center": "USLAX1", "pickup_id": "123456" } } }' ``` #### Go ```go package example import ( "fmt" "github.com/EasyPost/easypost-go/v6" ) func create() { client := easypost.New("EASYPOST_API_KEY") carrierAccount, _ := client.CreateCarrierAccount( &easypost.CarrierAccount{ Type: "DhlEcsAccount", Description: "CA Location DHL eCommerce Solutions Account", Credentials: map[string]string{ "client_id": "123456", "client_secret": "123abc", "distribution_center": "USLAX1", "pickup_id": "123456", }, TestCredentials: map[string]string{ "client_id": "123456", "client_secret": "123abc", "distribution_center": "USLAX1", "pickup_id": "123456", }, }, ) fmt.Println(carrierAccount) // For UPS account creation, please use below method instead createUpsParameters := &easypost.UpsCarrierAccountCreationParameters{ AccountNumber: "123456789", Type: "UpsAccount", } carrierAccount, _ = client.CreateUpsCarrierAccount(createUpsParameters) fmt.Println(carrierAccount) } ``` #### Java ```java package carrier_accounts; import com.easypost.exception.EasyPostException; import com.easypost.model.CarrierAccount; import com.easypost.service.EasyPostClient; import java.util.HashMap; public class Create { public static void main(String[] args) throws EasyPostException { EasyPostClient client = new EasyPostClient("EASYPOST_API_KEY"); HashMap credentials = new HashMap(); credentials.put("client_id", "123456"); credentials.put("client_secret", "123abc"); credentials.put("distribution_center", "USLAX1"); credentials.put("pickup_id", "123456"); HashMap testCredentials = new HashMap(); testCredentials.put("client_id", "123456"); testCredentials.put("client_secret", "123abc"); testCredentials.put("distribution_center", "USLAX1"); testCredentials.put("pickup_id", "123456"); HashMap params = new HashMap(); params.put("type", "DhlEcsAccount"); params.put("description", "CA Location DHL eCommerce Solutions Account"); params.put("credentials", credentials); params.put("test_credentials", testCredentials); CarrierAccount carrierAccount = client.carrierAccount.create(params); System.out.println(carrierAccount); } } ``` #### C# ```csharp using System; using System.Collections.Generic; using System.Threading.Tasks; using EasyPost; using Newtonsoft.Json; namespace EasyPostExamples { public class Examples { public static async Task Main() { var client = new EasyPost.Client(new EasyPost.ClientConfiguration("EASYPOST_API_KEY")); EasyPost.Parameters.CarrierAccount.Create parameters = new() { Type = "DhlEcsAccount", Description = "CA Location DHL eCommerce Solutions Account", Credentials = new() { { "client_id", "123456" }, { "client_secret", "123abc" }, { "distribution_center", "USLAX1" }, { "pickup_id", "123456" } }, TestCredentials = new() { { "client_id", "123456" }, { "client_secret", "123abc" }, { "distribution_center", "USLAX1" }, { "pickup_id", "123456" } } }; EasyPost.Models.API.CarrierAccount carrierAccount = await client.CarrierAccount.Create(parameters); Console.WriteLine(JsonConvert.SerializeObject(carrierAccount, Formatting.Indented)); } } } ``` #### Node.js ```javascript const EasyPostClient = require('@easypost/api'); const client = new EasyPostClient('EASYPOST_API_KEY'); (async () => { const carrierAccount = await client.CarrierAccount.create({ type: 'DhlEcsAccount', description: 'CA Location DHL eCommerce Solutions Account', credentials: { client_id: '123456', client_secret: '123abc', distribution_center: 'USLAX1', pickup_id: '123456', }, test_credentials: { client_id: '123456', client_secret: '123abc', distribution_center: 'USLAX1', pickup_id: '123456', }, }); console.log(carrierAccount); })(); ``` #### PHP ```php carrierAccount->create([ 'type' => 'DhlEcsAccount', 'description' => 'CA Location DHL eCommerce Solutions Account', 'credentials' => [ 'client_id' => '123456', 'client_secret' => '123abc', 'distribution_center' => 'USLAX1', 'pickup_id' => '123456' ], 'test_credentials' => [ 'client_id' => '123456', 'client_secret' => '123abc', 'distribution_center' => 'USLAX1', 'pickup_id' => '123456' ] ]); echo $carrierAccount; ``` #### Python ```python import easypost client = easypost.EasyPostClient("EASYPOST_API_KEY") carrier_account = client.carrier_account.create( type="DhlEcsAccount", description="CA Location DHL eCommerce Solutions Account", credentials={ "client_id": "123456", "client_secret": "123abc", "distribution_center": "USLAX1", "pickup_id": "123456", }, test_credentials={ "client_id": "123456", "client_secret": "123abc", "distribution_center": "USLAX1", "pickup_id": "123456", }, ) print(carrier_account) ``` #### Ruby ```ruby require 'easypost' client = EasyPost::Client.new(api_key: 'EASYPOST_API_KEY') carrier_account = client.carrier_account.create( type: 'DhlEcsAccount', description: 'CA Location DHL eCommerce Solutions Account', credentials: { client_id: '123456', client_secret: '123abc', distribution_center: 'USLAX1', pickup_id: '123456', }, test_credentials: { client_id: '123456', client_secret: '123abc', distribution_center: 'USLAX1', pickup_id: '123456', }, ) puts carrier_account ``` `CarrierAccount` objects may be managed through the EasyPost API using the Production API Key only. Multiple accounts can be added for a single carrier. The CarrierType of the preferred `CarrierAccount` should be consulted before attempting to create a new `CarrierAccount`, as it will inform you of the field names expected by a certain carrier. Some carriers may have a `custom_workflow` field set to `true`. These carriers cannot be created with the traditional flow listed below and instead have a special steps that must be followed. Please see Adding Carriers With Custom Workflows for more details on these carriers. --- **Production Only** ## Retrieve all CarrierAccounts ### Example: GET /carrier_accounts #### cURL ```shell curl -X GET https://api.easypost.com/v2/carrier_accounts \ -u "EASYPOST_API_KEY": ``` #### Go ```go package example import ( "fmt" "github.com/EasyPost/easypost-go/v6" ) func list() { client := easypost.New("EASYPOST_API_KEY") carrierAccounts, _ := client.ListCarrierAccounts() fmt.Println(carrierAccounts) } ``` #### Java ```java package carrier_accounts; import com.easypost.exception.EasyPostException; import com.easypost.model.CarrierAccount; import com.easypost.service.EasyPostClient; import java.util.List; public class Retrieve { public static void main(String[] args) throws EasyPostException { EasyPostClient client = new EasyPostClient("EASYPOST_API_KEY"); List carrierAccounts = client.carrierAccount.all(); System.out.println(carrierAccounts); } } ``` #### C# ```csharp using System; using System.Collections.Generic; using System.Threading.Tasks; using EasyPost; using Newtonsoft.Json; namespace EasyPostExamples { public class Examples { public static async Task Main() { var client = new EasyPost.Client(new EasyPost.ClientConfiguration("EASYPOST_API_KEY")); List carrierAccounts = await client.CarrierAccount.All(); Console.WriteLine(JsonConvert.SerializeObject(carrierAccounts, Formatting.Indented)); } } } ``` #### Node.js ```javascript const EasyPostClient = require('@easypost/api'); const client = new EasyPostClient('EASYPOST_API_KEY'); (async () => { const carrierAccounts = await client.CarrierAccount.all(); console.log(carrierAccounts); })(); ``` #### PHP ```php carrierAccount->all(); echo $carrierAccounts; ``` #### Python ```python import easypost client = easypost.EasyPostClient("EASYPOST_API_KEY") carrier_accounts = client.carrier_account.all() print(carrier_accounts) ``` #### Ruby ```ruby require 'easypost' client = EasyPost::Client.new(api_key: 'EASYPOST_API_KEY') carrier_accounts = client.carrier_account.all puts carrier_accounts ``` Retrieve an unpaginated list of all `CarrierAccounts` available to the authenticated account. Only Production API Keysmay be used to retrieve this list. --- **Production Only** ## Retrieve a CarrierAccount ### Example: GET /carrier_accounts/:id #### cURL ```shell curl -X GET https://api.easypost.com/v2/carrier_accounts/ca_... \ -u "EASYPOST_API_KEY": ``` #### Go ```go package example import ( "fmt" "github.com/EasyPost/easypost-go/v6" ) func retrieve() { client := easypost.New("EASYPOST_API_KEY") carrierAccount, _ := client.GetCarrierAccount("ca_...") fmt.Println(carrierAccount) } ``` #### Java ```java package carrier_accounts; import com.easypost.exception.EasyPostException; import com.easypost.model.CarrierAccount; import com.easypost.service.EasyPostClient; public class Retrieve { public static void main(String[] args) throws EasyPostException { EasyPostClient client = new EasyPostClient("EASYPOST_API_KEY"); CarrierAccount carrierAccount = client.carrierAccount.retrieve("ca_..."); System.out.println(carrierAccount); } } ``` #### C# ```csharp using System; using System.Collections.Generic; using System.Threading.Tasks; using EasyPost; using Newtonsoft.Json; namespace EasyPostExamples { public class Examples { public static async Task Main() { var client = new EasyPost.Client(new EasyPost.ClientConfiguration("EASYPOST_API_KEY")); EasyPost.Models.API.CarrierAccount carrierAccount = await client.CarrierAccount.Retrieve("ca_..."); Console.WriteLine(JsonConvert.SerializeObject(carrierAccount, Formatting.Indented)); } } } ``` #### Node.js ```javascript const EasyPostClient = require('@easypost/api'); const client = new EasyPostClient('EASYPOST_API_KEY'); (async () => { const carrierAccount = await client.CarrierAccount.retrieve('ca_...'); console.log(carrierAccount); })(); ``` #### PHP ```php carrierAccount->retrieve('ca_...'); echo $carrierAccount; ``` #### Python ```python import easypost client = easypost.EasyPostClient("EASYPOST_API_KEY") carrier_account = client.carrier_account.retrieve("ca_...") print(carrier_account) ``` #### Ruby ```ruby require 'easypost' client = EasyPost::Client.new(api_key: 'EASYPOST_API_KEY') carrier_account = client.carrier_account.retrieve('ca_...') puts carrier_account ``` Retrieve a `CarrierAccount` by its `id` or `reference`. It is recommended to use EasyPost's provided identifiers because we do not enforce a unique `reference`. --- **Production Only** ## Update a CarrierAccount ### Example: PATCH /carrier_accounts/:id #### cURL ```shell curl -X PATCH https://api.easypost.com/v2/carrier_accounts/ca_... \ -u "EASYPOST_API_KEY": \ -H 'Content-Type: application/json' \ -d '{ "carrier_account": { "description": "FL Location DHL eCommerce Solutions Account", "credentials": { "pickup_id": "abc123", } } }' ``` #### Go ```go package example import ( "fmt" "github.com/EasyPost/easypost-go/v6" ) func update() { client := easypost.New("EASYPOST_API_KEY") carrierAccount, _ := client.UpdateCarrierAccount( &easypost.CarrierAccount{ ID: "ca_...", Description: "FL Location DHL eCommerce Solutions Account", Credentials: map[string]string{ "pickup_id": "abc123", }, }, ) // For UPS account update, please use below method instead updateParameters := &easypost.UpsCarrierAccountUpdateParameters{ AccountNumber: "987654321", } carrierAccount, _ = client.UpdateUpsCarrierAccount(carrierAccount.ID, updateParameters) fmt.Println(carrierAccount) } ``` #### Java ```java package carrier_accounts; import com.easypost.exception.EasyPostException; import com.easypost.model.CarrierAccount; import com.easypost.service.EasyPostClient; import java.util.HashMap; public class Update { public static void main(String[] args) throws EasyPostException { EasyPostClient client = new EasyPostClient("EASYPOST_API_KEY"); HashMap credentials = new HashMap(); credentials.put("pickup_id", "abc123"); HashMap params = new HashMap(); params.put("description", "FL Location DHL eCommerce Solutions Account"); params.put("credentials", credentials); CarrierAccount carrierAccount = client.carrierAccount.update("ca_...", params); System.out.println(carrierAccount); } } ``` #### C# ```csharp using System; using System.Collections.Generic; using System.Threading.Tasks; using EasyPost; using Newtonsoft.Json; namespace EasyPostExamples { public class Examples { public static async Task Main() { var client = new EasyPost.Client(new EasyPost.ClientConfiguration("EASYPOST_API_KEY")); EasyPost.Parameters.CarrierAccount.Update parameters = new() { Description = "FL Location DHL eCommerce Solutions Account", Credentials = new() { { "pickup_id", "abc123" } }, }; EasyPost.Models.API.carrierAccount = await client.CarrierAccount.Update("ca_...", parameters); Console.WriteLine(JsonConvert.SerializeObject(carrierAccount, Formatting.Indented)); } } } ``` #### Node.js ```javascript const EasyPostClient = require('@easypost/api'); const client = new EasyPostClient('EASYPOST_API_KEY'); (async () => { const CarrierAccount = await client.CarrierAccount.update('ca_...', { description: 'FL Location DHL eCommerce Solutions Account', credentials: { pickup_id: 'abc123' }, }); console.log(CarrierAccount); })(); ``` #### PHP ```php carrierAccount->update( 'ca_...', [ 'description' => 'FL Location DHL eCommerce Solutions Account', 'credentials' => [ 'pickup_id' => 'abc123', ] ] ); echo $carrierAccount; ``` #### Python ```python import easypost client = easypost.EasyPostClient("EASYPOST_API_KEY") updated_carrier_account = client.carrier_account.update( "ca_...", description="FL Location DHL eCommerce Solutions Account", credentials={"pickup_id": "abc123"}, ) print(updated_carrier_account) ``` #### Ruby ```ruby require 'easypost' client = EasyPost::Client.new(api_key: 'EASYPOST_API_KEY') carrier_account = client.carrier_account.update( 'ca_...', description: 'FL Location DHL eCommerce Solutions Account', ) puts carrier_account ``` Updates can be made to `description`, `reference`, and any `fields` in `credentials` or `test_credentials`. The `CarrierType` of the `CarrierAccount` should be consulted before attempting to updating an existing `CarrierAccount`, as it will inform you of the field names expected by a certain carrier. An update request for a `CarrierAccount` is a partial update; only attributes specifically passed in will be altered. --- **Production Only** ## Delete a CarrierAccount ### Example: DELETE /carrier_accounts/:id #### cURL ```shell curl -X DELETE https://api.easypost.com/v2/carrier_accounts/ca_... \ -u "EASYPOST_API_KEY": ``` #### Go ```go package example import ( "fmt" "github.com/EasyPost/easypost-go/v6" ) func delete() { client := easypost.New("EASYPOST_API_KEY") err := client.DeleteCarrierAccount("ca_...") fmt.Println(err) } ``` #### Java ```java package carrier_accounts; import com.easypost.exception.EasyPostException; import com.easypost.service.EasyPostClient; public class Delete { public static void main(String[] args) throws EasyPostException { EasyPostClient client = new EasyPostClient("EASYPOST_API_KEY"); client.carrierAccount.delete("ca_..."); } } ``` #### C# ```csharp using System; using System.Collections.Generic; using System.Threading.Tasks; using EasyPost; using Newtonsoft.Json; namespace EasyPostExamples { public class Examples { public static async Task Main() { var client = new EasyPost.Client(new EasyPost.ClientConfiguration("EASYPOST_API_KEY")); await client.CarrierAccount.Delete("ca_..."); } } } ``` #### Node.js ```javascript const EasyPostClient = require('@easypost/api'); const client = new EasyPostClient('EASYPOST_API_KEY'); (async () => { await client.CarrierAccount.delete('ca_...'); })(); ``` #### PHP ```php carrierAccount->delete('ca_...'); ``` #### Python ```python import easypost client = easypost.EasyPostClient("EASYPOST_API_KEY") client.carrier_account.delete("ca_...") ``` #### Ruby ```ruby require 'easypost' client = EasyPost::Client.new(api_key: 'EASYPOST_API_KEY') client.carrier_account.delete('ca_...') ``` `CarrierAccount` objects may be removed from your account when they become out of date or no longer useful. --- Source: https://docs.easypost.com/docs/carrier-claims/usps-claims # USPS Claims USPS Claims are for **USPS labels bought through EasyPost**. Accounts are enrolled in EP Guard by default. EasyPost files eligible labels when product value is on file. Send `line_items` at shipment create so EasyPost has product value before a claim needs action. `line_items` are claims-only. If the shipment already has a CustomsInfo for a customs form, EasyPost uses each CustomsItem `value` instead. See the USPS Claims Guide, Create a Shipment, and the Customs Guide. Use this API when a claim still needs product value, or to follow claim status. Authenticate with a **User API key** through `api.easypost.com`. Test keys see only `mode=test` claims. Production keys see only `mode=production` claims. Each key can only list, retrieve, and update claims owned by that key's user. Child production keys work when the parent is enrolled. Parent keys do not include child-user claims unless you pass `include_children=true` (the Dashboard already expands children). This is **not** EasyPost Insurance `/claims`. This is **not** for bring-your-own labels or standalone Tracker registrations. Unenrolled accounts receive `422`. To rehearse without production labels, create a test-mode claim with a **test** User API key. Test claims are never filed with USPS. Declared product value must be at least **$2.00**. Larger amounts are accepted. USPS pays out up to **$100.00** unless additional insurance was purchased. Approved payouts are subject to the negotiated EasyPost USPS Claims Fee. EasyPost pays out the enrolled merchant via EasyPost Wallet once the claim is approved and paid out by USPS. Submit evidence any time before the claim expires (60 days from ship date). EasyPost files with USPS during the USPS filing window. Step-by-step onboarding: USPS Claims Guide. Check status with `needs_info` or by listing claims. --- ## UspsClaim object | Property | Type | Description | |----------|------|-------------| | id | string | Unique identifier, begins with "usc_" | | object | string | "UspsClaim" | | tracking_code | string | USPS tracking code for the EasyPost-purchased label | | shipment_id | string | EasyPost Shipment id (shp_...) | | claim_type | string | "lost" or "damaged" | | status | string | Public status: "action_required", "ready_to_file", "submitted", "approved", "denied", "expired", or "failed". Internal pipeline states are not returned. | | product_value | string | Declared goods value in USD. Minimum $2.00; larger amounts are accepted. Optional until the claim needs action. Send line_items at shipment create. If the shipment already has nested CustomsItem value on a CustomsInfo, EasyPost uses that sum instead. | | claimable_amount | string | Amount EasyPost will file with USPS. USPS pays out up to $100.00 unless additional insurance was purchased. | | description | string | Merchandise description already stored on the claim. Not accepted on evidence submit. | | recipient | UspsClaimRecipient | Recipient already on the shipment. Not accepted on evidence submit. | | shipment_date | date | Ship date used to compute expiry (60 days) and the USPS filing window | | filing_window_closes_at | date | Last day EasyPost can file this claim with USPS (60 days from ship date) | | missing | string[] | "product_value" when a value of at least $2.00 is still required before filing | | submitted_at | datetime | When the claim was filed with USPS. Null until it is filed. | | approved_at | datetime | When USPS paid the claim. Null unless status is approved. | Example Object: ```json { "id": "usc_...", "object": "UspsClaim", "mode": "production", "tracking_code": "9400111899223344556677", "status": "ready_to_file", "product_value": "25.00", "claimable_amount": "25.00", "description": "Ceramic mug", "recipient": { "first_name": "Ada", "last_name": "Lovelace", "company": null }, "missing": [], "submitted_at": null, "approved_at": null } ``` --- ## UspsClaimRecipient object | Property | Type | Description | |----------|------|-------------| | first_name | string | Recipient first name already on the shipment. Null when it was not provided. | | last_name | string | Recipient last name already on the shipment. Null when it was not provided. | | company | string | Recipient company already on the shipment. Null when it was not provided. | Example Object: ```json { "first_name": "Ada", "last_name": "Lovelace", "company": null } ``` --- ## Retrieve all USPS Claims [Content omitted: interactive code examples. Review the rendered documentation for request and response examples.] Cursor-paginated (`after_id` / `before_id` / `page_size`). Filter with `status`, `claim_type`, `tracking_code`, or `shipment_id`. Pass `include_children=true` on a parent User API key to include child-user claims. See Pagination for cursor details. --- ## Create a test-mode USPS Claim [Content omitted: interactive code examples. Review the rendered documentation for request and response examples.] **Test mode only.** Use a test User API key to create a rehearsal claim so you can exercise `needs_info` and evidence submit without a production USPS label. Production keys receive `422`. Production claims are created automatically from eligible EasyPost-purchased labels. Test claims are never filed with USPS. --- ## Retrieve USPS Claims that need additional info [Content omitted: interactive code examples. Review the rendered documentation for request and response examples.] Returns unexpired claims (`status` is `action_required`, still within 60 days of ship date) that still need product value. Use this instead of listing every claim when you only need to collect product value. Cursor-paginated (`after_id` / `before_id` / `page_size`). Pass `include_children=true` on a parent User API key to include child-user claims. --- ## Retrieve a USPS Claim [Content omitted: interactive code examples. Review the rendered documentation for request and response examples.] Retrieve one `UspsClaim` by its `usc_` id. Pass `include_children=true` on a parent User API key to retrieve a child-user claim. --- ## Submit USPS Claim evidence [Content omitted: interactive code examples. Review the rendered documentation for request and response examples.] Submit `product_value` only. Sending the request is consent under the EasyPost terms of service. Evidence may be submitted any time before the claim expires, including before the USPS filing window opens. EasyPost files during the filing window. Evidence may be replaced until the claim is `submitted`. Pass `include_children=true` on a parent User API key to update a child-user claim. --- ## Submit USPS Claim evidence in bulk [Content omitted: interactive code examples. Review the rendered documentation for request and response examples.] JSON batch for merchants building their own collector. Each item needs an `id` (`usc_...`) and `product_value`. Partial success returns `207` with `failed_claims`. Pass `include_children=true` on a parent User API key to update child-user claims. --- Source: https://docs.easypost.com/docs/carrier-metadata # Carrier Metadata The Carrier Metadata endpoint returns information about all the carriers available on the EasyPost platform. This information may include service levels, predefined packages, shipment options, supported features, and more that are available per carrier. This metadata can be useful during onboarding and integration or when determining the ideal carrier mix for your setup. --- ## CarrierMetadata object | Property | Type | Description | |----------|------|-------------| | name | string | The single-word name of a carrier, such as "royalmail" (these may not match the human-readable name) | | human_readable | string | The human-readable name of the carrier (helps describe what kind of entry this is) | | type | string | The CarrierAccount type associated with this carrier (some carriers may have multiple entries that share a type - Wallet vs BYOCA) | | service_levels | array | A list of ServiceLevel objects for this carrier | | predefined_packages | array | A list of PredefinedPackage objects for this carrier | | supported_features | array | A list of SupportedFeature objects for this carrier | | shipment_options | array | A list of ShipmentOption objects for this carrier | Example Object: ```json { "human_readable": "USPS BYOCA", "name": "uspsbyoca", "predefined_packages": [ { "carrier": "uspsbyoca", "description": null, "dimensions": [ "6in x 4.5in x 0.016in" ], "human_readable": null, "max_weight": null, "name": "Card" }, { "carrier": "uspsbyoca", "description": null, "dimensions": [ "11.5in x 6.125in x 0.25in" ], "human_readable": null, "max_weight": null, "name": "Letter" }, { "carrier": "uspsbyoca", "description": null, "dimensions": [ "11.5in x 6.125in x 0.75in" ], "human_readable": null, "max_weight": null, "name": "Flat" }, { "carrier": "uspsbyoca", "description": null, "dimensions": [ "12.5in x 9.5in" ], "human_readable": null, "max_weight": null, "name": "FlatRateEnvelope" }, { "carrier": "uspsbyoca", "description": null, "dimensions": [ "15in x 9.5in" ], "human_readable": null, "max_weight": null, "name": "FlatRateLegalEnvelope" }, { "carrier": "uspsbyoca", "description": null, "dimensions": [ "12.5in x 9.5in" ], "human_readable": null, "max_weight": null, "name": "FlatRatePaddedEnvelope" }, { "carrier": "uspsbyoca", "description": null, "dimensions": [ "10in x 5in", "12.5in x 9.5in" ], "human_readable": null, "max_weight": null, "name": "FlatRateWindowEnvelope" }, { "carrier": "uspsbyoca", "description": null, "dimensions": [ "12.5in x 9.5in" ], "human_readable": null, "max_weight": null, "name": "FlatRateCardboardEnvelope" }, { "carrier": "uspsbyoca", "description": null, "dimensions": [ "10in x 6in" ], "human_readable": null, "max_weight": null, "name": "SmallFlatRateEnvelope" }, { "carrier": "uspsbyoca", "description": null, "dimensions": [ "Varies based on service level" ], "human_readable": null, "max_weight": null, "name": "Parcel" }, { "carrier": "uspsbyoca", "description": null, "dimensions": [ "Varies based on service level" ], "human_readable": null, "max_weight": 320, "name": "SoftPack" }, { "carrier": "uspsbyoca", "description": null, "dimensions": [ "8.6875in x 5.4375in x 1.75in" ], "human_readable": null, "max_weight": null, "name": "SmallFlatRateBox" }, { "carrier": "uspsbyoca", "description": null, "dimensions": [ "11.25in x 8.75in x 6in", "14.125in x 12in x 3.5in" ], "human_readable": null, "max_weight": null, "name": "MediumFlatRateBox" }, { "carrier": "uspsbyoca", "description": null, "dimensions": [ "12.25in x 12in x 6in" ], "human_readable": null, "max_weight": null, "name": "LargeFlatRateBox" }, { "carrier": "uspsbyoca", "description": null, "dimensions": [ "12.25in x 12.25in x 6in" ], "human_readable": null, "max_weight": null, "name": "LargeFlatRateBoxAPOFPO" }, { "carrier": "uspsbyoca", "description": null, "dimensions": [], "human_readable": null, "max_weight": null, "name": "FlatTubTrayBox" }, { "carrier": "uspsbyoca", "description": null, "dimensions": [], "human_readable": null, "max_weight": null, "name": "EMMTrayBox" }, { "carrier": "uspsbyoca", "description": null, "dimensions": [], "human_readable": null, "max_weight": null, "name": "FullTrayBox" }, { "carrier": "uspsbyoca", "description": null, "dimensions": [], "human_readable": null, "max_weight": null, "name": "HalfTrayBox" }, { "carrier": "uspsbyoca", "description": null, "dimensions": [], "human_readable": null, "max_weight": null, "name": "PMODSack" } ], "service_levels": [ { "carrier": "uspsbyoca", "description": "1-5 business days", "dimensions": [ "Cards, Letters and Flats only (no Parcels)", "See Predefined Packages (Card, Letter, Flat) for details" ], "human_readable": "First-Class Mail®", "max_weight": 13, "name": "First" }, { "carrier": "uspsbyoca", "description": "1-3 business days", "dimensions": [ "Combined Length and Girth < 108in" ], "human_readable": "Priority Mail®", "max_weight": 1120, "name": "Priority" }, { "carrier": "uspsbyoca", "description": "1-2 days", "dimensions": [ "Combined Length and Girth < 108in" ], "human_readable": "Priority Mail Express®", "max_weight": 1120, "name": "Express" }, { "carrier": "uspsbyoca", "description": "2-5 days", "dimensions": [ "Combined Length and Girth < 130in" ], "human_readable": "USPS Ground Advantage®", "max_weight": 1120, "name": "GroundAdvantage" }, { "carrier": "uspsbyoca", "description": "2-8 business days", "dimensions": [ "Combined Length and Girth < 108in" ], "human_readable": "Library Mail®", "max_weight": 1120, "name": "LibraryMail" }, { "carrier": "uspsbyoca", "description": "2-8 business days", "dimensions": [ "Combined Length and Girth < 108in" ], "human_readable": "Media Mail®", "max_weight": 1120, "name": "MediaMail" }, { "carrier": "uspsbyoca", "description": null, "dimensions": [ "Must be rectangular, otherwise an additional charge may apply." ], "human_readable": "First-Class Mail International®", "max_weight": 15.994, "name": "FirstClassMailInternational" }, { "carrier": "uspsbyoca", "description": "7-21 days", "dimensions": [ "Packages (Other Than Rolls): Combined Length and Girth < 108in", "Rolls (Tubes): Length: min 4in; max 36 in. Length plus twice the diameter (combined): min 6.75 in; max 42in.", "Some countries have specific prohibitions and restrictions" ], "human_readable": "First-Class Package International Service®", "max_weight": 64, "name": "FirstClassPackageInternationalService" }, { "carrier": "uspsbyoca", "description": "6-10 business days", "dimensions": [ "Combined Length and Girth < 108in" ], "human_readable": "Priority Mail International®", "max_weight": 1120, "name": "PriorityMailInternational" }, { "carrier": "uspsbyoca", "description": "3-5 business days", "dimensions": [ "Combined Length and Girth < 108in" ], "human_readable": "Priority Mail Express International®", "max_weight": 1120, "name": "ExpressMailInternational" } ], "shipment_options": [ { "carrier": "uspsbyoca", "deprecated": false, "description": null, "human_readable": "Additional Handling", "name": "additional_handling", "type": "boolean" }, { "carrier": "uspsbyoca", "deprecated": false, "description": null, "human_readable": "Auto Manifest", "name": "auto_manifest", "type": "boolean" }, { "carrier": "uspsbyoca", "deprecated": false, "description": null, "human_readable": "Carrier Insurance Amount", "name": "carrier_insurance_amount", "type": "float" }, { "carrier": "uspsbyoca", "deprecated": false, "description": null, "human_readable": "Certificate Number", "name": "certificate_number", "type": "string" }, { "carrier": "uspsbyoca", "deprecated": false, "description": null, "human_readable": "Certified Mail", "name": "certified_mail", "type": "boolean" }, { "carrier": "uspsbyoca", "deprecated": false, "description": null, "human_readable": "Container", "name": "container", "type": "map" }, { "carrier": "uspsbyoca", "deprecated": false, "description": null, "human_readable": "Content Description", "name": "content_description", "type": "string" }, { "carrier": "uspsbyoca", "deprecated": false, "description": null, "human_readable": "Currency", "name": "currency", "type": "string" }, { "carrier": "uspsbyoca", "deprecated": false, "description": null, "human_readable": "Customs Include Shipping", "name": "customs_include_shipping", "type": "boolean" }, { "carrier": "uspsbyoca", "deprecated": false, "description": null, "human_readable": "Dangerous Goods", "name": "dangerous_goods", "type": "map" }, { "carrier": "uspsbyoca", "deprecated": false, "description": null, "human_readable": "Delivery Confirmation", "name": "delivery_confirmation", "type": "string" }, { "carrier": "uspsbyoca", "deprecated": false, "description": null, "human_readable": "Delivery Date", "name": "delivery_date", "type": "datetime" }, { "carrier": "uspsbyoca", "deprecated": false, "description": null, "human_readable": "Delivery Max Datetime", "name": "delivery_max_datetime", "type": "datetime" }, { "carrier": "uspsbyoca", "deprecated": false, "description": null, "human_readable": "Delivery Min Datetime", "name": "delivery_min_datetime", "type": "datetime" }, { "carrier": "uspsbyoca", "deprecated": false, "description": null, "human_readable": "Entry", "name": "entry", "type": "string" }, { "carrier": "uspsbyoca", "deprecated": false, "description": null, "human_readable": "Handling Instructions", "name": "handling_instructions", "type": "string" }, { "carrier": "uspsbyoca", "deprecated": false, "description": null, "human_readable": "Hazmat", "name": "hazmat", "type": "enum" }, { "carrier": "uspsbyoca", "deprecated": false, "description": null, "human_readable": "Image Format", "name": "image_format", "type": "string" }, { "carrier": "uspsbyoca", "deprecated": false, "description": null, "human_readable": "Import Control Description", "name": "import_control_description", "type": "string" }, { "carrier": "uspsbyoca", "deprecated": false, "description": null, "human_readable": "Import Control", "name": "import_control", "type": "enum" }, { "carrier": "uspsbyoca", "deprecated": false, "description": null, "human_readable": "Import Federal Tax Id", "name": "import_federal_tax_id", "type": "string" }, { "carrier": "uspsbyoca", "deprecated": false, "description": null, "human_readable": "Importer Reference", "name": "importer_reference", "type": "string" }, { "carrier": "uspsbyoca", "deprecated": false, "description": null, "human_readable": "Invoice Number", "name": "invoice_number", "type": "string" }, { "carrier": "uspsbyoca", "deprecated": false, "description": null, "human_readable": "Label Date", "name": "label_date", "type": "datetime" }, { "carrier": "uspsbyoca", "deprecated": false, "description": null, "human_readable": "Label Format", "name": "label_format", "type": "string" }, { "carrier": "uspsbyoca", "deprecated": false, "description": null, "human_readable": "Label Size", "name": "label_size", "type": "string" }, { "carrier": "uspsbyoca", "deprecated": false, "description": null, "human_readable": "License Number", "name": "license_number", "type": "string" }, { "carrier": "uspsbyoca", "deprecated": false, "description": null, "human_readable": "Live Animal", "name": "live_animal", "type": "boolean" }, { "carrier": "uspsbyoca", "deprecated": false, "description": null, "human_readable": "Machinable", "name": "machinable", "type": "boolean" }, { "carrier": "uspsbyoca", "deprecated": false, "description": null, "human_readable": "Po Sort", "name": "po_sort", "type": "string" }, { "carrier": "uspsbyoca", "deprecated": false, "description": null, "human_readable": "Print Custom", "name": "print_custom", "type": "array" }, { "carrier": "uspsbyoca", "deprecated": false, "description": null, "human_readable": "Registered Mail Amount", "name": "registered_mail_amount", "type": "float" }, { "carrier": "uspsbyoca", "deprecated": false, "description": null, "human_readable": "Registered Mail", "name": "registered_mail", "type": "boolean" }, { "carrier": "uspsbyoca", "deprecated": false, "description": null, "human_readable": "Return Receipt", "name": "return_receipt", "type": "boolean" }, { "carrier": "uspsbyoca", "deprecated": false, "description": null, "human_readable": "Return Service", "name": "return_service", "type": "string" }, { "carrier": "uspsbyoca", "deprecated": false, "description": null, "human_readable": "Saturday Delivery", "name": "saturday_delivery", "type": "boolean" }, { "carrier": "uspsbyoca", "deprecated": false, "description": null, "human_readable": "Special Rates Eligibility", "name": "special_rates_eligibility", "type": "string" } ], "supported_features": [ { "carrier": "uspsbyoca", "description": null, "name": "bill_on_delivery", "supported": true }, { "carrier": "uspsbyoca", "description": null, "name": "bill_on_label_purchase", "supported": true }, { "carrier": "uspsbyoca", "description": null, "name": "commercial_invoices", "supported": true }, { "carrier": "uspsbyoca", "description": null, "name": "delivers_to_po_box", "supported": true }, { "carrier": "uspsbyoca", "description": null, "name": "labels", "supported": true }, { "carrier": "uspsbyoca", "description": null, "name": "pickups", "supported": true }, { "carrier": "uspsbyoca", "description": null, "name": "rating", "supported": true }, { "carrier": "uspsbyoca", "description": null, "name": "refunds", "supported": true }, { "carrier": "uspsbyoca", "description": null, "name": "returns", "supported": true }, { "carrier": "uspsbyoca", "description": null, "name": "scanforms", "supported": true }, { "carrier": "uspsbyoca", "description": null, "name": "test_environment", "supported": true }, { "carrier": "uspsbyoca", "description": null, "name": "tracking", "supported": true } ], "type": "UspsAccount" } ``` --- ## ServiceLevel object | Property | Type | Description | |----------|------|-------------| | carrier | string | The single-word name of the carrier | | name | string | The service level name used by EasyPost | | description | string | A description of the service level, or null | | human_readable | string | The human-readable name of the service level, or null | | max_weight | float | The maximum weight in ounces, or null | | dimensions | array | Dimension requirements or limits, as strings, or null | Example Object: ```json { "carrier": "uspsbyoca", "description": "1-5 business days", "dimensions": [ "Cards, Letters and Flats only (no Parcels)", "See Predefined Packages (Card, Letter, Flat) for details" ], "human_readable": "First-Class Mail®", "max_weight": 13, "name": "First" } ``` --- ## PredefinedPackage object | Property | Type | Description | |----------|------|-------------| | carrier | string | The single-word name of the carrier | | name | string | The predefined package name used by EasyPost | | description | string | A description of the predefined package, or null | | human_readable | string | The human-readable name of the predefined package, or null | | max_weight | float | The maximum weight in ounces, or null | | dimensions | array | Available package dimensions, as strings, or null | Example Object: ```json { "carrier": "uspsbyoca", "description": null, "dimensions": [ "6in x 4.5in x 0.016in" ], "human_readable": null, "max_weight": null, "name": "Card" } ``` --- ## SupportedFeature object | Property | Type | Description | |----------|------|-------------| | carrier | string | The single-word name of the carrier | | name | string | The name of the carrier feature | | supported | boolean | Whether the feature is supported, or null | | description | string | A description of the feature, or null | Example Object: ```json { "carrier": "uspsbyoca", "description": null, "name": "bill_on_delivery", "supported": true } ``` --- ## ShipmentOption object | Property | Type | Description | |----------|------|-------------| | carrier | string | The single-word name of the carrier | | name | string | The shipment option name used by EasyPost | | description | string | A description of the shipment option, or null | | human_readable | string | The human-readable name of the shipment option, or null | | deprecated | boolean | Whether the shipment option is deprecated, or null | | type | string | The shipment option value type, or null | Example Object: ```json { "carrier": "uspsbyoca", "deprecated": false, "description": null, "human_readable": "Additional Handling", "name": "additional_handling", "type": "boolean" } ``` --- ## Retrieve Carrier Metadata ### Example: GET /metadata/carriers #### cURL ```shell # Request all metadata for all carriers curl -X GET https://api.easypost.com/v2/metadata/carriers \ -u "EASYPOST_API_KEY": # Request specific metadata for specific carriers curl -X GET "https://api.easypost.com/v2/metadata/carriers?carriers=usps&types=service_levels,predefined_packages" \ -u "EASYPOST_API_KEY": ``` #### Go ```go package example import ( "fmt" "github.com/EasyPost/easypost-go/v6" ) func retrieve() { client := easypost.New("EASYPOST_API_KEY") // Request all metadata for all carriers carrierMetadata, _ := client.GetCarrierMetadata() fmt.Println(carrierMetadata) // Request specific metadata for specific carriers carrierMetadataWithFilters, _ := client.GetCarrierMetadataWithCarriersAndTypes([]string{"usps"}, []string{"service_levels", "predefined_packages"}) fmt.Println(carrierMetadataWithFilters) } ``` #### Java ```java package carrier_metadata; import com.easypost.exception.EasyPostException; import com.easypost.model.CarrierAccount; import com.easypost.service.EasyPostClient; import java.util.ArrayList; import java.util.List; public class Retrieve { public static void main(String[] args) throws EasyPostException { EasyPostClient client = new EasyPostClient("EASYPOST_API_KEY"); // Request all metadata for all carriers CarrierAccount carrierMetadata = client.carrierMetadata.retrieve(); System.out.println(carrierMetadata); // Request specific metadata for specific carriers List carriers = new ArrayList(); carriers.add("usps"); List types = new ArrayList(); types.add("service_levels"); types.add("predefined_packages"); CarrierAccount carrierMetadata = client.carrierMetadata.retrieve(carriers, types); System.out.println(carrierMetadata); } } ``` #### C# ```csharp using System; using System.Collections.Generic; using System.Threading.Tasks; using EasyPost; using Newtonsoft.Json; namespace EasyPostExamples { public class Examples { public static async Task Main() { var client = new EasyPost.Client(new EasyPost.ClientConfiguration("EASYPOST_API_KEY")); // Request all metadata for all carriers List carrierMetadata = await client.CarrierMetadata.Retrieve(); Console.WriteLine(JsonConvert.SerializeObject(carrierMetadata, Formatting.Indented)); // Request specific metadata for specific carriers EasyPost.Parameters.CarrierMetadata.Retrieve parameters = new() { Carriers = new List { "UPS", "USPS" }, Types = new List { CarrierMetadataType.ServiceLevels, CarrierMetadataType.PredefinedPackages }, }; List carrierMetadata = await client.CarrierMetadata.Retrieve(parameters); Console.WriteLine(JsonConvert.SerializeObject(carrierMetadata, Formatting.Indented)); } } } ``` #### Node.js ```javascript const EasyPostBetaClient = require('@easypost/api'); const client = new EasyPostBetaClient('EASYPOST_API_KEY'); (async () => { // Request all metadata for all carriers const carrierMetadata = await client.CarrierMetadata.retrieve(); console.log(carrierMetadata); // Request specific metadata for specific carriers const carrierMetadataWithFilters = await client.CarrierMetadata.retrieve( ['usps'], ['service_levels', 'predefined_packages'], ); console.log(carrierMetadataWithFilters); })(); ``` #### PHP ```php carrierMetadata->retrieve(); echo $carrierMetadata; // Request specific metadata for specific carriers $carrierMetadata = $client->carrierMetadata->retrieve( ['usps'], ['service_levels', 'predefined_packages'], ); echo $carrierMetadata; ``` #### Python ```python import easypost client = easypost.EasyPostClient("EASYPOST_API_KEY") # Request all metadata for all carriers carrier_metadata = client.carrier_metadata.retrieve() print(carrier_metadata) # Request specific metadata for specific carriers carrier_metadata = client.carrier_metadata.retrieve( carriers=["usps"], types=["service_levels", "predefined_packages"], ) print(carrier_metadata) ``` #### Ruby ```ruby require 'easypost' client = EasyPost::Client.new(api_key: 'EASYPOST_API_KEY') # Request all metadata for all carriers carrier_metadata = client.carrier_metadata.retrieve puts carrier_metadata # Request specific metadata for specific carriers usps_carrier_metadata = client.carrier_metadata.retrieve('usps', %w[service_levels predefined_packages]) puts usps_carrier_metadata ``` Retrieve all `CarrierMetadata` for all carriers on the EasyPost platform. Optionally, filter the response by specifying a list of carriers or metadata types. --- Source: https://docs.easypost.com/docs/carrier-types # CarrierType The `CarrierType` object provides an interface for determining the valid fields of a `CarrierAccount`. The list of `CarrierType` objects only changes when a new carrier is added to EasyPost. The `CarrierType` objects consist of their top level attributes as well as a `Fields` object that contains `credentials` and sometimes `test_credentials` sub-objects, which themselves are collections of attributes for `CarrierAccounts` creation, as well as metadata about presentation and the naming of said attributes. There are a couple special case `CarrierAccounts`, with structures differing somewhat from the norm. For instance, instead of credentials for a "UspsAccount", it has only `auto_link: true`, which indicates that it is an account that can be added or removed without any carrier-specific fields. --- ## CarrierType object | Property | Type | Description | |----------|------|-------------| | object | string | "CarrierType" | | type | string | Specifies the CarrierAccount type | | readable | string | The human-readable name of the CarrierType | | logo | string | | | fields | Fields object | Contains at least one of the following keys: auto_link credentials test_credentials custom_workflow | Example Object: ```json { "object": "CarrierType", "type": "UpsAccount", "readable": "UPS", "logo": null, "fields": { "credentials": { "access_license_number": { "visibility": "invisible", "label": "UPS Access License Number" }, "account_number": { "visibility": "readonly", "label": "UPS Account Number" }, "user_id": { "visibility": "invisible", "label": "UPS.com User ID" }, "password": { "visibility": "invisible", "label": "UPS.com Password" }, "oauth_status": { "visibility": "readonly", "label": "OAuth Authorization Status" }, "partner_oauth_url": { "visibility": "readonly", "label": "OAuth Portal URL" } } } } ``` --- ## Fields object | Property | Type | Description | |----------|------|-------------| | auto_link | boolean | If this key is present with the value of true, no other attributes are needed for CarrierAccount creation . | | custom_workflow | boolean | If this key is present with the value of true, CarrierAccount creation of this type requires extra work not handled by the CarrierAccount standard API. | | credentials | Credentials object | If this object is present, required attribute names and their metadata are presented inside. | | test_credentials | Credentials object | If this object is present, it contains attribute names and metadata just as the credentials object. It is not required for CarrierAccount creation if you do not plan on using the CarrierAccount for test mode. | Example Object: ```json { "credentials": { "access_license_number": { "visibility": "invisible", "label": "UPS Access License Number" }, "account_number": { "visibility": "readonly", "label": "UPS Account Number" }, "user_id": { "visibility": "invisible", "label": "UPS.com User ID" }, "password": { "visibility": "invisible", "label": "UPS.com Password" }, "oauth_status": { "visibility": "readonly", "label": "OAuth Authorization Status" }, "partner_oauth_url": { "visibility": "readonly", "label": "OAuth Portal URL" } } } ``` --- ## Credentials object | Property | Type | Description | |----------|------|-------------| | name | string | The key for each attribute sub-object within credentials is the name of the attribute for submission on CarrierAccounts | | visibility | string | There are five possible values, which encode the security need and storage type for each attribute: visible checkbox fake password masked | | label | string | Most attributes have generic names, so for clarity, a "label" value is provided for clearer representation when rendering forms. | Example Object: ```json { "access_license_number": { "visibility": "invisible", "label": "UPS Access License Number" }, "account_number": { "visibility": "readonly", "label": "UPS Account Number" }, "user_id": { "visibility": "invisible", "label": "UPS.com User ID" }, "password": { "visibility": "invisible", "label": "UPS.com Password" }, "oauth_status": { "visibility": "readonly", "label": "OAuth Authorization Status" }, "partner_oauth_url": { "visibility": "readonly", "label": "OAuth Portal URL" } } ``` --- **Production Only** ## Retrieve available Carrier Types ### Example: GET /carrier_types #### cURL ```shell curl -X GET https://api.easypost.com/v2/carrier_types \ -u "EASYPOST_API_KEY": ``` #### Go ```go package example import ( "fmt" "github.com/EasyPost/easypost-go/v6" ) func list() { client := easypost.New("EASYPOST_API_KEY") carrierTypes, _ := client.GetCarrierTypes() fmt.Println(carrierTypes) } ``` #### Java ```java package carrier_types; import com.easypost.exception.EasyPostException; import com.easypost.model.CarrierType; import com.easypost.service.EasyPostClient; import java.util.List; public class All { public static void main(String[] args) throws EasyPostException { EasyPostClient client = new EasyPostClient("EASYPOST_API_KEY"); List carrierTypes = client.carrierType.all(); System.out.println(carrierTypes); } } ``` #### C# ```csharp using System; using System.Collections.Generic; using System.Threading.Tasks; using EasyPost; using Newtonsoft.Json; namespace EasyPostExamples { public class Examples { public static async Task Main() { var client = new EasyPost.Client(new EasyPost.ClientConfiguration("EASYPOST_API_KEY")); List carrierTypes = await client.CarrierType.All(); Console.WriteLine(JsonConvert.SerializeObject(carrierTypes, Formatting.Indented)); } } } ``` #### Node.js ```javascript const EasyPostClient = require('@easypost/api'); const client = new EasyPostClient('EASYPOST_API_KEY'); (async () => { const carrierTypes = await client.CarrierType.all(); console.log(carrierTypes); })(); ``` #### PHP ```php carrierAccount->types(); echo $carrierTypes; ``` #### Python ```python import easypost client = easypost.EasyPostClient("EASYPOST_API_KEY") carrier_types = client.carrier_account.types() print(carrier_types) ``` #### Ruby ```ruby require 'easypost' client = EasyPost::Client.new(api_key: 'EASYPOST_API_KEY') carrier_types = client.carrier_account.types puts carrier_types ``` The `CarrierType` list is an unpaginated list of all carrier types available to the account of the given API key. --- Source: https://docs.easypost.com/docs/customer-portals # Customer Portal The Customer Portal enables platforms and marketplaces to direct sub accounts to a self-service interface for `account_onboarding` and `account_management`. This functionality is accessed using the `account_link` endpoint, which generates a secure, one-time-use session URL. --- ## CustomerPortalAccountLink object | Property | Type | Description | |----------|------|-------------| | object | string | Always returns "CustomerPortalAccountLink". | | link | string | One-time-use session URL for initiating the Customer Portal. | | created_at | timestamp | One-time-use session URL for initiating the Customer Portal. | | expires_at | timestamp | ISO 8601 timestamp when the link will expire (5 minutes from creation). | Example Object: ```json { "object": "CustomerPortalAccountLink", "created_at": "2026-10-06T17:30:30Z", "expires_at": "2026-10-06T17:35:30Z", "link": "https://app.easypost.com/customer-portal/onboarding?session_id={SESSION_ID}" } ``` --- **Production Only** ## Creating a Portal Session ### Example: POST /customer_portal/account_link #### cURL ```shell curl -X POST https://api.easypost.com/v2/customer_portal/account_link \ -u "EASYPOST_API_KEY": \ -H 'Content-Type: application/json' \ -d '{ "session_type": "account_management", "user_id": "user_...", "refresh_url": "https://example.com/refresh", "return_url": "https://example.com/return", "metadata": {"target": "wallet"} }' ``` #### Go ```go package example import ( "fmt" "github.com/EasyPost/easypost-go/v6" ) func create() { client := easypost.New("EASYPOST_API_KEY") accountLink, _ := client.CreateCustomerPortalAccountLink( &easypost.CustomerPortalAccountLinkParameters{ SessionType: "account_management", UserID: "user_...", RefreshURL: "https://example.com/refresh", ReturnURL: "https://example.com/return", Metadata: map[string]interface{}{ "target": "wallet", }, }, ) fmt.Println(accountLink) } ``` #### Java ```java package customer_portals; import java.util.HashMap; import com.easypost.exception.EasyPostException; import com.easypost.model.CustomerPortalAccountLink; import com.easypost.service.EasyPostClient; public class Create { public static void main(String[] args) throws EasyPostException { EasyPostClient client = new EasyPostClient("EASYPOST_API_KEY"); HashMap params = new HashMap<>(); params.put("session_type", "account_management"); params.put("user_id", "user_..."); params.put("refresh_url", "https://example.com/refresh"); params.put("return_url", "https://example.com/return"); HashMap metadata = new HashMap<>(); metadata.put("target", "wallet"); params.put("metadata", metadata); CustomerPortalAccountLink accountLink = client.customerPortal.createAccountLink(params); System.out.println(accountLink); } } ``` #### C# ```csharp using System; using System.Threading.Tasks; using EasyPost; using Newtonsoft.Json; namespace EasyPostExamples { public class Examples { public static async Task Main() { var client = new EasyPost.Client(new EasyPost.ClientConfiguration("EASYPOST_API_KEY")); EasyPost.Parameters.CustomerPortal.CreateAccountLink parameters = new() { SessionType = "account_management", UserId = "user_...", RefreshUrl = "https://example.com/refresh", ReturnUrl = "https://example.com/return", Metadata = new System.Collections.Generic.Dictionary { { "target", "wallet" } } }; EasyPost.Models.API.CustomerPortal.AccountLink accountLink = await client.CustomerPortal.CreateAccountLink(parameters); Console.WriteLine(JsonConvert.SerializeObject(accountLink, Formatting.Indented)); } } } ``` #### Node.js ```javascript const EasyPostClient = require('@easypost/api'); const client = new EasyPostClient('EASYPOST_API_KEY'); (async () => { const accountLink = await client.CustomerPortal.createAccountLink({ session_type: 'account_management', user_id: 'user_...', refresh_url: 'https://example.com/refresh', return_url: 'https://example.com/return', metadata: { target: 'wallet' }, }); console.log(accountLink); })(); ``` #### PHP ```php customerPortal->createAccountLink([ 'session_type' => 'account_management', 'user_id' => 'user_...', 'refresh_url' => 'https://example.com/refresh', 'return_url' => 'https://example.com/return', 'metadata' => ['target' => 'wallet'], ]); echo $accountLink; ``` #### Python ```python import easypost client = easypost.EasyPostClient("EASYPOST_API_KEY") account_link = client.customer_portal.create_account_link( session_type="account_management", user_id="user_...", refresh_url="https://example.com/refresh", return_url="https://example.com/return", metadata={"target": "wallet"}, ) print(account_link) ``` #### Ruby ```ruby require 'easypost' client = EasyPost::Client.new(api_key: 'EASYPOST_API_KEY') account_link = client.customer_portal.create_account_link( { session_type: 'account_management', user_id: 'user_...', refresh_url: 'https://example.com/refresh', return_url: 'https://example.com/return', metadata: { target: 'wallet' }, }, ) puts account_link ``` This endpoint generates a one-time Customer Portal URL. The integrator must redirect the sub account user to this URL within the expiration window. --- ## Handling redirects - **Refresh URL:** Redirected here if the session link has expired or has already been used. Should trigger a new `POST /customer_portal/account_link` call. - **Return URL:** Redirected here when the session ends. Session outcome is not included; use webhooks or fetch account status via API. --- ## Additional resources - Get started with Forge - Forge Help Center --- Source: https://docs.easypost.com/docs/customs-infos # CustomsInfo `CustomsInfo` objects contain `CustomsItem` objects and all necessary information for the generation of customs forms required for international shipping. Please see the `Shipments` documentation for examples of including a `CustomsInfo` object in a `Shipment`. EasyPost can also use each nested CustomsItem `value` as product value for USPS Claims when this object is already on the shipment. New claims integrations should send `line_items`. **Note:** the maximum number of items that can be included in customs info with UPS is 100. --- ## CustomsInfo object | Property | Type | Description | |----------|------|-------------| | id | string | Unique, begins with 'cstinfo_' | | object | string | 'CustomsInfo' | | eel_pfc | string | "EEL" or "PFC" If value is less than $2500: "NOEEI 30.37(a)" If value is greater than $2500: see Customs Guide | | contents_type | string | Possible values: "documents" "gift" "merchandise" "returned_goods" "sample" "dangerous_goods" "humanitarian_donation" "other" | | contents_explanation | string | Human readable description of content, max 255 characters. Required for certain carriers and always required if contents_type is "other" | | customs_certify | boolean | Electronically certify the information provided | | customs_signer | string | Required if customs_certify is true | | non_delivery_option | string | Possible values: "return" (default) "abandon" | | restriction_type | string | Possible values: "none" "other" "quarantine" "sanitary_phytosanitary_inspection" | | restriction_comments | string | Required if restriction_type is not "none" | | customs_items | CustomsItem array | Describes products being shipped | | declaration | string | A customs declaration message, available for eligible carriers | | created_at | datetime | When the CustomsInfo was created | | updated_at | datetime | When the CustomsInfo was last updated | Example Object: ```json { "id": "cstinfo_400bef43bd354af1a1bcb3f9e8922ee5", "object": "CustomsInfo", "created_at": "2025-05-09T20:39:15Z", "updated_at": "2025-05-09T20:39:15Z", "contents_explanation": "", "contents_type": "merchandise", "customs_certify": true, "customs_signer": "Steve Brule", "eel_pfc": "NOEEI 30.37(a)", "non_delivery_option": "return", "restriction_comments": null, "restriction_type": "none", "mode": "test", "declaration": null, "customs_items": [ { "id": "cstitem_a0d181241efc422399dd66c993dee32e", "object": "CustomsItem", "created_at": "2025-05-09T20:39:15Z", "updated_at": "2025-05-09T20:39:15Z", "description": "T-shirt", "hs_tariff_number": "123456", "origin_country": "US", "quantity": 1, "value": "10.0", "weight": 5.0, "code": "123", "mode": "test", "manufacturer": null, "currency": null, "eccn": null, "printed_commodity_identifier": null } ] } ``` --- ## Create a CustomsInfo ### Example: POST /customs_infos #### cURL ```shell curl -X POST https://api.easypost.com/v2/customs_infos \ -u "EASYPOST_API_KEY": \ -H 'Content-Type: application/json' \ -d '{ "customs_info": { "customs_certify": "true", "customs_signer": "Steve Brule", "contents_type": "merchandise", "contents_explanation": "", "restriction_type": "none", "eel_pfc": "NOEEI 30.37(a)", "customs_items": [ { "description": "T-shirt", "quantity": "1", "weight": "5", "value": "10", "hs_tariff_number": "123456", "origin_country": "US" } ] } }' ``` #### Go ```go package example import ( "fmt" "github.com/EasyPost/easypost-go/v6" ) func create() { client := easypost.New("EASYPOST_API_KEY") customsInfo, _ := client.CreateCustomsInfo( &easypost.CustomsInfo{ CustomsCertify: true, CustomsSigner: "Steve Brule", ContentsType: "merchandise", ContentsExplanation: "", RestrictionType: "none", EELPFC: "NOEEI 30.37(a)", CustomsItems: []*easypost.CustomsItem{ &easypost.CustomsItem{ Description: "T-shirt", Quantity: 1, Value: 10.00, Weight: 5, OriginCountry: "US", }, }, }, ) fmt.Println(customsInfo) } ``` #### Java ```java package customs_info; import com.easypost.exception.EasyPostException; import com.easypost.model.CustomsInfo; import com.easypost.model.CustomsItem; import com.easypost.service.EasyPostClient; import java.util.ArrayList; import java.util.HashMap; import java.util.List; public class Create { public static void main(String[] args) throws EasyPostException { EasyPostClient client = new EasyPostClient("EASYPOST_API_KEY"); HashMap customsItemMap = new HashMap(); customsItemMap.put("description", "T-shirt"); customsItemMap.put("quantity", 1); customsItemMap.put("value", 10); customsItemMap.put("weight", 5); customsItemMap.put("origin_country", "us"); customsItemMap.put("hs_tariff_number", "123456"); CustomsItem customsItem = client.customsItem.create(customsItemMap); List customsItemsList = new ArrayList(); customsItemsList.add(customsItem); HashMap params = new HashMap(); params.put("customs_certify", true); params.put("customs_signer", "Steve Brule"); params.put("contents_type", "merchandise"); params.put("contents_explanation", ""); params.put("eel_pfc", "NOEEI 30.37(a)"); params.put("restriction_type", "none"); params.put("customs_items", customsItemsList); CustomsInfo customsInfo = client.customsInfo.create(params); System.out.println(customsInfo); } } ``` #### C# ```csharp using System; using System.Collections.Generic; using System.Threading.Tasks; using EasyPost; using Newtonsoft.Json; namespace EasyPostExamples { public class Examples { public static async Task Main() { var client = new EasyPost.Client(new EasyPost.ClientConfiguration("EASYPOST_API_KEY")); EasyPost.Parameters.CustomsInfo.Create parameters = new() { CustomsCertify = true, CustomsSigner = "Steve Brule", ContentsType = "merchandise", ContentsExplanation = "", RestrictionType = "none", EelPfc = "NOEEI 30.37(a)", CustomsItems = new List() { new() { Description = "T-shirt", Quantity = 1, Weight = 5, Value = 10, HsTariffNumber = "123456", OriginCountry = "US" } } }; EasyPost.Models.API.CustomsInfo customsInfo = await client.CustomsInfo.Create(parameters); Console.WriteLine(JsonConvert.SerializeObject(customsInfo, Formatting.Indented)); } } } ``` #### Node.js ```javascript const EasyPostClient = require('@easypost/api'); const client = new EasyPostClient('EASYPOST_API_KEY'); (async () => { const customsInfo = await client.CustomsInfo.create({ eel_pfc: 'NOEEI 30.37(a)', customs_certify: true, customs_signer: 'Steve Brule', contents_type: 'merchandise', contents_explanation: '', restriction_type: 'none', restriction_comments: '', customs_items: [ { description: 'T-shirts', quantity: 1, weight: 5, value: 10, hs_tariff_number: '123456', origin_country: 'US', }, ], }); console.log(customsInfo); })(); ``` #### PHP ```php customsInfo->create([ 'eel_pfc' => 'NOEEI 30.37(a)', 'customs_certify' => true, 'customs_signer' => 'Steve Brule', 'contents_type' => 'merchandise', 'contents_explanation' => '', 'restriction_type' => 'none', 'customs_items' => [ [ 'description' => 'T-shirt', 'quantity' => 1, 'weight' => 5, 'value' => 10, 'hs_tariff_number' => '123456', 'origin_country' => 'US' ] ] ]); echo $customsInfo; ``` #### Python ```python import easypost client = easypost.EasyPostClient("EASYPOST_API_KEY") customs_info = client.customs_info.create( eel_pfc="NOEEI 30.37(a)", customs_certify=True, customs_signer="Steve Brule", contents_type="merchandise", contents_explanation="", restriction_type="none", customs_items=[ { "description": "Sweet shirts", "quantity": 2, "weight": 11, "value": 23, "hs_tariff_number": "654321", "origin_country": "US", } ], ) print(customs_info) ``` #### Ruby ```ruby require 'easypost' client = EasyPost::Client.new(api_key: 'EASYPOST_API_KEY') customs_info = client.customs_info.create( customs_certify: true, customs_signer: 'Steve Brule', contents_type: 'merchandise', contents_explanation: '', restriction_type: 'none', eel_pfc: 'NOEEI 30.37(a)', customs_items: [ { description: 'T-shirt', quantity: 1, weight: 5, value: 10, hs_tariff_number: '123456', origin_country: 'US', }, ], ) puts customs_info ``` A `CustomsInfo` object contains all administrative information for processing customs, as well as a list of `CustomsItems`. When creating a `CustomsInfo`, you may store the `id` from the response for use later in `Shipment` creation. [Note: This object is immutable after creation. Review the rendered documentation for details.] --- ## Retrieve a CustomsInfo ### Example: GET /customs_infos/:id #### cURL ```shell curl -X GET https://api.easypost.com/v2/customs_infos/cstinfo_... \ -u "EASYPOST_API_KEY": ``` #### Go ```go package example import ( "fmt" "github.com/EasyPost/easypost-go/v6" ) func retrieve() { client := easypost.New("EASYPOST_API_KEY") customsInfo, _ := client.GetCustomsInfo("cstinfo_...") fmt.Println(customsInfo) } ``` #### Java ```java package customs_info; import com.easypost.exception.EasyPostException; import com.easypost.model.CustomsInfo; import com.easypost.service.EasyPostClient; public class Retieve { public static void main(String[] args) throws EasyPostException { EasyPostClient client = new EasyPostClient("EASYPOST_API_KEY"); CustomsInfo customsInfo = client.customsInfo.retrieve("cstinfo_..."); System.out.println(customsInfo); } } ``` #### C# ```csharp using System; using System.Collections.Generic; using System.Threading.Tasks; using EasyPost; using Newtonsoft.Json; namespace EasyPostExamples { public class Examples { public static async Task Main() { var client = new EasyPost.Client(new EasyPost.ClientConfiguration("EASYPOST_API_KEY")); EasyPost.Models.API.CustomsInfo customsInfo = await client.CustomsInfo.Retrieve("cstinfo_..."); Console.WriteLine(JsonConvert.SerializeObject(customsInfo, Formatting.Indented)); } } } ``` #### Node.js ```javascript const EasyPostClient = require('@easypost/api'); const client = new EasyPostClient('EASYPOST_API_KEY'); (async () => { const customsInfo = await client.CustomsInfo.retrieve('cstinfo_...'); console.log(customsInfo); })(); ``` #### PHP ```php customsInfo->retrieve('cstinfo_...'); echo $customsInfo; ``` #### Python ```python import easypost client = easypost.EasyPostClient("EASYPOST_API_KEY") customs_info = client.customs_info.retrieve("cstinfo_...") print(customs_info) ``` #### Ruby ```ruby require 'easypost' client = EasyPost::Client.new(api_key: 'EASYPOST_API_KEY') customs_info = client.customs_info.retrieve('cstinfo_...') puts customs_info ``` A `CustomsInfo` can be retrieved by its `id`. --- Source: https://docs.easypost.com/docs/customs-items # CustomsItem A `CustomsItem` object describes goods for international shipment and should be created then included in a `CustomInfo` object. The `value` on each item can also supply product value for USPS Claims when a customs form is already on the shipment. New claims integrations should send `line_items`. --- ## CustomsItems object | Property | Type | Description | |----------|------|-------------| | id | string | Unique, begins with 'cstitem_' | | object | string | 'CustomsItem' | | description | string | Description of item being shipped | | quantity | float | Must be greater than zero | | value | float (USD) | Total value (unit value * quantity). Must be greater than zero. EasyPost can use this amount as product value for USPS Claims when the item is on the shipment's CustomsInfo. | | weight | float (oz) | Total line weight in ounces (not per-unit weight). Up to three decimal places are retained; additional decimals are truncated, not rounded. Values smaller than 0.001 oz become 0. Submit positive weights for shippable items; acceptance of a zero-valued object does not establish that shipment can be purchased. Carrier integrations may convert units and apply additional rounding or minimums, so API acceptance does not guarantee every carrier receives the original value unchanged. | | hs_tariff_number | string | Harmonized Tariff Schedule code used to classify goods for customs declarations. Typically 6 or 10 digits, e.g. "6109.10.0012". | | code | string | SKU, UPC or other product identifier | | manufacturer | string | Manufacturer of item | | eccn | string | Export Control Classification Number | | printed_commodity_identifier | string | International commodity code | | origin_country | string | Two-character country code | | currency | string | Three-character currency code. Defaults to "USD" | | created_at | datetime | When the CustomsItem was created | | updated_at | datetime | When the CustomsItem was last updated | Example Object: ```json { "id": "cstitem_4e7df04b42fa4ad4a2212620e0d8b78f", "object": "CustomsItem", "created_at": "2025-05-09T20:39:16Z", "updated_at": "2025-05-09T20:39:16Z", "description": "T-shirt", "hs_tariff_number": "123456", "origin_country": "US", "quantity": 1, "value": "10.0", "weight": 5.0, "code": "123", "mode": "test", "manufacturer": null, "currency": null, "eccn": null, "printed_commodity_identifier": null } ``` --- ## Create a CustomsItem ### Example: POST /customs_items #### cURL ```shell curl -X POST https://api.easypost.com/v2/customs_items \ -u "EASYPOST_API_KEY": \ -H 'Content-Type: application/json' \ -d '{ "customs_item": { "description": "T-shirt", "quantity": "1", "weight": "5", "value": "10", "hs_tariff_number": "123456", "origin_country": "US" } }' ``` #### Go ```go package example import ( "fmt" "github.com/EasyPost/easypost-go/v6" ) func create() { client := easypost.New("EASYPOST_API_KEY") customsItem, _ := client.CreateCustomsItem( &easypost.CustomsItem{ Description: "T-shirts", Quantity: 1, Value: 10.00, Weight: 5, OriginCountry: "US", }, ) fmt.Println(customsItem) } ``` #### Java ```java package customs_items; import com.easypost.exception.EasyPostException; import com.easypost.model.CustomsItem; import com.easypost.service.EasyPostClient; import java.util.HashMap; public class Create { public static void main(String[] args) throws EasyPostException { EasyPostClient client = new EasyPostClient("EASYPOST_API_KEY"); HashMap params = new HashMap(); params.put("description", "T-shirt"); params.put("quantity", 1); params.put("value", 10); params.put("weight", 5); params.put("origin_country", "US"); params.put("hs_tariff_number", "123456"); CustomsItem customsItem = client.customsItem.create(params); System.out.println(customsItem); } } ``` #### C# ```csharp using System; using System.Collections.Generic; using System.Threading.Tasks; using EasyPost; using Newtonsoft.Json; namespace EasyPostExamples { public class Examples { public static async Task Main() { var client = new EasyPost.Client(new EasyPost.ClientConfiguration("EASYPOST_API_KEY")); EasyPost.Parameters.CustomsItems.Create parameters = new() { Description = "T-shirt", Quantity = 1, Weight = 5, Value = 10, HsTariffNumber = "123456", OriginCountry = "US" }; EasyPost.Models.API.CustomsItem customsItem = await client.CustomsItem.Create(parameters); Console.WriteLine(JsonConvert.SerializeObject(customsItem, Formatting.Indented)); } } } ``` #### Node.js ```javascript const EasyPostClient = require('@easypost/api'); const client = new EasyPostClient('EASYPOST_API_KEY'); (async () => { const customsItem = await client.CustomsItem.create({ description: 'T-shirt', quantity: 1, value: 10, weight: 5, hs_tariff_number: '123456', origin_country: 'us', }); console.log(customsItem); })(); ``` #### PHP ```php customsItem->create([ 'description' => 'T-shirt', 'quantity' => 1, 'weight' => 5, 'value' => 10, 'hs_tariff_number' => '123456', 'origin_country' => 'US' ]); echo $customsItem; ``` #### Python ```python import easypost client = easypost.EasyPostClient("EASYPOST_API_KEY") customs_item = client.customs_item.create( description="T-shirt", quantity=1, value=10, weight=5, hs_tariff_number="123456", origin_country="us", ) print(customs_item) ``` #### Ruby ```ruby require 'easypost' client = EasyPost::Client.new(api_key: 'EASYPOST_API_KEY') customs_item = client.customs_item.create( description: 'T-shirt', quantity: 1, weight: 5, value: 10, hs_tariff_number: '123456', origin_country: 'us', ) puts customs_item ``` A `CustomsItem` contains information relating to each product within the package. When creating a `CustomsItem`, you may store the `id` from the response for use later in `CustomsInfo` creation. [Note: This object is immutable after creation. Review the rendered documentation for details.] --- ## Retrieve a CustomsItem ### Example: GET /customs_items/:id #### cURL ```shell curl -X GET https://api.easypost.com/v2/customs_items/cstitem_... \ -u "EASYPOST_API_KEY": ``` #### Go ```go package example import ( "fmt" "github.com/EasyPost/easypost-go/v6" ) func retrieve() { client := easypost.New("EASYPOST_API_KEY") customsItem, _ := client.GetCustomsItem("cstitem_...") fmt.Println(customsItem) } ``` #### Java ```java package customs_items; import com.easypost.exception.EasyPostException; import com.easypost.model.CustomsItem; import com.easypost.service.EasyPostClient; public class Retrieve { public static void main(String[] args) throws EasyPostException { EasyPostClient client = new EasyPostClient("EASYPOST_API_KEY"); CustomsItem customsItem = client.customsItem.retrieve("cstitem_..."); System.out.println(customsItem); } } ``` #### C# ```csharp using System; using System.Collections.Generic; using System.Threading.Tasks; using EasyPost; using Newtonsoft.Json; namespace EasyPostExamples { public class Examples { public static async Task Main() { var client = new EasyPost.Client(new EasyPost.ClientConfiguration("EASYPOST_API_KEY")); EasyPost.Models.API.CustomsItem customsItem = await client.CustomsItem.Retrieve("cstitem_..."); Console.WriteLine(JsonConvert.SerializeObject(customsItem, Formatting.Indented)); } } } ``` #### Node.js ```javascript const EasyPostClient = require('@easypost/api'); const client = new EasyPostClient('EASYPOST_API_KEY'); (async () => { const customsItem = await client.CustomsItem.retrieve('cstitem_...'); console.log(customsItem); })(); ``` #### PHP ```php customsItem->retrieve('cstitem_...'); echo $customsItem; ``` #### Python ```python import easypost client = easypost.EasyPostClient("EASYPOST_API_KEY") customs_item = client.customs_item.retrieve("cstitem_...") print(customs_item) ``` #### Ruby ```ruby require 'easypost' client = EasyPost::Client.new(api_key: 'EASYPOST_API_KEY') customs_item = client.customs_item.retrieve('cstitem_...') puts customs_item ``` A `CustomsItem` can be retrieved by its `id`. --- Source: https://docs.easypost.com/docs/easypost-objects # EasyPost Objects The EasyPost API consists of many object types. There are several attributes that are consistent across all objects: - **`id`:** Every EasyPost object that can be created through the API has an `id` field that is used to refer to the object in other API calls. An `id` consists of a prefix based on the object type (e.g. a `Shipment` objects has the prefix "shp\_") followed by 32 hex characters. These `id` values may be used in many API endpoints to refer to an existing object rather than specifying the full object definition; for example, when creating a `Shipment`, you may specify the `to_address` either with all fields (`street1`, `city`, `zip`, etc.) filled, or you may reuse an existing `Address` by specifying only the `id` field value as the matching `Address`'s `id`, omitting all other fields. - **`object`:** Every first-class EasyPost object includes an `object` value. This can be useful for identifying the types of nested objects, or for cases such as a webhook `Event` which can contain many different values for a `result`. For objects where there are many variant types, such as a `Fee` object, the `object` value represents the supertype, and the `type` represents the subtype for that object. - **`reference`:** Many EasyPost objects also have an optional `reference` field that may be assigned during creation. The reference values you assign may be used in place of `id` values in many API endpoints, but we recommend using the EasyPost-assigned `id` instead because IDs are guaranteed to be unique within the system, while reference uniqueness is not enforced. If your system does not enforce uniqueness on the references you submit, this may result in the wrong one of many objects with the same `reference` being picked in EasyPost's handling of your API request. - **`created_at`/`updated_at`:** Most API objects also include values for `created_at` and `updated_at`. These two fields respectively specify the time the object was created and most recently updated. These datetime fields are formatted according to ISO 8601. The majority of EasyPost API objects are immutable, meaning that once they are created, their properties **cannot** be altered. Please consider this when developing workflows that create and manage EasyPost objects. --- Source: https://docs.easypost.com/docs/embeddables # Embeddable Components Embeddable Components enable platforms and marketplaces to integrate EasyPost's pre-built UI experiences directly within their applications. A temporary session ID is obtained through the `embeddables/session` endpoint to initialize each embedded component. > Note: A Forge-enabled EasyPost account is required to create and initialize embeddable component sessions. --- ## EmbeddablesSession object | Property | Type | Description | |----------|------|-------------| | object | string | Always returns "EmbeddablesSession". | | session_id | string | Short-lived, one-time-use token that authorizes an Embeddables Components session. Must be provided to the client-side Embeddables script to initialize the component. | | created_at | timestamp | ISO 8601 timestamp indicating when the session was created. | | expires_at | timestamp | ISO 8601 timestamp indicating when the session expires. | Example Object: ```json { "object": "EmbeddablesSession", "session_id": "esess_123", "created_at": "2026-10-06T17:30:30Z", "expires_at": "2026-10-06T17:35:30Z" } ``` --- ## Create an Embeddable Session **Production Only** [Content omitted: interactive code examples. Review the rendered documentation for request and response examples.] The `embeddables/session` endpoint creates a temporary session for initializing embeddable components. This session is requested from EasyPost's API by the platform's server using its **production** API key. For detailed implementation steps and sample code, see the [Embeddable Components Guide](/guides/embeddables-guide). --- ## Additional resources - Get started with Forge - Forge Help Center --- Source: https://docs.easypost.com/docs/endshippers # EndShipper **Important**: This endpoint only works for users of the EndShipper API. If you feel this is applicable for your use case, please contact sales. The EndShipper API is for platforms purchasing postage on behalf of their users, the EndShipper. Platforms must assert the EndShipper details, as the EndShipper is ultimately responsible for what is in the box. Multiple labels purchased for the same EndShipper must use the same `EndShipper` object. `EndShipper` objects must be created prior to buying a `Shipment`. Once `EndShipper` objects have been created, you must keep track of their public ID in order to use them during a label buy. --- ## EndShipper object | Property | Type | Description | |----------|------|-------------| | object | string | "EndShipper" | | mode | string | "test" or "production" | | name | string | Name of responsible person (conditionally required) | | company | string | Name of responsible company (conditionally required) | | street1 | string | First line of the address | | street2 | string | Second line of the address | | city | string | City the address is located in | | state | string | State the address is located in | | zip | string | ZIP or postal code the address is located in | | country | string | Country code the address is located in. Must be "US" for EndShippers. | | phone | string | Phone number to reach the person or organization | | email | string | Email to reach the person or organization | Example Object: ```json { "id": "es_5e0cd0b751814935bf4826f1db99667f", "object": "EndShipper", "mode": "test", "created_at": "2025-05-09T20:39:16+00:00", "updated_at": "2025-05-09T20:39:16+00:00", "name": "FOO BAR", "company": "BAZ", "street1": "164 TOWNSEND ST UNIT 1", "street2": "", "city": "SAN FRANCISCO", "state": "CA", "zip": "94107-1990", "country": "US", "phone": "555 555-5555", "email": "FOO@EXAMPLE.COM" } ``` --- ## Create an EndShipper ### Example: POST /end_shippers #### cURL ```shell curl -X POST https://api.easypost.com/v2/end_shippers \ -u "EASYPOST_API_KEY": \ -H 'Content-Type: application/json' \ -d '{ "end_shipper": { "address": { "name": "FOO BAR", "company": "BAZ", "street1": "164 TOWNSEND STREET UNIT 1", "street2": "UNIT 1", "city": "SAN FRANCISCO", "state": "CA", "zip": "94107", "country": "US", "phone": "555-555-5555", "email": "FOO@EXAMPLE.COM" } } }' ``` #### Go ```go package example import ( "fmt" "github.com/EasyPost/easypost-go/v6" ) func create() { client := easypost.New("EASYPOST_API_KEY") endshipper, _ := client.CreateEndShipper( &easypost.Address{ Name: "FOO BAR", Company: "BAZ", Street1: "164 TOWNSEND STREET UNIT 1", Street2: "UNIT 1", City: "SAN FRANCISCO", State: "CA", Zip: "94107", Country: "US", Phone: "555-555-5555", Email: "FOO@EXAMPLE.COM", }, ) fmt.Println(endshipper) } ``` #### Java ```java package endshipper; import com.easypost.model.EndShipper; import com.easypost.service.EasyPostClient; import java.util.HashMap; public class Create { public static void main(String[] args) { EasyPostClient client = new EasyPostClient("EASYPOST_API_KEY"); HashMap params = new HashMap(); params.put("name", "FOO BAR"); params.put("company", "BAZ"); params.put("street1", "164 TOWNSEND STREET UNIT 1"); params.put("street2", "UNIT 1"); params.put("city", "SAN FRANCISCO"); params.put("state", "CA"); params.put("zip", "94107"); params.put("country", "US"); params.put("phone", "555-555-5555"); params.put("email", "FOO@EXAMPLE.COM"); EndShipper endShipper = client.endShipper.create(params); System.out.println(endShipper); } } ``` #### C# ```csharp using System; using System.Collections.Generic; using System.Threading.Tasks; using EasyPost; using Newtonsoft.Json; namespace EasyPostExamples { public class Examples { public static async Task Main() { var client = new EasyPost.Client(new EasyPost.ClientConfiguration("EASYPOST_API_KEY")); EasyPost.Parameters.EndShipper.Create parameters = new() { Name = "FOO BAR", Company = "BAZ", Street1 = "164 TOWNSEND STREET UNIT 1", Street2 = "UNIT 1", City = "SAN FRANCISCO", State = "CA", Zip = "94107", Country = "US", Phone = "555-555-5555", Email = "FOO@EXAMPLE.COM", }; EasyPost.Models.API.EndShipper endShipper = await client.EndShipper.Create(parameters); Console.WriteLine(JsonConvert.SerializeObject(endShipper, Formatting.Indented)); } } } ``` #### Node.js ```javascript const EasyPostClient = require('@easypost/api'); const client = new EasyPostClient('EASYPOST_API_KEY'); (async () => { const endShipper = await client.EndShipper.create({ name: 'FOO BAR', company: 'BAZ', street1: '164 TOWNSEND STREET UNIT 1', street2: 'UNIT 1', city: 'SAN FRANCISCO', state: 'CA', zip: '94107', country: 'US', phone: '555-555-5555', email: 'FOO@EXAMPLE.COM', }); console.log(endShipper); })(); ``` #### PHP ```php endShipper->create([ 'name' => 'FOO BAR', 'company' => 'BAZ', 'street1' => '164 TOWNSEND STREET UNIT 1', 'street2' => 'UNIT 1', 'city' => 'SAN FRANCISCO', 'state' => 'CA', 'zip' => '94107', 'country' => 'US', 'phone' => '555-555-5555', 'email' => 'FOO@EXAMPLE.COM' ]); echo $endshipper; ``` #### Python ```python import easypost client = easypost.EasyPostClient("EASYPOST_API_KEY") end_shipper = client.end_shipper.create( name="FOO BAR", company="BAZ", street1="164 TOWNSEND STREET UNIT 1", street2="UNIT 1", city="SAN FRANCISCO", state="CA", zip="94107", country="US", phone="555-555-5555", email="FOO@EXAMPLE.COM", ) print(end_shipper) ``` #### Ruby ```ruby require 'easypost' client = EasyPost::Client.new(api_key: 'EASYPOST_API_KEY') end_shipper = client.end_shipper.create( name: 'FOO BAR', company: 'BAZ', street1: '164 TOWNSEND STREET UNIT 1', street2: 'UNIT 1', city: 'SAN FRANCISCO', state: 'CA', zip: '94107', country: 'US', phone: '555-555-5555', email: 'FOO@EXAMPLE.COM', ) puts end_shipper ``` The `EndShipper` object is meant to represent the person or business entity responsible for the shipment and not necessarily the shipping location. `EndShipper` objects are fully-qualified `Address` objects and require every field to be filled, with some exceptions: 1. `name` and `company` — at least one of these fields must be filled; when both are present, `name` will take precedence 2. `street2` — this field may be left empty if the address does not include multiple lines --- ## Buy a Shipment with EndShipper ### Example: POST /shipments/:id/buy #### cURL ```shell curl -X POST https://api.easypost.com/v2/end_shippers \ -u "EASYPOST_API_KEY": \ -H 'Content-Type: application/json' \ -d '{ "end_shipper": { "address": { "name": "FOO BAR", "company": "BAZ", "street1": "164 TOWNSEND STREET UNIT 1", "street2": "UNIT 1", "city": "SAN FRANCISCO", "state": "CA", "zip": "94107", "country": "US", "phone": "555-555-5555", "email": "FOO@EXAMPLE.COM" } } }' ``` #### Go ```go package example import ( "fmt" "github.com/EasyPost/easypost-go/v6" ) func create() { client := easypost.New("EASYPOST_API_KEY") endshipper, _ := client.CreateEndShipper( &easypost.Address{ Name: "FOO BAR", Company: "BAZ", Street1: "164 TOWNSEND STREET UNIT 1", Street2: "UNIT 1", City: "SAN FRANCISCO", State: "CA", Zip: "94107", Country: "US", Phone: "555-555-5555", Email: "FOO@EXAMPLE.COM", }, ) fmt.Println(endshipper) } ``` #### Java ```java package endshipper; import com.easypost.model.EndShipper; import com.easypost.service.EasyPostClient; import java.util.HashMap; public class Create { public static void main(String[] args) { EasyPostClient client = new EasyPostClient("EASYPOST_API_KEY"); HashMap params = new HashMap(); params.put("name", "FOO BAR"); params.put("company", "BAZ"); params.put("street1", "164 TOWNSEND STREET UNIT 1"); params.put("street2", "UNIT 1"); params.put("city", "SAN FRANCISCO"); params.put("state", "CA"); params.put("zip", "94107"); params.put("country", "US"); params.put("phone", "555-555-5555"); params.put("email", "FOO@EXAMPLE.COM"); EndShipper endShipper = client.endShipper.create(params); System.out.println(endShipper); } } ``` #### C# ```csharp using System; using System.Collections.Generic; using System.Threading.Tasks; using EasyPost; using Newtonsoft.Json; namespace EasyPostExamples { public class Examples { public static async Task Main() { var client = new EasyPost.Client(new EasyPost.ClientConfiguration("EASYPOST_API_KEY")); EasyPost.Parameters.EndShipper.Create parameters = new() { Name = "FOO BAR", Company = "BAZ", Street1 = "164 TOWNSEND STREET UNIT 1", Street2 = "UNIT 1", City = "SAN FRANCISCO", State = "CA", Zip = "94107", Country = "US", Phone = "555-555-5555", Email = "FOO@EXAMPLE.COM", }; EasyPost.Models.API.EndShipper endShipper = await client.EndShipper.Create(parameters); Console.WriteLine(JsonConvert.SerializeObject(endShipper, Formatting.Indented)); } } } ``` #### Node.js ```javascript const EasyPostClient = require('@easypost/api'); const client = new EasyPostClient('EASYPOST_API_KEY'); (async () => { const endShipper = await client.EndShipper.create({ name: 'FOO BAR', company: 'BAZ', street1: '164 TOWNSEND STREET UNIT 1', street2: 'UNIT 1', city: 'SAN FRANCISCO', state: 'CA', zip: '94107', country: 'US', phone: '555-555-5555', email: 'FOO@EXAMPLE.COM', }); console.log(endShipper); })(); ``` #### PHP ```php endShipper->create([ 'name' => 'FOO BAR', 'company' => 'BAZ', 'street1' => '164 TOWNSEND STREET UNIT 1', 'street2' => 'UNIT 1', 'city' => 'SAN FRANCISCO', 'state' => 'CA', 'zip' => '94107', 'country' => 'US', 'phone' => '555-555-5555', 'email' => 'FOO@EXAMPLE.COM' ]); echo $endshipper; ``` #### Python ```python import easypost client = easypost.EasyPostClient("EASYPOST_API_KEY") end_shipper = client.end_shipper.create( name="FOO BAR", company="BAZ", street1="164 TOWNSEND STREET UNIT 1", street2="UNIT 1", city="SAN FRANCISCO", state="CA", zip="94107", country="US", phone="555-555-5555", email="FOO@EXAMPLE.COM", ) print(end_shipper) ``` #### Ruby ```ruby require 'easypost' client = EasyPost::Client.new(api_key: 'EASYPOST_API_KEY') end_shipper = client.end_shipper.create( name: 'FOO BAR', company: 'BAZ', street1: '164 TOWNSEND STREET UNIT 1', street2: 'UNIT 1', city: 'SAN FRANCISCO', state: 'CA', zip: '94107', country: 'US', phone: '555-555-5555', email: 'FOO@EXAMPLE.COM', ) puts end_shipper ``` Buy a `Shipment` and specify an `EndShipper` ID in the request. --- ## Retrieve all EndShippers ### Example: GET /end_shippers #### cURL ```shell curl -X GET "https://api.easypost.com/v2/end_shippers?page_size=5" \ -u "EASYPOST_API_KEY": ``` #### Go ```go package example import ( "fmt" "github.com/EasyPost/easypost-go/v6" ) func list() { client := easypost.New("EASYPOST_API_KEY") endshippers, _ := client.ListEndShippers( &easypost.ListOptions{ PageSize: 5, }, ) fmt.Println(endshippers) } ``` #### Java ```java package endshipper; import com.easypost.model.EndShipperCollection; import com.easypost.service.EasyPostClient; import java.util.HashMap; public class All { public static void main(String[] args) { EasyPostClient client = new EasyPostClient("EASYPOST_API_KEY"); HashMap params = new HashMap<>(); params.put("page_size", 5); EndShipperCollection endShippers = client.endShipper.all(params); System.out.println(endShippers); } } ``` #### C# ```csharp using System; using System.Collections.Generic; using System.Threading.Tasks; using EasyPost; using Newtonsoft.Json; namespace EasyPostExamples { public class Examples { public static async Task Main() { var client = new EasyPost.Client(new EasyPost.ClientConfiguration("EASYPOST_API_KEY")); EasyPost.Parameters.EndShipper.All parameters = new() { PageSize = 5 }; EasyPost.Models.API.EndShipperCollection endShipperCollection = await client.EndShipper.All(parameters); Console.WriteLine(JsonConvert.SerializeObject(endShipperCollection, Formatting.Indented)); } } } ``` #### Node.js ```javascript const EasyPostClient = require('@easypost/api'); const client = new EasyPostClient('EASYPOST_API_KEY'); (async () => { const endShippers = await client.EndShipper.all({ page_size: 5, }); console.log(endShippers); })(); ``` #### PHP ```php endShipper->all([ 'page_size' => 5 ]); echo $endshippers; ``` #### Python ```python import easypost client = easypost.EasyPostClient("EASYPOST_API_KEY") end_shippers = client.end_shipper.all(page_size=5) print(end_shippers) ``` #### Ruby ```ruby require 'easypost' client = EasyPost::Client.new(api_key: 'EASYPOST_API_KEY') end_shippers = client.end_shipper.all( page_size: 5, ) puts end_shippers ``` List the `EndShippers` that have been created. --- ## Retrieve an EndShipper ### Example: GET /end_shippers/:id #### cURL ```shell curl -X GET https://api.easypost.com/v2/end_shippers/es_... \ -u "EASYPOST_API_KEY": ``` #### Go ```go package example import ( "fmt" "github.com/EasyPost/easypost-go/v6" ) func retrieve() { client := easypost.New("EASYPOST_API_KEY") retrievedEndShipper, _ := client.GetEndShipper("es_...") fmt.Println(retrievedEndShipper) } ``` #### Java ```java package endshipper; import com.easypost.model.EndShipper; import com.easypost.service.EasyPostClient; public class Retrieve { public static void main(String[] args) { EasyPostClient client = new EasyPostClient("EASYPOST_API_KEY"); EndShipper endShipper = client.endShipper.retrieve("es_..."); System.out.println(endShipper); } } ``` #### C# ```csharp using System; using System.Collections.Generic; using System.Threading.Tasks; using EasyPost; using Newtonsoft.Json; namespace EasyPostExamples { public class Examples { public static async Task Main() { var client = new EasyPost.Client(new EasyPost.ClientConfiguration("EASYPOST_API_KEY")); EasyPost.Models.API.EndShipper endShipper = await client.EndShipper.Retrieve("es_..."); Console.WriteLine(JsonConvert.SerializeObject(endShipper, Formatting.Indented)); } } } ``` #### Node.js ```javascript const EasyPostClient = require('@easypost/api'); const client = new EasyPostClient('EASYPOST_API_KEY'); (async () => { const endShipper = await client.EndShipper.retrieve('es_...'); console.log(endShipper); })(); ``` #### PHP ```php endShipper->retrieve('es_...'); echo $endshipper; ``` #### Python ```python import easypost client = easypost.EasyPostClient("EASYPOST_API_KEY") end_shipper = client.end_shipper.retrieve("es_...") print(end_shipper) ``` #### Ruby ```ruby require 'easypost' client = EasyPost::Client.new(api_key: 'EASYPOST_API_KEY') end_shipper = client.end_shipper.retrieve('es_...') puts end_shipper ``` Similar to retrieving a list of `EndShippers`, you can retrieve an individual `EndShipper`. --- ## Update an EndShipper ### Example: PUT /end_shippers/:id #### cURL ```shell curl -X PUT https://api.easypost.com/v2/end_shippers/es_... \ -u "EASYPOST_API_KEY": \ -H 'Content-Type: application/json' \ -d '{ "end_shipper": { "address": { "name": "NEW NAME", "company": "BAZ", "street1": "164 TOWNSEND STREET UNIT 1", "street2": "UNIT 1", "city": "SAN FRANCISCO", "state": "CA", "zip": "94107", "country": "US", "phone": "555-555-5555", "email": "FOO@EXAMPLE.COM" } } }' ``` #### Go ```go package example import ( "fmt" "github.com/EasyPost/easypost-go/v6" ) func update() { client := easypost.New("EASYPOST_API_KEY") endShipper, _ := client.GetEndShipper("es_...") endShipper.Name = "NEW NAME" endShipper.Company = "BAZ" endShipper.Street1 = "164 TOWNSEND STREET UNIT 1" endShipper.Street2 = "UNIT 1" endShipper.City = "San Francisco" endShipper.State = "CA" endShipper.Zip = "94107" endShipper.Country = "US" endShipper.Phone = "555-555-5555" endShipper.Email = "FOO@EXAMPLE.COM" updatedEndShipper, _ := client.UpdateEndShippers(endShipper) fmt.Println(updatedEndShipper) } ``` #### Java ```java package endshipper; import com.easypost.model.EndShipper; import com.easypost.service.EasyPostClient; import java.util.HashMap; public class Update { public static void main(String[] args) { EasyPostClient client = new EasyPostClient("EASYPOST_API_KEY"); HashMap params = new HashMap(); params.put("name", "NEW NAME"); params.put("company", "BAZ"); params.put("street1", "164 TOWNSEND STREET UNIT 1"); params.put("street2", "UNIT 1"); params.put("city", "SAN FRANCISCO"); params.put("state", "CA"); params.put("zip", "94107"); params.put("country", "US"); params.put("phone", "555-555-5555"); params.put("email", "FOO@EXAMPLE.COM"); EndShipper endShipper = client.endShipper.update("es_...", params); System.out.println(endShipper); } } ``` #### C# ```csharp using System; using System.Collections.Generic; using System.Threading.Tasks; using EasyPost; using Newtonsoft.Json; namespace EasyPostExamples { public class Examples { public static async Task Main() { var client = new EasyPost.Client(new EasyPost.ClientConfiguration("EASYPOST_API_KEY")); // Updating an EndShipper requires all the original data to be sent back + the updated data EasyPost.Parameters.EndShipper.Update parameters = new() { Name = "NEW NAME", Company = "BAZ", Street1 = "164 TOWNSEND STREET UNIT 1", Street2 = "UNIT 1", City = "SAN FRANCISCO", State = "CA", Zip = "94107", Country = "US", Phone = "555-555-5555", Email = "FOO@EXAMPLE.COM", }; EasyPost.Models.API.EndShipper endShipper = await client.EndShipper.Update("es_...", parameters); Console.WriteLine(JsonConvert.SerializeObject(endShipper, Formatting.Indented)); } } } ``` #### Node.js ```javascript const EasyPostClient = require('@easypost/api'); const client = new EasyPostClient('EASYPOST_API_KEY'); (async () => { const updatedEndShipper = await client.EndShipper.update('es_...', { name: 'NEW NAME', company: 'BAZ', street1: '164 TOWNSEND STREET UNIT 1', street2: 'UNIT 1', city: 'SAN FRANCISCO', state: 'CA', zip: '94107', country: 'US', phone: '555-555-5555', email: 'FOO@EXAMPLE.COM', }); console.log(updatedEndShipper); })(); ``` #### PHP ```php endShipper->update( 'es_...', [ 'name' => 'NEW NAME', 'company' => 'BAZ', 'street1' => '164 TOWNSEND STREET UNIT 1', 'street2' => 'UNIT 1', 'city' => 'SAN FRANCISCO', 'state' => 'CA', 'zip' => '94107', 'country' => 'US', 'phone' => '555-555-5555', 'email' => 'FOO@EXAMPLE.COM', ] ); echo $endShipper; ``` #### Python ```python import easypost client = easypost.EasyPostClient("EASYPOST_API_KEY") end_shipper = client.end_shipper.update( "es_...", name="NEW NAME", company="BAZ", street1="164 TOWNSEND STREET UNIT 1", street2="UNIT 1", city="SAN FRANCISCO", state="CA", zip="94107", country="US", phone="555-555-5555", email="FOO@EXAMPLE.COM", ) print(end_shipper) ``` #### Ruby ```ruby require 'easypost' client = EasyPost::Client.new(api_key: 'EASYPOST_API_KEY') end_shipper = client.end_shipper.update( 'es_...', { name: 'New Name', street1: '388 Townsend St', street2: 'Apt 20', city: 'San Francisco', state: 'CA', zip: '94107', country: 'US', email: 'test@example.com', phone: '5555555555', }, ) puts end_shipper ``` An `EndShipper` object may be updated using the EndShipper API. All required fields for creating an `EndShipper` are required in an update request. Partial updates are not supported. --- Source: https://docs.easypost.com/docs/errors # Errors In the event of a client or server error, the response will contain a `4xx` or `5xx` status code, respectively, accompanied by a well-formed JSON body describing the issue, e.g., a required field was omitted. Each client library will encapsulate these errors and raise an exception, in addition to other exceptional cases, such as network failures. It is recommended to handle exceptions gracefully and to report any issues to [support@easypost.com](mailto:support@easypost.com?subject=Error). Please see our Errors Guide for more information on handling the various error formats that can be returned from the API. --- ## Error object | Property | Type | Description | |----------|------|-------------| | code | string | Machine-readable description of the problem | | message | string | Human-readable description of the problem | | errors | FieldError or string array | Breakdown of errors for specific fields in the request. Errors can be returned as an array of objects or strings and must be handled accordingly | Example Object: ```json { "code": "ADDRESS.VERIFY.FAILURE", "message": "Address not found", "errors": [ { "field": "address", "message": "Address not found", "suggestion": null }, { "field": "street1", "message": "House number is missing", "suggestion": null } ] } ``` --- ## FieldError object | Property | Type | Description | |----------|------|-------------| | field | string | Field of the request that the error describes | | message | string | Human-readable description of the problem | | suggestion | string | Occasional insight on how to correct the error | Example Object: ```json { "field": "street1", "message": "House number is missing", "suggestion": null } ``` --- ## AddressVerificationFieldError object | Property | Type | Description | |----------|------|-------------| | code | string | Machine-readable description of the problem | | field | string | Field of the request that the error describes | | message | string | Human-readable description of the problem | | suggestion | string | Occasional insight on how to correct the error | Example Object: ```json { "field": "address", "message": "Address not found", "suggestion": null } ``` --- ## Common HTTP Status Codes [Content omitted: parameter list rendered dynamically. Review the rendered documentation for complete parameter details.] --- Source: https://docs.easypost.com/docs/events/payloads # Payloads A `Payload` represents an attempt by EasyPost to send an `Event` to a `Webhook`. An `Event` can have multiple `Payloads`. For instance, if there is a failure to deliver a `Webhook`, an `Event` would have multiple payloads, one for each attempt to deliver the `Event` to the `Webhook`. `Payload` can be useful for debugging webhook delivery and when initially setting up EasyPost webhooks. --- ## Payload object | Property | Type | Description | |----------|------|-------------| | object | string | "Payload" | | mode | string | "test" or "production" | | request_url | string | The URL that the request was sent to (the Webhook URL) | | request_body | string | The body included in the request to the configured Webhook | | request_headers | object | The headers included in the request to the configured Webhook | | response_code | int | The status code returned by the webhook server | | response_body | string | The body returned by the webhook server | | response_headers | object | The headers returned by the webhook server | | total_time | int | How long the request to the configured Webhook took to complete | | created_at | datetime | When the Payload was created | | updated_at | datetime | When the Payload was last updated | Example Object: ```json { "id": "payload_734d47163d0711ecb29421da38a2f124", "object": "Payload", "created_at": "2021-11-04T00:37:55Z", "updated_at": "2021-11-04T01:14:18Z", "request_url": "https://api.example.com/webhook", "request_headers": { "Accept": "application/json", "Content-Type": "application/json", "User-Agent": "Go-http-client/1.1" }, "request_body": "{\"key\":\"value\"}", "response_code": 200, "response_headers": { "Content-Type": "application/json; charset=utf-8", "Date": "Tue, 02 Nov 2021 23:37:55 GMT", "Server": "nginx/1.19.6", "X-Content-Type-Options": "nosniff", "X-Frame-Options": "SAMEORIGIN", "X-Request-Id": "a1b2c3d4e5f6g7h8i9j0", "X-Runtime": "0.001000", "X-Xss-Protection": "1; mode=block" }, "total_time": 34 } ``` --- ## Retrieve all Payloads ### Example: GET /events/:event_id/payloads #### cURL ```shell curl -X GET https://api.easypost.com/v2/events/evt_.../payloads/payload_... \ -u "EASYPOST_API_KEY": ``` #### Go ```go package example import ( "fmt" "github.com/EasyPost/easypost-go/v6" ) func retrieve() { client := easypost.New("EASYPOST_API_KEY") payload, _ := client.GetEventPayload("evt_...", "payload_...") fmt.Println(payload) } ``` #### Java ```java package events; import com.easypost.exception.EasyPostException; import com.easypost.model.Payload; import com.easypost.service.EasyPostClient; public class RetrievePayload { public static void main(String[] args) throws EasyPostException { EasyPostClient client = new EasyPostClient("EASYPOST_API_KEY"); Payload payload = client.event.retrievePayload("evt_...", "payload_..."); System.out.println(payload); } } ``` #### C# ```csharp using System; using System.Collections.Generic; using System.Threading.Tasks; using EasyPost; using Newtonsoft.Json; namespace EasyPostExamples { public class Examples { public static async Task Main() { var client = new EasyPost.Client(new EasyPost.ClientConfiguration("EASYPOST_API_KEY")); EasyPost.Models.API.Payload payload = await client.Event.RetrievePayload("evt_...", "payload_..."); Console.WriteLine(JsonConvert.SerializeObject(payload, Formatting.Indented)); } } } ``` #### Node.js ```javascript const EasyPostClient = require('@easypost/api'); const client = new EasyPostClient('EASYPOST_API_KEY'); (async () => { const payload = await client.Event.retrievePayload('evt_...', 'payload_...'); console.log(payload); })(); ``` #### PHP ```php event->retrievePayload('evt_...', 'payload_...'); echo $payload; ``` #### Python ```python import easypost client = easypost.EasyPostClient("EASYPOST_API_KEY") payload = client.event.retrieve_payload("evt_...", "payload_...") print(payload) ``` #### Ruby ```ruby require 'easypost' client = EasyPost::Client.new(api_key: 'EASYPOST_API_KEY') payload = client.event.retrieve_payload('evt_...', 'payload_...') puts payload ``` Retrieve all `Payloads` by `Event` ID. --- ## Retrieve a Payload ### Example: GET /events/:event_id/payloads/:payload_id #### cURL ```shell curl -X GET https://api.easypost.com/v2/events/evt_.../payloads/payload_... \ -u "EASYPOST_API_KEY": ``` #### Go ```go package example import ( "fmt" "github.com/EasyPost/easypost-go/v6" ) func retrieve() { client := easypost.New("EASYPOST_API_KEY") payload, _ := client.GetEventPayload("evt_...", "payload_...") fmt.Println(payload) } ``` #### Java ```java package events; import com.easypost.exception.EasyPostException; import com.easypost.model.Payload; import com.easypost.service.EasyPostClient; public class RetrievePayload { public static void main(String[] args) throws EasyPostException { EasyPostClient client = new EasyPostClient("EASYPOST_API_KEY"); Payload payload = client.event.retrievePayload("evt_...", "payload_..."); System.out.println(payload); } } ``` #### C# ```csharp using System; using System.Collections.Generic; using System.Threading.Tasks; using EasyPost; using Newtonsoft.Json; namespace EasyPostExamples { public class Examples { public static async Task Main() { var client = new EasyPost.Client(new EasyPost.ClientConfiguration("EASYPOST_API_KEY")); EasyPost.Models.API.Payload payload = await client.Event.RetrievePayload("evt_...", "payload_..."); Console.WriteLine(JsonConvert.SerializeObject(payload, Formatting.Indented)); } } } ``` #### Node.js ```javascript const EasyPostClient = require('@easypost/api'); const client = new EasyPostClient('EASYPOST_API_KEY'); (async () => { const payload = await client.Event.retrievePayload('evt_...', 'payload_...'); console.log(payload); })(); ``` #### PHP ```php event->retrievePayload('evt_...', 'payload_...'); echo $payload; ``` #### Python ```python import easypost client = easypost.EasyPostClient("EASYPOST_API_KEY") payload = client.event.retrieve_payload("evt_...", "payload_...") print(payload) ``` #### Ruby ```ruby require 'easypost' client = EasyPost::Client.new(api_key: 'EASYPOST_API_KEY') payload = client.event.retrieve_payload('evt_...', 'payload_...') puts payload ``` A `Payload` must be retrieved with both an `Event` ID and `Payload` ID. --- Source: https://docs.easypost.com/docs/events # Event Webhook `Events` are triggered by changes in objects you've created via the API. Every time an `Event` related to one of your objects is created, EasyPost guarantees at least one POST request will be sent to each of the webhook URLs set up for your account. For this reason, we strongly encourage your webhook handler to be idempotent. See the webhooks guide for more information. --- ## Possible Event Types ### Batch - A "batch.created" `Event` is created when the initial creation of a `Batch` object is complete. - A "batch.updated" `Event` is created whenever the status of a `Batch` object changes. ### Claims - A "claim.submitted" `Event` is created when a claim is submitted through the EasyPost claim form or via the API. - A "claim.cancelled" `Event` is created when an existing claim is cancelled, either through a customer request or by EasyPost due to eligibility or processing requirements. - A "claim.updated" `Event` is created whenever the status or details of an in-progress claim change, including `in_review` and `needs_action`. - A "claim.rejected" `Event` is created when a claim is denied. Show `result.status_detail`. When EasyPost knows the gap, that sentence is the one the claims automation sends, such as "We could not approve this claim because we did not receive a purchase invoice or receipt that shows the item and its value." Otherwise it is a shorter reason such as "Item not covered under policy". - A "claim.approved" `Event` is created when a claim is approved in full or in part. `result.status` is `approved` or `approved_partial`. `result.approved_amount` is the amount EasyPost will pay. - A "claim.message" `Event` is created when EasyPost sends a claim follow-up, and when a reply is recorded. See the Claim Messages guide. `result` is a `ClaimMessage`. Use `direction` to tell an EasyPost follow-up (`outbound`) from a reply (`inbound`). ### Insurance - An "insurance.purchased" `Event` is created whenever a standalone `Insurance` completes purchasing and reporting to the insurer. - An "insurance.cancelled" `Event` is created whenever a standalone `Insurance` fails purchasing, is refunded to your account balance, and is not reported to the insurer. ### Payment - A “payment.created” `Event` is created when a bank account or credit card is successfully charged for a transaction that generates a `PaymentLog`. This includes charges used to fund the EasyPost wallet. For credit card charges, this event indicates that the charge is complete and the account balance has already been updated. For bank account transfers (ACH), this event indicates that the transfer process has begun; the transfer may still fail at a later stage. - A "payment.completed" `Event` is created when a bank account transfer is successfully completed and credited to your account balance. This event indicates that the accounting for that transfer is now complete. - A "payment.failed" `Event` is created when a bank account transfer or credit card charge has an issue and cannot be completed. For bank account transfers that fail your account balance may see a failure deduction and an EasyPost could possibly need to get in contact with you about your account status. ### Refund - A "refund.successful" `Event` is created whenever a non-instantaneous `Refund` request is completed. USPS is the best example of this, as USPS postage takes up to 15 days to be refunded after the initial refund creation. ### Report - A "report.new" `Event` is created when a `Report` object is initially created. The report won't be immediately ready for download. - A "report.empty" `Event` is created when a `Report` did not generate because there was no data in the specified date range. - A "report.available" `Event` is created when a `Report` becomes available to download. - A "report.failed" `Event` is created when a `Report` fails to generate. ### ScanForm - A "scan_form.created" `Event` is created when the initial creation of a `ScanForm` object is complete. - A "scan_form.updated" `Event` is created whenever the status of a `ScanForm` object changes. ### Shipment Invoice - A "shipment.invoice.created" `Event` is created when a `ShipmentInvoice` object is initially created. - A "shipment.invoice.updated" `Event` is created if a `ShipmentInvoice` is adjusted and updated. ### Tracker - A "tracker.created" `Event` is created when the initial creation of a `Tracker` object is complete. - A "tracker.updated" `Event` is created whenever a `Tracker` object gets successfully updated. --- ## Event object | Property | Type | Description | |----------|------|-------------| | object | string | "Event" | | mode | string | "test" or "production" | | description | string | Result type and event name. See Possible Event Types for more information. | | previous_attributes | object | Previous values of relevant result attributes | | result | object | The object associated with the Event. See the object attribute on the result to determine its specific type. This field will not be returned when retrieving events directly from the API. | | status | string | The current status of the event. Possible values: "completed" "failed" "in_queue" "retrying" | | pending_urls | string array | Webhook URLs that have not yet been successfully notified as of the time this webhook event was sent. The URL receiving the Event will still be listed in pending_urls, as will any other URLs that receive the Event at the same time. | | completed_urls | string array | Webhook URLs that have already been successfully notified as of the time this webhook was sent | | created_at | datetime | When the Event was created | | updated_at | datetime | When the Event was last updated | Example Object: ```json { "mode": "production", "description": "batch.created", "previous_attributes": { "state": "purchasing" }, "pending_urls": ["example.com/easypost-webhook"], "completed_urls": [], "created_at": "2015-12-03T19:09:19Z", "updated_at": "2015-12-03T19:09:19Z", "result": { "id": "batch_...", "object": "Batch", "mode": "production", "state": "purchased", "num_shipments": 1, "reference": null, "created_at": "2015-12-03T19:09:19Z", "updated_at": "2015-12-03T19:09:19Z", "scan_form": null, "shipments": [ { "batch_status": "postage_purchased", "batch_message": null, "id": "shp_a5b1348307694736aaqqqq8fqda53f93" } ], "status": { "created": 0, "queued_for_purchase": 0, "creation_failed": 0, "postage_purchased": 1, "postage_purchase_failed": 0 }, "pickup": null, "label_url": null }, "id": "evt_...", "object": "Event" } ``` --- ## Retrieve all Events ### Example: GET /events #### cURL ```shell curl -X GET "https://api.easypost.com/v2/events?page_size=5" \ -u "EASYPOST_API_KEY": ``` #### Go ```go package example import ( "fmt" "github.com/EasyPost/easypost-go/v6" ) func list() { client := easypost.New("EASYPOST_API_KEY") events, _ := client.ListEvents( &easypost.ListOptions{ PageSize: 5, }, ) fmt.Println(events) } ``` #### Java ```java package events; import com.easypost.exception.EasyPostException; import com.easypost.model.EventCollection; import com.easypost.service.EasyPostClient; import java.util.HashMap; public class All { public static void main(String[] args) throws EasyPostException { EasyPostClient client = new EasyPostClient("EASYPOST_API_KEY"); HashMap params = new HashMap<>(); params.put("page_size", 5); EventCollection events = client.event.all(params); System.out.println(events); } } ``` #### C# ```csharp using System; using System.Collections.Generic; using System.Threading.Tasks; using EasyPost; using Newtonsoft.Json; namespace EasyPostExamples { public class Examples { public static async Task Main() { var client = new EasyPost.Client(new EasyPost.ClientConfiguration("EASYPOST_API_KEY")); EasyPost.Parameters.Event.All parameters = new() { PageSize = 5, }; EasyPost.Models.API.EventCollection events = await client.Event.All(parameters); Console.WriteLine(JsonConvert.SerializeObject(events, Formatting.Indented)); } } } ``` #### Node.js ```javascript const EasyPostClient = require('@easypost/api'); const client = new EasyPostClient('EASYPOST_API_KEY'); (async () => { const events = await client.Event.all({ page_size: 5, }); console.log(events); })(); ``` #### PHP ```php event->all([ 'page_size' => 5 ]); echo $events; ``` #### Python ```python import easypost client = easypost.EasyPostClient("EASYPOST_API_KEY") events = client.event.all(page_size=5) print(events) ``` #### Ruby ```ruby require 'easypost' client = EasyPost::Client.new(api_key: 'EASYPOST_API_KEY') events = client.event.all( page_size: 5, ) puts events ``` A list of all `Event` objects associated with the given `API Key` can also be retrieved. See the Pagination section of our docs for more details on retrieving all records when multiple pages are available. --- ## Retrieve an Event ### Example: GET /events/:id #### cURL ```shell curl -X GET https://api.easypost.com/v2/events/evt_... \ -u "EASYPOST_API_KEY": ``` #### Go ```go package example import ( "fmt" "github.com/EasyPost/easypost-go/v6" ) func retrieve() { client := easypost.New("EASYPOST_API_KEY") event, _ := client.GetEvent("evt_...") fmt.Println(event) } ``` #### Java ```java package events; import com.easypost.exception.EasyPostException; import com.easypost.model.Event; import com.easypost.service.EasyPostClient; public class Retrieve { public static void main(String[] args) throws EasyPostException { EasyPostClient client = new EasyPostClient("EASYPOST_API_KEY"); Event event = client.event.retrieve("evt_..."); System.out.println(event); } } ``` #### C# ```csharp using System; using System.Collections.Generic; using System.Threading.Tasks; using EasyPost; using Newtonsoft.Json; namespace EasyPostExamples { public class Examples { public static async Task Main() { var client = new EasyPost.Client(new EasyPost.ClientConfiguration("EASYPOST_API_KEY")); EasyPost.Models.API.Event @event = await client.Event.Retrieve("evt_..."); Console.WriteLine(JsonConvert.SerializeObject(@event, Formatting.Indented)); } } } ``` #### Node.js ```javascript const EasyPostClient = require('@easypost/api'); const client = new EasyPostClient('EASYPOST_API_KEY'); (async () => { const event = await client.Event.retrieve('evt_...'); console.log(event); })(); ``` #### PHP ```php event->retrieve('evt_...'); echo $event; ``` #### Python ```python import easypost client = easypost.EasyPostClient("EASYPOST_API_KEY") event = client.event.retrieve("evt_...") print(event) ``` #### Ruby ```ruby require 'easypost' client = EasyPost::Client.new(api_key: 'EASYPOST_API_KEY') event = client.event.retrieve('evt_...') puts event ``` An `Event` can be retrieved by its `id`. --- Source: https://docs.easypost.com/docs/fees # Fee `Fee` objects are used to represent the breakdown of postage related charges made when purchasing an item on EasyPost. Shipments with postage collected by EasyPost (as opposed to shipments with postage collected directly by the carrier) will have a "PostageFee" according to the postage amount. Insurance on a shipment will add an "InsuranceFee" with the insurance premium (not the covered value) for the amount. --- ## Fee object | Property | Type | Description | |----------|------|-------------| | object | string | "Fee" | | amount | string | USD value with sub-cent precision | | charged | boolean | Whether EasyPost has successfully charged your account for the fee | | refunded | boolean | Whether the fee has been refunded successfully | Example Object: ```json { "object": "Fee", "type": "PostageFee", "amount": "8.20000", "charged": true, "refunded": false } ``` --- Source: https://docs.easypost.com/docs/insurance/claims # Claims The `Claims API` allows shippers to automate submitting and managing insurance claims for lost, damaged, or stolen packages. This endpoint streamlines claim submissions and provides an automated experience. Claims can be submitted via the EasyPost Dashboard, a Claim Submission Form, or the Claims API. For USPS carrier indemnity claims on EasyPost-purchased labels (EP Guard), use the USPS Claims API instead. Do not send those through `/claims`. --- ## Functionality The Claims endpoint offers the following functionalities: - **Claims Creation**: Accepts necessary information to create a claim. - **Claims Validation**: Ensures claims meet specific criteria before processing. - **Claims Storage**: Stores claim details and attachments. - **Claims Responses**: Provides automated responses for successful and unsuccessful claims. - **Claim Messages**: Delivers follow-ups to your system and accepts replies with attachments. See the Claim Messages Guide. --- ## Claims process 1. **Claim Submission**: The claim is submitted via the EasyPost Dashboard, a Claim Submission Form, or Claims API endpoint. 2. **Claim Validation**: The system validates the claim to ensure it meets the necessary criteria (e.g., valid tracking code, proper claim type, sufficient evidence for the type of claim). 3. **Claim Storage**: Once validated, the claim details and attachments are stored. 4. **Claim Review**: The claim undergoes a review process, which may involve manual review by the support team to verify the claim's validity and completeness. 5. **Claim Updates**: The status of the claim is updated based on the outcome of the review. Possible statuses include: 1. submitted 2. in_review 3. approved 4. approved_partial 5. rejected 6. cancelled 7. needs_action 6. **Automated Response**: An automated response is sent to the user with the current status of the claim. 7. **Notifications**: Webhooks report follow-ups, replies, approval, and denial. See the Claim Messages Guide. Send replies with Create a Claim Message. 8. **Claim Resolution**: Approved claims are paid. `approved_amount` is the amount. Rejected claims put the denial reason in `status_detail`. --- ## Claim object | Property | Type | Description | |----------|------|-------------| | id | string | Unique identifier for the claim. | | object | string | Type of object, which is 'Claim' | | insurance_id | string | Identifier for the associated insurance. | | shipment_id | string | Identifier for the associated shipment. | | reference | string | The reference for this Claim, if any | | tracking_code | string | Tracking code for the shipment. | | status | enum | submitted in_review approved rejected approved_partial cancelled needs_action | | status_detail | string | Reason for the current status. On a rejected claim, show this sentence. It names the missing or unclear proof when EasyPost knows which file that was. | | status_timestamp | datetime | Timestamp for when the status changed (could differ from the updated_at field, which is specific to the Claim object). | | type | enum | Type of claim being filed: loss, theft, damage | | history | ClaimHistoryEntry array | History of status changes for the Claim. | | insurance_amount | string | Amount of insurance coverage. | | requested_amount | string | Amount of the claim. When the submitted amount is above the purchased insurance coverage, this is that coverage amount. | | approved_amount | string | Amount approved for reimbursement. | | salvage_value | string | Salvage value of the damaged item. | | description | string | Detailed description of of the claim. | | attachments | array | A list of links to supporting evidence attachments. | | recipient_name | string | The name of the entity to be paid from EasyPost for this Insurance Claim. | | contact_email | string | The email of the entity to be paid from EasyPost for this Insurance Claim. | | payment_method | enum | Method of payment for the claim reimbursement: mailed_check easypost_wallet | | check_delivery_address | string | Address where the check should be mailed, if applicable. | | created_at | datetime | Timestamp for when the claim was created. | | updated_at | datetime | Timestamp for the last update to the claim. | Example Object: ```json { "approved_amount": null, "attachments": [ "https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20250512/a915d0e238074fff9729afa1bfb87a0e.png", "https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20250512/3020f31a57374dc3ace477f7a4ec860d.png", "https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20250512/88aada9e505f4e77bd6060710d78e497.png" ], "check_delivery_address": null, "contact_email": "test@example.com", "created_at": "2025-05-12T19:08:04Z", "description": "Test description", "history": [ { "status": "submitted", "status_detail": "Claim was created.", "timestamp": "2025-05-12T19:08:04Z" } ], "id": "clm_09d89e88a0c943d59018bc26b041c41c", "insurance_amount": "100.00", "insurance_id": "ins_da31156b6335407da23ee06fa2fe8a28", "mode": "test", "object": "Claim", "payment_method": "easypost_wallet", "recipient_name": null, "requested_amount": "100.00", "salvage_value": null, "shipment_id": "shp_531f76e4a4de491183f5cabb738cb828", "status": "submitted", "status_detail": "Claim was created.", "status_timestamp": "2025-05-12T19:08:04Z", "tracking_code": "9405500208303109888319", "type": "damage", "updated_at": "2025-05-12T19:08:04Z" } ``` --- ## ClaimHistoryEntry Object | Property | Type | Description | |----------|------|-------------| | status | enum | submitted, in_review, approved, rejected, approved_partial, cancelled, needs_action | | status_detail | string | Reason recorded for that status. On rejected, this is the denial sentence. | | status_timestamp | datetime | Timestamp for when the status changed (could differ from the updated_at field, which is specific to the Claim object). | Example Object: ```json { "approved_amount": null, "attachments": [ "https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20250512/a915d0e238074fff9729afa1bfb87a0e.png", "https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20250512/3020f31a57374dc3ace477f7a4ec860d.png", "https://easypost-files.s3-us-west-2.amazonaws.com/insurance/20250512/88aada9e505f4e77bd6060710d78e497.png" ], "check_delivery_address": null, "contact_email": "test@example.com", "created_at": "2025-05-12T19:08:04Z", "description": "Test description", "history": [ { "status": "submitted", "status_detail": "Claim was created.", "timestamp": "2025-05-12T19:08:04Z" } ], "id": "clm_09d89e88a0c943d59018bc26b041c41c", "insurance_amount": "100.00", "insurance_id": "ins_da31156b6335407da23ee06fa2fe8a28", "mode": "test", "object": "Claim", "payment_method": "easypost_wallet", "recipient_name": null, "requested_amount": "100.00", "salvage_value": null, "shipment_id": "shp_531f76e4a4de491183f5cabb738cb828", "status": "submitted", "status_detail": "Claim was created.", "status_timestamp": "2025-05-12T19:08:04Z", "tracking_code": "9405500208303109888319", "type": "damage", "updated_at": "2025-05-12T19:08:04Z" } ``` --- ## Create a Claim ### Example: POST /claims #### cURL ```shell curl -X POST https://api.easypost.com/v2/claims \ -u "EASYPOST_API_KEY": \ -H 'Content-Type: application/json' \ -d '{ "type": "damage", "email_evidence_attachments": ["REPLACE_WITH_BASE64_STRING"], "invoice_attachments": ["REPLACE_WITH_BASE64_STRING"], "supporting_documentation_attachments": ["REPLACE_WITH_BASE64_STRING"], "description": "Test description", "contact_email": "test@example.com", "tracking_code": "YOUR_TRACKING_CODE", "amount": "100.00" }' ``` #### Go ```go package example import ( "fmt" "github.com/EasyPost/easypost-go/v6" ) func create() { client := easypost.New("EASYPOST_API_KEY") claim, _ := client.CreateClaim( &easypost.CreateClaimParameters{ Amount: 100.00, TrackingCode: "EZ1000000001", EmailEvidenceAttachments: []string{"REPLACE_WITH_BASE64_STRING"}, InvoiceAttachments: []string{"REPLACE_WITH_BASE64_STRING"}, SupportingDocumentationAttachments: []string{"REPLACE_WITH_BASE64_STRING"}, Description: "Test Description", ContactEmail: "test@example.com", }, ) fmt.Println(claim) } ``` #### Java ```java package claims; import com.easypost.exception.EasyPostException; import com.easypost.model.Claim; import com.easypost.service.EasyPostClient; import java.util.HashMap; public class Create { public static void main(String[] args) throws EasyPostException { EasyPostClient client = new EasyPostClient("EASYPOST_API_KEY"); HashMap params = new HashMap(); params.put("type", "damage"); params.put("email_evidence_attachments", new String[]{"REPLACE_WITH_BASE64_STRING"}); params.put("invoice_attachments", new String[]{"REPLACE_WITH_BASE64_STRING"}); params.put("supporting_documentation_attachments", new String[]{"REPLACE_WITH_BASE64_STRING"}); params.put("description", "Test Description"); params.put("contact_email", "test@example.com"); params.put("tracking_code", "YOUR_TRACKING_CODE"); params.put("amount", "100"); Claim claim = client.claim.create(params); System.out.println(claim); } } ``` #### C# ```csharp using System; using System.Collections.Generic; using System.Threading.Tasks; using EasyPost; using Newtonsoft.Json; namespace EasyPostExamples { public class Examples { public static async Task Main() { var client = new EasyPost.Client(new EasyPost.ClientConfiguration("EASYPOST_API_KEY")); EasyPost.Parameters.Claim.Create parameters = new() { Amount = 100.00, Type = ClaimType.Damage, EmailEvidenceAttachments = new string[] { "REPLACE_WITH_BASE64_STRING" }, InvoiceAttachments = new string[] { "REPLACE_WITH_BASE64_STRING" }, SupportingDocumentationAttachments = new string[] { "REPLACE_WITH_BASE64_STRING" }, Description = "Test description", ContactEmail = "test@example.com", TrackingCode = "YOUR_TRACKING_CODE", }; EasyPost.Models.API.Claim claim = await client.Claim.Create(parameters); Console.WriteLine(JsonConvert.SerializeObject(claim, Formatting.Indented)); } } } ``` #### Node.js ```javascript const EasyPostClient = require('@easypost/api'); const client = new EasyPostClient('EASYPOST_API_KEY'); (async () => { const claim = await client.Claim.create({ type: 'damage', email_evidence_attachments: ['REPLACE_WITH_BASE64_STRING'], invoice_attachments: ['REPLACE_WITH_BASE64_STRING'], supporting_documentation_attachments: ['REPLACE_WITH_BASE64_STRING'], description: 'Test Description', contact_email: 'test@example.com', tracking_code: 'YOUR_TRACKING_CODE', amount: '100', }); console.log(claim); })(); ``` #### PHP ```php claim->create([ 'type' => 'damage', 'email_evidence_attachments' => ['REPLACE_WITH_BASE64_STRING'], 'invoice_attachments' => ['REPLACE_WITH_BASE64_STRING'], 'supporting_documentation_attachments' => ['REPLACE_WITH_BASE64_STRING'], 'description' => 'Test Description', 'contact_email' => 'test@example.com', 'tracking_code' => 'YOUR_TRACKING_CODE', 'amount' => '100', ]); echo $claim; ``` #### Python ```python import easypost client = easypost.EasyPostClient("EASYPOST_API_KEY") claim = client.claim.create( type="damage", email_evidence_attachments=["REPLACE_WITH_BASE64_STRING"], invoice_attachments=["REPLACE_WITH_BASE64_STRING"], supporting_documentation_attachments=["REPLACE_WITH_BASE64_STRING"], description="Test Description", contact_email="test@example.com", tracking_code="YOUR_TRACKING_CODE", amount="100", ) print(claim) ``` Create a new claim for a shipment. This endpoint accepts the necessary information to create and validate a claim and store the details. If `amount` is greater than the purchased insurance coverage, the claim is accepted and `requested_amount` is set to that coverage. An approved claim pays only the purchased coverage. --- ## Retrieve all Claims ### Example: GET /claims #### cURL ```shell curl -X GET "https://api.easypost.com/v2/claims?page_size=5" \ -u "EASYPOST_API_KEY": ``` #### Go ```go package example import ( "fmt" "github.com/EasyPost/easypost-go/v6" ) func list() { client := easypost.New("EASYPOST_API_KEY") claims, _ := client.ListClaims( &easypost.ListClaimsParameters{ PageSize: 5, }, ) fmt.Println(claims) } ``` #### Java ```java package claims; import com.easypost.exception.EasyPostException; import com.easypost.model.ClaimCollection; import com.easypost.service.EasyPostClient; import java.util.HashMap; public class All { public static void main(String[] args) throws EasyPostException { EasyPostClient client = new EasyPostClient("EASYPOST_API_KEY"); HashMap params = new HashMap<>(); params.put("page_size", 5); ClaimCollection claims = client.claim.all(params); System.out.println(claims); } } ``` #### C# ```csharp using System; using System.Collections.Generic; using System.Threading.Tasks; using EasyPost; using Newtonsoft.Json; namespace EasyPostExamples { public class Examples { public static async Task Main() { var client = new EasyPost.Client(new EasyPost.ClientConfiguration("EASYPOST_API_KEY")); EasyPost.Parameters.Claim.All parameters = new() { PageSize = 5 }; EasyPost.Models.API.ClaimCollection claimCollection = await client.Claim.All(parameters); Console.WriteLine(JsonConvert.SerializeObject(claimCollection, Formatting.Indented)); } } } ``` #### Node.js ```javascript const EasyPostClient = require('@easypost/api'); const client = new EasyPostClient('EASYPOST_API_KEY'); (async () => { const claims = await client.Claim.all({ page_size: 5, }); console.log(claims); })(); ``` #### PHP ```php claim->all([ 'page_size' => 5, ]); echo $claims; ``` #### Python ```python import easypost client = easypost.EasyPostClient("EASYPOST_API_KEY") claims = client.claim.all(page_size=5) print(claims) ``` Retrieve a list of claims. --- ## Retrieve a Claim ### Example: GET /claims/:id #### cURL ```shell curl -X GET https://api.easypost.com/v2/claims/clm_... \ -u "EASYPOST_API_KEY": ``` #### Go ```go package example import ( "fmt" "github.com/EasyPost/easypost-go/v6" ) func retrieve() { client := easypost.New("EASYPOST_API_KEY") claim, _ := client.GetClaim("clm_...") fmt.Println(claim) } ``` #### Java ```java package claims; import com.easypost.exception.EasyPostException; import com.easypost.model.Claim; import com.easypost.service.EasyPostClient; public class Retrieve { public static void main(String[] args) throws EasyPostException { EasyPostClient client = new EasyPostClient("EASYPOST_API_KEY"); Claim claim = client.claim.retrieve("clm_..."); System.out.println(claim); } } ``` #### C# ```csharp using System; using System.Collections.Generic; using System.Threading.Tasks; using EasyPost; using Newtonsoft.Json; namespace EasyPostExamples { public class Examples { public static async Task Main() { var client = new EasyPost.Client(new EasyPost.ClientConfiguration("EASYPOST_API_KEY")); EasyPost.Models.API.Claim claim = await client.Claim.Retrieve("ins_..."); Console.WriteLine(JsonConvert.SerializeObject(claim, Formatting.Indented)); } } } ``` #### Node.js ```javascript const EasyPostClient = require('@easypost/api'); const client = new EasyPostClient('EASYPOST_API_KEY'); (async () => { const claim = await client.Claim.retrieve('clm_...'); console.log(claim); })(); ``` #### PHP ```php claim->retrieve('clm_...'); echo $claim; ``` #### Python ```python import easypost client = easypost.EasyPostClient("EASYPOST_API_KEY") claim = client.claim.retrieve("clm_...") print(claim) ``` Retrieve details of a specific claim using the `id`. --- ## Cancel a Claim ### Example: POST /claims/:id/cancel #### cURL ```shell curl -X POST https://api.easypost.com/v2/claims \ -u "EASYPOST_API_KEY": \ -H 'Content-Type: application/json' \ -d '{ "type": "damage", "email_evidence_attachments": ["REPLACE_WITH_BASE64_STRING"], "invoice_attachments": ["REPLACE_WITH_BASE64_STRING"], "supporting_documentation_attachments": ["REPLACE_WITH_BASE64_STRING"], "description": "Test description", "contact_email": "test@example.com", "tracking_code": "YOUR_TRACKING_CODE", "amount": "100.00" }' ``` #### Go ```go package example import ( "fmt" "github.com/EasyPost/easypost-go/v6" ) func create() { client := easypost.New("EASYPOST_API_KEY") claim, _ := client.CreateClaim( &easypost.CreateClaimParameters{ Amount: 100.00, TrackingCode: "EZ1000000001", EmailEvidenceAttachments: []string{"REPLACE_WITH_BASE64_STRING"}, InvoiceAttachments: []string{"REPLACE_WITH_BASE64_STRING"}, SupportingDocumentationAttachments: []string{"REPLACE_WITH_BASE64_STRING"}, Description: "Test Description", ContactEmail: "test@example.com", }, ) fmt.Println(claim) } ``` #### Java ```java package claims; import com.easypost.exception.EasyPostException; import com.easypost.model.Claim; import com.easypost.service.EasyPostClient; import java.util.HashMap; public class Create { public static void main(String[] args) throws EasyPostException { EasyPostClient client = new EasyPostClient("EASYPOST_API_KEY"); HashMap params = new HashMap(); params.put("type", "damage"); params.put("email_evidence_attachments", new String[]{"REPLACE_WITH_BASE64_STRING"}); params.put("invoice_attachments", new String[]{"REPLACE_WITH_BASE64_STRING"}); params.put("supporting_documentation_attachments", new String[]{"REPLACE_WITH_BASE64_STRING"}); params.put("description", "Test Description"); params.put("contact_email", "test@example.com"); params.put("tracking_code", "YOUR_TRACKING_CODE"); params.put("amount", "100"); Claim claim = client.claim.create(params); System.out.println(claim); } } ``` #### C# ```csharp using System; using System.Collections.Generic; using System.Threading.Tasks; using EasyPost; using Newtonsoft.Json; namespace EasyPostExamples { public class Examples { public static async Task Main() { var client = new EasyPost.Client(new EasyPost.ClientConfiguration("EASYPOST_API_KEY")); EasyPost.Parameters.Claim.Create parameters = new() { Amount = 100.00, Type = ClaimType.Damage, EmailEvidenceAttachments = new string[] { "REPLACE_WITH_BASE64_STRING" }, InvoiceAttachments = new string[] { "REPLACE_WITH_BASE64_STRING" }, SupportingDocumentationAttachments = new string[] { "REPLACE_WITH_BASE64_STRING" }, Description = "Test description", ContactEmail = "test@example.com", TrackingCode = "YOUR_TRACKING_CODE", }; EasyPost.Models.API.Claim claim = await client.Claim.Create(parameters); Console.WriteLine(JsonConvert.SerializeObject(claim, Formatting.Indented)); } } } ``` #### Node.js ```javascript const EasyPostClient = require('@easypost/api'); const client = new EasyPostClient('EASYPOST_API_KEY'); (async () => { const claim = await client.Claim.create({ type: 'damage', email_evidence_attachments: ['REPLACE_WITH_BASE64_STRING'], invoice_attachments: ['REPLACE_WITH_BASE64_STRING'], supporting_documentation_attachments: ['REPLACE_WITH_BASE64_STRING'], description: 'Test Description', contact_email: 'test@example.com', tracking_code: 'YOUR_TRACKING_CODE', amount: '100', }); console.log(claim); })(); ``` #### PHP ```php claim->create([ 'type' => 'damage', 'email_evidence_attachments' => ['REPLACE_WITH_BASE64_STRING'], 'invoice_attachments' => ['REPLACE_WITH_BASE64_STRING'], 'supporting_documentation_attachments' => ['REPLACE_WITH_BASE64_STRING'], 'description' => 'Test Description', 'contact_email' => 'test@example.com', 'tracking_code' => 'YOUR_TRACKING_CODE', 'amount' => '100', ]); echo $claim; ``` #### Python ```python import easypost client = easypost.EasyPostClient("EASYPOST_API_KEY") claim = client.claim.create( type="damage", email_evidence_attachments=["REPLACE_WITH_BASE64_STRING"], invoice_attachments=["REPLACE_WITH_BASE64_STRING"], supporting_documentation_attachments=["REPLACE_WITH_BASE64_STRING"], description="Test Description", contact_email="test@example.com", tracking_code="YOUR_TRACKING_CODE", amount="100", ) print(claim) ``` Cancel an existing claim using the `id` --- ## Retrieve a Claim Payout Report ### Example: GET /claim_payout_reports/:month #### cURL ```shell curl -X GET https://api.easypost.com/v2/claims/clm_... \ -u "EASYPOST_API_KEY": ``` #### Go ```go package example import ( "fmt" "github.com/EasyPost/easypost-go/v6" ) func retrieve() { client := easypost.New("EASYPOST_API_KEY") claim, _ := client.GetClaim("clm_...") fmt.Println(claim) } ``` #### Java ```java package claims; import com.easypost.exception.EasyPostException; import com.easypost.model.Claim; import com.easypost.service.EasyPostClient; public class Retrieve { public static void main(String[] args) throws EasyPostException { EasyPostClient client = new EasyPostClient("EASYPOST_API_KEY"); Claim claim = client.claim.retrieve("clm_..."); System.out.println(claim); } } ``` #### C# ```csharp using System; using System.Collections.Generic; using System.Threading.Tasks; using EasyPost; using Newtonsoft.Json; namespace EasyPostExamples { public class Examples { public static async Task Main() { var client = new EasyPost.Client(new EasyPost.ClientConfiguration("EASYPOST_API_KEY")); EasyPost.Models.API.Claim claim = await client.Claim.Retrieve("ins_..."); Console.WriteLine(JsonConvert.SerializeObject(claim, Formatting.Indented)); } } } ``` #### Node.js ```javascript const EasyPostClient = require('@easypost/api'); const client = new EasyPostClient('EASYPOST_API_KEY'); (async () => { const claim = await client.Claim.retrieve('clm_...'); console.log(claim); })(); ``` #### PHP ```php claim->retrieve('clm_...'); echo $claim; ``` #### Python ```python import easypost client = easypost.EasyPostClient("EASYPOST_API_KEY") claim = client.claim.retrieve("clm_...") print(claim) ``` Retrieve the payout snapshot for one closed UTC month, `YYYY-MM`. This report is only for accounts on EasyPost's monthly claim payout flow. Any other account receives a `404`. A month that has not been closed into a snapshot also returns `404`. The response is that snapshot. `total_amount` is the bank payment. Each `claims` entry is one approved claim, and the `payout_amount` values sum to `total_amount`. `payout_id` is the payment id once the payout has been sent, and is null before then. Send `format=csv` or `Accept: text/csv` for the same snapshot as a spreadsheet. Each row is one claim. `charge_amount` is the payout for that claim, not the insurance premium, and those amounts sum to the bank payment. --- ## Retrieve Claim Messages ### Example: GET /claims/:id/messages #### cURL ```shell curl -X GET https://api.easypost.com/v2/claims/clm_... \ -u "EASYPOST_API_KEY": ``` #### Go ```go package example import ( "fmt" "github.com/EasyPost/easypost-go/v6" ) func retrieve() { client := easypost.New("EASYPOST_API_KEY") claim, _ := client.GetClaim("clm_...") fmt.Println(claim) } ``` #### Java ```java package claims; import com.easypost.exception.EasyPostException; import com.easypost.model.Claim; import com.easypost.service.EasyPostClient; public class Retrieve { public static void main(String[] args) throws EasyPostException { EasyPostClient client = new EasyPostClient("EASYPOST_API_KEY"); Claim claim = client.claim.retrieve("clm_..."); System.out.println(claim); } } ``` #### C# ```csharp using System; using System.Collections.Generic; using System.Threading.Tasks; using EasyPost; using Newtonsoft.Json; namespace EasyPostExamples { public class Examples { public static async Task Main() { var client = new EasyPost.Client(new EasyPost.ClientConfiguration("EASYPOST_API_KEY")); EasyPost.Models.API.Claim claim = await client.Claim.Retrieve("ins_..."); Console.WriteLine(JsonConvert.SerializeObject(claim, Formatting.Indented)); } } } ``` #### Node.js ```javascript const EasyPostClient = require('@easypost/api'); const client = new EasyPostClient('EASYPOST_API_KEY'); (async () => { const claim = await client.Claim.retrieve('clm_...'); console.log(claim); })(); ``` #### PHP ```php claim->retrieve('clm_...'); echo $claim; ``` #### Python ```python import easypost client = easypost.EasyPostClient("EASYPOST_API_KEY") claim = client.claim.retrieve("clm_...") print(claim) ``` Retrieve the follow-ups EasyPost has sent for a claim and the replies posted back through the API. Messages are returned oldest first. --- ## Create a Claim Message ### Example: POST /claims/:id/messages #### cURL ```shell curl -X POST https://api.easypost.com/v2/claims \ -u "EASYPOST_API_KEY": \ -H 'Content-Type: application/json' \ -d '{ "type": "damage", "email_evidence_attachments": ["REPLACE_WITH_BASE64_STRING"], "invoice_attachments": ["REPLACE_WITH_BASE64_STRING"], "supporting_documentation_attachments": ["REPLACE_WITH_BASE64_STRING"], "description": "Test description", "contact_email": "test@example.com", "tracking_code": "YOUR_TRACKING_CODE", "amount": "100.00" }' ``` #### Go ```go package example import ( "fmt" "github.com/EasyPost/easypost-go/v6" ) func create() { client := easypost.New("EASYPOST_API_KEY") claim, _ := client.CreateClaim( &easypost.CreateClaimParameters{ Amount: 100.00, TrackingCode: "EZ1000000001", EmailEvidenceAttachments: []string{"REPLACE_WITH_BASE64_STRING"}, InvoiceAttachments: []string{"REPLACE_WITH_BASE64_STRING"}, SupportingDocumentationAttachments: []string{"REPLACE_WITH_BASE64_STRING"}, Description: "Test Description", ContactEmail: "test@example.com", }, ) fmt.Println(claim) } ``` #### Java ```java package claims; import com.easypost.exception.EasyPostException; import com.easypost.model.Claim; import com.easypost.service.EasyPostClient; import java.util.HashMap; public class Create { public static void main(String[] args) throws EasyPostException { EasyPostClient client = new EasyPostClient("EASYPOST_API_KEY"); HashMap params = new HashMap(); params.put("type", "damage"); params.put("email_evidence_attachments", new String[]{"REPLACE_WITH_BASE64_STRING"}); params.put("invoice_attachments", new String[]{"REPLACE_WITH_BASE64_STRING"}); params.put("supporting_documentation_attachments", new String[]{"REPLACE_WITH_BASE64_STRING"}); params.put("description", "Test Description"); params.put("contact_email", "test@example.com"); params.put("tracking_code", "YOUR_TRACKING_CODE"); params.put("amount", "100"); Claim claim = client.claim.create(params); System.out.println(claim); } } ``` #### C# ```csharp using System; using System.Collections.Generic; using System.Threading.Tasks; using EasyPost; using Newtonsoft.Json; namespace EasyPostExamples { public class Examples { public static async Task Main() { var client = new EasyPost.Client(new EasyPost.ClientConfiguration("EASYPOST_API_KEY")); EasyPost.Parameters.Claim.Create parameters = new() { Amount = 100.00, Type = ClaimType.Damage, EmailEvidenceAttachments = new string[] { "REPLACE_WITH_BASE64_STRING" }, InvoiceAttachments = new string[] { "REPLACE_WITH_BASE64_STRING" }, SupportingDocumentationAttachments = new string[] { "REPLACE_WITH_BASE64_STRING" }, Description = "Test description", ContactEmail = "test@example.com", TrackingCode = "YOUR_TRACKING_CODE", }; EasyPost.Models.API.Claim claim = await client.Claim.Create(parameters); Console.WriteLine(JsonConvert.SerializeObject(claim, Formatting.Indented)); } } } ``` #### Node.js ```javascript const EasyPostClient = require('@easypost/api'); const client = new EasyPostClient('EASYPOST_API_KEY'); (async () => { const claim = await client.Claim.create({ type: 'damage', email_evidence_attachments: ['REPLACE_WITH_BASE64_STRING'], invoice_attachments: ['REPLACE_WITH_BASE64_STRING'], supporting_documentation_attachments: ['REPLACE_WITH_BASE64_STRING'], description: 'Test Description', contact_email: 'test@example.com', tracking_code: 'YOUR_TRACKING_CODE', amount: '100', }); console.log(claim); })(); ``` #### PHP ```php claim->create([ 'type' => 'damage', 'email_evidence_attachments' => ['REPLACE_WITH_BASE64_STRING'], 'invoice_attachments' => ['REPLACE_WITH_BASE64_STRING'], 'supporting_documentation_attachments' => ['REPLACE_WITH_BASE64_STRING'], 'description' => 'Test Description', 'contact_email' => 'test@example.com', 'tracking_code' => 'YOUR_TRACKING_CODE', 'amount' => '100', ]); echo $claim; ``` #### Python ```python import easypost client = easypost.EasyPostClient("EASYPOST_API_KEY") claim = client.claim.create( type="damage", email_evidence_attachments=["REPLACE_WITH_BASE64_STRING"], invoice_attachments=["REPLACE_WITH_BASE64_STRING"], supporting_documentation_attachments=["REPLACE_WITH_BASE64_STRING"], description="Test Description", contact_email="test@example.com", tracking_code="YOUR_TRACKING_CODE", amount="100", ) print(claim) ``` Reply to a claim follow-up. `body` is the reply text. `attachments` are base64-encoded images or PDFs, using the same encoding as claim creation. Send `idempotency_key`, up to 64 ASCII characters, to make a retry return the original message. A retry sent while the first request is still being delivered returns `409`; send it again with the same key. EasyPost adds the reply to the claim conversation. Later follow-ups arrive as `claim.message` webhooks. The flow is described in the Claim Messages Guide. --- Source: https://docs.easypost.com/docs/insurance # Insurance An `Insurance` object represents insurance for packages purchased both via the EasyPost API as well as shipments purchased through third parties and later registered with EasyPost. An `Insurance` object is created automatically whenever you buy a `Shipment` through EasyPost and pass insurance options during the call,or in a later call to insure a `Shipment`. `Insurance` purchased through the `Shipment` buy or `Shipment` insure endpoints is immediately insured - there is no possibility of rejection based on tracking information, as the package was just created. On the other hand, `Insurance` purchased on shipments purchased outside of EasyPost requires creation with a tracking code so that EasyPost may confirm the package existence and current shipping status at the time of purchase. Standalone insurance is created in a pending state to help distinguish it from insurance purchased for an EasyPost `Shipment`. Both kinds of `Insurance` use the Tracking system to receive periodic updates, and will report those updates to any appropriate `Webhook` on file. Standalone insurance will cancel itself if the tracking information for the given tracking code shows evidence of having been shipped anytime before the insurance was purchased. Unlike a `Shipment` within EasyPost, `Insurance` objects register both a `to_address` and `from_address` according to the destination and ship-from locations of the package. This means that a `Shipment` with its `is_return` property set to `true` actually ships to the listed `from_address`. `Insurance` does not have a concept of `is_return`, so all insurance records refer to their true package destination as `to_address`, regardless of whether or not the shipment is a return. --- ## Insurance object | Property | Type | Description | |----------|------|-------------| | id | string | Unique identifier, begins with "ins_" | | object | string | "Insurance" | | reference | string | The reference for this Insurance, if any | | amount | string | USD value of insured goods with sub-cent precision | | provider | string | The insurance provider used by EasyPost | | provider_id | string | An identifying number for some insurance providers used by EasyPost | | shipment_id | string | The ID of the Shipment in EasyPost, if postage was purchased via EasyPost | | tracking_code | string | The tracking code of either the shipment within EasyPost, or provided by you during creation | | status | string | The current status of the insurance, possible values are "new", "pending", "purchased", "failed", or "cancelled" | | tracker | Tracker | The associated Tracker object | | to_address | Address | The associated Address object for destination (optional) | | from_address | Address | The associated Address object for origin (optional) | | fee | Fee | The associated insurance Fee object if any | | messages | Array of strings | The list of errors encountered during attempted purchase of the insurance | | created_at | datetime | When the Insurance was created | | updated_at | datetime | When the Insurance was last updated | Example Object: ```json { "id": "ins_e496d74110184165b0ab6c71b9ffc316", "object": "Insurance", "mode": "test", "reference": null, "status": "pending", "amount": "100.00000", "provider": "easypost", "provider_id": null, "to_address": { "id": "adr_ed83e5f92f6811f0a93dac1f6bc539ae", "object": "Address", "created_at": "2025-05-12T19:40:15+00:00", "updated_at": "2025-05-12T19:40:15+00:00", "name": "DR. STEVE BRULE", "company": null, "street1": "179 N HARBOR DR", "street2": null, "city": "REDONDO BEACH", "state": "CA", "zip": "90277-2506", "country": "US", "phone": "8573875756", "email": "DR_STEVE_BRULE@GMAIL.COM", "mode": "test", "carrier_facility": null, "residential": false, "federal_tax_id": null, "state_tax_id": null, "verifications": { "zip4": { "success": true, "errors": [], "details": null }, "delivery": { "success": true, "errors": [], "details": { "latitude": 33.8436, "longitude": -118.39177, "time_zone": "America/Los_Angeles" } } } }, "from_address": { "id": "adr_ed88ffb72f6811f0b5053cecef1b359e", "object": "Address", "created_at": "2025-05-12T19:40:15+00:00", "updated_at": "2025-05-12T19:40:15+00:00", "name": "EASYPOST", "company": null, "street1": "417 MONTGOMERY ST # 5", "street2": null, "city": "SAN FRANCISCO", "state": "CA", "zip": "94104-1129", "country": "US", "phone": "4153334445", "email": "SUPPORT@EASYPOST.COM", "mode": "test", "carrier_facility": null, "residential": false, "federal_tax_id": null, "state_tax_id": null, "verifications": { "zip4": { "success": true, "errors": [], "details": null }, "delivery": { "success": true, "errors": [], "details": { "latitude": 37.79342, "longitude": -122.40288, "time_zone": "America/Los_Angeles" } } } }, "shipment_id": null, "tracker": { "id": "trk_9135862729734d96ad2f9ed0f0565a27", "object": "Tracker", "mode": "test", "tracking_code": "EZ1000000001", "status": "pre_transit", "status_detail": "status_update", "created_at": "2025-05-09T20:40:17Z", "updated_at": "2025-05-09T20:40:17Z", "signed_by": null, "weight": null, "est_delivery_date": "2025-05-09T20:40:17Z", "shipment_id": null, "carrier": "USPS", "tracking_details": [ { "object": "TrackingDetail", "message": "Pre-Shipment Info Sent to USPS", "description": "", "status": "pre_transit", "status_detail": "status_update", "datetime": "2025-04-09T20:40:17Z", "source": "USPS", "carrier_code": "", "tracking_location": { "object": "TrackingLocation", "city": null, "state": null, "country": null, "zip": null }, "est_delivery_date": null }, { "object": "TrackingDetail", "message": "Shipping Label Created", "description": "", "status": "pre_transit", "status_detail": "status_update", "datetime": "2025-04-10T09:17:17Z", "source": "USPS", "carrier_code": "", "tracking_location": { "object": "TrackingLocation", "city": "HOUSTON", "state": "TX", "country": null, "zip": "77063" }, "est_delivery_date": null } ], "carrier_detail": { "object": "CarrierDetail", "service": "First-Class Package Service", "container_type": null, "est_delivery_date_local": null, "est_delivery_time_local": null, "origin_location": "HOUSTON TX, 77001", "origin_tracking_location": { "object": "TrackingLocation", "city": "HOUSTON", "state": "TX", "country": null, "zip": "77063" }, "destination_location": "CHARLESTON SC, 29401", "destination_tracking_location": null, "guaranteed_delivery_date": null, "alternate_identifier": null, "initial_delivery_attempt": null }, "finalized": true, "is_return": false, "public_url": "https://track.easypost.com/djE6dHJrXzkxMzU4NjI3Mjk3MzRkOTZhZDJmOWVkMGYwNTY1YTI3", "fees": [] }, "tracking_code": "EZ1000000001", "fee": { "object": "Fee", "type": "InsuranceFee", "amount": "0.50000", "charged": true, "refunded": false }, "messages": [], "created_at": "2025-05-12T19:40:15Z", "updated_at": "2025-05-12T19:40:15Z" } ``` --- ## Create an Insurance ### Example: POST /insurances #### cURL ```shell curl -X POST https://api.easypost.com/v2/insurances \ -u "EASYPOST_API_KEY": \ -H 'Content-Type: application/json' \ -d '{ "insurance": { "to_address": { "id": "adr_..." }, "from_address": { "id": "adr_..." }, "tracking_code": "9400110898825022579493", "carrier": "USPS", "reference": "insuranceRef1", "amount": "100.00" } }' ``` #### Go ```go package example import ( "fmt" "github.com/EasyPost/easypost-go/v6" ) func create() { client := easypost.New("EASYPOST_API_KEY") toAddress, _ := client.GetAddress("adr_...") fromAddress, _ := client.GetAddress("adr_...") insurance, _ := client.CreateInsurance( &easypost.Insurance{ ToAddress: toAddress, FromAddress: fromAddress, Reference: "InsuranceRef1", Carrier: "USPS", TrackingCode: "9400110898825022579493", Amount: "100.00", }, ) fmt.Println(insurance) } ``` #### Java ```java package insurances; import com.easypost.exception.EasyPostException; import com.easypost.model.Insurance; import com.easypost.service.EasyPostClient; import java.util.HashMap; public class Create { public static void main(String[] args) throws EasyPostException { EasyPostClient client = new EasyPostClient("EASYPOST_API_KEY"); HashMap toAddressMap = new HashMap(); toAddressMap.put("id", "adr_..."); HashMap fromAddressMap = new HashMap(); fromAddressMap.put("id", "adr_..."); HashMap params = new HashMap(); params.put("to_address", toAddressMap); params.put("from_address", fromAddressMap); params.put("tracking_code", "9400110898825022579493"); params.put("carrier", "USPS"); params.put("amount", "100.00"); params.put("reference", "InsuranceRef1"); Insurance insurance = client.insurance.create(params); System.out.println(insurance); } } ``` #### C# ```csharp using System; using System.Collections.Generic; using System.Threading.Tasks; using EasyPost; using Newtonsoft.Json; namespace EasyPostExamples { public class Examples { public static async Task Main() { var client = new EasyPost.Client(new EasyPost.ClientConfiguration("EASYPOST_API_KEY")); EasyPost.Parameters.Insurance.Create parameters = new() { Amount = 100.00, Carrier = "USPS", TrackingCode = "9400110898825022579493", ToAddress = new EasyPost.Parameters.Address.Create { Name = "Dr. Steve Brule", Street1 = "417 Montgomery Street", Street2 = "5th Floor", City = "San Francisco", State = "CA", Country = "US", Zip = "94104" }, FromAddress = new EasyPost.Parameters.Address.Create { Company = "EasyPost", Street1 = "417 Montgomery Street", Street2 = "Floor 5", City = "San Francisco", State = "CA", Country = "US", Zip = "94104" } }; EasyPost.Models.API.Insurance insurance = await client.Insurance.Create(parameters); Console.WriteLine(JsonConvert.SerializeObject(insurance, Formatting.Indented)); } } } ``` #### Node.js ```javascript const EasyPostClient = require('@easypost/api'); const client = new EasyPostClient('EASYPOST_API_KEY'); (async () => { const insurance = await client.Insurance.create({ to_address: { id: 'adr_...' }, from_address: { id: 'adr_...' }, tracking_code: '9400110898825022579493', carrier: 'USPS', amount: '100.00', reference: 'insuranceRef1', }); console.log(insurance); })(); ``` #### PHP ```php insurance->create([ 'to_address' => ['id' => 'adr_...'], 'from_address' => ['id' => 'adr_...'], 'tracking_code' => '9400110898825022579493', 'carrier' => 'USPS', 'amount' => '100.00', 'reference' => 'insuranceRef1' ]); echo $insurance; ``` #### Python ```python import easypost client = easypost.EasyPostClient("EASYPOST_API_KEY") insurance = client.insurance.create( to_address={"id": "adr_..."}, from_address={"id": "adr_..."}, tracking_code="9400110898825022579493", carrier="USPS", amount="100.00", reference="insuranceRef1", ) print(insurance) ``` #### Ruby ```ruby require 'easypost' client = EasyPost::Client.new(api_key: 'EASYPOST_API_KEY') insurance = client.insurance.create( to_address: { id: 'adr_...', }, from_address: { id: 'adr_...', }, tracking_code: '9400110898825022579493', carrier: 'USPS', reference: 'insuranceRef1', amount: '100.00', ) puts insurance ``` An `Insurance` created via this endpoint must belong to a shipment purchased outside of EasyPost. Insurance for a `Shipment` created within EasyPost must be created via the `Shipment` buy or `Shipment` insure endpoints. When creating Insurance for a non-EasyPost shipment, you must provide tracking_code, carrier, and amount information. **Customers must have their own FedEx account to insure FedEx packages.** [Note: This object is immutable after creation. Review the rendered documentation for details.] --- ## Retrieve all Insurances ### Example: GET /insurances #### cURL ```shell curl -X GET "https://api.easypost.com/v2/insurances?page_size=5" \ -u "EASYPOST_API_KEY": ``` #### Go ```go package example import ( "fmt" "github.com/EasyPost/easypost-go/v6" ) func list() { client := easypost.New("EASYPOST_API_KEY") insurances, _ := client.ListInsurances( &easypost.ListOptions{ PageSize: 5, }, ) fmt.Println(insurances) } ``` #### Java ```java package insurances; import com.easypost.exception.EasyPostException; import com.easypost.model.InsuranceCollection; import com.easypost.service.EasyPostClient; import java.util.HashMap; public class All { public static void main(String[] args) throws EasyPostException { EasyPostClient client = new EasyPostClient("EASYPOST_API_KEY"); HashMap params = new HashMap<>(); params.put("page_size", 5); InsuranceCollection insurances = client.insurance.all(params); System.out.println(insurances); } } ``` #### C# ```csharp using System; using System.Collections.Generic; using System.Threading.Tasks; using EasyPost; using Newtonsoft.Json; namespace EasyPostExamples { public class Examples { public static async Task Main() { var client = new EasyPost.Client(new EasyPost.ClientConfiguration("EASYPOST_API_KEY")); EasyPost.Parameters.Insurance.All parameters = new() { PageSize = 5 }; EasyPost.Models.API.InsuranceCollection insuranceCollection = await client.Insurance.All(parameters); Console.WriteLine(JsonConvert.SerializeObject(insuranceCollection, Formatting.Indented)); } } } ``` #### Node.js ```javascript const EasyPostClient = require('@easypost/api'); const client = new EasyPostClient('EASYPOST_API_KEY'); (async () => { const insurances = await client.Insurance.all({ page_size: 5, }); console.log(insurances); })(); ``` #### PHP ```php insurance->all([ 'page_size' => 5, ]); echo $insurances; ``` #### Python ```python import easypost client = easypost.EasyPostClient("EASYPOST_API_KEY") insurances = client.insurance.all(page_size=5) print(insurances) ``` #### Ruby ```ruby require 'easypost' client = EasyPost::Client.new(api_key: 'EASYPOST_API_KEY') insurances = client.insurance.all( page_size: 5, ) puts insurances ``` A list of all `Insurance` objects associated with the given `API Key` can also be retrieved. See the Pagination section of our docs for more details on retrieving all records when multiple pages are available. --- ## Retrieve an Insurance ### Example: GET /insurances/:id #### cURL ```shell curl -X GET https://api.easypost.com/v2/insurances/ins_... \ -u "EASYPOST_API_KEY": ``` #### Go ```go package example import ( "fmt" "github.com/EasyPost/easypost-go/v6" ) func retrieve() { client := easypost.New("EASYPOST_API_KEY") insurance, _ := client.GetInsurance("ins_...") fmt.Println(insurance) } ``` #### Java ```java package insurances; import com.easypost.exception.EasyPostException; import com.easypost.model.Insurance; import com.easypost.service.EasyPostClient; public class Retrieve { public static void main(String[] args) throws EasyPostException { EasyPostClient client = new EasyPostClient("EASYPOST_API_KEY"); Insurance insurance = client.insurance.retrieve("ins_..."); System.out.println(insurance); } } ``` #### C# ```csharp using System; using System.Collections.Generic; using System.Threading.Tasks; using EasyPost; using Newtonsoft.Json; namespace EasyPostExamples { public class Examples { public static async Task Main() { var client = new EasyPost.Client(new EasyPost.ClientConfiguration("EASYPOST_API_KEY")); EasyPost.Models.API.Insurance insurance = await client.Insurance.Retrieve("ins_..."); Console.WriteLine(JsonConvert.SerializeObject(insurance, Formatting.Indented)); } } } ``` #### Node.js ```javascript const EasyPostClient = require('@easypost/api'); const client = new EasyPostClient('EASYPOST_API_KEY'); (async () => { const insurance = await client.Insurance.retrieve('ins_...'); console.log(insurance); })(); ``` #### PHP ```php insurance->retrieve('ins_...'); echo $insurance; ``` #### Python ```python import easypost client = easypost.EasyPostClient("EASYPOST_API_KEY") insurance = client.insurance.retrieve("ins_...") print(insurance) ``` #### Ruby ```ruby require 'easypost' client = EasyPost::Client.new(api_key: 'EASYPOST_API_KEY') insurance = client.insurance.retrieve('ins_...') puts insurance ``` Retrieve an `Insurance` by its `id`. --- ## Refund an Insurance ### Example: POST /insurances/:id/refund #### cURL ```shell curl -X POST https://api.easypost.com/v2/insurances \ -u "EASYPOST_API_KEY": \ -H 'Content-Type: application/json' \ -d '{ "insurance": { "to_address": { "id": "adr_..." }, "from_address": { "id": "adr_..." }, "tracking_code": "9400110898825022579493", "carrier": "USPS", "reference": "insuranceRef1", "amount": "100.00" } }' ``` #### Go ```go package example import ( "fmt" "github.com/EasyPost/easypost-go/v6" ) func create() { client := easypost.New("EASYPOST_API_KEY") toAddress, _ := client.GetAddress("adr_...") fromAddress, _ := client.GetAddress("adr_...") insurance, _ := client.CreateInsurance( &easypost.Insurance{ ToAddress: toAddress, FromAddress: fromAddress, Reference: "InsuranceRef1", Carrier: "USPS", TrackingCode: "9400110898825022579493", Amount: "100.00", }, ) fmt.Println(insurance) } ``` #### Java ```java package insurances; import com.easypost.exception.EasyPostException; import com.easypost.model.Insurance; import com.easypost.service.EasyPostClient; import java.util.HashMap; public class Create { public static void main(String[] args) throws EasyPostException { EasyPostClient client = new EasyPostClient("EASYPOST_API_KEY"); HashMap toAddressMap = new HashMap(); toAddressMap.put("id", "adr_..."); HashMap fromAddressMap = new HashMap(); fromAddressMap.put("id", "adr_..."); HashMap params = new HashMap(); params.put("to_address", toAddressMap); params.put("from_address", fromAddressMap); params.put("tracking_code", "9400110898825022579493"); params.put("carrier", "USPS"); params.put("amount", "100.00"); params.put("reference", "InsuranceRef1"); Insurance insurance = client.insurance.create(params); System.out.println(insurance); } } ``` #### C# ```csharp using System; using System.Collections.Generic; using System.Threading.Tasks; using EasyPost; using Newtonsoft.Json; namespace EasyPostExamples { public class Examples { public static async Task Main() { var client = new EasyPost.Client(new EasyPost.ClientConfiguration("EASYPOST_API_KEY")); EasyPost.Parameters.Insurance.Create parameters = new() { Amount = 100.00, Carrier = "USPS", TrackingCode = "9400110898825022579493", ToAddress = new EasyPost.Parameters.Address.Create { Name = "Dr. Steve Brule", Street1 = "417 Montgomery Street", Street2 = "5th Floor", City = "San Francisco", State = "CA", Country = "US", Zip = "94104" }, FromAddress = new EasyPost.Parameters.Address.Create { Company = "EasyPost", Street1 = "417 Montgomery Street", Street2 = "Floor 5", City = "San Francisco", State = "CA", Country = "US", Zip = "94104" } }; EasyPost.Models.API.Insurance insurance = await client.Insurance.Create(parameters); Console.WriteLine(JsonConvert.SerializeObject(insurance, Formatting.Indented)); } } } ``` #### Node.js ```javascript const EasyPostClient = require('@easypost/api'); const client = new EasyPostClient('EASYPOST_API_KEY'); (async () => { const insurance = await client.Insurance.create({ to_address: { id: 'adr_...' }, from_address: { id: 'adr_...' }, tracking_code: '9400110898825022579493', carrier: 'USPS', amount: '100.00', reference: 'insuranceRef1', }); console.log(insurance); })(); ``` #### PHP ```php insurance->create([ 'to_address' => ['id' => 'adr_...'], 'from_address' => ['id' => 'adr_...'], 'tracking_code' => '9400110898825022579493', 'carrier' => 'USPS', 'amount' => '100.00', 'reference' => 'insuranceRef1' ]); echo $insurance; ``` #### Python ```python import easypost client = easypost.EasyPostClient("EASYPOST_API_KEY") insurance = client.insurance.create( to_address={"id": "adr_..."}, from_address={"id": "adr_..."}, tracking_code="9400110898825022579493", carrier="USPS", amount="100.00", reference="insuranceRef1", ) print(insurance) ``` #### Ruby ```ruby require 'easypost' client = EasyPost::Client.new(api_key: 'EASYPOST_API_KEY') insurance = client.insurance.create( to_address: { id: 'adr_...', }, from_address: { id: 'adr_...', }, tracking_code: '9400110898825022579493', carrier: 'USPS', reference: 'insuranceRef1', amount: '100.00', ) puts insurance ``` Refunding `Insurance` is only available for standalone insurance purchased through EasyPost. The tracking status for the insurance must be either `pre_transit`, `cancelled`, or `unknown` in order to be eligible. --- Source: https://docs.easypost.com/docs/luma # Luma The Luma API enables shippers to buy labels, leveraging the rate shopping rules configured within the EasyPost Dashboard. By using predefined rulesets, Luma automates the rate selection process based on criteria such as transit time, cost, carrier preferences, and delivery confidence levels. Luma supports two methods for purchasing shipments: - One-Call Buy: Use `POST /shipments/luma` to create and purchase a shipment in a single request. This method is ideal for shippers with established rulesets who want to reduce API calls. - Standard Buy: Create a shipment using `POST /shipments`, then call `POST /shipments/:id/luma` to evaluate the rates against the Luma ruleset and purchase the label. This method is ideal for shippers that are doing rating (creating a shipment) first, and then want to rate shop with Luma and buy a label. --- ## Define Business Rulesets Before using the Luma API, rate shopping rules must be defined in the EasyPost Dashboard. These rules determine how rates are selected based on specific criteria. Work with an EasyPost Luma contact to configure rulesets that may include: - **Days in Transit:** Maximum number of transit days desired. - **Confidence:** Confidence level for delivery within the specified Days in Transit. - **Maximum Cost:** Maximum dollar amount allowed for the shipment. - **Included Carriers:** Array of carriers eligible for selection. --- ## Luma Promise ### Example: POST /luma/promise #### cURL ```shell curl -X POST 'https://api.easypost.com/v2/luma/promise' \ -u "EASYPOST_API_KEY": \ -H 'Content-Type: application/json' \ -d '{ "shipment": { "to_address": { "name": "Dr. Steve Brule", "street1": "5744 Silverton Ave", "city": "McKinney", "state": "TX", "zip": "75070", "country": "US", "phone": "8573875756", "email": "dr_steve_brule@gmail.com" }, "from_address": { "name": "EasyPost", "street1": "417 Montgomery Street", "street2": "5th Floor", "city": "San Francisco", "state": "CA", "zip": "94104", "country": "US", "phone": "4153334445", "email": "support@easypost.com" }, "parcel": { "length": "20.2", "width": "10.9", "height": "5", "weight": "65.9" }, "ruleset_name": "ruleset_...", "planned_ship_date": "2025-07-03", "deliver_by_date": "2025-07-06" } }' ``` #### Go ```go package example import ( "fmt" "github.com/EasyPost/easypost-go/v6" ) func getPromise() { client := easypost.New("EASYPOST_API_KEY") lumaRequest := &easypost.LumaRequest{ Shipment: easypost.Shipment{ Parcel: &easypost.Parcel{ Length: 20.2, Width: 10.9, Height: 5, Weight: 65.9, }, ToAddress: &easypost.Address{ Name: "Dr. Steve Brule", Street1: "179 N Harbor Dr", City: "Redondo Beach", State: "CA", Zip: "90277", Country: "US", Phone: "4155559999", Email: "dr_steve_brule@gmail.com", }, FromAddress: &easypost.Address{ Name: "EasyPost", Street1: "417 Montgomery Street", Street2: "5th Floor", City: "San Francisco", State: "CA", Zip: "90277", Country: "US", Phone: "4155559999", Email: "support@easypost.com", }, }, RulesetName: "ruleset_...", PlannedShipDate: "2025-07-21", DeliverByDate: "2025-07-25", PersistLabel: false, } lumaInfo, _ := client.GetLumaPromise(lumaRequest) fmt.Println(lumaInfo) } ``` #### Java ```java package shipments; import com.easypost.exception.EasyPostException; import com.easypost.model.LumaInfo; import com.easypost.service.EasyPostClient; import java.util.HashMap; public class LumaPromiseRequest { public static void main(String[] args) throws EasyPostException { EasyPostClient client = new EasyPostClient("EASYPOST_API_KEY"); HashMap toAddress = new HashMap(); toAddress.put("name", "Dr. Steve Brule"); toAddress.put("street1", "5744 Silverton Ave"); toAddress.put("city", "McKinney"); toAddress.put("state", "TX"); toAddress.put("zip", "75070"); toAddress.put("country", "US"); toAddress.put("phone", "8573875756"); toAddress.put("email", "dr_steve_brule@gmail.com"); HashMap fromAddress = new HashMap(); fromAddress.put("name", "EasyPost"); fromAddress.put("street1", "417 Montgomery Street"); fromAddress.put("street2", "5th Floor"); fromAddress.put("city", "San Francisco"); fromAddress.put("state", "CA"); fromAddress.put("zip", "94104"); fromAddress.put("country", "US"); fromAddress.put("phone", "4153334445"); fromAddress.put("email", "support@easypost.com"); HashMap parcel = new HashMap(); parcel.put("length", 20.2); parcel.put("width", 10.9); parcel.put("height", 5.0); parcel.put("weight", 65.9); HashMap shipment = new HashMap(); shipment.put("to_address", toAddress); shipment.put("from_address", fromAddress); shipment.put("parcel", parcel); shipment.put("ruleset_name", "ruleset_..."); shipment.put("planned_ship_date", "2025-05-22"); shipment.put("deliver_by_date", "2025-05-29"); LumaInfo lumaInfo = client.luma.getPromise(shipment); System.out.println(lumaInfo); } } ``` #### C# ```csharp using System; using System.Collections.Generic; using System.Threading.Tasks; using EasyPost; using Newtonsoft.Json; namespace EasyPostExamples { public class Examples { public static async Task Main() { var client = new EasyPost.Client(new EasyPost.ClientConfiguration("EASYPOST_API_KEY")); EasyPost.Parameters.Luma.GetPromise parameters = new() { ToAddress = new EasyPost.Parameters.Address.Create { Name = "Dr. Steve Brule", Street1 = "5744 Silverton Ave", City = "McKinney", State = "TX", Zip = "75070", Country = "US", Phone = "8573875756", Email = "dr_steve_brule@gmail.com" }, FromAddress = new EasyPost.Parameters.Address.Create { Name = "EasyPost", Street1 = "417 Montgomery Street", Street2 = "5th Floor", City = "San Francisco", State = "CA", Zip = "94104", Country = "US", Phone = "4153334445", Email = "support@easypost.com" }, Parcel = new EasyPost.Parameters.Parcel.Create { Length = 20.2, Width = 10.9, Height = 5, Weight = 65.9 }, RulesetName = "ruleset_...", PlannedShipDate = "2025-07-18", DeliverByDate = "2025-07-20" }; EasyPost.Models.API.LumaInfo lumaInfo = await client.Luma.GetPromise(parameters); Console.WriteLine(JsonConvert.SerializeObject(lumaInfo, Formatting.Indented)); } } } ``` #### Node.js ```javascript const EasyPost = require('@easypost/api'); const client = new EasyPost('EASYPOST_API_KEY'); (async () => { const toAddress = { name: 'Dr. Steve Brule', street1: '5744 Silverton Ave', city: 'McKinney', state: 'TX', zip: '75070', country: 'US', phone: '8573875756', email: 'dr_steve_brule@gmail.com', }; const fromAddress = { name: 'EasyPost', street1: '417 Montgomery Street', street2: '5th Floor', city: 'San Francisco', state: 'CA', zip: '94104', country: 'US', phone: '4153334445', email: 'support@easypost.com', }; const parcel = { length: 20.2, width: 10.9, height: 5, weight: 65.9, }; const params = { to_address: toAddress, from_address: fromAddress, parcel, ruleset_name: 'ruleset_...', planned_ship_date: '2025-07-18', deliver_by_date: '2025-07-20', }; const promise = await client.Luma.getPromise(params); console.log(promise); })(); ``` #### PHP ```php shipment->lumaPromise([ 'shipment' => [ 'to_address' => [ 'name' => 'Dr. Steve Brule', 'street1' => '5744 Silverton Ave', 'city' => 'McKinney', 'state' => 'TX', 'zip' => '75070', 'country' => 'US', 'phone' => '8573875756', 'email' => 'dr_steve_brule@gmail.com' ], 'from_address' => [ 'name' => 'EasyPost', 'street1' => '417 Montgomery Street', 'street2' => '5th Floor', 'city' => 'San Francisco', 'state' => 'CA', 'zip' => '94104', 'country' => 'US', 'phone' => '4153334445', 'email' => 'support@easypost.com' ], 'parcel' => [ 'length' => 20.2, 'width' => 10.9, 'height' => 5, 'weight' => 65.9 ], 'ruleset_name' => 'ruleset_...', 'planned_ship_date' => '2025-07-18', 'deliver_by_date' => '2025-07-20' ] ]); echo $lumaPromise; ``` #### Python ```python import easypost client = easypost.EasyPostClient("EASYPOST_API_KEY") shipment = client.luma.get_promise( to_address={ "name": "Dr. Steve Brule", "street1": "5744 Silverton Ave", "city": "McKinney", "state": "TX", "zip": "75070", "country": "US", "phone": "8573875756", "email": "dr_steve_brule@gmail.com", }, from_address={ "name": "EasyPost", "street1": "417 Montgomery Street", "street2": "5th Floor", "city": "San Francisco", "state": "CA", "zip": "94104", "country": "US", "phone": "4153334445", "email": "support@easypost.com", }, parcel={ "length": 20.2, "width": 10.9, "height": 5, "weight": 65.9, }, ruleset_name="ruleset_...", planned_ship_date="2025-07-24", deliver_by_date="2025-07-26", ) print(shipment) ``` #### Ruby ```ruby # frozen_string_literal: true require 'easypost' client = EasyPost::Client.new(api_key: 'EASYPOST_API_KEY') shipment = client.luma.get_promise( to_address: { name: 'Dr. Steve Brule', street1: '5744 Silverton Ave', city: 'McKinney', state: 'TX', zip: '75070', country: 'US', phone: '8573875756', email: 'dr_steve_brule@gmail.com', }, from_address: { name: 'EasyPost', street1: '417 Montgomery Street', street2: '5th Floor', city: 'San Francisco', state: 'CA', zip: '94104', country: 'US', phone: '4153334445', email: 'support@easypost.com', }, parcel: { length: 20.2, width: 10.9, height: 5, weight: 65.9, }, ruleset_name: 'ruleset_...', planned_ship_date: '2025-07-16', deliver_by_date: '2025-07-18', ) puts shipment ``` The Luma Promise endpoint evaluates rate options and returns a `predicted_deliver_by_date` and the selected rate without requiring a label purchase. This endpoint is designed for rating-only scenarios, such as displaying estimated delivery windows for customers. It supports predefined rulesets and enables evaluation without incurring label charges. --- ## One-Call Buy ### Example: POST /shipments/luma #### cURL ```shell curl -X POST https://api.easypost.com/v2/shipments/luma \ -u "EASYPOST_API_KEY": \ -H 'Content-Type: application/json' \ -d '{ "shipment": { "to_address": { "name": "Dr. Steve Brule", "street1": "5744 Silverton Ave", "city": "McKinney", "state": "TX", "zip": "75070", "country": "US", "phone": "8573875756", "email": "dr_steve_brule@gmail.com" }, "from_address": { "name": "EasyPost", "street1": "417 Montgomery Street", "street2": "5th Floor", "city": "San Francisco", "state": "CA", "zip": "94104", "country": "US", "phone": "4153334445", "email": "support@easypost.com" }, "parcel": { "length": "20.2", "width": "10.9", "height": "5", "weight": "65.9" }, "carrier_accounts": ["ca_..."], "ruleset_name": "ruleset_...", "planned_ship_date": "2025-05-14", "deliver_by_date": "2025-05-16" } }' ``` #### Go ```go package example import ( "fmt" "github.com/EasyPost/easypost-go/v6" ) func oneCallBuy() { client := easypost.New("EASYPOST_API_KEY") lumaRequest := &easypost.LumaRequest{ Shipment: easypost.Shipment{ CarrierAccountIDs: []string{"ca_..."}, Parcel: &easypost.Parcel{ Length: 20.2, Width: 10.9, Height: 5, Weight: 65.9, }, ToAddress: &easypost.Address{ Name: "Dr. Steve Brule", Street1: "179 N Harbor Dr", City: "Redondo Beach", State: "CA", Zip: "90277", Country: "US", Phone: "4155559999", Email: "dr_steve_brule@gmail.com", }, FromAddress: &easypost.Address{ Name: "EasyPost", Street1: "417 Montgomery Street", Street2: "5th Floor", City: "San Francisco", State: "CA", Zip: "90277", Country: "US", Phone: "4155559999", Email: "support@easypost.com", }, }, RulesetName: "ruleset_...", PlannedShipDate: "2025-07-21", DeliverByDate: "2025-07-25", } shipment, _ := client.CreateAndBuyLumaShipment(lumaRequest) fmt.Println(shipment) } ``` #### Java ```java package shipments; import com.easypost.exception.EasyPostException; import com.easypost.model.Shipment; import com.easypost.service.EasyPostClient; import java.util.HashMap; public class CreateAndBuyLuma { public static void main(String[] args) throws EasyPostException { EasyPostClient client = new EasyPostClient("EASYPOST_API_KEY"); HashMap toAddressMap = new HashMap(); toAddressMap.put("name", "Dr. Steve Brule"); toAddressMap.put("street1", "5744 Silverton Ave"); toAddressMap.put("city", "McKinney"); toAddressMap.put("state", "TX"); toAddressMap.put("zip", "75070"); toAddressMap.put("country", "US"); toAddressMap.put("phone", "8573875756"); toAddressMap.put("email", "dr_steve_brule@gmail.com"); HashMap fromAddressMap = new HashMap(); fromAddressMap.put("name", "EasyPost"); fromAddressMap.put("street1", "417 Montgomery Street"); fromAddressMap.put("street2", "5th Floor"); fromAddressMap.put("city", "San Francisco"); fromAddressMap.put("state", "CA"); fromAddressMap.put("zip", "94104"); fromAddressMap.put("country", "US"); fromAddressMap.put("phone", "4153334445"); fromAddressMap.put("email", "support@easypost.com"); HashMap parcelMap = new HashMap(); parcelMap.put("length", 20.2); parcelMap.put("width", 10.9); parcelMap.put("height", 5); parcelMap.put("weight", 65.9); HashMap params = new HashMap(); params.put("to_address", toAddressMap); params.put("from_address", fromAddressMap); params.put("parcel", parcelMap); params.put("carrier_accounts", "ca_..."); params.put("ruleset_name", "ruleset_..."); params.put("planned_ship_date", "2025-07-18"); params.put("deliver_by_date", "2025-07-20"); Shipment shipment = client.shipment.createLuma(params); System.out.println(shipment); } } ``` #### C# ```csharp using System; using System.Collections.Generic; using System.Threading.Tasks; using EasyPost; using Newtonsoft.Json; namespace EasyPostExamples { public class Examples { public static async Task Main() { var client = new EasyPost.Client(new EasyPost.ClientConfiguration("EASYPOST_API_KEY")); EasyPost.Parameters.Shipment.Create parameters = new() { ToAddress = new EasyPost.Parameters.Address.Create { Name = "Dr. Steve Brule", Street1 = "5744 Silverton Ave", City = "McKinney", State = "TX", Zip = "75070", Country = "US", Phone = "8573875756", Email = "dr_steve_brule@gmail.com" }, FromAddress = new EasyPost.Parameters.Address.Create { Name = "EasyPost", Street1 = "417 Montgomery Street", Street2 = "5th Floor", City = "San Francisco", State = "CA", Zip = "94104", Country = "US", Phone = "4153334445", Email = "support@easypost.com" }, Parcel = new EasyPost.Parameters.Parcel.Create { Length = 20.2, Width = 10.9, Height = 5, Weight = 65.9 }, CarrierAccountIds = new List { "ca_..." }, RulesetName = "ruleset_...", PlannedShipDate = "2025-07-18", DeliverByDate = "2025-07-20" }; EasyPost.Models.API.Shipment shipment = await client.Shipment.CreateAndBuyLuma(parameters); Console.WriteLine(JsonConvert.SerializeObject(shipment, Formatting.Indented)); } } } ``` #### Node.js ```javascript const EasyPost = require('@easypost/api'); const client = new EasyPost('EASYPOST_API_KEY'); (async () => { const shipment = await client.Shipment.createAndBuyLuma({ carrier_accounts: ['ca_...'], to_address: { name: 'Dr. Steve Brule', street1: '5744 Silverton Ave', city: 'McKinney', state: 'TX', zip: '75070', country: 'US', phone: '8573875756', email: 'dr_steve_brule@gmail.com', }, from_address: { name: 'EasyPost', street1: '417 Montgomery Street', street2: '5th Floor', city: 'San Francisco', state: 'CA', zip: '94104', country: 'US', phone: '4153334445', email: 'support@easypost.com', }, parcel: { length: 20.2, width: 10.9, height: 5, weight: 65.9, }, ruleset_name: 'ruleset_...', planned_ship_date: '2025-07-24', deliver_by_date: '2025-07-26', }); console.log(shipment); })(); ``` #### PHP ```php shipment->create([ 'carrier_accounts' => ['ca_...'], 'to_address' => [ 'name' => 'Dr. Steve Brule', 'street1' => '5744 Silverton Ave', 'city' => 'McKinney', 'state' => 'TX', 'zip' => '75070', 'country' => 'US', 'phone' => '8573875756', 'email' => 'dr_steve_brule@gmail.com' ], 'from_address' => [ 'name' => 'EasyPost', 'street1' => '417 Montgomery Street', 'street2' => '5th Floor', 'city' => 'San Francisco', 'state' => 'CA', 'zip' => '94104', 'country' => 'US', 'phone' => '4153334445', 'email' => 'support@easypost.com' ], 'parcel' => [ 'length' => 20.2, 'width' => 10.9, 'height' => 5, 'weight' => 65.9 ], 'ruleset_name' => 'ruleset_...', 'planned_ship_date' => '2025-07-18', 'deliver_by_date' => '2025-07-20' ]); echo $shipment; ``` #### Python ```python import easypost client = easypost.EasyPostClient("EASYPOST_API_KEY") shipment = client.shipment.create_and_buy_luma( carrier_accounts=["ca_..."], to_address={ "name": "Dr. Steve Brule", "street1": "5744 Silverton Ave", "city": "McKinney", "state": "TX", "zip": "75070", "country": "US", "phone": "8573875756", "email": "dr_steve_brule@gmail.com", }, from_address={ "name": "EasyPost", "street1": "417 Montgomery Street", "street2": "5th Floor", "city": "San Francisco", "state": "CA", "zip": "94104", "country": "US", "phone": "4153334445", "email": "support@easypost.com", }, parcel={ "length": 20.2, "width": 10.9, "height": 5, "weight": 65.9, }, ruleset_name="ruleset_...", planned_ship_date="2025-07-24", deliver_by_date="2025-07-26", ) print(shipment) ``` #### Ruby ```ruby # frozen_string_literal: true require 'easypost' client = EasyPost::Client.new(api_key: 'EASYPOST_API_KEY') shipment = client.shipment.create_and_buy_luma( to_address: { name: 'Dr. Steve Brule', street1: '5744 Silverton Ave', city: 'McKinney', state: 'TX', zip: '75070', country: 'US', phone: '8573875756', email: 'dr_steve_brule@gmail.com', }, from_address: { name: 'EasyPost', street1: '417 Montgomery Street', street2: '5th Floor', city: 'San Francisco', state: 'CA', zip: '94104', country: 'US', phone: '4153334445', email: 'support@easypost.com', }, parcel: { length: 20.2, width: 10.9, height: 5, weight: 65.9, }, carrier_accounts: ['ca_...'], ruleset_name: 'ruleset_...', planned_ship_date: '2025-07-16', deliver_by_date: '2025-07-18', ) puts shipment ``` The Luma One-Call Buy endpoint enables live rating, time in transit predictions, rate shopping, and label purchase in a single API call using a predefined Luma ruleset. The response is similar to the standard `/shipments` buy response, with the addition of a `luma_info` object that provides a detailed breakdown of the ruleset evaluation results. See Luma Info Object for a breakdown of the response structure. Insurance may be added at the time of purchase by including the `insurance` attribute within the `shipment` object as a string. All insurance values must be in U.S. dollars (USD). --- ## Standard Buy ### Example: POST /shipments/:id/luma #### cURL ```shell curl -X POST https://api.easypost.com/v2/shipments/shp_.../luma \ -u "EASYPOST_API_KEY": \ -H 'Content-Type: application/json' \ -d '{ "ruleset_name": ""ruleset_..."", "planned_ship_date": "YYYY-MM-DD", "deliver_by_date": "YYYY-MM-DD" }' ``` #### Go ```go package example import ( "fmt" "github.com/EasyPost/easypost-go/v6" ) func buy() { client := easypost.New("EASYPOST_API_KEY") shipment, _ := client.GetShipment("shp_...") lumaRequest := &easypost.LumaRequest{ Shipment: easypost.Shipment{ID: shipment.ID}, RulesetName: "ruleset_...", PlannedShipDate: "2025-07-21", DeliverByDate: "2025-07-25", PersistLabel: false, } shipment, _ = client.BuyLumaShipment(shipment.ID, lumaRequest) fmt.Println(shipment) } ``` #### Java ```java package luma; import com.easypost.exception.EasyPostException; import com.easypost.model.Shipment; import com.easypost.service.EasyPostClient; import java.util.HashMap; public class BuyLuma { public static void main(String[] args) throws EasyPostException { EasyPostClient client = new EasyPostClient("EASYPOST_API_KEY"); HashMap params = new HashMap(); params.put("ruleset_name", "ruleset_..."); params.put("planned_ship_date", "2025-07-18"); params.put("deliver_by_date", "2025-07-20"); Shipment shipment = client.shipment.luma("shp_...", params); System.out.println(shipment); } } ``` #### C# ```csharp using System; using System.Collections.Generic; using System.Threading.Tasks; using EasyPost; using Newtonsoft.Json; namespace EasyPostExamples { public class Examples { public static async Task Main() { var client = new EasyPost.Client(new EasyPost.ClientConfiguration("EASYPOST_API_KEY")); EasyPost.Models.API.Shipment shipment = await client.Shipment.Retrieve("shp_..."); shipment = await client.Shipment.BuyLuma( "shp_...", rulesetName: "ruleset_...", plannedShipDate: "2025-07-18", deliverByDate: "2025-07-20" ); Console.WriteLine(JsonConvert.SerializeObject(shipment, Formatting.Indented)); } } } ``` #### Node.js ```javascript const EasyPost = require('@easypost/api'); const client = new EasyPost('EASYPOST_API_KEY'); (async () => { const params = { ruleset_name: 'ruleset_...', planned_ship_date: '2025-07-18', deliver_by_date: '2025-07-20', }; const shipment = await client.Shipment.buyLuma('shp_...', params); console.log(shipment); })(); ``` #### PHP ```php shipment->luma('shp_...', [ 'ruleset_name' => 'ruleset_...', 'planned_ship_date' => '2025-07-18', 'deliver_by_date' => '2025-07-20' ]); echo $shipment; ``` #### Python ```python import easypost client = easypost.EasyPostClient("EASYPOST_API_KEY") shipment = client.shipment.buy_luma( "shp_...", ruleset_name="ruleset_...", planned_ship_date="2025-07-24", deliver_by_date="2025-07-26", ) print(shipment) ``` #### Ruby ```ruby # frozen_string_literal: true require 'easypost' client = EasyPost::Client.new(api_key: 'EASYPOST_API_KEY') retrieved_shipment = client.shipment.retrieve('shp_...') shipment = client.shipment.buy_luma( retrieved_shipment.id, ruleset_name: 'ruleset_...', planned_ship_date: '2025-07-16', deliver_by_date: '2025-07-18', ) puts shipment ``` A shipment object must be created with the following details before calling the Luma Standard Buy API: - `from_address`: The origin address. - `to_address`: The destination address. - `parcel`: Package weight, dimensions, and other relevant information. This step returns all available carrier rates associated with the EasyPost account. After creating the shipment, pass the `shipment_id` into the Luma API to purchase a label based on the predefined ruleset. --- ## LumaInfo Object The response includes standard shipment purchase details and a `luma_info` object that outlines the ruleset logic used to select the final rate. | Property | Type | Description | |----------|------|-------------| | ruleset_description | string | Describes the logic used to select the rate. | | matching_rule_idx | integer | The index position of the applied rule within the ruleset (starting from 0). | | ai_results | array | List of all fetched rates and their evaluation against the ruleset | | ai_results[].carrier | string | Carrier associated with the rate (e.g., USPS, FedEx). | | ai_results[].service | string | Carrier service level used for the rate (e.g., Express, Ground). | | ai_results[].rate_id | string | The ID of the specific rate. | | ai_results[].rate_usd | string | Total cost of the rate in USD | | ai_results[].predicted_deliver_by_date | string | Date the SmartRate AI predicts the package will be delivered. | | ai_results[].predicted_deliver_days | integer | Number of calendar days SmartRate AI predicts for delivery, factoring in weekends and carrier operations | | ai_results[].meets_ruleset_requirements | boolean | Indicates whether the rate meets the ruleset's transit time, cost, and carrier conditions. | Example Object: ```json { "luma_info": { "ai_results": [ { "carrier": "USPS", "meets_ruleset_requirements": false, "predicted_deliver_by_date": "2025-02-11", "predicted_deliver_days": 5, "rate_id": "rate_878246b64dfc4acdaae144632071ebbf", "rate_usd": "135.45", "service": "Express" }, { "carrier": "USPS", "meets_ruleset_requirements": false, "predicted_deliver_by_date": "2025-02-12", "predicted_deliver_days": 6, "rate_id": "rate_c5ea42853ee34db5a3b739a30c1d1e7d", "rate_usd": "41.44", "service": "Priority" }, { "carrier": "USPS", "meets_ruleset_requirements": false, "predicted_deliver_by_date": "2025-02-13", "predicted_deliver_days": 7, "rate_id": "rate_3041c849fcfb4eca8e7140ce8ac68ac2", "rate_usd": "23.85", "service": "GroundAdvantage" }, { "carrier": "UPSDAP", "meets_ruleset_requirements": true, "predicted_deliver_by_date": "2025-02-07", "predicted_deliver_days": 1, "rate_id": "rate_ecc1a08e97e349dc83645663e02e8ce6", "rate_usd": "94.45", "service": "NextDayAir" }, { "carrier": "UPSDAP", "meets_ruleset_requirements": true, "predicted_deliver_by_date": "2025-02-10", "predicted_deliver_days": 4, "rate_id": "rate_9de47a58578943f692779ba1ef649db0", "rate_usd": "124.45", "service": "NextDayAirEarlyAM" }, { "carrier": "UPSDAP", "meets_ruleset_requirements": true, "predicted_deliver_by_date": "2025-02-10", "predicted_deliver_days": 4, "rate_id": "rate_3a017a1f045a44088baba60cacaacae4", "rate_usd": "87.91", "service": "NextDayAirSaver" }, { "carrier": "UPSDAP", "meets_ruleset_requirements": false, "predicted_deliver_by_date": "2025-02-11", "predicted_deliver_days": 5, "rate_id": "rate_5c552ee17b764ebe8b3e040e23acc161", "rate_usd": "52.98", "service": "2ndDayAir" }, { "carrier": "UPSDAP", "meets_ruleset_requirements": false, "predicted_deliver_by_date": "2025-02-11", "predicted_deliver_days": 5, "rate_id": "rate_00697bb80a6a4690a4adc1fa821d0549", "rate_usd": "60.79", "service": "2ndDayAirAM" }, { "carrier": "UPSDAP", "meets_ruleset_requirements": false, "predicted_deliver_by_date": "2025-02-12", "predicted_deliver_days": 6, "rate_id": "rate_8d6d3b28b62d43e8bf137f7f63588807", "rate_usd": "38.19", "service": "3DaySelect" }, { "carrier": "UPSDAP", "meets_ruleset_requirements": false, "predicted_deliver_by_date": "2025-02-14", "predicted_deliver_days": 8, "rate_id": "rate_ec4000010aa74083bcf7af34d77cd69f", "rate_usd": "24.02", "service": "Ground" }, { "carrier": "FedExDefault", "meets_ruleset_requirements": false, "predicted_deliver_by_date": "2025-02-15", "predicted_deliver_days": 9, "rate_id": "rate_81be930fa6824faa9f75ce474db8c329", "rate_usd": "47.99", "service": "SMART_POST" }, { "carrier": "FedExDefault", "meets_ruleset_requirements": true, "predicted_deliver_by_date": "2025-02-10", "predicted_deliver_days": 4, "rate_id": "rate_8c590b2c9f9f42fa8986b19e0180d5bd", "rate_usd": "289.00", "service": "PRIORITY_OVERNIGHT" }, { "carrier": "FedExDefault", "meets_ruleset_requirements": true, "predicted_deliver_by_date": "2025-02-10", "predicted_deliver_days": 4, "rate_id": "rate_f6cba61f30714f7fb779b7b157c0c619", "rate_usd": "264.87", "service": "STANDARD_OVERNIGHT" }, { "carrier": "FedExDefault", "meets_ruleset_requirements": false, "predicted_deliver_by_date": "2025-02-11", "predicted_deliver_days": 5, "rate_id": "rate_9a64fd048d644d8daaece83c92b49ae8", "rate_usd": "202.16", "service": "FEDEX_2_DAY_AM" }, { "carrier": "FedExDefault", "meets_ruleset_requirements": false, "predicted_deliver_by_date": "2025-02-13", "predicted_deliver_days": 7, "rate_id": "rate_4fb6b986d5e242b39dcfd47bff29b74d", "rate_usd": "36.75", "service": "FEDEX_GROUND" } ], "matching_rule_idx": 0, "ruleset_description": "Buy the cheapest rate that satisfies all of the following:\nRule 0\n - Deliver by user input day of deliver_by_date - Transit day confidence >= 90\nOtherwise buy the cheapest rate" } } ``` --- ## Testing the Luma API To test the Luma API without incurring charges: - Use the **Test API Key** to execute the same buying logic on test shipments. - This test environment mirrors production logic, returning the rate that would be selected based on the chosen ruleset. For more details on Luma, refer to the Luma section of the EasyPost Help Center. --- Source: https://docs.easypost.com/docs/orders # Order **Important**: This endpoint only works with the following carriers: - AustraliaPost - DHLExpress - DPD - DPDUK - FedEx - UPS - Purolator - LoomisExpress The `Order` object represents a collection of packages and is intended only for multi-parcel shipping; please use `Shipments` for single-parcel shipping. Like a single `Shipment`, each `Order` consists of a `to_address` and `from_address`, to be used for each `Shipment` within the `Order`. These `Address` objects will be copied to each `Shipment`, so there is no need to specify them multiple times. Each `Shipment` must then specify its `Parcel`, `Options`, and `CustomsInfo`. **Note**: The `customs_info` field within the `Order` object is no longer used. Always specify `CustomsInfo` within each `Shipment` instead. An `Order` created with a valid `Address` pair and `Parcel` nested within the `Order`'s `Shipment` object will automatically retrieve available shipping `Rate` options. --- ## Order object | Property | Type | Description | |----------|------|-------------| | id | string | Unique, begins with "order_" | | object | string | "Order" | | mode | string | "test" or "production" | | to_address | Address | The destination address | | from_address | Address | The origin address | | return_address | Address | The shipper's address, defaults to from_address | | buyer_address | Address | The buyer's address, defaults to to_address | | shipments | Shipment array | All associated Shipment objects. Maximum of 100. | | customs_info | deprecated | The customs_info field at the order level is deprecated and should not be used. Specify CustomsInfo within each individual Shipment object instead. | | rates | Rate array | All associated Rate objects | | messages | Message array | Any carrier errors encountered during rating | | is_return | boolean | Set true to create as a return. | | created_at | datetime | When the Order was created | | updated_at | datetime | When the Order was last updated | Example Object: ```json { "mode": "test", "reference": "", "is_return": false, "options": { "currency": "USD", "payment": { "type": "SENDER" } }, "messages": [], "created_at": "2025-05-09T20:48:00Z", "updated_at": "2025-05-09T20:48:00Z", "customs_info": null, "from_address": { "id": "adr_e51506082d1611f0b9823cecef1b359e", "object": "Address", "created_at": "2025-05-09T20:48:00+00:00", "updated_at": "2025-05-09T20:48:00+00:00", "name": "EasyPost", "company": null, "street1": "417 Montgomery Street", "street2": "5th Floor", "city": "San Francisco", "state": "CA", "zip": "94104", "country": "US", "phone": "4153334445", "email": "support@easypost.com", "mode": "test", "carrier_facility": null, "residential": null, "federal_tax_id": null, "state_tax_id": null, "verifications": {} }, "to_address": { "id": "adr_e51381df2d1611f0b9803cecef1b359e", "object": "Address", "created_at": "2025-05-09T20:48:00+00:00", "updated_at": "2025-05-09T20:48:01+00:00", "name": "DR. STEVE BRULE", "company": null, "street1": "179 N HARBOR DR", "street2": "", "city": "REDONDO BEACH", "state": "CA", "zip": "90277-2506", "country": "US", "phone": "8573875756", "email": "DR_STEVE_BRULE@GMAIL.COM", "mode": "test", "carrier_facility": null, "residential": false, "federal_tax_id": null, "state_tax_id": null, "verifications": { "zip4": { "success": true, "errors": [], "details": null }, "delivery": { "success": true, "errors": [], "details": { "latitude": 33.8436, "longitude": -118.39177, "time_zone": "America/Los_Angeles" } } } }, "buyer_address": { "id": "adr_e51381df2d1611f0b9803cecef1b359e", "object": "Address", "created_at": "2025-05-09T20:48:00+00:00", "updated_at": "2025-05-09T20:48:01+00:00", "name": "DR. STEVE BRULE", "company": null, "street1": "179 N HARBOR DR", "street2": "", "city": "REDONDO BEACH", "state": "CA", "zip": "90277-2506", "country": "US", "phone": "8573875756", "email": "DR_STEVE_BRULE@GMAIL.COM", "mode": "test", "carrier_facility": null, "residential": false, "federal_tax_id": null, "state_tax_id": null, "verifications": { "zip4": { "success": true, "errors": [], "details": null }, "delivery": { "success": true, "errors": [], "details": { "latitude": 33.8436, "longitude": -118.39177, "time_zone": "America/Los_Angeles" } } } }, "return_address": { "id": "adr_e51506082d1611f0b9823cecef1b359e", "object": "Address", "created_at": "2025-05-09T20:48:00+00:00", "updated_at": "2025-05-09T20:48:00+00:00", "name": "EasyPost", "company": null, "street1": "417 Montgomery Street", "street2": "5th Floor", "city": "San Francisco", "state": "CA", "zip": "94104", "country": "US", "phone": "4153334445", "email": "support@easypost.com", "mode": "test", "carrier_facility": null, "residential": null, "federal_tax_id": null, "state_tax_id": null, "verifications": {} }, "shipments": [ { "id": "shp_dc956f485e2540889b7f7eab7d668b88", "created_at": "2025-05-09T20:48:00Z", "is_return": false, "messages": [], "mode": "test", "options": { "currency": "USD", "payment": { "type": "SENDER" }, "date_advance": 0 }, "reference": null, "status": "unknown", "tracking_code": "9400100208303109837512", "updated_at": "2025-05-09T20:48:01Z", "batch_id": null, "batch_status": null, "batch_message": null, "customs_info": null, "from_address": { "id": "adr_e51506082d1611f0b9823cecef1b359e", "object": "Address", "created_at": "2025-05-09T20:48:00+00:00", "updated_at": "2025-05-09T20:48:00+00:00", "name": "EasyPost", "company": null, "street1": "417 Montgomery Street", "street2": "5th Floor", "city": "San Francisco", "state": "CA", "zip": "94104", "country": "US", "phone": "4153334445", "email": "support@easypost.com", "mode": "test", "carrier_facility": null, "residential": null, "federal_tax_id": null, "state_tax_id": null, "verifications": {} }, "insurance": null, "order_id": "order_dae84134c5d54a01a57ff6eab32c34a2", "parcel": { "id": "prcl_dbd3f85ebce547f3baf9285545bc86cf", "object": "Parcel", "created_at": "2025-05-09T20:48:00Z", "updated_at": "2025-05-09T20:48:00Z", "length": null, "width": null, "height": null, "predefined_package": null, "weight": 10.2, "mode": "test" }, "postage_label": { "object": "PostageLabel", "id": "pl_ec778bac45c848ffb010782a8ac9d794", "created_at": "2025-05-09T20:48:01Z", "updated_at": "2025-05-09T20:48:01Z", "date_advance": 0, "integrated_form": "none", "label_date": "2025-05-09T20:48:01Z", "label_resolution": 300, "label_size": "4x6", "label_type": "default", "label_file_type": "image/png", "label_url": "https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20250509/e811f9e30a55d8495691c382633bd1de27.png", "label_pdf_url": null, "label_zpl_url": null, "label_epl2_url": null, "label_file": null }, "rates": [ { "id": "rate_76b94a6a12e4451ebd2c83d643499e52", "object": "Rate", "created_at": "2025-05-09T20:48:00Z", "updated_at": "2025-05-09T20:48:00Z", "mode": "test", "service": "Express", "carrier": "USPS", "rate": "34.15", "currency": "USD", "retail_rate": "39.10", "retail_currency": "USD", "list_rate": "34.15", "list_currency": "USD", "billing_type": "easypost", "delivery_days": 2, "delivery_date": null, "delivery_date_guaranteed": false, "est_delivery_days": 2, "shipment_id": "shp_dc956f485e2540889b7f7eab7d668b88", "carrier_account_id": "ca_9685a1198a75477885a3cdca37559bac" }, { "id": "rate_f5162cf3d5404cde8b9152111f35f691", "object": "Rate", "created_at": "2025-05-09T20:48:00Z", "updated_at": "2025-05-09T20:48:00Z", "mode": "test", "service": "Priority", "carrier": "USPS", "rate": "7.42", "currency": "USD", "retail_rate": "9.90", "retail_currency": "USD", "list_rate": "8.34", "list_currency": "USD", "billing_type": "easypost", "delivery_days": 2, "delivery_date": null, "delivery_date_guaranteed": false, "est_delivery_days": 2, "shipment_id": "shp_dc956f485e2540889b7f7eab7d668b88", "carrier_account_id": "ca_9685a1198a75477885a3cdca37559bac" }, { "id": "rate_d7494d4d8044411ab025bf44a7bb5400", "object": "Rate", "created_at": "2025-05-09T20:48:00Z", "updated_at": "2025-05-09T20:48:00Z", "mode": "test", "service": "GroundAdvantage", "carrier": "USPS", "rate": "5.21", "currency": "USD", "retail_rate": "7.00", "retail_currency": "USD", "list_rate": "5.21", "list_currency": "USD", "billing_type": "easypost", "delivery_days": 3, "delivery_date": null, "delivery_date_guaranteed": false, "est_delivery_days": 3, "shipment_id": "shp_dc956f485e2540889b7f7eab7d668b88", "carrier_account_id": "ca_9685a1198a75477885a3cdca37559bac" } ], "refund_status": null, "scan_form": null, "selected_rate": { "id": "rate_d7494d4d8044411ab025bf44a7bb5400", "object": "Rate", "created_at": "2025-05-09T20:48:01Z", "updated_at": "2025-05-09T20:48:01Z", "mode": "test", "service": "GroundAdvantage", "carrier": "USPS", "rate": "5.21", "currency": "USD", "retail_rate": "7.00", "retail_currency": "USD", "list_rate": "5.21", "list_currency": "USD", "billing_type": "easypost", "delivery_days": 3, "delivery_date": null, "delivery_date_guaranteed": false, "est_delivery_days": 3, "shipment_id": "shp_dc956f485e2540889b7f7eab7d668b88", "carrier_account_id": "ca_9685a1198a75477885a3cdca37559bac" }, "tracker": { "id": "trk_82b8af6bc0ed482f957360e0a592caaa", "object": "Tracker", "mode": "test", "tracking_code": "9400100208303109837512", "status": "unknown", "status_detail": "unknown", "created_at": "2025-05-09T20:48:02Z", "updated_at": "2025-05-09T20:48:02Z", "signed_by": null, "weight": null, "est_delivery_date": null, "shipment_id": "shp_dc956f485e2540889b7f7eab7d668b88", "carrier": "USPS", "tracking_details": [], "fees": [], "carrier_detail": null, "public_url": "https://track.easypost.com/djE6dHJrXzgyYjhhZjZiYzBlZDQ4MmY5NTczNjBlMGE1OTJjYWFh" }, "to_address": { "id": "adr_e51381df2d1611f0b9803cecef1b359e", "object": "Address", "created_at": "2025-05-09T20:48:00+00:00", "updated_at": "2025-05-09T20:48:01+00:00", "name": "DR. STEVE BRULE", "company": null, "street1": "179 N HARBOR DR", "street2": "", "city": "REDONDO BEACH", "state": "CA", "zip": "90277-2506", "country": "US", "phone": "8573875756", "email": "DR_STEVE_BRULE@GMAIL.COM", "mode": "test", "carrier_facility": null, "residential": false, "federal_tax_id": null, "state_tax_id": null, "verifications": { "zip4": { "success": true, "errors": [], "details": null }, "delivery": { "success": true, "errors": [], "details": { "latitude": 33.8436, "longitude": -118.39177, "time_zone": "America/Los_Angeles" } } } }, "usps_zone": 4, "return_address": { "id": "adr_e51506082d1611f0b9823cecef1b359e", "object": "Address", "created_at": "2025-05-09T20:48:00+00:00", "updated_at": "2025-05-09T20:48:00+00:00", "name": "EasyPost", "company": null, "street1": "417 Montgomery Street", "street2": "5th Floor", "city": "San Francisco", "state": "CA", "zip": "94104", "country": "US", "phone": "4153334445", "email": "support@easypost.com", "mode": "test", "carrier_facility": null, "residential": null, "federal_tax_id": null, "state_tax_id": null, "verifications": {} }, "buyer_address": { "id": "adr_e51381df2d1611f0b9803cecef1b359e", "object": "Address", "created_at": "2025-05-09T20:48:00+00:00", "updated_at": "2025-05-09T20:48:01+00:00", "name": "DR. STEVE BRULE", "company": null, "street1": "179 N HARBOR DR", "street2": "", "city": "REDONDO BEACH", "state": "CA", "zip": "90277-2506", "country": "US", "phone": "8573875756", "email": "DR_STEVE_BRULE@GMAIL.COM", "mode": "test", "carrier_facility": null, "residential": false, "federal_tax_id": null, "state_tax_id": null, "verifications": { "zip4": { "success": true, "errors": [], "details": null }, "delivery": { "success": true, "errors": [], "details": { "latitude": 33.8436, "longitude": -118.39177, "time_zone": "America/Los_Angeles" } } } }, "forms": [], "fees": [ { "object": "Fee", "type": "PostageFee", "amount": "5.21000", "charged": true, "refunded": false } ], "object": "Shipment" }, { "id": "shp_fe48581e16154012b1e51ad5606d34c1", "created_at": "2025-05-09T20:48:00Z", "is_return": false, "messages": [], "mode": "test", "options": { "currency": "USD", "payment": { "type": "SENDER" }, "date_advance": 0 }, "reference": null, "status": "unknown", "tracking_code": "9434600208303109842303", "updated_at": "2025-05-09T20:48:02Z", "batch_id": null, "batch_status": null, "batch_message": null, "customs_info": null, "from_address": { "id": "adr_e51506082d1611f0b9823cecef1b359e", "object": "Address", "created_at": "2025-05-09T20:48:00+00:00", "updated_at": "2025-05-09T20:48:00+00:00", "name": "EasyPost", "company": null, "street1": "417 Montgomery Street", "street2": "5th Floor", "city": "San Francisco", "state": "CA", "zip": "94104", "country": "US", "phone": "4153334445", "email": "support@easypost.com", "mode": "test", "carrier_facility": null, "residential": null, "federal_tax_id": null, "state_tax_id": null, "verifications": {} }, "insurance": null, "order_id": "order_dae84134c5d54a01a57ff6eab32c34a2", "parcel": { "id": "prcl_69844696fd314ceeb78bb9969034a102", "object": "Parcel", "created_at": "2025-05-09T20:48:00Z", "updated_at": "2025-05-09T20:48:00Z", "length": null, "width": null, "height": null, "predefined_package": null, "weight": 17.5, "mode": "test" }, "postage_label": { "object": "PostageLabel", "id": "pl_417029731e9d45c8b7e2750043a3517d", "created_at": "2025-05-09T20:48:01Z", "updated_at": "2025-05-09T20:48:02Z", "date_advance": 0, "integrated_form": "none", "label_date": "2025-05-09T20:48:01Z", "label_resolution": 300, "label_size": "4x6", "label_type": "default", "label_file_type": "image/png", "label_url": "https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20250509/e864b415157bbf4709a37a07e9a5cd1550.png", "label_pdf_url": null, "label_zpl_url": null, "label_epl2_url": null, "label_file": null }, "rates": [ { "id": "rate_cc10630499d943208164f119319612a2", "object": "Rate", "created_at": "2025-05-09T20:48:00Z", "updated_at": "2025-05-09T20:48:00Z", "mode": "test", "service": "Priority", "carrier": "USPS", "rate": "8.22", "currency": "USD", "retail_rate": "12.65", "retail_currency": "USD", "list_rate": "9.07", "list_currency": "USD", "billing_type": "easypost", "delivery_days": 2, "delivery_date": null, "delivery_date_guaranteed": false, "est_delivery_days": 2, "shipment_id": "shp_fe48581e16154012b1e51ad5606d34c1", "carrier_account_id": "ca_9685a1198a75477885a3cdca37559bac" }, { "id": "rate_270b4cbb74434de5883abdd54d308788", "object": "Rate", "created_at": "2025-05-09T20:48:00Z", "updated_at": "2025-05-09T20:48:00Z", "mode": "test", "service": "GroundAdvantage", "carrier": "USPS", "rate": "6.53", "currency": "USD", "retail_rate": "11.40", "retail_currency": "USD", "list_rate": "8.05", "list_currency": "USD", "billing_type": "easypost", "delivery_days": 3, "delivery_date": null, "delivery_date_guaranteed": false, "est_delivery_days": 3, "shipment_id": "shp_fe48581e16154012b1e51ad5606d34c1", "carrier_account_id": "ca_9685a1198a75477885a3cdca37559bac" }, { "id": "rate_5ec54c14e6a147ada7d670f294a40a1b", "object": "Rate", "created_at": "2025-05-09T20:48:00Z", "updated_at": "2025-05-09T20:48:00Z", "mode": "test", "service": "Express", "carrier": "USPS", "rate": "38.40", "currency": "USD", "retail_rate": "44.15", "retail_currency": "USD", "list_rate": "38.40", "list_currency": "USD", "billing_type": "easypost", "delivery_days": 2, "delivery_date": null, "delivery_date_guaranteed": false, "est_delivery_days": 2, "shipment_id": "shp_fe48581e16154012b1e51ad5606d34c1", "carrier_account_id": "ca_9685a1198a75477885a3cdca37559bac" } ], "refund_status": null, "scan_form": null, "selected_rate": { "id": "rate_270b4cbb74434de5883abdd54d308788", "object": "Rate", "created_at": "2025-05-09T20:48:01Z", "updated_at": "2025-05-09T20:48:01Z", "mode": "test", "service": "GroundAdvantage", "carrier": "USPS", "rate": "6.53", "currency": "USD", "retail_rate": "11.40", "retail_currency": "USD", "list_rate": "8.05", "list_currency": "USD", "billing_type": "easypost", "delivery_days": 3, "delivery_date": null, "delivery_date_guaranteed": false, "est_delivery_days": 3, "shipment_id": "shp_fe48581e16154012b1e51ad5606d34c1", "carrier_account_id": "ca_9685a1198a75477885a3cdca37559bac" }, "tracker": { "id": "trk_545fffdf10084dab8a56046d00b08ad7", "object": "Tracker", "mode": "test", "tracking_code": "9434600208303109842303", "status": "unknown", "status_detail": "unknown", "created_at": "2025-05-09T20:48:02Z", "updated_at": "2025-05-09T20:48:02Z", "signed_by": null, "weight": null, "est_delivery_date": null, "shipment_id": "shp_fe48581e16154012b1e51ad5606d34c1", "carrier": "USPS", "tracking_details": [], "fees": [], "carrier_detail": null, "public_url": "https://track.easypost.com/djE6dHJrXzU0NWZmZmRmMTAwODRkYWI4YTU2MDQ2ZDAwYjA4YWQ3" }, "to_address": { "id": "adr_e51381df2d1611f0b9803cecef1b359e", "object": "Address", "created_at": "2025-05-09T20:48:00+00:00", "updated_at": "2025-05-09T20:48:01+00:00", "name": "DR. STEVE BRULE", "company": null, "street1": "179 N HARBOR DR", "street2": "", "city": "REDONDO BEACH", "state": "CA", "zip": "90277-2506", "country": "US", "phone": "8573875756", "email": "DR_STEVE_BRULE@GMAIL.COM", "mode": "test", "carrier_facility": null, "residential": false, "federal_tax_id": null, "state_tax_id": null, "verifications": { "zip4": { "success": true, "errors": [], "details": null }, "delivery": { "success": true, "errors": [], "details": { "latitude": 33.8436, "longitude": -118.39177, "time_zone": "America/Los_Angeles" } } } }, "usps_zone": 4, "return_address": { "id": "adr_e51506082d1611f0b9823cecef1b359e", "object": "Address", "created_at": "2025-05-09T20:48:00+00:00", "updated_at": "2025-05-09T20:48:00+00:00", "name": "EasyPost", "company": null, "street1": "417 Montgomery Street", "street2": "5th Floor", "city": "San Francisco", "state": "CA", "zip": "94104", "country": "US", "phone": "4153334445", "email": "support@easypost.com", "mode": "test", "carrier_facility": null, "residential": null, "federal_tax_id": null, "state_tax_id": null, "verifications": {} }, "buyer_address": { "id": "adr_e51381df2d1611f0b9803cecef1b359e", "object": "Address", "created_at": "2025-05-09T20:48:00+00:00", "updated_at": "2025-05-09T20:48:01+00:00", "name": "DR. STEVE BRULE", "company": null, "street1": "179 N HARBOR DR", "street2": "", "city": "REDONDO BEACH", "state": "CA", "zip": "90277-2506", "country": "US", "phone": "8573875756", "email": "DR_STEVE_BRULE@GMAIL.COM", "mode": "test", "carrier_facility": null, "residential": false, "federal_tax_id": null, "state_tax_id": null, "verifications": { "zip4": { "success": true, "errors": [], "details": null }, "delivery": { "success": true, "errors": [], "details": { "latitude": 33.8436, "longitude": -118.39177, "time_zone": "America/Los_Angeles" } } } }, "forms": [], "fees": [ { "object": "Fee", "type": "PostageFee", "amount": "6.53000", "charged": true, "refunded": false } ], "object": "Shipment" } ], "rates": [ { "id": "rate_76b94a6a12e4451ebd2c83d643499e52", "object": "Rate", "created_at": null, "updated_at": null, "mode": "test", "service": "Express", "carrier": "USPS", "rate": "72.55", "currency": "USD", "retail_rate": "83.25", "retail_currency": "USD", "list_rate": "72.55", "list_currency": "USD", "billing_type": "easypost", "delivery_days": 2, "delivery_date": null, "delivery_date_guaranteed": false, "est_delivery_days": 2, "shipment_id": "shp_dc956f485e2540889b7f7eab7d668b88", "carrier_account_id": "ca_9685a1198a75477885a3cdca37559bac" }, { "id": "rate_f5162cf3d5404cde8b9152111f35f691", "object": "Rate", "created_at": null, "updated_at": null, "mode": "test", "service": "Priority", "carrier": "USPS", "rate": "15.64", "currency": "USD", "retail_rate": "22.55", "retail_currency": "USD", "list_rate": "17.41", "list_currency": "USD", "billing_type": "easypost", "delivery_days": 2, "delivery_date": null, "delivery_date_guaranteed": false, "est_delivery_days": 2, "shipment_id": "shp_dc956f485e2540889b7f7eab7d668b88", "carrier_account_id": "ca_9685a1198a75477885a3cdca37559bac" }, { "id": "rate_d7494d4d8044411ab025bf44a7bb5400", "object": "Rate", "created_at": null, "updated_at": null, "mode": "test", "service": "GroundAdvantage", "carrier": "USPS", "rate": "11.74", "currency": "USD", "retail_rate": "18.40", "retail_currency": "USD", "list_rate": "13.26", "list_currency": "USD", "billing_type": "easypost", "delivery_days": 3, "delivery_date": null, "delivery_date_guaranteed": false, "est_delivery_days": 3, "shipment_id": "shp_dc956f485e2540889b7f7eab7d668b88", "carrier_account_id": "ca_9685a1198a75477885a3cdca37559bac" } ], "id": "order_dae84134c5d54a01a57ff6eab32c34a2", "object": "Order" } ``` --- ## Create an Order ### Example: POST /orders #### cURL ```shell curl -X POST https://api.easypost.com/v2/orders \ -u "EASYPOST_API_KEY": \ -H 'Content-Type: application/json' \ -d '{ "order": { "to_address": { "id": "adr_..." }, "from_address": { "id": "adr_..." }, "shipments": [ { "parcel": { "weight": "10.2" } }, { "parcel": { "predefined_package": "FedExBox", "weight": "17.5" } } ] } }' ``` #### Go ```go package example import ( "fmt" "github.com/EasyPost/easypost-go/v6" ) func create() { client := easypost.New("EASYPOST_API_KEY") toAddress, _ := client.GetAddress("adr_...") fromAddress, _ := client.GetAddress("adr_...") firstShipment := &easypost.Shipment{ Parcel: &easypost.Parcel{ Weight: 10.2, }, } secondShipment := &easypost.Shipment{ Parcel: &easypost.Parcel{ PredefinedPackage: "FedExBox", Weight: 17.5, }, } order, _ := client.CreateOrder( &easypost.Order{ ToAddress: toAddress, FromAddress: fromAddress, Shipments: []*easypost.Shipment{ firstShipment, secondShipment, }, }, ) fmt.Println(order) } ``` #### Java ```java package order; import com.easypost.exception.EasyPostException; import com.easypost.model.Order; import com.easypost.service.EasyPostClient; import java.util.ArrayList; import java.util.HashMap; public class Create { public static void main(String[] args) throws EasyPostException { EasyPostClient client = new EasyPostClient("EASYPOST_API_KEY"); HashMap toAddress = new HashMap(); toAddress.put("id", "adr_..."); HashMap fromAddress = new HashMap(); fromAddress.put("id", "adr_..."); HashMap parcel1 = new HashMap(); parcel1.put("weight", 10.2); HashMap parcel2 = new HashMap(); parcel2.put("weight", 17.5); parcel2.put("predefined_package", "FedExBox"); ArrayList> parcels = new ArrayList>(); parcels.add(parcel1); parcels.add(parcel2); HashMap params = new HashMap(); params.put("to_address", toAddress); params.put("from_address", fromAddress); params.put("shipments", parcels); Order order = client.order.create(params); System.out.println(order); } } ``` #### C# ```csharp using System; using System.Collections.Generic; using System.Threading.Tasks; using EasyPost; using Newtonsoft.Json; namespace EasyPostExamples { public class Examples { public static async Task Main() { var client = new EasyPost.Client(new EasyPost.ClientConfiguration("EASYPOST_API_KEY")); EasyPost.Parameters.Order.Create parameters = new() { ToAddress = new EasyPost.Parameters.Address.Create { Name = "Dr. Steve Brule", Street1 = "417 Montgomery Street", Street2 = "5th Floor", City = "San Francisco", State = "CA", Country = "US", Zip = "94104" }, FromAddress = new EasyPost.Parameters.Address.Create { Company = "EasyPost", Street1 = "417 Montgomery Street", Street2 = "Floor 5", City = "San Francisco", State = "CA", Country = "US", Zip = "94104" }, Shipments = new List { new EasyPost.Parameters.Shipment.Create() { Parcel = new EasyPost.Parameters.Parcel.Create { Weight = 10.2 } }, new EasyPost.Parameters.Shipment.Create() { Parcel = new EasyPost.Parameters.Parcel.Create { PredefinedPackage = "FedExBox", Weight = 17.5 } } }, }; EasyPost.Models.API.Order order = await client.Order.Create(parameters); Console.WriteLine(JsonConvert.SerializeObject(order, Formatting.Indented)); } } } ``` #### Node.js ```javascript const EasyPostClient = require('@easypost/api'); const client = new EasyPostClient('EASYPOST_API_KEY'); (async () => { const order = await client.Order.create({ to_address: { id: 'adr_...' }, from_address: { id: 'adr_...' }, shipments: [ { parcel: { weight: 10.2, }, }, { parcel: { predefined_package: 'FedExBox', weight: 17.5, }, }, ], }); console.log(order); })(); ``` #### PHP ```php order->create([ 'to_address' => ['id' => 'adr_...'], 'from_address' => ['id' => 'adr_...'], 'shipments' => [ [ 'parcel' => [ 'weight' => 10.2 ] ], [ 'parcel' => [ 'predefined_package' => 'FedExBox', 'weight' => 17.5 ] ], ], ]); echo $order; ``` #### Python ```python import easypost client = easypost.EasyPostClient("EASYPOST_API_KEY") order = client.order.create( to_address={"id": "adr_..."}, from_address={"id": "adr_..."}, shipments=[ { "parcel": { "weight": 10.2, } }, { "parcel": { "predefined_package": "FedExBox", "weight": 17.5, } }, ], ) print(order) ``` #### Ruby ```ruby require 'easypost' client = EasyPost::Client.new(api_key: 'EASYPOST_API_KEY') order = client.order.create( to_address: { id: 'adr_...', }, from_address: { id: 'adr_...', }, shipments: [ { parcel: { weight: 10.2, }, }, { parcel: { predefined_package: 'FedExBox', weight: 17.5, }, }, ], ) puts order ``` Creating an `Order` is intended only for multi-parcel shipping; please use `Shipments` for single-parcel shipping. An `Order` is almost exclusively a container for other objects, and thus an `Order` may reuse many of these objects. Alternatively, all the objects contained within an `Order` may be created at the same time. You can limit the `CarrierAccounts` to use for rating by passing the `carrier_accounts` parameter. [Note: This object is immutable after creation. Review the rendered documentation for details.] --- ## Buy an Order ### Example: POST /orders/:id/buy #### cURL ```shell curl -X POST https://api.easypost.com/v2/orders \ -u "EASYPOST_API_KEY": \ -H 'Content-Type: application/json' \ -d '{ "order": { "to_address": { "id": "adr_..." }, "from_address": { "id": "adr_..." }, "shipments": [ { "parcel": { "weight": "10.2" } }, { "parcel": { "predefined_package": "FedExBox", "weight": "17.5" } } ] } }' ``` #### Go ```go package example import ( "fmt" "github.com/EasyPost/easypost-go/v6" ) func create() { client := easypost.New("EASYPOST_API_KEY") toAddress, _ := client.GetAddress("adr_...") fromAddress, _ := client.GetAddress("adr_...") firstShipment := &easypost.Shipment{ Parcel: &easypost.Parcel{ Weight: 10.2, }, } secondShipment := &easypost.Shipment{ Parcel: &easypost.Parcel{ PredefinedPackage: "FedExBox", Weight: 17.5, }, } order, _ := client.CreateOrder( &easypost.Order{ ToAddress: toAddress, FromAddress: fromAddress, Shipments: []*easypost.Shipment{ firstShipment, secondShipment, }, }, ) fmt.Println(order) } ``` #### Java ```java package order; import com.easypost.exception.EasyPostException; import com.easypost.model.Order; import com.easypost.service.EasyPostClient; import java.util.ArrayList; import java.util.HashMap; public class Create { public static void main(String[] args) throws EasyPostException { EasyPostClient client = new EasyPostClient("EASYPOST_API_KEY"); HashMap toAddress = new HashMap(); toAddress.put("id", "adr_..."); HashMap fromAddress = new HashMap(); fromAddress.put("id", "adr_..."); HashMap parcel1 = new HashMap(); parcel1.put("weight", 10.2); HashMap parcel2 = new HashMap(); parcel2.put("weight", 17.5); parcel2.put("predefined_package", "FedExBox"); ArrayList> parcels = new ArrayList>(); parcels.add(parcel1); parcels.add(parcel2); HashMap params = new HashMap(); params.put("to_address", toAddress); params.put("from_address", fromAddress); params.put("shipments", parcels); Order order = client.order.create(params); System.out.println(order); } } ``` #### C# ```csharp using System; using System.Collections.Generic; using System.Threading.Tasks; using EasyPost; using Newtonsoft.Json; namespace EasyPostExamples { public class Examples { public static async Task Main() { var client = new EasyPost.Client(new EasyPost.ClientConfiguration("EASYPOST_API_KEY")); EasyPost.Parameters.Order.Create parameters = new() { ToAddress = new EasyPost.Parameters.Address.Create { Name = "Dr. Steve Brule", Street1 = "417 Montgomery Street", Street2 = "5th Floor", City = "San Francisco", State = "CA", Country = "US", Zip = "94104" }, FromAddress = new EasyPost.Parameters.Address.Create { Company = "EasyPost", Street1 = "417 Montgomery Street", Street2 = "Floor 5", City = "San Francisco", State = "CA", Country = "US", Zip = "94104" }, Shipments = new List { new EasyPost.Parameters.Shipment.Create() { Parcel = new EasyPost.Parameters.Parcel.Create { Weight = 10.2 } }, new EasyPost.Parameters.Shipment.Create() { Parcel = new EasyPost.Parameters.Parcel.Create { PredefinedPackage = "FedExBox", Weight = 17.5 } } }, }; EasyPost.Models.API.Order order = await client.Order.Create(parameters); Console.WriteLine(JsonConvert.SerializeObject(order, Formatting.Indented)); } } } ``` #### Node.js ```javascript const EasyPostClient = require('@easypost/api'); const client = new EasyPostClient('EASYPOST_API_KEY'); (async () => { const order = await client.Order.create({ to_address: { id: 'adr_...' }, from_address: { id: 'adr_...' }, shipments: [ { parcel: { weight: 10.2, }, }, { parcel: { predefined_package: 'FedExBox', weight: 17.5, }, }, ], }); console.log(order); })(); ``` #### PHP ```php order->create([ 'to_address' => ['id' => 'adr_...'], 'from_address' => ['id' => 'adr_...'], 'shipments' => [ [ 'parcel' => [ 'weight' => 10.2 ] ], [ 'parcel' => [ 'predefined_package' => 'FedExBox', 'weight' => 17.5 ] ], ], ]); echo $order; ``` #### Python ```python import easypost client = easypost.EasyPostClient("EASYPOST_API_KEY") order = client.order.create( to_address={"id": "adr_..."}, from_address={"id": "adr_..."}, shipments=[ { "parcel": { "weight": 10.2, } }, { "parcel": { "predefined_package": "FedExBox", "weight": 17.5, } }, ], ) print(order) ``` #### Ruby ```ruby require 'easypost' client = EasyPost::Client.new(api_key: 'EASYPOST_API_KEY') order = client.order.create( to_address: { id: 'adr_...', }, from_address: { id: 'adr_...', }, shipments: [ { parcel: { weight: 10.2, }, }, { parcel: { predefined_package: 'FedExBox', weight: 17.5, }, }, ], ) puts order ``` To purchase an `Order`, you only need to specify the `carrier` and `service`. This operation populates the `tracking_code` and `postage_label` attributes of each `Shipment` in the order. --- ## Buy an Order without rating (One-Call Buy) ### Example: POST /orders (One-Call Buy) #### cURL ```shell curl -X POST https://api.easypost.com/v2/orders \ -u "EASYPOST_API_KEY": \ -H 'Content-Type: application/json' \ -d '{ "order": { "to_address": { "id": "adr_..." }, "from_address": { "id": "adr_..." }, "shipments": [ { "parcel": { "weight": "10.2" } }, { "parcel": { "predefined_package": "FedExBox", "weight": "17.5" } } ] } }' ``` #### Go ```go package example import ( "fmt" "github.com/EasyPost/easypost-go/v6" ) func create() { client := easypost.New("EASYPOST_API_KEY") toAddress, _ := client.GetAddress("adr_...") fromAddress, _ := client.GetAddress("adr_...") firstShipment := &easypost.Shipment{ Parcel: &easypost.Parcel{ Weight: 10.2, }, } secondShipment := &easypost.Shipment{ Parcel: &easypost.Parcel{ PredefinedPackage: "FedExBox", Weight: 17.5, }, } order, _ := client.CreateOrder( &easypost.Order{ ToAddress: toAddress, FromAddress: fromAddress, Shipments: []*easypost.Shipment{ firstShipment, secondShipment, }, }, ) fmt.Println(order) } ``` #### Java ```java package order; import com.easypost.exception.EasyPostException; import com.easypost.model.Order; import com.easypost.service.EasyPostClient; import java.util.ArrayList; import java.util.HashMap; public class Create { public static void main(String[] args) throws EasyPostException { EasyPostClient client = new EasyPostClient("EASYPOST_API_KEY"); HashMap toAddress = new HashMap(); toAddress.put("id", "adr_..."); HashMap fromAddress = new HashMap(); fromAddress.put("id", "adr_..."); HashMap parcel1 = new HashMap(); parcel1.put("weight", 10.2); HashMap parcel2 = new HashMap(); parcel2.put("weight", 17.5); parcel2.put("predefined_package", "FedExBox"); ArrayList> parcels = new ArrayList>(); parcels.add(parcel1); parcels.add(parcel2); HashMap params = new HashMap(); params.put("to_address", toAddress); params.put("from_address", fromAddress); params.put("shipments", parcels); Order order = client.order.create(params); System.out.println(order); } } ``` #### C# ```csharp using System; using System.Collections.Generic; using System.Threading.Tasks; using EasyPost; using Newtonsoft.Json; namespace EasyPostExamples { public class Examples { public static async Task Main() { var client = new EasyPost.Client(new EasyPost.ClientConfiguration("EASYPOST_API_KEY")); EasyPost.Parameters.Order.Create parameters = new() { ToAddress = new EasyPost.Parameters.Address.Create { Name = "Dr. Steve Brule", Street1 = "417 Montgomery Street", Street2 = "5th Floor", City = "San Francisco", State = "CA", Country = "US", Zip = "94104" }, FromAddress = new EasyPost.Parameters.Address.Create { Company = "EasyPost", Street1 = "417 Montgomery Street", Street2 = "Floor 5", City = "San Francisco", State = "CA", Country = "US", Zip = "94104" }, Shipments = new List { new EasyPost.Parameters.Shipment.Create() { Parcel = new EasyPost.Parameters.Parcel.Create { Weight = 10.2 } }, new EasyPost.Parameters.Shipment.Create() { Parcel = new EasyPost.Parameters.Parcel.Create { PredefinedPackage = "FedExBox", Weight = 17.5 } } }, }; EasyPost.Models.API.Order order = await client.Order.Create(parameters); Console.WriteLine(JsonConvert.SerializeObject(order, Formatting.Indented)); } } } ``` #### Node.js ```javascript const EasyPostClient = require('@easypost/api'); const client = new EasyPostClient('EASYPOST_API_KEY'); (async () => { const order = await client.Order.create({ to_address: { id: 'adr_...' }, from_address: { id: 'adr_...' }, shipments: [ { parcel: { weight: 10.2, }, }, { parcel: { predefined_package: 'FedExBox', weight: 17.5, }, }, ], }); console.log(order); })(); ``` #### PHP ```php order->create([ 'to_address' => ['id' => 'adr_...'], 'from_address' => ['id' => 'adr_...'], 'shipments' => [ [ 'parcel' => [ 'weight' => 10.2 ] ], [ 'parcel' => [ 'predefined_package' => 'FedExBox', 'weight' => 17.5 ] ], ], ]); echo $order; ``` #### Python ```python import easypost client = easypost.EasyPostClient("EASYPOST_API_KEY") order = client.order.create( to_address={"id": "adr_..."}, from_address={"id": "adr_..."}, shipments=[ { "parcel": { "weight": 10.2, } }, { "parcel": { "predefined_package": "FedExBox", "weight": 17.5, } }, ], ) print(order) ``` #### Ruby ```ruby require 'easypost' client = EasyPost::Client.new(api_key: 'EASYPOST_API_KEY') order = client.order.create( to_address: { id: 'adr_...', }, from_address: { id: 'adr_...', }, shipments: [ { parcel: { weight: 10.2, }, }, { parcel: { predefined_package: 'FedExBox', weight: 17.5, }, }, ], ) puts order ``` There is an alternative way to purchase orders that is known as the "one-call buy" method. This method is often used if you have a flat-rate set with a mail carrier for a given service level, or if you know your desired service level without needing to see the rate first. Utilizing the "one-call buy" method can improve the performance of your integration, because it cuts out an API call from our standard "create order" then "buy order" workflow. In order to achieve this behavior, all you have to do is add a `carrier_account` and `service` name to your creation API call. --- ## Retrieve an Order ### Example: GET /orders/:id #### cURL ```shell curl -X GET https://api.easypost.com/v2/orders/order_... \ -u "EASYPOST_API_KEY": ``` #### Go ```go package example import ( "fmt" "github.com/EasyPost/easypost-go/v6" ) func retrieve() { client := easypost.New("EASYPOST_API_KEY") order, _ := client.GetOrder("order_...") fmt.Println(order) } ``` #### Java ```java package order; import com.easypost.exception.EasyPostException; import com.easypost.model.Order; import com.easypost.service.EasyPostClient; public class Retrieve { public static void main(String[] args) throws EasyPostException { EasyPostClient client = new EasyPostClient("EASYPOST_API_KEY"); Order order = client.order.retrieve("order_..."); System.out.println(order); } } ``` #### C# ```csharp using System; using System.Collections.Generic; using System.Threading.Tasks; using EasyPost; using Newtonsoft.Json; namespace EasyPostExamples { public class Examples { public static async Task Main() { var client = new EasyPost.Client(new EasyPost.ClientConfiguration("EASYPOST_API_KEY")); EasyPost.Models.API.Order order = await client.Order.Retrieve("order_..."); Console.WriteLine(JsonConvert.SerializeObject(order, Formatting.Indented)); } } } ``` #### Node.js ```javascript const EasyPostClient = require('@easypost/api'); const client = new EasyPostClient('EASYPOST_API_KEY'); (async () => { const order = await client.Order.retrieve('order_...'); console.log(order); })(); ``` #### PHP ```php order->retrieve('order_...'); echo $order; ``` #### Python ```python import easypost client = easypost.EasyPostClient("EASYPOST_API_KEY") order = client.order.retrieve("order_...") print(order) ``` #### Ruby ```ruby require 'easypost' client = EasyPost::Client.new(api_key: 'EASYPOST_API_KEY') order = client.order.retrieve('order_...') puts order ``` An `Order` can be retrieved by either its `id` or `reference`. However it is recommended to use EasyPost's provided identifiers because uniqueness on `reference` is not enforced. --- Source: https://docs.easypost.com/docs/pagination # Pagination Most "retrieve all" responses from EasyPost are paginated. Records are returned in descending order (most recent first), and the `has_more` attribute indicates whether or not additional pages can be requested. The request accepts a variety of parameters which can be used to modify the scope. The recommended way of paginating is to use either the `before_id`/`after_id` or `start_datetime`/`end_datetime` parameters to specify where the next page begins. You can also use the optional `page_size` parameter to specify how many records you would like per page. We limit the number of records per page to 100, and most endpoints default to 20. Support for these parameters vary by endpoint. If you need to retrieve a successive page when the `has_more` key is present, make another "retrieve all" request and set the `before_id` to the ID of the last item returned. For example, let's say you have 140 `Shipment` objects and are trying to interact with all of them. If you make a call to retrieve all `Shipment`s with the `page_size` set to 20, you would need to loop through 7 pages, each with 20 results. To get to the next page of results, you would need to set `before_id` to the `response['shipments'][19]['id']`. You would continue to request each additional page while specifying the `id` of the last `Shipment` of the previous request until the `has_more` attribute is `false`, indicating that all results have been retrieved. ### Example: Paginate shipment objects #### cURL ```shell # Get first page of results curl -X GET "https://api.easypost.com/v2/shipments?page_size=5" \ -u "EASYPOST_API_KEY": # Provide the ID of the last element of the previous page in the before_id param curl -X GET "https://api.easypost.com/v2/shipments?page_size=5&before_id=shp_..." \ -u "EASYPOST_API_KEY": ``` #### Go ```go package example import ( "fmt" "github.com/EasyPost/easypost-go/v6" ) func getNextPage() { client := easypost.New("EASYPOST_API_KEY") // Get first page of results shipments, _ := client.ListShipments( &easypost.ListShipmentsOptions{ PageSize: 5, }, ) // Provide the previous results page to move onto the next page secondPage, _ := client.GetNextShipmentPage(shipments) // You can also ask for the next page to be of a specific size lastPage, _ := client.GetNextShipmentPageWithPageSize(secondPage, 10) fmt.Println(lastPage) } ``` #### Java ```java package shipments; import com.easypost.exception.EasyPostException; import com.easypost.model.ShipmentCollection; import com.easypost.service.EasyPostClient; import java.util.HashMap; public class All { public static void main(String[] args) throws EasyPostException { EasyPostClient client = new EasyPostClient("EASYPOST_API_KEY"); // Get the first page of results HashMap params = new HashMap<>(); params.put("page_size", 5); ShipmentCollection shipments = client.shipment.all(params); // Provide the previous results page to move onto the next page ShipmentCollection nextPage = client.shipment.getNextPage(shipments); System.out.println(nextPage); } } ``` #### C# ```csharp using System; using System.Collections.Generic; using System.Threading.Tasks; using EasyPost; using Newtonsoft.Json; namespace EasyPostExamples { public class Examples { public static async Task Main() { var client = new EasyPost.Client(new EasyPost.ClientConfiguration("EASYPOST_API_KEY")); // Get first page of results EasyPost.Parameters.Shipment.All parameters = new() { PageSize = 5 }; EasyPost.Models.API.ShipmentCollection shipmentCollection = await client.Shipment.All(parameters); // Provide the previous results page to move onto the next page EasyPost.Models.API.ShipmentCollection nextPage = await client.Shipment.GetNextPage(shipmentCollection); Console.WriteLine(JsonConvert.SerializeObject(nextPage, Formatting.Indented)); } } } ``` #### Node.js ```javascript const EasyPostClient = require('@easypost/api'); const client = new EasyPostClient('EASYPOST_API_KEY'); (async () => { // Get first page of results const shipments = await client.Shipment.all({ page_size: 5, }); // Provide the previous results page to move onto the next page const nextPage = await client.Shipment.getNextPage(shipments); console.log(nextPage); })(); ``` #### PHP ```php shipment->all([ 'page_size' => 5, ]); // Provide the previous results page to move onto the next page $nextPage = $client->shipments->getNextPage($shipments); echo $nextPage; ``` #### Python ```python import easypost client = easypost.EasyPostClient("EASYPOST_API_KEY") # Get first page of results shipments = client.shipment.all( page_size=5, ) # Provide the previous results page to move onto the next page next_page = client.shipment.get_next_page(shipments) print(next_page) ``` #### Ruby ```ruby require 'easypost' client = EasyPost::Client.new(api_key: 'EASYPOST_API_KEY') # Get first page of results shipments = client.shipment.all(page_size: 5) # Provide the previous results page to move onto the next page next_page = client.shipment.get_next_page(shipments) puts next_page ``` --- Source: https://docs.easypost.com/docs/parcels # Parcel `Parcel` objects represent the physical container being shipped. Dimensions can be supplied either as `length`, `width`, and `height` dimensions, or a `predefined_package` string. `weight` is required. Some carriers also require parcel dimensions for certain services. To avoid validation errors and ensure accurate rating, include `length`, `width`, and `height` whenever available. Refer to the applicable Carrier Guides for carrier-specific requirements. **IMPORTANT:** Weights are in OUNCES (OZ). `Parcel.weight` accepts floating-point values, including more than one decimal place. Because parcel weights are stored as floating-point values, arbitrary decimal precision is not guaranteed to be preserved on retrieval. **IMPORTANT:** Dimensions are in INCHES (IN) and go to one decimal point. **IMPORTANT:** Carrier integrations can convert units and apply additional rounding or minimums. API acceptance does not guarantee every carrier receives the original value unchanged. --- ## Parcel object | Property | Type | Description | |----------|------|-------------| | id | string | Unique, begins with "prcl_" | | object | string | "Parcel" | | length | float (inches) | Required if width and/or height are present | | width | float (inches) | Required if length and/or height are present | | height | float (inches) | Required if length and/or width are present | | predefined_package | string | Optional, one of our predefined packages | | weight | float (oz) | Always required. Must be specified in ounces (oz). Accepts floating-point values, but arbitrary decimal precision may not be preserved. | | created_at | datetime | When the Parcel was created | | updated_at | datetime | When the Parcel was last updated | Example Object: ```json { "id": "prcl_e8d0eeef8b454eb5b7f2bf8a8dd2fcca", "object": "Parcel", "created_at": "2025-05-09T20:39:26Z", "updated_at": "2025-05-09T20:39:26Z", "length": 20.2, "width": 10.9, "height": 5.0, "predefined_package": null, "weight": 65.9, "mode": "test" } ``` --- [Content omitted: carrier services and predefined packages rendered dynamically. Review the rendered documentation for complete service level and package details.] --- ## Create a Parcel ### Example: POST /parcels #### cURL ```shell curl -X POST https://api.easypost.com/v2/parcels \ -u "EASYPOST_API_KEY": \ -H 'Content-Type: application/json' \ -d '{ "parcel": { "length": "20.2", "width": "10.9", "height": "5", "weight": "65.9" } }' ``` #### Go ```go package example import ( "fmt" "github.com/EasyPost/easypost-go/v6" ) func create() { client := easypost.New("EASYPOST_API_KEY") parcel, _ := client.CreateParcel( &easypost.Parcel{ Length: 20.2, Width: 10.9, Height: 5, Weight: 65.9, }, ) fmt.Println(parcel) } ``` #### Java ```java package parcels; import com.easypost.exception.EasyPostException; import com.easypost.model.Parcel; import com.easypost.service.EasyPostClient; import java.util.HashMap; public class Create { public static void main(String[] args) throws EasyPostException { EasyPostClient client = new EasyPostClient("EASYPOST_API_KEY"); HashMap params = new HashMap(); params.put("height", 5); params.put("width", 10.9); params.put("length", 20.2); params.put("weight", 65.9); Parcel parcel = client.parcel.create(params); System.out.println(parcel); } } ``` #### C# ```csharp using System; using System.Collections.Generic; using System.Threading.Tasks; using EasyPost; using Newtonsoft.Json; namespace EasyPostExamples { public class Examples { public static async Task Main() { var client = new EasyPost.Client(new EasyPost.ClientConfiguration("EASYPOST_API_KEY")); EasyPost.Parameters.Parcel.Create parameters = new() { Length = 20.2, Width = 10.9, Height = 5, Weight = 65.9 }; EasyPost.Models.API.Parcel parcel = await client.Parcel.Create(parameters); Console.WriteLine(JsonConvert.SerializeObject(parcel, Formatting.Indented)); } } } ``` #### Node.js ```javascript const EasyPostClient = require('@easypost/api'); const client = new EasyPostClient('EASYPOST_API_KEY'); (async () => { const parcel = await client.Parcel.create({ length: 20.2, width: 10.9, height: 5, weight: 65.9, }); console.log(parcel); })(); ``` #### PHP ```php parcel->create([ 'length' => 20.2, 'width' => 10.9, 'height' => 5, 'weight' => 65.9 ]); echo $parcel; ``` #### Python ```python import easypost client = easypost.EasyPostClient("EASYPOST_API_KEY") parcel = client.parcel.create( length=20.2, width=10.9, height=5, weight=65.9, ) print(parcel) ``` #### Ruby ```ruby require 'easypost' client = EasyPost::Client.new(api_key: 'EASYPOST_API_KEY') parcel = client.parcel.create( length: 20.2, width: 10.9, height: 5, weight: 65.9, ) puts parcel ``` Include the `weight`, and either a `predefined_package` or `length`, `width` and `height` if applicable. [Note: This object is immutable after creation. Review the rendered documentation for details.] --- ## Retrieve a Parcel ### Example: GET /parcels/:id #### cURL ```shell curl -X GET https://api.easypost.com/v2/parcels/prcl_... \ -u "EASYPOST_API_KEY": ``` #### Go ```go package example import ( "fmt" "github.com/EasyPost/easypost-go/v6" ) func retrieve() { client := easypost.New("EASYPOST_API_KEY") parcel, _ := client.GetParcel("prcl_...") fmt.Println(parcel) } ``` #### Java ```java package parcels; import com.easypost.exception.EasyPostException; import com.easypost.model.Parcel; import com.easypost.service.EasyPostClient; public class Retrieve { public static void main(String[] args) throws EasyPostException { EasyPostClient client = new EasyPostClient("EASYPOST_API_KEY"); Parcel parcel = client.parcel.retrieve("prcl_..."); System.out.println(parcel); } } ``` #### C# ```csharp using System; using System.Collections.Generic; using System.Threading.Tasks; using EasyPost; using Newtonsoft.Json; namespace EasyPostExamples { public class Examples { public static async Task Main() { var client = new EasyPost.Client(new EasyPost.ClientConfiguration("EASYPOST_API_KEY")); EasyPost.Models.API.Parcel parcel = await client.Parcel.Retrieve("prcl_..."); Console.WriteLine(JsonConvert.SerializeObject(parcel, Formatting.Indented)); } } } ``` #### Node.js ```javascript const EasyPostClient = require('@easypost/api'); const client = new EasyPostClient('EASYPOST_API_KEY'); (async () => { const parcel = await client.Parcel.retrieve('prcl_...'); console.log(parcel); })(); ``` #### PHP ```php parcel->retrieve('prcl_...'); echo $parcel; ``` #### Python ```python import easypost client = easypost.EasyPostClient("EASYPOST_API_KEY") parcel = client.parcel.retrieve("prcl_...") print(parcel) ``` #### Ruby ```ruby require 'easypost' client = EasyPost::Client.new(api_key: 'EASYPOST_API_KEY') parcel = client.parcel.retrieve('prcl_...') puts parcel ``` Retrieve a `Parcel` by its `id`. In general you should not need to use this in your automated solution. A `Parcel` object's `id` can be inlined into the creation call to other objects. This allows you to only create one `Parcel` for each package you will be using. --- Source: https://docs.easypost.com/docs/pickups # Pickup The `Pickup` object is used to schedule a pickup from a carrier at a residence or place of business. Supported carriers include: - Better Trucks - Canada Post - Canpar - DHL Express - FedEx - Lasership - Loomis Express - LSO - Maersk Parcel - Ontrac - UPS - USPS - USPS Ship - Veho Once a `Pickup` is successfully created, `PickupRates` will be automatically fetched for each specified `CarrierAccount` that supports scheduled pickups. A `PickupRate` must then be selected and purchased to successfully schedule the pickup. --- ## Pickup object | Property | Type | Description | |----------|------|-------------| | id | string | Unique, begins with "pickup_" | | object | string | "Pickup" | | mode | string | "test" or "production" | | status | string | Possible values: "scheduled" "canceled" "unknown" | | min_datetime | datetime | The earliest time at which the package is available to pick up | | max_datetime | datetime | The latest time at which the package is available to pick up. Must be later than min_datetime | | is_account_address | boolean | Whether the pickup address is the the account's address | | instructions | string | Additional text to help the driver successfully obtain the package | | messages | Message array | A list of messages containing carrier errors encountered during pickup rate generation | | confirmation | string | The confirmation number for a booked pickup from the carrier | | shipment | Shipment | The associated Shipment | | address | Address | The associated Address | | carrier_accounts | CarrierAccount array | The list of carriers (if empty, all carriers were used) used to generate pickup rates | | pickup_rates | PickupRate array | The list of different pickup rates across valid carrier accounts for the shipment | | created_at | datetime | When the Pickup was created | | updated_at | datetime | When the Pickup was last updated | Example Object: ```json { "id": "pickup_24f4406c58f24fde820759d84d9422fa", "object": "Pickup", "created_at": "2025-05-09T20:39:27Z", "updated_at": "2025-05-09T20:39:27Z", "mode": "test", "status": "unknown", "reference": "my-first-pickup", "min_datetime": "2025-05-12T00:00:00Z", "max_datetime": "2025-05-12T00:00:00Z", "is_account_address": false, "instructions": "Special pickup instructions", "messages": [], "confirmation": null, "address": { "id": "adr_b379f0df2d1511f0ad1cac1f6bc539ae", "object": "Address", "created_at": "2025-05-09T20:39:27+00:00", "updated_at": "2025-05-09T20:39:27+00:00", "name": "Dr. Steve Brule", "company": null, "street1": "179 N Harbor Dr", "street2": null, "city": "Redondo Beach", "state": "CA", "zip": "90277", "country": "US", "phone": "8573875756", "email": "dr_steve_brule@gmail.com", "mode": "test", "carrier_facility": null, "residential": null, "federal_tax_id": null, "state_tax_id": null, "verifications": {} }, "carrier_accounts": [], "pickup_rates": [ { "mode": "test", "service": "NextDay", "rate": "0.00", "currency": "USD", "created_at": "2025-05-09T20:39:29Z", "updated_at": "2025-05-09T20:39:29Z", "carrier": "USPS", "pickup_id": "pickup_24f4406c58f24fde820759d84d9422fa", "id": "pickuprate_df03ccc2da4e4825927464867c7f76b9", "object": "PickupRate" } ] } ``` --- ## PickupRate object | Property | Type | Description | |----------|------|-------------| | id | string | Unique, begins with 'pickuprate_' | | object | string | "PickupRate" | | service | string | The service name | | carrier | string | The name of the carrier | | rate | string | The actual rate quote for this service | | currency | string | The currency for the rate | | pickup_id | string | The ID of the pickup for which this is a quote | | created_at | datetime | When the PickupRate was created | | updated_at | datetime | When the PickupRate was last updated | Example Object: ```json { "mode": "test", "service": "NextDay", "rate": "0.00", "currency": "USD", "created_at": "2025-05-09T20:39:29Z", "updated_at": "2025-05-09T20:39:29Z", "carrier": "USPS", "pickup_id": "pickup_24f4406c58f24fde820759d84d9422fa", "id": "pickuprate_df03ccc2da4e4825927464867c7f76b9", "object": "PickupRate" } ``` --- ## Create a Pickup ### Example: POST /pickups #### cURL ```shell curl -X POST https://api.easypost.com/v2/pickups \ -u "EASYPOST_API_KEY": \ -H 'Content-Type: application/json' \ -d '{ "pickup": { "reference": "my-first-pickup", "min_datetime": "2022-10-01 10:30:00", "max_datetime": "2022-10-02 10:30:00", "shipment": "shp_...", "address": "adr_...", "is_account_address": "false", "instructions": "Special pickup instructions" } }' ``` #### Go ```go package example import ( "fmt" "time" "github.com/EasyPost/easypost-go/v6" ) func create() { client := easypost.New("EASYPOST_API_KEY") var minDatetime = easypost.DateTime(time.Now()) var maxDatetime = easypost.DateTime(time.Now().Add(time.Hour * 24 * 7)) pickup, _ := client.CreatePickup( &easypost.Pickup{ IsAccountAddress: false, Address: &easypost.Address{ ID: "adr_...", }, Shipment: &easypost.Shipment{ ID: "shp_...", }, MinDatetime: &minDatetime, MaxDatetime: &maxDatetime, Instructions: "Special pickup instructions", }, ) fmt.Println(pickup) } ``` #### Java ```java package pickups; import com.easypost.exception.EasyPostException; import com.easypost.model.Pickup; import com.easypost.service.EasyPostClient; import java.util.HashMap; public class Create { public static void main(String[] args) throws EasyPostException { EasyPostClient client = new EasyPostClient("EASYPOST_API_KEY"); HashMap address = new HashMap(); address.put("id", "adr_..."); HashMap shipment = new HashMap(); shipment.put("id", "shp_..."); HashMap params = new HashMap(); params.put("address", address); params.put("shipment", shipment); params.put("reference", "my-first-pickup"); params.put("min_datetime", "2022-10-01 10:30:00"); params.put("max_datetime", "2022-10-02 10:30:00"); params.put("is_account_address", false); params.put("instructions", "Special pickup instructions"); Pickup pickup = client.pickup.create(params); System.out.println(pickup); } } ``` #### C# ```csharp using System; using System.Collections.Generic; using System.Threading.Tasks; using EasyPost; using Newtonsoft.Json; namespace EasyPostExamples { public class Examples { public static async Task Main() { var client = new EasyPost.Client(new EasyPost.ClientConfiguration("EASYPOST_API_KEY")); EasyPost.Models.API.Shipment shipment = await client.Shipment.Retrieve("shp_..."); EasyPost.Parameters.Pickup.Create parameters = new() { Address = new EasyPost.Parameters.Address.Create { Name = "Dr. Steve Brule", Street1 = "417 Montgomery Street", Street2 = "5th Floor", City = "San Francisco", State = "CA", Country = "US", Zip = "94104" }, Shipment = shipment, Reference = "my-first-pickup", MinDatetime = "2022-10-01 10:30:00", MaxDatetime = "2022-10-01 17:30:00", Instructions = "Special pickup instructions", IsAccountAddress = false, CarrierAccounts = new List { new CarrierAccount { Id = "ca_..." } } }; EasyPost.Models.API.Pickup pickup = await client.Pickup.Create(parameters); Console.WriteLine(JsonConvert.SerializeObject(pickup, Formatting.Indented)); } } } ``` #### Node.js ```javascript const EasyPostClient = require('@easypost/api'); const client = new EasyPostClient('EASYPOST_API_KEY'); (async () => { const pickup = await client.Pickup.create({ address: { id: 'adr_...' }, shipment: { id: 'shp_...' }, reference: 'my-first-pickup', min_datetime: '2022-10-01 10:30:00', max_datetime: '2022-10-02 10:30:00', is_account_address: false, instructions: 'Special pickup instructions', }); console.log(pickup); })(); ``` #### PHP ```php pickup->create([ 'address' => ['id' => 'adr_...'], 'shipment' => ['id' => 'shp_...'], 'reference' => 'my-first-pickup', 'min_datetime' => date('2022-10-01 10:30:00'), 'max_datetime' => date('2022-10-02 10:30:00'), 'is_account_address' => false, 'instructions' => 'Special pickup instructions' ]); echo $pickup; ``` #### Python ```python import easypost client = easypost.EasyPostClient("EASYPOST_API_KEY") pickup = client.pickup.create( address={"id": "adr_..."}, shipment={"id": "shp_..."}, reference="my-first-pickup", min_datetime="2022-10-01 10:30:00", max_datetime="2022-10-02 10:30:00", is_account_address=False, instructions="Special pickup instructions", ) print(pickup) ``` #### Ruby ```ruby require 'easypost' client = EasyPost::Client.new(api_key: 'EASYPOST_API_KEY') pickup = client.pickup.create( reference: 'my-first-pickup', min_datetime: '2022-10-01 10:30:00', max_datetime: '2022-10-02 10:30:00', shipment: { id: 'shp_...', }, address: { id: 'adr_...', }, is_account_address: false, instructions: 'Special pickup instructions', ) puts pickup ``` Creating a `Pickup` will automatically fetch rates for the given time frame and location. Pickups work with an existing purchased `Shipment` or a fully-purchased `Batch`, and either a fully-specified `Address` object or its `id`. The examples below assume that a `Shipment` and `Address` have both already been created. [Note: This object is immutable after creation. Review the rendered documentation for details.] --- ## Buy a Pickup ### Example: POST /pickups/:id/buy #### cURL ```shell curl -X POST https://api.easypost.com/v2/pickups \ -u "EASYPOST_API_KEY": \ -H 'Content-Type: application/json' \ -d '{ "pickup": { "reference": "my-first-pickup", "min_datetime": "2022-10-01 10:30:00", "max_datetime": "2022-10-02 10:30:00", "shipment": "shp_...", "address": "adr_...", "is_account_address": "false", "instructions": "Special pickup instructions" } }' ``` #### Go ```go package example import ( "fmt" "time" "github.com/EasyPost/easypost-go/v6" ) func create() { client := easypost.New("EASYPOST_API_KEY") var minDatetime = easypost.DateTime(time.Now()) var maxDatetime = easypost.DateTime(time.Now().Add(time.Hour * 24 * 7)) pickup, _ := client.CreatePickup( &easypost.Pickup{ IsAccountAddress: false, Address: &easypost.Address{ ID: "adr_...", }, Shipment: &easypost.Shipment{ ID: "shp_...", }, MinDatetime: &minDatetime, MaxDatetime: &maxDatetime, Instructions: "Special pickup instructions", }, ) fmt.Println(pickup) } ``` #### Java ```java package pickups; import com.easypost.exception.EasyPostException; import com.easypost.model.Pickup; import com.easypost.service.EasyPostClient; import java.util.HashMap; public class Create { public static void main(String[] args) throws EasyPostException { EasyPostClient client = new EasyPostClient("EASYPOST_API_KEY"); HashMap address = new HashMap(); address.put("id", "adr_..."); HashMap shipment = new HashMap(); shipment.put("id", "shp_..."); HashMap params = new HashMap(); params.put("address", address); params.put("shipment", shipment); params.put("reference", "my-first-pickup"); params.put("min_datetime", "2022-10-01 10:30:00"); params.put("max_datetime", "2022-10-02 10:30:00"); params.put("is_account_address", false); params.put("instructions", "Special pickup instructions"); Pickup pickup = client.pickup.create(params); System.out.println(pickup); } } ``` #### C# ```csharp using System; using System.Collections.Generic; using System.Threading.Tasks; using EasyPost; using Newtonsoft.Json; namespace EasyPostExamples { public class Examples { public static async Task Main() { var client = new EasyPost.Client(new EasyPost.ClientConfiguration("EASYPOST_API_KEY")); EasyPost.Models.API.Shipment shipment = await client.Shipment.Retrieve("shp_..."); EasyPost.Parameters.Pickup.Create parameters = new() { Address = new EasyPost.Parameters.Address.Create { Name = "Dr. Steve Brule", Street1 = "417 Montgomery Street", Street2 = "5th Floor", City = "San Francisco", State = "CA", Country = "US", Zip = "94104" }, Shipment = shipment, Reference = "my-first-pickup", MinDatetime = "2022-10-01 10:30:00", MaxDatetime = "2022-10-01 17:30:00", Instructions = "Special pickup instructions", IsAccountAddress = false, CarrierAccounts = new List { new CarrierAccount { Id = "ca_..." } } }; EasyPost.Models.API.Pickup pickup = await client.Pickup.Create(parameters); Console.WriteLine(JsonConvert.SerializeObject(pickup, Formatting.Indented)); } } } ``` #### Node.js ```javascript const EasyPostClient = require('@easypost/api'); const client = new EasyPostClient('EASYPOST_API_KEY'); (async () => { const pickup = await client.Pickup.create({ address: { id: 'adr_...' }, shipment: { id: 'shp_...' }, reference: 'my-first-pickup', min_datetime: '2022-10-01 10:30:00', max_datetime: '2022-10-02 10:30:00', is_account_address: false, instructions: 'Special pickup instructions', }); console.log(pickup); })(); ``` #### PHP ```php pickup->create([ 'address' => ['id' => 'adr_...'], 'shipment' => ['id' => 'shp_...'], 'reference' => 'my-first-pickup', 'min_datetime' => date('2022-10-01 10:30:00'), 'max_datetime' => date('2022-10-02 10:30:00'), 'is_account_address' => false, 'instructions' => 'Special pickup instructions' ]); echo $pickup; ``` #### Python ```python import easypost client = easypost.EasyPostClient("EASYPOST_API_KEY") pickup = client.pickup.create( address={"id": "adr_..."}, shipment={"id": "shp_..."}, reference="my-first-pickup", min_datetime="2022-10-01 10:30:00", max_datetime="2022-10-02 10:30:00", is_account_address=False, instructions="Special pickup instructions", ) print(pickup) ``` #### Ruby ```ruby require 'easypost' client = EasyPost::Client.new(api_key: 'EASYPOST_API_KEY') pickup = client.pickup.create( reference: 'my-first-pickup', min_datetime: '2022-10-01 10:30:00', max_datetime: '2022-10-02 10:30:00', shipment: { id: 'shp_...', }, address: { id: 'adr_...', }, is_account_address: false, instructions: 'Special pickup instructions', ) puts pickup ``` To purchase a `Pickup`, a `PickupRate` must be specified by its `carrier` and `service` name, instead of its `id`. Our client libraries will handle this automatically if a `PickupRate` is provided. --- ## Cancel a Pickup ### Example: POST /pickups/:id/cancel #### cURL ```shell curl -X POST https://api.easypost.com/v2/pickups \ -u "EASYPOST_API_KEY": \ -H 'Content-Type: application/json' \ -d '{ "pickup": { "reference": "my-first-pickup", "min_datetime": "2022-10-01 10:30:00", "max_datetime": "2022-10-02 10:30:00", "shipment": "shp_...", "address": "adr_...", "is_account_address": "false", "instructions": "Special pickup instructions" } }' ``` #### Go ```go package example import ( "fmt" "time" "github.com/EasyPost/easypost-go/v6" ) func create() { client := easypost.New("EASYPOST_API_KEY") var minDatetime = easypost.DateTime(time.Now()) var maxDatetime = easypost.DateTime(time.Now().Add(time.Hour * 24 * 7)) pickup, _ := client.CreatePickup( &easypost.Pickup{ IsAccountAddress: false, Address: &easypost.Address{ ID: "adr_...", }, Shipment: &easypost.Shipment{ ID: "shp_...", }, MinDatetime: &minDatetime, MaxDatetime: &maxDatetime, Instructions: "Special pickup instructions", }, ) fmt.Println(pickup) } ``` #### Java ```java package pickups; import com.easypost.exception.EasyPostException; import com.easypost.model.Pickup; import com.easypost.service.EasyPostClient; import java.util.HashMap; public class Create { public static void main(String[] args) throws EasyPostException { EasyPostClient client = new EasyPostClient("EASYPOST_API_KEY"); HashMap address = new HashMap(); address.put("id", "adr_..."); HashMap shipment = new HashMap(); shipment.put("id", "shp_..."); HashMap params = new HashMap(); params.put("address", address); params.put("shipment", shipment); params.put("reference", "my-first-pickup"); params.put("min_datetime", "2022-10-01 10:30:00"); params.put("max_datetime", "2022-10-02 10:30:00"); params.put("is_account_address", false); params.put("instructions", "Special pickup instructions"); Pickup pickup = client.pickup.create(params); System.out.println(pickup); } } ``` #### C# ```csharp using System; using System.Collections.Generic; using System.Threading.Tasks; using EasyPost; using Newtonsoft.Json; namespace EasyPostExamples { public class Examples { public static async Task Main() { var client = new EasyPost.Client(new EasyPost.ClientConfiguration("EASYPOST_API_KEY")); EasyPost.Models.API.Shipment shipment = await client.Shipment.Retrieve("shp_..."); EasyPost.Parameters.Pickup.Create parameters = new() { Address = new EasyPost.Parameters.Address.Create { Name = "Dr. Steve Brule", Street1 = "417 Montgomery Street", Street2 = "5th Floor", City = "San Francisco", State = "CA", Country = "US", Zip = "94104" }, Shipment = shipment, Reference = "my-first-pickup", MinDatetime = "2022-10-01 10:30:00", MaxDatetime = "2022-10-01 17:30:00", Instructions = "Special pickup instructions", IsAccountAddress = false, CarrierAccounts = new List { new CarrierAccount { Id = "ca_..." } } }; EasyPost.Models.API.Pickup pickup = await client.Pickup.Create(parameters); Console.WriteLine(JsonConvert.SerializeObject(pickup, Formatting.Indented)); } } } ``` #### Node.js ```javascript const EasyPostClient = require('@easypost/api'); const client = new EasyPostClient('EASYPOST_API_KEY'); (async () => { const pickup = await client.Pickup.create({ address: { id: 'adr_...' }, shipment: { id: 'shp_...' }, reference: 'my-first-pickup', min_datetime: '2022-10-01 10:30:00', max_datetime: '2022-10-02 10:30:00', is_account_address: false, instructions: 'Special pickup instructions', }); console.log(pickup); })(); ``` #### PHP ```php pickup->create([ 'address' => ['id' => 'adr_...'], 'shipment' => ['id' => 'shp_...'], 'reference' => 'my-first-pickup', 'min_datetime' => date('2022-10-01 10:30:00'), 'max_datetime' => date('2022-10-02 10:30:00'), 'is_account_address' => false, 'instructions' => 'Special pickup instructions' ]); echo $pickup; ``` #### Python ```python import easypost client = easypost.EasyPostClient("EASYPOST_API_KEY") pickup = client.pickup.create( address={"id": "adr_..."}, shipment={"id": "shp_..."}, reference="my-first-pickup", min_datetime="2022-10-01 10:30:00", max_datetime="2022-10-02 10:30:00", is_account_address=False, instructions="Special pickup instructions", ) print(pickup) ``` #### Ruby ```ruby require 'easypost' client = EasyPost::Client.new(api_key: 'EASYPOST_API_KEY') pickup = client.pickup.create( reference: 'my-first-pickup', min_datetime: '2022-10-01 10:30:00', max_datetime: '2022-10-02 10:30:00', shipment: { id: 'shp_...', }, address: { id: 'adr_...', }, is_account_address: false, instructions: 'Special pickup instructions', ) puts pickup ``` You may cancel a `Pickup` any time before it has been completed. It requires no additional parameters other than the `id` or `reference`. The `status` will change to "canceled" on success. --- ## Retrieve all Pickups ### Example: GET /pickups #### cURL ```shell curl -X GET "https://api.easypost.com/v2/pickups?page_size=5" \ -u "EASYPOST_API_KEY": ``` #### Go ```go package example import ( "fmt" "github.com/EasyPost/easypost-go/v6" ) func list() { client := easypost.New("EASYPOST_API_KEY") pickups, _ := client.ListPickups( &easypost.ListOptions{ PageSize: 5, }, ) fmt.Println(pickups) } ``` #### Java ```java package shipments; import com.easypost.exception.EasyPostException; import com.easypost.model.PickupCollection; import com.easypost.service.EasyPostClient; import java.util.HashMap; public class All { public static void main(String[] args) throws EasyPostException { EasyPostClient client = new EasyPostClient("EASYPOST_API_KEY"); HashMap params = new HashMap<>(); params.put("page_size", 5); PickupCollection pickupCollection = client.pickup.all(params); System.out.println(pickupCollection); } } ``` #### C# ```csharp using System; using System.Collections.Generic; using System.Threading.Tasks; using EasyPost; using Newtonsoft.Json; namespace EasyPostExamples { public class Examples { public static async Task Main() { var client = new EasyPost.Client(new EasyPost.ClientConfiguration("EASYPOST_API_KEY")); Dictionary listParams = new Dictionary() { { "page_size", 5 } }; EasyPost.Models.API.PickupCollection pickups = await client.Pickup.All(listParams); Console.WriteLine(JsonConvert.SerializeObject(pickups, Formatting.Indented)); } } } ``` #### Node.js ```javascript const EasyPostClient = require('@easypost/api'); const client = new EasyPostClient('EASYPOST_API_KEY'); (async () => { const pickups = await client.Pickup.all({ page_size: 5, }); console.log(pickups); })(); ``` #### PHP ```php pickup->all([ 'page_size' => 5, ]); echo $pickups; ``` #### Python ```python import easypost client = easypost.EasyPostClient("EASYPOST_API_KEY") pickups = client.pickup.all( page_size=5, ) print(pickups) ``` #### Ruby ```ruby require 'easypost' client = EasyPost::Client.new(api_key: 'EASYPOST_API_KEY') pickups = client.pickup.all( page_size: 5, ) puts pickups ``` A list of all `Pickup` objects associated with the given `API Key` can also be retrieved. See the Pagination section of our docs for more details on retrieving all records when multiple pages are available. --- ## Retrieve a Pickup ### Example: GET /pickups/:id #### cURL ```shell curl -X GET https://api.easypost.com/v2/pickups/pickup_... \ -u "EASYPOST_API_KEY": ``` #### Go ```go package example import ( "fmt" "github.com/EasyPost/easypost-go/v6" ) func retrieve() { client := easypost.New("EASYPOST_API_KEY") pickup, _ := client.GetPickup("pickup_...") fmt.Println(pickup) } ``` #### Java ```java package pickups; import com.easypost.exception.EasyPostException; import com.easypost.model.Pickup; import com.easypost.service.EasyPostClient; public class Retrieve { public static void main(String[] args) throws EasyPostException { EasyPostClient client = new EasyPostClient("EASYPOST_API_KEY"); Pickup pickup = client.pickup.retrieve("pickup_..."); System.out.println(pickup); } } ``` #### C# ```csharp using System; using System.Collections.Generic; using System.Threading.Tasks; using EasyPost; using Newtonsoft.Json; namespace EasyPostExamples { public class Examples { public static async Task Main() { var client = new EasyPost.Client(new EasyPost.ClientConfiguration("EASYPOST_API_KEY")); EasyPost.Models.API.Pickup pickup = await client.Pickup.Retrieve("pickup_..."); Console.WriteLine(JsonConvert.SerializeObject(pickup, Formatting.Indented)); } } } ``` #### Node.js ```javascript const EasyPostClient = require('@easypost/api'); const client = new EasyPostClient('EASYPOST_API_KEY'); (async () => { const pickup = await client.Pickup.retrieve('pickup_...'); console.log(pickup); })(); ``` #### PHP ```php pickup->retrieve('pickup_...'); echo $pickup; ``` #### Python ```python import easypost client = easypost.EasyPostClient("EASYPOST_API_KEY") pickup = client.pickup.retrieve("pickup_...") print(pickup) ``` #### Ruby ```ruby require 'easypost' client = EasyPost::Client.new(api_key: 'EASYPOST_API_KEY') pickup = client.pickup.retrieve('pickup_...') puts pickup ``` A `Pickup` object can be retrieved by either an `id` or `reference`. However it is recommended to use EasyPost's provided identifiers because uniqueness on `reference` is not enforced. --- Source: https://docs.easypost.com/docs/readydocs # ReadyDocs ReadyDocs is a document-generation API that enables customers to create standardized packing slips using predefined templates. ReadyDocs provides a library of approximately 140 packing slip templates, including generic templates that can be used for customer orders. Documents are generated programmatically by submitting order and shipment data to the ReadyDocs API. > Note: ReadyDocs is a subscription-based feature, and usage is metered. This feature must be enabled by EasyPost Support before it can be used. Requests are authenticated using an EasyPost API key. Supported document types include: - `packing_slip` Supported output types include: - `PDF`: Returns the generated PDF. - `JSON`: Returns the generated PDF encoded in Base64 within a JSON response. - `S3`: Returns a JSON response containing a link to the generated PDF stored in S3. --- ## ReadyDocs Object | Property | Type | Description | |----------|------|-------------| | object | string | Object type. Always “Document”. | | mode | string | "test" or ”production” | | reference | string | Status of the document generation request (e.g., ”created”) | | status | string | Carrier associated with the rate (e.g., USPS, FedEx). | | document_type | string | The generated document type. (e.g., ”packing_slip”) | | format | string | Output format of the generated document (e.g., ”pdf”) | | file_url | string | URL where the generated document can be accessed. | | messages | array | Messages related to document generation. | | created_at | datetime | Timestamp when the document was created. | Example Object: ```json { "object": "Document", "mode": "test", "reference": null, "status": "created", "document_type": "packing_slip", "format": "pdf", "file_url": "https://eformz-doclib.s3.us-west-2.amazonaws.com/files/doclib/20260813/packslip_1786654215217.pdf", "messages": [], "created_at": "2026-08-13T20:50:14.870Z" } ``` ## ReadyDoc Order Object | Property | Type | Description | |----------|------|-------------| | ship_to | object | Destination recipient details for the order. | | ship_to.address | object | Destination address object. | | ship_to.address.name | string | Recipient name. | | ship_from.address | object | Origin address object. | | ship_from.address.name | string | Sender name. | | bill_to.address | object | Billing address object. | | bill_to.address.name | string | Billing contact name. | | customer_service.phone | string | Customer support phone number. | | po_number | string | Purchase order number associated with the order. | | order_lines.line | array of objects | Array of order line items. | | order_lines.line.item_id | string | Line item identifier. | | order_lines.line.description | string | Line item description. | | order_lines.line.qty.ord | integer | Quantity ordered. | --- ## Create a Document ### Example: POST /alpha/readydocs/packslip #### cURL ```shell curl -X POST https://api.easypost.com/alpha/readydocs/packslip \ -u "EASYPOST_API_KEY": \ -H 'Content-Type: application/json' \ --data-binary @- <<'JSON' { "pack_slip_data": { "pack_slip": { "project": "hsn_8x11", "output_type": "S3", "order": { "ship_to": { "address": { "name": "Dr. Steve Brule", "company": "EasyPost", "street1": "417 Montgomery Street", "street2": "5th Floor", "city": "San Francisco", "state": "CA", "zip": "94104", "country": "US", "phone": "4155559999", "email": "dr_steve_brule@example.com" } }, "ship_from": { "address": { "name": "EasyPost", "company": "EasyPost", "street1": "417 Montgomery Street", "street2": "5th Floor", "city": "San Francisco", "state": "CA", "zip": "94104", "country": "US", "phone": "4155559999", "email": "support@example.com" } }, "bill_to": { "address": { "name": "Dr. Steve Brule", "street1": "179 N Harbor Dr", "city": "Redondo Beach", "state": "CA", "zip": "90277", "country": "US", "phone": "8575551212", "email": "dr_steve_brule@example.com" } }, "customer_service": { "phone": "4155559999", "email": "support@example.com", "website": "https://www.example.com" }, "customer_id": "customer_123", "customer_order": "order_123", "order_number": "123456", "po_number": "PO-123456", "invoice_number": "INV-123456", "warehouse_id": "warehouse_123", "ship_date": "08/11/2026", "order_date": "08/10/2026", "delivery_date": "08/14/2026", "ship_method": "Ground", "pay_method": "Credit Card", "order_message": "Thank you for your order.", "sub_total": "$25.00", "sales_tax": "$2.00", "shipping_handling": "$5.00", "credit": "$0.00", "total": "$32.00", "currency_uom": "$", "sales_person": "Steve Brule", "order_lines": { "line": [ { "item_id": "item_123", "upc": "012345678905", "merchant_sku": "SKU-123", "customer_part_number": "PART-123", "description": "T-shirt", "item_style": "Blue / Medium", "qty": { "ord": 2, "ship": 2, "bo": 0, "uom": "each" }, "unit_price": "$12.50", "total_price": "$25.00", "gift_message": "Happy Birthday!" } ] } }, "shipping_label": { "data": "test", "format": "PNG", "encoding": "base64" }, "print_commands": { "print": { "type": "text", "encoding": "base64", "encoding_character_set": "UTF-8", "data": "test", "size": "4x6", "format": "ZPL" } }, "image": { "char_set": "ISO-8859-1", "image_data": "/9j/4AAQS.......QhCA/", "image_format": "JPEG" } } } } JSON ``` Creates a packing slip using a predefined ReadyDocs template. The `project` identifies the packing slip template to generate. ReadyDocs supports vendor-specific templates as well as generic packing slip templates. --- Source: https://docs.easypost.com/docs/refunds # Refund The `Refund` object represents a refunded shipment, and includes details about the related `Shipment` and tracking code. USPS shipping labels can be refunded if requested within 30 days of generation. The processing time is at least 15 days, after which the funds will return to your EasyPost balance. EasyPost fees will also be refunded. To qualify, a shipment must not have been scanned by the USPS. UPS and FedEx shipping labels may be refunded within 90 days of creation. --- ## Refund object | Property | Type | Description | |----------|------|-------------| | id | string | Unique, begins with "rfnd_" | | object | string | "Refund" | | confirmation_number | string | The confirmation number for the refund request to the carrier | | status | string | The status of the refund request, reported by the carrier. Possibe values: "submitted" "refunded" "rejected" | | carrier | string | The carrier the refund request was submitted to | | shipment_id | string | The ID of the related Shipment being refunded | | created_at | datetime | When the Refund was created | | updated_at | datetime | When the Refund was last updated | Example Object: ```json { "id": "rfnd_92d852c508204fc3a34e62977eaa6c50", "object": "Refund", "created_at": "2025-05-09T20:40:01Z", "updated_at": "2025-05-09T20:40:01Z", "tracking_code": "9405500208303109884137", "confirmation_number": null, "status": "submitted", "carrier": "USPS", "shipment_id": "shp_744d6715c6794d8c8cd0874c368878ba" } ``` --- ## Create a Refund ### Example: POST /refunds #### cURL ```shell curl -X POST https://api.easypost.com/v2/refunds \ -u "EASYPOST_API_KEY": \ -H 'Content-Type: application/json' \ -d '{ "refund": { "carrier": "USPS", "tracking_codes": [ "EZ1000000001" ] } }' ``` #### Go ```go package example import ( "fmt" "github.com/EasyPost/easypost-go/v6" ) func create() { client := easypost.New("EASYPOST_API_KEY") refunds, _ := client.CreateRefund( map[string]interface{}{ "carrier": "USPS", "tracking_codes": []string{"EZ1000000001"}, }, ) fmt.Println(refunds) } ``` #### Java ```java package refunds; import com.easypost.exception.EasyPostException; import com.easypost.model.Refund; import com.easypost.service.EasyPostClient; import java.util.HashMap; public class Create { public static void main(String[] args) throws EasyPostException { EasyPostClient client = new EasyPostClient("EASYPOST_API_KEY"); HashMap params = new HashMap(); params.put("carrier", toAddressMap); params.put("tracking_codes", Arrays.asList(new String[] { "EZ1000000001" })); List refunds = client.refund.create(params); System.out.println(refunds); } } ``` #### C# ```csharp using System; using System.Collections.Generic; using System.Threading.Tasks; using EasyPost; using Newtonsoft.Json; namespace EasyPostExamples { public class Examples { public static async Task Main() { var client = new EasyPost.Client(new EasyPost.ClientConfiguration("EASYPOST_API_KEY")); EasyPost.Parameters.Refund.Create parameters = new() { Carrier = "USPS", TrackingCodes = new List { "EZ1000000001" } }; List refunds = await client.Refund.Create(parameters); Console.WriteLine(JsonConvert.SerializeObject(refunds, Formatting.Indented)); } } } ``` #### Node.js ```javascript const EasyPostClient = require('@easypost/api'); const client = new EasyPostClient('EASYPOST_API_KEY'); (async () => { const refund = await client.Refund.create({ carrier: 'USPS', tracking_codes: ['EZ1000000001'], }); console.log(refund); })(); ``` #### PHP ```php refund->create([ 'carrier' => 'USPS', 'tracking_codes' => ['EZ1000000001'], ]); echo $refunds; ``` #### Python ```python import easypost client = easypost.EasyPostClient("EASYPOST_API_KEY") refunds = client.refund.create( carrier="USPS", tracking_codes=["EZ1000000001"], ) print(refunds) ``` #### Ruby ```ruby require 'easypost' client = EasyPost::Client.new(api_key: 'EASYPOST_API_KEY') refunds = client.refund.create( carrier: 'USPS', tracking_codes: ['EZ1000000001'], ) puts refunds ``` This endpoint is intended to be used to bulk-process multiple refunds; as a result, this endpoint will return a list of `Refund` objects. To refund a single shipment, use the Refund a Shipment endpoint instead. [Note: This object is immutable after creation. Review the rendered documentation for details.] --- ## Retrieve all Refunds ### Example: GET /refunds #### cURL ```shell curl -X GET "https://api.easypost.com/v2/refunds?page_size=5" \ -u "EASYPOST_API_KEY": ``` #### Go ```go package example import ( "fmt" "github.com/EasyPost/easypost-go/v6" ) func list() { client := easypost.New("EASYPOST_API_KEY") refunds, _ := client.ListRefunds( &easypost.ListOptions{ PageSize: 5, }, ) fmt.Println(refunds) } ``` #### Java ```java package refunds; import com.easypost.exception.EasyPostException; import com.easypost.model.RefundCollection; import com.easypost.service.EasyPostClient; import java.util.HashMap; public class All { public static void main(String[] args) throws EasyPostException { EasyPostClient client = new EasyPostClient("EASYPOST_API_KEY"); HashMap params = new HashMap<>(); params.put("page_size", 5); RefundCollection refunds = client.refund.all(params); System.out.println(refunds); } } ``` #### C# ```csharp using System; using System.Collections.Generic; using System.Threading.Tasks; using EasyPost; using Newtonsoft.Json; namespace EasyPostExamples { public class Examples { public static async Task Main() { var client = new EasyPost.Client(new EasyPost.ClientConfiguration("EASYPOST_API_KEY")); EasyPost.Parameters.Refund.All parameters = new() { PageSize = 5 }; EasyPost.Models.API.RefundCollection refundCollection = await client.Refund.All(parameters); Console.WriteLine(JsonConvert.SerializeObject(refundCollection, Formatting.Indented)); } } } ``` #### Node.js ```javascript const EasyPostClient = require('@easypost/api'); const client = new EasyPostClient('EASYPOST_API_KEY'); (async () => { const refunds = await client.Refund.all({ page_size: 5, }); console.log(refunds); })(); ``` #### PHP ```php refund->all([ 'page_size' => 5, ]); echo $refunds; ``` #### Python ```python import easypost client = easypost.EasyPostClient("EASYPOST_API_KEY") refunds = client.refund.all( page_size=5, ) print(refunds) ``` #### Ruby ```ruby require 'easypost' client = EasyPost::Client.new(api_key: 'EASYPOST_API_KEY') refunds = client.refund.all( page_size: 5, ) puts refunds ``` A list of all `Refund` objects associated with the given `API Key` can also be retrieved. See the Pagination section of our docs for more details on retrieving all records when multiple pages are available. --- ## Retrieve a Refund ### Example: GET /refunds/:id #### cURL ```shell curl -X GET https://api.easypost.com/v2/refunds/rfnd_... \ -u "EASYPOST_API_KEY": ``` #### Go ```go package example import ( "fmt" "github.com/EasyPost/easypost-go/v6" ) func retrieve() { client := easypost.New("EASYPOST_API_KEY") refund, _ := client.GetRefund("shp_...") fmt.Println(refund) } ``` #### Java ```java package refunds; import com.easypost.exception.EasyPostException; import com.easypost.model.Refund; import com.easypost.service.EasyPostClient; public class Retrieve { public static void main(String[] args) throws EasyPostException { EasyPostClient client = new EasyPostClient("EASYPOST_API_KEY"); Refund refund = client.refund.retrieve("rfnd_..."); System.out.println(refund); } } ``` #### C# ```csharp using System; using System.Collections.Generic; using System.Threading.Tasks; using EasyPost; using Newtonsoft.Json; namespace EasyPostExamples { public class Examples { public static async Task Main() { var client = new EasyPost.Client(new EasyPost.ClientConfiguration("EASYPOST_API_KEY")); EasyPost.Models.API.Refund refund = await client.Refund.Retrieve("rfnd_..."); Console.WriteLine(JsonConvert.SerializeObject(refund, Formatting.Indented)); } } } ``` #### Node.js ```javascript const EasyPostClient = require('@easypost/api'); const client = new EasyPostClient('EASYPOST_API_KEY'); (async () => { const refund = await client.Refund.retrieve('rfnd_...'); console.log(refund); })(); ``` #### PHP ```php refund->retrieve('rfnd_...'); echo $refund; ``` #### Python ```python import easypost client = easypost.EasyPostClient("EASYPOST_API_KEY") refund = client.refund.retrieve("rfnd_...") print(refund) ``` #### Ruby ```ruby require 'easypost' client = EasyPost::Client.new(api_key: 'EASYPOST_API_KEY') refund = client.refund.retrieve('rfnd_...') puts refund ``` Retrieve a `Refund` by its `id`. --- Source: https://docs.easypost.com/docs/reports # Report A `Report` contains a CSV that is a log of all the objects created within a certain time frame. `Reports` can be generated using the `Reports` endpoint. You can create and view `Reports` created between any time frame defined between the `start_date` and `end_date`. The `Report` API can be categorized into several types. These types determine which EasyPost Object to produce a `Report` for, and should be passed as either the `type` in our client libraries or at the end of the URL. #### Report Types - `cash_flow` - `insurance` - `payment_log` - `refund` - `shipment` - `shipment_invoice` - `tracker` --- ## Report object | Property | Type | Description | |----------|------|-------------| | id | string | Unique, begins with one of the following prefixes: "cfrep_" (Cash Flow Report) "insrep_" (Insurance Report) "plrep_" (Payment Log Report) "refrep_" (Refund Report) "shprep_" (Shipment Report) "shpinvrep_" (Shipment Invoice Report) "trkrep_" (Tracker Report) | | object | string | Possible values: "CashFlowReport" "InsuranceReport" "PaymentLogReport" "RefundReport" "ShipmentReport" "ShipmentInvoiceReport" "TrackerReport" | | mode | string | "test" or "production" | | status | string | Possible values: "new" "available" "failed" "empty" null | | start_date | string | A date string in YYYY-MM-DD form, e.g.: "2016-02-02" | | end_date | string | A date string in YYYY-MM-DD form, e.g.: "2016-02-03" | | include_children | boolean | Set true if you would like to include Insurances , Refunds , Shipments , ShipmentInvoices, or Trackers created by child users. | | url | string | A URL that contains a link to the Report. Expires 30 seconds after retrieving this object. | | url_expires_at | datetime | Time at which the URL expires | | send_email | boolean | Set true if you would like to send an email containing the Report. | | created_at | datetime | When the Report was created | | updated_at | datetime | When the Report was last updated | Example Object: ```json { "columns": null, "created_at": "2025-05-09T20:40:02Z", "end_date": "2022-10-01", "id": "shprep_846a44b4d34e47afb14a1783d463d02d", "include_children": null, "mode": "test", "object": "ShipmentReport", "start_date": "2022-10-01", "status": "new", "updated_at": null, "url": null, "url_expires_at": null, "utc_offset": null } ``` --- ## Create a Report ### Example: POST /reports/:type #### cURL ```shell curl -X POST https://api.easypost.com/v2/reports/payment_log \ -u "EASYPOST_API_KEY": \ -H 'Content-Type: application/json' \ -d '{ "start_date": "2022-10-01", "end_date": "2022-10-31" }' ``` #### Go ```go package example import ( "fmt" "github.com/EasyPost/easypost-go/v6" ) func create() { client := easypost.New("EASYPOST_API_KEY") reportOptions := &easypost.Report{ StartDate: "2022-10-01", EndDate: "2022-10-31", } report, _ := client.CreateReport( "payment_log", reportOptions, ) fmt.Println(report) } ``` #### Java ```java package reports; import com.easypost.exception.EasyPostException; import com.easypost.model.Report; import com.easypost.service.EasyPostClient; import java.util.HashMap; public class Create { public static void main(String[] args) throws EasyPostException { EasyPostClient client = new EasyPostClient("EASYPOST_API_KEY"); HashMap params = new HashMap(); params.put("type", "payment_log"); params.put("start_date", "2022-10-01"); params.put("end_date", "2022-10-31"); Report report = client.report.create(params); System.out.println(report); } } ``` #### C# ```csharp using System; using System.Collections.Generic; using System.Threading.Tasks; using EasyPost; using Newtonsoft.Json; namespace EasyPostExamples { public class Examples { public static async Task Main() { var client = new EasyPost.Client(new EasyPost.ClientConfiguration("EASYPOST_API_KEY")); EasyPost.Parameters.Report.Create parameters = new() { Type = "payment_log", StartDate = "2022-10-01", EndDate = "2022-10-31" }; EasyPost.Models.API.Report report = await client.Report.Create(parameters); Console.WriteLine(JsonConvert.SerializeObject(report, Formatting.Indented)); } } } ``` #### Node.js ```javascript const EasyPostClient = require('@easypost/api'); const client = new EasyPostClient('EASYPOST_API_KEY'); (async () => { const report = await client.Report.create({ type: 'payment_log', start_date: '2022-10-01', end_date: '2022-10-31', }); console.log(report); })(); ``` #### PHP ```php report->create([ 'type' => 'payment_log', 'start_date' => '2022-10-01', 'end_date' => '2022-10-31', ]); echo $report; ``` #### Python ```python import easypost client = easypost.EasyPostClient("EASYPOST_API_KEY") report = client.report.create( type="payment_log", start_date="2022-10-01", end_date="2022-10-31", ) print(report) ``` #### Ruby ```ruby require 'easypost' client = EasyPost::Client.new(api_key: 'EASYPOST_API_KEY') report = client.report.create( type: 'payment_log', start_date: '2022-10-01', end_date: '2022-10-31', ) puts report ``` To create a `Report`, provide a `start_date` and `end_date` that are less than 31 days apart along with any other optional parameter that you would like to specify. A detailed list of attributes are provided below. The expiry on a URL is 1 hour. The default status on each new `Report` is "new". It changes to "available" if the CSV file is created successfully, "failed" when CSV creation is unsuccessful, or "empty" if the report does not include any data for the specified date range. Additionally, null could also be a status. When a `Report`'s status changes, an `Event` will be sent to registered `Webhook` URLs. See our Webhooks Guide for help on `Event` handling. [Note: This object is immutable after creation. Review the rendered documentation for details.] --- ## Retrieve all Reports ### Example: GET /reports/:type #### cURL ```shell curl -X GET https://api.easypost.com/v2/reports/plrep_... \ -u "EASYPOST_API_KEY": ``` #### Go ```go package example import ( "fmt" "github.com/EasyPost/easypost-go/v6" ) func retrieve() { client := easypost.New("EASYPOST_API_KEY") report, _ := client.GetReport("", "") fmt.Println(report) } ``` #### Java ```java package reports; import com.easypost.exception.EasyPostException; import com.easypost.model.Report; import com.easypost.service.EasyPostClient; public class Retrieve { public static void main(String[] args) throws EasyPostException { EasyPostClient client = new EasyPostClient("EASYPOST_API_KEY"); Report report = client.report.retrieve(""); System.out.println(report); } } ``` #### C# ```csharp using System; using System.Collections.Generic; using System.Threading.Tasks; using EasyPost; using Newtonsoft.Json; namespace EasyPostExamples { public class Examples { public static async Task Main() { var client = new EasyPost.Client(new EasyPost.ClientConfiguration("EASYPOST_API_KEY")); EasyPost.Models.API.Report report = await client.Report.Retrieve("plrep_..."); Console.WriteLine(JsonConvert.SerializeObject(report, Formatting.Indented)); } } } ``` #### Node.js ```javascript const EasyPostClient = require('@easypost/api'); const client = new EasyPostClient('EASYPOST_API_KEY'); (async () => { const report = await client.Report.retrieve(''); console.log(report); })(); ``` #### PHP ```php report->retrieve(''); echo $report; ``` #### Python ```python import easypost client = easypost.EasyPostClient("EASYPOST_API_KEY") report = client.report.retrieve("") print(report) ``` #### Ruby ```ruby require 'easypost' client = EasyPost::Client.new(api_key: 'EASYPOST_API_KEY') report = client.report.retrieve('') puts report ``` A list of all `Report` objects associated with the given `API Key` can also be retrieved. See the Pagination section of our docs for more details on retrieving all records when multiple pages are available. --- ## Retrieve a Report ### Example: GET /reports/:id #### cURL ```shell curl -X GET https://api.easypost.com/v2/reports/plrep_... \ -u "EASYPOST_API_KEY": ``` #### Go ```go package example import ( "fmt" "github.com/EasyPost/easypost-go/v6" ) func retrieve() { client := easypost.New("EASYPOST_API_KEY") report, _ := client.GetReport("", "") fmt.Println(report) } ``` #### Java ```java package reports; import com.easypost.exception.EasyPostException; import com.easypost.model.Report; import com.easypost.service.EasyPostClient; public class Retrieve { public static void main(String[] args) throws EasyPostException { EasyPostClient client = new EasyPostClient("EASYPOST_API_KEY"); Report report = client.report.retrieve(""); System.out.println(report); } } ``` #### C# ```csharp using System; using System.Collections.Generic; using System.Threading.Tasks; using EasyPost; using Newtonsoft.Json; namespace EasyPostExamples { public class Examples { public static async Task Main() { var client = new EasyPost.Client(new EasyPost.ClientConfiguration("EASYPOST_API_KEY")); EasyPost.Models.API.Report report = await client.Report.Retrieve("plrep_..."); Console.WriteLine(JsonConvert.SerializeObject(report, Formatting.Indented)); } } } ``` #### Node.js ```javascript const EasyPostClient = require('@easypost/api'); const client = new EasyPostClient('EASYPOST_API_KEY'); (async () => { const report = await client.Report.retrieve(''); console.log(report); })(); ``` #### PHP ```php report->retrieve(''); echo $report; ``` #### Python ```python import easypost client = easypost.EasyPostClient("EASYPOST_API_KEY") report = client.report.retrieve("") print(report) ``` #### Ruby ```ruby require 'easypost' client = EasyPost::Client.new(api_key: 'EASYPOST_API_KEY') report = client.report.retrieve('') puts report ``` Retrieve a `Report` by its `id`. See object definition for possible _id_ prefixes. --- Source: https://docs.easypost.com/docs/scan-form # ScanForm A `ScanForm` can be created to speed up and simplify the carrier pickup process. The `ScanForm` is one document that can be scanned to mark all included tracking codes as "Accepted for Shipment" by the carrier. The following criteria must met before creation: - Refunded `Shipments` cannot be added. - Each `Shipment` must have the same `origin_address`. - Each `Shipment` must be dated (using the `label_date` option) on or after the date the form is generated. - All `Shipments` must belong to the same carrier account. - Any given `Shipment` cannot be added to more than one `ScanForm`. - Existing `ScanForms` may not be updated with additional `Shipments`. If a `ScanForm` already exists and new `Shipments` need to be added, a new `ScanForm` must be created. - `Shipments` should be provided in the form of an array. --- ## ScanForm object | Property | Type | Description | |----------|------|-------------| | id | string | Unique, begins with "sf_" | | object | string | "ScanForm" | | message | string | Human readable message explaining any failures | | address | Address | Address that the packages will be shipped from | | tracking_codes | string array | Tracking codes included on the ScanForm | | form_url | string | Url of the document | | form_file_type | string | File format of the document | | batch_id | string | The ID of the associated Batch. Unique, starts with "batch_". | | created_at | datetime | When the ScanForm was created | | updated_at | datetime | When the ScanForm was last updated | Example Object: ```json { "id": "sf_244b6b0b1487472db12dcdfb2622ec8d", "object": "ScanForm", "created_at": "2025-05-09T20:40:04Z", "updated_at": "2025-05-09T20:40:04Z", "tracking_codes": [ "9405500208303109884151" ], "address": { "id": "adr_c8c8ddad2d1511f0b56e3cecef1b359e", "object": "Address", "created_at": "2025-05-09T20:40:03+00:00", "updated_at": "2025-05-09T20:40:03+00:00", "name": "EasyPost", "company": null, "street1": "417 Montgomery Street", "street2": "5th Floor", "city": "San Francisco", "state": "CA", "zip": "94104", "country": "US", "phone": "4153334445", "email": "support@easypost.com", "mode": "test", "carrier_facility": null, "residential": null, "federal_tax_id": null, "state_tax_id": null, "verifications": {} }, "status": "created", "message": null, "form_url": "https://easypost-files.s3.us-west-2.amazonaws.com/files/scan_form/20250509/e8edaa9a23e2044386ae61411cf7227014.pdf", "form_file_type": null, "batch_id": "batch_b35046236c8c4740accf6ed173b64964", "confirmation": null } ``` --- ## Create a ScanForm ### Example: POST /scan_forms #### cURL ```shell curl -X POST https://api.easypost.com/v2/scan_forms \ -u "EASYPOST_API_KEY": \ -H 'Content-Type: application/json' \ -d '{ "shipments": [ { "id": "shp_..." }, { "id": "shp_..." } ] }' ``` #### Go ```go package example import ( "fmt" "github.com/EasyPost/easypost-go/v6" ) func create() { client := easypost.New("EASYPOST_API_KEY") scanForm, _ := client.CreateScanForm("shp_...", "shp_...") fmt.Println(scanForm) } ``` #### Java ```java package shipments; import com.easypost.exception.EasyPostException; import com.easypost.model.ScanForm; import com.easypost.model.Shipment; import com.easypost.service.EasyPostClient; import java.util.ArrayList; import java.util.HashMap; import java.util.List; public class Create { public static void main(String[] args) throws EasyPostException { EasyPostClient client = new EasyPostClient("EASYPOST_API_KEY"); Shipment shipment = client.shipment.retrieve("shp_..."); List shipments = new ArrayList(); shipments.add(shipment); HashMap params = new HashMap(); params.put("shipments", shipments); ScanForm scanForm = client.scanform.create(params); System.out.println(scanForm); } } ``` #### C# ```csharp using System; using System.Collections.Generic; using System.Threading.Tasks; using EasyPost; using Newtonsoft.Json; namespace EasyPostExamples { public class Examples { public static async Task Main() { var client = new EasyPost.Client(new EasyPost.ClientConfiguration("EASYPOST_API_KEY")); EasyPost.Models.API.Shipment shipment = await client.Shipment.Retrieve("shp_..."); EasyPost.Parameters.ScanForm.Create parameters = new() { Shipments = new List { shipment } }; EasyPost.Models.API.ScanForm scanForm = await client.ScanForm.Create(parameters); Console.WriteLine(JsonConvert.SerializeObject(scanForm, Formatting.Indented)); } } } ``` #### Node.js ```javascript const EasyPostClient = require('@easypost/api'); const client = new EasyPostClient('EASYPOST_API_KEY'); (async () => { const scanForm = await client.ScanForm.create({ shipments: [{ id: 'shp_...' }, { id: 'shp_...' }], }); console.log(scanForm); })(); ``` #### PHP ```php scanForm->create([ 'shipments' => [ ['id' => 'shp_...'], ['id' => 'shp_...'], ] ]); echo $scanForm; ``` #### Python ```python import easypost client = easypost.EasyPostClient("EASYPOST_API_KEY") scan_form = client.scan_form.create( shipments=[ {"id": "shp_..."}, {"id": "shp_..."}, ] ) print(scan_form) ``` #### Ruby ```ruby require 'easypost' client = EasyPost::Client.new(api_key: 'EASYPOST_API_KEY') scan_form = client.scan_form.create( shipments: [ { id: 'shp_...', }, { id: 'shp_...', }, ], ) puts scan_form ``` A `ScanForm` can be created in two ways: - Create a `ScanForm` for `Shipments` directly - Create a `ScanForm` for a `Batch` of `Shipments` > Note: A `ScanForm` can only include shipments from one carrier account. Shipments from different carrier accounts require separate `ScanForms`. > Note: A `Batch` is created in the background for `Shipments` as an intermediate process to creating `ScanForms`. A `ScanForm` can be created for one or more `Shipments`. It is recommended to **keep each batch under 1,000 shipments**. This best practice helps avoid timeout errors during the batch buying process. [Note: This object is immutable after creation. Review the rendered documentation for details.] --- ## Retrieve all ScanForms ### Example: GET /scan_forms #### cURL ```shell curl -X GET "https://api.easypost.com/v2/scan_forms?page_size=5" \ -u "EASYPOST_API_KEY": ``` #### Go ```go package example import ( "fmt" "github.com/EasyPost/easypost-go/v6" ) func list() { client := easypost.New("EASYPOST_API_KEY") scanForms, _ := client.ListScanForms( &easypost.ListOptions{ PageSize: 5, }, ) fmt.Println(scanForms) } ``` #### Java ```java package shipments; import com.easypost.exception.EasyPostException; import com.easypost.model.ScanFormCollection; import com.easypost.service.EasyPostClient; import java.util.HashMap; public class All { public static void main(String[] args) throws EasyPostException { EasyPostClient client = new EasyPostClient("EASYPOST_API_KEY"); HashMap params = new HashMap(); params.put("page_size", 5); ScanFormCollection scanForms = client.scanform.all(params); System.out.println(scanForms); } } ``` #### C# ```csharp using System; using System.Collections.Generic; using System.Threading.Tasks; using EasyPost; using Newtonsoft.Json; namespace EasyPostExamples { public class Examples { public static async Task Main() { var client = new EasyPost.Client(new EasyPost.ClientConfiguration("EASYPOST_API_KEY")); EasyPost.Parameters.ScanForm.All parameters = new() { PageSize = 5 }; EasyPost.Models.API.ScanFormCollection scanFormCollection = await client.ScanForm.All(parameters); Console.WriteLine(JsonConvert.SerializeObject(scanFormCollection, Formatting.Indented)); } } } ``` #### Node.js ```javascript const EasyPostClient = require('@easypost/api'); const client = new EasyPostClient('EASYPOST_API_KEY'); (async () => { const scanForms = await client.ScanForm.all({ page_size: 5, }); console.log(scanForms); })(); ``` #### PHP ```php scanForm->all([ 'page_size' => 5 ]); echo $scanForms; ``` #### Python ```python import easypost client = easypost.EasyPostClient("EASYPOST_API_KEY") scan_forms = client.scan_form.all(page_size=5) print(scan_forms) ``` #### Ruby ```ruby require 'easypost' client = EasyPost::Client.new(api_key: 'EASYPOST_API_KEY') scan_forms = client.scan_form.all( page_size: 5, ) puts scan_forms ``` A list of all `ScanForm` objects associated with the given `API Key` can also be retrieved. See the Pagination section of our docs for more details on retrieving all records when multiple pages are available. --- ## Retrieve a ScanForm ### Example: GET /scan_forms/:id #### cURL ```shell curl -X GET https://api.easypost.com/v2/scan_forms/sf_... \ -u "EASYPOST_API_KEY": ``` #### Go ```go package example import ( "fmt" "github.com/EasyPost/easypost-go/v6" ) func retrieve() { client := easypost.New("EASYPOST_API_KEY") scanForm, _ := client.GetScanForm("sf_...") fmt.Println(scanForm) } ``` #### Java ```java package shipments; import com.easypost.exception.EasyPostException; import com.easypost.model.ScanForm; import com.easypost.service.EasyPostClient; public class Retrieve { public static void main(String[] args) throws EasyPostException { EasyPostClient client = new EasyPostClient("EASYPOST_API_KEY"); ScanForm scanForm = client.scanform.retrieve("sf_..."); System.out.println(scanForm); } } ``` #### C# ```csharp using System; using System.Collections.Generic; using System.Threading.Tasks; using EasyPost; using Newtonsoft.Json; namespace EasyPostExamples { public class Examples { public static async Task Main() { var client = new EasyPost.Client(new EasyPost.ClientConfiguration("EASYPOST_API_KEY")); EasyPost.Models.API.ScanForm scanForm = await client.ScanForm.Retrieve("sf_..."); Console.WriteLine(JsonConvert.SerializeObject(scanForm, Formatting.Indented)); } } } ``` #### Node.js ```javascript const EasyPostClient = require('@easypost/api'); const client = new EasyPostClient('EASYPOST_API_KEY'); (async () => { const scanForm = await client.ScanForm.retrieve('sf_...'); console.log(scanForm); })(); ``` #### PHP ```php scanForm->retrieve('sf_...'); echo $scanForm; ``` #### Python ```python import easypost client = easypost.EasyPostClient("EASYPOST_API_KEY") scan_form = client.scan_form.retrieve("sf_...") print(scan_form) ``` #### Ruby ```ruby require 'easypost' client = EasyPost::Client.new(api_key: 'EASYPOST_API_KEY') scan_form = client.scan_form.retrieve('sf_...') puts scan_form ``` Retrieve a `ScanForm` by its `id`. --- Source: https://docs.easypost.com/docs/shipments/forms # Form After a `Shipment` is created, you can create various associated `Form` objects for that `Shipment`, such as a return packing slip, QR codes, and other international shipping forms. For more information about how to use forms with your shipments, please check our forms guide. **Forms that may be returned with `Shipment` objects depending on the carrier and data passed:** - cn22 - cod_return_label - commercial_invoice - high_value_report - nafta_certificate_of_origin - order_summary **Forms that can be created after a `Shipment` has been bought:** - commercial_invoice - label_qr_code - return_packing_slip - rma_qr_code --- ## Form object | Property | Type | Description | |----------|------|-------------| | id | string | Unique, begins with "form_" | | object | string | "Form" | | mode | string | "test" or "production" | | form_type | string | The type of form. Possible values: "cn22" "cod_return_label" "commercial_invoice" "high_value_report" "label_qr_code" "nafta_certificate_of_origin" "order_summary" "return_packing_slip" "rma_qr_code" | | form_url | string | The URL from which the form can be downloaded | | submitted_electronically | boolean | If EasyPost has submitted the form to the carrier on behalf of the user | | created_at | datetime | When the Form was created | | updated_at | datetime | When the Form was last updated | Example Object: ```json { "object": "Form", "id": "form_c7d83834b45544399bf704c468df06b6", "created_at": "2025-05-09T20:39:21Z", "updated_at": "2025-05-09T20:39:21Z", "mode": "test", "form_type": "return_packing_slip", "form_url": "https://easypost-files.s3-us-west-2.amazonaws.com/files/form/20250509/827694e0c57149079d691ac3fb85e2b1.pdf", "submitted_electronically": null } ``` --- ## Create Form ### Example: POST /shipments/:id/forms #### cURL ```shell # type always required # all other elements differ based on form type curl -X POST https://api.easypost.com/v2/shipments/shp_.../forms \ -u "EASYPOST_API_KEY": \ -H 'Content-Type: application/json' \ -d '{ "form": { "type": "return_packing_slip", "barcode": "RMA12345678900", "line_items": [ { "product": { "title": "Square Reader", "barcode": "855658003251" }, "units": 8 } ] } }' ``` #### Go ```go package example import ( "fmt" "github.com/EasyPost/easypost-go/v6" ) func create() { client := easypost.New("EASYPOST_API_KEY") shipmentWithForm, _ := client.GenerateShipmentForm("shp_...", "return_packing_slip") fmt.Println(shipmentWithForm) } ``` #### Java ```java package shipments; import com.easypost.exception.EasyPostException; import com.easypost.model.Shipment; import com.easypost.service.EasyPostClient; import java.util.ArrayList; import java.util.HashMap; public class Create { public static void main(String[] args) throws EasyPostException { EasyPostClient client = new EasyPostClient("EASYPOST_API_KEY"); HashMap titleMap = new HashMap(); titleMap.put("title", "Square Reader"); HashMap barcodeMap = new HashMap(); barcodeMap.put("barcode", "855658003251"); ArrayList> lineItemsMap = new ArrayList>(); lineItemsMap.add(titleMap); lineItemsMap.add(barcodeMap); HashMap params = new HashMap(); params.put("barcode", "RMA12345678900"); params.put("units", 8); params.put("line_items", lineItemsMap); Shipment shipment = client.shipment.generateForm("shp_...", "return_packing_slip", params); System.out.println(shipment); } } ``` #### C# ```csharp using System; using System.Collections.Generic; using System.Threading.Tasks; using EasyPost; using Newtonsoft.Json; namespace EasyPostExamples { public class Examples { public static async Task Main() { var client = new EasyPost.Client(new EasyPost.ClientConfiguration("EASYPOST_API_KEY")); EasyPost.Parameters.Shipment.GenerateForm parameters = new() { Type = "return_packing_slip", Data = new() { { "barcode", "RMA12345678900" }, { "line_items", new List>() { { new Dictionary { { "title", "Square Reader" }, { "barcode", "855658003251" } } } } }, { "units", 8 } } }; EasyPost.Models.API.Shipment shipment = await client.Shipment.GenerateForm("shp_...", parameters); Console.WriteLine(JsonConvert.SerializeObject(shipment, Formatting.Indented)); } } } ``` #### Node.js ```javascript const EasyPostClient = require('@easypost/api'); const client = new EasyPostClient('EASYPOST_API_KEY'); (async () => { const shipmentWithForm = await client.Shipment.generateForm('shp_...', 'return_packing_slip', { barcode: 'RMA12345678900', line_items: [ { product: { title: 'Square Reader', barcode: '855658003251', }, units: '8', }, ], }); console.log(shipmentWithForm); })(); ``` #### PHP ```php 'RMA12345678900', 'line_items' => [ [ 'product' => [ 'title' => 'Square Reader', 'barcode' => '855658003251', ], 'units' => 8, ], ], ]; $shipmentWithForm = $client->shipment->generateForm('shp_...', $formType, $formOptions); echo $shipmentWithForm; ``` #### Python ```python import easypost client = easypost.EasyPostClient("EASYPOST_API_KEY") form_type = "return_packing_slip" form_options = { "barcode": "RMA12345678900", "line_items": [ { "product": { "title": "Square Reader", "barcode": "855658003251", }, "units": 8, }, ], } shipment = client.shipment.generate_form("shp_...", form_type, form_options) print(shipment) ``` #### Ruby ```ruby require 'easypost' client = EasyPost::Client.new(api_key: 'EASYPOST_API_KEY') form_type = 'return_packing_slip' form_options = { type: 'return_packing_slip', barcode: 'RMA12345678900', line_items: [ { product: { title: 'Square Reader', barcode: '855658003251', }, units: '8', }, ], } shipment = client.shipment.generate_form('shp_...', form_type, form_options) puts shipment ``` **Please see forms guide for request parameters.** --- Source: https://docs.easypost.com/docs/shipments/messages # Messages When rating a `Shipment` or Pickup, some carriers may fail to generate rates. These failures are returned as part of the `Shipment` or `Pickup` as part of their `messages` attribute, and follow a common object structure. It is important to note that the `message` value for any member of this list comes directly from the carrier, not from EasyPost. This means that if you see an authentication or other non-shipping error here, it is not an issue between you and EasyPost, it is an issue between you and the carrier, or an issue with the given data. --- ## Message object | Property | Type | Description | |----------|------|-------------| | carrier | string | The name of the carrier generating the error, e.g. "UPS" | | type | string | The category of error that occurred. Most frequently "rate_error" | | message | string | The string from the carrier explaining the problem | | carrier_account_id | string | The account ID of the carrier. Useful if you have multiple accounts with the same carrier. | --- Source: https://docs.easypost.com/docs/shipments/options # Options `Shipments` can have a variety of additional `options` which you can specify when creating a shipment. The `Options` object can be populated with the keys below. Carrier specific support for each option is added as needed. To request support for a specific carrier option, Contact Support. --- ## Options object | Property | Type | Description | |----------|------|-------------| | additional_handling | boolean | Indicates whether the package requires special handling. When set to true, an additional_handling charge may apply based on the following conditions: Any article encased in an outer shipping container made of metal or wood. Any item not fully encased in a corrugated cardboard container (e.g., barrel, drum, pail, or tire). Any package with the longest side exceeding 60 inches, or the second-longest side exceeding 30 inches. Any package with an actual weight greater than 70 pounds. Note: Some carriers, including USPS, may apply additional_handling fees based on criteria such as nonstandard package characteristics, dimensions, or contents. For USPS-specific information, refer to the help center article Understanding Additional Handling Fees. | | address_validation_level | string | Setting this option to "0" will allow the minimum amount of address information to pass the validation check. Only for USPS postage. | | alcohol | boolean | Set this option to true if your shipment contains alcohol. UPS - only supported for U.S. domestic shipments FedEx - only supported for U.S. domestic shipments Canada Post - Requires adult signature 19 years or older. If you want adult signature 18 years or older, instead use delivery_confirmation: "ADULT_SIGNATURE" | | by_drone | boolean | Setting this option to true will indicate to the carrier to prefer delivery by drone, if the carrier supports drone delivery. | | carbon_neutral | boolean | Setting this to true will add a charge to reduce carbon emissions by carriers who support this option. | | carrier_notification_email | string | Assign an email address to receive carrier notifications. | | carrier_notification_sms | string | Assign a phone number to receive carrier notifications. | | cod_amount | string | Adding an amount will have the carrier collect the specified amount from the recipient. For FedEx C.O.D. availability, see the FedEx BYOCA Guide. | | cod_method | string | Method for payment. Possible values: "CASH" "CHECK" "MONEY_ORDER" | | cod_address_id | string | The ID of the Address to which the C.O.D payment should be returned. Defaults to the origin address. Only available on FedEx Ground shipments within and to Canada. | | content_description | string | A description of the content of the shipment. | | currency | string | Which currency this shipment will show for rates if carrier allows. | | delivery_confirmation | string | If requesting a signature, pass "ADULT_SIGNATURE" or "SIGNATURE". To leave the package at the door, use "NO_SIGNATURE". "NO_SIGNATURE" is equivalent to releasing liability. Some options may be limited for international shipments. Carrier-specific delivery confirmation options are listed below: FedEx “NO_SIGNATURE” - Leaves the package at the door with no signature required. "INDIRECT_SIGNATURE" - Requires the signature of someone at the delivery address or from someone nearby, such as a neighbor. “SIGNATURE” - Requires a signature from someone at the delivery address. “DIRECT” - Requires a signature from someone at the delivery address. “ADULT_SIGNATURE” - Requires the signature of an adult at the delivery address. "SERVICE_DEFAULT" - Attempts to set the signature requirements based on the shipment details and service level, and recommended for international shipments to maximize rate availability. Unrecognized values - Default to “SERVICE_DEFAULT”. Note: The FedEx SMART_POST service only supports NO_SIGNATURE, null, or SERVICE_DEFAULT values for the delivery_confirmation option. Using unsupported values will result in an error when purchasing a shipment. USPS "ADULT_SIGNATURE_RESTRICTED" - Requires the signature of the specific addressee, or authorized agent, who is 21 years of age or older. "SIGNATURE_RESTRICTED" - Requires the signature of the specified addressee, or authorized agent. Canada Post "DO_NOT_SAFE_DROP" - Tells the carrier to not hide the package ("safe drop"). GSO "STANDARD_SIGNATURE" DHL Express "SIGNATURE" - DHL Express Direct Signature "NO_SIGNATURE" - DHL Express Signature Release | | delivery_min_datetime | string | The earliest a package should be delivered. Supported carriers vary. | | delivery_max_datetime | string | The latest a package should be delivered. Supported carriers vary. | | dropoff_type | string | Method the customer will use to transfer the package to the carrier. Supported dropoff types and their corresponding carrier dropoff codes are below: FedEx "REGULAR_PICKUP" - Customer to transfer package during regular pickup (default) "SCHEDULED_PICKUP" - Customer to transfer package during scheduled pickup "RETAIL_LOCATION" - Customer to transfer package at FedEx retail location "STATION" - "STATION" "DROP_BOX" - Customer to use carrier drop box for package transfer | | dry_ice | boolean | Package contents contain dry ice. UPS - Need dry_ice_weight to be set UPS MailInnovations - Need dry_ice_weight to be set FedEx - Need dry_ice_weight to be set | | dry_ice_medical | boolean | If the dry ice is for medical use, set this option to true. UPS - Need dry_ice_weight to be set UPS MailInnovations - Need dry_ice_weight to be set | | dry_ice_weight | string | Weight of the dry ice in ounces. UPS - Need dry_ice_weight to be set UPS MailInnovations - Need dry_ice_weight to be set FedEx - Need dry_ice_weight to be set | | duty_payment | object | Specifies how duties and taxes should be billed when purchasing postage. This object is only supported by FedEx and UPS. Note: This option may not be supported for EasyPost Wallet carrier account types. type - (string) Supported values: "SENDER" "THIRD_PARTY" "RECEIVER" account - (string) Account number to be billed. country - (string) Country code of the billing account. postal_code - (string) Postal code of the account location. | | endorsement | string | Possible values: "ADDRESS_SERVICE_REQUESTED" "FORWARDING_SERVICE_REQUESTED" "CHANGE_SERVICE_REQUESTED" "RETURN_SERVICE_REQUESTED" "LEAVE_IF_NO_RESPONSE" | | end_shipper_id | string | Specify the responsible EndShipper for the shipment by passing in an EndShipper ID. | | freight_charge | double | Additional cost to be added to the invoice of this shipment. Only applies to UPS currently. | | handling_instructions | string | This is to designate special instructions for the carrier like "Do not drop!". | | hazmat | string | /* TODO: Make this a table instead of bullet points in the future */ Used to identify the type of hazardous materials (HAZMAT) or dangerous goods being shipped. Unidentified HAZMAT can introduce risk to human safety, property and expose the shipper to civil penalties, especially for packages that travel via air. Each carrier may have a different way of identifying HAZMAT and rates will only be retuned for carriers that support the type designated. Refer to carrier documentation to determine how to identify HAZMAT types and for complete rules and regulations. FedEx and DHL eCommerce "PRIMARY_CONTAINED": Primary Contained "PRIMARY_PACKED": Primary Packed "PRIMARY": Primary "SECONDARY_CONTAINED": Secondary Contained "SECONDARY_PACKED": Secondary Packed "SECONDARY": Secondary "ORMD": Other Regulated Materials—Domestic "LITHIUM": Lithium FedEx, DHL eCommerce, and USPS "LIMITED_QUANTITY": Limited Quantity Ground Package USPS : See EasyPost's USPS HazMat Guide and USPS Pub. 52 for complete regulations. "AIR_ELIGIBLE_ETHANOL": Air Eligible Ethanol Package "CLASS_1": Class 1 - Toy Propellant/Safety Fuse Package "CLASS_3": Class 3 - Package "CLASS_7": Class 7 - Radioactive Materials Package "CLASS_8_CORROSIVE": Class 8 - Corrosive Materials Package "CLASS_8_WET_BATTERY": Class 8 - Nonspillable Wet Battery Package "CLASS_9_NEW_LITHIUM_INDIVIDUAL": Class 9 - Lithium Battery Marked - Ground Only Package "CLASS_9_USED_LITHIUM": Class 9 - Lithium Battery - Returns Package "CLASS_9_NEW_LITHIUM_DEVICE": Class 9 - Lithium batteries, marked package "CLASS_9_DRY_ICE": Class 9 - Dry Ice Package "CLASS_9_UNMARKED_LITHIUM": Class 9 - Lithium batteries, unmarked package "CLASS_9_MAGNETIZED": Class 9 - Magnetized Materials Package "DIVISION_4_1": Division 4.1 - Mailable flammable solids and Safety Matches Package "DIVISION_5_1": Division 5.1 - Oxidizers Package "DIVISION_5_2": Division 5.2 - Organic Peroxides Package "DIVISION_6_1": Division 6.1 - Toxic Materials Package (with an LD50 of 50 mg/kg or less) "DIVISION_6_2": Division 6.2 "EXCEPTED_QUANTITY_PROVISION": Excepted Quantity Provision Package "GROUND_ONLY": Ground Only "ID8000": ID8000 Consumer Commodity Package "LIGHTERS": Lighters Package "SMALL_QUANTITY_PROVISION": Small Quantity Provision Package | | hold_for_pickup | boolean | Package will wait at carrier facility for pickup. FedEx - Instructs carrier to hold the package for pickup at the destination. A carrier facility address must be used as the destination. | | incoterm | string | Incoterm negotiated for shipment. Supported values: "CFR" "CIF" "CIP" "CPT" "DAT" "DAP" "DDP" "EXW" "FAS" "FCA" "FOB" Setting this value to anything other than "DDP" will pass the cost and responsibility of duties on to the recipient of the package(s), as specified by Incoterms rules. Note: Supported incoterms may vary by carrier. Refer to the carrier-specific guide for any requirements or exceptions. | | invoice_number | string | This will print an invoice number on the postage label. | | label_date | string | Set the date that will appear on the postage label. Accepts ISO 8601 -formatted string including time zone offset. EasyPost stores all dates as UTC time. | | label_format | string | Specifies the file format of the generated label. Supported values: "PNG" "PDF" "ZPL" "EPL2" Notes: "PNG" is the only format that allows for conversion. If a format is specified without a size, the resulting output may vary (e.g., PDF defaults to a 4x6 label embedded in an 8.5x11 page). | | label_size | string | Specifies the size of the generated label. Supported values: "PNG": 4x6 "PDF": 8.5x11 "ZPL": 4x6 "EPL2": 4x5 Notes: Must be paired with a compatible label_format. Overrides the default size assigned to the format if provided. Check the carrier guides for carrier-specific label_size values where applicable. | | live_animal | string | Specifies the type of live animal being shipped. This option is only supported for USPS shipments. Supported values include: "BEES" "DAY_OLD_POULTRY" "ADULT_BIRDS" "OTHER_LIVES" For detailed USPS requirements and restrictions, refer to USPS Publication 52, Section 5: Live Animals. | | machinable | boolean | Whether or not the parcel can be processed by the carriers equipment | | merchant_id | string | This is a required field for DHL eCommerce shipments and should be the merchant's name. It will be displayed on the shipping label and associated with the shipment throughout transit. | | payment | object | Specifies the payment method for billing the correct account when purchasing postage. Not all payment options are supported by all carriers. "SENDER" (default) billing is used if alternate billing methods are not supported by the platform or carrier. It is the shipper's responsibility to confirm with the carrier what billing options are available. Note: Third-party billing is not supported when using EasyPost Wallet carrier accounts. If third-party billing is required, a Bring Your Own Account (BYOA) must be used. type - (string) Supported values: "SENDER" (default) "THIRD_PARTY" "RECEIVER" "COLLECT" account - (string) Account number to be billed. Required if type is "RECEIVER" or "THIRD_PARTY". country - (string) Country code of the billing account. Required if type is "THIRD_PARTY". postal_code - (string) Postal code of the billing account. Required if type is "RECEIVER" or "THIRD_PARTY". | | perishable | boolean | Indicates whether the shipment contains perishable goods. When set to true, a USPS “Live Animal & Perishable” fee may be applied. This option is only supported for USPS shipments. | | pickup_min_datetime | string | The earliest a package should be picked up. Supported carriers vary. | | pickup_max_datetime | string | The latest a package should be picked up. Supported carriers vary. | | print_custom_1 | string | You can optionally print custom messages on labels. The locations of these fields show up on different spots on the carrier's labels. | | print_custom_2 | string | An additional message on the label. Same restrictions as print_custom_1. | | print_custom_3 | string | An additional message on the label. Same restrictions as print_custom_1 | | print_custom_1_barcode | boolean | Create a barcode for this custom reference if supported by carrier. | | print_custom_2_barcode | boolean | Create a barcode for this custom reference if supported by carrier. | | print_custom_3_barcode | boolean | Create a barcode for this custom reference if supported by carrier. | | print_custom_1_code | string | Specify the type of print_custom_1. FedEx (null) - If print_custom_1_code is not provided it defaults to Customer Reference PO - Purchase Order Number DP - Department Number RMA - Return Merchandise Authorization UPS AJ - Accounts Receivable Customer Account AT - Appropriation Number BM - Bill of Lading Number 9V - Collect on Delivery (COD) Number ON - Dealer Order Number DP - Department Number 3Q - Food and Drug Administration (FDA) Product Code IK - Invoice Number MK - Manifest Key Number MJ - Model Number PM - Part Number PC - Production Code PO - Purchase Order Number RQ - Purchase Request Number RZ - Return Authorization Number SA - Salesperson Number SE - Serial Number ST - Store Number TN - Transaction Reference Number EI - Employer's ID Number TJ - Federal Taxpayer ID Number | | print_custom_2_code | string | See print_custom_1_code. | | print_custom_3_code | string | See print_custom_1_code. | | saturday_delivery | boolean | Set this value to true to make your shipment eligible for Saturday delivery. | | special_rates_eligibility | string | This option enables the selection of the following USPS mail classes: Media Mail - USPS.MEDIAMAIL Library Mail - USPS.LIBRARYMAIL To request rates for both classes simultaneously, input USPS.MEDIAMAIL,USPS.LIBRARYMAIL. These mail classes are subject to restrictions and eligibility rules as outlined in the DMM . | | smartpost_hub | string | You can use this to override the hub ID you have on your account. | | smartpost_manifest | string | The manifest ID is used to group SmartPost packages onto a manifest for each trailer. | | billing_ref | string | A reference ID for aggregating DHL eCommerce billing data. | | certified_mail | boolean | Certified Mail provides the sender with a mailing receipt and, upon request, electronic verification that an article was delivered or that a delivery attempt was made. | | registered_mail | boolean | Registered Mail is the most secure service that the USPS offers. It incorporates a system of receipts to monitor the movement of the mail from the point of acceptance to delivery. | | registered_mail_amount | double | The value of the package contents | | return_receipt | boolean | An electronic return receipt may be purchased at the time of mailing and provides a shipper with evidence of delivery (to whom the mail was delivered and date of delivery), and information about the recipient's actual delivery address. Only applies to the USPS. | | suppress_etd | boolean | When set to "true", EasyPost will not electronically transmit the commercial invoice (ETD) to the carrier. Instead: A generic EasyPost commercial invoice will be generated and returned in the "forms" object. The "submitted_electronically" field in the response will be "false". Physical copies of the invoice must be printed and attached to the parcel. Note: This option is only required when shipping to countries that do not accept electronic commercial invoices. FedEx: To receive the generic EasyPost commercial invoice, also set the "commercial_invoice_format" option to "PNG". Otherwise, a FedEx-generated commercial invoice is returned. | Example Object: ```json { "print_custom_1": "Custom label message", "currency": "USD", "print_custom": [ { "value": "Custom label message" } ], "payment": { "type": "SENDER" }, "date_advance": 0 } ``` --- ## Create a Shipment with Options ### Example: POST /shipments #### cURL ```shell curl -X POST https://api.easypost.com/v2/shipments \ -u "EASYPOST_API_KEY": \ -H 'Content-Type: application/json' \ -d '{ "shipment": { "to_address": { "id": "adr_..." }, "from_address": { "id": "adr_..." }, "parcel": { "id": "prcl_..." }, "options": { "print_custom_1": "Custom label message" } } }' ``` #### Go ```go package example import ( "fmt" "github.com/EasyPost/easypost-go/v6" ) func createWithOptions() { client := easypost.New("EASYPOST_API_KEY") toAddress, _ := client.GetAddress("shp_...") fromAddress, _ := client.GetAddress("adr_...") parcel, _ := client.GetParcel("prcl_...") shipment, _ := client.CreateShipment( &easypost.Shipment{ ToAddress: toAddress, FromAddress: fromAddress, Parcel: parcel, Options: &easypost.ShipmentOptions{ PrintCustom1: "Custom label message", }, }, ) fmt.Println(shipment) } ``` #### Java ```java package shipments; import com.easypost.exception.EasyPostException; import com.easypost.model.Shipment; import com.easypost.service.EasyPostClient; import java.util.HashMap; public class CreateWithOptions { public static void main(String[] args) throws EasyPostException { EasyPostClient client = new EasyPostClient("EASYPOST_API_KEY"); HashMap toAddress = new HashMap(); toAddress.put("id", "adr_..."); HashMap fromAddress = new HashMap(); fromAddress.put("id", "adr_..."); HashMap parcel = new HashMap(); parcel.put("id", "prcl_..."); HashMap options = new HashMap(); parcel.put("print_custom_1", "Custom label message"); HashMap params = new HashMap(); params.put("to_address", toAddress); params.put("from_address", fromAddress); params.put("parcel", parcel); params.put("options", options); Shipment shipment = client.shipment.create(params); System.out.println(shipment); } } ``` #### C# ```csharp using System; using System.Collections.Generic; using System.Threading.Tasks; using EasyPost; using Newtonsoft.Json; namespace EasyPostExamples { public class Examples { public static async Task Main() { var client = new EasyPost.Client(new EasyPost.ClientConfiguration("EASYPOST_API_KEY")); EasyPost.Parameters.Shipment.Create parameters = new() { ToAddress = new EasyPost.Parameters.Address.Create { Name = "Dr. Steve Brule", Street1 = "417 Montgomery Street", Street2 = "5th Floor", City = "San Francisco", State = "CA", Country = "US", Zip = "94104" }, FromAddress = new EasyPost.Parameters.Address.Create { Company = "EasyPost", Street1 = "417 Montgomery Street", Street2 = "Floor 5", City = "San Francisco", State = "CA", Country = "US", Zip = "94104" }, Parcel = new EasyPost.Parameters.Parcel.Create { Length = 20.2, Width = 10.9, Height = 5, Weight = 65.9 }, Options = new EasyPost.Models.API.Options { PrintCustom1 = "Custom label message" } }; EasyPost.Models.API.Shipment shipment = await client.Shipment.Create(parameters); Console.WriteLine(JsonConvert.SerializeObject(shipment, Formatting.Indented)); } } } ``` #### Node.js ```javascript const EasyPostClient = require('@easypost/api'); const client = new EasyPostClient('EASYPOST_API_KEY'); (async () => { const shipment = await client.Shipment.create({ parcel: { id: 'prcl_...' }, to_address: { id: 'adr_...' }, from_address: { id: 'adr_...' }, options: { print_custom_1: 'Custom label message', }, }); console.log(shipment); })(); ``` #### PHP ```php shipment->create([ 'to_address' => ['id' => 'adr_...'], 'from_address' => ['id' => 'adr_...'], 'parcel' => [ 'length' => 20.2, 'width' => 10.9, 'height' => 5, 'weight' => 65.9 ], 'options' => ['print_custom_1' => 'Custom label message'] ]); echo $shipment; ``` #### Python ```python import easypost client = easypost.EasyPostClient("EASYPOST_API_KEY") shipment = client.shipment.create( to_address={"id": "adr_..."}, from_address={"id": "adr_..."}, parcel={"id": "prcl_..."}, options={"print_custom_1": "Custom label message"}, ) print(shipment) ``` #### Ruby ```ruby require 'easypost' client = EasyPost::Client.new(api_key: 'EASYPOST_API_KEY') shipment = client.shipment.create( to_address: { id: 'adr_...', }, from_address: { id: 'adr_...', }, parcel: { id: 'prcl_...', }, options: { print_custom_1: 'Custom label message', }, ) puts shipment ``` Any number of `options` can be specified during `Shipment` creation. [Note: This object is immutable after creation. Review the rendered documentation for details.] --- Source: https://docs.easypost.com/docs/shipments/rates # Rate Creating a `Shipment` automatically retrieves available `Rates`. Use the `carrier_accounts` parameter during `Shipment` creation to limit rating to specific `CarrierAccounts`. A `Rate` may include three pricing types: - `rate` and `currency`: The rate available for purchase. - `list_rate` and `list_currency`: The carrier's published, non-discounted rate. - `retail_rate` and `retail_currency`: The carrier's retail rate. For eligible international `Shipments`, a `Rate` may also include a `landed_cost` object with the duties, taxes, and fees for the shipment. See the Landed Cost Guide for eligibility and requirements. --- ## Rate object | Property | Type | Description | |----------|------|-------------| | id | string | Unique, begins with 'rate_' | | object | string | "Rate" | | service | string | The name of the service level to use | | carrier | string | The name of the carrier | | carrier_account_id | string | The ID of the CarrierAccount used to generate this rate | | shipment_id | string | ID of the Shipment this rate belongs to | | rate | string | The actual rate quote for this service | | currency | string | The currency for the rate | | retail_rate | string | The retail rate is the in-store rate given with no account | | retail_currency | string | The currency for the retail rate | | list_rate | string | The list rate is the non-negotiated rate given for having an account with the carrier | | list_currency | string | The currency for the list rate | | delivery_days | integer | The delivery days for this service | | delivery_date | string | The date for delivery | | delivery_date_guaranteed | boolean | Indicates if delivery window is guaranteed (true) or not ( false) | | billing_type | string | Billing type of the rate | | landed_cost | object | Landed cost information for an eligible international Rate. See the Landed Cost Guide for eligibility and requirements | | created_at | datetime | When the Rate was created | | updated_at | datetime | When the Rate was last updated | Example Object: ```json { "id": "rate_1ad9f7990aa6453d8060325fd7f17d8a", "object": "Rate", "created_at": "2025-05-09T20:39:58Z", "updated_at": "2025-05-09T20:39:58Z", "mode": "test", "service": "Priority", "carrier": "USPS", "rate": "11.01", "currency": "USD", "retail_rate": "15.40", "retail_currency": "USD", "list_rate": "11.01", "list_currency": "USD", "billing_type": "easypost", "delivery_days": 2, "delivery_date": null, "delivery_date_guaranteed": false, "est_delivery_days": 2, "shipment_id": "shp_d121498c06864586b0c9d961e971f509", "carrier_account_id": "ca_9685a1198a75477885a3cdca37559bac" } ``` --- [Content omitted: carrier services and predefined packages rendered dynamically. Review the rendered documentation for complete service level and package details.] --- ## Retrieve Rates for a Shipment ### Example: POST /beta/rates #### cURL ```shell $ curl -X POST https://api.easypost.com/beta/rates \ -u "EASYPOST_API_KEY": \ -H "Content-Type: application/json" \ -d '{ "shipment": { "to_address": { "name": "Dr. Steve Brule", "street1": "179 N Harbor Dr", "city": "Redondo Beach", "state": "CA", "zip": "90277", "country": "US", "phone": "8573875756", "email": "dr_steve_brule@gmail.com" }, "from_address": { "name": "EasyPost", "street1": "417 Montgomery Street", "street2": "5th Floor", "city": "San Francisco", "state": "CA", "zip": "94104", "country": "US", "phone": "4153334445", "email": "support@easypost.com" }, "parcel": { "length": "20.2", "width": "10.9", "height": "5", "weight": "65.0" } } }' ``` #### Go ```go package example import ( "fmt" "github.com/EasyPost/easypost-go/v6" ) func retrieveStateless() { client := easypost.New("EASYPOST_API_KEY") shipmentDetails := &easypost.Shipment{ ToAddress: &easypost.Address{ Name: "Dr. Steve Brule", Street1: "179 N Harbor Dr", City: "Redondo Beach", State: "CA", Zip: "90277", Country: "US", Phone: "4155559999", Email: "dr_steve_brule@gmail.com", }, FromAddress: &easypost.Address{ Name: "EasyPost", Street1: "417 Montgomery Street", Street2: "5th Floor", City: "San Francisco", State: "CA", Zip: "90277", Country: "US", Phone: "4155559999", Email: "support@easypost.com", }, Parcel: &easypost.Parcel{ Length: 20.2, Width: 10.9, Height: 5, Weight: 65.9, }, } response, _ := client.BetaGetStatelessRates(shipmentDetails) fmt.Println(response.Rates) } ``` #### Java ```java package rates; import java.util.HashMap; import java.util.List; import com.easypost.exception.EasyPostException; import com.easypost.model.StatelessRate; import com.easypost.service.EasyPostClient; public class Retrieve { public static void main(String[] args) throws EasyPostException { EasyPostClient client = new EasyPostClient("EASYPOST_API_KEY"); HashMap toAddressMap = new HashMap(); toAddressMap.put("name", "Dr. Steve Brule"); toAddressMap.put("street1", "179 N Harbor Dr"); toAddressMap.put("city", "Redondo Beach"); toAddressMap.put("state", "CA"); toAddressMap.put("country", "US"); toAddressMap.put("phone", "8573875756"); toAddressMap.put("email", "dr_steve_brule@gmail.com"); toAddressMap.put("zip", "90277"); HashMap fromAddressMap = new HashMap(); fromAddressMap.put("name", "EasyPost"); fromAddressMap.put("street1", "417 Montgomery Street"); fromAddressMap.put("street2", "5th Floor"); fromAddressMap.put("city", "San Francisco"); fromAddressMap.put("state", "CA"); fromAddressMap.put("zip", "94104"); fromAddressMap.put("country", "US"); fromAddressMap.put("phone", "4153334445"); fromAddressMap.put("email", "support@easypost.com"); HashMap parcelMap = new HashMap(); parcelMap.put("length", 20.2); parcelMap.put("width", 10.9); parcelMap.put("height", 5); parcelMap.put("weight", 65.9); HashMap shipmentDetails = new HashMap(); shipmentDetails.put("to_address", toAddressMap); shipmentDetails.put("from_address", fromAddressMap); shipmentDetails.put("parcel", parcelMap); List rates = client.betaRate.retrieveStatelessRates(shipmentDetails); System.out.println(rates); } } ``` #### C# ```csharp using System; using System.Collections.Generic; using System.Threading.Tasks; using EasyPost; using Newtonsoft.Json; namespace EasyPostExamples { public class Examples { public static async Task Main() { var client = new EasyPost.Client(new EasyPost.ClientConfiguration("EASYPOST_API_KEY")); EasyPost.Parameters.Beta.Rate.Retrieve shipmentDetails = new() { ToAddress = new EasyPost.Parameters.Address.Create { Name = "Dr. Steve Brule", Street1 = "179 N Harbor Dr", City = "Redondo Beach", State = "CA", Zip = "90277", Country = "US", Phone = "8573875756", Email = "dr_steve_brule@gmail.com" }, FromAddress = new EasyPost.Parameters.Address.Create { Name = "EasyPost", Street1 = "417 Montgomery Street", Street2 = "5th Floor", City = "San Francisco", State = "CA", Zip = "94104", Country = "US", Phone = "4153334445", Email = "support@easypost.com", }, Parcel = new EasyPost.Parameters.Parcel.Create { Length = 20.2, Width = 10.9, Height = 5, Weight = 65.9 } }; List rates = await client.Beta.Rate.RetrieveStatelessRates(shipmentDetails); Console.WriteLine(JsonConvert.SerializeObject(rates, Formatting.Indented)); } } } ``` #### Node.js ```javascript const EasyPostClient = require('@easypost/api'); const client = new EasyPostClient('EASYPOST_API_KEY'); (async () => { const shipmentDetails = { to_address: { name: 'Dr. Steve Brule', street1: '179 N Harbor Dr', city: 'Redondo Beach', state: 'CA', zip: '90277', country: 'US', email: 'dr_steve_brule@gmail.com', phone: '4155559999', }, from_address: { street1: '417 montgomery street', street2: 'FL 5', city: 'San Francisco', state: 'CA', zip: '94104', country: 'US', company: 'EasyPost', phone: '415-123-4567', }, parcel: { length: 20.2, width: 10.9, height: 5, weight: 65.9, }, }; const { rates } = await client.BetaRate.retrieveStatelessRates(shipmentDetails); console.log(rates); })(); ``` #### PHP ```php [ 'name' => 'Dr. Steve Brule', 'street1' => '179 N Harbor Dr', 'city' => 'Redondo Beach', 'state' => 'CA', 'zip' => '90277', 'country' => 'US', 'phone' => '3331114444', 'email' => 'dr_steve_brule@gmail.com' ], 'from_address' => [ 'name' => 'EasyPost', 'street1' => '417 Montgomery Street', 'street2' => '5th Floor', 'city' => 'San Francisco', 'state' => 'CA', 'zip' => '94104', 'country' => 'US', 'phone' => '3331114444', 'email' => 'support@easypost.com' ], 'parcel' => [ 'length' => 20.2, 'width' => 10.9, 'height' => 5, 'weight' => 65.9 ] ]; $rates = $client->betaRate->retrieveStatelessRates($shipmentDetails); echo $rates; ``` #### Python ```python import easypost client = easypost.EasyPostClient("EASYPOST_API_KEY") shipment_details = { "to_address": { "name": "Dr. Steve Brule", "street1": "179 N Harbor Dr", "city": "Redondo Beach", "state": "CA", "zip": "90277", "country": "US", "phone": "4153334444", "email": "dr_steve_brule@gmail.com", }, "from_address": { "name": "EasyPost", "street1": "417 Montgomery Street", "street2": "5th Floor", "city": "San Francisco", "state": "CA", "zip": "94104", "country": "US", "phone": "4153334444", "email": "support@easypost.com", }, "parcel": { "length": 20.2, "width": 10.9, "height": 5, "weight": 65.9, }, } rates = client.beta_rate.retrieve_stateless_rates(**shipment_details) print(rates) ``` #### Ruby ```ruby require 'easypost' client = EasyPost::Client.new(api_key: 'EASYPOST_API_KEY') shipment_details = { to_address: { name: 'Dr. Steve Brule', street1: '179 N Harbor Dr', city: 'Redondo Beach', state: 'CA', zip: '90277', country: 'US', phone: '4155559999', email: 'dr_steve_brule@gmail.com', }, from_address: { name: 'EasyPost', street1: '417 Montgomery Street', street2: '5th Floor', city: 'San Francisco', state: 'CA', zip: '94104', country: 'US', phone: '4153334445', email: 'support@easypost.com', }, parcel: { length: 20.2, width: 10.9, height: 5, weight: 65.9, }, } rates = client.beta_rate.retrieve_stateless_rates(shipment_details) puts rates ``` **BETA:** This feature is in Beta and subject to change. For feedback or questions, Contact Support. You can retrieve `Rates` without creating a `Shipment` object using this endpoint. This endpoint is ideal when wanting to display or compare rates without creating `Shipment` objects. The `Rate` objects returned by this endpoint do not include IDs. --- ## Regenerate Rates for a Shipment ### Example: POST /shipments/:id/rerate #### cURL ```shell curl -X POST https://api.easypost.com/v2/shipments/shp_.../rerate \ -u "EASYPOST_API_KEY": ``` #### Go ```go package example import ( "fmt" "github.com/EasyPost/easypost-go/v6" ) func regenerate() { client := easypost.New("EASYPOST_API_KEY") shipment, _ := client.RerateShipment("shp_...") fmt.Println(shipment) } ``` #### Java ```java package shipments; import com.easypost.exception.EasyPostException; import com.easypost.model.Shipment; import com.easypost.service.EasyPostClient; public class Regenerate { public static void main(String[] args) throws EasyPostException { EasyPostClient client = new EasyPostClient("EASYPOST_API_KEY"); Shipment shipment = client.shipment.newRates("shp_..."); System.out.println(shipment); } } ``` #### C# ```csharp using System; using System.Collections.Generic; using System.Threading.Tasks; using EasyPost; using Newtonsoft.Json; namespace EasyPostExamples { public class Examples { public static async Task Main() { var client = new EasyPost.Client(new EasyPost.ClientConfiguration("EASYPOST_API_KEY")); EasyPost.Models.API.Shipment shipment = await client.Shipment.RegenerateRates("shp_..."); Console.WriteLine(JsonConvert.SerializeObject(shipment, Formatting.Indented)); } } } ``` #### Node.js ```javascript const EasyPostClient = require('@easypost/api'); const client = new EasyPostClient('EASYPOST_API_KEY'); (async () => { const rates = await client.Shipment.regenerateRates('shp_...'); console.log(rates); })(); ``` #### PHP ```php shipment->regenerateRates('shp_...'); echo $shipment; ``` #### Python ```python import easypost client = easypost.EasyPostClient("EASYPOST_API_KEY") shipment = client.shipment.regenerate_rates("shp_...") print(shipment) ``` #### Ruby ```ruby require 'easypost' client = EasyPost::Client.new(api_key: 'EASYPOST_API_KEY') shipment = client.shipment.regenerate_rates('shp_...') puts shipment ``` You can regenerate the `Rates` of a `Shipment` at any time. This is ideal when shipments aren't bought the same day as they were created and you want the most up-to-date rates available. This operation respects the `carrier_accounts` attribute. --- Source: https://docs.easypost.com/docs/shipments/returns # Return If you are shipping merchandise or other frequently-returned products, you may wish to generate return labels to include with your shipment, for you customer's convenience. EasyPost offers a simple way to submit the same parameters as your initial shipment, but with an additional flag set, that will generate you a return label to receive any return shipments at your original from address. It's important for some carriers, with different return billing, to specify a return label even if it's not a return label for an earlier `Shipment`. If doing more than 10,000 USPS returns in a year, please contact EasyPost for the USPS scan-based return program, which we also offer. --- ## Create Return for a Shipment ### Example: POST /shipments #### cURL ```shell curl -X POST https://api.easypost.com/v2/shipments \ -u "EASYPOST_API_KEY": \ -H 'Content-Type: application/json' \ -d '{ "shipment": { "to_address": { "name": "Dr. Steve Brule", "street1": "179 N Harbor Dr", "city": "Redondo Beach", "state": "CA", "zip": "90277", "country": "US", "phone": "8573875756", "email": "dr_steve_brule@gmail.com" }, "from_address": { "name": "EasyPost", "street1": "417 Montgomery Street", "street2": "5th Floor", "city": "San Francisco", "state": "CA", "zip": "94104", "country": "US", "phone": "4153334445", "email": "support@easypost.com" }, "parcel": { "length": "20.2", "width": "10.9", "height": "5", "weight": "65.9" }, "is_return": true } }' ``` #### Go ```go package example import ( "fmt" "github.com/EasyPost/easypost-go/v6" ) func create() { client := easypost.New("EASYPOST_API_KEY") toAddress, _ := client.GetAddress("adr_...") fromAddress, _ := client.GetAddress("adr_...") parcel, _ := client.GetParcel("prcl_...") shipment, _ := client.CreateShipment( &easypost.Shipment{ ToAddress: fromAddress, FromAddress: toAddress, Parcel: parcel, IsReturn: true, }, ) fmt.Println(shipment) } ``` #### Java ```java package shipments; import com.easypost.exception.EasyPostException; import com.easypost.model.Shipment; import com.easypost.service.EasyPostClient; import java.util.HashMap; public class Create { public static void main(String[] args) throws EasyPostException { EasyPostClient client = new EasyPostClient("EASYPOST_API_KEY"); HashMap toAddressMap = new HashMap(); toAddressMap.put("name", "Dr. Steve Brule"); toAddressMap.put("street1", "179 N Harbor Dr"); toAddressMap.put("city", "Redondo Beach"); toAddressMap.put("state", "CA"); toAddressMap.put("country", "US"); toAddressMap.put("phone", "8573875756"); toAddressMap.put("email", "dr_steve_brule@gmail.com"); toAddressMap.put("zip", "90277"); HashMap fromAddressMap = new HashMap(); fromAddressMap.put("name", "EasyPost"); fromAddressMap.put("street1", "417 Montgomery Street"); fromAddressMap.put("street2", "5th Floor"); fromAddressMap.put("city", "San Francisco"); fromAddressMap.put("state", "CA"); fromAddressMap.put("zip", "94104"); fromAddressMap.put("country", "US"); fromAddressMap.put("phone", "4153334445"); fromAddressMap.put("email", "support@easypost.com"); HashMap parcelMap = new HashMap(); parcelMap.put("length", 20.2); parcelMap.put("width", 10.9); parcelMap.put("height", 5); parcelMap.put("weight", 65.9); HashMap params = new HashMap(); params.put("to_address", toAddressMap); params.put("from_address", fromAddressMap); params.put("parcel", parcelMap); params.put("is_return", "true"); Shipment shipment = client.shipment.create(params); System.out.println(shipment); } } ``` #### C# ```csharp using System; using System.Collections.Generic; using System.Threading.Tasks; using EasyPost; using Newtonsoft.Json; namespace EasyPostExamples { public class Examples { public static async Task Main() { var client = new EasyPost.Client(new EasyPost.ClientConfiguration("EASYPOST_API_KEY")); EasyPost.Parameters.Shipment.Create parameters = new() { ToAddress = new EasyPost.Parameters.Address.Create { Name = "Dr. Steve Brule", Street1 = "417 Montgomery Street", Street2 = "5th Floor", City = "San Francisco", State = "CA", Country = "US", Zip = "94104" }, FromAddress = new EasyPost.Parameters.Address.Create { Company = "EasyPost", Street1 = "417 Montgomery Street", Street2 = "Floor 5", City = "San Francisco", State = "CA", Country = "US", Zip = "94104" }, Parcel = new EasyPost.Parameters.Parcel.Create { Length = 8, Width = 6, Height = 5, Weight = 10 }, IsReturn = true, }; EasyPost.Models.API.Shipment shipment = await client.Shipment.Create(parameters); Console.WriteLine(JsonConvert.SerializeObject(shipment, Formatting.Indented)); } } } ``` #### Node.js ```javascript const EasyPostClient = require('@easypost/api'); const client = new EasyPostClient('EASYPOST_API_KEY'); (async () => { const shipment = await client.Shipment.create({ parcel: { id: 'prcl_...' }, to_address: { id: 'adr_...' }, from_address: { id: 'adr_...' }, is_return: true, }); console.log(shipment); })(); ``` #### PHP ```php shipment->create([ 'to_address' => [ 'name' => 'Dr. Steve Brule', 'street1' => '179 N Harbor Dr', 'city' => 'Redondo Beach', 'state' => 'CA', 'zip' => '90277', 'country' => 'US', 'phone' => '3331114444', 'email' => 'dr_steve_brule@gmail.com' ], 'from_address' => [ 'name' => 'EasyPost', 'street1' => '417 Montgomery Street', 'street2' => '5th Floor', 'city' => 'San Francisco', 'state' => 'CA', 'zip' => '94104', 'country' => 'US', 'phone' => '3331114444', 'email' => 'support@easypost.com' ], 'parcel' => [ 'length' => 20.2, 'width' => 10.9, 'height' => 5, 'weight' => 65.9 ], 'is_return' => true ]); echo $shipment; ``` #### Python ```python import easypost client = easypost.EasyPostClient("EASYPOST_API_KEY") shipment = client.shipment.create( to_address={"id": "adr_..."}, from_address={"id": "adr_..."}, parcel={"id": "prcl_..."}, is_return=True, ) print(shipment) ``` #### Ruby ```ruby require 'easypost' client = EasyPost::Client.new(api_key: 'EASYPOST_API_KEY') shipment = client.shipment.create( to_address: { name: 'Dr. Steve Brule', street1: '179 N Harbor Dr', city: 'Redondo Beach', state: 'CA', zip: '90277', country: 'US', phone: '8573875756', email: 'dr_steve_brule@gmail.com', }, from_address: { name: 'EasyPost', street1: '417 Montgomery Street', street2: '5th Floor', city: 'San Francisco', state: 'CA', zip: '94104', country: 'US', phone: '4153334445', email: 'support@easypost.com', }, parcel: { length: 20.2, width: 10.9, height: 5, weight: 65.9, }, is_return: true, ) puts shipment ``` You can easily create return labels. All you need to do is set the `is_return` parameter to `true`, leave the addresses the same as the initial `Shipment`'s creation request and we switch the `to_address` and `from_address` for the return `Shipment`. `shipment.is_return` is used for return-label creation and carrier return handling. If you need to classify a standalone tracker as a return (without creating a `Shipment`), use `tracker.options.is_return` in `POST /trackers`. --- Source: https://docs.easypost.com/docs/shipments/shipping-insurance # Shipping Insurance Shipping insurance can be purchased for any `Shipment` by specifying the value of the shipment's contents. The cost is 1.0% of the declared value, with a minimum charge of $1.00. All claims are processed and paid within 10 days. To obtain insurance, first `Buy a Shipment`, then make the insurance call before the carrier begins handling the package. --- ## Insure a Shipment ### Example: POST /shipments/:id/insure #### cURL ```shell curl -X POST https://api.easypost.com/v2/shipments/shp_.../insure \ -u "EASYPOST_API_KEY": \ -H 'Content-Type: application/json' \ -d '{ "amount": "200" }' ``` #### Go ```go package example import ( "fmt" "github.com/EasyPost/easypost-go/v6" ) func insure() { client := easypost.New("EASYPOST_API_KEY") shipment, _ := client.InsureShipment("shp_...", "100.00") fmt.Println(shipment) } ``` #### Java ```java package shipments; import com.easypost.exception.EasyPostException; import com.easypost.model.Shipment; import com.easypost.service.EasyPostClient; import java.util.HashMap; public class Insure { public static void main(String[] args) throws EasyPostException { EasyPostClient client = new EasyPostClient("EASYPOST_API_KEY"); HashMap params = new HashMap(); params.put("amount", 100); Shipment shipment = client.shipment.insure("shp_...", params); System.out.println(shipment); } } ``` #### C# ```csharp using System; using System.Collections.Generic; using System.Threading.Tasks; using EasyPost; using Newtonsoft.Json; namespace EasyPostExamples { public class Examples { public static async Task Main() { var client = new EasyPost.Client(new EasyPost.ClientConfiguration("EASYPOST_API_KEY")); EasyPost.Models.API.Shipment shipment = await client.Shipment.Insure("shp_...", 200); Console.WriteLine(JsonConvert.SerializeObject(shipment, Formatting.Indented)); } } } ``` #### Node.js ```javascript const EasyPostClient = require('@easypost/api'); const client = new EasyPostClient('EASYPOST_API_KEY'); (async () => { const shipment = await client.Shipment.insure('shp_...', 100); console.log(shipment); })(); ``` #### PHP ```php shipment->insure( 'shp_...', ['amount' => 100] ); echo $shipment; ``` #### Python ```python import easypost client = easypost.EasyPostClient("EASYPOST_API_KEY") shipment = client.shipment.insure("shp_...", amount=100) print(shipment) ``` #### Ruby ```ruby require 'easypost' client = EasyPost::Client.new(api_key: 'EASYPOST_API_KEY') shipment = client.shipment.insure('shp_...', amount: 100) puts shipment ``` --- Source: https://docs.easypost.com/docs/shipments/shipping-refund # Shipping Refund USPS shipping labels can be refunded if requested within 30 days of generation. The processing time is at least 15 days, after which the funds will return to your EasyPost balance. EasyPost fees will also be refunded. To qualify, a shipment must not have been scanned by the USPS. UPS and FedEx shipping labels may be refunded within 90 days of creation. --- ## Refund a Shipment ### Example: POST /shipments/:id/refund #### cURL ```shell curl -X POST https://api.easypost.com/v2/shipments/shp_.../refund \ -u "EASYPOST_API_KEY": ``` #### Go ```go package example import ( "fmt" "github.com/EasyPost/easypost-go/v6" ) func refund() { client := easypost.New("EASYPOST_API_KEY") shipment, _ := client.RefundShipment("shp_...") fmt.Println(shipment) } ``` #### Java ```java package shipments; import com.easypost.exception.EasyPostException; import com.easypost.model.Shipment; import com.easypost.service.EasyPostClient; public class Create { public static void main(String[] args) throws EasyPostException { EasyPostClient client = new EasyPostClient("EASYPOST_API_KEY"); Shipment shipment = client.shipment.refund("shp_..."); System.out.println(shipment); } } ``` #### C# ```csharp using System; using System.Collections.Generic; using System.Threading.Tasks; using EasyPost; using Newtonsoft.Json; namespace EasyPostExamples { public class Examples { public static async Task Main() { var client = new EasyPost.Client(new EasyPost.ClientConfiguration("EASYPOST_API_KEY")); EasyPost.Models.API.Shipment shipment = await client.Shipment.Refund("shp_..."); Console.WriteLine(JsonConvert.SerializeObject(shipment, Formatting.Indented)); } } } ``` #### Node.js ```javascript const EasyPostClient = require('@easypost/api'); const client = new EasyPostClient('EASYPOST_API_KEY'); (async () => { const shipment = await client.Shipment.refund('shp_...'); console.log(shipment); })(); ``` #### PHP ```php shipment->refund('shp_...'); echo $shipment; ``` #### Python ```python import easypost client = easypost.EasyPostClient("EASYPOST_API_KEY") shipment = client.shipment.refund("shp_...") print(shipment) ``` #### Ruby ```ruby require 'easypost' client = EasyPost::Client.new(api_key: 'EASYPOST_API_KEY') shipment = client.shipment.refund('shp_...') puts shipment ``` Refunding a `Shipment` is available for many carriers supported by EasyPost. Once the refund has been submitted, `refund_status` attribute of the `Shipment` will be populated with one of the possible values:
  • "submitted"
  • "refunded"
  • "rejected"
  • "not_applicable"
The most common initial status is "submitted". Many carriers require that the refund be processed before the `refund_status` will move to "refunded". The length of this process depends on the carrier, but no greater than 30 days. --- Source: https://docs.easypost.com/docs/shipments/shipping-smartrate # Shipping SmartRate The Shipping SmartRate API provides shippers with highly accurate, shipment-level transit time predictions that can save money, improve on-time delivery, and provide end customers with reliable delivery estimates. > Note: The SmartRate API is currently available exclusively for US domestic shipments. --- ## Shipping SmartRate ### Example: GET /shipments/:id/smartrate #### cURL ```shell curl -X GET https://api.easypost.com/v2/shipments/shp_.../smartrate \ -u "EASYPOST_API_KEY": ``` #### Go ```go package example import ( "fmt" "github.com/EasyPost/easypost-go/v6" ) func retrieveTimeInTransitStatistics() { client := easypost.New("EASYPOST_API_KEY") smartRates, _ := client.GetShipmentSmartrates("shp_...") fmt.Println(smartRates) } ``` #### Java ```java package shipments; import com.easypost.exception.EasyPostException; import com.easypost.model.SmartRate; import com.easypost.service.EasyPostClient; import java.util.List; public class RetrieveTimeInTransitStatistics { public static void main(String[] args) throws EasyPostException { EasyPostClient client = new EasyPostClient("EASYPOST_API_KEY"); List smartrates = client.shipment.smartRates("shp_..."); System.out.println(smartrates); } } ``` #### C# ```csharp using System; using System.Collections.Generic; using System.Threading.Tasks; using EasyPost; using Newtonsoft.Json; namespace EasyPostExamples { public class Examples { public static async Task Main() { var client = new EasyPost.Client(new EasyPost.ClientConfiguration("EASYPOST_API_KEY")); List smartRates = await client.Shipment.GetSmartRates("shp_..."); Console.WriteLine(JsonConvert.SerializeObject(smartRates, Formatting.Indented)); } } } ``` #### Node.js ```javascript const EasyPostClient = require('@easypost/api'); const client = new EasyPostClient('EASYPOST_API_KEY'); (async () => { const smartRates = await client.Shipment.getSmartRates('shp_...'); console.log(smartRates); })(); ``` #### PHP ```php shipment->getSmartrates('shp_...'); echo $smartRates; ``` #### Python ```python import easypost client = easypost.EasyPostClient("EASYPOST_API_KEY") smart_rates = client.shipment.get_smart_rates("shp_...") print(smart_rates) ``` #### Ruby ```ruby require 'easypost' client = EasyPost::Client.new(api_key: 'EASYPOST_API_KEY') shipment = client.shipment.get_smart_rates('shp_...') puts shipment ``` The **/smartrate** endpoint accepts a `Shipment ID` and returns a `time_in_transit object` that includes transit business days across various percentiles for every `Rate` associated with a given `Shipment`. Transit business days are calculated as the number of business days (Monday-Friday) from when the carrier first acknowledges possession of the shipment to the initial out-for-delivery attempt. `Create a Shipment`. Based on the shipping schedule or delivery requirements, choose the appropriate SmartRate endpoint and call it by passing the **shipment_id**. Use the response to select the most appropriate rate for the shipment. --- ## TimeInTransit object | Property | Type | Description | |----------|------|-------------| | percentile_50 | integer | Expected transit days at the 50th percentile | | percentile_75 | integer | Expected transit days at the 75th percentile | | percentile_85 | integer | Expected transit days at the 85th percentile | | percentile_90 | integer | Expected transit days at the 90th percentile | | percentile_95 | integer | Expected transit days at the 95th percentile | | percentile_97 | integer | Expected transit days at the 97th percentile | | percentile_99 | integer | Expected transit days at the 99th percentile | Example Object: ```json { "percentile_50": 2, "percentile_75": 2, "percentile_85": 3, "percentile_90": 3, "percentile_95": 4, "percentile_97": 5, "percentile_99": 8 } ``` --- ## Delivery Date ### Example: GET /shipments/:id/smartrate/delivery_date #### cURL ```shell curl -X GET https://api.easypost.com/v2/shipments/shp_.../smartrate/delivery_date?planned_ship_date=yyyy-mm-dd \ -u "EASYPOST_API_KEY": ``` #### Go ```go package example import ( "fmt" "github.com/EasyPost/easypost-go/v6" ) func retrieveEstimatedDeliveryDate() { client := easypost.New("EASYPOST_API_KEY") estimatedDeliveryDates, _ := client.GetShipmentEstimatedDeliveryDate("shp_...", "YYYY-MM-DD") fmt.Println(estimatedDeliveryDates) } ``` #### Java ```java package shipments; import com.easypost.exception.EasyPostException; import com.easypost.model.Shipment; import com.easypost.model.EstimatedDeliveryDate; import com.easypost.service.EasyPostClient; import java.util.List; public class RetrieveEstimatedDeliveryDate { public static void main(String[] args) throws EasyPostException { EasyPostClient client = new EasyPostClient("EASYPOST_API_KEY"); Shipment shipment = client.shipment.retrieve("shp_..."); List estimatedDeliveryDates = client .shipmentretrieveEstimatedDeliveryDate(shipment.getId(), "YYYY-MM-DD"); System.out.println(estimatedDeliveryDates); } } ``` #### C# ```csharp using System; using System.Collections.Generic; using System.Threading.Tasks; using EasyPost; using Newtonsoft.Json; namespace EasyPostExamples { public class Examples { public static async Task Main() { var client = new EasyPost.Client(new EasyPost.ClientConfiguration("EASYPOST_API_KEY")); EasyPost.Parameters.Shipment.RetrieveEstimatedDeliveryDate parameters = new() { PlannedShipDate = "2021-01-01", }; List rates = await client.Shipment.RetrieveEstimatedDeliveryDate("shp_...", parameters); Console.WriteLine(JsonConvert.SerializeObject(rates, Formatting.Indented)); } } } ``` #### Node.js ```javascript const EasyPostClient = require('@easypost/api'); const client = new EasyPostClient('EASYPOST_API_KEY'); (async () => { const estimatedDeliveryDates = await client.Shipment.retrieveEstimatedDeliveryDate( 'shp_...', 'YYYY-MM-DD', ); console.log(estimatedDeliveryDates); })(); ``` #### PHP ```php shipment->retrieveEstimatedDeliveryDate('shp_...', 'YYYY-MM-DD'); echo $estimatedDeliveryDates; ``` #### Python ```python import easypost client = easypost.EasyPostClient("EASYPOST_API_KEY") estimated_delivery_dates = client.shipment.retrieve_estimated_delivery_date( "shp_...", planned_ship_date="YYYY-MM-DD", ) print(estimated_delivery_dates) ``` #### Ruby ```ruby require 'easypost' client = EasyPost::Client.new(api_key: 'EASYPOST_API_KEY') estimated_delivery_dates = client.shipment.retrieve_estimated_delivery_date( 'shp_...', 'YYYY-MM-DD', ) puts estimated_delivery_dates ``` The **/delivery_date** endpoint provides estimated delivery dates for shipments, helping users identify cost-effective service levels and enhance delivery timeliness. Call the **/delivery_date** endpoint by passing the **shipment_id** and the date the shipment will enter the mailstream using the **planned_ship_date** attribute. Review the returned **easypost_time_in_transit_data** object. --- ## Precision Shipping ### Example: GET /shipments/:id/smartrate/precision_shipping #### cURL ```shell curl -X GET https://api.easypost.com/v2/shipments/shp_.../smartrate/precision_shipping?desired_delivery_date=yyyy-mm-dd \ -u "EASYPOST_API_KEY": ``` #### Go ```go package example import ( "fmt" "github.com/EasyPost/easypost-go/v6" ) func retrieveRecommendShipDate() { client := easypost.New("EASYPOST_API_KEY") rates, _ := client.RecommendShipDateForShipment("shp_...", "YYYY-MM-DD") fmt.Println(rates) } ``` #### Java ```java package shipments; import com.easypost.exception.EasyPostException; import com.easypost.model.Shipment; import com.easypost.model.RecommendShipDateForShipmentResult; import com.easypost.service.EasyPostClient; import java.util.List; public class RetrieveRecommendShipDate { public static void main(String[] args) throws EasyPostException { EasyPostClient client = new EasyPostClient("EASYPOST_API_KEY"); Shipment shipment = client.shipment.retrieve("shp_..."); List rates = client.shipment .recommendShipDate(shipment.getId(), "YYYY-MM-DD"); System.out.println(rates); } } ``` #### C# ```csharp using System; using System.Collections.Generic; using System.Threading.Tasks; using EasyPost; using Newtonsoft.Json; namespace EasyPostExamples { public class Examples { public static async Task Main() { var client = new EasyPost.Client(new EasyPost.ClientConfiguration("EASYPOST_API_KEY")); EasyPost.Parameters.Shipment.RecommendShipDateForShipment parameters = new() { DesiredDeliveryDate = "2024-07-18", }; List rates = await client.Shipment.RecommendShipDate("shp_...", parameters); Console.WriteLine(JsonConvert.SerializeObject(rates, Formatting.Indented)); } } } ``` #### Node.js ```javascript const EasyPostClient = require('@easypost/api'); const client = new EasyPostClient('EASYPOST_API_KEY'); (async () => { const rates = await client.Shipment.recommendShipDate('shp_...', 'YYYY-MM-DD'); console.log(rates); })(); ``` #### PHP ```php shipment->recommendShipDate('shp_...', 'YYYY-MM-DD'); echo $rates; ``` #### Python ```python import easypost client = easypost.EasyPostClient("EASYPOST_API_KEY") estimated_delivery_dates = client.shipment.recommend_ship_date( "shp_...", desired_delivery_date="YYYY-MM-DD", ) print(estimated_delivery_dates) ``` #### Ruby ```ruby require 'easypost' client = EasyPost::Client.new(api_key: 'EASYPOST_API_KEY') rates = client.shipment.recommend_ship_date( 'shp_...', 'YYYY-MM-DD', ) puts rates ``` The **/precision_shipping** endpoint of the SmartRate API enhances shipping accuracy by allowing shippers to specify a desired delivery date. The API then suggests the best ship date for each carrier and service level to meet this delivery date. In addition to the suggested **ship_on_date**, a **delivery_date_confidence** score is provided, indicating the likelihood of delivery on the desired date. Call the **/precision_shipping** endpoint by passing the shipment_id into the API request along with the **desired_delivery_date**. Utilize the returned data to plan shipments precisely. This endpoint requires the **desired_delivery_date** parameter to generate highly accurate predictions. --- Source: https://docs.easypost.com/docs/shipments/tax-identifiers # TaxIdentifier `TaxIdentifiers` are identifying numbers or IDs that are used to charge a specific party when dealing with the importing or exporting of good across international borders. The `tax_identifiers` attribute on a `Shipment` object is a list of `TaxIdentifier` objects, which allows you to supply up to 8 Tax Identification numbers. --- ## TaxIdentifier object | Property | Type | Description | |----------|------|-------------| | entity | string | Which entity the tax ID belongs to ("SENDER" or "RECEIVER") | | tax_id | string | The actual tax ID number | | tax_id_type | string | The type of tax ID that is being used with the shipment (see possible types by carrier here) | | issuing_country | string | The issuing country of the tax ID number | Example Object: ```json { "entity": "SENDER", "tax_id": "HIDDEN", "tax_id_type": "EORI", "issuing_country": "GB" } ``` --- ## Create Shipment with TaxIdentifiers ### Example: Create Shipment with TaxIdentifiers #### cURL ```shell curl -X POST https://api.easypost.com/v2/shipments \ -u "EASYPOST_API_KEY": \ -H 'Content-Type: application/json' \ -d '{ "shipment": { "to_address": { "name": "Dr. Steve Brule", "street1": "179 N Harbor Dr", "city": "Redondo Beach", "state": "CA", "zip": "90277", "country": "US", "phone": "8573875756", "email": "dr_steve_brule@gmail.com" }, "from_address": { "name": "EasyPost", "street1": "417 Montgomery Street", "street2": "5th Floor", "city": "San Francisco", "state": "CA", "zip": "94104", "country": "US", "phone": "4153334445", "email": "support@easypost.com" }, "parcel": { "length": "20.2", "width": "10.9", "height": "5", "weight": "65.9" }, "customs_info": { "id": "cstinfo_..." }, "tax_identifiers": [ { "entity": "SENDER", "tax_id": "GB123456789", "tax_id_type": "EORI", "issuing_country": "GB" } ] } }' ``` #### Go ```go package example import ( "fmt" "github.com/EasyPost/easypost-go/v6" ) func create() { client := easypost.New("EASYPOST_API_KEY") toAddress, _ := client.GetAddress("adr_...") fromAddress, _ := client.GetAddress("adr_...") parcel, _ := client.GetParcel("prcl_...") shipment, _ := client.CreateShipment( &easypost.Shipment{ ToAddress: toAddress, FromAddress: fromAddress, Parcel: parcel, TaxIdentifiers: []*easypost.TaxIdentifier{ &easypost.TaxIdentifier{ Entity: "SENDER", TaxID: "GB123456789", IssuingCountry: "GB", TaxIDType: "EORI", }, }, }, ) fmt.Println(shipment) } ``` #### Java ```java package shipments; import com.easypost.exception.EasyPostException; import com.easypost.model.Shipment; import com.easypost.service.EasyPostClient; import java.util.HashMap; public class Create { public static void main(String[] args) throws EasyPostException { EasyPostClient client = new EasyPostClient("EASYPOST_API_KEY"); HashMap toAddressMap = new HashMap(); toAddressMap.put("name", "Dr. Steve Brule"); toAddressMap.put("street1", "179 N Harbor Dr"); toAddressMap.put("city", "Redondo Beach"); toAddressMap.put("state", "CA"); toAddressMap.put("country", "US"); toAddressMap.put("phone", "8573875756"); toAddressMap.put("email", "dr_steve_brule@gmail.com"); toAddressMap.put("zip", "90277"); HashMap fromAddressMap = new HashMap(); fromAddressMap.put("name", "EasyPost"); fromAddressMap.put("street1", "417 Montgomery Street"); fromAddressMap.put("street2", "5th Floor"); fromAddressMap.put("city", "San Francisco"); fromAddressMap.put("state", "CA"); fromAddressMap.put("zip", "94104"); fromAddressMap.put("country", "US"); fromAddressMap.put("phone", "4153334445"); fromAddressMap.put("email", "support@easypost.com"); HashMap parcelMap = new HashMap(); parcelMap.put("length", 20.2); parcelMap.put("width", 10.9); parcelMap.put("height", 5); parcelMap.put("weight", 65.9); HashMap customsInfoMap = new HashMap(); customsInfoMap.put("id", "cstinfo_..."); HashMap taxIdentifiersMap = new HashMap(); taxIdentifiersMap.put("entity", "SENDER"); taxIdentifiersMap.put("tax_id", "GB123456789"); taxIdentifiersMap.put("tax_id_type", "EORI"); taxIdentifiersMap.put("issuing_country", "GB"); HashMap params = new HashMap(); params.put("to_address", toAddressMap); params.put("from_address", fromAddressMap); params.put("parcel", parcelMap); params.put("customs_info", customsInfoMap); params.put("tax_identifiers", taxIdentifiersMap); Shipment shipment = client.shipment.create(params); System.out.println(shipment); } } ``` #### C# ```csharp using System; using System.Collections.Generic; using System.Threading.Tasks; using EasyPost; using Newtonsoft.Json; namespace EasyPostExamples { public class Examples { public static async Task Main() { var client = new EasyPost.Client(new EasyPost.ClientConfiguration("EASYPOST_API_KEY")); EasyPost.Parameters.Shipment.Create parameters = new() { ToAddress = new EasyPost.Parameters.Address.Create { Name = "Dr. Steve Brule", Street1 = "417 Montgomery Street", Street2 = "5th Floor", City = "San Francisco", State = "CA", Country = "US", Zip = "94104" }, FromAddress = new EasyPost.Parameters.Address.Create { Company = "EasyPost", Street1 = "417 Montgomery Street", Street2 = "Floor 5", City = "San Francisco", State = "CA", Country = "US", Zip = "94104" }, Parcel = new EasyPost.Parameters.Parcel.Create { Length = 8, Width = 6, Height = 5, Weight = 10 }, CustomsInfo = new EasyPost.Parameters.CustomsInfo.Create { // ... }, TaxIdentifiers = new List { new() { Entity = "SENDER", TaxId = "GB123456789", TaxIdType = "EORI", IssuingCountry = "GB" } } }; EasyPost.Models.API.Shipment shipment = await client.Shipment.Create(parameters); Console.WriteLine(JsonConvert.SerializeObject(shipment, Formatting.Indented)); } } } ``` #### Node.js ```javascript const EasyPostClient = require('@easypost/api'); const client = new EasyPostClient('EASYPOST_API_KEY'); (async () => { const shipment = await client.Shipment.create({ parcel: { length: 20.2, width: 10.9, height: 5, weight: 65.9, }, to_address: { name: 'Dr. Steve Brule', street1: '179 N Harbor Dr', city: 'Redondo Beach', state: 'CA', zip: '90277', country: 'US', email: 'dr_steve_brule@gmail.com', phone: '4155559999', }, from_address: { street1: '417 montgomery street', street2: 'FL 5', city: 'San Francisco', state: 'CA', zip: '94104', country: 'US', company: 'EasyPost', phone: '415-123-4567', }, customs_info: { id: 'cstinfo_...', }, tax_identifiers: [ { entity: 'SENDER', tax_id: 'GB123456789', tax_id_type: 'IOSS', issuing_country: 'GB', }, ], }); console.log(shipment); })(); ``` #### PHP ```php shipment->create([ 'to_address' => [ 'name' => 'Dr. Steve Brule', 'street1' => '179 N Harbor Dr', 'city' => 'Redondo Beach', 'state' => 'CA', 'zip' => '90277', 'country' => 'US', 'phone' => '3331114444', 'email' => 'dr_steve_brule@gmail.com' ], 'from_address' => [ 'name' => 'EasyPost', 'street1' => '417 Montgomery Street', 'street2' => '5th Floor', 'city' => 'San Francisco', 'state' => 'CA', 'zip' => '94104', 'country' => 'US', 'phone' => '3331114444', 'email' => 'support@easypost.com' ], 'parcel' => [ 'length' => 20.2, 'width' => 10.9, 'height' => 5, 'weight' => 65.9 ], 'customs_info' => ['id' => 'cstinfo_...'], 'tax_identifiers' => [[ 'entity' => 'SENDER', 'tax_id' => 'GB123456789', 'tax_id_type' => 'IOSS', 'issuing_country' => 'GB', ]] ]); echo $shipment; ``` #### Python ```python import easypost client = easypost.EasyPostClient("EASYPOST_API_KEY") shipment = client.shipment.create( to_address={ "name": "Dr. Steve Brule", "street1": "179 N Harbor Dr", "city": "Redondo Beach", "state": "CA", "zip": "90277", "country": "US", "phone": "4153334444", "email": "dr_steve_brule@gmail.com", }, from_address={ "name": "EasyPost", "street1": "417 Montgomery Street", "street2": "5th Floor", "city": "San Francisco", "state": "CA", "zip": "94104", "country": "US", "phone": "4153334444", "email": "support@easypost.com", }, parcel={ "length": 20.2, "width": 10.9, "height": 5, "weight": 65.9, }, customs_info={"id": "cstinfo_..."}, tax_identifiers=[ { "entity": "SENDER", "tax_id": "GB123456789", "tax_id_type": "IOSS", "issuing_country": "GB", } ], ) print(shipment) ``` #### Ruby ```ruby require 'easypost' client = EasyPost::Client.new(api_key: 'EASYPOST_API_KEY') shipment = client.shipment.create( to_address: { name: 'Dr. Steve Brule', street1: '179 N Harbor Dr', city: 'Redondo Beach', state: 'CA', zip: '90277', country: 'US', phone: '8573875756', email: 'dr_steve_brule@gmail.com', }, from_address: { name: 'EasyPost', street1: '417 Montgomery Street', street2: '5th Floor', city: 'San Francisco', state: 'CA', zip: '94104', country: 'US', phone: '4153334445', email: 'support@easypost.com', }, parcel: { length: 20.2, width: 10.9, height: 5, weight: 65.9, }, customs_info: { id: 'cstinfo_...', }, tax_identifiers: [ { entity: 'SENDER', tax_id: 'GB123456789', tax_id_type: 'EORI', issuing_country: 'GB', }, ], ) puts shipment ``` --- Source: https://docs.easypost.com/docs/shipments # Shipment The workhorse of the EasyPost API, a `Shipment` is made up of a "to" and "from" `Address`, the `Parcel` being shipped, and any `Forms` required for international deliveries. Once created, a `Shipment` object is used to retrieve shipping `Rates` and purchase a label. A `Shipment` created with a valid `to_address`, `from_address`, and `parcel` will automatically populate its `rates` attribute. --- ## Shipment object | Property | Type | Description | |----------|------|-------------| | id | string | Unique, begins with "shp_" | | object | string | "Shipment" | | mode | string | "test" or "production" | | to_address | Address | The destination address | | from_address | Address | The origin address | | return_address | Address | The shipper's address, defaults to from_address | | buyer_address | Address | The buyer's address, defaults to to_address | | parcel | Parcel | The dimensions and weight of the package | | line_items | array | Product value for USPS Claims. Send this when integrating claims. These values are not passed to the carrier, are not returned in the response, and are not used for anything except claims. If the shipment already has CustomsInfo item values for a customs form, those amounts are used and you do not also send line_items. Each item must include: total_line_value (string): Total declared value for the item in USD. item_description (string): Description of the shipped item. | | customs_info | CustomsInfo | Information for the processing of customs. When this object is already on the shipment, nested CustomsItem value amounts can also supply product value for USPS Claims. New claims integrations should send line_items. | | tax_identifiers | TaxIdentifier array | Optional tax identifier records for international shipments, such as VAT, IOSS, or EORI references. | | scan_form | ScanForm | Document created to manifest and scan multiple shipments | | forms | Form array | All associated Form objects | | insurance | string | The associated insurance amount | | rates | Rate array | All associated Rate objects | | selected_rate | Rate | The specific rate purchased for the shipment, or null if unpurchased or purchased through another mechanism | | postage_label | PostageLabel | The associated PostageLabel object | | messages | Message array | Any carrier errors encountered during rating. Discussed in more depth below. | | options | Options | All of the options passed to the shipment, discussed in more depth below | | is_return | boolean | Set true to create as a return. Discussed in more depth below. | | tracking_code | string | If purchased, the tracking code will appear here as well as within the Tracker object. | | usps_zone | integer | The USPS zone of the shipment, if purchased with USPS | | status | string | The current status of the shipment. Possible values: "unknown" "pre_transit" "in_transit" "out_for_delivery" "delivered" "available_for_pickup" "return_to_sender" "failure" "cancelled" "error" | | tracker | Tracker | The associated Tracker object | | fees | Fee array | The associated Fee objects charged to the billing user account | | refund_status | string | The current status of the shipment refund process. Possible values: "submitted" "refunded" "rejected" | | batch_id | string | The ID of the Batch that contains this shipment, if any | | batch_status | string | The current status of the associated BatchShipment | | batch_message | string | The current message of the associated BatchShipment | | created_at | datetime | When the Shipment was created | | updated_at | datetime | When the Shipment was last updated | Example Object: ```json { "id": "shp_a9b97f431c00435cb16ec2d6a14ed109", "created_at": "2025-05-09T20:40:06Z", "is_return": false, "messages": [], "mode": "test", "options": { "currency": "USD", "payment": { "type": "SENDER" }, "date_advance": 0 }, "reference": null, "status": "unknown", "tracking_code": null, "updated_at": "2025-05-09T20:40:06Z", "batch_id": null, "batch_status": null, "batch_message": null, "customs_info": { "id": "cstinfo_35c8cd97c80a47c6807646a34db5f305", "object": "CustomsInfo", "created_at": "2025-05-09T20:40:06Z", "updated_at": "2025-05-09T20:40:06Z", "contents_explanation": "", "contents_type": "merchandise", "customs_certify": true, "customs_signer": "Steve Brule", "eel_pfc": "NOEEI 30.37(a)", "non_delivery_option": "return", "restriction_comments": null, "restriction_type": "none", "mode": "test", "declaration": null, "customs_items": [ { "id": "cstitem_3a28ba5d280f46b48e6d4195fa41a211", "object": "CustomsItem", "created_at": "2025-05-09T20:40:06Z", "updated_at": "2025-05-09T20:40:06Z", "description": "T-shirt", "hs_tariff_number": "123456", "origin_country": "US", "quantity": 1, "value": "10.0", "weight": 5.0, "code": "123", "mode": "test", "manufacturer": null, "currency": null, "eccn": null, "printed_commodity_identifier": null } ] }, "from_address": { "id": "adr_cad8c90a2d1511f0b6ff3cecef1b359e", "object": "Address", "created_at": "2025-05-09T20:40:06+00:00", "updated_at": "2025-05-09T20:40:06+00:00", "name": "EasyPost", "company": null, "street1": "417 Montgomery Street", "street2": "5th Floor", "city": "San Francisco", "state": "CA", "zip": "94104", "country": "US", "phone": "4153334445", "email": "support@easypost.com", "mode": "test", "carrier_facility": null, "residential": null, "federal_tax_id": null, "state_tax_id": null, "verifications": {} }, "insurance": null, "order_id": null, "parcel": { "id": "prcl_aa5a8eb48a92450c93fe5e452303cee2", "object": "Parcel", "created_at": "2025-05-09T20:40:06Z", "updated_at": "2025-05-09T20:40:06Z", "length": 20.2, "width": 10.9, "height": 5.0, "predefined_package": null, "weight": 65.9, "mode": "test" }, "postage_label": null, "rates": [ { "id": "rate_9c291b87bdec47a0b3ed151c60b21fb4", "object": "Rate", "created_at": "2025-05-09T20:40:07Z", "updated_at": "2025-05-09T20:40:07Z", "mode": "test", "service": "Express", "carrier": "USPS", "rate": "51.20", "currency": "USD", "retail_rate": "59.25", "retail_currency": "USD", "list_rate": "51.20", "list_currency": "USD", "billing_type": "easypost", "delivery_days": 2, "delivery_date": null, "delivery_date_guaranteed": false, "est_delivery_days": 2, "shipment_id": "shp_a9b97f431c00435cb16ec2d6a14ed109", "carrier_account_id": "ca_9685a1198a75477885a3cdca37559bac" }, { "id": "rate_e5b3aaafb00f48a4ab27d9f20a801b40", "object": "Rate", "created_at": "2025-05-09T20:40:07Z", "updated_at": "2025-05-09T20:40:07Z", "mode": "test", "service": "Priority", "carrier": "USPS", "rate": "11.01", "currency": "USD", "retail_rate": "15.40", "retail_currency": "USD", "list_rate": "11.01", "list_currency": "USD", "billing_type": "easypost", "delivery_days": 2, "delivery_date": null, "delivery_date_guaranteed": false, "est_delivery_days": 2, "shipment_id": "shp_a9b97f431c00435cb16ec2d6a14ed109", "carrier_account_id": "ca_9685a1198a75477885a3cdca37559bac" }, { "id": "rate_76e0cae29e294e6db279c76bbe2f27e9", "object": "Rate", "created_at": "2025-05-09T20:40:07Z", "updated_at": "2025-05-09T20:40:07Z", "mode": "test", "service": "GroundAdvantage", "carrier": "USPS", "rate": "8.20", "currency": "USD", "retail_rate": "13.85", "retail_currency": "USD", "list_rate": "9.74", "list_currency": "USD", "billing_type": "easypost", "delivery_days": 3, "delivery_date": null, "delivery_date_guaranteed": false, "est_delivery_days": 3, "shipment_id": "shp_a9b97f431c00435cb16ec2d6a14ed109", "carrier_account_id": "ca_9685a1198a75477885a3cdca37559bac" } ], "refund_status": null, "scan_form": null, "selected_rate": null, "tracker": null, "to_address": { "id": "adr_cad6e47c2d1511f094d5ac1f6bc539aa", "object": "Address", "created_at": "2025-05-09T20:40:06+00:00", "updated_at": "2025-05-09T20:40:06+00:00", "name": "Dr. Steve Brule", "company": null, "street1": "179 N Harbor Dr", "street2": null, "city": "Redondo Beach", "state": "CA", "zip": "90277", "country": "US", "phone": "8573875756", "email": "dr_steve_brule@gmail.com", "mode": "test", "carrier_facility": null, "residential": null, "federal_tax_id": null, "state_tax_id": null, "verifications": {} }, "usps_zone": 4, "return_address": { "id": "adr_cad8c90a2d1511f0b6ff3cecef1b359e", "object": "Address", "created_at": "2025-05-09T20:40:06+00:00", "updated_at": "2025-05-09T20:40:06+00:00", "name": "EasyPost", "company": null, "street1": "417 Montgomery Street", "street2": "5th Floor", "city": "San Francisco", "state": "CA", "zip": "94104", "country": "US", "phone": "4153334445", "email": "support@easypost.com", "mode": "test", "carrier_facility": null, "residential": null, "federal_tax_id": null, "state_tax_id": null, "verifications": {} }, "buyer_address": { "id": "adr_cad6e47c2d1511f094d5ac1f6bc539aa", "object": "Address", "created_at": "2025-05-09T20:40:06+00:00", "updated_at": "2025-05-09T20:40:06+00:00", "name": "Dr. Steve Brule", "company": null, "street1": "179 N Harbor Dr", "street2": null, "city": "Redondo Beach", "state": "CA", "zip": "90277", "country": "US", "phone": "8573875756", "email": "dr_steve_brule@gmail.com", "mode": "test", "carrier_facility": null, "residential": null, "federal_tax_id": null, "state_tax_id": null, "verifications": {} }, "forms": [], "fees": [], "object": "Shipment" } ``` --- ## PostageLabel object | Property | Type | Description | |----------|------|-------------| | id | string | Unique, begins with "pl_" | | object | string | "PostageLabel" | | label_date | datetime | The date that appears on the postage label | | label_epl2_url | string | The URL of the EPL2 label file | | label_file_type | string | File type of the label | | label_pdf_url | string | The URL of the PDF label file | | label_resolution | integer | The resolution of the label | | label_size | string | The size of the label | | label_type | string | The type of the label | | label_url | string | The URL of the label file | | label_zpl_url | string | The URL of the ZPL label file | | created_at | datetime | When the PostageLabel was created | | updated_at | datetime | When the PostageLabel was last updated | Example Object: ```json { "object": "PostageLabel", "id": "pl_6270007cad7643eaad274bb5c71e9614", "created_at": "2025-05-09T20:40:11Z", "updated_at": "2025-05-09T20:40:12Z", "date_advance": 0, "integrated_form": "none", "label_date": "2025-05-09T20:40:11Z", "label_resolution": 300, "label_size": "4x6", "label_type": "default", "label_file_type": "image/png", "label_url": "https://easypost-files.s3.us-west-2.amazonaws.com/files/postage_label/20250509/e857a7afd19edf498587cd09e2564722ab.png", "label_pdf_url": null, "label_zpl_url": "https://easypost-files.s3-us-west-2.amazonaws.com/files/postage_label/20250509/cbed7645eafc4a23af370b4525144fc3.zpl", "label_epl2_url": null, "label_file": null } ``` --- ## Create a Shipment ### Example: POST /shipments #### cURL ```shell curl -X POST https://api.easypost.com/v2/shipments \ -u "EASYPOST_API_KEY": \ -H 'Content-Type: application/json' \ -d '{ "shipment": { "to_address": { "name": "Dr. Steve Brule", "street1": "179 N Harbor Dr", "city": "Redondo Beach", "state": "CA", "zip": "90277", "country": "US", "phone": "8573875756", "email": "dr_steve_brule@gmail.com" }, "from_address": { "name": "EasyPost", "street1": "417 Montgomery Street", "street2": "5th Floor", "city": "San Francisco", "state": "CA", "zip": "94104", "country": "US", "phone": "4153334445", "email": "support@easypost.com" }, "parcel": { "length": "20.2", "width": "10.9", "height": "5", "weight": "65.9" }, "line_items": [ { "total_line_value": "129.00", "item_description": "Mugs" }, { "total_line_value": "45.50", "item_description": "T-shirts" } ] } }' ``` #### Go ```go package example import ( "fmt" "github.com/EasyPost/easypost-go/v6" ) func create() { client := easypost.New("EASYPOST_API_KEY") shipment, _ := client.CreateShipment( &easypost.Shipment{ ToAddress: &easypost.Address{ Name: "Dr. Steve Brule", Street1: "179 N Harbor Dr", City: "Redondo Beach", State: "CA", Zip: "90277", Country: "US", Phone: "4155559999", Email: "dr_steve_brule@gmail.com", }, FromAddress: &easypost.Address{ Name: "EasyPost", Street1: "417 Montgomery Street", Street2: "5th Floor", City: "San Francisco", State: "CA", Zip: "90277", Country: "US", Phone: "4155559999", Email: "support@easypost.com", }, Parcel: &easypost.Parcel{ Length: 20.2, Width: 10.9, Height: 5, Weight: 65.9, }, LineItems: []*easypost.LineItem{ { TotalLineValue: "129.00", ItemDescription: "Mugs", }, { TotalLineValue: "45.50", ItemDescription: "T-shirts", }, }, }, ) fmt.Println(shipment) } ``` #### Java ```java package shipments; import com.easypost.exception.EasyPostException; import com.easypost.model.Shipment; import com.easypost.service.EasyPostClient; import java.util.ArrayList; import java.util.HashMap; import java.util.List; public class Create { public static void main(String[] args) throws EasyPostException { EasyPostClient client = new EasyPostClient("EASYPOST_API_KEY"); HashMap toAddressMap = new HashMap(); toAddressMap.put("name", "Dr. Steve Brule"); toAddressMap.put("street1", "179 N Harbor Dr"); toAddressMap.put("city", "Redondo Beach"); toAddressMap.put("state", "CA"); toAddressMap.put("country", "US"); toAddressMap.put("phone", "8573875756"); toAddressMap.put("email", "dr_steve_brule@gmail.com"); toAddressMap.put("zip", "90277"); HashMap fromAddressMap = new HashMap(); fromAddressMap.put("name", "EasyPost"); fromAddressMap.put("street1", "417 Montgomery Street"); fromAddressMap.put("street2", "5th Floor"); fromAddressMap.put("city", "San Francisco"); fromAddressMap.put("state", "CA"); fromAddressMap.put("zip", "94104"); fromAddressMap.put("country", "US"); fromAddressMap.put("phone", "4153334445"); fromAddressMap.put("email", "support@easypost.com"); HashMap parcelMap = new HashMap(); parcelMap.put("length", 20.2); parcelMap.put("width", 10.9); parcelMap.put("height", 5); parcelMap.put("weight", 65.9); HashMap mugLineItem = new HashMap(); mugLineItem.put("total_line_value", "129.00"); mugLineItem.put("item_description", "Mugs"); HashMap shirtLineItem = new HashMap(); shirtLineItem.put("total_line_value", "45.50"); shirtLineItem.put("item_description", "T-shirts"); List> lineItems = new ArrayList>(); lineItems.add(mugLineItem); lineItems.add(shirtLineItem); HashMap params = new HashMap(); params.put("to_address", toAddressMap); params.put("from_address", fromAddressMap); params.put("parcel", parcelMap); params.put("line_items", lineItems); Shipment shipment = client.shipment.create(params); System.out.println(shipment); } } ``` #### C# ```csharp using System; using System.Collections.Generic; using System.Threading.Tasks; using EasyPost; using Newtonsoft.Json; namespace EasyPostExamples { public class Examples { public static async Task Main() { var client = new EasyPost.Client(new EasyPost.ClientConfiguration("EASYPOST_API_KEY")); // Create a shipment using all data in one API call EasyPost.Parameters.Shipment.Create parameters = new() { ToAddress = new EasyPost.Parameters.Address.Create { Name = "Dr. Steve Brule", Street1 = "417 Montgomery Street", Street2 = "5th Floor", City = "San Francisco", State = "CA", Country = "US", Zip = "94104" }, FromAddress = new EasyPost.Parameters.Address.Create { Company = "EasyPost", Street1 = "417 Montgomery Street", Street2 = "Floor 5", City = "San Francisco", State = "CA", Country = "US", Zip = "94104" }, Parcel = new EasyPost.Parameters.Parcel.Create { Length = 8, Width = 6, Height = 5, Weight = 10 }, LineItems = new List { new EasyPost.Models.API.LineItem { TotalLineValue = "129.00", ItemDescription = "Mugs" }, new EasyPost.Models.API.LineItem { TotalLineValue = "45.50", ItemDescription = "T-shirts" }, } }; EasyPost.Models.API.Shipment shipment = await client.Shipment.Create(parameters); Console.WriteLine(JsonConvert.SerializeObject(shipment, Formatting.Indented)); // Create a shipment using existing addresses and parcel EasyPost.Models.API.Address toAddress = await client.Address.Retrieve("adr_..."); EasyPost.Models.API.Address fromAddress = await client.Address.Retrieve("adr_..."); EasyPost.Models.API.Parcel parcel = await client.Parcel.Retrieve("prcl_..."); parameters = new() { ToAddress = toAddress, FromAddress = fromAddress, Parcel = parcel, LineItems = new List { new EasyPost.Models.API.LineItem { TotalLineValue = "129.00", ItemDescription = "Mugs" }, new EasyPost.Models.API.LineItem { TotalLineValue = "45.50", ItemDescription = "T-shirts" }, } }; shipment = await client.Shipment.Create(parameters); Console.WriteLine(JsonConvert.SerializeObject(shipmentWithIds, Formatting.Indented)); } } } ``` #### Node.js ```javascript const EasyPostClient = require('@easypost/api'); const client = new EasyPostClient('EASYPOST_API_KEY'); (async () => { let shipment; shipment = await client.Shipment.create({ to_address: { name: 'Dr. Steve Brule', street1: '179 N Harbor Dr', city: 'Redondo Beach', state: 'CA', zip: '90277', country: 'US', email: 'dr_steve_brule@gmail.com', phone: '4155559999', }, from_address: { street1: '417 montgomery street', street2: 'FL 5', city: 'San Francisco', state: 'CA', zip: '94104', country: 'US', company: 'EasyPost', phone: '415-123-4567', }, parcel: { length: 20.2, width: 10.9, height: 5, weight: 65.9, }, line_items: [ { total_line_value: '129.00', item_description: 'Mugs', }, { total_line_value: '45.50', item_description: 'T-shirts', }, ], }); // or create by using IDs shipment = await client.Shipment.create({ to_address: { id: 'adr_...' }, from_address: { id: 'adr_...' }, parcel: { id: 'prcl_...' }, line_items: [ { total_line_value: '129.00', item_description: 'Mugs', }, { total_line_value: '45.50', item_description: 'T-shirts', }, ], }); console.log(shipment); })(); ``` #### PHP ```php shipment->create([ 'to_address' => [ 'name' => 'Dr. Steve Brule', 'street1' => '179 N Harbor Dr', 'city' => 'Redondo Beach', 'state' => 'CA', 'zip' => '90277', 'country' => 'US', 'phone' => '3331114444', 'email' => 'dr_steve_brule@gmail.com' ], 'from_address' => [ 'name' => 'EasyPost', 'street1' => '417 Montgomery Street', 'street2' => '5th Floor', 'city' => 'San Francisco', 'state' => 'CA', 'zip' => '94104', 'country' => 'US', 'phone' => '3331114444', 'email' => 'support@easypost.com' ], 'parcel' => [ 'length' => 20.2, 'width' => 10.9, 'height' => 5, 'weight' => 65.9 ], 'line_items' => [ [ 'total_line_value' => '129.00', 'item_description' => 'Mugs' ], [ 'total_line_value' => '45.50', 'item_description' => 'T-shirts' ] ] ]); echo $shipment; ``` #### Python ```python import easypost client = easypost.EasyPostClient("EASYPOST_API_KEY") shipment = client.shipment.create( to_address={ "name": "Dr. Steve Brule", "street1": "179 N Harbor Dr", "city": "Redondo Beach", "state": "CA", "zip": "90277", "country": "US", "phone": "4153334444", "email": "dr_steve_brule@gmail.com", }, from_address={ "name": "EasyPost", "street1": "417 Montgomery Street", "street2": "5th Floor", "city": "San Francisco", "state": "CA", "zip": "94104", "country": "US", "phone": "4153334444", "email": "support@easypost.com", }, parcel={ "length": 20.2, "width": 10.9, "height": 5, "weight": 65.9, }, line_items=[ { "total_line_value": "129.00", "item_description": "Mugs", }, { "total_line_value": "45.50", "item_description": "T-shirts", }, ], ) # or create by using IDs shipment = client.shipment.create( to_address={"id": "adr_..."}, from_address={"id": "adr_..."}, parcel={"id": "prcl_..."}, line_items=[ { "total_line_value": "129.00", "item_description": "Mugs", }, { "total_line_value": "45.50", "item_description": "T-shirts", }, ], ) print(shipment) ``` #### Ruby ```ruby require 'easypost' client = EasyPost::Client.new(api_key: 'EASYPOST_API_KEY') shipment = client.shipment.create( to_address: { name: 'Dr. Steve Brule', street1: '179 N Harbor Dr', city: 'Redondo Beach', state: 'CA', zip: '90277', country: 'US', phone: '4155559999', email: 'dr_steve_brule@gmail.com', }, from_address: { name: 'EasyPost', street1: '417 Montgomery Street', street2: '5th Floor', city: 'San Francisco', state: 'CA', zip: '94104', country: 'US', phone: '4153334445', email: 'support@easypost.com', }, parcel: { length: 20.2, width: 10.9, height: 5, weight: 65.9, }, line_items: [ { total_line_value: '129.00', item_description: 'Mugs', }, { total_line_value: '45.50', item_description: 'T-shirts', }, ], ) puts shipment ``` A `Shipment` is almost exclusively a container for other objects, and thus a `Shipment` may reuse many of these objects. Additionally, all the objects contained within a `Shipment` may be created at the same time. The origin/destination `Address` and `Parcel` are required for rating. `Parcel.weight` must be provided in ounces (oz). `CustomInfo` is required to rate an international `Shipment`, this includes when the destination is a U.S. territory. The associated `Tracker`,`Fee`, and `Rates` are generated by EasyPost and cannot be modified by the user. You can limit the `CarrierAccounts` to use for rating by passing the `carrier_accounts` parameter. If the `CarrierAccount` IDs provided are invalid or disabled, the shipment creation call will result in an error. For eligible international `Shipments`, EasyPost automatically calculates landed cost when retrieving `Rates`. Supported `Rates` include landed cost information when available. No separate landed cost request is required. See the Landed Cost Guide for eligibility and requirements. [Note: This object is immutable after creation. Review the rendered documentation for details.] {/* END: Create a Shipment */} --- ## Buy a Shipment ### Example: POST /shipments/:id/buy #### cURL ```shell curl -X POST https://api.easypost.com/v2/shipments \ -u "EASYPOST_API_KEY": \ -H 'Content-Type: application/json' \ -d '{ "shipment": { "to_address": { "name": "Dr. Steve Brule", "street1": "179 N Harbor Dr", "city": "Redondo Beach", "state": "CA", "zip": "90277", "country": "US", "phone": "8573875756", "email": "dr_steve_brule@gmail.com" }, "from_address": { "name": "EasyPost", "street1": "417 Montgomery Street", "street2": "5th Floor", "city": "San Francisco", "state": "CA", "zip": "94104", "country": "US", "phone": "4153334445", "email": "support@easypost.com" }, "parcel": { "length": "20.2", "width": "10.9", "height": "5", "weight": "65.9" }, "line_items": [ { "total_line_value": "129.00", "item_description": "Mugs" }, { "total_line_value": "45.50", "item_description": "T-shirts" } ] } }' ``` #### Go ```go package example import ( "fmt" "github.com/EasyPost/easypost-go/v6" ) func create() { client := easypost.New("EASYPOST_API_KEY") shipment, _ := client.CreateShipment( &easypost.Shipment{ ToAddress: &easypost.Address{ Name: "Dr. Steve Brule", Street1: "179 N Harbor Dr", City: "Redondo Beach", State: "CA", Zip: "90277", Country: "US", Phone: "4155559999", Email: "dr_steve_brule@gmail.com", }, FromAddress: &easypost.Address{ Name: "EasyPost", Street1: "417 Montgomery Street", Street2: "5th Floor", City: "San Francisco", State: "CA", Zip: "90277", Country: "US", Phone: "4155559999", Email: "support@easypost.com", }, Parcel: &easypost.Parcel{ Length: 20.2, Width: 10.9, Height: 5, Weight: 65.9, }, LineItems: []*easypost.LineItem{ { TotalLineValue: "129.00", ItemDescription: "Mugs", }, { TotalLineValue: "45.50", ItemDescription: "T-shirts", }, }, }, ) fmt.Println(shipment) } ``` #### Java ```java package shipments; import com.easypost.exception.EasyPostException; import com.easypost.model.Shipment; import com.easypost.service.EasyPostClient; import java.util.ArrayList; import java.util.HashMap; import java.util.List; public class Create { public static void main(String[] args) throws EasyPostException { EasyPostClient client = new EasyPostClient("EASYPOST_API_KEY"); HashMap toAddressMap = new HashMap(); toAddressMap.put("name", "Dr. Steve Brule"); toAddressMap.put("street1", "179 N Harbor Dr"); toAddressMap.put("city", "Redondo Beach"); toAddressMap.put("state", "CA"); toAddressMap.put("country", "US"); toAddressMap.put("phone", "8573875756"); toAddressMap.put("email", "dr_steve_brule@gmail.com"); toAddressMap.put("zip", "90277"); HashMap fromAddressMap = new HashMap(); fromAddressMap.put("name", "EasyPost"); fromAddressMap.put("street1", "417 Montgomery Street"); fromAddressMap.put("street2", "5th Floor"); fromAddressMap.put("city", "San Francisco"); fromAddressMap.put("state", "CA"); fromAddressMap.put("zip", "94104"); fromAddressMap.put("country", "US"); fromAddressMap.put("phone", "4153334445"); fromAddressMap.put("email", "support@easypost.com"); HashMap parcelMap = new HashMap(); parcelMap.put("length", 20.2); parcelMap.put("width", 10.9); parcelMap.put("height", 5); parcelMap.put("weight", 65.9); HashMap mugLineItem = new HashMap(); mugLineItem.put("total_line_value", "129.00"); mugLineItem.put("item_description", "Mugs"); HashMap shirtLineItem = new HashMap(); shirtLineItem.put("total_line_value", "45.50"); shirtLineItem.put("item_description", "T-shirts"); List> lineItems = new ArrayList>(); lineItems.add(mugLineItem); lineItems.add(shirtLineItem); HashMap params = new HashMap(); params.put("to_address", toAddressMap); params.put("from_address", fromAddressMap); params.put("parcel", parcelMap); params.put("line_items", lineItems); Shipment shipment = client.shipment.create(params); System.out.println(shipment); } } ``` #### C# ```csharp using System; using System.Collections.Generic; using System.Threading.Tasks; using EasyPost; using Newtonsoft.Json; namespace EasyPostExamples { public class Examples { public static async Task Main() { var client = new EasyPost.Client(new EasyPost.ClientConfiguration("EASYPOST_API_KEY")); // Create a shipment using all data in one API call EasyPost.Parameters.Shipment.Create parameters = new() { ToAddress = new EasyPost.Parameters.Address.Create { Name = "Dr. Steve Brule", Street1 = "417 Montgomery Street", Street2 = "5th Floor", City = "San Francisco", State = "CA", Country = "US", Zip = "94104" }, FromAddress = new EasyPost.Parameters.Address.Create { Company = "EasyPost", Street1 = "417 Montgomery Street", Street2 = "Floor 5", City = "San Francisco", State = "CA", Country = "US", Zip = "94104" }, Parcel = new EasyPost.Parameters.Parcel.Create { Length = 8, Width = 6, Height = 5, Weight = 10 }, LineItems = new List { new EasyPost.Models.API.LineItem { TotalLineValue = "129.00", ItemDescription = "Mugs" }, new EasyPost.Models.API.LineItem { TotalLineValue = "45.50", ItemDescription = "T-shirts" }, } }; EasyPost.Models.API.Shipment shipment = await client.Shipment.Create(parameters); Console.WriteLine(JsonConvert.SerializeObject(shipment, Formatting.Indented)); // Create a shipment using existing addresses and parcel EasyPost.Models.API.Address toAddress = await client.Address.Retrieve("adr_..."); EasyPost.Models.API.Address fromAddress = await client.Address.Retrieve("adr_..."); EasyPost.Models.API.Parcel parcel = await client.Parcel.Retrieve("prcl_..."); parameters = new() { ToAddress = toAddress, FromAddress = fromAddress, Parcel = parcel, LineItems = new List { new EasyPost.Models.API.LineItem { TotalLineValue = "129.00", ItemDescription = "Mugs" }, new EasyPost.Models.API.LineItem { TotalLineValue = "45.50", ItemDescription = "T-shirts" }, } }; shipment = await client.Shipment.Create(parameters); Console.WriteLine(JsonConvert.SerializeObject(shipmentWithIds, Formatting.Indented)); } } } ``` #### Node.js ```javascript const EasyPostClient = require('@easypost/api'); const client = new EasyPostClient('EASYPOST_API_KEY'); (async () => { let shipment; shipment = await client.Shipment.create({ to_address: { name: 'Dr. Steve Brule', street1: '179 N Harbor Dr', city: 'Redondo Beach', state: 'CA', zip: '90277', country: 'US', email: 'dr_steve_brule@gmail.com', phone: '4155559999', }, from_address: { street1: '417 montgomery street', street2: 'FL 5', city: 'San Francisco', state: 'CA', zip: '94104', country: 'US', company: 'EasyPost', phone: '415-123-4567', }, parcel: { length: 20.2, width: 10.9, height: 5, weight: 65.9, }, line_items: [ { total_line_value: '129.00', item_description: 'Mugs', }, { total_line_value: '45.50', item_description: 'T-shirts', }, ], }); // or create by using IDs shipment = await client.Shipment.create({ to_address: { id: 'adr_...' }, from_address: { id: 'adr_...' }, parcel: { id: 'prcl_...' }, line_items: [ { total_line_value: '129.00', item_description: 'Mugs', }, { total_line_value: '45.50', item_description: 'T-shirts', }, ], }); console.log(shipment); })(); ``` #### PHP ```php shipment->create([ 'to_address' => [ 'name' => 'Dr. Steve Brule', 'street1' => '179 N Harbor Dr', 'city' => 'Redondo Beach', 'state' => 'CA', 'zip' => '90277', 'country' => 'US', 'phone' => '3331114444', 'email' => 'dr_steve_brule@gmail.com' ], 'from_address' => [ 'name' => 'EasyPost', 'street1' => '417 Montgomery Street', 'street2' => '5th Floor', 'city' => 'San Francisco', 'state' => 'CA', 'zip' => '94104', 'country' => 'US', 'phone' => '3331114444', 'email' => 'support@easypost.com' ], 'parcel' => [ 'length' => 20.2, 'width' => 10.9, 'height' => 5, 'weight' => 65.9 ], 'line_items' => [ [ 'total_line_value' => '129.00', 'item_description' => 'Mugs' ], [ 'total_line_value' => '45.50', 'item_description' => 'T-shirts' ] ] ]); echo $shipment; ``` #### Python ```python import easypost client = easypost.EasyPostClient("EASYPOST_API_KEY") shipment = client.shipment.create( to_address={ "name": "Dr. Steve Brule", "street1": "179 N Harbor Dr", "city": "Redondo Beach", "state": "CA", "zip": "90277", "country": "US", "phone": "4153334444", "email": "dr_steve_brule@gmail.com", }, from_address={ "name": "EasyPost", "street1": "417 Montgomery Street", "street2": "5th Floor", "city": "San Francisco", "state": "CA", "zip": "94104", "country": "US", "phone": "4153334444", "email": "support@easypost.com", }, parcel={ "length": 20.2, "width": 10.9, "height": 5, "weight": 65.9, }, line_items=[ { "total_line_value": "129.00", "item_description": "Mugs", }, { "total_line_value": "45.50", "item_description": "T-shirts", }, ], ) # or create by using IDs shipment = client.shipment.create( to_address={"id": "adr_..."}, from_address={"id": "adr_..."}, parcel={"id": "prcl_..."}, line_items=[ { "total_line_value": "129.00", "item_description": "Mugs", }, { "total_line_value": "45.50", "item_description": "T-shirts", }, ], ) print(shipment) ``` #### Ruby ```ruby require 'easypost' client = EasyPost::Client.new(api_key: 'EASYPOST_API_KEY') shipment = client.shipment.create( to_address: { name: 'Dr. Steve Brule', street1: '179 N Harbor Dr', city: 'Redondo Beach', state: 'CA', zip: '90277', country: 'US', phone: '4155559999', email: 'dr_steve_brule@gmail.com', }, from_address: { name: 'EasyPost', street1: '417 Montgomery Street', street2: '5th Floor', city: 'San Francisco', state: 'CA', zip: '94104', country: 'US', phone: '4153334445', email: 'support@easypost.com', }, parcel: { length: 20.2, width: 10.9, height: 5, weight: 65.9, }, line_items: [ { total_line_value: '129.00', item_description: 'Mugs', }, { total_line_value: '45.50', item_description: 'T-shirts', }, ], ) puts shipment ``` To purchase a `Shipment`, specify the `Rate` to buy. This operation returns the `tracking_code` and `postage_label` attributes. The default image format for the `PostageLabel` is PNG. To use a different format, refer to the `label_format` option in the Options object. For certain hybrid carrier services, including DHL eCommerce, FedEx Ground Economy, UPS Ground Saver, and Veho, EasyPost may receive multiple carrier tracking numbers for a single shipment. When available from the carrier at label creation time, a secondary (alternate) tracking number is returned in `tracker.carrier_detail.alternate_identifier`. If it is not immediately available, it may still populate asynchronously on the Tracker resource after label purchase. Availability and timing vary by carrier. Insurance may be added at the time of purchase by including the `insurance` attribute as a string. All insurance values must be in U.S. dollars (USD). When the selected `Rate` includes an eligible landed cost guarantee, EasyPost activates the guarantee before purchasing the carrier label. The purchased `Shipment` includes landed cost information on the `selected_rate`. {/* END: Buy a Shipment */} --- ## Buy a Shipment without rating (One-Call Buy) ### Example: One-Call Buy #### cURL ```shell curl -X POST https://api.easypost.com/v2/shipments \ -u "EASYPOST_API_KEY": \ -H 'Content-Type: application/json' \ -d '{ "shipment": { "to_address": { "name": "Dr. Steve Brule", "street1": "179 N Harbor Dr", "city": "Redondo Beach", "state": "CA", "zip": "90277", "country": "US", "phone": "8573875756", "email": "dr_steve_brule@gmail.com" }, "from_address": { "name": "EasyPost", "street1": "417 Montgomery Street", "street2": "5th Floor", "city": "San Francisco", "state": "CA", "zip": "94104", "country": "US", "phone": "4153334445", "email": "support@easypost.com" }, "parcel": { "length": "20.2", "width": "10.9", "height": "5", "weight": "65.9" }, "service": "NextDayAir", "carrier_accounts": ["ca_..."] } }' ``` #### Go ```go package example import ( "fmt" "github.com/EasyPost/easypost-go/v6" ) func oneCallBuy() { client := easypost.New("EASYPOST_API_KEY") shipment, _ := client.CreateShipment( &easypost.Shipment{ CarrierAccountIDs: []string{"ca_..."}, Service: "NextDayAir", Parcel: &easypost.Parcel{ Length: 20.2, Width: 10.9, Height: 5, Weight: 65.9, }, ToAddress: &easypost.Address{ Name: "Dr. Steve Brule", Street1: "179 N Harbor Dr", City: "Redondo Beach", State: "CA", Zip: "90277", Country: "US", Phone: "4155559999", Email: "dr_steve_brule@gmail.com", }, FromAddress: &easypost.Address{ Name: "EasyPost", Street1: "417 Montgomery Street", Street2: "5th Floor", City: "San Francisco", State: "CA", Zip: "90277", Country: "US", Phone: "4155559999", Email: "support@easypost.com", }, Reference: "ShipmentRef", }, ) fmt.Println(shipment) } ``` #### Java ```java package shipments; import com.easypost.exception.EasyPostException; import com.easypost.model.Shipment; import com.easypost.service.EasyPostClient; import java.util.HashMap; public class OneCallBuy { public static void main(String[] args) throws EasyPostException { EasyPostClient client = new EasyPostClient("EASYPOST_API_KEY"); HashMap toAddressMap = new HashMap(); toAddressMap.put("name", "Dr. Steve Brule"); toAddressMap.put("street1", "179 N Harbor Dr"); toAddressMap.put("city", "Redondo Beach"); toAddressMap.put("state", "CA"); toAddressMap.put("country", "US"); toAddressMap.put("phone", "8573875756"); toAddressMap.put("email", "dr_steve_brule@gmail.com"); toAddressMap.put("zip", "90277"); HashMap fromAddressMap = new HashMap(); fromAddressMap.put("name", "EasyPost"); fromAddressMap.put("street1", "417 Montgomery Street"); fromAddressMap.put("street2", "5th Floor"); fromAddressMap.put("city", "San Francisco"); fromAddressMap.put("state", "CA"); fromAddressMap.put("zip", "94104"); fromAddressMap.put("country", "US"); fromAddressMap.put("phone", "4153334445"); fromAddressMap.put("email", "support@easypost.com"); HashMap parcelMap = new HashMap(); parcelMap.put("length", 20.2); parcelMap.put("width", 10.9); parcelMap.put("height", 5); parcelMap.put("weight", 65.9); HashMap customsInfoMap = new HashMap(); customsInfoMap.put("id", "cstinfo_..."); HashMap params = new HashMap(); params.put("to_address", toAddressMap); params.put("from_address", fromAddressMap); params.put("parcel", parcelMap); params.put("customs_info", customsInfoMap); params.put("carrier_accounts", "ca_..."); params.put("service", "NextDayAir"); Shipment shipment = client.shipment.create(params); System.out.println(shipment); } } ``` #### C# ```csharp using System; using System.Collections.Generic; using System.Threading.Tasks; using EasyPost; using Newtonsoft.Json; namespace EasyPostExamples { public class Examples { public static async Task Main() { var client = new EasyPost.Client(new EasyPost.ClientConfiguration("EASYPOST_API_KEY")); EasyPost.Parameters.Shipment.Create parameters = new() { ToAddress = new EasyPost.Parameters.Address.Create { Name = "Dr. Steve Brule", Street1 = "417 Montgomery Street", Street2 = "5th Floor", City = "San Francisco", State = "CA", Country = "US", Zip = "94104" }, FromAddress = new EasyPost.Parameters.Address.Create { Company = "EasyPost", Street1 = "417 Montgomery Street", Street2 = "Floor 5", City = "San Francisco", State = "CA", Country = "US", Zip = "94104" }, Parcel = new EasyPost.Parameters.Parcel.Create { Length = 8, Width = 6, Height = 5, Weight = 10 }, Service = "NextDayAir", CarrierAccountIds = new List { "ca_..." } }; EasyPost.Models.API.Shipment shipment = await client.Shipment.Create(parameters); Console.WriteLine(JsonConvert.SerializeObject(shipment, Formatting.Indented)); } } } ``` #### Node.js ```javascript const EasyPostClient = require('@easypost/api'); const client = new EasyPostClient('EASYPOST_API_KEY'); (async () => { const shipment = await client.Shipment.create({ carrier_accounts: ['ca_...'], service: 'NextDayAir', to_address: { name: 'Dr. Steve Brule', street1: '179 N Harbor Dr', city: 'Redondo Beach', state: 'CA', zip: '90277', country: 'US', email: 'dr_steve_brule@gmail.com', phone: '4155559999', }, from_address: { street1: '417 montgomery street', street2: 'FL 5', city: 'San Francisco', state: 'CA', zip: '94104', country: 'US', company: 'EasyPost', phone: '415-123-4567', }, parcel: { length: 20.2, width: 10.9, height: 5, weight: 65.9, }, }); console.log(shipment); })(); ``` #### PHP ```php shipment->create([ 'carrier_accounts' => ['ca_...'], 'service' => 'NextDayAir', 'to_address' => [ 'name' => 'Dr. Steve Brule', 'street1' => '179 N Harbor Dr', 'city' => 'Redondo Beach', 'state' => 'CA', 'zip' => '90277', 'country' => 'US', 'phone' => '3331114444', 'email' => 'dr_steve_brule@gmail.com' ], 'from_address' => [ 'name' => 'EasyPost', 'street1' => '417 Montgomery Street', 'street2' => '5th Floor', 'city' => 'San Francisco', 'state' => 'CA', 'zip' => '94104', 'country' => 'US', 'phone' => '3331114444', 'email' => 'support@easypost.com' ], 'parcel' => [ 'length' => 20.2, 'width' => 10.9, 'height' => 5, 'weight' => 65.9 ] ]); echo $shipment; ``` #### Python ```python import easypost client = easypost.EasyPostClient("EASYPOST_API_KEY") shipment = client.shipment.create( carrier_accounts=["ca_..."], service="NextDayAir", to_address={ "name": "Dr. Steve Brule", "street1": "179 N Harbor Dr", "city": "Redondo Beach", "state": "CA", "zip": "90277", "country": "US", "phone": "4153334444", "email": "dr_steve_brule@gmail.com", }, from_address={ "name": "EasyPost", "street1": "417 Montgomery Street", "street2": "5th Floor", "city": "San Francisco", "state": "CA", "zip": "94104", "country": "US", "phone": "4153334444", "email": "support@easypost.com", }, parcel={ "length": 20.2, "width": 10.9, "height": 5, "weight": 65.9, }, ) print(shipment) ``` #### Ruby ```ruby require 'easypost' client = EasyPost::Client.new(api_key: 'EASYPOST_API_KEY') shipment = client.shipment.create( to_address: { name: 'Dr. Steve Brule', street1: '179 N Harbor Dr', city: 'Redondo Beach', state: 'CA', zip: '90277', country: 'US', phone: '8573875756', email: 'dr_steve_brule@gmail.com', }, from_address: { name: 'EasyPost', street1: '417 Montgomery Street', street2: '5th Floor', city: 'San Francisco', state: 'CA', zip: '94104', country: 'US', phone: '4153334445', email: 'support@easypost.com', }, parcel: { length: 20.2, width: 10.9, height: 5, weight: 65.9, }, service: 'NextDayAir', carrier_accounts: ['ca_...'], ) puts shipment ``` The one-call buy method enables shipment creation and label purchase in a single API call. This approach is suitable when the desired service level is already known, or a flat-rate agreement is in place with the carrier. For certain hybrid carrier services, including DHL eCommerce, FedEx Ground Economy, UPS Ground Saver, and Veho, the response may include `tracker.carrier_detail.alternate_identifier` when an alternate tracking identifier is available from the carrier at label creation time. If it is not immediately available, it may still populate asynchronously on the Tracker resource after label purchase. Availability and timing vary by carrier. Using this method can reduce API calls and improve integration performance by skipping the standard two-step process ( "Create `Shipment`" followed by "Buy `Shipment`"). To utilize one-call buy, specify the `CarrierAccount` and service level name directly in the Create `Shipment` call. Insurance may be added at the time of purchase by including the `insurance` attribute within the `shipment` object as a string. All insurance values must be in U.S. dollars (USD). > Note: Landed Cost is not supported with One-Call Buy. Use the standard Shipment creation and purchase workflow to retrieve landed cost information and activate eligible guarantees. {/* END: Buy a Shipment without rating */} --- ## Retrieve all Shipments ### Example: GET /shipments #### cURL ```shell curl -X GET "https://api.easypost.com/v2/shipments?page_size=5" \ -u "EASYPOST_API_KEY": ``` #### Go ```go package example import ( "fmt" "github.com/EasyPost/easypost-go/v6" ) func list() { client := easypost.New("EASYPOST_API_KEY") shipments, _ := client.ListShipments( &easypost.ListShipmentsOptions{ PageSize: 5, }, ) fmt.Println(shipments) } ``` #### Java ```java package shipments; import com.easypost.exception.EasyPostException; import com.easypost.model.ShipmentCollection; import com.easypost.service.EasyPostClient; import java.util.HashMap; public class All { public static void main(String[] args) throws EasyPostException { EasyPostClient client = new EasyPostClient("EASYPOST_API_KEY"); HashMap params = new HashMap<>(); params.put("page_size", 5); ShipmentCollection shipments = client.shipment.all(params); System.out.println(shipments); } } ``` #### C# ```csharp using System; using System.Collections.Generic; using System.Threading.Tasks; using EasyPost; using Newtonsoft.Json; namespace EasyPostExamples { public class Examples { public static async Task Main() { var client = new EasyPost.Client(new EasyPost.ClientConfiguration("EASYPOST_API_KEY")); EasyPost.Parameters.Shipment.All parameters = new() { PageSize = 5 }; EasyPost.Models.API.ShipmentCollection shipmentCollection = await client.Shipment.All(parameters); Console.WriteLine(JsonConvert.SerializeObject(shipmentCollection, Formatting.Indented)); } } } ``` #### Node.js ```javascript const EasyPostClient = require('@easypost/api'); const client = new EasyPostClient('EASYPOST_API_KEY'); (async () => { const shipments = await client.Shipment.all({ page_size: 5, }); console.log(shipments); })(); ``` #### PHP ```php shipment->all([ 'page_size' => 5, ]); echo $shipments; ``` #### Python ```python import easypost client = easypost.EasyPostClient("EASYPOST_API_KEY") shipments = client.shipment.all( page_size=5, ) print(shipments) ``` #### Ruby ```ruby require 'easypost' client = EasyPost::Client.new(api_key: 'EASYPOST_API_KEY') shipments = client.shipment.all( page_size: 5, ) puts shipments ``` A list of all `Shipment` objects associated with the given `API Key` can also be retrieved. See the Pagination section of our docs for more details on retrieving all records when multiple pages are available. {/* END: Retrieve all Shipments */} --- ## Retrieve a Shipment ### Example: GET /shipments/:id #### cURL ```shell curl -X GET https://api.easypost.com/v2/shipments/shp_... \ -u "EASYPOST_API_KEY": ``` #### Go ```go package example import ( "fmt" "github.com/EasyPost/easypost-go/v6" ) func retrieve() { client := easypost.New("EASYPOST_API_KEY") shipment, _ := client.GetShipment("shp_...") fmt.Println(shipment) } ``` #### Java ```java package shipments; import com.easypost.exception.EasyPostException; import com.easypost.model.Shipment; import com.easypost.service.EasyPostClient; public class Retrieve { public static void main(String[] args) throws EasyPostException { EasyPostClient client = new EasyPostClient("EASYPOST_API_KEY"); Shipment shipment = client.shipment.retrieve("shp_..."); System.out.println(shipment); } } ``` #### C# ```csharp using System; using System.Collections.Generic; using System.Threading.Tasks; using EasyPost; using Newtonsoft.Json; namespace EasyPostExamples { public class Examples { public static async Task Main() { var client = new EasyPost.Client(new EasyPost.ClientConfiguration("EASYPOST_API_KEY")); EasyPost.Models.API.Shipment shipment = await client.Shipment.Retrieve("shp_..."); Console.WriteLine(JsonConvert.SerializeObject(shipment, Formatting.Indented)); } } } ``` #### Node.js ```javascript const EasyPostClient = require('@easypost/api'); const client = new EasyPostClient('EASYPOST_API_KEY'); (async () => { const shipment = await client.Shipment.retrieve('shp_...'); console.log(shipment); })(); ``` #### PHP ```php shipment->retrieve('shp_...'); echo $shipment; ``` #### Python ```python import easypost client = easypost.EasyPostClient("EASYPOST_API_KEY") shipment = client.shipment.retrieve("shp_...") print(shipment) ``` #### Ruby ```ruby require 'easypost' client = EasyPost::Client.new(api_key: 'EASYPOST_API_KEY') shipment = client.shipment.retrieve('shp_...') puts shipment ``` A `Shipment` can be retrieved by either its `id` or `reference`. However it is recommended to use EasyPost's provided identifiers because uniqueness on `reference` is not enforced. {/* END: Retrieve a Shipment */} --- ## Converting the Label format of a Shipment ### Example: GET /shipments/:id/label #### cURL ```shell curl -X GET https://api.easypost.com/v2/shipments/shp_... \ -u "EASYPOST_API_KEY": ``` #### Go ```go package example import ( "fmt" "github.com/EasyPost/easypost-go/v6" ) func retrieve() { client := easypost.New("EASYPOST_API_KEY") shipment, _ := client.GetShipment("shp_...") fmt.Println(shipment) } ``` #### Java ```java package shipments; import com.easypost.exception.EasyPostException; import com.easypost.model.Shipment; import com.easypost.service.EasyPostClient; public class Retrieve { public static void main(String[] args) throws EasyPostException { EasyPostClient client = new EasyPostClient("EASYPOST_API_KEY"); Shipment shipment = client.shipment.retrieve("shp_..."); System.out.println(shipment); } } ``` #### C# ```csharp using System; using System.Collections.Generic; using System.Threading.Tasks; using EasyPost; using Newtonsoft.Json; namespace EasyPostExamples { public class Examples { public static async Task Main() { var client = new EasyPost.Client(new EasyPost.ClientConfiguration("EASYPOST_API_KEY")); EasyPost.Models.API.Shipment shipment = await client.Shipment.Retrieve("shp_..."); Console.WriteLine(JsonConvert.SerializeObject(shipment, Formatting.Indented)); } } } ``` #### Node.js ```javascript const EasyPostClient = require('@easypost/api'); const client = new EasyPostClient('EASYPOST_API_KEY'); (async () => { const shipment = await client.Shipment.retrieve('shp_...'); console.log(shipment); })(); ``` #### PHP ```php shipment->retrieve('shp_...'); echo $shipment; ``` #### Python ```python import easypost client = easypost.EasyPostClient("EASYPOST_API_KEY") shipment = client.shipment.retrieve("shp_...") print(shipment) ``` #### Ruby ```ruby require 'easypost' client = EasyPost::Client.new(api_key: 'EASYPOST_API_KEY') shipment = client.shipment.retrieve('shp_...') puts shipment ``` A `Shipment`'s `PostageLabel` can be converted from PNG to other formats. To convert a `PostageLabel`, the original must be a PNG. Converting labels works best when they are 4x6 labels converted from PNG to ZPL. {/* END: Converting the Label format of a Shipment */} --- Source: https://docs.easypost.com/docs/smartrate # SmartRate The `Smart Deliver By` and `Smart Deliver On` endpoints are designed for precise delivery scheduling scenarios. The Smart Deliver By endpoint specifies a delivery deadline, while the Smart Deliver On endpoint enables setting a specific delivery date. > Note: The SmartRate API is currently available exclusively for US domestic shipments. ## SmartRate Object | Property | Type | Description | |----------|------|-------------| | planned_ship_date | datetime | Date the shipment is expected to enter the mailstream. | | easypost_estimated_delivery_date | datetime | Estimated delivery date for the shipment in YYYY/MM/DD format, including weekends and holidays. | | desired_delivery_date | datetime | Target delivery date for the package. Failure to provide this date results in a failed API call. | | days_in_transit | integer | Estimated transit times at various percentiles. These transit times include holidays and weekends. | | delivery_date_confidence | integer | Indicates the likelihood (0-1 scale) of a package being delivered on the specified delivery date. | | estimated_transit_days | integer | Total number of days expected for the package to be delivered on the desired delivery date, assuming it is shipped on the suggested ship_on_date. | | ship_on_date | datetime | Recommended date for dispatching the package to the carrier to ensure delivery by the desired delivery date. | | from_zip | string | Specifies the postal code from which the shipment will originate. | | to_zip | string | Specifies the postal code to which the shipment is destined. | Example Object: ```json { "carriers_without_tint_estimates": null, "desired_delivery_date": "2025-05-19", "from_zip": "10001", "results": [ { "carrier": "usps", "easypost_time_in_transit_data": { "days_in_transit": { "percentile_50": 2, "percentile_75": 2, "percentile_85": 3, "percentile_90": 3, "percentile_95": 4, "percentile_97": 5, "percentile_99": 8 }, "delivery_date_confidence": 0.68, "estimated_transit_days": 2, "ship_on_date": "2025-05-17" }, "service": "express" }, { "carrier": "usps", "easypost_time_in_transit_data": { "days_in_transit": { "percentile_50": 2, "percentile_75": 2, "percentile_85": 3, "percentile_90": 3, "percentile_95": 4, "percentile_97": 5, "percentile_99": 7 }, "delivery_date_confidence": 0.76, "estimated_transit_days": 2, "ship_on_date": "2025-05-17" }, "service": "groundadvantage" }, { "carrier": "usps", "easypost_time_in_transit_data": { "days_in_transit": { "percentile_50": 2, "percentile_75": 2, "percentile_85": 2, "percentile_90": 3, "percentile_95": 4, "percentile_97": 4, "percentile_99": 6 }, "delivery_date_confidence": 0.81, "estimated_transit_days": 2, "ship_on_date": "2025-05-17" }, "service": "librarymail" }, { "carrier": "usps", "easypost_time_in_transit_data": { "days_in_transit": { "percentile_50": 2, "percentile_75": 2, "percentile_85": 3, "percentile_90": 3, "percentile_95": 4, "percentile_97": 5, "percentile_99": 6 }, "delivery_date_confidence": 0.79, "estimated_transit_days": 2, "ship_on_date": "2025-05-17" }, "service": "mediamail" }, { "carrier": "usps", "easypost_time_in_transit_data": { "days_in_transit": { "percentile_50": 2, "percentile_75": 2, "percentile_85": 3, "percentile_90": 3, "percentile_95": 4, "percentile_97": 5, "percentile_99": 6 }, "delivery_date_confidence": 0.76, "estimated_transit_days": 2, "ship_on_date": "2025-05-17" }, "service": "priority" } ], "saturday_delivery": false, "to_zip": "10002" } ``` --- ## Smart Deliver By ### Example: POST /smartrate/deliver_by #### cURL ```shell curl -X POST https://api.easypost.com/v2/smartrate/deliver_by \ -u "EASYPOST_API_KEY": \ -H 'Content-Type: application/json' \ -d '{ "from_zip": "10001", "planned_ship_date": "2024-07-18", "to_zip": "10002", "carriers": [UPS], }' ``` #### Go ```go package example import ( "fmt" "github.com/EasyPost/easypost-go/v6" ) func retrieveStandaloneSmartrateDeliverBy() { client := easypost.New("EASYPOST_API_KEY") params := &easypost.EstimateDeliveryDateForZipPairParams{ FromZip: "10001", ToZip: "10002", Carriers: []string{"UPS", "FedEx"}, PlannedShipDate: "2024-07-18", } estimates, _ := client.EstimateDeliveryDateForZipPair(params) fmt.Println(estimates) } ``` #### Java ```java package shipments; import com.easypost.exception.EasyPostException; import com.easypost.model.EstimateDeliveryDateForZipPairResult; import com.easypost.service.EasyPostClient; import java.util.Collections; import java.util.HashMap; import java.util.Map; public class RetrieveRecommendShipDate { public static void main(String[] args) throws EasyPostException { EasyPostClient client = new EasyPostClient("EASYPOST_API_KEY"); Map params = new HashMap(); params.put("from_zip", "10001"); params.put("to_zip", "10002"); params.put("planned_ship_date", "2024-07-18"); params.put("carriers", Collections.singletonList("UPS")); EstimateDeliveryDateForZipPairResult results = client.smartRate .estimateDeliveryDate(params); System.out.println(results); } } ``` #### C# ```csharp using System; using System.Collections.Generic; using System.Threading.Tasks; using EasyPost; using Newtonsoft.Json; namespace EasyPostExamples { public class Examples { public static async Task Main() { var client = new EasyPost.Client(new EasyPost.ClientConfiguration("EASYPOST_API_KEY")); EasyPost.Parameters.SmartRate.EstimateDeliveryDateForZipPair estimateDeliveryDateForZipPairParameters = new() { OriginPostalCode = address1Parameters.Zip, DestinationPostalCode = address2Parameters.Zip, PlannedShipDate = Fixtures.PlannedShipDate, Carriers = ["USPS"], }; EasyPost.Models.API.EstimateDeliveryDateForZipPairResult results = await client.SmartRate.EstimateDeliveryDate(estimateDeliveryDateForZipPairParameters); Console.WriteLine(JsonConvert.SerializeObject(results, Formatting.Indented)); } } } ``` #### Node.js ```javascript const EasyPostClient = require('@easypost/api'); const client = new EasyPostClient('EASYPOST_API_KEY'); (async () => { const results = await client.SmartRate.estimateDeliveryDate({ from_zip: '10001', to_zip: '10002', planned_ship_date: '2024-07-18', carriers: ['UPS'], }); console.log(results); })(); ``` #### PHP ```php smartRate->estimateDeliveryDate([ 'from_zip' => '10001', 'to_zip' => '10002', 'planned_ship_date' => '2024-07-18', 'carriers' => ['UPS'], ]); echo $results; ``` #### Python ```python import easypost client = easypost.EasyPostClient("EASYPOST_API_KEY") results = client.smart_rate.estimate_delivery_date( from_zip="10001", to_zip="10002", planned_ship_date="2024-07-18", carriers=["usps"], ) print(results) ``` #### Ruby ```ruby require 'easypost' client = EasyPost::Client.new(api_key: 'EASYPOST_API_KEY') results = client.smart_rate.estimate_delivery_date( from_zip: '10001', to_zip: '10002', planned_ship_date: '2024-07-18', carriers: ['ups'], ) puts results ``` The **/smartrate/deliver_by** endpoint offers advanced predictions of delivery dates based on the entry point into the mailstream and intended delivery timelines. No shipment ID is required. Call the **/smartrate/deliver_by** endpoint by passing the **from_zip**, **to_zip**, an array of **carriers**, and the date the shipment will enter the mailstream using the **planned_ship_date** attribute. Analyze the returned **easypost_time_in_transit_data** object. **NOTE:** Because this API does not require a shipment ID, it will only return time in transit data and no rates. --- ## Smart Deliver On ### Example: POST /smartrate/deliver_on #### cURL ```shell curl -X POST https://api.easypost.com/v2/smartrate/deliver_on \ -u "EASYPOST_API_KEY": \ -H 'Content-Type: application/json' \ -d '{ "from_zip": "10001", "desired_delivery_date": "2024-07-18", "to_zip": "10002", "carriers": [UPS], }' ``` #### Go ```go package example import ( "fmt" "github.com/EasyPost/easypost-go/v6" ) func retrieveStandaloneSmartrateDeliverOn() { client := easypost.New("EASYPOST_API_KEY") params := &easypost.RecommendShipDateForZipPairParams{ FromZip: "10001", ToZip: "10002", Carriers: []string{"UPS", "FedEx"}, DesiredDeliveryDate: "2024-07-18", } recommendations, _ := client.RecommendShipDateForZipPair(params) fmt.Println(recommendations) } ``` #### Java ```java package shipments; import com.easypost.exception.EasyPostException; import com.easypost.model.RecommendShipDateForZipPairResult; import com.easypost.service.EasyPostClient; import java.util.Collections; import java.util.HashMap; import java.util.Map; public class RetrieveRecommendShipDate { public static void main(String[] args) throws EasyPostException { EasyPostClient client = new EasyPostClient("EASYPOST_API_KEY"); Map params = new HashMap(); params.put("from_zip", "10001"); params.put("to_zip", "10002"); params.put("desired_delivery_date", "2024-07-18"); params.put("carriers", Collections.singletonList("UPS")); RecommendShipDateForZipPairResult results = client.smartRate .recommendShipDate(params); System.out.println(results); } } ``` #### C# ```csharp using System; using System.Collections.Generic; using System.Threading.Tasks; using EasyPost; using Newtonsoft.Json; namespace EasyPostExamples { public class Examples { public static async Task Main() { var client = new EasyPost.Client(new EasyPost.ClientConfiguration("EASYPOST_API_KEY")); EasyPost.Parameters.SmartRate.RecommendShipDateForZipPair recommendShipDateForZipPairParameters = new() { OriginPostalCode = address1Parameters.Zip, DestinationPostalCode = address2Parameters.Zip, DesiredDeliveryDate = Fixtures.DesiredDeliveryDate, Carriers = ["USPS"], }; EasyPost.Models.API.RecommendShipDateForZipPairResult results = await client.SmartRate.RecommendShipDate(recommendShipDateForZipPairParameters); Console.WriteLine(JsonConvert.SerializeObject(results, Formatting.Indented)); } } } ``` #### Node.js ```javascript const EasyPostClient = require('@easypost/api'); const client = new EasyPostClient('EASYPOST_API_KEY'); (async () => { const results = await client.SmartRate.recommendShipDate({ from_zip: '10001', to_zip: '10002', desired_delivery_date: '2024-07-18', carriers: ['UPS'], }); console.log(results); })(); ``` #### PHP ```php smartRate->recommendShipDate([ 'from_zip' => '10001', 'to_zip' => '10002', 'desired_delivery_date' => '2024-07-18', 'carriers' => ['UPS'], ]); echo $results; ``` #### Python ```python import easypost client = easypost.EasyPostClient("EASYPOST_API_KEY") results = client.smart_rate.recommend_ship_date( from_zip="10001", to_zip="10002", desired_delivery_date="2024-07-18", carriers=["usps"], ) print(results) ``` #### Ruby ```ruby require 'easypost' client = EasyPost::Client.new(api_key: 'EASYPOST_API_KEY') results = client.smart_rate.recommend_ship_date( from_zip: '10001', to_zip: '10002', desired_delivery_date: '2024-07-18', carriers: ['ups'], ) puts results ``` The **/smartrate/deliver_on** endpoint of the Smart API enhances shipping accuracy by allowing shippers to specify a desired delivery date. The API then suggests the best ship date for each carrier and service level to meet this delivery date. In addition to the suggested **ship_on_date**, a **delivery_date_confidence** score is provided, indicating the likelihood of delivery on the desired date. No shipment ID is required. Call the **/smartrate/deliver_on** endpoint by passing the **from_zip**, **to_zip**, and an array of **carriers** along with the **desired_delivery_date**. Receive recommendations for shipping dates that align with the delivery goals. This endpoint requires the desired_delivery_date parameter to generate highly accurate predictions. **NOTE:** Because this API does not require a shipment ID, it will only return time in transit data and no rates. --- Source: https://docs.easypost.com/docs/trackers # Tracker The `Tracker` object contains tracking information for a package. A `Tracker` is created automatically when a `Shipment` is purchased through EasyPost. For labels not purchases via EasyPost, a `Tracker` can still be created directly through the API. Bring-your-own tracking is **not** the USPS Claims API. USPS indemnity claims via EP Guard apply only to USPS labels purchased through EasyPost. Each `Tracker` is continually updated in the background as packages progress through the delivery lifecycle. Updates are based on information provided by the carrier and are delivered via webhook `Event` if enabled. Each `Tracker` includes both current and historical tracking data. Historical updates are stored in the `tracking_details` array. Each `TrackingDetail` includes: - The status of the package at the time of the scan - A message from the carrier - A `TrackingLocation` containing available location information. The `TrackingLocation` may include: - city - state - country - zip Data availability varies by carrier. When enough location information is present, EasyPost assigns the appropriate local time zone to the event's `datetime`. When location information is incomplete, timestamps default to UTC. Some `Tracker` objects include a `CarrierDetail`, which stores additional carrier-provided information such as: - `service` - `container_type` - Localized delivery estimates (`est_delivery_date_local`, `est_delivery_time_local`) - Origin and destination locations, if available The `delivery_evidence` attribute of a `Tracker` holds proof-of-delivery images returned by supported carriers. It is an array of `DeliveryEvidence` objects, one for each kind of proof, such as a recipient signature. The array is empty when no evidence is available. Delivery evidence is returned only for `Trackers` created when a `Shipment` is purchased through EasyPost. Availability varies by carrier and service level. Supported carriers and evidence types: - FedEx: signature - UPS: signature - USPS: signature EasyPost serves each image from a public, read-only URL. Image URLs aren't guaranteed to remain available, so download and store any image you need to keep. > Note: Delivery evidence must be enabled on your account. For questions, Contact Support. Tracking codes are not globally unique. Carriers recycle codes over time, and the reuse period varies by carrier and service level. EasyPost prevents the creation of duplicate `Trackers` by returning the original `Tracker` when the same `User` submits a request with the same `tracking_code` and `carrier` within the previous three months. --- ## Tracker object | Property | Type | Description | |----------|------|-------------| | id | string | Unique identifier, begins with "trk_" | | object | string | "Tracker" | | mode | string | "test" or "production" | | tracking_code | string | The tracking code provided by the carrier | | status | string | The current status of the package. Possible values: "unknown" "pre_transit" "in_transit" "out_for_delivery" "delivered" "available_for_pickup" "return_to_sender" "failure" "cancelled" "error" | | status_detail | string | Additional details about the current status. Possible values: "address_correction" "arrived_at_destination" "arrived_at_facility" "arrived_at_pickup_location" "awaiting_information" "cancelled" "damaged" "delayed" "delivery_exception" "departed_facility" "departed_origin_facility" "expired" "failure" "held" "in_transit" "label_created" "lost" "missorted" "out_for_delivery" "received_at_destination_facility" "received_at_origin_facility" "refused" "return" "status_update" "transferred_to_destination_carrier" "transit_exception" "unknown" "weather_delay" | | signed_by | string | The name of the person who signed for the package (if available) | | weight | float | The weight of the package as measured by the carrier in ounces (if available) | | est_delivery_date | datetime | The estimated delivery date provided by the carrier (if available) | | shipment_id | string | The ID of the EasyPost Shipment object associated with the Tracker (if any) | | carrier | string | The name of the carrier handling the shipment | | tracking_details | TrackingDetail array | Array of the associated TrackingDetail objects | | carrier_detail | CarrierDetail | The associated CarrierDetail object (if available) | | delivery_evidence | DeliveryEvidence array | Array of the associated DeliveryEvidence objects, which hold proof-of-delivery images from supported carriers. Empty if no delivery evidence is available | | public_url | string | URL to a publicly-accessible webpage that shows tracking details for this tracker | | fees | Fee array | Array of the associated Fee objects | | created_at | datetime | When the Tracker was created | | updated_at | datetime | When the Tracker was last updated | Example Object: ```json { "id": "trk_9135862729734d96ad2f9ed0f0565a27", "object": "Tracker", "mode": "test", "tracking_code": "EZ1000000001", "status": "pre_transit", "status_detail": "status_update", "created_at": "2025-05-09T20:40:17Z", "updated_at": "2025-05-09T20:40:17Z", "signed_by": null, "weight": null, "est_delivery_date": "2025-05-09T20:40:17Z", "shipment_id": null, "carrier": "USPS", "tracking_details": [ { "object": "TrackingDetail", "message": "Pre-Shipment Info Sent to USPS", "description": "", "status": "pre_transit", "status_detail": "status_update", "datetime": "2025-04-09T20:40:17Z", "source": "USPS", "carrier_code": "", "tracking_location": { "object": "TrackingLocation", "city": null, "state": null, "country": null, "zip": null }, "est_delivery_date": null }, { "object": "TrackingDetail", "message": "Shipping Label Created", "description": "", "status": "pre_transit", "status_detail": "status_update", "datetime": "2025-04-10T09:17:17Z", "source": "USPS", "carrier_code": "", "tracking_location": { "object": "TrackingLocation", "city": "HOUSTON", "state": "TX", "country": null, "zip": "77063" }, "est_delivery_date": null } ], "fees": [], "carrier_detail": { "object": "CarrierDetail", "service": "First-Class Package Service", "container_type": null, "est_delivery_date_local": null, "est_delivery_time_local": null, "origin_location": "HOUSTON TX, 77001", "origin_tracking_location": { "object": "TrackingLocation", "city": "HOUSTON", "state": "TX", "country": null, "zip": "77063" }, "destination_location": "CHARLESTON SC, 29401", "destination_tracking_location": null, "guaranteed_delivery_date": null, "alternate_identifier": null, "initial_delivery_attempt": null }, "public_url": "https://track.easypost.com/djE6dHJrXzkxMzU4NjI3Mjk3MzRkOTZhZDJmOWVkMGYwNTY1YTI3" } ``` --- ## TrackingDetail object | Property | Type | Description | |----------|------|-------------| | object | string | "TrackingDetail" | | message | string | Summary of the scan event | | status | string | Status of the package at the time of the scan event. Possible values: "unknown" "pre_transit" "in_transit" "out_for_delivery" "delivered" "available_for_pickup" "return_to_sender" "failure" "cancelled" "error" | | status_detail | string | Additional details about the current status. Possible values: "address_correction" "arrived_at_destination" "arrived_at_facility" "arrived_at_pickup_location" "awaiting_information" "cancelled" "damaged" "delayed" "delivery_exception" "departed_facility" "departed_origin_facility" "expired" "failure" "held" "in_transit" "label_created" "lost" "missorted" "out_for_delivery" "received_at_destination_facility" "received_at_origin_facility" "refused" "return" "status_update" "transferred_to_destination_carrier" "transit_exception" "unknown" "weather_delay" | | datetime | datetime | The timestamp when the tracking scan occurred. When possible, EasyPost assigns a time zone to the timestamp based on the associated tracking_location. | | source | string | The original source of the information for this scan event, usually the carrier | | tracking_location | TrackingLocation | The location associated with the scan event | Example Object: ```json { "object": "TrackingDetail", "message": "Pre-Shipment Info Sent to USPS", "description": "", "status": "pre_transit", "status_detail": "status_update", "datetime": "2025-04-09T20:40:17Z", "source": "USPS", "carrier_code": "", "tracking_location": { "object": "TrackingLocation", "city": null, "state": null, "country": null, "zip": null }, "est_delivery_date": null } ``` --- ## TrackingLocation object | Property | Type | Description | |----------|------|-------------| | object | string | "TrackingLocation" | | city | string | The city where the scan event occurred (if available) | | state | string | The state where the scan event occurred (if available) | | country | string | The country where the scan event occurred (if available) | | zip | string | The postal code where the scan event occurred (if available) | Example Object: ```json { "object": "TrackingLocation", "city": null, "state": null, "country": null, "zip": null } ``` --- ## CarrierDetail object | Property | Type | Description | |----------|------|-------------| | object | string | "CarrierDetail" | | service | string | The service level the associated shipment was shipped with (if available) | | container_type | string | The type of container the associated shipment was shipped in (if available) | | est_delivery_date_local | date | The estimated delivery date as provided by the carrier, in the local time zone (if available) | | est_delivery_time_local | time | The estimated delivery time as provided by the carrier, in the local time zone (if available) | | origin_location | string | The location from which the package originated, stringified for presentation (if available) | | origin_tracking_location | TrackingLocation | The location from which the package originated, broken down by city/state/country/zip (if available) | | destination_location | string | The location to which the package is being sent, stringified for presentation (if available) | | destination_tracking_location | TrackingLocation | The location to which the package is being sent, broken down by city/state/country/zip (if available) | | guaranteed_delivery_date | datetime | The date and time the carrier guarantees the package to be delivered by (if available) | | alternate_identifier | string | An additional tracking identifier provided by the carrier for certain hybrid services (e.g., last-mile tracking number). May be returned at label purchase or populated asynchronously after label purchase. | | initial_delivery_attempt | datetime | The date and time of the first attempt by the carrier to deliver the package (if available) | Example Object: ```json { "object": "CarrierDetail", "service": "First-Class Package Service", "container_type": null, "est_delivery_date_local": null, "est_delivery_time_local": null, "origin_location": "HOUSTON TX, 77001", "origin_tracking_location": { "object": "TrackingLocation", "city": "HOUSTON", "state": "TX", "country": null, "zip": "77063" }, "destination_location": "CHARLESTON SC, 29401", "destination_tracking_location": null, "guaranteed_delivery_date": null, "alternate_identifier": null, "initial_delivery_attempt": null } ``` --- ## DeliveryEvidence object | Property | Type | Description | |----------|------|-------------| | type | string | The kind of proof of delivery. Possible values: "signature" for an image of the recipient signature, or "delivery" for a photo of the delivered package | | image | string | Public, read-only URL of the proof-of-delivery image. Image URLs aren't guaranteed to remain available, so download and store any image you need to keep | Example Object: ```json { "delivery_evidence": [ { "type": "signature", "image": "https://example.com/tracking/delivery_evidence/20250509/0123456789abcdef0123456789abcdef.jpeg" }, { "type": "delivery", "image": "https://example.com/tracking/delivery_evidence/20250509/fedcba9876543210fedcba9876543210.jpeg" } ] } ``` --- ## Testing Specific Tracking States Specific tracking statuses (e.g. "out_for_delivery") can be simulated to test application behavior. EasyPost provides a set of test `tracking_codes` that, when sent to the API, responds with specific tracking statuses and sends a webhook `Event` to a test mode URL. The tracking updates that are sent by these `tracking_codes` will contain canned information, but it will be similar in form to the information normally provided by the carrier selected. --- ### Test Tracking Codes [Content omitted: parameter list rendered dynamically. Review the rendered documentation for complete parameter details.] --- ### Carrier Tracking Strings [Content omitted: parameter list rendered dynamically. Review the rendered documentation for complete parameter details.] --- ## Create a Tracker ### Example: POST /trackers #### cURL ```shell curl -X POST https://api.easypost.com/v2/trackers \ -u "EASYPOST_API_KEY": \ -H 'Content-Type: application/json' \ -d '{ "tracker": { "tracking_code": "EZ1000000001", "carrier": "USPS" } }' ``` #### Go ```go package example import ( "fmt" "github.com/EasyPost/easypost-go/v6" ) func create() { client := easypost.New("EASYPOST_API_KEY") tracker, _ := client.CreateTracker( &easypost.CreateTrackerOptions{ TrackingCode: "EZ1000000001", Carrier: "USPS", }, ) fmt.Println(tracker) } ``` #### Java ```java package trackers; import com.easypost.exception.EasyPostException; import com.easypost.model.Tracker; import com.easypost.service.EasyPostClient; import java.util.HashMap; public class Create { public static void main(String[] args) throws EasyPostException { EasyPostClient client = new EasyPostClient("EASYPOST_API_KEY"); HashMap params = new HashMap(); params.put("tracking_code", "EZ1000000001"); params.put("carrier", "USPS"); Tracker tracker = client.tracker.create(params); System.out.println(tracker); } } ``` #### C# ```csharp using System; using System.Collections.Generic; using System.Threading.Tasks; using EasyPost; using Newtonsoft.Json; namespace EasyPostExamples { public class Examples { public static async Task Main() { var client = new EasyPost.Client(new EasyPost.ClientConfiguration("EASYPOST_API_KEY")); EasyPost.Parameters.Tracker.Create parameters = new() { TrackingCode = "EZ1000000001", Carrier = "USPS" }; EasyPost.Models.API.Tracker tracker = await client.Tracker.Create(parameters); Console.WriteLine(JsonConvert.SerializeObject(tracker, Formatting.Indented)); } } } ``` #### Node.js ```javascript const EasyPostClient = require('@easypost/api'); const client = new EasyPostClient('EASYPOST_API_KEY'); (async () => { const tracker = await client.Tracker.create({ tracking_code: 'EZ1000000001', carrier: 'USPS', }); console.log(tracker); })(); ``` #### PHP ```php tracker->create([ 'tracking_code' => 'EZ1000000001', 'carrier' => 'USPS' ]); echo $tracker; ``` #### Python ```python import easypost client = easypost.EasyPostClient("EASYPOST_API_KEY") tracker = client.tracker.create( tracking_code="EZ1000000001", carrier="USPS", ) print(tracker) ``` #### Ruby ```ruby require 'easypost' client = EasyPost::Client.new(api_key: 'EASYPOST_API_KEY') tracker = client.tracker.create( tracking_code: 'EZ1000000001', carrier: 'USPS', ) puts tracker ``` EasyPost supports two tracking workflows: **Shipment-Based Tracking** and **Standalone Tracking**. ### Shipment-Based Tracking Trackers are automatically created when a `Shipment` is purchased through the EasyPost API. Tracking information is tied to the `Shipment` and updates as the carrier provides new events. This is the most common tracking workflow and requires no separate `Tracker` creation. If the shipment was created with `shipment.is_return: true`, the shipment-created tracker is classified as a return tracker. ### Standalone Tracking A `Tracker` can be created using only a `tracking_code`, without creating a `Shipment`. This is referred to as Standalone Tracking and is commonly used when shipping labels are purchased outside of EasyPost and EasyPost is used solely for parcel tracking. Optionally, the `carrier` parameter can be included to specify the shipping carrier. If no `carrier` is provided, EasyPost attempts to determine the carrier based on the `tracking_code`. Providing a `carrier` is recommended, as some tracking codes are ambiguous and may match multiple carriers. Explicitly setting the `carrier` also improves response time by avoiding carrier auto-detection. Standalone tracker creation also supports `tracker.options.is_return`. - Default behavior: omitted means `false` (non-return classification) - Scope: create-time option for `POST /trackers` (not an update operation) - Scope note: this option applies to standalone tracker creation. Shipment-created trackers use shipment return classification. `tracker.options.is_return` is separate from `shipment.is_return`: - `shipment.is_return` controls return-label creation behavior and carrier return semantics when creating a `Shipment` - `tracker.options.is_return` controls standalone tracker classification For delayed-use return-label workflows, expiry timing, duplicate behavior, and polling tradeoffs, see the Tracking Guide. Some carriers restrict access to tracking data when requests originate from third-party platforms. In these cases, carrier-specific credentials may be required to retrieve tracking updates. Tracking availability and authentication requirements vary by carrier and may change over time. To minimize unnecessary resource usage, EasyPost prevents the creation of duplicate `Trackers`. A `Tracker` is considered a duplicate if another `Tracker` with the same `tracking_code`, `carrier`, and return classification (`tracker.options.is_return`) was created by the same `User` within the previous three months. In such cases, the original `Tracker` is returned. When this happens, the returned tracker keeps its original `created_at` value. If return classification changes (`true` vs `false`) while `tracking_code` and `carrier` are the same, that request is treated as a different tracker identity. [Note: This object is immutable after creation. Review the rendered documentation for details.] --- ## Retrieve all Trackers ### Example: GET /trackers #### cURL ```shell curl -X GET "https://api.easypost.com/v2/trackers?page_size=5" \ -u "EASYPOST_API_KEY": ``` #### Go ```go package example import ( "fmt" "github.com/EasyPost/easypost-go/v6" ) func list() { client := easypost.New("EASYPOST_API_KEY") trackers, _ := client.ListTrackers( &easypost.ListTrackersOptions{ PageSize: 5, }, ) fmt.Println(trackers) } ``` #### Java ```java package trackers; import com.easypost.exception.EasyPostException; import com.easypost.model.TrackerCollection; import com.easypost.service.EasyPostClient; import java.util.HashMap; public class All { public static void main(String[] args) throws EasyPostException { EasyPostClient client = new EasyPostClient("EASYPOST_API_KEY"); HashMap params = new HashMap<>(); params.put("page_size", 5); TrackerCollection trackers = client.tracker.all(params); System.out.println(trackers); } } ``` #### C# ```csharp using System; using System.Collections.Generic; using System.Threading.Tasks; using EasyPost; using Newtonsoft.Json; namespace EasyPostExamples { public class Examples { public static async Task Main() { var client = new EasyPost.Client(new EasyPost.ClientConfiguration("EASYPOST_API_KEY")); EasyPost.Parameters.Tracker.All parameters = new() { PageSize = 5 }; EasyPost.Models.API.TrackerCollection trackerCollection = await client.Tracker.All(parameters); Console.WriteLine(JsonConvert.SerializeObject(trackerCollection, Formatting.Indented)); } } } ``` #### Node.js ```javascript const EasyPostClient = require('@easypost/api'); const client = new EasyPostClient('EASYPOST_API_KEY'); (async () => { const trackers = await client.Tracker.all({ page_size: 5, }); console.log(trackers); })(); ``` #### PHP ```php tracker->all([ 'page_size' => 5, ]); echo $trackers; ``` #### Python ```python import easypost client = easypost.EasyPostClient("EASYPOST_API_KEY") trackers = client.tracker.all( page_size=5, ) print(trackers) ``` #### Ruby ```ruby require 'easypost' client = EasyPost::Client.new(api_key: 'EASYPOST_API_KEY') trackers = client.tracker.all( page_size: 5, ) puts trackers ``` Retrieves a list of all `Tracker` objects associated with the given `API Key`. See the Pagination section for more details on retrieving all records when multiple pages are available. The `Tracker` List endpoint is the recommended method of retrieving a `Tracker` by `tracking_code` or `carrier`. Unlike retrieving a `Tracker` using the retrieve endpoint, which accepts an `id`, this endpoint accepts the `tracking_code` as the search parameter. Typically, only one `Tracker` exists for a given `tracking_code`, but results can be further filtered by including the `carrier` parameter in the request. If you need to retrieve multiple specific trackers in a single request, use `POST /trackers/batch`. --- ## Retrieve a Batch of Trackers ### Example: POST /trackers/batch #### cURL ```shell curl -X POST https://api.easypost.com/v2/trackers \ -u "EASYPOST_API_KEY": \ -H 'Content-Type: application/json' \ -d '{ "tracker": { "tracking_code": "EZ1000000001", "carrier": "USPS" } }' ``` #### Go ```go package example import ( "fmt" "github.com/EasyPost/easypost-go/v6" ) func create() { client := easypost.New("EASYPOST_API_KEY") tracker, _ := client.CreateTracker( &easypost.CreateTrackerOptions{ TrackingCode: "EZ1000000001", Carrier: "USPS", }, ) fmt.Println(tracker) } ``` #### Java ```java package trackers; import com.easypost.exception.EasyPostException; import com.easypost.model.Tracker; import com.easypost.service.EasyPostClient; import java.util.HashMap; public class Create { public static void main(String[] args) throws EasyPostException { EasyPostClient client = new EasyPostClient("EASYPOST_API_KEY"); HashMap params = new HashMap(); params.put("tracking_code", "EZ1000000001"); params.put("carrier", "USPS"); Tracker tracker = client.tracker.create(params); System.out.println(tracker); } } ``` #### C# ```csharp using System; using System.Collections.Generic; using System.Threading.Tasks; using EasyPost; using Newtonsoft.Json; namespace EasyPostExamples { public class Examples { public static async Task Main() { var client = new EasyPost.Client(new EasyPost.ClientConfiguration("EASYPOST_API_KEY")); EasyPost.Parameters.Tracker.Create parameters = new() { TrackingCode = "EZ1000000001", Carrier = "USPS" }; EasyPost.Models.API.Tracker tracker = await client.Tracker.Create(parameters); Console.WriteLine(JsonConvert.SerializeObject(tracker, Formatting.Indented)); } } } ``` #### Node.js ```javascript const EasyPostClient = require('@easypost/api'); const client = new EasyPostClient('EASYPOST_API_KEY'); (async () => { const tracker = await client.Tracker.create({ tracking_code: 'EZ1000000001', carrier: 'USPS', }); console.log(tracker); })(); ``` #### PHP ```php tracker->create([ 'tracking_code' => 'EZ1000000001', 'carrier' => 'USPS' ]); echo $tracker; ``` #### Python ```python import easypost client = easypost.EasyPostClient("EASYPOST_API_KEY") tracker = client.tracker.create( tracking_code="EZ1000000001", carrier="USPS", ) print(tracker) ``` #### Ruby ```ruby require 'easypost' client = EasyPost::Client.new(api_key: 'EASYPOST_API_KEY') tracker = client.tracker.create( tracking_code: 'EZ1000000001', carrier: 'USPS', ) puts tracker ``` Retrieves multiple `Tracker` objects at once by passing an array of `tracking_codes`. --- ## Retrieve a Tracker ### Example: GET /trackers/:id #### cURL ```shell curl -X GET https://api.easypost.com/v2/trackers/trk_... \ -u "EASYPOST_API_KEY": ``` #### Go ```go package example import ( "fmt" "github.com/EasyPost/easypost-go/v6" ) func retrieve() { client := easypost.New("EASYPOST_API_KEY") tracker, _ := client.GetTracker("trk_...") fmt.Println(tracker) } ``` #### Java ```java package trackers; import com.easypost.exception.EasyPostException; import com.easypost.model.Tracker; import com.easypost.service.EasyPostClient; public class Retrieve { public static void main(String[] args) throws EasyPostException { EasyPostClient client = new EasyPostClient("EASYPOST_API_KEY"); Tracker tracker = client.tracker.retrieve("trk_..."); System.out.println(tracker); } } ``` #### C# ```csharp using System; using System.Collections.Generic; using System.Threading.Tasks; using EasyPost; using Newtonsoft.Json; namespace EasyPostExamples { public class Examples { public static async Task Main() { var client = new EasyPost.Client(new EasyPost.ClientConfiguration("EASYPOST_API_KEY")); EasyPost.Models.API.Tracker tracker = await client.Tracker.Retrieve("trk_..."); Console.WriteLine(JsonConvert.SerializeObject(tracker, Formatting.Indented)); } } } ``` #### Node.js ```javascript const EasyPostClient = require('@easypost/api'); const client = new EasyPostClient('EASYPOST_API_KEY'); (async () => { const tracker = await client.Tracker.retrieve('trk_...'); console.log(tracker); })(); ``` #### PHP ```php tracker->retrieve('trk_...'); echo $tracker; ``` #### Python ```python import easypost client = easypost.EasyPostClient("EASYPOST_API_KEY") tracker = client.tracker.retrieve("trk_...") print(tracker) ``` #### Ruby ```ruby require 'easypost' client = EasyPost::Client.new(api_key: 'EASYPOST_API_KEY') tracker = client.tracker.retrieve('trk_...') puts tracker ``` Retrieve a `Tracker` by its `id`. If you need to retrieve more than one tracker at a time, use `POST /trackers/batch`. --- ## Delete a Tracker ### Example: DELETE /trackers/:id #### cURL ```shell curl -X DELETE https://api.easypost.com/v2/trackers/trk_... \ -u "EASYPOST_API_KEY": ``` #### Go ```go package example import ( "fmt" "github.com/EasyPost/easypost-go/v6" ) func delete() { client := easypost.New("EASYPOST_API_KEY") err := client.DeleteTracker("trk_...") fmt.Println(err) } ``` #### Java ```java package trackers; import com.easypost.exception.EasyPostException; import com.easypost.service.EasyPostClient; public class Delete { public static void main(String[] args) throws EasyPostException { EasyPostClient client = new EasyPostClient("EASYPOST_API_KEY"); client.tracker.delete("trk_..."); } } ``` #### C# ```csharp using System; using System.Collections.Generic; using System.Threading.Tasks; using EasyPost; using Newtonsoft.Json; namespace EasyPostExamples { public class Examples { public static async Task Main() { var client = new EasyPost.Client(new EasyPost.ClientConfiguration("EASYPOST_API_KEY")); await client.Tracker.Delete("trk_..."); } } } ``` #### Node.js ```javascript const EasyPostClient = require('@easypost/api'); const client = new EasyPostClient('EASYPOST_API_KEY'); (async () => { await client.Tracker.delete('trk_...'); })(); ``` #### PHP ```php tracker->delete('trk_...'); ``` #### Python ```python import easypost client = easypost.EasyPostClient("EASYPOST_API_KEY") client.tracker.delete("trk_...") ``` #### Ruby ```ruby require 'easypost' client = EasyPost::Client.new(api_key: 'EASYPOST_API_KEY') client.tracker.delete('trk_...') ``` Delete a tracker object using its `id`. This action is permanent and stops all future webhook `Event` deliveries associated with the `Tracker`. Once a tracker is deleted, any attempt to retrieve it using the `GET /trackers/:id` endpoint will return a `404 Not Found` response. --- Source: https://docs.easypost.com/docs/users/billing # Billing The `Billing` functions enable account billing management by adding or deleting payment methods (credit cards and bank accounts), listing available payment methods, and funding wallets. All endpoints are only available in production environments. **Note**: Billing behavior depends on the carrier account type. - **Wallet Carriers:** Charges are billed through the EasyPost Wallet, either at label purchase (bill-on-creation) or when the carrier scans the package (bill-on-scan). - **BYOCA:** Charges are billed directly by the carrier. EasyPost does not process these payments. For more details, review the individual Carrier Guides, and the EasyPost Wallet and Bring Your Own Carrier Account Plans Help Center article. --- **Production Only** ## Create Credit Card **Important**: This endpoint is only applicable for `ReferralCustomers` or for managing Parent `User`accounts. If you feel this is applicable to your use case, please contact sales. This section describes the steps to securely collect and store credit card details for `ReferralCustomers` using EasyPost's integration with Stripe. This process includes obtaining a `client_secret`, securely collecting card details with Stripe.js, and storing the payment method using EasyPost's `/v2/credit_cards` endpoint. ### Obtain a Client Secret ### Example: POST /beta/setup_intents #### cURL ```shell curl -X POST "https://api.easypost.com/beta/setup_intents" \ -u "$REFERRAL_USER_API_KEY:" \ -H "Content-Type: application/json" ``` #### Go ```go package example import ( "fmt" "github.com/EasyPost/easypost-go/v6" ) func createStripeCreditCardSecret() { client := easypost.New("EASYPOST_API_KEY") response, _ := client.BetaCreateCreditCardClientSecret() fmt.Println(response) } ``` #### Java ```java package billing; import com.easypost.exception.EasyPostException; import com.easypost.service.EasyPostClient; public class CreateStripeCreditCardSecret { public static void main(String[] args) throws EasyPostException { EasyPostClient client = new EasyPostClient("EASYPOST_API_KEY"); ClientSecret response = client.betaReferralCustomer.createCreditCardClientSecret(); System.out.println(response); } } ``` #### C# ```csharp using System; using System.Collections.Generic; using System.Threading.Tasks; using EasyPost; using Newtonsoft.Json; namespace EasyPostExamples { public class Examples { public static async Task Main() { var client = new EasyPost.Client(new EasyPost.ClientConfiguration("EASYPOST_API_KEY")); EasyPost.Models.API.StripeClientSecret response = await client.Beta.ReferralCustomer.CreateCreditCardClientSecret(); Console.WriteLine(JsonConvert.SerializeObject(response, Formatting.Indented)); } } } ``` #### Node.js ```javascript const EasyPostClient = require('@easypost/api'); const client = new EasyPostClient('EASYPOST_API_KEY'); (async () => { const response = await client.BetaReferralCustomer.createCreditCardClientSecret(); console.log(response); })(); ``` #### PHP ```php betaReferralCustomer->createCreditCardClientSecret(); echo $response; ``` #### Python ```python import easypost client = easypost.EasyPostClient("EASYPOST_API_KEY") response = client.beta_referral_customer.create_credit_card_client_secret() print(response) ``` #### Ruby ```ruby require 'easypost' client = EasyPost::Client.new(api_key: 'EASYPOST_API_KEY') response = client.beta_referral_customer.create_credit_card_client_secret puts response ``` Call the `beta/setup_intents` endpoint to get a `client_secret` for securely collecting credit card details. ### Confirm the SetupIntents via Stripe.js Use the `client_secret` obtained in the previous step to confirm the `SetupIntents` via Stripe.js. This step securely collects card details from the user. - Create a Stripe Element using the client secret from the SetupIntents. - Create a Payment Method using the Stripe Element. ### Store the Payment Method with EasyPost ### Example: POST /credit_cards #### cURL ```shell curl -X POST "https://api.easypost.com/v2/credit_cards" \ -u "$REFERRAL_USER_API_KEY:" \ -H "Content-Type: application/json" \ -d '{ "credit_card": { "payment_method_id": "pm_...", "priority": "primary" } }' ``` #### Go ```go package example import ( "fmt" "github.com/EasyPost/easypost-go/v6" ) func addStripeCreditCard() { client := easypost.New("EASYPOST_API_KEY") creditCard, _ := client.AddReferralCustomerCreditCardFromStripe( "REFERRAL_USER_API_KEY", "seti_...", easypost.PrimaryPaymentMethodPriority, ) fmt.Println(creditCard) } ``` #### Java ```java package billing; import com.easypost.exception.EasyPostException; import com.easypost.model.PaymentMethod; import com.easypost.service.EasyPostClient; public class CreateStripeCreditCardSecret { public static void main(String[] args) throws EasyPostException { EasyPostClient client = new EasyPostClient("EASYPOST_API_KEY"); PaymentMethodObject paymentMethod = client.referralCustomer.addCreditCardFromStripe( "REFERRAL_USER_API_KEY", "seti_...", PaymentMethod.Priority.PRIMARY ); System.out.println(paymentMethod); } } ``` #### C# ```csharp using System; using System.Collections.Generic; using System.Threading.Tasks; using EasyPost; using Newtonsoft.Json; namespace EasyPostExamples { public class Examples { public static async Task Main() { var client = new EasyPost.Client(new EasyPost.ClientConfiguration("EASYPOST_API_KEY")); EasyPost.Models.API.PaymentMethod paymentMethod = await Client.ReferralCustomer.AddCreditCardFromStripe( "REFERRAL_USER_API_KEY", "seti_...", EasyPost.Models.API.PaymentMethod.Priority.Primary ); Console.WriteLine(JsonConvert.SerializeObject(paymentMethod, Formatting.Indented)); } } } ``` #### Node.js ```javascript const EasyPostClient = require('@easypost/api'); const client = new EasyPostClient('EASYPOST_API_KEY'); (async () => { const paymentMethod = await client.ReferralCustomer.addCreditCardFromStripe( 'REFERRAL_USER_API_KEY', 'seti_...', 'primary', ); console.log(paymentMethod); })(); ``` #### PHP ```php referralCustomer->addCreditCardFromStripe( 'REFERRAL_USER_API_KEY', 'seti_...', 'primary', ); echo $paymentMethod; ``` #### Python ```python import easypost client = easypost.EasyPostClient("EASYPOST_API_KEY") payment_method = client.referral_customer.add_credit_card_from_stripe( referral_api_key="REFERRAL_USER_API_KEY", payment_method_id="seti_...", priority="primary", ) print(payment_method) ``` #### Ruby ```ruby require 'easypost' client = EasyPost::Client.new(api_key: 'EASYPOST_API_KEY') payment_method = client.referral_customer.add_credit_card_from_stripe( 'REFERRAL_USER_API_KEY', 'seti_...', 'primary', ) puts payment_method ``` Call the `/v2/credit_cards` endpoint with the resulting `payment_method_id` returned by Stripe. For additional details, refer to Stripe's SetupIntent Confirmation for Cards. --- **Production Only** ## ACH Integration (For Bank Accounts) This section explains the process for securely linking bank accounts for ACH payments using Stripe Financial Connections. ### Collect Bank Account Details ### Example: POST /beta/financial_connections_sessions #### cURL ```shell curl -X POST "https://api.easypost.com/beta/financial_connections_sessions" \ -u "$REFERRAL_USER_API_KEY:" \ -H "Content-Type: application/json" \ -d '{ "return_url": "https://www.yourwebsite.com/redirect" }' ``` #### Go ```go package example import ( "fmt" "github.com/EasyPost/easypost-go/v6" ) func createStripeBankAccountSecret() { client := easypost.New("EASYPOST_API_KEY") response, _ := client.BetaCreateBankAccountClientSecret() fmt.Println(response) } ``` #### Java ```java package billing; import com.easypost.exception.EasyPostException; import com.easypost.service.EasyPostClient; public class CreateStripeBankAccountSecret { public static void main(String[] args) throws EasyPostException { EasyPostClient client = new EasyPostClient("EASYPOST_API_KEY"); ClientSecret response = client.betaReferralCustomer.createBankAccountClientSecret(); System.out.println(response); } } ``` #### C# ```csharp using System; using System.Collections.Generic; using System.Threading.Tasks; using EasyPost; using Newtonsoft.Json; namespace EasyPostExamples { public class Examples { public static async Task Main() { var client = new EasyPost.Client(new EasyPost.ClientConfiguration("EASYPOST_API_KEY")); EasyPost.Models.API.StripeClientSecret response = await client.Beta.ReferralCustomer.CreateBankAccountClientSecret(); Console.WriteLine(JsonConvert.SerializeObject(response, Formatting.Indented)); } } } ``` #### Node.js ```javascript const EasyPostClient = require('@easypost/api'); const client = new EasyPostClient('EASYPOST_API_KEY'); (async () => { const response = await client.BetaReferralCustomer.createBankAccountClientSecret(); console.log(response); })(); ``` #### PHP ```php betaReferralCustomer->createBankAccountClientSecret(); echo $response; ``` #### Python ```python import easypost client = easypost.EasyPostClient("EASYPOST_API_KEY") response = client.beta_referral_customer.create_bank_account_client_secret() print(response) ``` #### Ruby ```ruby require 'easypost' client = EasyPost::Client.new(api_key: 'EASYPOST_API_KEY') response = client.beta_referral_customer.create_bank_account_client_secret puts response ``` Call the `/beta/financial_connections_sessions` endpoint. ### Securely Link a Bank Account with Stripe.js After receiving the `client_secret`, use Stripe.js to guide the customer through the Financial Connections process. This step allows the customer to securely log in and select a bank account. Refer to Stripe Financial Connections Process for more details. ### Create a Bank Account ### Example: POST /bank_accounts #### cURL ```shell curl -X POST "https://api.easypost.com/v2/bank_accounts" \ -u "$REFERRAL_USER_API_KEY:" \ -H "Content-Type: application/json" \ -d '{ "financial_connections_id": "fca_...", "mandate_data": { "ip_address": "127.0.0.1", "user_agent": "Mozilla/5.0", "accepted_at": 1722510730, }, "priority": "primary" }' ``` #### Go ```go package example import ( "fmt" "github.com/EasyPost/easypost-go/v6" ) func addStripeBankAccount() { client := easypost.New("EASYPOST_API_KEY") bankAccount, _ := client.AddReferralCustomerBankAccountFromStripe( "REFERRAL_USER_API_KEY", "fca_...", &easypost.MandateData{ IPAddress: "127.0.0.1", UserAgent: "Mozilla/5.0", AcceptedAt: 1722510730, }, easypost.PrimaryPaymentMethodPriority, ) fmt.Println(bankAccount) } ``` #### Java ```java package billing; import com.easypost.exception.EasyPostException; import com.easypost.model.PaymentMethod; import com.easypost.service.EasyPostClient; public class CreateStripeCreditCardSecret { public static void main(String[] args) throws EasyPostException { EasyPostClient client = new EasyPostClient("EASYPOST_API_KEY"); HashMap mandateData = new HashMap(); mandateData.put("ip_address", "127.0.0.1"); mandateData.put("user_agent", "Mozilla/5.0"); mandateData.put("accepted_at", 1722510730); PaymentMethodObject paymentMethod = client.referralCustomer.addBankAccountFromStripe( "REFERRAL_USER_API_KEY", "fca_...", mandateData, PaymentMethod.Priority.PRIMARY ); System.out.println(paymentMethod); } } ``` #### C# ```csharp using System; using System.Collections.Generic; using System.Threading.Tasks; using EasyPost; using Newtonsoft.Json; namespace EasyPostExamples { public class Examples { public static async Task Main() { var client = new EasyPost.Client(new EasyPost.ClientConfiguration("EASYPOST_API_KEY")); EasyPost.Models.API.PaymentMethod paymentMethod = await Client.ReferralCustomer.AddBankAccountFromStripe( "REFERRAL_USER_API_KEY", "fca_...", new Dictionary { { "ip_address", "127.0.0.1" }, { "user_agent", "Mozilla/5.0" }, { "accepted_at", 1722510730 } }, EasyPost.Models.API.PaymentMethod.Priority.Primary ); Console.WriteLine(JsonConvert.SerializeObject(paymentMethod, Formatting.Indented)); } } } ``` #### Node.js ```javascript const EasyPostClient = require('@easypost/api'); const client = new EasyPostClient('EASYPOST_API_KEY'); (async () => { const paymentMethod = await client.ReferralCustomer.addBankAccountFromStripe( 'REFERRAL_USER_API_KEY', 'fca_...', { ip_address: '127.0.0.1', user_agent: 'Mozilla/5.0', accepted_at: 172251073, }, 'primary', ); console.log(paymentMethod); })(); ``` #### PHP ```php referralCustomer->addBankAccountFromStripe( 'REFERRAL_USER_API_KEY', 'fca_...', [ 'ip_address' => '127.0.0.1', 'user_agent' => 'Mozilla/5.0', 'accepted_at' => 172251073, ], 'primary', ); echo $paymentMethod; ``` #### Python ```python import easypost client = easypost.EasyPostClient("EASYPOST_API_KEY") payment_method = client.referral_customer.add_bank_account_from_stripe( referral_api_key="REFERRAL_USER_API_KEY", financial_connections_id="fca_...", mandate_data={ "ip_address": "127.0.0.1", "user_agent": "Mozilla/5.0", "accepted_at": 172251073, }, priority="primary", ) print(payment_method) ``` #### Ruby ```ruby require 'easypost' client = EasyPost::Client.new(api_key: 'EASYPOST_API_KEY') payment_method = client.referral_customer.add_bank_account_from_stripe( 'REFERRAL_USER_API_KEY', 'fca_...', { ip_address: '127.0.0.1', user_agent: 'Mozilla/5.0', accepted_at: 172_251_073, }, 'primary', ) puts payment_method ``` Once the bank account is linked, Stripe returns an `account_id` (e.g., `fca_…`). Use this `account_id` to call the `/v2/bank_accounts` endpoint with mandate data and the account owner's full name. --- **Production Only** ## Add Funds to your wallet (One-Time Charge) ### Example: Add Funds #### cURL ```shell # Fund wallet by using credit card payment method curl -X POST https://api.easypost.com/v2/credit_cards/card_.../charges \ -u "EASYPOST_API_KEY": \ -H 'Content-Type: application/json' \ -d '{ "amount": "2000" }' # Fund wallet by using bank account payment method curl -X POST https://api.easypost.com/v2/bank_accounts/bank_.../charges \ -u "EASYPOST_API_KEY": \ -H 'Content-Type: application/json' \ -d '{ "amount": "2000" }' ``` #### Go ```go package example import ( "github.com/EasyPost/easypost-go/v6" ) func fund() { client := easypost.New("EASYPOST_API_KEY") _ = client.FundWallet("2000", easypost.PrimaryPaymentMethodPriority) } ``` #### Java ```java package billing; import com.easypost.exception.EasyPostException; import com.easypost.model.PaymentMethod; import com.easypost.service.EasyPostClient; public class Fund { public static void main(String[] args) throws EasyPostException { EasyPostClient client = new EasyPostClient("EASYPOST_API_KEY"); client.billing.fundWallet("2000", PaymentMethod.Priority.PRIMARY); } } ``` #### C# ```csharp using System; using System.Collections.Generic; using System.Threading.Tasks; using EasyPost; using Newtonsoft.Json; namespace EasyPostExamples { public class Examples { public static async Task Main() { var client = new EasyPost.Client(new EasyPost.ClientConfiguration("EASYPOST_API_KEY")); await client.Billing.FundWallet("2000", PaymentMethod.Priority.Primary); } } } ``` #### Node.js ```javascript const EasyPostClient = require('@easypost/api'); const client = new EasyPostClient('EASYPOST_API_KEY'); (async () => { await client.Billing.fundWallet('2000', 'primary'); })(); ``` #### PHP ```php billing->fundWallet(2000, 'primary'); ``` #### Python ```python import easypost client = easypost.EasyPostClient("EASYPOST_API_KEY") client.billing.fund_wallet( amount="2000", primary_or_secondary="primary", ) ``` #### Ruby ```ruby require 'easypost' client = EasyPost::Client.new(api_key: 'EASYPOST_API_KEY') client.billing.fund_wallet('2000', 'primary') ``` Fund the EasyPost wallet by charging a primary or secondary payment method on file. **The amount added must be greater than or equal to the current balance.** Adding funds with one-time charges is **optional**, as EasyPost uses an automatic recharge system to maintain a wallet balance. The API response for this endpoint is empty. EasyPost's client libraries return `true` if the API call is successful; otherwise, an error is thrown. --- **Production Only** ## Retrieve Payment Methods ### Example: GET /payment_methods #### cURL ```shell curl -X GET https://api.easypost.com/v2/payment_methods \ -u "EASYPOST_API_KEY": ``` #### Go ```go package example import ( "fmt" "github.com/EasyPost/easypost-go/v6" ) func list() { client := easypost.New("EASYPOST_API_KEY") paymentMethods, _ := client.RetrievePaymentMethods() fmt.Println(paymentMethods) } ``` #### Java ```java package billing; import com.easypost.exception.EasyPostException; import com.easypost.model.PaymentMethod; import com.easypost.service.EasyPostClient; public class All { public static void main(String[] args) throws EasyPostException { EasyPostClient client = new EasyPostClient("EASYPOST_API_KEY"); PaymentMethod paymentMethods = client.billing.retrievePaymentMethods(); System.out.println(paymentMethods); } } ``` #### C# ```csharp using System; using System.Collections.Generic; using System.Threading.Tasks; using EasyPost; using Newtonsoft.Json; namespace EasyPostExamples { public class Examples { public static async Task Main() { var client = new EasyPost.Client(new EasyPost.ClientConfiguration("EASYPOST_API_KEY")); EasyPost.Models.API.PaymentMethodsSummary paymentMethodsSummary = await client.Billing.RetrievePaymentMethodsSummary(); Console.WriteLine(JsonConvert.SerializeObject(paymentMethodsSummary, Formatting.Indented)); } } } ``` #### Node.js ```javascript const EasyPostClient = require('@easypost/api'); const client = new EasyPostClient('EASYPOST_API_KEY'); (async () => { const paymentMethods = await client.Billing.retrievePaymentMethods(); console.log(paymentMethods); })(); ``` #### PHP ```php billing->retrievePaymentMethods(); echo $paymentMethods; ``` #### Python ```python import easypost client = easypost.EasyPostClient("EASYPOST_API_KEY") payment_methods = client.billing.retrieve_payment_methods() print(payment_methods) ``` #### Ruby ```ruby require 'easypost' client = EasyPost::Client.new(api_key: 'EASYPOST_API_KEY') payment_methods = client.billing.retrieve_payment_methods puts payment_methods ``` List payment methods associated with an account. --- **Production Only** ## Delete a Payment Method ### Example: DELETE Payment #### cURL ```shell curl -X DELETE https://api.easypost.com/v2/credit_cards/card_... \ -u "EASYPOST_API_KEY": ``` #### Go ```go package example import ( "fmt" "github.com/EasyPost/easypost-go/v6" ) func delete() { client := easypost.New("EASYPOST_API_KEY") err := client.DeletePaymentMethod(easypost.PrimaryPaymentMethodPriority) fmt.Println(err) } ``` #### Java ```java package billing; import com.easypost.exception.EasyPostException; import com.easypost.model.PaymentMethod; import com.easypost.service.EasyPostClient; public class Delete { public static void main(String[] args) throws EasyPostException { EasyPostClient client = new EasyPostClient("EASYPOST_API_KEY"); client.billing.deletePaymentMethod(PaymentMethod.Priority.PRIMARY); } } ``` #### C# ```csharp using System; using System.Collections.Generic; using System.Threading.Tasks; using EasyPost; using Newtonsoft.Json; namespace EasyPostExamples { public class Examples { public static async Task Main() { var client = new EasyPost.Client(new EasyPost.ClientConfiguration("EASYPOST_API_KEY")); await client.Billing.DeletePaymentMethod(PaymentMethod.Priority.Primary); } } } ``` #### Node.js ```javascript const EasyPostClient = require('@easypost/api'); const client = new EasyPostClient('EASYPOST_API_KEY'); (async () => { await client.Billing.deletePaymentMethod('primary'); })(); ``` #### PHP ```php billing->deletePaymentMethod('primary'); ``` #### Python ```python import easypost client = easypost.EasyPostClient("EASYPOST_API_KEY") client.billing.delete_payment_method(primary_or_secondary="primary") ``` #### Ruby ```ruby require 'easypost' client = EasyPost::Client.new(api_key: 'EASYPOST_API_KEY') client.referral_customer.delete('primary') ``` Delete a payment method. The functions in our client libraries accept a `priority` parameter (`primary` or `secondary`), which abstracts the need to pass in payment method IDs or change endpoints used. The API response for this endpoint is empty. The functions in our client libraries will return `true` if the API call succeeds or an error if it fails. --- Source: https://docs.easypost.com/docs/users/brand # Brand The `Brand` object allows you to customize the publicly-accessible HMTL page that shows tracking details for every EasyPost tracker. You can change your logo, brand color, include an ad to keep your customers engaged, as well as some other theme-specific details to customize the way your tracking pages will look. Your `Brand` can be set from the EasyPost dashboard or via the API. --- ## Brand object | Property | Type | Description | |----------|------|-------------| | id | string | Unique, begins with 'brd_' | | background_color | string | Valid hex code | | color | string | Valid hex code | | logo | string | Base64-encoded string for a PNG, GIF, JPEG, or SVG | | logo_href | string | Valid URL, under 255 characters | | ad | string | Base64-encoded string for a PNG, GIF, JPEG, or SVG | | ad_href | string | Valid URL, under 255 characters | | name | string | The name associated with the User object | | user_id | string | The ID of the User object | | theme | string | The name of the theme template. Possible values: theme1 theme2 | Example Object: ```json { "ad": null, "ad_href": null, "background_color": null, "color": "#123456", "id": "brd_aa3f5a1043ca46cf8e2e9b879c9a5895", "logo": "https://assets.easypost.com/assets/images/branding/easypost-primary-logo.7324aa54b64b34d6cd70ca5ba4d1842d.svg", "logo_href": "https://www.easypost.com", "name": "EasyPost", "object": "Brand", "theme": "theme1", "user_id": "user_060ab38db3c04ffaa60f262e5781a9be" } ``` --- ## Update a Brand ### Example: PATCH /users/:id/brand #### cURL ```shell curl -X PATCH https://api.easypost.com/v2/users/user_.../brand \ -u "EASYPOST_API_KEY": \ -H 'Content-Type: application/json' \ -d '{ "brand": { "background_color": "#FFFFFF", "color": "#303F9F", "logo": "data:image/png;base64,iVBORw0K...", "logo_href": "https://easypost.com", "ad": "null", "ad_href": "null", "theme": "theme1" } }' ``` #### Go ```go package example import ( "fmt" "github.com/EasyPost/easypost-go/v6" ) func brand() { client := easypost.New("EASYPOST_API_KEY") brand, _ := client.UpdateBrand( "user_...", map[string]interface{}{ "color": "#303F9F", }, ) fmt.Println(brand) } ``` #### Java ```java package brand; import com.easypost.exception.EasyPostException; import com.easypost.model.Brand; import com.easypost.service.EasyPostClient; import java.util.HashMap; public class Update { public static void main(String[] args) throws EasyPostException { EasyPostClient client = new EasyPostClient("EASYPOST_API_KEY"); HashMap params = new HashMap<>(); params.put("color", "303F9F"); Brand brand = client.user.updateBrand("user_...", params); System.out.println(brand); } } ``` #### C# ```csharp using System; using System.Collections.Generic; using System.Threading.Tasks; using EasyPost; using Newtonsoft.Json; namespace EasyPostExamples { public class Examples { public static async Task Main() { var client = new EasyPost.Client(new EasyPost.ClientConfiguration("EASYPOST_API_KEY")); EasyPost.Parameters.User.UpdateBrand parameters = new() { BackgroundColorHexCode = "#FFFFFF", ColorHexCode = "#303F9F", LogoBase64 = "data:image/png;base64,iVBORw0K...", LogoUrl = "https://easypost.com", AdBase64 = null, AdUrl = null, Theme = "theme1" }; EasyPost.Models.API.Brand brand = await client.User.UpdateBrand("user_...", parameters); Console.WriteLine(JsonConvert.SerializeObject(user, Formatting.Indented)); } } } ``` #### Node.js ```javascript const EasyPostClient = require('@easypost/api'); const client = new EasyPostClient('EASYPOST_API_KEY'); (async () => { const brand = await client.User.updateBrand('user_...', { color: '#303F9F' }); console.log(brand); })(); ``` #### PHP ```php user->updateBrand( 'user_...', ['color' => '#303F9F'] ); echo $brand; ``` #### Python ```python import easypost client = easypost.EasyPostClient("EASYPOST_API_KEY") brand = client.user.update_brand("user_...", color="#303F9F") print(brand) ``` #### Ruby ```ruby require 'easypost' client = EasyPost::Client.new(api_key: 'EASYPOST_API_KEY') brand = client.user.update_brand( 'user_...', color: '#303F9F', ) puts brand ``` To update a `Brand`, you need to specify the `User`. --- Source: https://docs.easypost.com/docs/users/child-users # Child Users A Child `User` is a sub-account type designed for managing customers or businesses that use a Forge-Powered shipping solution. Each Child User can have a unique set of carrier credentials, analytics, and reports, simplifying the management of a platform or marketplace solution. Beyond organizing activity and `CarrierAccounts`, the primary advantage of a Child `User` is that billing flows through the Parent User's payment information. This allows the Parent User to maintain complete control over customers' postage and pricing. Structurally, a Child `User` mirrors the Parent User, meaning its representation includes many properties that may not be actively used. However, creating a Child User requires significantly fewer properties than creating a top-level `User`. --- **Production Only** ## Create a Child User ### Example: POST /users #### cURL ```shell curl -X POST https://api.easypost.com/v2/users \ -u "EASYPOST_API_KEY": \ -H 'Content-Type: application/json' \ -d '{ "user": { "name": "Child Account Name" } }' ``` #### Go ```go package example import ( "fmt" "github.com/EasyPost/easypost-go/v6" ) func create() { client := easypost.New("EASYPOST_API_KEY") userName := "Child Account Name" user, _ := client.CreateUser( &easypost.UserOptions{ Name: &userName, }, ) fmt.Println(user) } ``` #### Java ```java package users; import com.easypost.exception.EasyPostException; import com.easypost.model.User; import com.easypost.service.EasyPostClient; import java.util.HashMap; public class Create { public static void main(String[] args) throws EasyPostException { EasyPostClient client = new EasyPostClient("EASYPOST_API_KEY"); HashMap params = new HashMap(); params.put("name", "Child Account Name"); User user = client.user.create(params); System.out.println(user); } } ``` #### C# ```csharp using System; using System.Collections.Generic; using System.Threading.Tasks; using EasyPost; using Newtonsoft.Json; namespace EasyPostExamples { public class Examples { public static async Task Main() { var client = new EasyPost.Client(new EasyPost.ClientConfiguration("EASYPOST_API_KEY")); EasyPost.Parameters.User.CreateChild parameters = new() { Name = "Child Account Name", }; EasyPost.Models.API.User user = await client.User.Create(parameters); Console.WriteLine(JsonConvert.SerializeObject(user, Formatting.Indented)); } } } ``` #### Node.js ```javascript const EasyPostClient = require('@easypost/api'); const client = new EasyPostClient('EASYPOST_API_KEY'); (async () => { const user = await client.User.create({ name: 'Child Account Name', }); console.log(user); })(); ``` #### PHP ```php user->create([ 'name' => 'Child Account Name' ]); echo $child; ``` #### Python ```python import easypost client = easypost.EasyPostClient("EASYPOST_API_KEY") user = client.user.create(name="Child Account Name") print(user) ``` #### Ruby ```ruby require 'easypost' client = EasyPost::Client.new(api_key: 'EASYPOST_API_KEY') user = client.user.create( name: 'Child Account Name', ) puts user ``` A Child `User` uses the billing information of the parent, and is not able to log in to the website. Any `User` creation attempt made with an authenticated request (via API key or cookie) is assumed to be the creation of a child of that `User`. The `name` attribute is the only user-settable value on child accounts. It is also optional, as one will be automatically generated if it is not supplied. --- **Production Only** ## Retrieve all Child Users ### Example: GET /users/children #### cURL ```shell curl -X GET "https://api.easypost.com/v2/users/children?page_size=5" \ -u "EASYPOST_API_KEY": ``` #### Go ```go package example import ( "fmt" "github.com/EasyPost/easypost-go/v6" ) func list() { client := easypost.New("EASYPOST_API_KEY") childUsers, _ := client.ListChildUsers( &easypost.ListOptions{ PageSize: 5, }, ) fmt.Println(childUsers) } ``` #### Java ```java package child_users; import com.easypost.exception.EasyPostException; import com.easypost.model.ChildUserCollection; import com.easypost.service.EasyPostClient; import java.util.HashMap; public class List { public static void main(String[] args) throws EasyPostException { EasyPostClient client = new EasyPostClient("EASYPOST_API_KEY"); HashMap params = new HashMap<>(); params.put("page_size", 5); ChildUserCollection childUsers = client.user.allChildren(params); System.out.println(childUsers); } } ``` #### C# ```csharp using System; using System.Collections.Generic; using System.Threading.Tasks; using EasyPost; using Newtonsoft.Json; namespace EasyPostExamples { public class Examples { public static async Task Main() { var client = new EasyPost.Client(new EasyPost.ClientConfiguration("EASYPOST_API_KEY")); EasyPost.Parameters.Users.AllChildren parameters = new() { PageSize = 5 }; EasyPost.Models.API.ChildUserCollection childUserCollection = await client.User.AllChildren(parameters); Console.WriteLine(JsonConvert.SerializeObject(childUserCollection, Formatting.Indented)); } } } ``` #### Node.js ```javascript const EasyPostClient = require('@easypost/api'); const client = new EasyPostClient('EASYPOST_API_KEY'); (async () => { const childUsers = await client.User.allChildren({ page_size: 5, }); console.log(childUsers); })(); ``` #### PHP ```php user->allChildren([ 'page_size' => 5 ]); echo $childUsers; ``` #### Python ```python import easypost client = easypost.EasyPostClient("EASYPOST_API_KEY") childUsers = client.user.all_children(page_size=5) print(childUsers) ``` #### Ruby ```ruby require 'easypost' client = EasyPost::Client.new(api_key: 'EASYPOST_API_KEY') child_users = client.user.all_children( page_size: 5, ) puts child_users ``` A list of all Child `User` objects associated with the given `API Key` can also be retrieved. See the Pagination section of our docs for more details on retrieving all records when multiple pages are available. --- **Production Only** ## Delete a Child User ### Example: DELETE /users/:child_id #### cURL ```shell curl -X DELETE https://api.easypost.com/v2/users/user_... \ -u "EASYPOST_API_KEY": ``` #### Go ```go package example import ( "fmt" "github.com/EasyPost/easypost-go/v6" ) func delete() { client := easypost.New("EASYPOST_API_KEY") err := client.DeleteUser("user_...") fmt.Println(err) } ``` #### Java ```java package users; import com.easypost.exception.EasyPostException; import com.easypost.service.EasyPostClient; public class Delete { public static void main(String[] args) throws EasyPostException { EasyPostClient client = new EasyPostClient("EASYPOST_API_KEY"); client.user.delete("user_..."); } } ``` #### C# ```csharp using System; using System.Collections.Generic; using System.Threading.Tasks; using EasyPost; using Newtonsoft.Json; namespace EasyPostExamples { public class Examples { public static async Task Main() { var client = new EasyPost.Client(new EasyPost.ClientConfiguration("EASYPOST_API_KEY")); await client.User.Delete("user_..."); } } } ``` #### Node.js ```javascript const EasyPostClient = require('@easypost/api'); const client = new EasyPostClient('EASYPOST_API_KEY'); (async () => { await client.User.delete('user_...'); })(); ``` #### PHP ```php user->delete('user_...'); ``` #### Python ```python import easypost client = easypost.EasyPostClient("EASYPOST_API_KEY") client.user.delete("user_...") ``` #### Ruby ```ruby require 'easypost' client = EasyPost::Client.new(api_key: 'EASYPOST_API_KEY') client.user.delete('user_...') ``` A Child `User` may be removed from its parent. The parent's Production API Key must be used for the request; a Child `User` may not remove itself from its parent. A successful delete will return a `204` status code and an empty JSON response. --- Source: https://docs.easypost.com/docs/users/referral-customers # ReferralCustomer A `ReferralCustomer` is a white label `User` that can have its own billing methods. **Important**: This endpoint only works for `ReferralCustomers` or to manage Child `User`accounts. If you feel this is applicable for your use case, please contact sales. --- **Production Only** ## Create a ReferralCustomer ### Example: POST /referral_customers #### cURL ```shell curl -X POST https://api.easypost.com/v2/referral_customers \ -u "$PARTNER_API_KEY": \ -H "Content-Type: application/json" \ -d '{ "user": { "name": "Firstname Lastname", "email": "email@example.com", "phone_number": "8888888888" } }' ``` #### Go ```go package example import ( "fmt" "github.com/EasyPost/easypost-go/v6" ) func create() { client := easypost.New("EASYPOST_API_KEY") name := "Test Referral" email := "test@example.com" phone := "5555555555" referralUser, _ := client.CreateReferralCustomer( &easypost.UserOptions{ Name: &name, Email: &email, Phone: &phone, }, ) fmt.Println(referralUser) } ``` #### Java ```java package referral; import com.easypost.exception.EasyPostException; import com.easypost.model.ReferralCustomer; import com.easypost.service.EasyPostClient; import java.util.HashMap; public class Create { public static void main(String[] args) throws EasyPostException { EasyPostClient client = new EasyPostClient("EASYPOST_API_KEY"); HashMap params = new HashMap<>(); params.put("name", "test test"); params.put("email", "test@test.com"); params.put("phone", "8888888888"); ReferralCustomer referralUser = client.referralCustomer.create(params); System.out.println(referralUser); } } ``` #### C# ```csharp using System; using System.Collections.Generic; using System.Threading.Tasks; using EasyPost; using Newtonsoft.Json; namespace EasyPostExamples { public class Examples { public static async Task Main() { var client = new EasyPost.Client(new EasyPost.ClientConfiguration("EASYPOST_API_KEY")); EasyPost.Parameters.ReferralCustomer.Create parameters = new() { Name = "test user", Email = "email@example.com", Phone = "8888888888" }; EasyPost.Models.API.ReferralCustomer referralUser = await client.ReferralCustomer.CreateReferral(parameters); Console.WriteLine(JsonConvert.SerializeObject(referralUser, Formatting.Indented)); } } } ``` #### Node.js ```javascript const EasyPostClient = require('@easypost/api'); const client = new EasyPostClient('EASYPOST_API_KEY'); (async () => { const referralCustomer = await client.ReferralCustomer.create({ name: 'Test Referral', email: 'test@example.com', phone: '1111111111', }); console.log(referralCustomer); })(); ``` #### PHP ```php referralCustomer->create([ 'name' => 'Test Referral', 'email' => 'test@test.com', 'phone' => '8888888888' ]); echo $referralUser; ``` #### Python ```python import easypost client = easypost.EasyPostClient("EASYPOST_API_KEY") referral_user = client.referral_customer.create( name="test test", email="test@test.com", phone="8888888888", ) print(referral_user) ``` #### Ruby ```ruby require 'easypost' client = EasyPost::Client.new(api_key: 'EASYPOST_API_KEY') referral_user = client.referral_customer.create( name: 'test user', email: 'email@example.com', phone: '8888888888', ) puts referral_user ``` Use the `ReferralCustomers` endpoint to create a white label `User`. To create a `ReferralCustomer`, you must provide a name, email, and phone number. The API keys of the `ReferralCustomer` will be returned to you. Save these API keys securely as they will not be able to be retrieved again later. **NOTE**: When a `ReferralCustomer` is created with your API key, you are certifying that the `ReferralCustomer` agrees to EasyPost terms of service. [Note: This object is immutable after creation. Review the rendered documentation for details.] --- **Production Only** ## Add Payment Method to ReferralCustomer ### Example: POST /beta/referral_customers/payment_method #### cURL ```shell curl -X POST https://api.easypost.com/beta/referral_customers/payment_method \ -u "$REFERRAL_USER_API_KEY": \ -H "Content-Type: application/json" \ -d '{ "payment_method": { "stripe_customer_id": "cus_...", "payment_method_reference": "card_...", "priority": "primary" } }' ``` #### Go ```go package example import ( "fmt" "github.com/EasyPost/easypost-go/v6" ) func addPaymentMethodWithCreditCard() { client := easypost.New("EASYPOST_API_KEY") paymentMethod, _ := client.BetaAddPaymentMethod("cus_...", "card_...", easypost.PrimaryPaymentMethodPriority) fmt.Println(paymentMethod) } ``` #### Java ```java package referral; import com.easypost.exception.EasyPostException; import com.easypost.model.PaymentMethodObject; import com.easypost.service.EasyPostClient; public class Create { public static void main(String[] args) throws EasyPostException { EasyPostClient client = new EasyPostClient("EASYPOST_API_KEY"); PaymentMethodObject paymentMethod = client.betaReferralCustomer.addPaymentMethod("cus_...", "card_..."); System.out.println(paymentMethod); } } ``` #### C# ```csharp using System; using System.Collections.Generic; using System.Threading.Tasks; using EasyPost; using Newtonsoft.Json; namespace EasyPostExamples { public class Examples { public static async Task Main() { var client = new EasyPost.Client(new EasyPost.ClientConfiguration("EASYPOST_API_KEY")); EasyPost.Models.API.PaymentMethod paymentMethod = await client.Beta.ReferralCustomer.AddPaymentMethod("cus_...", "card_...", PaymentMethod.Priority.Primary); Console.WriteLine(JsonConvert.SerializeObject(paymentMethod, Formatting.Indented)); } } } ``` #### Node.js ```javascript const EasyPostClient = require('@easypost/api'); const client = new EasyPostClient('EASYPOST_API_KEY'); (async () => { const paymentMethod = await client.BetaReferralCustomer.addPaymentMethod('cus_...', 'card_...'); console.log(paymentMethod); })(); ``` #### PHP ```php betaReferralCustomer->addPaymentMethod([ 'cus_...', 'card_...', 'primary' ]); echo $paymentMethod; ``` #### Python ```python import easypost client = easypost.EasyPostClient("EASYPOST_API_KEY") payment_method = client.beta_referral_customer.add_payment_method( stripe_customer_id="cus_...", payment_method_reference="card_...", primary_or_secondary="primary", ) print(payment_method) ``` #### Ruby ```ruby require 'easypost' client = EasyPost::Client.new(api_key: 'EASYPOST_API_KEY') payment_method = client.beta_referral_customer.add_payment_method( 'cus_...', 'card_...', 'primary', ) puts payment_method ``` **Important**: This endpoint only works for `ReferralCustomers` or to manage Child `User`accounts. If you feel this is applicable for your use case, please contact sales. **BETA**: This feature is in beta and subject to change. For feedback or questions, Contact Support. Add a payment method for a `ReferralCustomer`. This endpoint is only used if you are using the Forge Decentralized integration. Both a "primary" and "secondary" payment method can be set. ### Add Payment With Bank Account ### Example: Bank Account Payment Method #### cURL ```shell curl -X POST https://api.easypost.com/beta/referral_customers/payment_method \ -u "$REFERRAL_USER_API_KEY": \ -H "Content-Type: application/json" \ -d '{ "payment_method": { "stripe_customer_id": "cus_...", "payment_method_reference": "ba_...", "priority": "primary" } }' ``` #### Go ```go package example import ( "fmt" "github.com/EasyPost/easypost-go/v6" ) func addPaymentMethodWithBankAccount() { client := easypost.New("EASYPOST_API_KEY") paymentMethod, _ := client.BetaAddPaymentMethod("cus_...", "ba_...", easypost.PrimaryPaymentMethodPriority) fmt.Println(paymentMethod) } ``` #### Java ```java package referral; import com.easypost.exception.EasyPostException; import com.easypost.model.PaymentMethodObject; import com.easypost.service.EasyPostClient; public class Create { public static void main(String[] args) throws EasyPostException { EasyPostClient client = new EasyPostClient("EASYPOST_API_KEY"); PaymentMethodObject paymentMethod = client.betaReferralCustomer.addPaymentMethod("cus_...", "ba_..."); System.out.println(paymentMethod); } } ``` #### C# ```csharp using System; using System.Collections.Generic; using System.Threading.Tasks; using EasyPost; using Newtonsoft.Json; namespace EasyPostExamples { public class Examples { public static async Task Main() { var client = new EasyPost.Client(new EasyPost.ClientConfiguration("EASYPOST_API_KEY")); EasyPost.Models.API.PaymentMethod paymentMethod = await client.Beta.ReferralCustomer.AddPaymentMethod("cus_...", "ba_...", PaymentMethod.Priority.Primary); Console.WriteLine(JsonConvert.SerializeObject(paymentMethod, Formatting.Indented)); } } } ``` #### Node.js ```javascript const EasyPostClient = require('@easypost/api'); const client = new EasyPostClient('EASYPOST_API_KEY'); (async () => { const paymentMethod = await client.BetaReferralCustomer.addPaymentMethod('cus_...', 'ba_...'); console.log(paymentMethod); })(); ``` #### PHP ```php betaReferralCustomer->addPaymentMethod([ 'cus_...', 'ba_...', 'primary' ]); echo $paymentMethod; ``` #### Python ```python import easypost client = easypost.EasyPostClient("EASYPOST_API_KEY") payment_method = client.beta_referral_customer.add_payment_method( stripe_customer_id="cus_...", payment_method_reference="ba_...", primary_or_secondary="primary", ) print(payment_method) ``` #### Ruby ```ruby require 'easypost' client = EasyPost::Client.new(api_key: 'EASYPOST_API_KEY') payment_method = client.beta_referral_customer.add_payment_method( 'cus_...', 'ba_...', 'primary', ) puts payment_method ``` --- **Production Only** ## Refund a ReferralCustomer ### Example: POST /beta/referral_customers/refunds #### cURL ```shell curl -x POST https://api.easypost.com/beta/referral_customers/refunds \ -u "$REFERRAL_USER_API_KEY": \ -H 'Content-Type: application/json' \ -d '{ "refund_amount": 2000, }' ``` #### Go ```go package example import ( "fmt" "github.com/EasyPost/easypost-go/v6" ) func refundByAmount() { client := easypost.New("EASYPOST_API_KEY") refund, _ := client.BetaRefundByAmount(2000) fmt.Println(refund) } ``` #### Java ```java package referral; import com.easypost.exception.EasyPostException; import com.easypost.model.BetaPaymentRefund; import com.easypost.service.EasyPostClient; public class Create { public static void main(String[] args) throws EasyPostException { EasyPostClient client = new EasyPostClient("EASYPOST_API_KEY"); BetaPaymentRefund refund = client.betaReferralCustomer.refundByAmount(2000); System.out.println(refund); } } ``` #### C# ```csharp using System; using System.Collections.Generic; using System.Threading.Tasks; using EasyPost; using Newtonsoft.Json; namespace EasyPostExamples { public class Examples { public static async Task Main() { var client = new EasyPost.Client(new EasyPost.ClientConfiguration("EASYPOST_API_KEY")); EasyPost.Parameters.ReferralCustomer.RefundByAmount parameters = new() { Amount = 2000, }; EasyPost.Models.API.PaymentRefund refund = await client.Beta.ReferralCustomer.RefundByAmount(parameters); Console.WriteLine(JsonConvert.SerializeObject(refund, Formatting.Indented)); } } } ``` #### Node.js ```javascript const EasyPostClient = require('@easypost/api'); const client = new EasyPostClient('EASYPOST_API_KEY'); (async () => { const refund = await client.BetaReferralCustomer.refundByAmount(2000); console.log(refund); })(); ``` #### PHP ```php betaReferralCustomer->refundByAmount(2000); echo $refund; ``` #### Python ```python import easypost client = easypost.EasyPostClient("EASYPOST_API_KEY") refund = client.beta_referral_customer.refund_by_amount(refund_amount=2000) print(refund) ``` #### Ruby ```ruby require 'easypost' client = EasyPost::Client.new(api_key: 'EASYPOST_API_KEY') refund = client.beta_referral_customer.refund_by_amount(2000) puts refund ``` **Important**: This endpoint only works for `ReferralCustomers` or to manage Child `User`accounts. If you feel this is applicable for your use case, please contact sales. **BETA**: This feature is in beta and subject to change. For feedback or questions, Contact Support. For partners integrated with Stripe Connect, a `ReferralCustomer`'s EasyPost wallet balance can be refunded back to a payment method when necessary. An example use case is if a `ReferralCustomer` accidentally added too many funds in their wallet. There are two ways to specify a refund. A refund can be specified by `payment_log`, which will refund the amount to the original payment method of that `payment_log`. A refund can also be specified for a specific `amount`, which will refund a `ReferralCustomer` using the most recent payment logs back to their original payment method. For both options, refunds are limited to charges within the last 90 days. Contact Support for additional assistance. ### Refund by Payment Log ### Example: Payment Log #### cURL ```shell curl -x POST https://api.easypost.com/beta/referral_customers/refunds \ -u "$REFERRAL_USER_API_KEY": \ -H 'Content-Type: application/json' \ -d '{ "payment_log_id": "paylog..." }' ``` #### Go ```go package example import ( "fmt" "github.com/EasyPost/easypost-go/v6" ) func refundByPaymentLog() { client := easypost.New("EASYPOST_API_KEY") refund, _ := client.BetaRefundByPaymentLog("paylog_...") fmt.Println(refund) } ``` #### Java ```java package referral; import com.easypost.exception.EasyPostException; import com.easypost.model.BetaPaymentRefund; import com.easypost.service.EasyPostClient; public class Create { public static void main(String[] args) throws EasyPostException { EasyPostClient client = new EasyPostClient("EASYPOST_API_KEY"); BetaPaymentRefund refund = client.betaReferralCustomer.refundByAmount(2000); System.out.println(refund); } } ``` #### C# ```csharp using System; using System.Collections.Generic; using System.Threading.Tasks; using EasyPost; using Newtonsoft.Json; namespace EasyPostExamples { public class Examples { public static async Task Main() { var client = new EasyPost.Client(new EasyPost.ClientConfiguration("EASYPOST_API_KEY")); EasyPost.Parameters.ReferralCustomer.RefundByPaymentLog parameters = new() { PaymentLogId = "paylog_...", }; EasyPost.Models.API.PaymentRefund refund = await client.Beta.ReferralCustomer.RefundByPaymentLog(parameters); Console.WriteLine(JsonConvert.SerializeObject(refund, Formatting.Indented)); } } } ``` #### Node.js ```javascript const EasyPostClient = require('@easypost/api'); const client = new EasyPostClient('EASYPOST_API_KEY'); (async () => { const refund = await client.BetaReferralCustomer.refundByPaymentLog('paylog_...'); console.log(refund); })(); ``` #### PHP ```php betaReferralCustomer->refundByPaymentLog('paylog_...'); echo $refund; ``` #### Python ```python import easypost client = easypost.EasyPostClient("EASYPOST_API_KEY") refund = client.beta_referral_customer.refund_by_payment_log(payment_log_id="paylog_...") print(refund) ``` #### Ruby ```ruby require 'easypost' client = EasyPost::Client.new(api_key: 'EASYPOST_API_KEY') refund = client.beta_referral_customer.refund_by_payment_log('paylog_...') puts refund ``` --- **Production Only** ## Retrieve all ReferralCustomers ### Example: GET /referral_customers #### cURL ```shell curl -X GET https://api.easypost.com/v2/referral_customers \ -u "$PARTNER_API_KEY": ``` #### Go ```go package example import ( "fmt" "github.com/EasyPost/easypost-go/v6" ) func list() { client := easypost.New("EASYPOST_API_KEY") referralCustomerCollection, _ := client.ListReferralCustomers( &easypost.ListOptions{ PageSize: 5, }, ) fmt.Println(referralCustomerCollection) } ``` #### Java ```java package referral; import com.easypost.exception.EasyPostException; import com.easypost.model.ReferralCustomer; import com.easypost.model.ReferralCustomerCollection; import com.easypost.service.EasyPostClient; import java.util.HashMap; import java.util.List; public class All { public static void main(String[] args) throws EasyPostException { EasyPostClient client = new EasyPostClient("EASYPOST_API_KEY"); HashMap params = new HashMap(); params.put("page_size", 5); ReferralCustomerCollection referallCustomorCollection = client.referralCustomer.all(params); List referallUsers = referallCustomorCollection.getReferralCustomers(); System.out.println(referallUsers); } } ``` #### C# ```csharp using System; using System.Collections.Generic; using System.Threading.Tasks; using EasyPost; using Newtonsoft.Json; namespace EasyPostExamples { public class Examples { public static async Task Main() { var client = new EasyPost.Client(new EasyPost.ClientConfiguration("EASYPOST_API_KEY")); EasyPost.Parameters.ReferralCustomer.All parameters = new() { PageSize = 5 }; EasyPost.Models.API.ReferralCustomerCollection referralCustomerCollection = await client.ReferralCustomer.All(parameters); List referralCustomers = referralCustomerCollection.ReferralCustomers; Console.WriteLine(JsonConvert.SerializeObject(referralCustomers, Formatting.Indented)); } } } ``` #### Node.js ```javascript const EasyPostClient = require('@easypost/api'); const client = new EasyPostClient('EASYPOST_API_KEY'); (async () => { const referralCustomers = await client.ReferralCustomer.all({ page_size: 5, }); console.log(referralCustomers); })(); ``` #### PHP ```php referralCustomer->all([ 'page_size' => 5, ]); echo $referralUsers; ``` #### Python ```python import easypost client = easypost.EasyPostClient("EASYPOST_API_KEY") referral_users = client.referral_customer.all(page_size=5) print(referral_users) ``` #### Ruby ```ruby require 'easypost' client = EasyPost::Client.new(api_key: 'EASYPOST_API_KEY') referral_users = client.referral_customer.all( page_size: 5, ) puts referral_users ``` A list of all `ReferralCustomer` objects associated with the given `API Key` can also be retrieved. See the Pagination section of our docs for more details on retrieving all records when multiple pages are available. --- **Production Only** ## Update a ReferralCustomer ### Example: PUT /referral_customers/:id #### cURL ```shell curl -X PUT https://api.easypost.com/v2/referral_customers \ -u "$REFERRAL_USER_API_KEY": \ -H "Content-Type: application/json" \ -d '{ "user": { "email": "new_email@example.com" } }' ``` #### Go ```go package example import ( "github.com/EasyPost/easypost-go/v6" ) func update() { client := easypost.New("EASYPOST_API_KEY") _, _ = client.UpdateReferralCustomerEmail("user_...", "new_email@example.com") } ``` #### Java ```java package referral; import com.easypost.exception.EasyPostException; import com.easypost.service.EasyPostClient; public class Update { public static void main(String[] args) throws EasyPostException { EasyPostClient client = new EasyPostClient("EASYPOST_API_KEY"); client.referralCustomer.updateEmail("user_...", "new_email@example.com"); } } ``` #### C# ```csharp using System; using System.Collections.Generic; using System.Threading.Tasks; using EasyPost; using Newtonsoft.Json; namespace EasyPostExamples { public class Examples { public static async Task Main() { var client = new EasyPost.Client(new EasyPost.ClientConfiguration("EASYPOST_API_KEY")); await client.ReferralCustomer.UpdateReferralEmail("user_...", "new_email@example.com"); } } } ``` #### Node.js ```javascript const EasyPostClient = require('@easypost/api'); const client = new EasyPostClient('EASYPOST_API_KEY'); (async () => { await client.ReferralCustomer.updateEmail('user_...', 'new_email@example.com'); })(); ``` #### PHP ```php referralCustomer->updateEmail('user_...', 'new_email@example.com'); ``` #### Python ```python import easypost client = easypost.EasyPostClient("EASYPOST_API_KEY") client.referral_customer.update_email( "usr_...", "new_email@example.com", ) ``` #### Ruby ```ruby require 'easypost' client = EasyPost::Client.new(api_key: 'EASYPOST_API_KEY') message = client.referral_customer.update_email( 'user_...', 'new_email@example.com', ) puts message ``` Partners have the ability to update the email address of a `ReferralCustomer`. Partners are obligated to provide us with an up-to-date email for each `ReferralCustomer`. EasyPost will not contact your customers; this information is used for security purposes only. --- Source: https://docs.easypost.com/docs/users # User The `User` object can be used to manage your own account and to create child accounts. Only a Production API Key can be used to make requests against the Users API. There are two kinds of accounts. The first is the standard (parent) `User` object. It represents your account state, settings, and credentials to log in via the website. The second is the child `User`, which is a `User` that belongs to a parent. Balance and recharge values on `User` objects are expressed in higher precision US Dollars. Parent `Users` must be created through the web interface. --- ## User object | Property | Type | Description | |----------|------|-------------| | id | string | Unique, begins with "user_" | | object | string | "User" | | name | string | The first and last name of the user | | email | string | An email address for the user | | phone_number | string | A phone number for the user | | balance | string | Wallet balance. Formatted as string "XX.XXXXX" | | price_per_shipment | string | Cost per shipment purchase. Formatted as string "XX.XXXXX" | | recharge_amount | string | How much to recharge the user's wallet when the balance drops below the recharge threshold. Formatted as string 'XX.XXXXX' | | secondary_recharge_amount | string | How much to recharge the user's wallet when the balance drops below the recharge threshold. Formatted as string 'XX.XXXXX' | | recharge_threshold | string | USD cents value that, when your balance drops below, we automatically recharge your account with your primary payment method | | cc_fee_rate | string | The fee rate for convenience fees | | insurance_fee_rate | string | The fee rate for insurance purchases | | insurance_fee_minimum | string | The minimum cost for insurance purchases | | children | array | All associated Child Users | Example Object: ```json { "id": "user_060ab38db3c04ffaa60f262e5781a9be", "object": "User", "parent_id": null, "name": "EasyPost Docs", "phone_number": "5555555555", "verified": true, "created_at": "2022-10-14T17:23:58Z", "default_carbon_offset": false, "has_elevate_access": false, "balance": "0.00000", "price_per_shipment": "0.00000", "recharge_amount": null, "secondary_recharge_amount": null, "recharge_threshold": null, "has_billing_method": null, "cc_fee_rate": "0.0375", "default_insurance_amount": null, "insurance_fee_rate": "0.005", "insurance_fee_minimum": "0.50", "email": "dev+easypost-docs@easypost.com", "children": [ { "id": "user_0ae8cb7000a1438c8598fa5786fdae84", "object": "User", "parent_id": "user_060ab38db3c04ffaa60f262e5781a9be", "name": "Test User", "phone_number": "8005550100", "verified": true, "created_at": "2022-10-17T17:28:30Z", "default_carbon_offset": false, "has_elevate_access": false, "children": [] } ] } ``` --- **Production Only** ## Retrieve a User ### Example: GET /users/:id #### cURL ```shell # Retrieve the authenticated user curl -X GET https://api.easypost.com/v2/users \ -u "EASYPOST_API_KEY": # Retrieve a child user curl -X GET https://api.easypost.com/v2/users/user_... \ -u "EASYPOST_API_KEY": ``` #### Go ```go package example import ( "fmt" "github.com/EasyPost/easypost-go/v6" ) func retrieve() { client := easypost.New("EASYPOST_API_KEY") // Retrieve the authenticated user user, _ := client.RetrieveMe() fmt.Println(user) // Retrieve a child user user, _ = client.GetUser("user_...") fmt.Println(user) } ``` #### Java ```java package users; import com.easypost.exception.EasyPostException; import com.easypost.model.User; import com.easypost.service.EasyPostClient; public class Retrieve { public static void main(String[] args) throws EasyPostException { EasyPostClient client = new EasyPostClient("EASYPOST_API_KEY"); // Retrieve the authenticated user User parentUser = client.user.retrieveMe(); System.out.println(parentUser); // Retrieve a child user User childUser = client.user.retrieve("user_..."); System.out.println(childUser); } } ``` #### C# ```csharp using System; using System.Collections.Generic; using System.Threading.Tasks; using EasyPost; using Newtonsoft.Json; namespace EasyPostExamples { public class Examples { public static async Task Main() { var client = new EasyPost.Client(new EasyPost.ClientConfiguration("EASYPOST_API_KEY")); // Retrieve the authenticated user EasyPost.Models.API.User user = await client.User.RetrieveMe(); // Retrieve a child user user = await client.User.Retrieve("user_..."); Console.WriteLine(JsonConvert.SerializeObject(user, Formatting.Indented)); } } } ``` #### Node.js ```javascript const EasyPostClient = require('@easypost/api'); const client = new EasyPostClient('EASYPOST_API_KEY'); (async () => { let user; // Retrieve the authenticated user user = await client.User.retrieveMe(); // Retrieve a child user user = await client.User.retrieve('user_...'); console.log(user); })(); ``` #### PHP ```php user->retrieveMe(); // Retrieve a child user $user = $client->user->retrieve('user_...'); echo $user; ``` #### Python ```python import easypost client = easypost.EasyPostClient("EASYPOST_API_KEY") # Retrieve the authenticated user user = client.user.retrieve_me() # Retrieve a child user user = client.user.retrieve("user_...") print(user) ``` #### Ruby ```ruby require 'easypost' client = EasyPost::Client.new(api_key: 'EASYPOST_API_KEY') # Retrieve the authenticated user user = client.user.retrieve_me # Retrieve a child user user = client.user.retrieve('user_...') puts user ``` Each `User` can be retrieved individually by `id`. Any `id` provided must be either the `id` of the authenticated `User` or the `id` of one of its Child `Users`. Additionally, to retrieve the authenticated `User` directly, no `id` is required. --- **Production Only** ## Update a User ### Example: PATCH /users/:id #### cURL ```shell # Update the authenticated user curl -X PATCH https://api.easypost.com/v2/users \ -u "EASYPOST_API_KEY": \ -H 'Content-Type: application/json' \ -d '{ "user": { "recharge_threshold": "50.00" } }' # Update a child user curl -X PATCH https://api.easypost.com/v2/users/user_... \ -u "EASYPOST_API_KEY": \ -H 'Content-Type: application/json' \ -d '{ "user": { "name": "Test Child" } }' ``` #### Go ```go package example import ( "fmt" "github.com/EasyPost/easypost-go/v6" ) func update() { client := easypost.New("EASYPOST_API_KEY") rechargeAmount := "50.00" user, _ := client.UpdateUser( &easypost.UserOptions{ ID: "user_...", RechargeAmount: &rechargeAmount, }, ) fmt.Println(user) } ``` #### Java ```java package users; import com.easypost.exception.EasyPostException; import com.easypost.model.User; import com.easypost.service.EasyPostClient; import java.util.HashMap; public class Update { public static void main(String[] args) throws EasyPostException { EasyPostClient client = new EasyPostClient("EASYPOST_API_KEY"); HashMap params = new HashMap(); params.put("recharge_threshold", "50.00"); User user = client.user.update("user_...", params); System.out.println(user); } } ``` #### C# ```csharp using System; using System.Collections.Generic; using System.Threading.Tasks; using EasyPost; using Newtonsoft.Json; namespace EasyPostExamples { public class Examples { public static async Task Main() { var client = new EasyPost.Client(new EasyPost.ClientConfiguration("EASYPOST_API_KEY")); EasyPost.Parameters.User.Update parameters = new() { RechargeThreshold = "50.00" }; EasyPost.Models.API.User user = await client.User.Update("user_...", parameters); Console.WriteLine(JsonConvert.SerializeObject(user, Formatting.Indented)); } } } ``` #### Node.js ```javascript const EasyPostClient = require('@easypost/api'); const client = new EasyPostClient('EASYPOST_API_KEY'); (async () => { const user = await client.User.update('user_...', { recharge_threshold: '50.00' }); console.log(user); })(); ``` #### PHP ```php user->update( 'user_...', ['recharge_threshold' => '50.00'] ); echo $user; ``` #### Python ```python import easypost client = easypost.EasyPostClient("EASYPOST_API_KEY") user = client.user.retrieve_me() updated_user = client.user.update(user.id, recharge_threshold="50.00") print(updated_user) ``` #### Ruby ```ruby require 'easypost' client = EasyPost::Client.new(api_key: 'EASYPOST_API_KEY') retrieved_user = client.user.retrieve_me user = client.user.update(retrieved_user.id, recharge_amount: '50.00') puts user ``` Just like retrieving a `User`, they can be updated using the same patterns. Passing an `id` will allow the update of a Child `User` or the authenticated `User`. Passing no `id` will update the authenticated `User`. Since Child `Users` also have the ability to authenticate themselves, they can be updated without passing an `id`. Child `Users` may only have their `name` field updated; all other fields are ignored. An update request for a `User` is a partial update. Only attributes specifically passed in will be updated. The `current_password` attribute is required when updating `email` or `password`. --- Source: https://docs.easypost.com/docs/webhooks # Webhook Each `Webhook` contains the `url` that EasyPost notifies when an object in the system updates. Several types of objects are processed asynchronously within EasyPost. When an object updates, an `Event` is sent via `HTTP POST` to each configured `webhook url`. The `webhook` object supports create, retrieve, update, and delete (CRUD) operations. For best practices and request sanitation, refer to the Webhooks Guide. Webhook endpoints must return a `2XX status code` to indicate successful receipt. A `200 OK` response is preferred. Endpoints that repeatedly return failures may be automatically disabled; disabled webhooks can be re-enabled using the `Webhook` update endpoint. --- ## Webhook Authentication Securing webhook endpoints is crucial to ensure data integrity and authenticity. EasyPost recommends two primary methods for securing webhooks: ### HMAC Validation HMAC validation ensures webhook data is untampered during transmission. - Include a `webhook_secret` when creating or updating a webhook. - EasyPost generates a signature with this secret, sent via the `X-Hmac-Signature` header in each event. - Validate the signature using `validate_webhook()` from EasyPost's client libraries (function name may vary depending on the programming language; refer to the library documentation). - If the signature does not match, reject the event to prevent fraudulent data. ### Basic Authentication Basic authentication requires embedding a username and password in the webhook URL. **Example** `https://username:secret@example.com/easypost-webhook` Each webhook delivery includes an `Authorization` header. Validate the credentials against the stored values. --- ## TLS and Certificate Validation EasyPost performs certificate validation and requires that any webhook recipient using TLS (HTTPS) must have a certificate signed by a trusted public certification authority. This helps ensure that the data being transmitted is secure. - Webhook endpoints must use `HTTPS`. - SSLv2, SSLv3, and export-grade ciphers are not supported. For server setup guidance, refer to: - Mozilla's Server-Side TLS Guide - Qualys's SSL/TLS Deployment Best Practices guide. --- ## Webhook object | Property | Type | Description | |----------|------|-------------| | id | string | Unique, begins with "hook_" | | object | string | "Webhook" | | url | string | http://example.com | | disabled_at | datetime | The timestamp at which the Webhook was most recently disabled (if any) | | custom_headers | []map[string]string | A list of key-value pairs, each containing "name" and "value" fields. If not specified during creation, this field defaults to an empty array []. | Example Object: ```json { "id": "hook_d31edbc62d1511f0a15761d2f710980c", "object": "Webhook", "mode": "test", "url": "http://example.com", "created_at": "2025-05-09T20:40:21Z", "disabled_at": null, "custom_headers": [ { "name": "X-Header-Name", "value": "header_value" } ] } ``` --- ## Custom Outbound Headers EasyPost supports optional custom headers on outbound webhook requests, allowing up to **three custom headers**. Each header must include a `name` and `value`, both as ASCII strings under 1000 characters. ### Validation Requirements - Custom headers must be an **array of key-value pairs**. - Each `name` must be unique within the list. - If specified in a `POST` or `PATCH` request, both `name` and `value` are mandatory. - Headers prefixed with `X-EasyPost-*` **cannot be used**. - Existing `X-*` standard name or non-standard `X-*` headers may be overwritten if a conflict exists. - Header values are stored in plaintext. Use encrypted values if sensitive information is included. ### Updating Custom Headers Updating replaces the entire `custom_headers` list. Partial updates are **not** supported. ### RFC Compliance All custom header names must conform to RFC 7230/ RFC 9112 formatting rules. --- ## Create a Webhook ### Example: POST /webhooks #### cURL ```shell curl -X POST https://api.easypost.com/v2/webhooks \ -u "EASYPOST_API_KEY": \ -H 'Content-Type: application/json' \ -d '{ "webhook": { "url": "example.com", "webhook_secret": "A1B2C3", "custom_headers": [{ "name": "X-Header-Name", "value": "header_value" }], } }' ``` #### Go ```go package example import ( "fmt" "github.com/EasyPost/easypost-go/v6" ) func create() { client := easypost.New("EASYPOST_API_KEY") webhook, _ := client.CreateWebhook( &easypost.CreateUpdateWebhookOptions{ URL: "example.com", WebhookSecret: "A1B2C3", CustomHeaders: []easypost.WebhookCustomHeader{ { Name: "X-Header-Name", Value: "header_value", }, }, }, ) fmt.Println(webhook) } ``` #### Java ```java package webhooks; import com.easypost.exception.EasyPostException; import com.easypost.model.Webhook; import com.easypost.service.EasyPostClient; import java.util.HashMap; public class Create { public static void main(String[] args) throws EasyPostException { EasyPostClient client = new EasyPostClient("EASYPOST_API_KEY"); HashMap params = new HashMap(); params.put("url", "example.com"); params.put("webhook_secret", "A1B2C3"); ArrayList> customHeaders = new ArrayList<>(); HashMap header = new HashMap<>(); header.put("name", "X-Header-Name"); header.put("value", "header_value"); customHeaders.add(header); params.put("custom_headers", customHeaders); Webhook webhook = client.webhook.create(params); System.out.println(webhook); } } ``` #### C# ```csharp using System; using System.Collections.Generic; using System.Threading.Tasks; using EasyPost.Models.API; using Newtonsoft.Json; namespace EasyPostExamples { public class Examples { public static async Task Main() { var client = new EasyPost.Client(new EasyPost.ClientConfiguration("EASYPOST_API_KEY")); EasyPost.Parameters.Webhook.Create parameters = new() { Url = "example.com", Secret = "ABC123", CustomHeaders = new List { new EasyPost.Models.API.WebhookCustomHeader { Name = "X-Header-Name", Value = "header_value" } } }; EasyPost.Models.API.Webhook webhook = await client.Webhook.Create(parameters); Console.WriteLine(JsonConvert.SerializeObject(webhook, Formatting.Indented)); } } } ``` #### Node.js ```javascript const EasyPostClient = require('@easypost/api'); const client = new EasyPostClient('EASYPOST_API_KEY'); (async () => { const webhook = await client.Webhook.create({ url: 'example.com', webhook_secret: 'A1B2C3', customer_headers: [ { name: 'X-Header-Name', value: 'header_value', }, ], }); console.log(webhook); })(); ``` #### PHP ```php webhook->create([ 'url' => 'example.com', 'webhook_secret' => 'A1B2C3', 'custom_headers' => [ ['name' => 'X-Header-Name'], ['value' => 'header_value'], ], ]); echo $webhook; ``` #### Python ```python import easypost client = easypost.EasyPostClient("EASYPOST_API_KEY") webhook = client.webhook.create( url="example.com", webhook_secret="A1B2C3", custom_headers=[ { "name": "X-Header-Name", "value": "header_value", } ], ) print(webhook) ``` #### Ruby ```ruby require 'easypost' client = EasyPost::Client.new(api_key: 'EASYPOST_API_KEY') webhook = client.webhook.create( url: 'example.com', webhook_secret: 'A1B2C3', custom_headers: [ { name: 'X-Header-Name', value: 'header_value', }, ], ) puts webhook ``` To create a `Webhook`, provide a `url` parameter to designate where notifications are sent. A webhook can be secured using a `webhook_secret` for HMAC validation or basic authentication. The optional `custom_headers` attribute enables the inclusion of additional header information, such as authentication tokens or metadata, with outbound webhook requests. --- ## Retrieve all Webhooks ### Example: GET /webhooks #### cURL ```shell curl -X GET https://api.easypost.com/v2/webhooks \ -u "EASYPOST_API_KEY": ``` #### Go ```go package example import ( "fmt" "github.com/EasyPost/easypost-go/v6" ) func list() { client := easypost.New("EASYPOST_API_KEY") webhooks, _ := client.ListWebhooks() fmt.Println(webhooks) } ``` #### Java ```java package webhooks; import com.easypost.exception.EasyPostException; import com.easypost.model.WebhookCollection; import com.easypost.service.EasyPostClient; public class All { public static void main(String[] args) throws EasyPostException { EasyPostClient client = new EasyPostClient("EASYPOST_API_KEY"); WebhookCollection webhooks = client.webhook.all(); System.out.println(webhooks); } } ``` #### C# ```csharp using System; using System.Collections.Generic; using System.Threading.Tasks; using EasyPost; using Newtonsoft.Json; namespace EasyPostExamples { public class Examples { public static async Task Main() { var client = new EasyPost.Client(new EasyPost.ClientConfiguration("EASYPOST_API_KEY")); EasyPost.Parameters.Webhook.All parameters = new() { PageSize = 5, }; List webhooks = await client.Webhook.All(parameters); Console.WriteLine(JsonConvert.SerializeObject(webhooks, Formatting.Indented)); } } } ``` #### Node.js ```javascript const EasyPostClient = require('@easypost/api'); const client = new EasyPostClient('EASYPOST_API_KEY'); (async () => { const webhooks = await client.Webhook.all(); console.log(webhooks); })(); ``` #### PHP ```php webhook->all(); echo $webhooks; ``` #### Python ```python import easypost client = easypost.EasyPostClient("EASYPOST_API_KEY") webhooks = client.webhook.all() print(webhooks) ``` #### Ruby ```ruby require 'easypost' client = EasyPost::Client.new(api_key: 'EASYPOST_API_KEY') webhooks = client.webhook.all puts webhooks ``` Retrieve an unpaginated list of all `Webhooks` associated with the `API Key`. --- ## Retrieve a Webhook ### Example: GET /webhooks/:id #### cURL ```shell curl -X GET https://api.easypost.com/v2/webhooks/hook_... \ -u "EASYPOST_API_KEY": ``` #### Go ```go package example import ( "fmt" "github.com/EasyPost/easypost-go/v6" ) func retrieve() { client := easypost.New("EASYPOST_API_KEY") webhook, _ := client.GetWebhook("hook_...") fmt.Println(webhook) } ``` #### Java ```java package webhooks; import com.easypost.exception.EasyPostException; import com.easypost.model.Webhook; import com.easypost.service.EasyPostClient; public class Retrieve { public static void main(String[] args) throws EasyPostException { EasyPostClient client = new EasyPostClient("EASYPOST_API_KEY"); Webhook webhook = client.webhook.retrieve("hook_..."); System.out.println(webhook); } } ``` #### C# ```csharp using System; using System.Collections.Generic; using System.Threading.Tasks; using EasyPost; using Newtonsoft.Json; namespace EasyPostExamples { public class Examples { public static async Task Main() { var client = new EasyPost.Client(new EasyPost.ClientConfiguration("EASYPOST_API_KEY")); EasyPost.Models.API.Webhook webhook = await client.Webhook.Retrieve("hook_..."); Console.WriteLine(JsonConvert.SerializeObject(webhook, Formatting.Indented)); } } } ``` #### Node.js ```javascript const EasyPostClient = require('@easypost/api'); const client = new EasyPostClient('EASYPOST_API_KEY'); (async () => { const webhook = await client.Webhook.retrieve('hook_...'); console.log(webhook); })(); ``` #### PHP ```php webhook->retrieve('hook_...'); echo $webhook; ``` #### Python ```python import easypost client = easypost.EasyPostClient("EASYPOST_API_KEY") webhook = client.webhook.retrieve("hook_...") print(webhook) ``` #### Ruby ```ruby require 'easypost' client = EasyPost::Client.new(api_key: 'EASYPOST_API_KEY') webhook = client.webhook.retrieve('hook_...') puts webhook ``` Retrieve a `Webhook` by `id`. --- ## Update a Webhook ### Example: PATCH /webhooks/:id #### cURL ```shell curl -X PATCH https://api.easypost.com/v2/webhooks/hook_... \ -u "EASYPOST_API_KEY": \ -H 'Content-Type: application/json' \ -d '{ "webhook_secret": "A1B2C3", "custom_headers": [{ "name": "X-Header-Name", "value": "header_value" }], }' ``` #### Go ```go package example import ( "fmt" "github.com/EasyPost/easypost-go/v6" ) func update() { client := easypost.New("EASYPOST_API_KEY") webhook, _ := client.UpdateWebhook( "hook_...", &easypost.CreateUpdateWebhookOptions{ WebhookSecret: "A1B2C3", CustomHeaders: []easypost.WebhookCustomHeader{ { Name: "X-Header-Name", Value: "header_value", }, }, }, ) fmt.Println(webhook) } ``` #### Java ```java package webhooks; import com.easypost.exception.EasyPostException; import com.easypost.model.Webhook; import com.easypost.service.EasyPostClient; import java.util.HashMap; public class Update { public static void main(String[] args) throws EasyPostException { EasyPostClient client = new EasyPostClient("EASYPOST_API_KEY"); HashMap params = new HashMap(); params.put("webhook_secret", "A1B2C3"); ArrayList> customHeaders = new ArrayList<>(); HashMap header = new HashMap<>(); header.put("name", "X-Header-Name"); header.put("value", "header_value"); customHeaders.add(header); params.put("custom_headers", customHeaders); Webhook webhook = client.webhook.update("hook_...", params); System.out.println(webhook); } } ``` #### C# ```csharp using System; using System.Collections.Generic; using System.Threading.Tasks; using EasyPost; using Newtonsoft.Json; namespace EasyPostExamples { public class Examples { public static async Task Main() { var client = new EasyPost.Client(new EasyPost.ClientConfiguration("EASYPOST_API_KEY")); EasyPost.Parameters.Webhook.Create parameters = new() { Secret = "ABC123", CustomHeaders = new List { new EasyPost.Models.API.WebhookCustomHeader { Name = "X-Header-Name", Value = "header_value" } } }; EasyPost.Models.API.Webhook webhook = await client.Webhook.Update("hook_...", parameters); Console.WriteLine(JsonConvert.SerializeObject(webhook, Formatting.Indented)); } } } ``` #### Node.js ```javascript const EasyPostClient = require('@easypost/api'); const client = new EasyPostClient('EASYPOST_API_KEY'); (async () => { const webhook = await client.Webhook.update('hook_...', { webhook_secret: 'A1B2C3', customer_headers: [ { name: 'X-Header-Name', value: 'header_value', }, ], }); console.log(webhook); })(); ``` #### PHP ```php webhook->update('hook_...', [ 'webhook_secret' => 'A1B2C3', 'custom_headers' => [ ['name' => 'X-Header-Name'], ['value' => 'header_value'], ], ]); echo $webhook; ``` #### Python ```python import easypost client = easypost.EasyPostClient("EASYPOST_API_KEY") updated_webhook = client.webhook.update( "hook_...", webhook_secret="A1B2C3", custom_headers=[ { "name": "X-Header-Name", "value": "header_value", } ], ) print(updated_webhook) ``` #### Ruby ```ruby require 'easypost' client = EasyPost::Client.new(api_key: 'EASYPOST_API_KEY') webhook = client.webhook.update( 'hook_...', { webhook_secret: 'A1B2C3', custom_headers: [ { name: 'X-Header-Name', value: 'header_value', }, ], }, ) puts webhook ``` Re-enable a disabled `Webhook` or update the `webhook_secret` and `custom_headers`. --- ## Delete a Webhook ### Example: DELETE /webhooks/:id #### cURL ```shell curl -X DELETE https://api.easypost.com/v2/webhooks/hook_... \ -u "EASYPOST_API_KEY": ``` #### Go ```go package example import ( "fmt" "github.com/EasyPost/easypost-go/v6" ) func delete() { client := easypost.New("EASYPOST_API_KEY") err := client.DeleteWebhook("hook_...") fmt.Println(err) } ``` #### Java ```java package webhooks; import com.easypost.exception.EasyPostException; import com.easypost.service.EasyPostClient; public class Delete { public static void main(String[] args) throws EasyPostException { EasyPostClient client = new EasyPostClient("EASYPOST_API_KEY"); client.webhook.delete("hook_..."); } } ``` #### C# ```csharp using System; using System.Collections.Generic; using System.Threading.Tasks; using EasyPost; using Newtonsoft.Json; namespace EasyPostExamples { public class Examples { public static async Task Main() { var client = new EasyPost.Client(new EasyPost.ClientConfiguration("EASYPOST_API_KEY")); await client.Webhook.Delete("hook_..."); } } } ``` #### Node.js ```javascript const EasyPostClient = require('@easypost/api'); const client = new EasyPostClient('EASYPOST_API_KEY'); (async () => { await client.Webhook.delete('hook_...'); })(); ``` #### PHP ```php webhook->delete('hook_...'); ``` #### Python ```python import easypost client = easypost.EasyPostClient("EASYPOST_API_KEY") client.webhook.delete("hook_...") ``` #### Ruby ```ruby require 'easypost' client = EasyPost::Client.new(api_key: 'EASYPOST_API_KEY') webhook = client.webhook.retrieve('hook_...') client.webhook.delete(webhook.id) ``` Delete a `Webhook` by `id`. --- Source: https://docs.easypost.com/guides/address-verification-guide # Address Verification Guide This guide outlines EasyPost's Address Verification services, including background information on general AVS and a tutorial on verifying addresses using the EasyPost API. For an introduction to EasyPost's API, refer to the Getting Started Guide. --- ## Verification Process Address verification uses the Address object in combination with the Verifications object. Verification occurs when the `verify`, `verify_strict`, or `verify_carrier` parameters are included in the request. > Note: Including the `verify` or `verify_strict` parameter enables address verification, regardless of whether the value is `true` or `false`. To prevent verification, omit these parameters entirely. When `verify_carrier` is used, the response includes a `verifications` dictionary with a `verify_carrier` key indicating the carrier used (e.g., `"verifications": { ..., "verify_carrier": "fedex" }`). When these parameters are included in the Address creation request, the response includes associated verification attributes, such as `zip4` and `delivery`. > Note: The `verify_strict` parameter performs the same corrections as `verify`, but returns an error if the address cannot be verified. Correctable addresses are still corrected and returned. ### Attributes - `zip4`: Available for U.S. addresses; verifies the Zip+4 code. - `delivery`: Checks full address deliverability and may apply minor corrections to spelling or formatting. - `carrier`: Returned when `verify_carrier` is provided in combination with `verify` or `verify_strict` (set to `true`); indicates carrier-grade verification performed by UPS or FedEx. ### Verification Response Verification results appear in the Verifications object of the returned Address. Possible responses include: - `success`: The address was successfully verified. - `errors`: Indicates a verification failure, with one or more error messages provided. - `details`: Additional data related to the verification, such as the longitude and latitude of the address. --- ## Street Name Abbreviation Behavior As of August 25, 2025, EasyPost no longer abbreviates street names when verifying addresses through **USPS**. Abbreviation is applied only when the validated `street1` field **exceeds 40 characters**. This change does not affect address verification performed through other carriers. --- ## Street1-to-Street2 Splitting Logic For U.S. and Canada addresses, if `street1` exceeds 35 characters, `street2` is empty, and the end of `street1` contains a recognized unit number format (e.g., “Apt 101”, “Suite 205”, “Unit #99833”), the unit number is moved to `street2`. This behavior ensures better address formatting and verification. | | | |---|---| | **Before:** | street1: "417 Montgomery St Floor 5"
street2: "" | | **After:** | street1: "417 Montgomery St"
street2: "Floor 5" | --- ## International AVS International address verification uses similar objects and responses, but `zip4` is not supported for non-U.S. addresses. > Note: International AVS is a premium stand-alone service that must be enabled before use. For more information about enabling international AVS, contact an EasyPost representative. --- ## Verifying an Address ### Example: Verifying an Address #### cURL ```shell curl -X GET https://api.easypost.com/v2/addresses/adr_.../verify \ -u "EASYPOST_API_KEY": ``` #### Go ```go package example import ( "fmt" "github.com/EasyPost/easypost-go/v6" ) func verify() { client := easypost.New("EASYPOST_API_KEY") address, _ := client.VerifyAddress("adr_...") fmt.Println(address) } ``` #### Java ```java package addresses; import com.easypost.exception.EasyPostException; import com.easypost.model.Address; import com.easypost.service.EasyPostClient; public class Verify { public static void main(String[] args) throws EasyPostException { EasyPostClient client = new EasyPostClient("EASYPOST_API_KEY"); Address address = client.address.verify("adr_..."); System.out.println(address); } } ``` #### C# ```csharp using System; using System.Collections.Generic; using System.Threading.Tasks; using EasyPost; using Newtonsoft.Json; namespace EasyPostExamples { public class Examples { public static async Task Main() { var client = new EasyPost.Client(new EasyPost.ClientConfiguration("EASYPOST_API_KEY")); address = await client.Address.Verify("adr_..."); Console.WriteLine(JsonConvert.SerializeObject(address, Formatting.Indented)); } } } ``` #### Node.js ```javascript const EasyPostClient = require('@easypost/api'); const client = new EasyPostClient('EASYPOST_API_KEY'); (async () => { const address = await client.Address.verifyAddress('adr_...'); console.log(address); })(); ``` #### PHP ```php address->verify('adr_...'); echo $address; ``` #### Python ```python import easypost client = easypost.EasyPostClient("EASYPOST_API_KEY") address = client.address.verify("adr_...") print(address) ``` #### Ruby ```ruby require 'easypost' client = EasyPost::Client.new(api_key: 'EASYPOST_API_KEY') address = client.address.verify('adr_...') puts address ``` --- ## Strict-Verifying an Address ### Example: Strict-Verifying an Address #### cURL ```shell curl -X POST https://api.easypost.com/v2/addresses \ -u "EASYPOST_API_KEY": \ -H 'Content-Type: application/json' \ -d '{ "address": { "street1": "000 unknown street", "city": "Not A City", "state": "ZZ", "zip": "00001", "country": "US", "email": "test@example.com", "phone": "5555555555" }, "verify_strict": true }' ``` #### Go ```go package example import ( "fmt" "github.com/EasyPost/easypost-go/v6" ) func verifyStrictParam() { client := easypost.New("EASYPOST_API_KEY") address, _ := client.CreateAddress( &easypost.Address{ Street1: "000 unknown street", City: "Not A City", State: "ZZ", Zip: "00001", Country: "US", Email: "test@example.com", Phone: "5555555555", }, &easypost.CreateAddressOptions{ VerifyStrict: true, }, ) fmt.Println(address) } ``` #### Java ```java package addresses; import com.easypost.exception.EasyPostException; import com.easypost.model.Address; import com.easypost.service.EasyPostClient; import java.util.HashMap; public class VerifyStrictParam { public static void main(String[] args) throws EasyPostException { EasyPostClient client = new EasyPostClient("EASYPOST_API_KEY"); HashMap params = new HashMap(); params.put("street1", "000 unknown street"); params.put("city", "Not A City"); params.put("state", "ZZ"); params.put("zip", "00001"); params.put("country", "US"); params.put("email", "test@example.com"); params.put("phone", "5555555555"); params.put("verify_strict", true); Address address = client.address.create(params); System.out.println(address); } } ``` #### C# ```csharp using System; using System.Collections.Generic; using System.Threading.Tasks; using EasyPost; using Newtonsoft.Json; namespace EasyPostExamples { public class Examples { public static async Task Main() { var client = new EasyPost.Client(new EasyPost.ClientConfiguration("EASYPOST_API_KEY")); EasyPost.Parameters.Address.Create parameters = new() { Street1 = "000 unknown street", City = "Not A City", State = "ZZ", Zip = "00001", Country = "US", Email = "test@example.com", Phone = "5555555555", VerifyStrict = true }; EasyPost.Models.API.Address address = await client.Address.Create(parameters); Console.WriteLine(JsonConvert.SerializeObject(address, Formatting.Indented)); } } } ``` #### Node.js ```javascript const EasyPostClient = require('@easypost/api'); const client = new EasyPostClient('EASYPOST_API_KEY'); (async () => { const address = await client.Address.create({ verify_strict: true, street1: '000 unknown street', city: 'Not A City', state: 'ZZ', zip: '00001', country: 'US', email: 'test@example.com', phone: '5555555555', }); console.log(address); })(); ``` #### PHP ```php address->create([ 'verify_strict' => true, 'street1' => '000 unknown street', 'city' => 'Not a City', 'state' => 'ZZ', 'zip' => '00001', 'country' => 'US', 'email' => 'test@example.com', 'phone' => '5555555555', ]); echo $address; ``` #### Python ```python import easypost client = easypost.EasyPostClient("EASYPOST_API_KEY") address = client.address.create( verify_strict=True, street1="000 unknown street", city="Not A City", state="ZZ", zip="00001", country="US", email="test@example.com", phone="5555555555", ) print(address) ``` #### Ruby ```ruby require 'easypost' client = EasyPost::Client.new(api_key: 'EASYPOST_API_KEY') address = client.address.create( verify_strict: true, street1: '000 unknown street', city: 'Not A City', state: 'ZZ', zip: '00001', country: 'US', email: 'test@example.com', phone: '5555555555', ) puts address ``` --- ## Verify an Existing Address ### Example: Verify an Existing Address #### cURL ```shell curl -X POST https://api.easypost.com/v2/addresses \ -u "EASYPOST_API_KEY": \ -H 'Content-Type: application/json' \ -d '{ "address": { "street1": "000 unknown street", "city": "Not A City", "state": "ZZ", "zip": "00001", "country": "US", "email": "test@example.com", "phone": "5555555555" }, "verify": true }' ``` #### Go ```go package example import ( "fmt" "github.com/EasyPost/easypost-go/v6" ) func verifyParam() { client := easypost.New("EASYPOST_API_KEY") address, _ := client.CreateAddress( &easypost.Address{ Street1: "000 unknown street", City: "Not A City", State: "ZZ", Zip: "00001", Country: "US", Email: "test@example.com", Phone: "5555555555", }, &easypost.CreateAddressOptions{ Verify: true, }, ) fmt.Println(address) } ``` #### Java ```java package addresses; import com.easypost.exception.EasyPostException; import com.easypost.model.Address; import com.easypost.service.EasyPostClient; import java.util.HashMap; public class VerifyParam { public static void main(String[] args) throws EasyPostException { EasyPostClient client = new EasyPostClient("EASYPOST_API_KEY"); HashMap params = new HashMap(); params.put("street1", "000 unknown street"); params.put("city", "Not A City"); params.put("state", "ZZ"); params.put("zip", "00001"); params.put("country", "US"); params.put("email", "test@example.com"); params.put("phone", "5555555555"); params.put("verify", true); Address address = client.address.create(params); System.out.println(address); } } ``` #### C# ```csharp using System; using System.Collections.Generic; using System.Threading.Tasks; using EasyPost; using Newtonsoft.Json; namespace EasyPostExamples { public class Examples { public static async Task Main() { var client = new EasyPost.Client(new EasyPost.ClientConfiguration("EASYPOST_API_KEY")); EasyPost.Parameters.Address.Create parameters = new() { Street1 = "000 unknown street", City = "Not A City", State = "ZZ", Zip = "00001", Country = "US", Email = "test@example.com", Phone = "5555555555", Verify = true }; EasyPost.Models.API.Address address = await client.Address.Create(parameters); Console.WriteLine(JsonConvert.SerializeObject(address, Formatting.Indented)); } } } ``` #### Node.js ```javascript const EasyPostClient = require('@easypost/api'); const client = new EasyPostClient('EASYPOST_API_KEY'); (async () => { const address = await client.Address.create({ verify: true, street1: '000 unknown street', city: 'Not A City', state: 'ZZ', zip: '00001', country: 'US', email: 'test@example.com', phone: '5555555555', }); console.log(address); })(); ``` #### PHP ```php address->create([ 'verify' => true, 'street1' => '000 unknown street', 'city' => 'Not a City', 'state' => 'ZZ', 'zip' => '00001', 'country' => 'US', 'email' => 'test@example.com', 'phone' => '5555555555', ]); echo $address; ``` #### Python ```python import easypost client = easypost.EasyPostClient("EASYPOST_API_KEY") address = client.address.create( verify=True, street1="000 unknown street", city="Not A City", state="ZZ", zip="00001", country="US", email="test@example.com", phone="5555555555", ) print(address) ``` #### Ruby ```ruby require 'easypost' client = EasyPost::Client.new(api_key: 'EASYPOST_API_KEY') address = client.address.create( verify: true, street1: '000 unknown street', city: 'Not A City', state: 'ZZ', zip: '00001', country: 'US', email: 'test@example.com', phone: '5555555555', ) puts address ``` --- ## Additional Resources Related: - [API Docs - Address](https://docs.easypost.com/guides/getting-started) --- Source: https://docs.easypost.com/guides/batches-guide # Batch Guide `Batches` are used to purchase shipping labels for multiple existing shipments through a coordinated asynchronous workflow. Once purchased, labels within a `Batch` can be downloaded together in a single file, simplifying high-volume label management. This guide explains the intended and supported process for working with batches using the EasyPost API. --- ## Prerequisites {/* prettier-ignore */} 1. Sign up for an EasyPost account or log in to an existing account. 2. Configure Webhook URLs for both Test and Production modes. 3. Use one of EasyPost's official client libraries. 4. Review the Getting Started Guide for basic EasyPost concepts. Related: - [Webhooks Guide](https://docs.easypost.com/guides/getting-started) --- ## Step 1: Create a Batch of Shipments A `batch` is a collection of existing `shipment` objects that are processed together for label purchase and retrieval. Shipments must be created (and optionally purchased) **before** they are added to a batch. Batches do not replace individual shipment creation. > Note: It is recommended to keep each batch under 1,000 shipments. This best practice helps avoid timeout errors during the batch buying process. ### Asynchronous Process Batch operations are processed asynchronously due to the potential volume of shipments involved. 1. Submit a `POST` request to create the batch using existing shipment IDs. 2. The batch enters a `“status”: “created”` state. 3. A webhook event is sent once the batch reaches `“status”: “created”`. > Note: Due to the webhook update being asynchronous, carefully consider the implications of using Batches instead of multiple shipment requests. If any shipments fail during batch creation, the webhook event will indicate `”status”: “creation_failed”`. > Note: The asynchronous behavior described here applies to batch processing only. Shipment creation is a separate operation and must be completed before shipments are added to the batch. #### Creating a Batch ### Example: POST /batches #### cURL ```shell curl -X POST https://api.easypost.com/v2/batches \ -u "EASYPOST_API_KEY": \ -H 'Content-Type: application/json' \ -d '{ "batch": { "shipments": [ { "id": "shp_..." }, { "id": "shp_..." } ] } }' ``` #### Go ```go package example import ( "fmt" "github.com/EasyPost/easypost-go/v6" ) func create() { client := easypost.New("EASYPOST_API_KEY") shipment, _ := client.GetShipment("shp_...") batch, _ := client.CreateBatch(shipment) fmt.Println(batch) } ``` #### Java ```java package batches; import com.easypost.exception.EasyPostException; import com.easypost.model.Batch; import com.easypost.service.EasyPostClient; import java.util.ArrayList; import java.util.HashMap; import java.util.List; public class Create { public static void main(String[] args) throws EasyPostException { EasyPostClient client = new EasyPostClient("EASYPOST_API_KEY"); List> shipmentsList = new ArrayList>(); HashMap shipmentMap = new HashMap(); shipmentMap.put("id", "shp_..."); shipmentsList.add(shipmentMap); HashMap params = new HashMap(); params.put("shipment", shipmentsList); Batch batch = client.batch.create(params); System.out.println(batch); } } ``` #### C# ```csharp using System; using System.Collections.Generic; using System.Threading.Tasks; using EasyPost; using Newtonsoft.Json; namespace EasyPostExamples { public class Examples { public static async Task Main() { var client = new EasyPost.Client(new EasyPost.ClientConfiguration("EASYPOST_API_KEY")); EasyPost.Models.API.Shipment shipment = await client.Shipment.Retrieve("shp_..."); EasyPost.Parameters.Batch.Create parameters = new() { Shipments = new List() { shipment } }; EasyPost.Models.API.Batch batch = await client.Batch.Create(parameters); Console.WriteLine(JsonConvert.SerializeObject(batch, Formatting.Indented)); } } } ``` #### Node.js ```javascript const EasyPostClient = require('@easypost/api'); const client = new EasyPostClient('EASYPOST_API_KEY'); (async () => { const batch = await client.Batch.create({ shipments: [{ id: 'shp_...' }, { id: 'shp_...' }], }); console.log(batch); })(); ``` #### PHP ```php batch->create([ 'shipments' => [ ['id' => 'shp_...'], ['id' => 'shp_...'], ] ]); echo $batch; ``` #### Python ```python import easypost client = easypost.EasyPostClient("EASYPOST_API_KEY") batch = client.batch.create( shipments=[ {"id": "shp_..."}, {"id": "shp_..."}, ], ) print(batch) ``` #### Ruby ```ruby require 'easypost' client = EasyPost::Client.new(api_key: 'EASYPOST_API_KEY') batch = client.batch.create( shipments: [ { id: 'shp_...' }, { id: 'shp_...' }, ], ) puts batch ``` Related: - [Shipment Object](https://docs.easypost.com/docs/batches) --- ## Step 2: Add and Remove Shipments from a Batch After a batch is created, shipments can be added or removed as needed. ### Add Shipments To add shipments, create and purchase the shipment object, then add it to an existing batch using the `add_shipments` endpoint. ### Example: POST /batches/:id/add_shipments #### cURL ```shell curl -X POST https://api.easypost.com/v2/batches/batch_.../add_shipments \ -u "EASYPOST_API_KEY": \ -H 'Content-Type: application/json' \ -d '{ "shipments": [ { "id": "shp_..." }, { "id": "shp_..." } ] }' ``` #### Go ```go package example import ( "fmt" "github.com/EasyPost/easypost-go/v6" ) func addShipments() { client := easypost.New("EASYPOST_API_KEY") shipment, _ := client.GetShipment("shp_...") batch, _ := client.AddShipmentsToBatch("batch_...", shipment) fmt.Println(batch) } ``` #### Java ```java package batches; import com.easypost.exception.EasyPostException; import com.easypost.model.Batch; import com.easypost.service.EasyPostClient; import java.util.ArrayList; import java.util.HashMap; import java.util.List; public class AddShipments { public static void main(String[] args) throws EasyPostException { EasyPostClient client = new EasyPostClient("EASYPOST_API_KEY"); HashMap shipment1 = new HashMap(); shipment1.put("id", "shp_..."); HashMap shipment2 = new HashMap(); shipment2.put("id", "shp_..."); List> shipments = new ArrayList>(); shipments.add(shipment1); shipments.add(shipment2); HashMap params = new HashMap(); params.put("shipments", shipments); Batch batch = client.batch.addShipments("batch_...", params); System.out.println(batch); } } ``` #### C# ```csharp using System; using System.Collections.Generic; using System.Threading.Tasks; using EasyPost; using Newtonsoft.Json; namespace EasyPostExamples { public class Examples { public static async Task Main() { var client = new EasyPost.Client(new EasyPost.ClientConfiguration("EASYPOST_API_KEY")); EasyPost.Models.API.Shipment shipment = await client.Shipment.Retrieve("shp_..."); EasyPost.Parameters.Batch.AddShipments parameters = new() { Shipments = new List { shipment }, }; EasyPost.Models.API.Batch batch = await client.Batch.AddShipments("batch_...", parameters); Console.WriteLine(JsonConvert.SerializeObject(batch, Formatting.Indented)); } } } ``` #### Node.js ```javascript const EasyPostClient = require('@easypost/api'); const client = new EasyPostClient('EASYPOST_API_KEY'); (async () => { const batch = await client.Batch.addShipments('batch_...', ['shp_...', 'shp_...']); console.log(batch); })(); ``` #### PHP ```php batch->addShipments( 'batch_...', [ 'shipments' => [ ['id' => 'shp_...'], ['id' => 'shp_...'], ] ] ); echo $batch; ``` #### Python ```python import easypost client = easypost.EasyPostClient("EASYPOST_API_KEY") batch = client.batch.add_shipments( "batch_...", shipments=[ {"id": "shp_..."}, {"id": "shp_..."}, ], ) print(batch) ``` #### Ruby ```ruby require 'easypost' client = EasyPost::Client.new(api_key: 'EASYPOST_API_KEY') batch = client.batch.add_shipments( 'batch_...', shipments: [ { id: 'shp_...' }, { id: 'shp_...' }, ], ) puts batch ``` ### Remove Shipments Shipments may be removed for various reasons, such as incorrect addresses or changes in shipping requirements. EasyPost provides a straightforward method to remove shipments from an existing batch using the `remove_shipments` endpoint. ### Example: POST /batches/:id/remove_shipments #### cURL ```shell curl -X POST https://api.easypost.com/v2/batches/batch_.../remove_shipments \ -u "EASYPOST_API_KEY": \ -H 'Content-Type: application/json' \ -d '{ "shipments": [ { "id": "shp_..." } ] }' ``` #### Go ```go package example import ( "fmt" "github.com/EasyPost/easypost-go/v6" ) func removeShipments() { client := easypost.New("EASYPOST_API_KEY") shipment, _ := client.GetShipment("shp_...") batch, _ := client.RemoveShipmentsFromBatch("batch_...", shipment) fmt.Println(batch) } ``` #### Java ```java package batches; import com.easypost.exception.EasyPostException; import com.easypost.model.Batch; import com.easypost.service.EasyPostClient; import java.util.ArrayList; import java.util.HashMap; import java.util.List; public class RemoveShipments { public static void main(String[] args) throws EasyPostException { EasyPostClient client = new EasyPostClient("EASYPOST_API_KEY"); HashMap shipment1 = new HashMap(); shipment1.put("id", "shp_..."); List> shipments = new ArrayList>(); shipments.add(shipment1); HashMap params = new HashMap(); params.put("shipments", shipments); Batch batch = client.batch.removeShipments("batch_...", params); System.out.println(batch); } } ``` #### C# ```csharp using System; using System.Collections.Generic; using System.Threading.Tasks; using EasyPost; using Newtonsoft.Json; namespace EasyPostExamples { public class Examples { public static async Task Main() { var client = new EasyPost.Client(new EasyPost.ClientConfiguration("EASYPOST_API_KEY")); EasyPost.Models.API.Shipment shipment = await client.Shipment.Retrieve("shp_..."); EasyPost.Parameters.Batch.RemoveShipments parameters = new() { Shipments = new List { shipment }, }; EasyPost.Models.API.Batch batch = await client.Batch.RemoveShipments("batch_...", parameters); Console.WriteLine(JsonConvert.SerializeObject(batch, Formatting.Indented)); } } } ``` #### Node.js ```javascript const EasyPostClient = require('@easypost/api'); const client = new EasyPostClient('EASYPOST_API_KEY'); (async () => { const batch = await client.Batch.removeShipments('batch_...', ['shp_...']); console.log(batch); })(); ``` #### PHP ```php batch->removeShipments( 'batch_...', [ 'shipments' => [ ['id' => 'shp_...'] ] ] ); echo $batch; ``` #### Python ```python import easypost client = easypost.EasyPostClient("EASYPOST_API_KEY") batch = client.batch.remove_shipments( "batch_...", shipments=[ { "id": "shp_...", } ], ) print(batch) ``` #### Ruby ```ruby require 'easypost' client = EasyPost::Client.new(api_key: 'EASYPOST_API_KEY') batch = client.batch.remove_shipments( 'batch_...', shipments: [ { id: 'shp_...' }, ], ) puts batch ``` --- ## Step 3: Create and Purchase Shipping Labels for a Batch Purchasing shipping labels for a batch is performed as a separate asynchronous operation on an existing batch. ### Initiate the Purchase Issue a `buy request` for the intended batch. This action triggers an asynchronous operation to generate necessary labels. ### How Batch Purchasing Works - The buy request queues all shipments in the bach for label purchase. - The initial response does not include label URLs. - A webhook event is sent when the batch reaches a terminal state: 1. `“purchased”` 2. `“purchase_failed”` Considering the support for high-volume shipments in a single Batch, the label creation process will need additional time to complete for all shipments included. > Note: It is recommended to keep each batch under 1,000 shipments. This best practice helps avoid timeout errors during the batch buying process. ### Error Handling Once all labels have been purchased and created for a batch, a webhook notification is sent to the designated application endpoint. The state of the Batch Object will be: `“purchased”` In the event of errors during the label creation process, the batch's state changes to: `“purchase_failed”`. Any issues must be addressed by fixing or removing the failed shipments before proceeding to the `batch label` process. #### Buying a Batch ### Example: POST /batches/:id/buy #### cURL ```shell curl -X POST https://api.easypost.com/v2/batches \ -u "EASYPOST_API_KEY": \ -H 'Content-Type: application/json' \ -d '{ "batch": { "shipments": [ "from_address": {"id": "adr_..."}, "to_address": {"id": "adr_..."}, "parcel": {"id": "prcl_..."}, "service": "First", "carrier": "USPS", "carrier_accounts": ["ca_..."] ] } }' curl -X POST https://api.easypost.com/v2/batches/batch_.../buy \ -u "EASYPOST_API_KEY": ``` #### Go ```go package example import ( "fmt" "github.com/EasyPost/easypost-go/v6" ) func buy() { client := easypost.New("EASYPOST_API_KEY") createdBatch, _ := client.CreateBatch( &easypost.Shipment{ FromAddress: &easypost.Address{ ID: "adr_...", }, ToAddress: &easypost.Address{ ID: "adr_...", }, Parcel: &easypost.Parcel{ ID: "prcl_...", }, Service: "First", Carrier: "USPS", CarrierAccountIDs: []string{"ca_..."}, }, ) batch, _ := client.BuyBatch(createdBatch.ID) fmt.Println(batch) } ``` #### Java ```java package batches; import com.easypost.exception.EasyPostException; import com.easypost.model.Batch; import com.easypost.service.EasyPostClient; import java.util.ArrayList; import java.util.HashMap; import java.util.List; public class Buy { public static void main(String[] args) throws EasyPostException { EasyPostClient client = new EasyPostClient("EASYPOST_API_KEY"); List> shipmentsList = new ArrayList>(); HashMap shipmentMap = new HashMap(); HashMap fromAddress = new HashMap(); fromAddress.put("id", "adr_..."); shipmentMap.put("from_address", fromAddress); HashMap toAddress = new HashMap(); toAddress.put("id", "adr_..."); shipmentMap.put("to_address", toAddress); HashMap parcel = new HashMap(); parcel.put("id", "prcl_..."); shipmentMap.put("parcel", parcel); shipmentMap.put("service", "First"); shipmentMap.put("carrier", "USPS"); String[] carrierAccounts = { "ca_..." }; shipmentMap.put("carrier_accounts", carrierAccounts); shipmentsList.add(shipmentMap); HashMap params = new HashMap(); params.put("shipment", shipmentsList); Batch createdBatch = client.batch.create(params); Batch batch = client.batch.buy(createdBatch.getId()); System.out.println(batch); } } ``` #### C# ```csharp using System; using System.Collections.Generic; using System.Threading.Tasks; using EasyPost; using Newtonsoft.Json; namespace EasyPostExamples { public class Examples { public static async Task Main() { var client = new EasyPost.Client(new EasyPost.ClientConfiguration("EASYPOST_API_KEY")); EasyPost.Parameters.Shipment.Create shipmentParameters = new() { ToAddress = new EasyPost.Parameters.Address.Create { Id = "adr_..." }, FromAddress = new EasyPost.Parameters.Address.Create { Id = "adr_..." }, Parcel = new EasyPost.Parameters.Parcel.Create { Id = "prcl_..." }, Service = "First", Carrier = "USPS", CarrierAccountIds = new List { "ca_..." } }; EasyPost.Parameters.Batch.Create parameters = new() { Shipments = new List() { shipmentParameters } }; EasyPost.Models.API.Batch batch = await client.Batch.Create(parameters); EasyPost.Models.API.Batch batch = await client.Batch.Buy(batch.Id); Console.WriteLine(JsonConvert.SerializeObject(batch, Formatting.Indented)); } } } ``` #### Node.js ```javascript const EasyPostClient = require('@easypost/api'); const client = new EasyPostClient('EASYPOST_API_KEY'); (async () => { const createdBatch = await client.Batch.create({ shipments: [ { from_address: { id: 'adr_...' }, to_address: { id: 'adr_...' }, parcel: { id: 'prcl_...' }, service: 'First', carrier: 'USPS', carrier_accounts: ['ca_...'], }, ], }); const batch = await client.Batch.buy(createdBatch.id); console.log(batch); })(); ``` #### PHP ```php batch->create([ 'shipments' => [ ['from_address' => ['id' => 'adr_...']], ['to_address' => ['id' => 'adr_...']], ['parcel' => ['id' => 'prcl_...']], ['service' => 'First'], ['carrier' => 'USPS'], ['carrier_accounts' => ['ca_...']], ] ]); $batch = $client->batch->buy($createdBatch['id']); echo $batch; ``` #### Python ```python import easypost client = easypost.EasyPostClient("EASYPOST_API_KEY") createdBatch = client.batch.create( shipments=[ { "from_address": {"id": "adr_..."}, "to_address": {"id": "adr_..."}, "parcel": {"id": "prcl_..."}, "service": "First", "carrier": "USPS", "carrier_accounts": ["ca_..."], }, ], ) batch = client.batch.buy(createdBatch.id) print(batch) ``` #### Ruby ```ruby require 'easypost' client = EasyPost::Client.new(api_key: 'EASYPOST_API_KEY') created_batch = client.batch.create( shipments: [ { from_address: { id: 'adr_...' }, to_address: { id: 'adr_...' }, parcel: { id: 'prcl_...' }, service: 'First', carrier: 'USPS', carrier_accounts: ['ca_...'], }, ], ) batch = client.batch.buy(created_batch.id) puts batch ``` --- ## Step 4: Create and Retrieve a Batch Label After purchasing, compile all shipping labels into a single `batch label`. All Shipments must have a `"status": “postage_purchased”` status to generate a label. Failed purchases must be removed or resolved during the Create and Purchase Shipping Labels process. 1. Submit a `POST` request to generate a batch label, specifying the desired file format (PDF, EPL2, or ZPL). 2. Retrieve labels by downloading the batch label file containing all individual shipment labels. View an example of retrieving labels in a single PDF file If the batch label fails to create, the batch object will return to a `“purchased”` state. #### Create a Batch Label ### Example: POST /batches/:id/label #### cURL ```shell curl -X POST https://api.easypost.com/v2/batches/batch_.../label \ -u "EASYPOST_API_KEY": \ -H 'Content-Type: application/json' \ -d '{ "file_format": "PDF" }' ``` #### Go ```go package example import ( "fmt" "github.com/EasyPost/easypost-go/v6" ) func label() { client := easypost.New("EASYPOST_API_KEY") batch, _ := client.GetBatchLabels("batch_...", "PDF") fmt.Println(batch) } ``` #### Java ```java package batches; import com.easypost.exception.EasyPostException; import com.easypost.model.Batch; import com.easypost.service.EasyPostClient; import java.util.HashMap; public class Label { public static void main(String[] args) throws EasyPostException { EasyPostClient client = new EasyPostClient("EASYPOST_API_KEY"); HashMap params = new HashMap(); params.put("file_format", "PDF"); Batch batch = client.batch.label("batch_...", params); System.out.println(batch); } } ``` #### C# ```csharp using System; using System.Collections.Generic; using System.Threading.Tasks; using EasyPost; using Newtonsoft.Json; namespace EasyPostExamples { public class Examples { public static async Task Main() { var client = new EasyPost.Client(new EasyPost.ClientConfiguration("EASYPOST_API_KEY")); EasyPost.Parameters.Batch.GenerateLabel parameters = new() { FileFormat = "PDF", }; EasyPost.Models.API.Batch batch = await client.Batch.GenerateLabel("batch_...", parameters); Console.WriteLine(JsonConvert.SerializeObject(batch, Formatting.Indented)); } } } ``` #### Node.js ```javascript const EasyPostClient = require('@easypost/api'); const client = new EasyPostClient('EASYPOST_API_KEY'); (async () => { const batch = await client.Batch.generateLabel('batch_...', 'PDF'); console.log(batch); })(); ``` #### PHP ```php batch->label( 'batch_...', ['file_format' => 'PDF'] ); echo $batchWithLabel; ``` #### Python ```python import easypost client = easypost.EasyPostClient("EASYPOST_API_KEY") batch = client.batch.label("batch_...", file_format="PDF") print(batch) ``` #### Ruby ```ruby require 'easypost' client = EasyPost::Client.new(api_key: 'EASYPOST_API_KEY') batch = client.batch.label( 'batch_...', file_format: 'PDF', ) puts batch ``` --- ## Step 5: Use Webhooks for a Batch Webhooks play a critical role in managing batches by providing real-time updates at various stages: - Step 1 - Create a Batch of Shipments - Step 3 - Create and Purchase Shipping Labels - Step 4 - Create and Retrieve a Batch Label ### Understanding Webhook Operations #### Asynchronous Updates Due to the asynchronous nature of batch operations, webhooks are used at two crucial points: - Immediately following the initial `POST` request to create, purchase, or retrieve labels for a batch. - Once the given action has reached a final state. #### Error Notifications Should any errors arise during these processes, detailed information about them is passed back in the associated webhook, enabling prompt resolution. ### Identifying Batch Events in Webhooks #### Batch State Evaluate the `state` of the `batch object` to check if the batch was successfully processed. #### Errors and Resolutions In case of errors like `“creation failed”` or `“purchase_failed”`, inspect the `“batch_status”` of each shipment object included in the batch. A summary of successes and failures is provided to understand how many shipments need attention. #### Example Webhook for a Batch ```json { "completed_urls": [], "created_at": "2014-07-22T07:46:44Z", "description": "batch.updated", "id": "evt_...", "mode": "test", "object": "Event", "pending_urls": ["https://webhooks.example.com"], "previous_attributes": { "state": "label_generating" }, "result": { "created_at": "2014-07-22T07:46:44Z", "id": "batch_...", "label_url": "https://amazonaws.com/.../a1b2c3.pdf", "mode": "test", "num_shipments": 1, "object": "Batch", "reference": null, "scan_form": null, "shipments": [ { "batch_message": null, "batch_status": "created", "id": "shp_..." }, { "batch_message": null, "batch_status": "created", "id": "shp_..." }, { "batch_message": null, "batch_status": "created", "id": "shp_..." }, { "batch_message": null, "batch_status": "created", "id": "shp_..." } ], "state": "label_generated", "status": { "created": 0, "creation_failed": 0, "postage_purchase_failed": 0, "postage_purchased": 1, "queued_for_purchase": 0 }, "updated_at": "2014-08-04T22:37:52Z" }, "updated_at": "2014-08-04T22:37:51Z" } ``` --- ## Additional Resources ### Support and Troubleshooting EasyPost offers support to assist with FAQs, troubleshooting issues, and inquiries related to the EasyPost platform. Please visit the API Docs or the Help Center for more information. Related: - [API Docs](https://docs.easypost.com/docs/authentication) - [Help Center](https://support.easypost.com/hc/en-us) --- Source: https://docs.easypost.com/guides/carrier-claims-guide # USPS Claims Guide Accounts are enrolled in EP Guard by default. EasyPost watches EasyPost-purchased USPS labels. If we already have product value, we file. If we do not, we email a weekly CSV of the claims that can still be filed once you add a product value. Approved money goes to the enrolled merchant's Wallet after USPS pays. This guide is USPS-only. Other carriers will be added later. This is **not** EasyPost Insurance and **not** for bring-your-own tracking. Use a **User API key** for API calls. Full request and response fields are on the UspsClaim API. --- ## 1. EP Guard is on by default USPS claims enrollment is already on. Open **Carrier Claims / EP Guard** in the EasyPost Dashboard to see claims. No separate enroll step is required. To rehearse the rest of this guide without a production label, create a test-mode claim. See [Try it without a live label](#try-it-without-a-live-label). --- ## 2. Optionally send product value when you ship If EasyPost already has a merchandise total of at least **$2.00**, we can file later without asking. New integrations should send `line_items`. If the shipment already includes a customs form, EasyPost can use those item values instead. If you skip both, the claim still appears when the label is lost or damaged — you supply the value then. **`line_items`** Pass `line_items` when you **create** the shipment. This is the claims integration. EasyPost keeps `line_items` internally. They are not sent to USPS, they do not appear on the Shipment response, and they are not used for anything except USPS Claims. Each object in `line_items` must include: - `total_line_value` (string): The total value of the line. - `item_description` (string): A brief description of the item. ```json { "line_items": [ { "total_line_value": "129.00", "item_description": "Mugs" }, { "total_line_value": "45.50", "item_description": "T-shirts" } ] } ``` **CustomsInfo (when you already send a customs form)** If the shipment includes a CustomsInfo with CustomsItems, EasyPost uses the sum of each item's `value`. That `value` is the **total USD for the line** (quantity already included — do not multiply again). You do not also send `line_items` when those values are already on the customs form. CustomsInfo is how you send an international customs form. The same object can be attached on a domestic USPS shipment. Nested create examples live on Create a Shipment and the Customs Guide. ```json { "customs_info": { "eel_pfc": "NOEEI 30.37(a)", "customs_certify": true, "customs_signer": "Steve Brule", "contents_type": "merchandise", "restriction_type": "none", "customs_items": [ { "description": "T-shirts", "quantity": 1, "weight": 5, "value": 10.0, "origin_country": "US" } ] } } ``` Product value is the value of the package or order. Do not use the shipment's insurance amount. --- ## 3. EasyPost files, or EasyPost asks You can submit evidence any time before **60 days** from ship date, including before the USPS filing window opens. EasyPost files during that window (typically 30–60 days from ship date; military destinations start later). Expired claims cannot accept evidence. Declared product value must be at least **$2.00**; larger amounts are accepted. USPS pays out up to **$100.00** unless additional insurance was purchased. The negotiated EasyPost USPS Claims Fee is charged to the enrolled merchant. | Status | Meaning | |---|---| | action_required | We need a product value of at least $2.00. | | ready_to_file | We have what we need. Filing waits for the USPS window. | | submitted | Filed with USPS. | | approved | USPS approved. Merchant Wallet payout follows USPS payment. | | denied | USPS denied the claim. | | expired | Past 60 days from ship date. Evidence is closed. | | failed | Filing or processing failed. | If we already have product value, you can skip the next step. If we do not, the claim shows up in EP Guard and on `needs_info`. That is expected. Sending `line_items` or CustomsInfo at create is an optimization, not the requirement to get paid. --- ## 4. When a claim needs you ### Find the claims 1. The weekly email. It attaches a CSV of claims that can still be filed, but only after you add a product value. 2. `GET /v2/carrier_claims/usps_claims/needs_info` 3. **Carrier Claims / EP Guard** in the Dashboard. ### Supply the missing information **Your team has the value** - Reply to the weekly email with a CSV or XLSX. Each row needs a shipment ID or a tracking number, and `product_value` (USD, at least `$2.00`). Set the addresses in EP Guard, separated by commas. EasyPost emails the CSV to every address every Monday at 13:00 UTC. When you save, leave the box unchecked to wait for Monday, or check it to email the current file now. - Many claims: `POST /v2/carrier_claims/usps_claims/evidence`. - One claim, or a few: `POST /v2/carrier_claims/usps_claims/:id/evidence`. **You have a CSM and a spreadsheet** Your CSM will reach out. Send them any spreadsheet that has a tracking number or a shipment ID, and a product value. See needs_info and evidence. --- ## 5. Watch status Poll: - All claims: `GET /v2/carrier_claims/usps_claims` - One claim: `GET /v2/carrier_claims/usps_claims/:id` - Only claims that still need you: `GET /v2/carrier_claims/usps_claims/needs_info` When a claim is **Approved**, payout follows USPS payment, then lands in the EasyPost Wallet. --- ## Try it without a live label Use a **test** User API key: ``` POST /v2/carrier_claims/usps_claims ``` Pass a tracking code. That creates a `mode=test` claim you can list and submit evidence for. EasyPost will not file it with USPS. Production claims are created automatically from eligible purchased labels — you cannot `POST` those. See Create a test-mode USPS Claim. --- ## Multi-store accounts Child production keys work when the parent is enrolled. Parent keys do not include child-user claims unless you pass `include_children=true` on list, `needs_info`, retrieve, and evidence. The Dashboard always expands children. --- ## Limits Full field reference: UspsClaim API. - Product value minimum **$2.00**; larger declared values are accepted - USPS pays out up to **$100.00** unless additional insurance was purchased - Approved payouts are subject to the **negotiated EasyPost USPS Claims Fee** - Evidence until **60 days** from ship date; EasyPost files in the USPS window --- ## FAQs **Q: Is this EasyPost Insurance?** No. USPS Claims are indemnity claims on EasyPost-purchased USPS labels. EasyPost Insurance is a separate product and API. **Q: Can I try the API without a production USPS label?** Yes. Use a test User API key to `POST /v2/carrier_claims/usps_claims` with a tracking code. EasyPost will not file that claim with USPS. **Q: Should I send `line_items` or CustomsInfo?** Send `line_items` when you are integrating USPS Claims. `line_items` are only for claims. If the shipment already has CustomsItem `value`s on a CustomsInfo for an international customs form, EasyPost uses those and you do not also send `line_items`. See the Customs Guide. **Q: Will `line_items` appear in the shipment API response?** No. `line_items` are retained internally for claims and are not returned on the Shipment object. `customs_info` is a normal Shipment field and is returned. **Q: Can I send evidence before day 30?** Yes. Submit any time before day 60. Filing waits until the USPS window. **Q: Can EasyPost email me the claims that still need a product value?** Yes. Set the addresses in EP Guard, separated by commas. EasyPost emails the CSV to every address every Monday at 13:00 UTC. When you save, leave the box unchecked to wait for Monday, or check it to email the current file now. Reply with a CSV or XLSX that has a shipment ID or tracking number, and `product_value`. **Q: Can a parent API key list child-user claims?** Yes. Pass `include_children=true`. The default is that key's user only. Child production keys already work when the parent is enrolled. The Dashboard always expands children. --- ## Additional Resources Related: - [CustomsInfo](https://docs.easypost.com/docs/carrier-claims/usps-claims) - [CustomsItem](https://docs.easypost.com/docs/customs-infos) - [Customs Guide](https://docs.easypost.com/docs/customs-items) - [Create a Shipment](https://docs.easypost.com/guides/customs-guide) - [Trackers (BYO labels are not this API)](https://docs.easypost.com/docs/shipments#create-a-shipment) --- Source: https://docs.easypost.com/guides/child-users-guide # Child Users Guide This guide will explain what Child Users are, and why they could be a useful function in your shipping application. A child **User** is essentially a dependent clone of a parent **User**. We've created child **User** functionality as a way for organizations to organize users with their own carrier credentials. Child **Users** can not log into the EasyPost website, and they can only be created in Production mode with your Production API Key. Upon creation, the child User will only have the parent **User's** USPS account by default. Any other carrier accounts that need to be added to the child User must be built into your application's logic on your end. Other than organizing activity and **CarrierAccounts** the central advantage of a child account is that billing flows through the parent's payment information. This prevents the parent **User** from having to input duplicate billing information. Child **Users** can serve a few important purposes within your organization: - You want to organize sets of users together, based on different parent **User** settings as templates. - Your consumers want to use your shipping application, but also want to use their own negotiated rates. - You want to exert greater control of your billing. All child **Users** roll their billing up to their parent **User**. Of course, if you find another way to leverage child **Users**, feel free to build it. We love it when our customers use our API in creative ways. The structure of a child **User** is identicial to its parent, which means that their representations contain many more properties than are actually used. Also, creating a child **User** requires almost none of the properties necessary for creating a top-level **User**. Here is an example of a child user: #### Creating a Child User ### Example: POST /users #### cURL ```shell curl -X POST https://api.easypost.com/v2/users \ -u "EASYPOST_API_KEY": \ -H 'Content-Type: application/json' \ -d '{ "user": { "name": "Child Account Name" } }' ``` #### Go ```go package example import ( "fmt" "github.com/EasyPost/easypost-go/v6" ) func create() { client := easypost.New("EASYPOST_API_KEY") userName := "Child Account Name" user, _ := client.CreateUser( &easypost.UserOptions{ Name: &userName, }, ) fmt.Println(user) } ``` #### Java ```java package users; import com.easypost.exception.EasyPostException; import com.easypost.model.User; import com.easypost.service.EasyPostClient; import java.util.HashMap; public class Create { public static void main(String[] args) throws EasyPostException { EasyPostClient client = new EasyPostClient("EASYPOST_API_KEY"); HashMap params = new HashMap(); params.put("name", "Child Account Name"); User user = client.user.create(params); System.out.println(user); } } ``` #### C# ```csharp using System; using System.Collections.Generic; using System.Threading.Tasks; using EasyPost; using Newtonsoft.Json; namespace EasyPostExamples { public class Examples { public static async Task Main() { var client = new EasyPost.Client(new EasyPost.ClientConfiguration("EASYPOST_API_KEY")); EasyPost.Parameters.User.CreateChild parameters = new() { Name = "Child Account Name", }; EasyPost.Models.API.User user = await client.User.Create(parameters); Console.WriteLine(JsonConvert.SerializeObject(user, Formatting.Indented)); } } } ``` #### Node.js ```javascript const EasyPostClient = require('@easypost/api'); const client = new EasyPostClient('EASYPOST_API_KEY'); (async () => { const user = await client.User.create({ name: 'Child Account Name', }); console.log(user); })(); ``` #### PHP ```php user->create([ 'name' => 'Child Account Name' ]); echo $child; ``` #### Python ```python import easypost client = easypost.EasyPostClient("EASYPOST_API_KEY") user = client.user.create(name="Child Account Name") print(user) ``` #### Ruby ```ruby require 'easypost' client = EasyPost::Client.new(api_key: 'EASYPOST_API_KEY') user = client.user.create( name: 'Child Account Name', ) puts user ``` [Content omitted: related links and resources. Review the rendered documentation for navigation links.] --- Source: https://docs.easypost.com/guides/claim-messages-guide # Claim Messages Use one webhook for the whole claim. File the claim with `POST /claims`, then handle the events below. The same events are available on every account. Follow-up text is also emailed. The webhook is how your system receives it. Store each event by its `id`. EasyPost may deliver the same event more than once. Related: - [Events](https://docs.easypost.com/docs/insurance/claims) --- ## Events `description` is the event name. `result` is the payload. - **`claim.message`**, `direction` `outbound`. Show `body` and any attachments. Collect the reply in your system. - **`claim.message`**, `direction` `inbound`. A customer reply, from this API or from email. Use the message `id` to recognize one you already stored. - **`claim.approved`**. Show `approved_amount`. If `status` is `approved_partial`, that amount is all that will be paid. - **`claim.rejected`**. Show `status_detail`. That sentence is the denial reason. - **`claim.submitted`**, **`claim.updated`**, and **`claim.cancelled`**. Update the claim from `status`. On `claim.message`, `result` is a message (`cmsg_...`). On the other events, `result` is the Claim (`clm_...`). ### A question from EasyPost ### A denial Show `status_detail` as written. When EasyPost knows what was missing or unclear, the sentence names it. The same sentence names other gaps. For example: "We could not approve this claim because the damage photo did not show the item clearly enough to review." When EasyPost does not know the gap, `status_detail` is "Insufficient evidence", "Item not covered under policy", "Claim filed outside the allowed window", "Required information was not provided", or "Claim does not meet policy requirements". `GET /claims/:id` returns the same status and reason if you missed the webhook. --- ## Send the reply `POST /claims/:id/messages` Send the seller's text in `body` and files in `attachments` as base64 images or PDFs, the same way you attach files when creating a claim. Include `idempotency_key`, up to 64 ASCII characters, so a retry does not file the reply twice. A retry sent while the first request is still being delivered returns `409`; send it again with the same key. POST /claims/:id/messages} codes={[ { language: "shell", code: `curl -X POST https://api.easypost.com/v2/claims/clm_.../messages \\ -u "EASYPOST_API_KEY": \\ -H "Content-Type: application/json" \\ -d '{ "body": "Here is the order confirmation showing the item and the total.", "attachments": ["REPLACE_WITH_BASE64_STRING"], "idempotency_key": "order-confirmation-1" }'`, }, ]} /> EasyPost adds that reply to the claim, including when a person is handling it. The next question arrives as another `claim.message` event. `GET /claims/:id/messages` lists the thread oldest first if you missed a webhook. Use `before_id` or `after_id`, not both. A test API key stores the reply and sends a test-mode event. In production, retry if the claim is not ready to receive messages yet. A cancelled claim cannot take a reply. --- Source: https://docs.easypost.com/guides/commercial-invoice-guide # Commercial Invoice Guide A commercial invoice is a required document for international shipments. It provides a detailed description and declared value of the goods being shipped. Customs agencies use this document to assess duties and taxes and to determine whether the goods can legally enter the destination country. --- ## Prerequisites - A valid `Shipment` must be created. - `CustomsInfo` must be included in the shipment. Related: - [Shipments](https://docs.easypost.com/docs/shipments) - [CustomsInfo](https://docs.easypost.com/docs/customs-infos) --- ## Generating Commercial Invoices When a `Shipment` is created with valid customs information, EasyPost automatically generates a commercial invoice and returns it in the Form object. The commercial invoice is provided in PDF format and can be accessed via the `form_url` field. If the carrier does not support commercial invoice generation or a generic invoice is preferred, include the following option in the shipment request: `"commercial_invoice_format": "PNG"` This option overrides the carrier-provided document and generates a generic commercial invoice. Related: - [Forms](https://docs.easypost.com/docs/shipments/forms) --- ## Commercial Invoice Fields The Form object in the shipment response includes the following fields related to the commercial invoice: - `object` (string): Always returns Form. - `id` (string): Unique ID of the form. Recommended to record for tracking purposes. - `created_at` (timestamp): Timestamp indicating when the form was created. - `updated_at` (timestamp): Timestamp for the last update to the form, if applicable. - `mode` (string): Indicates whether the form is from the `test` or `production` environment. - `form_type` (string): Type of form returned. Should return `commercial_invoice` if successful. - `form_url` (string): URL linking to the PDF version of the commercial invoice. - `submitted_electronically` (boolean): Indicates whether the form was submitted electronically. Electronic submission depends on the carrier and destination country. --- ## Example Response Below is a sample `Shipment` object that includes a `Form` object containing a commercial invoice: ```json { "object": "Shipment", "id": "shp_j9i8h7g6f5e4d3c2b1a", "forms": [ { "object": "Form", "id": "form_a1b2c3d4e5f6g7h8i9j", "created_at": "2017-02-28T00:54:18Z", "updated_at": "2017-02-28T00:54:18Z", "mode": "production", "form_type": "commercial_invoice", "form_url": "https://easypost-files.s3-us-west-2.amazonaws.com/files/form/filename.pdf", "submitted_electronically": true } ] } ``` --- ## Additional Resources ### Support and Troubleshooting EasyPost offers support to assist with FAQs, troubleshooting issues, and inquiries related to the EasyPost platform. Please visit the API Docs or the Help Center for more information. Related: - [API Docs](https://docs.easypost.com/docs/authentication) - [Help Center](https://support.easypost.com/hc/en-us) --- Source: https://docs.easypost.com/guides/cpsc-regulatory-updates-guide # CPSC Regulatory Updates ## Background International shipments carrying CPSC-regulated consumer products (children's toys and similar goods) need the product's CPSC compliance-certificate data on their **customs documentation**, so it's available to US customs at import — a requirement as of **8 July 2026**. EasyPost's role is on the customs-documentation side only: EasyPost has added fields so you can attach the CPSC certificate identifiers to a shipment's customs items, so the data travels with the shipment. > Note: EasyPost does not file with CPSC or register products on your behalf — you provide identifiers for a certificate you have already registered with CPSC, and they flow through as part of the shipment's customs data. --- ### Overview CPSC recognizes two ways to convey the certificate data: - The full certificate data set. - The **Reference method** — where a pre-registered certificate is referenced by just three identifiers (**Certifier ID + Product ID + Version ID**). **EasyPost's support starts with the Reference method, for products already registered with CPSC.** Not-yet-registered products, exemptions, and disclaims are not currently supported. - **Where the data lives — per item.** - A single parcel can hold multiple items with different certificates, so CPSC data lives on **`customs_item`**, not at the shipment level. - This guide covers the API fields you send (Part 1) first, then how carriers handle them (Part 2). --- ## Part 1 — What You Send to EasyPost To file a CPSC-regulated item under the **Reference method**, you supply **three identifiers per item** — the same three CPSC uses to look up your pre-registered certificate: | CPSC-required element | EasyPost customs_item field | Notes | |---|---|---| | Certifier ID | `regulatory_info.cpsc.certifier_id` | The certifier — the party that issues the certificate of compliance (the importer for imports; the manufacturer or private labeler for US-made goods) | | Product ID | One of `standardized_product_id` , `code` , `manufacturer_product_id` | Send the product identifiers you have — EasyPost maps them | | Version ID | `regulatory_info.cpsc.version_id` | The certificate version | All three live on **`customs_item`**, not on the shipment. - A single parcel can carry several regulated items, each with its own certificate, so each item carries its own three identifiers. - They work anywhere `customs_items` are accepted — both `/v2/shipments` and `/v2/orders`. > Note: All three fields are optional on the EasyPost API, but CPSC expects all three to file under the Reference method. - EasyPost will not reject a shipment that leaves them out. - CPSC may still reject the customs _entry_. - Sending all information for any CPSC-regulated item is recommended. **How to use it:** ```json { "customs_item": { "description": "Children's toy building blocks", "quantity": 1, "value": "23.0", "hs_tariff_number": "9503000000", "origin_country": "CN", "code": "123456", "manufacturer_product_id": "SH123456", "standardized_product_id": "00012345600012", "regulatory_info": { "cpsc": { "certifier_id": "ACMEAPPAREL", "version_id": "v3" } } } } ``` --- ### Product ID — the `customs_item` fields Populate whichever of these you have — EasyPost handles mapping them for the carrier. These are the **same fields** that carry the EU product identifiers (see the companion [EU Regulatory Updates](/guides/eu-regulatory-updates-guide) guide) — one set serves both regulatory bodies: | Field | Type | Description | |---|---|---| | `standardized_product_id` | string, max 64 | CPSC Product ID type: GTIN. Also serves the EU S-PID (C129). | | `manufacturer_product_id` | string, max 64 | CPSC Product ID type: Model / Alternate. Also serves the EU NS-PID (C128). | | `code` | existing | CPSC Product ID type: SKU. Also serves the EU M-PID (C127). | - **`code` is your existing merchant product ID — keep populating it exactly as you do today.** - Only `manufacturer_product_id` and `standardized_product_id` are new fields. --- ### Certifier ID & Version ID — the `regulatory_info` object Certifier ID and Version ID are certificate metadata, not product identifiers, so they live in a new **`regulatory_info`** object, **namespaced by regulatory governing body** (`regulatory_info.cpsc`). | Field | Type | Description | |---|---|---| | `regulatory_info.cpsc.certifier_id` | string, max 64 | The certifier — the party that issues the certificate of compliance (the importer for imports; the manufacturer or private labeler for US-made goods) | | `regulatory_info.cpsc.version_id` | string, max 64 | CPSC Version ID — a specific certificate version; increments on retest / material change | - **Blank values are not persisted** — an empty `cpsc` object collapses to `regulatory_info: null`. - Each field is validated (`max_length: 64`, type `String`). - **Scope:** products **already registered** with CPSC (Reference method). Disclaim / exemption / not-yet-registered paths are not currently supported. --- ## Part 2 — Carrier-Specific Implications Carrier-specific use of these CPSC fields are being developed on a rolling basis, pending carrier API updates and EasyPost integration with the carrier APIs. In preparation for the individual carrier support, we encourage you to implement these fields now, so that the data will be automatically sent to supported carriers as soon as support is rolled out. ### FedEx When CPSC delivery is wired, EasyPost will map the reference-method fields to the FedEx **REST** Ship API, inline at `customsClearanceDetail.commodities[].regulatoryDetails[].referenceMessageSet`: | EasyPost customs_item field | FedEx REST field | |---|---| | Product ID | `registryProductId` | | `regulatory_info.cpsc.certifier_id` | `certifierId` | | `regulatory_info.cpsc.version_id` | `productVersion` | #### FedEx Web Services / SOAP API **FedEx Web Services / SOAP is maintained but no longer receiving new features — for proper support of CPSC, you should complete steps to migrate your carrier accounts to use the FedEx REST integration (as recommended directly by FedEx)** - FedEx has not added the CPSC fields to the legacy Web Services / SOAP path, and has announced no plans to do so. - If you cannot migrate to REST, the way to convey CPSC data is to pack the three reference identifiers into **each item's description on the commercial invoice**. ```text – CPSC REGULATED | | ``` Example: `Children's Plastic Toy Car – CPSC REGULATED PRI-TOY-CAR-01 | ACMEAPPAREL | V1.0` --- ### UPS On UPS, the three reference identifiers are carried in the commercial invoice comments, the same approach as FedEx Web Services / SOAP above. ## Summary | Change | Layer | What it does | |---|---|---| | `standardized_product_id` | API (agnostic) | GTIN product ID on `customs_item` (CPSC Product ID: GTIN; EU S-PID) | | `manufacturer_product_id` | API (agnostic) | Manufacturer product ID on `customs_item` (CPSC Model / Alternate; EU NS-PID) | | `regulatory_info.cpsc.certifier_id` | API (agnostic) | CPSC Certifier ID (Reference method) | | `regulatory_info.cpsc.version_id` | API (agnostic) | CPSC Version ID (Reference method) | | Carrier delivery — product IDs | Carrier | Sending product IDs to carriers on the wire — not yet available | | Carrier delivery — CPSC | Carrier | Sending `regulatory_info.cpsc` to carriers (generic serialization) — not yet available | **Regulatory date:** CPSC eFiling mandatory **July 2026**. --- Source: https://docs.easypost.com/guides/customs-guide # Customs Guide This guide will teach you how to pass the necessary customs information for shipping internationally. In this example, we will be sending a customer in the UK an EasyPost T-Shirt and hat from our office in the US. When shipping internationally, you go through the same steps as shipping domestically, except that you need to add customs information to your shipment. EasyPost uses this information to automatically generate the necessary customs forms for your shipment. You need to pass customs information whenever you are shipping between two countries. [Content omitted: getting started checklist rendered dynamically. Review the rendered documentation for complete setup steps.] [Content omitted: related links and resources. Review the rendered documentation for navigation links.] --- ## Step 1: Creating Custom Items When shipping internationally, carriers require that you add information about the contents of your package. This information is used by the customs process for the country to which you are shipping. To add information about your package's contents, you need to create a CustomsItem object for each type of item you are shipping. If you have multiples of the same item in the package, you don't need to create a new CustomsItem for each. You just specify the number of items when creating the CustomsItem object. When creating a CustomsItem you pass the following: - **description** = A brief description of the item - **quantity** = Number of that item contained in the package - **weight** = Total weight in ounces of all the items of that type in the package - **value** = Total value in US dollars of all the items of that type in the package (quantity already included — do not multiply again). EasyPost can also use this amount as product value for USPS Claims when this customs form is already on the shipment. New claims integrations should send `line_items`. - **hs_tariff_number** = Harmonized System code used to classify the item for customs purposes. Typically 6 or 10 digits in length. - **origin_country** = Where the item was manufactured or assembled. To get the "hs_tariff_number", you'll need to look up the harmonization code associated with whatever product you are shipping. You can search for them on hts.usitc.gov. Here is an example where we create a CustomsItem object for the T-shirt we're shipping: #### Create CustomsItems ### Example: POST /customs_items #### cURL ```shell curl -X POST https://api.easypost.com/v2/customs_items \ -u "EASYPOST_API_KEY": \ -H 'Content-Type: application/json' \ -d '{ "customs_item": { "description": "T-shirt", "quantity": "1", "weight": "5", "value": "10", "hs_tariff_number": "123456", "origin_country": "US" } }' ``` #### Go ```go package example import ( "fmt" "github.com/EasyPost/easypost-go/v6" ) func create() { client := easypost.New("EASYPOST_API_KEY") customsItem, _ := client.CreateCustomsItem( &easypost.CustomsItem{ Description: "T-shirts", Quantity: 1, Value: 10.00, Weight: 5, OriginCountry: "US", }, ) fmt.Println(customsItem) } ``` #### Java ```java package customs_items; import com.easypost.exception.EasyPostException; import com.easypost.model.CustomsItem; import com.easypost.service.EasyPostClient; import java.util.HashMap; public class Create { public static void main(String[] args) throws EasyPostException { EasyPostClient client = new EasyPostClient("EASYPOST_API_KEY"); HashMap params = new HashMap(); params.put("description", "T-shirt"); params.put("quantity", 1); params.put("value", 10); params.put("weight", 5); params.put("origin_country", "US"); params.put("hs_tariff_number", "123456"); CustomsItem customsItem = client.customsItem.create(params); System.out.println(customsItem); } } ``` #### C# ```csharp using System; using System.Collections.Generic; using System.Threading.Tasks; using EasyPost; using Newtonsoft.Json; namespace EasyPostExamples { public class Examples { public static async Task Main() { var client = new EasyPost.Client(new EasyPost.ClientConfiguration("EASYPOST_API_KEY")); EasyPost.Parameters.CustomsItems.Create parameters = new() { Description = "T-shirt", Quantity = 1, Weight = 5, Value = 10, HsTariffNumber = "123456", OriginCountry = "US" }; EasyPost.Models.API.CustomsItem customsItem = await client.CustomsItem.Create(parameters); Console.WriteLine(JsonConvert.SerializeObject(customsItem, Formatting.Indented)); } } } ``` #### Node.js ```javascript const EasyPostClient = require('@easypost/api'); const client = new EasyPostClient('EASYPOST_API_KEY'); (async () => { const customsItem = await client.CustomsItem.create({ description: 'T-shirt', quantity: 1, value: 10, weight: 5, hs_tariff_number: '123456', origin_country: 'us', }); console.log(customsItem); })(); ``` #### PHP ```php customsItem->create([ 'description' => 'T-shirt', 'quantity' => 1, 'weight' => 5, 'value' => 10, 'hs_tariff_number' => '123456', 'origin_country' => 'US' ]); echo $customsItem; ``` #### Python ```python import easypost client = easypost.EasyPostClient("EASYPOST_API_KEY") customs_item = client.customs_item.create( description="T-shirt", quantity=1, value=10, weight=5, hs_tariff_number="123456", origin_country="us", ) print(customs_item) ``` #### Ruby ```ruby require 'easypost' client = EasyPost::Client.new(api_key: 'EASYPOST_API_KEY') customs_item = client.customs_item.create( description: 'T-shirt', quantity: 1, weight: 5, value: 10, hs_tariff_number: '123456', origin_country: 'us', ) puts customs_item ``` [Content omitted: related links and resources. Review the rendered documentation for navigation links.] --- ## Step 2: Create a Customs Info Form Once you've created the CustomsItem objects for the items you are shipping, you next need to associate them with the customs form that you will be adding to your shipment. We call this form the CustomsInfo object. You will need only one CustomsInfo object per shipment. The Customsinfo object contains a bunch of attributes that are very specific to shipping goods across borders. Below we'll do our best to explain each though it can be a bit confusing. If you ever have any specific questions, don't hesitate to email us at support@easypost.com. When creating a CustomsInfo object you need to pass: - **customs_items** = An array of CustomsItem objects. This array should contain any items you are shipping in your package. - **contents_type** = The type of item you are sending. You pass one of the following: 'merchandise', 'returned_goods', 'documents', 'gift', 'sample', 'other'. - **contents_explanation** = If you specify 'other' in the 'contents_type' attribute, you must supply a brief description in this attribute. - **restriction_type** = Describes if your shipment requires any special treatment / quarantine when entering the country. You pass one of the following: 'none', 'other', 'quarantine', 'sanitary_phytosanitary_inspection'. - **restriction_comments** = If the "restriction_type" attribute is not "none", you must supply a brief description of what is required. - **customs_certify** = This is a boolean value (true, false) that takes the place of the signature on the physical customs form. This is how you indicate that the information you have provided is accurate. - **customs_signer** = This is the name of the person who is certifying that the information provided on the customs form is accurate. Use a name of the person in your organization who is responsible for this. - **non_delivery_option** = In case the shipment cannot be delivered, this option tells the carrier what you want to happen to the package. You can pass either: 'abandon', 'return'. The value defaults to 'return'. If you pass 'abandon', you will not receive the package back if it cannot be delivered. - **eel_pfc** = When shipping outside the US, you need to provide either an Exemption and Exclusion Legend (EEL) code or a Proof of Filing Citation (PFC). Which you need is based on the value of the goods being shipped. - If the value of the goods is less than $2,500, then you pass the following EEL code: "NOEEI 30.37(a)" - If the value of the goods is greater than $2,500, you need to get an Automated Export System (AES) Internal Transaction Number (ITN) for your shipment. ITN will look like "AES X20120502123456". To get an ITN, go to the AESDirect website. - An ITN is required for any international shipment valued over $2,500 and/or requires an export license unless exemptions apply. - The maximum number of items that can be included in customs info with UPS is 100. The trickiest part of creating the CustomsInfo object is figuring out the values for the attributes. Once you've done that, it's simply a matter of passing those values to us. Here's an example of creating the CustomsInfo object for our shipment of T-shirt and Hat to the UK: #### Create CustomsInfo (Customs Form) ### Example: POST /customs_infos #### cURL ```shell curl -X POST https://api.easypost.com/v2/customs_infos \ -u "EASYPOST_API_KEY": \ -H 'Content-Type: application/json' \ -d '{ "customs_info": { "customs_certify": "true", "customs_signer": "Steve Brule", "contents_type": "merchandise", "contents_explanation": "", "restriction_type": "none", "eel_pfc": "NOEEI 30.37(a)", "customs_items": [ { "description": "T-shirt", "quantity": "1", "weight": "5", "value": "10", "hs_tariff_number": "123456", "origin_country": "US" } ] } }' ``` #### Go ```go package example import ( "fmt" "github.com/EasyPost/easypost-go/v6" ) func create() { client := easypost.New("EASYPOST_API_KEY") customsInfo, _ := client.CreateCustomsInfo( &easypost.CustomsInfo{ CustomsCertify: true, CustomsSigner: "Steve Brule", ContentsType: "merchandise", ContentsExplanation: "", RestrictionType: "none", EELPFC: "NOEEI 30.37(a)", CustomsItems: []*easypost.CustomsItem{ &easypost.CustomsItem{ Description: "T-shirt", Quantity: 1, Value: 10.00, Weight: 5, OriginCountry: "US", }, }, }, ) fmt.Println(customsInfo) } ``` #### Java ```java package customs_info; import com.easypost.exception.EasyPostException; import com.easypost.model.CustomsInfo; import com.easypost.model.CustomsItem; import com.easypost.service.EasyPostClient; import java.util.ArrayList; import java.util.HashMap; import java.util.List; public class Create { public static void main(String[] args) throws EasyPostException { EasyPostClient client = new EasyPostClient("EASYPOST_API_KEY"); HashMap customsItemMap = new HashMap(); customsItemMap.put("description", "T-shirt"); customsItemMap.put("quantity", 1); customsItemMap.put("value", 10); customsItemMap.put("weight", 5); customsItemMap.put("origin_country", "us"); customsItemMap.put("hs_tariff_number", "123456"); CustomsItem customsItem = client.customsItem.create(customsItemMap); List customsItemsList = new ArrayList(); customsItemsList.add(customsItem); HashMap params = new HashMap(); params.put("customs_certify", true); params.put("customs_signer", "Steve Brule"); params.put("contents_type", "merchandise"); params.put("contents_explanation", ""); params.put("eel_pfc", "NOEEI 30.37(a)"); params.put("restriction_type", "none"); params.put("customs_items", customsItemsList); CustomsInfo customsInfo = client.customsInfo.create(params); System.out.println(customsInfo); } } ``` #### C# ```csharp using System; using System.Collections.Generic; using System.Threading.Tasks; using EasyPost; using Newtonsoft.Json; namespace EasyPostExamples { public class Examples { public static async Task Main() { var client = new EasyPost.Client(new EasyPost.ClientConfiguration("EASYPOST_API_KEY")); EasyPost.Parameters.CustomsInfo.Create parameters = new() { CustomsCertify = true, CustomsSigner = "Steve Brule", ContentsType = "merchandise", ContentsExplanation = "", RestrictionType = "none", EelPfc = "NOEEI 30.37(a)", CustomsItems = new List() { new() { Description = "T-shirt", Quantity = 1, Weight = 5, Value = 10, HsTariffNumber = "123456", OriginCountry = "US" } } }; EasyPost.Models.API.CustomsInfo customsInfo = await client.CustomsInfo.Create(parameters); Console.WriteLine(JsonConvert.SerializeObject(customsInfo, Formatting.Indented)); } } } ``` #### Node.js ```javascript const EasyPostClient = require('@easypost/api'); const client = new EasyPostClient('EASYPOST_API_KEY'); (async () => { const customsInfo = await client.CustomsInfo.create({ eel_pfc: 'NOEEI 30.37(a)', customs_certify: true, customs_signer: 'Steve Brule', contents_type: 'merchandise', contents_explanation: '', restriction_type: 'none', restriction_comments: '', customs_items: [ { description: 'T-shirts', quantity: 1, weight: 5, value: 10, hs_tariff_number: '123456', origin_country: 'US', }, ], }); console.log(customsInfo); })(); ``` #### PHP ```php customsInfo->create([ 'eel_pfc' => 'NOEEI 30.37(a)', 'customs_certify' => true, 'customs_signer' => 'Steve Brule', 'contents_type' => 'merchandise', 'contents_explanation' => '', 'restriction_type' => 'none', 'customs_items' => [ [ 'description' => 'T-shirt', 'quantity' => 1, 'weight' => 5, 'value' => 10, 'hs_tariff_number' => '123456', 'origin_country' => 'US' ] ] ]); echo $customsInfo; ``` #### Python ```python import easypost client = easypost.EasyPostClient("EASYPOST_API_KEY") customs_info = client.customs_info.create( eel_pfc="NOEEI 30.37(a)", customs_certify=True, customs_signer="Steve Brule", contents_type="merchandise", contents_explanation="", restriction_type="none", customs_items=[ { "description": "Sweet shirts", "quantity": 2, "weight": 11, "value": 23, "hs_tariff_number": "654321", "origin_country": "US", } ], ) print(customs_info) ``` #### Ruby ```ruby require 'easypost' client = EasyPost::Client.new(api_key: 'EASYPOST_API_KEY') customs_info = client.customs_info.create( customs_certify: true, customs_signer: 'Steve Brule', contents_type: 'merchandise', contents_explanation: '', restriction_type: 'none', eel_pfc: 'NOEEI 30.37(a)', customs_items: [ { description: 'T-shirt', quantity: 1, weight: 5, value: 10, hs_tariff_number: '123456', origin_country: 'US', }, ], ) puts customs_info ``` [Content omitted: related links and resources. Review the rendered documentation for navigation links.] --- ## Step 3: Create Shipment and Attach Customs Info Now that you've created the required customs information, you can now create your international shipment. The only difference from a domestic shipment is that you need to also pass the CustomsInfo object when creating a shipment. When you buy a shipping label for your shipment, we automatically create additional customs forms that you need. Most often, the customs form is integrated into the label and you can put it directly on your package. If you ever have any questions about a specific carrier, don't hesitate to email us. ![Customs Label](https://docs.easypost.com/images/guides/customs/customs-label.png) Here's an example where we are creating an international shipment: #### Create International Shipment [Content omitted: API request example. Review the rendered documentation for complete request payloads, parameters, and code samples.] [Content omitted: related links and resources. Review the rendered documentation for navigation links.] --- Congratulations! You've just created your first international package with EasyPost! Check out our Full Reference API Documentation. Related: - [API Documentation](https://docs.easypost.com/guides/carrier-claims-guide) --- Source: https://docs.easypost.com/guides/dependency-pinning-guide # Dependency Pinning Guide This guide will show you how to pin a specific version of a dependency in your application. This guide will focus on the EasyPost client libraries, but these rules can be applied to most dependencies. --- ## Why to Pin a Dependency Pinning a specific version (or a specific range of versions) of a library or dependency in your project will help mitigate incompatibilities and prevent accidental upgrades and breaking changes. EasyPost utilizes [semantic versioning](https://semver.org/) for its client libraries, where versions follow an **X.Y.Z** naming pattern. Changes to the X number indicate **major changes to architecture** or **breaking changes in behavior**. Changes to the Y number indicate **minor changes** that will be **backwards compatible with older versions**, typically in the form of new features. Changes to the Z number indicate patch changes, which are often **bug fixes or security patches** that do not introduce incompatibility issues. You may want to avoid upgrading to the next major version of a dependency, as it may require refactoring of your application to accommodate breaking changes. Minor versions and patch versions are generally considered safe to upgrade to automatically, as they should not require any refactoring, and can introduce important fixes. To prevent your application from automatically installing and using the latest release of a dependency, you should pin a dependency to a specific version. For example, you can pin a dependency to version **2.1.0**, guaranteeing that your application will only ever use version **2.1.0** of that dependency. Alternatively, you can pin a dependency to a specific version range. For example, you can pin a dependency to version **2.\***. This will mean your application will always use the **latest release of major version 2** of the dependency. This will allow you to automatically adopt the minor and patch updates to the dependency, but remain on major version 2. Related: - [EasyPost API Documentation](https://docs.easypost.com/libraries) --- ## How Dependency Pinning Works Let's look at some scenarios of how version pinning would work. Let's assume you are currently using version 2.1.0 of a dependency. | I have pinned: | If 2.1.1 comes out: | If 2.2.0 comes out: | If 3.0.0 comes out: | |---|---|---|---| | 2.1.0 | Keep using 2.1.0 | Keep using 2.1.0 | Keep using 2.1.0 | | 2.1.* | Upgrade to 2.1.1 | Keep using 2.1.0 | Keep using 2.1.0 | | 2.* | Upgrade to 2.1.1 | Upgrade to 2.2.0 | Keep using 2.1.0 | | * | Upgrade to 2.1.1 | Upgrade to 2.2.0 | Upgrade to 3.0.0 | Since minor and patch releases are often considered safe to upgrade to, bringing necessary updates without any breaking changes, you might consider using a **2.1.\*** or **2.\*** pinning pattern in this scenario. To prevent your application from automatically installing and using the latest release of a dependency, you should pin a dependency to a specific version. For example, you can pin a dependency to version **2.1.0**, guaranteeing that your application will only ever use version **2.1.0** of that dependency. --- ## How to Pin Dependencies Using Package Managers Most package managers (e.g. PIP for Python, NuGet for C#, NPM for Node.js) respect semantic versioning and dependency pinning, meaning your requested pinning rules will be honored when you update your dependencies. Below are instructions for pinning dependencies for each programming language EasyPost officially supports. ### Python In your list of dependencies (typically a **requirements.txt** or **setup.py** file), you can pin dependencies using [Version Specifiers](https://peps.python.org/pep-0440/#version-specifiers). The following will show you how to pin specific versions of the EasyPost client library. | I want: | Dependency pin rule: | Will automatically update to: | |---|---|---| | Version 2.1.0, always | `easypost==2.1.0` | 2.1.0 | | The latest patch updates in version 2.1 | `easypost==2.1.*` | 2.1.0, 2.1.1 | | The latest minor updates in version 2 | `easypost==2.*` | 2.1.0, 2.1.1, 2.2.0, 2.2.1 | | The latest version, always | `easypost` | 2.1.0, 2.1.1, 2.2.0, 2.2.1, 3.0.0, 3.0.1 | ### PHP In your list of dependencies (typically a **composer.json** file), you can pin dependencies using [Version Constraints](https://getcomposer.org/doc/articles/versions.md#writing-version-constraints). The following will show you how to pin specific versions of the EasyPost client library. | I want: | Dependency pin rule: | Will automatically update to: | |---|---|---| | Version 2.1.0, always | `"easypost/easypost-php": "~2.1.0"` | 2.1.0 | | The latest patch updates in version 2.1 | `"easypost/easypost-php": "~2.1"` | 2.1.0, 2.1.1 | | The latest minor updates in version 2 | `"easypost/easypost-php": "~2"` | 2.1.0, 2.1.1, 2.2.0, 2.2.1 | | The latest version, always | `"easypost/easypost-php": ">=2.1.0" // v2.1.0 as a minimum` | 2.1.0, 2.1.1, 2.2.0, 2.2.1, 3.0.0, 3.0.1 | ### Node.js In your list of dependencies (typically a **package.json** file), you can pin dependencies using [Version Ranges](https://docs.npmjs.com/cli/v8/configuring-npm/package-json#dependencies). The following will show you how to pin specific versions of the EasyPost client library. | I want: | Dependency pin rule: | Will automatically update to: | |---|---|---| | Version 2.1.0, always | `"@easypost/api": "~2.1.0"` | 2.1.0 | | The latest patch updates in version 2.1 | `"@easypost/api": "~2.1"` | 2.1.0, 2.1.1 | | The latest minor updates in version 2 | `"@easypost/api": "~2"` | 2.1.0, 2.1.1, 2.2.0, 2.2.1 | | The latest version, always | `"@easypost/api": ">=2.1.0" // v2.1.0 as a minimum` | 2.1.0, 2.1.1, 2.2.0, 2.2.1, 3.0.0, 3.0.1 | ### Ruby In your list of dependencies (typically a **.gemspec** file), you can pin dependencies using [Version Constraints](https://guides.rubygems.org/patterns/). The following will show you how to pin specific versions of the EasyPost client library. | I want: | Dependency pin rule: | Will automatically update to: | |---|---|---| | Version 2.1.0, always | `gem 'easypost', '~> 2.1.0', '< 2.1.1'` | 2.1.0 | | The latest patch updates in version 2.1 | `gem 'easypost', '~> 2.1'` | 2.1.0, 2.1.1 | | The latest minor updates in version 2 | `gem 'easypost', '~> 2'` | 2.1.0, 2.1.1, 2.2.0, 2.2.1 | | The latest version, always | `gem 'easypost', '>= 2.1.0' // v2.1.0 as a minimum` | 2.1.0, 2.1.1, 2.2.0, 2.2.1, 3.0.0, 3.0.1 | ### Java In your list of dependencies (typically a **pom.xml** file for Maven, or a **build.gradle** file for Gradle), you can pin dependencies using [Version Ranges](https://maven.apache.org/enforcer/enforcer-rules/versionRanges.html). The following will show you how to pin specific versions of the EasyPost client library. | I want: | Dependency pin rule: | Will automatically update to: | |---|---|---| | Version 2.1.0, always | **Maven:**
``
`com.easypost`
`easypost-api-client`
`[2.1.0]`
`
`

**Gradle:**
`implementation 'com.easypost:easypost-api-client:[2.1.0]'` | 2.1.0 | | The latest patch updates in version 2.1 | **Maven:**
``
`com.easypost`
`easypost-api-client`
`[2.1.0,2.2.0)`
`
`

**Gradle:**
`implementation 'com.easypost:easypost-api-client:[2.1.0,2.2.0)'` | 2.1.0, 2.1.1 | | The latest minor updates in version 2 | **Maven:**
``
`com.easypost`
`easypost-api-client`
`[2.1,3.0.0)`
`
`

**Gradle:**
`implementation 'com.easypost:easypost-api-client:[2.1,3.0.0)'` | 2.1.0, 2.1.1, 2.2.0, 2.2.1 | | The latest version, always | **Maven:**
``
`com.easypost`
`easypost-api-client`
`[2.1.0,) // v2.1.0 as a minimum`
`
`

**Gradle:**
`implementation 'com.easypost:easypost-api-client:[2.1.0,)'` | 2.1.0, 2.1.1, 2.2.0, 2.2.1, 3.0.0, 3.0.1 | ### C#/.NET In your list of dependencies (typically a **.csproj** file for C# projects, a **.fsproj** for F# projects, or a **.vbproj** file for Visual Basic projects), you can pin dependencies using [Version Ranges](https://learn.microsoft.com/en-us/nuget/concepts/package-versioning#version-ranges). The following will show you how to pin specific versions of the EasyPost client library. | I want: | Dependency pin rule: | Will automatically update to: | |---|---|---| | Version 2.1.0, always | `` | 2.1.0 | | The latest patch updates in version 2.1 | `` | 2.1.0, 2.1.1 | | The latest minor updates in version 2 | `` | 2.1.0, 2.1.1, 2.2.0, 2.2.1 | | The latest version, always | ` v2.1.0 as a minimum` | 2.1.0, 2.1.1, 2.2.0, 2.2.1, 3.0.0, 3.0.1 | ### Golang In your list of dependencies (typically a **go.mod** file), you can pin dependencies using [Version Queries](https://go.dev/ref/mod#version-queries). (NOTE: After v2 of a Go dependency is released, you must define a [major version suffix](https://go.dev/ref/mod#versions:~:text=com/mod%40abcd1234-,Major%20version%20suffixes,-Starting%20with%20major)). The following will show you how to pin specific versions of the EasyPost client library. | I want: | Dependency pin rule: | Will automatically update to: | |---|---|---| | Version 2.1.0, always | `github.com/EasyPost/easypost-go/v2 v2.1.0` | 2.1.0 | | The latest patch updates in version 2.1 | `github.com/EasyPost/easypost-go/v2 or
`github.com/EasyPost/easypost-go/v2 latest` | 2.1.0, 2.1.1, 2.2.0, 2.2.1 | | The latest version, always | Not possible.
You have to limit a dependency to a major version for automatic updates (see above).
You will need to manually change the major version suffix to upgrade to the next major version. | N/A | --- Source: https://docs.easypost.com/guides/embeddables-guide # Embeddable Components Guide ## Overview Embeddable components enable Forge dashboard functionality to be embedded within third-party websites or applications. Integrators can provide users with direct access to billing management, carrier setup, payment logs, and reporting, all from their own platform. --- ## Prerequisites - A Forge-enabled EasyPost account - A server endpoint capable of fetching a session ID from the EasyPost EmbeddableSessions API --- ## Server Configuration The server must expose an endpoint that retrieves a short-lived session ID from the EasyPost EmbeddableSessions API. This endpoint is called by the client application (browser) to initialize an embedded component. The server-side request to EasyPost should be made with the platform's EasyPost API key and include the following parameters: - `user_id`: The User ID of the sub account for which the embeddable session is being created. - `origin_host` The integrator's domain in bare-host format (e.g., example.com), excluding protocol and subdomains. #### Retrieve a Session ID Example (Python) ```python import os import requests from flask import ( Flask, jsonify, ) app = Flask(__name__) EASYPOST_API_KEY = os.environ.get("EASYPOST_API_KEY", "") @app.route("/api/easypost-embeddables/session", methods=["GET"]) def create_embeddable_session(): payload = { "user_id": "SUB_ACCOUNT_USER_ID", # Replace with sub-account user ID "origin_host": "ORIGIN_HOST", # Replace with integrator's domain } response = requests.post( "https://api.easypost.com/v2/embeddables/session", auth=(EASYPOST_API_KEY, ""), json=payload, headers={"Content-Type": "application/json"}, timeout=10, ) response.raise_for_status() return jsonify(response.json()) if __name__ == "__main__": app.run(port=5000, debug=True) ``` --- ## Client Configuration The client application must load the EasyPost Embeddables script and initialize the SDK with a function that fetches a session ID from the server. Each embeddable component is rendered securely in an EasyPost-hosted iframe displayed inside a modal. Components are launched asynchronously in response to user actions such as button clicks. #### Example Integration that Corresponds to the Above Python Snippet (HTML/JavaScript) ```html
Integrator's Website
``` --- ## Embeddable Component Workflow 1. The browser loads the EasyPost Embeddables script from https://embed.easypost.com/embeddables/1.0/client.js. 2. When `onLoad` fires, the integrator's client initializes the SDK using `EasyPostEmbeddables.init()`. 3. The `fetchSessionId()` callback retrieves or refreshes the session ID as needed. 4. When a button is clicked, the `open()` method launches the requested component inside a modal. 5. The modal content is rendered securely from EasyPost's domain. > Note: Session refreshing is handled automatically by EasyPost. Only the `fetchSessionId` function must be supplied. --- ## Initialization Options | Option | Required | Description | | -------------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | | fetchSessionId | Yes | Callback that returns a Promise resolving to a valid session ID fetched from the integrator's server. | | fonts | No | Optional array of font configuration objects. Each font can specify a cssSrc, src, family, style, and weight. See the Fonts section below for additional details. | | appearance | No | Controls theming and modal layout options, including color tokens, font settings, and an optional modalZIndex for layering above or below existing UI. | ### Fonts The `fonts` option in `EasyPostEmbeddables.init()` accepts an array of font configuration objects that define how custom fonts are loaded inside embeddable components. If the application uses custom fonts, they must be specified when initializing the SDK. Custom fonts can be specified using one of two forms: 1. `cssSrc`: Use this form to load a font from a hosted CSS file (for example, a Google Fonts stylesheet). The URL must point to a valid CSS file defining `@font-face` rules. ```javascript EasyPostEmbeddables.init({ fonts: [{ cssSrc: 'https://fonts.googleapis.com/css2?family=Zen+Dots&display=swap' }], }); ``` 2. **Direct Font Files:** Use this form to load a font file directly. Note that in this form, `family` and`src` are required. ```javascript EasyPostEmbeddables.init({ fonts: [ { family: 'Avenir', src: 'https://example.com/fonts/avenir.woff2', style: 'normal', weight: '400', }, ], }); ``` ### Appearance The `appearance` option in `EasyPostEmbeddables.init()` controls the visual presentation of Embeddable components. It supports customization of theme tokens (color and typography) and modal layout properties such as stacking order. Integrators can pass either theme tokens to modify colors and font settings, or define a `modalZIndex` value to control how the modal overlays the application interface. #### Theme tokens The tokens are organized by categories that represent different parts of the visual system: - **Primary:** Main brand palette for key actions and highlights. The default is a blue shade. - **Secondary:** Accent tones used for emphasis or alternate states. The default is a purple shade. - **Positive:** Success, confirmation, or active states. The default is a green shade. - **Negative:** Errors or destructive actions. The default is a red shade. - **Alert:** Urgent notifications or attention states. The default is an orange shade. - **Warning:** Caution or mild alerts. The default is a yellow shade. - **Neutral:** Grayscale foundation for surfaces, borders, and text. Font family defines the default typeface used throughout Embeddable components. By default, components use `Poppins`, with `“Poppins Fallback”` for compatibility. ```json { "color.primary.900": { "value": "#000824" }, "color.primary.800": { "value": "#061340" }, "color.primary.700": { "value": "#0B2780" }, "color.primary.600": { "value": "#113ABF" }, "color.primary.500": { "value": "#164DFF" }, "color.primary.400": { "value": "#4571FF" }, "color.primary.300": { "value": "#7394FF" }, "color.primary.200": { "value": "#A2B8FF" }, "color.primary.100": { "value": "#D0DBFF" }, "color.primary.050": { "value": "#F6F9FF" }, "color.primary.025": { "value": "#FBFDFF" }, "color.secondary.900": { "value": "#150720" }, "color.secondary.800": { "value": "#280E3C" }, "color.secondary.700": { "value": "#501D77" }, "color.secondary.600": { "value": "#772BB0" }, "color.secondary.500": { "value": "#9F39EE" }, "color.secondary.400": { "value": "#B261F1" }, "color.secondary.300": { "value": "#C588F5" }, "color.secondary.200": { "value": "#D9B0F8" }, "color.secondary.100": { "value": "#ECD7FC" }, "color.secondary.050": { "value": "#F9F1FF" }, "color.secondary.025": { "value": "#FDFBFF" }, "color.positive.900": { "value": "#001E16" }, "color.positive.800": { "value": "#00392C" }, "color.positive.700": { "value": "#007357" }, "color.positive.600": { "value": "#00AC83" }, "color.positive.500": { "value": "#00E5AE" }, "color.positive.400": { "value": "#33EABE" }, "color.positive.300": { "value": "#66EFCE" }, "color.positive.200": { "value": "#99F5DF" }, "color.positive.100": { "value": "#CCFAEF" }, "color.positive.050": { "value": "#EAFFFA" }, "color.positive.025": { "value": "#FAFFFE" }, "color.negative.900": { "value": "#1B0707" }, "color.negative.800": { "value": "#3F1716" }, "color.negative.700": { "value": "#7E2E2D" }, "color.negative.600": { "value": "#BC4543" }, "color.negative.500": { "value": "#FB5C59" }, "color.negative.400": { "value": "#FC7D7A" }, "color.negative.300": { "value": "#FD9D9B" }, "color.negative.200": { "value": "#FDBEBD" }, "color.negative.100": { "value": "#FEDEDE" }, "color.negative.050": { "value": "#FFF2F2" }, "color.negative.025": { "value": "#FFFCFC" }, "color.alert.900": { "value": "#411E00" }, "color.alert.800": { "value": "#834003" }, "color.alert.700": { "value": "#C36108" }, "color.alert.600": { "value": "#F2780A" }, "color.alert.500": { "value": "#FF8D25" }, "color.alert.400": { "value": "#FFAD61" }, "color.alert.300": { "value": "#FFBC7D" }, "color.alert.200": { "value": "#FFD0A4" }, "color.alert.100": { "value": "#FFEDE0" }, "color.alert.050": { "value": "#FFF9F5" }, "color.alert.025": { "value": "#FFFDFD" }, "color.warning.900": { "value": "#423804" }, "color.warning.800": { "value": "#6C4A07" }, "color.warning.700": { "value": "#A57B0F" }, "color.warning.600": { "value": "#D6A015" }, "color.warning.500": { "value": "#F4D35E" }, "color.warning.400": { "value": "#FEE281" }, "color.warning.300": { "value": "#FFEBA4" }, "color.warning.200": { "value": "#FFF2C4" }, "color.warning.100": { "value": "#FFF8DF" }, "color.warning.050": { "value": "#FFFCF0" }, "color.warning.025": { "value": "#FFFEFB" }, "color.neutral.900": { "value": "#000000" }, "color.neutral.800": { "value": "#1C222D" }, "color.neutral.700": { "value": "#384359" }, "color.neutral.600": { "value": "#47547F" }, "color.neutral.500": { "value": "#7086B2" }, "color.neutral.400": { "value": "#8D9EC1" }, "color.neutral.300": { "value": "#A9B6D1" }, "color.neutral.200": { "value": "#C6CFE0" }, "color.neutral.100": { "value": "#E2E7F0" }, "color.neutral.050": { "value": "#F1F1F1" }, "color.neutral.025": { "value": "#FAFAFA" }, "color.neutral.000": { "value": "#FFFFFF" }, "font.family": { "value": "Poppins, \"Poppins Fallback\"" } } ``` --- ## Embeddables Instance Methods When `EasyPostEmbeddables.init()` is called, it returns an Embeddables instance that provides several methods for interacting with embedded components. These methods allow integrators to open modals, listen for events, update appearance dynamically, or clean up the iframe when it's no longer needed. | Method | Signature | Description | | ----------------------- | ------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | open(componentType) | `open(componentType: string): Promise` | Launches a specified Embeddable Component (for example, "manage-billing", "manage-carriers", "manage-payment-logs", or "manage-reports") inside a modal overlay. | | on(eventType, handler) | `on(eventType: string, handler: (event: unknown) => void): void` | Registers an event listener for messages emitted from the iframe. Events can be used to react to lifecycle changes, such as modal open/close or component updates. | | off(eventType, handler) | `off(eventType: string, handler: (event: unknown) => void): void` | Removes a previously registered event listener. | | update(options) | `update(options: { fonts?: Font[]; appearance?: Theme }): Promise` | Dynamically updates the fonts or appearance tokens of an already initialized Embeddable modal. Can be used to change theme colors or font family at runtime. | | destroy() | `destroy(): void` | Destroys the Embeddables iframe and removes all associated event handlers. Once called, a new instance must be re-initialized with EasyPostEmbeddables.init(). | --- ## Available Components Each component mirrors its Forge counterpart and launches inside a modal. For instance, the carrier management component allows sub-accounts to connect, configure, and manage their carrier accounts. ### Billing Management The Billing Management component is accessed by passing `"manage-billing"` to the `open()` function on the created Embeddables instance. ![Example of the Billing Management component](https://docs.easypost.com/images/guides/embeddables/billing-management.png) ### Carrier Management The Carrier Management component is accessed by passing `"manage-carriers"` to the `open()` function on the created Embeddables instance. ![Example of the Carrier Management component](https://docs.easypost.com/images/guides/embeddables/carrier-management.png) ### Payment Logs The Payment Logs component is accessed by passing `"manage-payment-logs"` to the `open()` function on the created Embeddables instance. ![Example of the Payment Logs component](https://docs.easypost.com/images/guides/embeddables/payment-logs.png) ### Reports The Reports component is accessed by passing `"manage-reports"` to the `open()` function on the created Embeddables instance. ![Example of the Reports component](https://docs.easypost.com/images/guides/embeddables/reports.png) --- ## Content Security Policy (CSP) Considerations Integrators using Embeddable Components should ensure the CSP allows the EasyPost client script and embedded iframe to load correctly. Below is a minimal CSP configuration example that allows Embeddable Components to function correctly in production environments: ```bash default-src 'self'; script-src 'self' https://embed.easypost.com 'unsafe-inline'; frame-src https://embed.easypost.com; style-src 'self' https://assets.embed.easypost.com 'unsafe-inline' https:; font-src https://assets.embed.easypost.com data: https:; img-src https://assets.embed.easypost.com data:; connect-src 'self' https://assets.embed.easypost.com; ``` --- ## Additional Resources Please visit the Forge Help Center for more information. --- Source: https://docs.easypost.com/guides/endshipper-guide # EndShipper Guide ## Intro The United States Federal Government and USPS require the legally responsible party to be identified for every item shipped via their services. As many of EasyPost's customers (a.k.a. Platforms) support multiple "EndShippers," it's paramount that EndShippers are registered so that the platform and end shipper stay compliant with the law. You may hear the USPS refer to the EndShipper as the Provider Customer ID (PCID). --- ## Integration Plan ### Phase 1: EndShipper Object Creation and Storage The first phase of integration will consist of creating EndShipper objects with our API and storing their references for future use. Creating EndShipper objects, updating them, and retrieving them from our API is straightforward. The real work required during this phase is to determine how you will manage these references within your system and provide them when buying a shipment. ### Phase 2: Passing EndShipper Object in Shipment Buy The second phase will consist of including the EndShipper Object reference as a supplemental argument when buying postage for a shipment. The EndShipper Object will be an optional argument, but if it is passed, it will be properly validated as an EndShipper Object created by the user. If an invalid EndShipper Object is passed, an error will be returned. In this way, you can begin incrementally incorporating EndShipper Objects into your Shipment buy flows. ### Phase 3: EndShipper Object Required Phase 3 is the transition from the EndShipper Object as an optional argument to a required one. The Federal Government and USPS require every EndShipper to be legally identified, and it is paramount that all Platform customers reach full compliance at here. Once you have confirmed that all Shipment buy requests are successfully passing an EndShipper Object, please coordinate with your CSM or Support Engineer to schedule the official transition to Phase 3. At this point, an EndShipper Object will become a required argument for any postage purchased using a UspsAccount. If one is not passed, the Shipment Buy request will fail. Once the Phase 3 transition is complete, you are fully PCID compliant! Please note that it is critical to continue updating existing EndShipper Objects and registering new ones to ensure data quality and EndShipper accuracy. --- ## How to create and use EndShipper Objects Shipments created by a Platform on behalf of an EndShipper **must** assert the EndShipper details when the postage is purchased since the EndShipper is ultimately responsible for the shipment and its contents. Platforms must create **EndShipper** Objects for each EndShipper they are purchasing USPS postage on behalf of. The EndShipper Object address and contact details are of the person or business entity responsible for the shipment and not necessarily the shipping location. For example, the business headquarters may have a different address and contact info than the actual warehouse the shipment is being shipped from. EndShipper Objects **must** be created prior to the first postage purchase for that EndShipper. The **public_id** associated with each EndShipper Object must then be stored in the Platform's system for use later. A typical workflow for a Platform may look like the following: 1. EndShipper (the Platform's user) requests to purchase postage within the Platform's software suite. 2. Platform retrieves the `public_id` of that user's EndShipper Object stored on the platform's system. 1. If no EndShipper Object exists for this EndShipper, the Platform creates an EndShipper Object prior to sending through the request to purchase postage. 3. For Platforms utilizing Shipment Objects to buy postage: 1. Platform creates a shipment on the EndShipper's behalf. 2. Platform buys the shipment and specifies the EndShipper Object `public_id` via the top-level **end_shipper_id** key. 4. For Platforms utilizing Batches or Orders to _buy postage:_ 1. A Shipment Option parameter has been added named **end_shipper_id**. This option must be specified at the time of creating the Shipment object. 2. Platform creates a shipment on the EndShipper's behalf. 3. NOTE: Shipment Buy calls with EndShipper information passed as a top-level parameter (step 3) supersede the Shipment Option. --- ## Usage Examples EndShipper Objects are **fully-qualified** Address objects and require every field to be filled with two exceptions: 1. **name** and **company** fields. At least one of these fields must be filled (when both are present, **name** will take precedence). 2. **street2** field. This field can be empty if the address does not include multiple lines. The values for **name** and **company** must be an actual person's name or company's name respectively. Per USPS regulations, it cannot be a vague value such as 'Shipping Manager' or 'Mail Room' for legal identification purposes. --- ## What's next? Once EndShipper Objects have been created, you must keep track of their public id in order to use them when purchasing postage. This could be in a local database table (recommended) that associates each EndShipper with one of your customers, or pulling down your EndShippers via the 'Retrieve all EndShipper' function. The same EndShipper should **not** have multiple instances created. Instead, the EndShipper object id should be cached within the Platform's system, and retrieved each time postage is being purchased for that specific EndShipper. Related: - [Update EndShipper](https://docs.easypost.com/docs/endshippers#create-an-endshipper) - [Retrieve all EndShippers](https://docs.easypost.com/docs/endshippers#update-an-endshipper) - [Retrieve An EndShipper](https://docs.easypost.com/docs/endshippers#retrieve-all-endshippers) - [Buy Shipment with EndShipper ID](https://docs.easypost.com/docs/endshippers#retrieve-an-endshipper) - [EndShipper Object](https://docs.easypost.com/docs/endshippers#buy-a-shipment-with-endshipper) --- Source: https://docs.easypost.com/guides/errors-guide # Errors Guide ## Overview This guide explains how to identify and handle errors returned by the EasyPost API, including HTTP status codes, error response structures, and common error codes. --- ## Prerequisites - Review the Getting Started Guide for an introduction to the EasyPost API. - Become familiar with EasyPost API operations and Client Libraries. - Understand basic HTTP status codes and error handling. Related: - [Getting Started Guide](https://docs.easypost.com/guides/getting-started) - [Client Libraries](https://docs.easypost.com/libraries) --- ## HTTP Status Codes EasyPost communicates errors using standard HTTP status codes and returns a JSON response with additional details about the error. - **400 Bad Request**: The request was not processed due to a client error. - **401 Unauthorized**: Authentication is required and has failed. - **402 Payment Required**: There is a lack of billing information or insufficient funds. - **403 Forbidden**: The request was valid, but the server is refusing to respond to it. - **404 Not Found**: The requested resource could not be found. - **405 Method Not Allowed**: The request method is not supported for the requested resource. - **422 Unprocessable Entity**: The request was well-formed, but the server was unable to process the provided data. - **429 Too Many Requests**: The user has sent too many requests in a given amount of time. - **500 Internal Server Error**: An unexpected error occurred on the server. - **503 Service Unavailable**: The server is currently unable to handle the request due to temporary overloading or maintenance. ## Error Response Structure The EasyPost API returns error details in a structured JSON response. Error responses can include the following fields: - `code`: A machine-readable string that identifies the error. - `message`: A human-readable description of the error. - `errors`: An array containing additional error details. Items can be structured objects or strings, depending on the error. ## Error Handling EasyPost Client Libraries encapsulate API errors and raise exceptions for client errors, server errors, and exceptional conditions such as network failures. Handle exceptions appropriately based on the application's requirements. API errors can return the `errors` field in one of two formats: - **Array of objects:** Each item contains structured error details, such as a `message` field. - **Array of strings:** Each item contains the error message directly as a string. Check the type of each item in the errors array before accessing its value. When an item is an object, access the error message using a field such as `error.errors[0][“message”]`. When an item is a string, access the value directly using `error.errors[0]`. For production error handling, account for both formats rather than assuming a single response shape. ## Catching an Error [Content omitted: API request and response examples. Review the rendered documentation for complete request payloads, response payloads, and code samples.] Related: - [Error Object](https://docs.easypost.com/docs/errors#error-object) - [FieldError Object](https://docs.easypost.com/docs/errors#fielderror-object) --- ## General API Error Codes | Code | Description | |---|---| | `INTERNAL_SERVER_ERROR` | An internal server error occurred. Retry the request. Contact support@easypost.com if the error continues. | | `NOT_ACCEPTABLE` | The requested response format is not supported by the resource. | | `NOT_FOUND` | The requested resource was not found. | | `FORBIDDEN` | Access to the requested resource is forbidden. | | `PAYMENT_REQUIRED` | The account has insufficient funds. Review the account billing settings. | | `UNAUTHORIZED` | Authentication failed or the provided credentials do not permit access to the resource. | | `BAD_REQUEST` | The request is malformed or contains invalid data. | | `PAYMENT_GATEWAY.ERROR` | The payment processor could not complete the request. Retry the request or contact support@easypost.com if the error continues. | | `MODE.UNAUTHORIZED` | A production API key is required to access this resource. | | `MODE.CONFLICT` | The API key mode does not match the requested resource or parameter mode. | | `DATE.PARSE.FAILURE` | One or more dates are incorrectly formatted and could not be parsed. | | `PARAMETER.FORBIDDEN` | The request contains one or more parameters that are not permitted. | | `PARAMETER.REQUIRED` | A required parameter is missing. | ## Address Error Codes | Code | Description | |---|---| | `ADDRESS.PARAMETERS.INVALID_CHARACTER` | One or more address parameters contain an invalid character. | | `ADDRESS.PARAMETERS.INVALID` | One or more parameters required to create the Address are missing or invalid. | | `ADDRESS.COUNTRY.INVALID` | The 'country' parameter must contain a two-character ISO country code. | | `ADDRESS.VERIFICATION.NOT_FOUND` | The address could not be found. | | `ADDRESS.VERIFICATION.FAILURE` | The address could not be verified. | | `ADDRESS.VERIFICATION.INVALID` | One or more requested verification types are invalid. | | `ADDRESS.VERIFY.FAILURE` | The address could not be verified. | | `ADDRESS.VERIFY.UNAVAILABLE` | Address verification is temporarily unavailable. Retry the request. | | `ADDRESS.VERIFY.CARRIER_INVALID` | The address could not be verified using the specified carrier. | | `ADDRESS.VERIFY.UPSTREAM_UNAVAILABLE` | Address verification is unavailable because an upstream service did not respond. Retry the request. | | `ADDRESS.VERIFY.ONLY_US` | USPS address verification supports US addresses only. | | `ADDRESS.VERIFY.INTL_NOT_ENABLED` | International address verification is not enabled for the account. Contact EasyPost Support to request access. | | `ADDRESS.VERIFY.MISSING_STREET` | A street address is required for address verification. | | `ADDRESS.VERIFY.MISSING_CITY_STATE_ZIP` | A city and state or a ZIP code is required for address verification. | ## Address Verification Error Codes | Code | Description | |---|---| | `E.COUNTRY.UNSUPPORTED` | The country is not supported in the current mode. Use production mode. | | `E.ENGINE.UNAVAILABLE` | No address verification engine is currently available for this country. Retry the request later. | | `E.QUERY.UNANSWERABLE` | Insufficient address data is available for this country to complete the verification. Retry the request later. | | `E.ADDRESS.NOT_FOUND` | The address could not be found. | | `E.SECONDARY_INFORMATION.INVALID` | The secondary address information, such as an apartment or suite number, is invalid. This error may also appear on a successful verification. | | `E.SECONDARY_INFORMATION.MISSING` | Secondary address information, such as an apartment or suite number, is required. This error may also appear on a successful verification. | | `E.HOUSE_NUMBER.MISSING` | The house number is missing. | | `E.HOUSE_NUMBER.INVALID` | The house number is invalid. | | `E.STREET.MISSING` | The street is missing. | | `E.STREET.INVALID` | The street is invalid. | | `E.BOX_NUMBER.MISSING` | The box number is missing. | | `E.BOX_NUMBER.INVALID` | The box number is invalid. | | `E.ADDRESS.INVALID` | The city, state, or ZIP code is invalid. | | `E.ZIP.NOT_FOUND` | The ZIP code could not be found. | | `E.ZIP.INVALID` | The ZIP code is invalid. | | `E.ZIP.PLUS4.NOT_FOUND` | The ZIP+4 code could not be found. | | `E.ADDRESS.MULTIPLE` | Multiple addresses were found for the provided ZIP code. | | `E.ADDRESS.INSUFFICIENT` | The address information is incomplete or incorrect. | | `E.ADDRESS.DUAL` | The address contains conflicting street and PO Box information. | | `E.STREET.MAGNET` | Multiple possible street matches were found for the address. | | `E.CITY_STATE.INVALID` | The city and state combination could not be verified. | | `E.STATE.INVALID` | The state is invalid. | | `E.ADDRESS.DELIVERY.INVALID` | The delivery address is invalid. | | `E.TIMED_OUT` | The address verification request timed out. | | `E.TIME_ZONE.UNAVAILABLE` | The time zone service is currently unavailable. | | `E.PO_BOX.INTERNATIONAL` | International PO Box addresses cannot be verified. This error may also appear on a successful verification. | ## Batch Error Codes | Code | Description | |---|---| | `BATCH.FILE_FORMAT.INVALID` | The 'file_format' parameter is invalid. | | `BATCH.SHIPMENT.TOO_LARGE` | The Batch contains too many Shipments. For best performance, keep each Batch under 1,000 Shipments. | | `BATCH.SHIPMENT.MISSING` | At least one Shipment is required to perform this operation. | | `BATCH.SHIPMENTS.REQUIRED` | The 'shipments' parameter is required. | | `BATCH.STATE.CREATING` | The Batch cannot be modified while it is being created. | | `BATCH.STATE.CREATION_FAILED` | One or more Shipments in the Batch could not be created. | | `BATCH.STATE.ALREADY_PURCHASED` | The Batch has already been purchased or a purchase is in progress. Retry if the current purchase fails. | | `BATCH.STATE.NOT_PURCHASED` | One or more Shipments in the Batch do not have purchased postage. | | `BATCH.PARAMS.INVALID` | One or more parameters provided for the Batch are invalid. | ## Billing and Payment Error Codes | Code | Description | |---|---| | `BANK_ACCOUNT.CHARGE.FAILURE` | The bank account charge could not be created. | | `BANK_ACCOUNT.VERIFY.FAILURE` | The bank account could not be verified. | | `CREDIT_CARD.CHARGE.FAILURE` | The credit card charge could not be created. | | `CREDIT_CARD.INVALID` | The card could not be connected to the payment processor. Retry the request. | ## Carrier Account Error Codes | Code | Description | |---|---| | `CARRIER_ACCOUNT.REGISTRATION.FAILED` | The UPS Access License Request could not be completed. | | `CARRIER_ACCOUNT.PARAMETERS.INVALID` | The top-level 'carrier_account' parameter is required. | | `CARRIER_ACCOUNT.INVALID` | The CarrierAccount contains invalid data and could not be saved. | | `CARRIER_ACCOUNT.TYPE.EXISTS` | A CarrierAccount of the specified type already exists. | | `CARRIER_ACCOUNT.TYPE.UNKNOWN` | The specified CarrierAccount type is not recognized. | ## Carrier-specific Error Codes | Code | Description | |---|---| | `DHLGM.RATE_TABLE.NOT_FOUND` | The DHL eCommerce rate table was not found. | | `DHLGM.SCAN_FORM.GENERATION_FAILED` | The DHL eCommerce closeout could not be generated. Retry the request or contact support@easypost.com if the error continues. | | `DHLGM.RETURN.AUTHORIZATION_NUMBER_REQUIRED` | A return authorization number is required in the Shipment 'print_custom_1' option. | | `DHLGM.LABEL.FAILURE` | The DHL eCommerce shipping label could not be generated. Retry the request or contact support@easypost.com if the error continues. | | `DHLGM.NO_INTERNATIONAL` | DHL eCommerce does not support international Shipments for this service. | | `DHLGM.NO_ALCOHOL` | DHL eCommerce does not permit alcohol shipments. | | `DHLGM.GIRTH_MAX` | The Parcel exceeds the maximum permitted girth of 84. | | `DHLGM.LETTER_NOT_SUPPORTED` | DHL eCommerce does not support domestic letter mail. Use an eligible USPS service instead. | | `DHLGM.ACCESS_TOKEN.GENERATION_FAILED` | The DHL eCommerce access token could not be generated. Retry the request or contact support@easypost.com if the error continues. | ## Container, Parcel, and Item Error Codes | Code | Description | |---|---| | `CONTAINER.TYPE.INVALID` | The specified container 'type' is not supported. | | `CONTAINER.DIMENSION.REQUIRED` | When one container dimension is provided, 'length', 'width', and 'height' are all required. | | `CONTAINER.NAME.REQUIRED` | The container 'name' parameter is required. | | `PARCEL.PREDEFINED_PACKAGE.INVALID` | The specified predefined package is not valid for the Parcel. | | `PARCEL.PARAMETERS.INVALID` | One or more parameters required to create the Parcel are missing or invalid. Enter weight in ounces (oz) and dimensions in inches (in), using no more than one decimal place. | | `ITEM.WEIGHT.REQUIRED` | The item 'weight' parameter is required. Enter weight in ounces (oz), using no more than one decimal place. | | `ITEM.HEIGHT.REQUIRED` | The item 'height' parameter is required. Enter dimensions in inches (in), using no more than one decimal place. | | `ITEM.WIDTH.REQUIRED` | The item 'width' parameter is required. Enter dimensions in inches (in), using no more than one decimal place. | | `ITEM.LENGTH.REQUIRED` | The item 'length' parameter is required. Enter dimensions in inches (in), using no more than one decimal place. | | `ITEM.VALUE.REQUIRED` | The item 'value' parameter is required and must be greater than zero. | | `ITEM.NAME.REQUIRED` | The item 'name' parameter is required. | ## Customs Error Codes | Code | Description | |---|---| | `CUSTOMS_INFO.PARAMETERS.INVALID` | One or more parameters required to create the CustomsInfo are missing or invalid. | | `CUSTOMS_ITEM.ORIGIN_COUNTRY.REQUIRED` | The origin country is required for each customs item. | | `CUSTOMS_ITEM.CURRENCY.ONE_CURRENCY_SUPPORTED` | All customs items in a CustomsInfo object must use the same currency. The currency defaults to USD when not provided. | | `CUSTOMS_ITEM.PARAMETERS.INVALID` | One or more parameters required to create the CustomsItem are missing or invalid. | ## Document and Image Error Codes | Code | Description | |---|---| | `DOCUMENT.COMMERCIAL_INVOICE.FAILURE` | The commercial invoice could not be generated for the Shipment. | | `DOCUMENT.CONVERSION.FAILURE` | The document could not be converted. | | `IMAGE.CONVERSION.FAILURE` | The image could not be converted. Retry the request or contact support@easypost.com if the error continues. | | `IMAGE.WIDTH.INVALID` | The image width must be a multiple of eight. | ## Insurance Error Codes | Code | Description | |---|---| | `INSURANCE.PARAMETERS.INVALID` | One or more parameters required to create the Insurance object are invalid. | | `INSURANCE.CREATE.FAILURE` | The Insurance object could not be created using the provided data. | | `INSURANCE.PURCHASE.NOT_ALLOWED` | The account is not permitted to purchase insurance. | | `INSURANCE.PURCHASE.FAILED` | Insurance could not be purchased. Retry the request or contact support@easypost.com if the error continues. | | `INSURANCE.AMOUNT.BELOW_MINIMUM` | The insurance 'amount' must be greater than zero. | | `INSURANCE.AMOUNT.REQUIRED` | The insurance 'amount' parameter is required. | | `INSURANCE.AMOUNT.ABOVE_MAXIMUM` | The insurance amount exceeds the maximum permitted value. | ## Order Error Codes | Code | Description | |---|---| | `ORDER.SHIPMENTS.REQUIRED` | The 'shipments' parameter is required when 'containers' and 'items' are not provided. | | `ORDER.FROM_ADDRESS.REQUIRED` | The 'from_address' parameter is required. | | `ORDER.TO_ADDRESS.REQUIRED` | The 'to_address' parameter is required. | | `ORDER.OPTIONS.INVALID` | One or more Order options are invalid. | | `ORDER.PARAMS.REQUIRED` | At least one parameter is required to create an Order. | | `ORDER.INVALID` | The request does not contain enough information to create the Order. | | `ORDER.RATE.UNAVAILABLE` | The requested rate is not available for one or more Shipments in the Order. | | `ORDER.SERVICE.REQUIRED` | The 'service' parameter is required. | | `ORDER.CARRIER.REQUIRED` | The 'carrier' parameter is required. | | `ORDER.LABEL_DATE.INVALID` | The 'label_date' option must be a valid ISO 8601 string or timestamp. | | `ORDER.CARRIER_ACCOUNTS.CONFLICT` | Provide the applicable CarrierAccount IDs in the 'carrier_accounts' array. | ## Pickup Error Codes | Code | Description | |---|---| | `PICKUP.MIN_DATETIME.REQUIRED` | The 'min_datetime' parameter is required. | | `PICKUP.MAX_DATETIME.REQUIRED` | The 'max_datetime' parameter is required. | | `PICKUP.IS_ACCOUNT_ADDRESS.REQUIRED` | The 'is_account_address' parameter is required. | | `PICKUP.ADDRESS.INVALID` | The pickup Address requires valid 'street1', 'city', 'state', 'zip', 'phone', and 'name' or 'company' values. | | `PICKUP.ADDRESS.REQUIRED` | The pickup 'address' parameter is required. | | `PICKUP.REQUEST.INVALID` | A Batch and Shipment cannot both be supplied in the same pickup request. | | `PICKUP.REQUEST.INVALID` | A Shipment or a Batch containing Shipments is required to create a Pickup. | | `PICKUP.REQUEST.INVALID` | Pickup rates could not be retrieved for the request. | | `PICKUP.BATCH.INVALID` | The provided Batch does not contain any Shipments. | | `PICKUP.BATCH.REQUIRED` | A Batch containing at least one Shipment is required. | | `PICKUP.SHIPMENT_SERVICE.INVALID` | One or more Shipments in the Batch use a service that is not valid for the Pickup. | | `PICKUP.BATCH_CARRIER.INCONSISTENT` | All Shipments in the Batch must use the same carrier. | | `PICKUP.STATUS.INVALID` | The Pickup cannot be modified while it is in its current status. | | `PICKUP.BUY.FAILED` | The Pickup could not be scheduled. | | `PICKUP.BUY.NO_MATCHING_RATES` | No pickup rates match the request. | | `PICKUP.SERVICE.REQUIRED` | The pickup 'service' parameter is required. | | `PICKUP.CARRIER.REQUIRED` | The pickup 'carrier' parameter is required. | | `PICKUP.SHIPMENT_COUNTRY.INVALID` | One or more Shipments in the Batch have an invalid 'to_address.country' value. | | `PICKUP.BUY.FORBIDDEN` | USPS Pickups cannot be purchased in test mode. | | `PICKUP.CANCEL.FAILED` | The Pickup could not be cancelled. | ## Refund Error Codes | Code | Description | |---|---| | `REFUND.NO_RESPONSE` | The carrier did not respond to the refund request. Retry the request or contact support@easypost.com if the error continues. | | `REFUND.FAILURE` | The postage refund could not be completed. | | `REFUND.TRACKING_CODES.INVALID` | The 'tracking_codes' parameter is missing or invalid. | | `REFUND.TRACKING_CODE.NOT_FOUND` | The tracking code was not found in the account's purchased Shipment history. | ## ScanForm Error Codes | Code | Description | |---|---| | `SCAN_FORM.FAILURE` | The ScanForm could not be generated. Retry the request or contact support@easypost.com if the error continues. | | `SCAN_FORM.BATCH.MULTIPLE_CARRIERS` | All Shipments in the Batch must be purchased from the same carrier. | | `SCAN_FORM.BATCH.NOT_PURCHASED` | All Shipments in the Batch must be purchased before creating a ScanForm. | | `SCAN_FORM.SHIPMENTS.INVALID` | All USPS Shipments in the ScanForm must use the same 'from_address'. | | `SCAN_FORM.SHIPMENTS.REQUIRED` | A valid list of Shipments is required. | | `SCAN_FORM.CREATE.CARRIER_NOT_SUPPORTED` | The carrier used to purchase the Shipments does not support ScanForms. | | `SCAN_FORM.CREATE.FAILURE` | The ScanForm could not be created. | ## Shipment Error Codes | Code | Description | |---|---| | `SHIPMENT.PURCHASE.FAILURE` | The Shipment could not be purchased. Retry the request or contact support@easypost.com if the error continues. | | `SHIPMENT.OPTIONS.INVALID` | One or more Shipment options are invalid. | | `SHIPMENT.INVALID_PARAMS` | One or more parameters provided for the Shipment are invalid. | | `SHIPMENT.INVALID` | The request does not contain enough information to create the Shipment. | | `SHIPMENT.POSTAGE.INVALID_FORMAT` | The requested 'file_format' value is invalid. | | `SHIPMENT.POSTAGE.FORMAT_UNAVAILABLE` | The label cannot be converted to the requested image format. | | `SHIPMENT.POSTAGE.REQUIRED` | Purchased postage is required to complete this operation. | | `SHIPMENT.POSTAGE.EXISTS` | Postage has already been purchased for the Shipment. | | `SHIPMENT.POSTAGE.NO_RESPONSE` | The carrier did not respond to the Shipment purchase request. Retry the request or contact support@easypost.com if the error continues. | | `SHIPMENT.POSTAGE.FAILURE` | The shipping label could not be generated. Retry the request or contact support@easypost.com if the error continues. | | `SHIPMENT.REFUND.UNAVAILABLE` | The Shipment refund is unavailable. If the Shipment is part of an Order, refund the first Shipment in the Order. | | `SHIPMENT.REFUND.FAILURE` | The Shipment refund could not be completed. Retry the request or contact support@easypost.com if the error continues. | | `SHIPMENT.CUSTOMS_INFO.DESCRIPTION_REQUIRED` | Each CustomsItem must include a description. | | `SHIPMENT.CUSTOMS_INFO.REQUIRED` | The 'customs_info' parameter is required for international Shipments and Shipments to US military addresses or US territories. | | `SHIPMENT.POSTAGE.TIMED_OUT` | The carrier timed out while processing the Shipment purchase request. Retry the request or contact support@easypost.com if the error continues. | | `SHIPMENT.RATE.CARRIER_ACCOUNT_INVALID` | The selected Rate belongs to an inactive or inaccessible CarrierAccount. Create a new Shipment or retrieve new Rates. | | `SHIPMENT.CARRIER_ACCOUNTS.CONFLICT` | Provide the applicable CarrierAccount IDs in the 'carrier_accounts' array. | | `SHIPMENT.TRACKING_CODE.INVALID_CARRIER` | The specified carrier is not supported for creating a Shipment from a tracking code. | | `SHIPMENT.INSURANCE.ALREADY_PURCHASED` | Insurance has already been purchased for the Shipment. | | `SHIPMENT.MISSING_RATE` | A valid Rate associated with the Shipment is required to purchase the Shipment. | | `SHIPMENT.MISSING_INFORMATION` | A valid 'to_address', 'from_address', and 'parcel' are required to purchase the Shipment. | | `SHIPMENT.PURCHASE.IN_PROGRESS` | A purchase is already in progress for the Shipment. | | `SHIPMENT.RATES.UNAVAILABLE` | The Shipment does not contain enough information to retrieve Rates. | | `SHIPMENT.RATE.STAMP_UNAVAILABLE` | The selected carrier and service combination does not support stamp labels. | | `SHIPMENT.RATE.BARCODE_UNAVAILABLE` | The selected carrier and service combination does not support barcode labels. | | `SHIPMENT.POSTAGE.ASCII` | ASCII label format is not available for production Shipments. | | `SHIPMENT_REPORT.DATE_RANGE.INVALID` | The Shipment Report date range is invalid. | | `SHIPMENT_REPORT.ALREADY_IN_PROGRESS` | A Shipment Report with the same parameters is already being generated. | | `SHIPMENT_REPORT.DATE_RANGE.TOO_LONG` | The Shipment Report date range cannot exceed 31 days. | ## Tracker Error Codes | Code | Description | |---|---| | `TRACKER.RETRIEVE.ERROR` | The Tracker could not be retrieved. Retry the request. | | `TRACKER.RUN.ERROR` | The Tracker could not be processed. Retry the request. | | `TRACKER.CREATE.ERROR` | The Tracker could not be created. Retry the request. | | `TRACKER.NOT_FOUND` | The requested Tracker was not found. | | `TRACKER.INVALID_TEST_CODE` | Test mode accepts only EasyPost test tracking codes from 'EZ1000000001' through 'EZ7000000007'. | | `TRACKER.NO_CARRIER_ACCOUNT` | The account does not have the required CarrierAccount for the specified carrier. | | `TRACKER.INVALID_PARAMS` | Unable to create Tracker; one or more parameters were invalid. This can include an unsupported carrier, a missing tracking_code, an invalid field type, or a tracking_code that exceeds the supported length. | | `TRACKER.CARRIER_CODE_MISMATCH` | The tracking code does not belong to the specified carrier. | | `TRACKER.MULTIPLE_CARRIERS_FOR_CODE` | The tracking code may belong to multiple carriers. Specify the carrier when creating the Tracker. | | `TRACKER.NO_CARRIER_FOR_CODE` | The tracking code does not match a supported carrier format. | ## User Error Codes | Code | Description | |---|---| | `USER.UNAUTHORIZED` | The authenticated user does not have permission to access the resource. | | `USER.INVALID` | The User contains invalid data and could not be saved. | | `USER.PARENT.INVALID` | A child account cannot be added beneath another child account. | | `USER.CHARGE.NOT_ALLOWED` | One-time charges are not enabled for the account. Contact support@easypost.com to request approval. | ## Webhook Error Codes | Code | Description | |---|---| | `WEBHOOK.EVENT.INVALID` | The received webhook event type could not be mapped to a handler. | | `WEBHOOK.INVALID` | The Webhook contains invalid data and could not be saved. | --- ## Additional Resources #### Support and Troubleshooting Visit the EasyPost Help Center for FAQs, troubleshooting guidance, and additional support resources. Related: - [Help Center](https://support.easypost.com) --- Source: https://docs.easypost.com/guides/eu-regulatory-updates-guide # EU Regulatory Updates To comply with new EU regulatory mandates, EasyPost now supports the required shipping data through the shipment and orders API. Most of the required information was already supported through existing fields; a few new parameters cover specific regulatory additions. - Most of these parameters are **carrier-agnostic** and are designed to satisfy the regulations directly rather than any individual carrier's requirements. Any carrier-specific requirements that cannot be covered by these additions (such as UPS's business/consumer classification) are supported separately and detailed in the carrier sections below. - This guide is organized top-down: the carrier-agnostic, API-level fields you send to EasyPost come first, then carrier-specific behavior, followed by how FedEx, UPS, and USPS Ship render or transmit them. --- ## Overview ### Product Identifiers (PIDs) Since **November 1, 2026**, EU customs requires product identifiers on customs documentation for qualifying shipments into the EU. Of the three identifiers below, the merchant (`code`) and manufacturer (`manufacturer_product_id`) IDs are always needed. The standardized ID (`standardized_product_id`) is needed only when the product has one, such as a UPC, EAN, or ISBN. If it doesn't, omit it from the USPS Ship request. USPS requires this field only when the item has one and the shipment is B2C to the destinations listed in the USPS Ship guide. For other carriers, see the carrier sections below. EasyPost accepts all three as optional when you create a shipment. Each carrier decides what it requires when you buy the label, so see the carrier sections below. Shipments missing identifiers a carrier requires are rejected at purchase, or may not clear customs. [Content omitted: parameter list rendered dynamically. Review the rendered documentation for complete parameter details.] ### EU low-value duty (the "€150 de minimis" change) Since July 2026, a **€3 customs duty per item line** applies to B2C shipments into the EU valued **≤ €150**. This is a regulatory customs duty, not a carrier surcharge. EU customs classifies and routes each shipment using data you should already be passing through existing fields, or carrier-specific fields for carriers like UPS: - **Tax identifiers** — your IOSS or VAT registration on the commercial invoice. - IOSS marks a B2C shipment eligible for the flat-fee fast lane. - VAT marks a B2B shipment routed through full H1 customs processing. - **B2B vs. B2C classification** — whether the shipper and consignee are a business or a consumer. - This is carrier-specific today (see below). ### The €3 duty vs. the €2 Union handling fee The €3 customs duty is frequently confused with the **€2 Union handling fee**, a separate administrative charge covering the customs services involved in processing the declaration. The two come from different legal instruments, start on different dates, and **both must be paid** — neither one replaces the other. | | Temporary customs duty | Union handling fee | |---|---|---| | Fee | €3 | €2 | | Legal basis | Council Regulation (EU) 2026/382 | Article 20(2) of the new Union Customs Code | | Value scope | Consignments valued €150 or less | Any value, including above €150 | | Applies from | July 1, 2026 | Expected November 1, 2026 | | Duration | Temporary, until July 1, 2028 | Permanent | - Both are assessed **per declaration line**, not per article. - A declaration line is goods sharing the same tariff classification, description and, where required, country of origin. - So fifteen identical T-shirts under a single commodity code are a single line, while adding socks under a second code makes two. #### Example | Consignment contents (€150 or less) | Declaration lines | €3 duty | €2 handling fee | Total fixed charges | |---|---|---|---|---| | 15 identical T-shirts under a single commodity code | 1 | €3 | €2 | €5 | | 15 T-shirts plus 6 pairs of socks under a second code | 2 | €6 | €4 | €10 | | Three products under three different codes | 3 | €9 | €6 | €15 | --- ## Part 1 — API-Level (Carrier-Agnostic) Changes These are the shipment-API fields you send to EasyPost, independent of which carrier ultimately moves the package. These are the fields you send to EasyPost, whichever carrier you use. EasyPost validates their format when you create the shipment. Whether they are required is decided by the carrier when you buy the label; see the carrier-specific sections below. ### 1. Product Identifiers on Customs Items Two new fields on each `customs_item`, alongside the existing merchant `code`, carry the three EU product identifiers. These are carrier-agnostic: [Content omitted: parameter list rendered dynamically. Review the rendered documentation for complete parameter details.] - `code` is the existing merchant product ID field. No change; for EU customs it now doubles as the **M-PID** (C127). - Only `manufacturer_product_id` and `standardized_product_id` are new. **How to use it:** ```json { "customs_item": { "description": "Women's 100% Cotton T-Shirt, Navy, L", "quantity": 1, "value": "12.00", "hs_tariff_number": "6109.10.0012", "code": "123456", "manufacturer_product_id": "SH123456", "standardized_product_id": "00012345600012" } } ``` - All fields are **optional / nullable** at shipment creation. Max length is 128 for `code` and 64 for `manufacturer_product_id` and `standardized_product_id`. - Carrier-agnostic — the same two fields also serve US CPSC (see the companion CPSC guide). --- ### 2. Tax Identifiers: VAT and IOSS The existing `shipment.tax_identifiers[]` array takes the list of tax registration numbers (VAT, IOSS, EORI, UKIMS, EIN, …) associated with the sender or recipient. - This array is unchanged. - If you have an IOSS number (or VAT, if applicable), it's important to add it now. - For EU-bound shipments these numbers are now surfaced on the commercial invoice where customs expects them (see the carrier-specific sections below), in various places depending on the carrier. **How to use it (unchanged shape):** ```json { "shipment": { "tax_identifiers": [ { "entity": "SENDER", "tax_id": "IM4420000191", "tax_id_type": "IOSS", "issuing_country": "IE" }, { "entity": "SENDER", "tax_id": "GB362459274", "tax_id_type": "VAT", "issuing_country": "GB" }, { "entity": "SENDER", "tax_id": "GB205672212000", "tax_id_type": "EORI", "issuing_country": "GB" } ] } } ``` EasyPost passes through the numbers you provide and makes sure they appear correctly. **EasyPost does not infer, generate, or choose between your tax IDs.** If you provide both an IOSS and a VAT number for a FedEx shipment entering the EU under the new regulations, EasyPost will not choose between them — both will appear on the commercial invoice. It is your responsibility to understand the constraints and provide the correct information. --- ### 3. Tax Identifier Address A new **optional `address`** on each entry of `tax_identifiers` lets you supply the registered address (and, through it, the registered name) tied to a tax registration — for example, the address behind an IOSS or VAT registration. - Carriers such as UPS now expect associated information such as `Number + Name + Address` for eligible EU-bound shipments. Previously `tax_identifiers` only accepted the ID number and type. - It is **carrier-agnostic by design** (it lives on the shared tax-identifier object, not under `carrier_options`), even though UPS IOSS is currently the only carrier that requests it explicitly. You can provide it in two ways: **How to use it:** **Inline:** ```json { "shipment": { "tax_identifiers": [ { "entity": "SENDER", "tax_id": "IM1234567890", "tax_id_type": "IOSS", "issuing_country": "DE", "address": { "name": "ACME GmbH", "street1": "Friedrichstraße 1", "city": "Berlin", "zip": "10117", "country": "DE" } } ] } } ``` **Reference an existing saved address**, the same convention as `to_address`: ```json { "tax_identifiers": [ { "tax_id": "IM1234567890", "tax_id_type": "IOSS", "issuing_country": "IE", "address": { "id": "adr_5843b8dd903611f19a3d0022480b361d" } } ] } ``` - `address` reuses EasyPost's standard **Address** model. - It is optional; omitting it preserves prior behavior. --- ### 4. Commerce Type `options.commerce_type` sets the type of transaction: `B2B`, `B2C`, `C2B`, or `C2C`. - Lowercase values are accepted and normalized. - An unknown value is rejected with a `422` (`SHIPMENT.OPTIONS.INVALID`) when you create the shipment, whatever the destination. - Omitting it is accepted when you create the shipment and request rates. A carrier that needs it rejects the purchase if it is missing. See the carrier sections below for what each one requires. --- ## Part 2 — Carrier-Specific Implications How each carrier renders or transmits the API-level data above. Nothing here is a new field you send — it describes carrier behavior. ## FedEx ### PID Fields on the Commercial Invoice On REST, FedEx receives and transmits the identifiers electronically and does not print them on the commercial invoice, except in the cases below. On SOAP, FedEx supports no product identifier fields at all. **Nothing you do changes either way** — keep populating `code`, `manufacturer_product_id`, and `standardized_product_id`, and EasyPost works out when they have to be printed on the invoice. **SOAP** - FedEx never added the fields to Web Services and does not plan to, so EasyPost appends the identifiers to each item's description on every EU import, which FedEx prints on the invoice. - To have them sent electronically instead, migrate to REST through [FedEx Multi-Factor Authentication](https://support.easypost.com/hc/en-us/articles/35262738410253-FedEx-Multi-Factor-Authentication). **REST** - [`options.suppress_etd`](/docs/shipments/options#:~:text=suppress_etd) set to `true` stops the electronic trade documents that carry the identifiers, so EasyPost appends them to each item's description instead. - Suppressing ETD on one shipment of an order suppresses it for all of them, so every item in the order carries the identifiers. **How it appears on the invoice:** ```text M-PID NS-PID S-PID Cotton t-shirt M-PIDSKU-TSHIRT-001 NS-PIDWIDGET-3000 S-PID07350053850013 ``` Every header prints, including the ones whose identifier you did not send. Further reading: - For more background on the rules driving this, see FedEx's customer guide: [FedEx De Minimis Customer Guide (EU)](https://www.fedex.com/content/dam/fedex/eu-europe/downloads/FedEx_DeMinimis_Customer_Guide_EU.pdf). - For FedEx's own guidance on the product identifier requirements, see [Change to EU import rules: Product Identifiers (PIDs)](https://www.fedex.com/content/dam/fedex/eu-europe/downloads/EU-PID-Guide.pdf). - For FedEx's running summary of the EU customs changes, see [FedEx — Customs Changes](https://www.fedex.com/en-gb/support/clearance/customs-changes.html). - For how FedEx renders VAT and IOSS on the commercial invoice in detail, see the [FedEx — EU Regulatory Updates](/guides/fedex-eu-regulatory-updates-guide) guide. **Important — make duty handling explicit.** By default, FedEx bills the recipient for duties and taxes on international shipments. Rather than relying on that default, set who pays and make sure the recipient is reachable: - **Include the recipient's email** in `to_address.email` when possible, so FedEx can contact them about any duties and taxes they're responsible for. - **Say who pays duties and taxes** with [`options.duty_payment`](/docs/shipments/options#:~:text=to%20be%20set-,duty_payment,-object) — separate from `options.payment`, which bills shipping, not duties. - Set `type` to `SENDER`, `RECEIVER`, or `THIRD_PARTY`. ```json { "shipment": { "options": { "duty_payment": { "type": "SENDER", "account": "123456789", "country": "US", "postal_code": "94104" } } } } ``` - **State the terms with the incoterm** in `customs_info.incoterm` (`DDP` = shipper pays, `DDU` / `DAP` = recipient pays). - **Provide your IOSS number** in `tax_identifiers[]` if you have one (see Part 1). - The EasyPost equivalent of FedEx's `shipper.tins[]`. ### VAT / IOSS on the Commercial Invoice For shipments **into the EU**, EasyPost now surfaces your VAT and IOSS numbers on the FedEx commercial invoice in **two places**: 1. **The Tax ID field on the CI** (exporter / importer tax ID). - FedEx prints only the _first_ tax ID on the CI that is sent, so a VAT or IOSS listed after another ID (e.g. an EORI) previously never appeared. - EasyPost now **floats VAT/IOSS to the front** of the tax IDs sent to FedEx for EU destinations, so it prints in the exporter or importer tax ID field. 2. **Declaration statement line on the CI.** - For EU-bound shipments, VAT and IOSS numbers are included within the commercial invoice's declaration statement. (UKIMS continues to be included on the declaration statement for all destinations, matching previous behavior.) - Since this field has no character limit, any combination — one, two, or all three identifiers — can be displayed. - If a shipment contains conflicting tax ID declarations (such as both IOSS and VAT for a flat-fee shipment to the EU), **both** are printed on the declaration statement. As noted, EasyPost does not make automated determinations on your behalf. **One caveat — US-origin shipments:** for shipments originating from the **USA**, VAT/IOSS still print in the tax ID field on the CI **PDF**, but not in the `declarationStatement` field. This is FedEx's rendering behavior, not an EasyPost limitation. Non-US origins (e.g. GB → DE, FR → DE) print as described. > Note: This change only applies to shipments entering the EU: - If you don't send `tax_identifiers`, nothing changes. - If you already do, you simply start seeing VAT and/or IOSS on the CI for your EU shipments — no code changes required. --- ## UPS When possible, include the recipient's email in `to_address.email` so UPS can contact them about any duties and taxes they're responsible for. ### Shipper & Consignee Type Two UPS-specific carrier options, `shipper_type` and `consignee_type`, classify the shipper (sender) and consignee (recipient) as a **business** or a **consumer**. Because this is specific to UPS, it lives inside `carrier_options`. - EasyPost maps them to UPS's `GlobalTaxInformation/ShipperTypeValue` and `GlobalTaxInformation/ConsigneeTypeValue`. These are the values UPS has told customers it now requires. - UPS uses them for EU de minimis customs routing and handling, since the B2B/B2C indicator routes the shipment into the correct customs lane. UPS may hold or return EU-bound shipments that omit them. - They are found under `options.carrier_options.ups`; each is independent (send either, both, or neither). **How to use it:** ```json { "shipment": { "options": { "carrier_options": { "ups": { "shipper_type": "business", "consignee_type": "consumer" } } } } } ``` - **Accepted values (both):** `business`, `consumer`, `not_applicable`. Anything else is rejected with a clear validation error. - Both are **optional and independent**; omitting both leaves the shipment unchanged (no `GlobalTaxInformation` sent). - Shared wire code set: `business` → `01`, `consumer` → `02`, `not_applicable` → `NA`. UPS-only for now; mirrors the existing `carrier_options.ups.premier` pattern. - **Capture-and-transmit only** — EasyPost passes the values through; it does not infer or override them from your `residential`/`company` values. **How it appears:** ```xml 02 02 ``` --- ### Tax Identifier Address → IOSS Name / Address - The carrier-agnostic `tax_identifiers[].address` field was added initially for UPS's IOSS requirements. While it is carrier-agnostic, UPS is currently the only carrier using the data. - UPS exposes structured IOSS fields (Number + Name + Address) on the ShipConfirm request. When an IOSS tax identifier carries an `address`, EasyPost emits it as an `IOSSContact` under `ShipFrom/VendorInfo`. **How to use it:** ```xml 0356 IM1234567890 ACME GmbH
Friedrichstraße 1 Berlin 10117 DE
``` --- ### Worldwide Economy → Germany: Duty-Unpaid Suspended A temporary guard rejects UPS Worldwide Economy duty-unpaid (DDU) rate and buy requests bound for **Germany (DE)**. WWE duty-paid (DDP) and every non-WWE UPS service are unaffected. Under the new EU rules, UPS has communicated that WWE can no longer clear duty-unpaid volume into Germany, and such packages would be returned to sender. UPS has asked us to stop sending WWE DDU to DE for both BYOA and the DAP program. EasyPost rejects these up front with a **422 at rate/buy time, before any UPS call**, so you don't buy labels that would just be returned to sender. UPS has not provided an ETA for when this restriction will be lifted. **What's blocked vs. kept:** - **Blocked:** WWE duty-unpaid (DDU / DAP incoterm) to DE for all account types (BYOA and the DAP program). - **Kept:** WWE duty-paid (DDP) to DE, and all non-WWE UPS services. **What you'll see:** - Rating or buying a WWE DDU shipment to DE returns a 422. - `UPS Worldwide Economy is temporarily unavailable for duty-unpaid (DDU) shipments to Germany (DE)` - On the DAP-program rate path the same rejection surfaces as `SHIPMENT.RATES.UNAVAILABLE`. **A note on the two "DAP"s:** "duty-unpaid" here is the **incoterm** (DDU / DAP = "Delivered At Place"), _not_ the UPSDAP **account type**. The block keys off destination + duty status only, so it applies to BYOA and the DAP program WWE DDU / DAP only, not WWE DDP. --- ## USPS Ship USPS Ship requires `options.commerce_type` on commercial shipments (`merchandise` or `sample`) to the destinations listed in the [USPS Ship guide](/guides/usps-ship-eu-regulatory-updates-guide). For `B2C` shipments it also requires product identifiers on every customs item. For the full details, see the [USPS Ship — EU Regulatory Updates](/guides/usps-ship-eu-regulatory-updates-guide) guide and the [USPS product identifier requirements](https://www.usps.com/international/product-identifiers.htm). - **Commerce type:** set `options.commerce_type` to `B2B`, `B2C`, `C2B`, or `C2C`. It is required for these shipments, and the buy is rejected without it. `B2C` and `B2B` are sent to USPS as the commercial classification on the customs declaration. `C2B` and `C2C` mean the shipment is not commercial, so no classification is sent. - **Product identifiers:** for `B2C`, `code` (up to 50 characters) and `manufacturer_product_id` (up to 64) are required on every customs item. `standardized_product_id` (up to 50) is sent only when the item has one. Values cannot contain `[`, `]`, `;`, or `=`, or control characters. For `B2B`, `C2B`, and `C2C`, product identifiers are not sent. - **No truncation:** USPS Ship does not transliterate or truncate identifiers. Invalid or over-length values are rejected so you can correct them. ## Carrier Support for Product Identifiers Product identifier support rolls out carrier by carrier. You can send `code`, `manufacturer_product_id`, and `standardized_product_id` today for any carrier — EasyPost stores and returns them on the customs item — and they are transmitted to the carriers marked **Supported** below. Statuses as of November 19, 2026. If a carrier you ship EU-bound volume with isn't listed and you think it should be, Contact Support. - **Supported** — EasyPost transmits the product identifiers to this carrier today. - **In development** — implementation is underway at EasyPost. - **Planned** — scheduled, not yet started. - **Awaiting carrier** — the carrier has not yet published a way to accept the product identifiers, so there is nothing for EasyPost to send them to. **Supported** - APC - Asendia USA - Australia Post - DHL eCommerce Solutions - DHL Express - DHL Paket - DPD UK / Interlink Express - ePost Global - Evri - FedEx - FedEx Cross Border - Passport Global - Purolator - Royal Mail - RR Donnelley - UPS - USPS Ship **In development** - GLS Group (EU) - USA Export PBA **Planned** - PC Postage **Awaiting carrier** - Canada Post - DAI Post - Deutsche Post UK - Hailify --- ## Summary | Change | Layer | What it does | Why it's required | |---|---|---|---| | VAT / IOSS tax identifiers | API (agnostic) | Existing `tax_identifiers[]` ; no new field to send | EU de minimis clearance | | `tax_identifiers[].address` | API (agnostic) | Optional `address` on each `tax_identifiers[]` (inline or `{ "id": "adr_…" }` ); reuses Address model | Carrier IOSS name/address requirement | | `manufacturer_product_id` + `standardized_product_id` | API (agnostic) | New `manufacturer_product_id` (NS-PID) + `standardized_product_id` (S-PID) on `customs_item` ; `code` = M-PID. | EU PID mandate | | VAT / IOSS on FedEx CI | FedEx | Floats VAT/IOSS to front of tax IDs (prints in CI Tax ID field) + adds to declaration statement; EU only | EU de minimis clearance | | `shipper_type` / `consignee_type` | UPS | `carrier_options.ups.shipper_type` / `consignee_type` (business/consumer/not_applicable) → UPS `ShipperTypeValue` / `ConsigneeTypeValue` | EU B2B/B2C customs routing | | Tax Identifier Address → IOSS | UPS | IOSS `address` → `VendorInfo/IOSSContact` (Name + Address) on `ShipFrom` | UPS IOSS name/address | | WWE → Germany DDU block | UPS | Temporarily blocks WWE duty-unpaid (DDU) rate/buy to DE (422); keeps DDP | UPS WWE DDU clearance into DE | | `commerce_type` + product identifiers | USPS Ship | Requires commerce_type (B2B/B2C/C2B/C2C) on merchandise/sample shipments to the destinations listed in the USPS Ship guide; B2C requires code and manufacturer_product_id on every item (standardized ID only when the item has one) | USPS EU customs declaration; EU PID mandate | --- Source: https://docs.easypost.com/guides/fedex-eu-regulatory-updates-guide # FedEx — EU Regulatory Updates How EasyPost gets your product identifiers and VAT / IOSS numbers onto the FedEx commercial invoice for EU-bound shipments. ## Background EasyPost surfaces the tax data you already supply — VAT and IOSS registration numbers — where EU customs expects it on the FedEx commercial invoice (CI). **This is not a new API behavior.** - You already pass these numbers today via the shipment's `tax_identifiers`. - Previously they could get dropped from the printed invoice; now, for EU-bound shipments, they show up where customs expects them. - There is nothing new to send and, in most cases, nothing you need to change. --- Further reading: - For background on the EU de minimis rules driving this, see FedEx's customer guide: [FedEx De Minimis Customer Guide (EU)](https://www.fedex.com/content/dam/fedex/eu-europe/downloads/FedEx_DeMinimis_Customer_Guide_EU.pdf). - For FedEx's own guidance on the product identifier requirements, see [Change to EU import rules: Product Identifiers (PIDs)](https://www.fedex.com/content/dam/fedex/eu-europe/downloads/EU-PID-Guide.pdf). - For FedEx's running summary of the EU customs changes, see [FedEx — Customs Changes](https://www.fedex.com/en-gb/support/clearance/customs-changes.html). - For the full cross-carrier picture (product identifiers, tax-identifier addresses, and UPS behavior), see the [EU Regulatory Updates](/guides/eu-regulatory-updates-guide) guide. --- ## PID Fields on the Commercial Invoice On REST, FedEx receives and transmits the identifiers electronically and does not print them on the commercial invoice, except in the cases below. On SOAP, FedEx supports no product identifier fields at all. **Nothing you do changes either way** — keep populating `code`, `manufacturer_product_id`, and `standardized_product_id`, and EasyPost works out when they have to be printed on the invoice. **SOAP** - FedEx never added the fields to Web Services and does not plan to, so EasyPost appends the identifiers to each item's description on every EU import, which FedEx prints on the invoice. - To have them sent electronically instead, migrate to REST through [FedEx Multi-Factor Authentication](https://support.easypost.com/hc/en-us/articles/35262738410253-FedEx-Multi-Factor-Authentication). **REST** - [`options.suppress_etd`](/docs/shipments/options#:~:text=suppress_etd) set to `true` stops the electronic trade documents that carry the identifiers, so EasyPost appends them to each item's description instead. - Suppressing ETD on one shipment of an order suppresses it for all of them, so every item in the order carries the identifiers. **How it appears on the invoice:** ```text M-PID NS-PID S-PID Cotton t-shirt M-PIDSKU-TSHIRT-001 NS-PIDWIDGET-3000 S-PID07350053850013 ``` Every header prints, including the ones whose identifier you did not send. ## Product Identifier Length Limits - FedEx caps each identifier at 70 characters and rejects non-ASCII values. EasyPost transliterates, then truncates `code`, `manufacturer_product_id`, and `standardized_product_id` to the cap rather than blocking the shipment. - `code` accepts up to 128 characters at the EasyPost API, so it is the field most likely to be shortened. - Transliteration runs before truncation and can lengthen a value — `ß` and `ж` become two characters, `щ` becomes four. - FedEx caps the description itself at 450 characters. The EasyPost API accepts 250 characters of description and the three identifiers add 210 more at their caps, so the description gives up the room — it is shortened, and the identifiers are always sent whole. --- ## VAT / IOSS on the Commercial Invoice **What it is:** for shipments **into the EU**, EasyPost now surfaces the shipper's (and recipient's) VAT and IOSS numbers on the FedEx commercial invoice in two places: - **The Tax ID field on the CI** (exporter / importer tax ID). - FedEx prints only the _first_ tax ID it is sent, so a VAT or IOSS number listed after other IDs (e.g. an EORI) never used to appear. - EasyPost now floats VAT/IOSS to the front of the tax IDs sent to FedEx for EU destinations, so it's the one that prints. - **The declaration statement line on the CI.** - VAT/IOSS are now added to the invoice's declaration statement for EU destinations. - UKIMS still appears on the declaration for every destination, exactly as before. **Why it matters:** EU customs wants the importer/exporter's VAT/IOSS registration on the invoice to clear shipments correctly under the new de minimis rules. Getting these onto the CI helps your EU-bound shipments clear without holds tied to missing tax registration. EasyPost passes through the values you provide and FedEx adds them to the commercial invoice. EasyPost does not infer, generate, or choose between your tax IDs. **How to use it:** keep sending `tax_identifiers` the way you do today. No new fields. ```json { "shipment": { "tax_identifiers": [ { "tax_id": "IM4420000191", "tax_id_type": "IOSS", "issuing_country": "IE" }, { "tax_id": "GB362459274", "tax_id_type": "VAT", "issuing_country": "GB" }, { "tax_id": "GB205672212000", "tax_id_type": "EORI", "issuing_country": "GB" } ] } } ``` --- For an EU destination, the above now: - prints IOSS in the CI tax ID field (it was listed first here; if VAT came first, VAT prints) - lists both IOSS and VAT on the declaration statement — even though EORI is also present --- **What changed vs. what stayed the same:** - **EU destinations** (including intra-EU, e.g. FR → DE): VAT/IOSS floated to the front of the tax IDs sent to FedEx _and_ added to the declaration statement. - Applies to both the sender's and the recipient's tax IDs. - **Non-EU destinations:** unchanged. - Your tax IDs are sent in the order you provide them, and VAT/IOSS are not added to the declaration statement. - **UKIMS:** unchanged — still shown on the declaration statement for all destinations. - **Order preserved:** among your VAT/IOSS entries, EasyPost keeps your given order. - It only moves them ahead of non-priority IDs like EORI. **One caveat — US-origin shipments:** When the shipment _originates in the USA_, FedEx omits VAT/IOSS from the rendered CI **PDF**, even though EasyPost includes them in the request. - This is FedEx's own rendering behavior, not an EasyPost limitation. - US → EU shippers should not expect to see VAT/IOSS on the printed invoice. - Non-US-origin EU-bound shipments (e.g. GB → DE, FR → DE) render as described above. --- **Optional.** - If you don't send `tax_identifiers`, nothing changes. - If you already do, you simply start seeing VAT and/or IOSS on the CI for your EU shipments when it is provided — no code changes required. ## Summary | Change | What it does | Why it's required | |---|---|---| | VAT / IOSS on the CI | For EU destinations, floats VAT/IOSS to the front of the `tax_identifiers[]` sent to FedEx (so it prints in the CI tax ID field) and adds them to the CI `declarationStatement` . Non-EU unchanged; UKIMS unchanged. | EU de minimis customs clearance | --- Source: https://docs.easypost.com/guides/forge-overview # Forge White-Label Shipping for Platforms and Marketplaces ## Overview Forge is EasyPost's **white-label shipping solution** for platforms, marketplaces, and other B2B businesses. Forge enables platforms to embed shipping capabilities directly into their products while leveraging EasyPost's multi-carrier infrastructure. With fast onboarding, access to EasyPost's 100+ carrier network, and competitive rates, Forge allows platforms to build fully integrated shipping experiences without managing complex carrier integrations. Forge supports configurable account structures, flexible pricing controls, and multiple options for managing customer shipping activity. --- ## Prerequisites Before integrating with Forge, review the following EasyPost documentation: - EasyPost Objects: Understand the API object model used to construct requests and interpret responses. - Authentication: Learn how to authenticate API requests securely. - Errors: Review error handling best practices and troubleshooting guidance. Contact EasyPost Sales to get started or learn more about How Forge Works. --- ## Forge Sub-Accounts Each business or customer that signs up for a platform's shipping services is created as a `sub_account`. Sub-accounts represent independent customer environments operating under a Forge platform. Depending on the selected implementation option, sub-accounts may manage their own billing or operate under the platform's billing structure. Forge supports two primary sub-account options: ### Centralized (Self-Managed Billing) The platform manages carrier accounts, billing, and pricing strategy. Shipping activity is billed through the platform's Wallet. Sub-accounts in this option are created as Child User accounts. ### Decentralized (EasyPost-Managed Billing) Each sub-account manages its own EasyPost Wallet. EasyPost processes carrier charges and shipping fees directly through the sub-account's wallet, reducing financial risk for the platform. Sub-accounts in this option are created as ReferralCustomer users. Related: - [Choose a Forge Implementation](https://docs.easypost.com/guides/get-started-with-forge#choose-an-implementation-type) - [Forge Help Center](https://support.easypost.com/hc/en-us/categories/34176519519629-Forge) --- ## Create a Shipping Offering Forge enables platforms to build customized shipping offerings by combining EasyPost's APIs with configurable platform controls. Shipping capabilities can be built using EasyPost APIs, including: - Shipping Labels - Parcel Insurance - Tracking - Scheduling Pickups - Address Verification Platforms can also configure additional capabilities through Forge features, such as: - FlexRate for rate adjustment and pricing control - Sub-Account Groups for pricing segmentation - Advanced Shipping, a white-labeled shipping interface for sub-accounts - Analytics and Reporting for operational and financial visibility Additional tools such as Report Generation and the Shipping UI Tutorial are also available. Together, these capabilities allow platforms to build end-to-end shipping experiences tailored to their business model. Related: - [100+ Carriers, One Integration](https://www.easypost.com/carriers) - [Shipping UI Tutorial](https://docs.easypost.com/guides/ui-for-buying-shipments) --- ## Onboard Sub-Accounts Sub-accounts represent businesses or customers using a platform's shipping services. Onboarding collects the information required to enable postage purchase, parcel insurance, and other shipping-related services. Forge implementations vary depending on how postage, carrier charges, and platform fees are managed. Platforms should first determine the appropriate implementation option before onboarding users. For details on onboarding, refer to the Forge Sub-Account documentation: - Centralized (Self-Managed Billing) - Decentralized (EasyPost-Managed Billing) Related: - [Centralized (Self-Managed Billing)](https://docs.easypost.com/guides/get-started-with-forge/self-managed-billing-guide) - [Decentralized (EasyPost-Managed Billing)](https://docs.easypost.com/guides/get-started-with-forge/easypost-managed-billing-guide) --- ## Manage Sub-Accounts Forge supports multiple methods for managing sub-acounts: ### Customer Portals (Recommended) - **Onboarding**: Sub-accounts complete a conversion-optimized, co-branded onboarding process within an EasyPost-hosted environment. - **Account Management**: Sub-accounts access a co-branded, EasyPost-hosted dashboard configured based on Forge platform settings. ### Custom API Integrations Build a fully customized onboarding and account management experience using EasyPost's APIs. ### No-Code Administration Manually create, onboard, and manage sub-accounts directly through the Forge Dashboard. > Note: EasyPost recommends the Customer Portals method for onboarding and account management. This option automatically adapts to changing requirements and is configurable within the Forge Dashboard. --- ## Additional Resources Please visit the Help Center for more information. --- Source: https://docs.easypost.com/guides/form-guide # Form Guide This guide explains how to generate shipping Forms for purchased shipments using the EasyPost API. Easypost supports several shipping forms. Some forms are requested by creating a Form after purchasing a shipment, while others are automatically generated by the carrier or enabled through shipment options. The sections below describe how each form is generated and which carriers support it. --- ## Prerequisites - Purchase the shipment before creating a Form. - Some forms require carrier-specific configuration. - Some forms are generated automatically or by shipment options. --- ## Forms Created by Request Create these forms by making a Form request after purchasing a shipment. | Form | Parameters | Carrier | |---|---|---| | Label QR Code | [Form](https://docs.easypost.com/guides/form-guide#label-qr-code-parameters) | USPS. See [Label Broker Guide](https://support.easypost.com/hc/en-us/articles/4404533889677-EasyPost-USPS-Label-Broker) | | Return Packing Slip | [Return packing slip parameters](https://docs.easypost.com/guides/form-guide#return-packing-slip-parameters) | All carriers | | RMA QR Code | [RMA QR Code parameters](https://docs.easypost.com/guides/form-guide#rma-qr-code-parameters) | Fedex (Note: This requires account provisioning. Please contact [support](https://support.easypost.com) to use this feature.) | --- ## Forms Generated Automatically These forms are automatically generated when the shipment meets the carrier's requirements. No Form request is required. | Form | Carrier | |---|---| | Cod Return Label | FedEx (FedEx Ground C.O.D. shipments within and to Canada) | | Commercial Invoice | All carriers that support international shipments [commercial invoice](https://docs.easypost.com/guides/commercial-invoice-guide) | | CN22 | Select carriers like USPS. The CN22 form will be included on your postage label when available. | | CRN Report | FedEx | | High Value Report | UPS (note: UPS automatically creates this based on the shipment) | | Order Summary | Australia Post, Deutsche Post, and FedEx Fuse | --- ## Forms Generated by Shipment Options These forms are generated when the corresponding shipment option is enabled. | Form | Shipment Option | Carrier | |---|---|---| | NAFTA Certificate of Origin (USMCA) | `nafta_certificate_of_origin: true` | FedEx (REST) | > Note: Although the shipment option is named `nafta_certificate_of_origin`, the trade agreement is now known as the United States-Mexico-Canada Agreement (USMCA). For eligible FedEx REST shipments between the United States, Canada, and Mexico, setting `nafta_certificate_of_origin: true` causes FedEx to generate and electronically submit the certificate when applicable. --- ## Examples #### Label QR Code Parameters ```json { "form": { "type": "label_qr_code" } } ``` #### Return Packing Slip Parameters ```json { "form": { "type": "return_packing_slip", "barcode": "RMA12345678900", "line_items": [ { "product": { "title": "Square Reader", "barcode": "123456789" }, "units": 8 } ] } } ``` #### RMA QR Code Parameters ```json { "form": { "type": "rma_qr_code", "rma": { "pack_and_return": true, "label_image_data": "{{label_image_data}}", "include_packing_slip": true, "email_notification": true, "affiliated_merchant": "example", "order": { "order_date": "2020-09-22", "order_number": "123456", "line_items": [ { "quantity": 2, "return_reason": "Custom String reason", "sku": "1234SKU" }, { "quantity": 1, "return_reason": "Return requested", "sku": "1235SKU" } ] } } } } ``` --- ## Additional Resources [Content omitted: related links and resources. Review the rendered documentation for navigation links.] --- Source: https://docs.easypost.com/guides/get-started-with-forge/decentralized-with-stripe-connect # Decentralized (with Stripe Connect) ## Overview This guide provides instructions on using Forge's decentralized white label option to create and manage `ReferralCustomers` using Stripe Connect with a Stripe Account. For a more detailed overview of the White Label product, please refer to the Forge Overview page. --- ## Prerequisites 1. Complete all prerequisites to Get Started with Forge. 2. Already manage a Stripe account and have flows for creating Stripe Customers and Stripe Payment Methods. --- ## ReferralCustomer API Onboarding Use EasyPost's `POST /referral_customers` endpoint to create a `ReferralCustomer`. **Save the API keys securely for use in later steps.** If API keys are lost, they can be retrieved from the Sub Account Details page. **IMPORTANT:** When a `ReferralCustomer` is created with your API key, you are certifying that the `ReferralCustomer` agrees to the EasyPost Terms of Service. **Production Only** ### Example: POST /referral_customers #### cURL ```shell curl -X POST https://api.easypost.com/v2/referral_customers \ -u "$PARTNER_API_KEY": \ -H "Content-Type: application/json" \ -d '{ "user": { "name": "Firstname Lastname", "email": "email@example.com", "phone_number": "8888888888" } }' ``` #### Go ```go package example import ( "fmt" "github.com/EasyPost/easypost-go/v6" ) func create() { client := easypost.New("EASYPOST_API_KEY") name := "Test Referral" email := "test@example.com" phone := "5555555555" referralUser, _ := client.CreateReferralCustomer( &easypost.UserOptions{ Name: &name, Email: &email, Phone: &phone, }, ) fmt.Println(referralUser) } ``` #### Java ```java package referral; import com.easypost.exception.EasyPostException; import com.easypost.model.ReferralCustomer; import com.easypost.service.EasyPostClient; import java.util.HashMap; public class Create { public static void main(String[] args) throws EasyPostException { EasyPostClient client = new EasyPostClient("EASYPOST_API_KEY"); HashMap params = new HashMap<>(); params.put("name", "test test"); params.put("email", "test@test.com"); params.put("phone", "8888888888"); ReferralCustomer referralUser = client.referralCustomer.create(params); System.out.println(referralUser); } } ``` #### C# ```csharp using System; using System.Collections.Generic; using System.Threading.Tasks; using EasyPost; using Newtonsoft.Json; namespace EasyPostExamples { public class Examples { public static async Task Main() { var client = new EasyPost.Client(new EasyPost.ClientConfiguration("EASYPOST_API_KEY")); EasyPost.Parameters.ReferralCustomer.Create parameters = new() { Name = "test user", Email = "email@example.com", Phone = "8888888888" }; EasyPost.Models.API.ReferralCustomer referralUser = await client.ReferralCustomer.CreateReferral(parameters); Console.WriteLine(JsonConvert.SerializeObject(referralUser, Formatting.Indented)); } } } ``` #### Node.js ```javascript const EasyPostClient = require('@easypost/api'); const client = new EasyPostClient('EASYPOST_API_KEY'); (async () => { const referralCustomer = await client.ReferralCustomer.create({ name: 'Test Referral', email: 'test@example.com', phone: '1111111111', }); console.log(referralCustomer); })(); ``` #### PHP ```php referralCustomer->create([ 'name' => 'Test Referral', 'email' => 'test@test.com', 'phone' => '8888888888' ]); echo $referralUser; ``` #### Python ```python import easypost client = easypost.EasyPostClient("EASYPOST_API_KEY") referral_user = client.referral_customer.create( name="test test", email="test@test.com", phone="8888888888", ) print(referral_user) ``` #### Ruby ```ruby require 'easypost' client = EasyPost::Client.new(api_key: 'EASYPOST_API_KEY') referral_user = client.referral_customer.create( name: 'test user', email: 'email@example.com', phone: '8888888888', ) puts referral_user ``` --- ## ReferralCustomer Billing Management Platforms and marketplaces must build an interface that allows customers to: - Set up Payment Methods - Manage Wallet Settings within their application. --- ## Step 1: Create and Attach Payment Methods Forge **Decentralized with Stripe Connect** allows platforms and marketplaces to collect payment methods with their own custom Stripe integration. Use EasyPost's POST /beta/referral_customers` endpoint to create a referral customer payment method. Each referral customer can have one primary and one secondary payment method. **IMPORTANT:** Ensure all payment methods are fully verified, including any necessary verification steps, such as ACH micro-deposit verification for bank accounts or 3D Secure authentication for credit cards. ### Example: POST /beta/referral_customers/payment_method #### cURL ```shell curl -X POST https://api.easypost.com/beta/referral_customers/payment_method \ -u "$REFERRAL_USER_API_KEY": \ -H "Content-Type: application/json" \ -d '{ "payment_method": { "stripe_customer_id": "cus_...", "payment_method_reference": "card_...", "priority": "primary" } }' ``` #### Go ```go package example import ( "fmt" "github.com/EasyPost/easypost-go/v6" ) func addPaymentMethodWithCreditCard() { client := easypost.New("EASYPOST_API_KEY") paymentMethod, _ := client.BetaAddPaymentMethod("cus_...", "card_...", easypost.PrimaryPaymentMethodPriority) fmt.Println(paymentMethod) } ``` #### Java ```java package referral; import com.easypost.exception.EasyPostException; import com.easypost.model.PaymentMethodObject; import com.easypost.service.EasyPostClient; public class Create { public static void main(String[] args) throws EasyPostException { EasyPostClient client = new EasyPostClient("EASYPOST_API_KEY"); PaymentMethodObject paymentMethod = client.betaReferralCustomer.addPaymentMethod("cus_...", "card_..."); System.out.println(paymentMethod); } } ``` #### C# ```csharp using System; using System.Collections.Generic; using System.Threading.Tasks; using EasyPost; using Newtonsoft.Json; namespace EasyPostExamples { public class Examples { public static async Task Main() { var client = new EasyPost.Client(new EasyPost.ClientConfiguration("EASYPOST_API_KEY")); EasyPost.Models.API.PaymentMethod paymentMethod = await client.Beta.ReferralCustomer.AddPaymentMethod("cus_...", "card_...", PaymentMethod.Priority.Primary); Console.WriteLine(JsonConvert.SerializeObject(paymentMethod, Formatting.Indented)); } } } ``` #### Node.js ```javascript const EasyPostClient = require('@easypost/api'); const client = new EasyPostClient('EASYPOST_API_KEY'); (async () => { const paymentMethod = await client.BetaReferralCustomer.addPaymentMethod('cus_...', 'card_...'); console.log(paymentMethod); })(); ``` #### PHP ```php betaReferralCustomer->addPaymentMethod([ 'cus_...', 'card_...', 'primary' ]); echo $paymentMethod; ``` #### Python ```python import easypost client = easypost.EasyPostClient("EASYPOST_API_KEY") payment_method = client.beta_referral_customer.add_payment_method( stripe_customer_id="cus_...", payment_method_reference="card_...", primary_or_secondary="primary", ) print(payment_method) ``` #### Ruby ```ruby require 'easypost' client = EasyPost::Client.new(api_key: 'EASYPOST_API_KEY') payment_method = client.beta_referral_customer.add_payment_method( 'cus_...', 'card_...', 'primary', ) puts payment_method ``` --- ## Step 2: Fund the EasyPost Wallet `ReferralCustomer` users can deposit an initial amount into the EasyPost Wallet using EasyPost's `POST /bank_accounts/:id/charges` or `POST /credit_cards/:id/charges` to start using services immediately. [Content omitted: API request example. Review the rendered documentation for complete request payloads, parameters, and code samples.] --- ## Step 3: Configure Recharge Threshold and Recharge Amount Once a payment method is established, EasyPost can automatically charge a `recharge_amount` if a wallet balance falls below a `recharge_threshold`. To ensure uninterrupted service, platforms using the Decentralized white-label option should provide clear guidance on the recharge threshold and recharge amount system. ### Default Recharge Settings - `recharge_amount` is set to $100 - `recharge_threshold` is set to zero This means that the wallet will not automatically recharge unless the balance falls below zero. A negative balance can occur if shipment adjustments are applied due to inaccurately specified weights, dimensions, or other shipment details. ### Handling Failed Payments If a charge to the primary payment method fails, EasyPost will automatically attempt to charge the `ReferralCustomer`'s secondary payment method, if one is available. To avoid service interruptions, It is recommended that `ReferralCustomers` have both a primary and secondary payment method configured. ### Customizing Recharge Settings Forge customers can configure the `recharge_threshold`, `recharge_amount` and `secondary_recharge_amount` for a `ReferralCustomer` using EasyPost's `PATCH /users` API. These settings allow automatic maintenance of the wallet balance and prevent disruptions in service. [Content omitted: API request example. Review the rendered documentation for complete request payloads, parameters, and code samples.] --- ## ReferralCustomer Carrier Account Management Upon creation, the `ReferralCustomer` user automatically receives access to several EasyPost-Powered Carrier Accounts, which are billed through the platforms' wallet. To add additional carrier accounts for a `ReferralCustomer` user, one of the following options can be used: - **API Integration:** Use the Carrier Account API with the `ReferralCustomer` user's Production API Key of the sub account to integrate additional carriers. - **Forge Dashboard:** Manually add carriers through the Carriers section of the Forge Dashboard. Related: - [Carrier Management](https://support.easypost.com/hc/en-us/sections/34550349817869-Carrier-Management) --- ## ReferralCustomer Shipment Creation Creating shipments for `ReferralCustomer` users follows the same process as Parent Users, with key differences being the requirement to use the `ReferralCustomer` user's API Keys. A `Shipment Object` consists of: - A valid `to_address` and `from_address` - A `parcel` with shipping details - Any required `forms` for international deliveries Once a `shipment` is created, a `Shipment Object` is used to retrieve shipping rates and purchase a label. ### Advanced Shipping Platforms may optionally enable Advanced Shipping, a white-labeled shipping interface that allows sub-accounts to purchase labels and manage shipments through a hosted experience. When Advanced Shipping is used with the Decentralized (EasyPost-Managed Billing) option, shipments and billing continue to be processed through the ReferralCustomer's wallet and carrier configuration. --- ## Additional Resources Please visit the Help Center for more information. --- Source: https://docs.easypost.com/guides/get-started-with-forge/easypost-managed-billing-guide # Decentralized (EasyPost-Managed Billing) Implementation Guide ## Overview The **Decentralized** white-label option in Forge enables Platforms and Marketplaces to embed shipping capabilities **without managing postage and other fees** on behalf of their customers. This implementation option has unique onboarding requirements that can be found in this guide. For this option, the sub-account object type is the `ReferralCustomer`. **IMPORTANT:** Before starting, review the prerequisites section of the Get Started with Forge guide to understand white-label implementations with EasyPost. Related: - [ReferralCustomers](https://docs.easypost.com/docs/users/referral-customers) --- ## Create a ReferralCustomer A `ReferralCustomer` is an independent sub account with its own billing methods and wallet. These users can be created via API or through the Forge Dashboard. ReferralCustomer users can be created using **one of two methods**: ### API Integration 1. Use the POST /referral_customers API to create a `ReferralCustomer` account. 1. This request must be made in **Production** mode using the parent account's EasyPost API Key. 2. Securely store the **API keys** for future use. If lost, they can be retrieved from the **Sub Account Details** page. [Content omitted: API request example. Review the rendered documentation for complete request payloads, parameters, and code samples.] ### Forge Dashboard 1. Log in to the Forge Dashboard. 2. Navigate to the Sub Accounts section of the Forge Dashboard. 3. Click **New Referral Account** and complete the required fields. 4. Securely store the API keys generated for the `ReferralCustomer` user. If lost, API keys can be retrieved through the **Sub Account Details** page. ReferralCustomer accounts are automatically enrolled in a pay-as-you-go EasyPost subscription that enables access to standard rates, postage, insurance, and other shipping-related features. **IMPORTANT:** Creating a `ReferralCustomer` via API certifies that the `ReferralCustomer` user agrees to the EasyPost Terms of Service. --- ## Managing ReferralCustomer Accounts via Customer Portals ReferralCustomer users can manage onboarding and account configuration through EasyPost-hosted portals. ### Onboarding Portal Co-branded, conversion-optimized flow for collecting billing and account details. ### Account Management Portal Customizable interface for managing carriers, billing, and other account-level settings. Portals are accessed via the `POST /customer_portal/account_link` endpoint. ### Advanced Shipping Platforms may optionally enable Advanced Shipping, a white-labeled shipping interface that allows sub-accounts to purchase labels and manage shipments through a hosted experience. When Advanced Shipping is used with the Decentralized (EasyPost-Managed Billing) option, shipments and billing continue to be processed through the ReferralCustomer's wallet and carrier configuration. ### Example: POST /customer_portal/account_link #### cURL ```shell curl -X POST https://api.easypost.com/v2/customer_portal/account_link \ -u "EASYPOST_API_KEY": \ -H 'Content-Type: application/json' \ -d '{ "session_type": "account_management", "user_id": "user_...", "refresh_url": "https://example.com/refresh", "return_url": "https://example.com/return", "metadata": {"target": "wallet"} }' ``` #### Go ```go package example import ( "fmt" "github.com/EasyPost/easypost-go/v6" ) func create() { client := easypost.New("EASYPOST_API_KEY") accountLink, _ := client.CreateCustomerPortalAccountLink( &easypost.CustomerPortalAccountLinkParameters{ SessionType: "account_management", UserID: "user_...", RefreshURL: "https://example.com/refresh", ReturnURL: "https://example.com/return", Metadata: map[string]interface{}{ "target": "wallet", }, }, ) fmt.Println(accountLink) } ``` #### Java ```java package customer_portals; import java.util.HashMap; import com.easypost.exception.EasyPostException; import com.easypost.model.CustomerPortalAccountLink; import com.easypost.service.EasyPostClient; public class Create { public static void main(String[] args) throws EasyPostException { EasyPostClient client = new EasyPostClient("EASYPOST_API_KEY"); HashMap params = new HashMap<>(); params.put("session_type", "account_management"); params.put("user_id", "user_..."); params.put("refresh_url", "https://example.com/refresh"); params.put("return_url", "https://example.com/return"); HashMap metadata = new HashMap<>(); metadata.put("target", "wallet"); params.put("metadata", metadata); CustomerPortalAccountLink accountLink = client.customerPortal.createAccountLink(params); System.out.println(accountLink); } } ``` #### C# ```csharp using System; using System.Threading.Tasks; using EasyPost; using Newtonsoft.Json; namespace EasyPostExamples { public class Examples { public static async Task Main() { var client = new EasyPost.Client(new EasyPost.ClientConfiguration("EASYPOST_API_KEY")); EasyPost.Parameters.CustomerPortal.CreateAccountLink parameters = new() { SessionType = "account_management", UserId = "user_...", RefreshUrl = "https://example.com/refresh", ReturnUrl = "https://example.com/return", Metadata = new System.Collections.Generic.Dictionary { { "target", "wallet" } } }; EasyPost.Models.API.CustomerPortal.AccountLink accountLink = await client.CustomerPortal.CreateAccountLink(parameters); Console.WriteLine(JsonConvert.SerializeObject(accountLink, Formatting.Indented)); } } } ``` #### Node.js ```javascript const EasyPostClient = require('@easypost/api'); const client = new EasyPostClient('EASYPOST_API_KEY'); (async () => { const accountLink = await client.CustomerPortal.createAccountLink({ session_type: 'account_management', user_id: 'user_...', refresh_url: 'https://example.com/refresh', return_url: 'https://example.com/return', metadata: { target: 'wallet' }, }); console.log(accountLink); })(); ``` #### PHP ```php customerPortal->createAccountLink([ 'session_type' => 'account_management', 'user_id' => 'user_...', 'refresh_url' => 'https://example.com/refresh', 'return_url' => 'https://example.com/return', 'metadata' => ['target' => 'wallet'], ]); echo $accountLink; ``` #### Python ```python import easypost client = easypost.EasyPostClient("EASYPOST_API_KEY") account_link = client.customer_portal.create_account_link( session_type="account_management", user_id="user_...", refresh_url="https://example.com/refresh", return_url="https://example.com/return", metadata={"target": "wallet"}, ) print(account_link) ``` #### Ruby ```ruby require 'easypost' client = EasyPost::Client.new(api_key: 'EASYPOST_API_KEY') account_link = client.customer_portal.create_account_link( { session_type: 'account_management', user_id: 'user_...', refresh_url: 'https://example.com/refresh', return_url: 'https://example.com/return', metadata: { target: 'wallet' }, }, ) puts account_link ``` Related: - [Advanced Shipping](https://support.easypost.com/hc/en-us/articles/44018208194829-Forge-Advanced-Shipping) --- ## ReferralCustomer Billing Management Platforms and marketplaces must build an interface that allows customers to: - Set up Payment Methods - Manage Wallet Settings within their application. **IMPORTANT:** If Stripe Connect is already in use to collect customer payments, the Decentralized with Stripe Connect Guide provides an expedited integration process. --- ## Step 1: Set up the Stripe.js Client EasyPost uses the Stripe.js client to securely add payment methods for `ReferralCustomer` users. 1. The Stripe Public Key must be retrieved before initializing Stripe.js. [Content omitted: API request example. Review the rendered documentation for complete request payloads, parameters, and code samples.] 2. Include Stripe.js in the user's browser: `` 3. Once the Stripe.js script is loaded in the DOM, the Stripe.js client can then be initialized using the public key retrieved above. `const stripe = Stripe('pk_test_...');` --- ## Step 2: Create and Attach Payment Methods The Forge Decentralized option without Stripe Connect offers **credit card** and **bank account** payment methods. Each `ReferralCustomer` user can have one primary and one secondary payment method. ### Adding Credit Cards 1. Retrieve a single-use unique `client_secret` using `EasyPost's POST /beta/setup_intents` endpoint to be used with Stripe Elements. ### Example: POST /beta/setup_intents #### cURL ```shell curl -X POST "https://api.easypost.com/beta/setup_intents" \ -u "$REFERRAL_USER_API_KEY:" \ -H "Content-Type: application/json" ``` #### Go ```go package example import ( "fmt" "github.com/EasyPost/easypost-go/v6" ) func createStripeCreditCardSecret() { client := easypost.New("EASYPOST_API_KEY") response, _ := client.BetaCreateCreditCardClientSecret() fmt.Println(response) } ``` #### Java ```java package billing; import com.easypost.exception.EasyPostException; import com.easypost.service.EasyPostClient; public class CreateStripeCreditCardSecret { public static void main(String[] args) throws EasyPostException { EasyPostClient client = new EasyPostClient("EASYPOST_API_KEY"); ClientSecret response = client.betaReferralCustomer.createCreditCardClientSecret(); System.out.println(response); } } ``` #### C# ```csharp using System; using System.Collections.Generic; using System.Threading.Tasks; using EasyPost; using Newtonsoft.Json; namespace EasyPostExamples { public class Examples { public static async Task Main() { var client = new EasyPost.Client(new EasyPost.ClientConfiguration("EASYPOST_API_KEY")); EasyPost.Models.API.StripeClientSecret response = await client.Beta.ReferralCustomer.CreateCreditCardClientSecret(); Console.WriteLine(JsonConvert.SerializeObject(response, Formatting.Indented)); } } } ``` #### Node.js ```javascript const EasyPostClient = require('@easypost/api'); const client = new EasyPostClient('EASYPOST_API_KEY'); (async () => { const response = await client.BetaReferralCustomer.createCreditCardClientSecret(); console.log(response); })(); ``` #### PHP ```php betaReferralCustomer->createCreditCardClientSecret(); echo $response; ``` #### Python ```python import easypost client = easypost.EasyPostClient("EASYPOST_API_KEY") response = client.beta_referral_customer.create_credit_card_client_secret() print(response) ``` #### Ruby ```ruby require 'easypost' client = EasyPost::Client.new(api_key: 'EASYPOST_API_KEY') response = client.beta_referral_customer.create_credit_card_client_secret puts response ``` 2. Using the Stripe.js client, use Stripe Elements to create a secure form for collecting credit card details and mount it to the DOM. The appearance and layout of this element can be customized using the options available in the Stripe create_element documentation. An event listener is also needed for handling errors and collecting the Stripe payment method ID. 3. Initialize Stripe Elements and capture the payment method ID. 4. Attach the credit card to the`ReferralCustomer` user's account using EasyPost's `POST /credit_cards` endpoint with the payment method ID previously retrieved. ### Example: POST /credit_cards #### cURL ```shell curl -X POST "https://api.easypost.com/v2/credit_cards" \ -u "$REFERRAL_USER_API_KEY:" \ -H "Content-Type: application/json" \ -d '{ "credit_card": { "payment_method_id": "pm_...", "priority": "primary" } }' ``` #### Go ```go package example import ( "fmt" "github.com/EasyPost/easypost-go/v6" ) func addStripeCreditCard() { client := easypost.New("EASYPOST_API_KEY") creditCard, _ := client.AddReferralCustomerCreditCardFromStripe( "REFERRAL_USER_API_KEY", "seti_...", easypost.PrimaryPaymentMethodPriority, ) fmt.Println(creditCard) } ``` #### Java ```java package billing; import com.easypost.exception.EasyPostException; import com.easypost.model.PaymentMethod; import com.easypost.service.EasyPostClient; public class CreateStripeCreditCardSecret { public static void main(String[] args) throws EasyPostException { EasyPostClient client = new EasyPostClient("EASYPOST_API_KEY"); PaymentMethodObject paymentMethod = client.referralCustomer.addCreditCardFromStripe( "REFERRAL_USER_API_KEY", "seti_...", PaymentMethod.Priority.PRIMARY ); System.out.println(paymentMethod); } } ``` #### C# ```csharp using System; using System.Collections.Generic; using System.Threading.Tasks; using EasyPost; using Newtonsoft.Json; namespace EasyPostExamples { public class Examples { public static async Task Main() { var client = new EasyPost.Client(new EasyPost.ClientConfiguration("EASYPOST_API_KEY")); EasyPost.Models.API.PaymentMethod paymentMethod = await Client.ReferralCustomer.AddCreditCardFromStripe( "REFERRAL_USER_API_KEY", "seti_...", EasyPost.Models.API.PaymentMethod.Priority.Primary ); Console.WriteLine(JsonConvert.SerializeObject(paymentMethod, Formatting.Indented)); } } } ``` #### Node.js ```javascript const EasyPostClient = require('@easypost/api'); const client = new EasyPostClient('EASYPOST_API_KEY'); (async () => { const paymentMethod = await client.ReferralCustomer.addCreditCardFromStripe( 'REFERRAL_USER_API_KEY', 'seti_...', 'primary', ); console.log(paymentMethod); })(); ``` #### PHP ```php referralCustomer->addCreditCardFromStripe( 'REFERRAL_USER_API_KEY', 'seti_...', 'primary', ); echo $paymentMethod; ``` #### Python ```python import easypost client = easypost.EasyPostClient("EASYPOST_API_KEY") payment_method = client.referral_customer.add_credit_card_from_stripe( referral_api_key="REFERRAL_USER_API_KEY", payment_method_id="seti_...", priority="primary", ) print(payment_method) ``` #### Ruby ```ruby require 'easypost' client = EasyPost::Client.new(api_key: 'EASYPOST_API_KEY') payment_method = client.referral_customer.add_credit_card_from_stripe( 'REFERRAL_USER_API_KEY', 'seti_...', 'primary', ) puts payment_method ``` ### Adding Bank Accounts (ACH Direct Debits) 1. Retrieve a single-use unique client secret using EasyPost's `POST /beta/financial_connections_sessions` endpoint to be used with Stripe Financial Connections. **NOTE:** The return URL specifies where the user will be redirected after completing the bank account addition process in Stripe Financial Connections.   ### Example: POST /beta/financial_connections_sessions #### cURL ```shell curl -X POST "https://api.easypost.com/beta/financial_connections_sessions" \ -u "$REFERRAL_USER_API_KEY:" \ -H "Content-Type: application/json" \ -d '{ "return_url": "https://www.yourwebsite.com/redirect" }' ``` #### Go ```go package example import ( "fmt" "github.com/EasyPost/easypost-go/v6" ) func createStripeBankAccountSecret() { client := easypost.New("EASYPOST_API_KEY") response, _ := client.BetaCreateBankAccountClientSecret() fmt.Println(response) } ``` #### Java ```java package billing; import com.easypost.exception.EasyPostException; import com.easypost.service.EasyPostClient; public class CreateStripeBankAccountSecret { public static void main(String[] args) throws EasyPostException { EasyPostClient client = new EasyPostClient("EASYPOST_API_KEY"); ClientSecret response = client.betaReferralCustomer.createBankAccountClientSecret(); System.out.println(response); } } ``` #### C# ```csharp using System; using System.Collections.Generic; using System.Threading.Tasks; using EasyPost; using Newtonsoft.Json; namespace EasyPostExamples { public class Examples { public static async Task Main() { var client = new EasyPost.Client(new EasyPost.ClientConfiguration("EASYPOST_API_KEY")); EasyPost.Models.API.StripeClientSecret response = await client.Beta.ReferralCustomer.CreateBankAccountClientSecret(); Console.WriteLine(JsonConvert.SerializeObject(response, Formatting.Indented)); } } } ``` #### Node.js ```javascript const EasyPostClient = require('@easypost/api'); const client = new EasyPostClient('EASYPOST_API_KEY'); (async () => { const response = await client.BetaReferralCustomer.createBankAccountClientSecret(); console.log(response); })(); ``` #### PHP ```php betaReferralCustomer->createBankAccountClientSecret(); echo $response; ``` #### Python ```python import easypost client = easypost.EasyPostClient("EASYPOST_API_KEY") response = client.beta_referral_customer.create_bank_account_client_secret() print(response) ``` #### Ruby ```ruby require 'easypost' client = EasyPost::Client.new(api_key: 'EASYPOST_API_KEY') response = client.beta_referral_customer.create_bank_account_client_secret puts response ``` 2. Have the user accept a mandate indicating consent to having their bank account automatically charged. ![ACH Mandate Agreement](https://docs.easypost.com/images/ach-mandate-agreement.png) 3. Open the Stripe Financial Connections modal in the user's browser using the Stripe.js client with the client secret obtained during the previous step. See the official Stripe documentation. **NOTE:** When the above promise is resolved successfully, the returned result will contain a list of accounts in `result.financialConnectionsSession.accounts`. The `id` for each of these accounts is what must be used to create the bank account using the EasyPost API endpoint. 4. Create a bank account for the referral customer using EasyPost's `POST /bank_accounts` endpoint once per ID retrieved along with data for the mandate acceptance. **NOTE:** Payment methods can be deleted using EasyPost's `DELETE /bank_accounts/:id` and `DELETE /credit_cards/:id` endpoints.   ### Example: POST /bank_accounts #### cURL ```shell curl -X POST "https://api.easypost.com/v2/bank_accounts" \ -u "$REFERRAL_USER_API_KEY:" \ -H "Content-Type: application/json" \ -d '{ "financial_connections_id": "fca_...", "mandate_data": { "ip_address": "127.0.0.1", "user_agent": "Mozilla/5.0", "accepted_at": 1722510730, }, "priority": "primary" }' ``` #### Go ```go package example import ( "fmt" "github.com/EasyPost/easypost-go/v6" ) func addStripeBankAccount() { client := easypost.New("EASYPOST_API_KEY") bankAccount, _ := client.AddReferralCustomerBankAccountFromStripe( "REFERRAL_USER_API_KEY", "fca_...", &easypost.MandateData{ IPAddress: "127.0.0.1", UserAgent: "Mozilla/5.0", AcceptedAt: 1722510730, }, easypost.PrimaryPaymentMethodPriority, ) fmt.Println(bankAccount) } ``` #### Java ```java package billing; import com.easypost.exception.EasyPostException; import com.easypost.model.PaymentMethod; import com.easypost.service.EasyPostClient; public class CreateStripeCreditCardSecret { public static void main(String[] args) throws EasyPostException { EasyPostClient client = new EasyPostClient("EASYPOST_API_KEY"); HashMap mandateData = new HashMap(); mandateData.put("ip_address", "127.0.0.1"); mandateData.put("user_agent", "Mozilla/5.0"); mandateData.put("accepted_at", 1722510730); PaymentMethodObject paymentMethod = client.referralCustomer.addBankAccountFromStripe( "REFERRAL_USER_API_KEY", "fca_...", mandateData, PaymentMethod.Priority.PRIMARY ); System.out.println(paymentMethod); } } ``` #### C# ```csharp using System; using System.Collections.Generic; using System.Threading.Tasks; using EasyPost; using Newtonsoft.Json; namespace EasyPostExamples { public class Examples { public static async Task Main() { var client = new EasyPost.Client(new EasyPost.ClientConfiguration("EASYPOST_API_KEY")); EasyPost.Models.API.PaymentMethod paymentMethod = await Client.ReferralCustomer.AddBankAccountFromStripe( "REFERRAL_USER_API_KEY", "fca_...", new Dictionary { { "ip_address", "127.0.0.1" }, { "user_agent", "Mozilla/5.0" }, { "accepted_at", 1722510730 } }, EasyPost.Models.API.PaymentMethod.Priority.Primary ); Console.WriteLine(JsonConvert.SerializeObject(paymentMethod, Formatting.Indented)); } } } ``` #### Node.js ```javascript const EasyPostClient = require('@easypost/api'); const client = new EasyPostClient('EASYPOST_API_KEY'); (async () => { const paymentMethod = await client.ReferralCustomer.addBankAccountFromStripe( 'REFERRAL_USER_API_KEY', 'fca_...', { ip_address: '127.0.0.1', user_agent: 'Mozilla/5.0', accepted_at: 172251073, }, 'primary', ); console.log(paymentMethod); })(); ``` #### PHP ```php referralCustomer->addBankAccountFromStripe( 'REFERRAL_USER_API_KEY', 'fca_...', [ 'ip_address' => '127.0.0.1', 'user_agent' => 'Mozilla/5.0', 'accepted_at' => 172251073, ], 'primary', ); echo $paymentMethod; ``` #### Python ```python import easypost client = easypost.EasyPostClient("EASYPOST_API_KEY") payment_method = client.referral_customer.add_bank_account_from_stripe( referral_api_key="REFERRAL_USER_API_KEY", financial_connections_id="fca_...", mandate_data={ "ip_address": "127.0.0.1", "user_agent": "Mozilla/5.0", "accepted_at": 172251073, }, priority="primary", ) print(payment_method) ``` #### Ruby ```ruby require 'easypost' client = EasyPost::Client.new(api_key: 'EASYPOST_API_KEY') payment_method = client.referral_customer.add_bank_account_from_stripe( 'REFERRAL_USER_API_KEY', 'fca_...', { ip_address: '127.0.0.1', user_agent: 'Mozilla/5.0', accepted_at: 172_251_073, }, 'primary', ) puts payment_method ``` --- ## Step 3: Fund the EasyPost Wallet `ReferralCustomer` users can deposit an initial amount into the EasyPost Wallet using EasyPost's `POST /bank_accounts/:id/charges` or `POST /credit_cards/:id/charges` to start using services immediately. [Content omitted: API request example. Review the rendered documentation for complete request payloads, parameters, and code samples.] --- ## Step 4: Configure Recharge Threshold and Recharge Amount Once a payment method is established, EasyPost can automatically charge a `recharge_amount` if a wallet balance falls below a `recharge_threshold`. To ensure uninterrupted service, platforms using the Decentralized white-label option should provide clear guidance on the recharge threshold and recharge amount system. ### Default Recharge Settings - `recharge_amount` is set to $100 - `recharge_threshold` is set to zero This means that the wallet will not automatically recharge unless the balance falls below zero. A negative balance can occur if shipment adjustments are applied due to inaccurately specified weights, dimensions, or other shipment details. ### Handling Failed Payments If a charge to the primary payment method fails, EasyPost will automatically attempt to charge the `ReferralCustomer`'s secondary payment method, if one is available. To avoid service interruptions, It is recommended that `ReferralCustomers` have both a primary and secondary payment method configured. ### Customizing Recharge Settings Forge customers can configure the `recharge_threshold`, `recharge_amount` and `secondary_recharge_amount` for a `ReferralCustomer` using EasyPost's `PATCH /users` API. These settings allow automatic maintenance of the wallet balance and prevent disruptions in service. [Content omitted: API request example. Review the rendered documentation for complete request payloads, parameters, and code samples.] --- ## ReferralCustomer Carrier Account Management Upon creation, the `ReferralCustomer` user automatically receives access to several Wallet Carrier Accounts, which are billed through the referralCustomer's wallet. To add additional carrier accounts for a `ReferralCustomer` user, one of the following options can be used: - **API Integration:** Use the Carrier Account API with the `ReferralCustomer` user's Production API Key of the sub account to integrate additional carriers. - **Forge Dashboard:** Manually add carriers through the Carriers section of the Forge Dashboard. Related: - [Carrier Management](https://support.easypost.com/hc/en-us/sections/34550349817869-Carrier-Management) --- ## ReferralCustomer Shipment Creation Creating shipments for `ReferralCustomer` users follows the same process as Parent Users, with key differences being the requirement to use the `ReferralCustomer` user's API Keys. A `Shipment Object` consists of: - A valid `to_address` and `from_address` - A `parcel` with shipping details - Any required `forms` for international deliveries Once a `shipment` is created, a `Shipment Object` is used to retrieve shipping rates and purchase a label. --- ## Additional Resources Please visit the Help Center for more information. --- Source: https://docs.easypost.com/guides/get-started-with-forge/self-managed-billing-guide # Centralized (Self-Managed Billing) Implementation Guide ## Overview The **Centralized (Self-Managed Billing)** white-label option in Forge is designed for platforms and marketplaces that want to maintain complete payment and pricing control. Under this option: - The platform controls carrier configurations. - All billing flows through the platform. - Pricing strategy remains centralized. - Sub-accounts transact under the platform's carrier accounts. For this option, the sub-account object type is the Child User. **IMPORTANT:** Before starting, review the prerequisites section of the Get Started with Forge guide to understand white-label implementations with EasyPost. --- ## Child User Setup and Management This section outlines how Child Users are created, managed, and used for shipping operations. ### Create a Child User **Production Only** Child Users are created using the Users API or through the Forge Dashboard. A Child User is a dependent account linked to a Parent User. The Child User inherits carrier configuration and billing structure while remaining under the platform's control. All billing, carrier configuration, and rate adjustments remain managed by the Parent User. Child Users can only be created in **Production** mode using the platform's API Key and the `POST /users` endpoint, or through the Forge Dashboard Sub Accounts page. Once a Child User is created, **securely store the API keys for future use.** If API keys are lost, they can be retrieved from the Sub Account Details page. ### Example: POST /users #### cURL ```shell curl -X POST https://api.easypost.com/v2/users \ -u "EASYPOST_API_KEY": \ -H 'Content-Type: application/json' \ -d '{ "user": { "name": "Child Account Name" } }' ``` #### Go ```go package example import ( "fmt" "github.com/EasyPost/easypost-go/v6" ) func create() { client := easypost.New("EASYPOST_API_KEY") userName := "Child Account Name" user, _ := client.CreateUser( &easypost.UserOptions{ Name: &userName, }, ) fmt.Println(user) } ``` #### Java ```java package users; import com.easypost.exception.EasyPostException; import com.easypost.model.User; import com.easypost.service.EasyPostClient; import java.util.HashMap; public class Create { public static void main(String[] args) throws EasyPostException { EasyPostClient client = new EasyPostClient("EASYPOST_API_KEY"); HashMap params = new HashMap(); params.put("name", "Child Account Name"); User user = client.user.create(params); System.out.println(user); } } ``` #### C# ```csharp using System; using System.Collections.Generic; using System.Threading.Tasks; using EasyPost; using Newtonsoft.Json; namespace EasyPostExamples { public class Examples { public static async Task Main() { var client = new EasyPost.Client(new EasyPost.ClientConfiguration("EASYPOST_API_KEY")); EasyPost.Parameters.User.CreateChild parameters = new() { Name = "Child Account Name", }; EasyPost.Models.API.User user = await client.User.Create(parameters); Console.WriteLine(JsonConvert.SerializeObject(user, Formatting.Indented)); } } } ``` #### Node.js ```javascript const EasyPostClient = require('@easypost/api'); const client = new EasyPostClient('EASYPOST_API_KEY'); (async () => { const user = await client.User.create({ name: 'Child Account Name', }); console.log(user); })(); ``` #### PHP ```php user->create([ 'name' => 'Child Account Name' ]); echo $child; ``` #### Python ```python import easypost client = easypost.EasyPostClient("EASYPOST_API_KEY") user = client.user.create(name="Child Account Name") print(user) ``` #### Ruby ```ruby require 'easypost' client = EasyPost::Client.new(api_key: 'EASYPOST_API_KEY') user = client.user.create( name: 'Child Account Name', ) puts user ``` Related: - [Child User Object](https://docs.easypost.com/docs/users/child-users) --- ## Child User Customer Portals Customer Portals provide EasyPost-hosted, platform-branded experiences that allow Child Users to self-manage account settings. Portal access is created using the `POST /customer_portal/account_link` endpoint. ### Onboarding Portal A co-branded, conversion-optimized flow used to collect contact information and address details for each Child User. ### Account Management Portal A customizable portal for managing carrier accounts and other account settings. ### Example: POST /customer_portal/account_link #### cURL ```shell curl -X POST https://api.easypost.com/v2/customer_portal/account_link \ -u "EASYPOST_API_KEY": \ -H 'Content-Type: application/json' \ -d '{ "session_type": "account_management", "user_id": "user_...", "refresh_url": "https://example.com/refresh", "return_url": "https://example.com/return", "metadata": {"target": "wallet"} }' ``` #### Go ```go package example import ( "fmt" "github.com/EasyPost/easypost-go/v6" ) func create() { client := easypost.New("EASYPOST_API_KEY") accountLink, _ := client.CreateCustomerPortalAccountLink( &easypost.CustomerPortalAccountLinkParameters{ SessionType: "account_management", UserID: "user_...", RefreshURL: "https://example.com/refresh", ReturnURL: "https://example.com/return", Metadata: map[string]interface{}{ "target": "wallet", }, }, ) fmt.Println(accountLink) } ``` #### Java ```java package customer_portals; import java.util.HashMap; import com.easypost.exception.EasyPostException; import com.easypost.model.CustomerPortalAccountLink; import com.easypost.service.EasyPostClient; public class Create { public static void main(String[] args) throws EasyPostException { EasyPostClient client = new EasyPostClient("EASYPOST_API_KEY"); HashMap params = new HashMap<>(); params.put("session_type", "account_management"); params.put("user_id", "user_..."); params.put("refresh_url", "https://example.com/refresh"); params.put("return_url", "https://example.com/return"); HashMap metadata = new HashMap<>(); metadata.put("target", "wallet"); params.put("metadata", metadata); CustomerPortalAccountLink accountLink = client.customerPortal.createAccountLink(params); System.out.println(accountLink); } } ``` #### C# ```csharp using System; using System.Threading.Tasks; using EasyPost; using Newtonsoft.Json; namespace EasyPostExamples { public class Examples { public static async Task Main() { var client = new EasyPost.Client(new EasyPost.ClientConfiguration("EASYPOST_API_KEY")); EasyPost.Parameters.CustomerPortal.CreateAccountLink parameters = new() { SessionType = "account_management", UserId = "user_...", RefreshUrl = "https://example.com/refresh", ReturnUrl = "https://example.com/return", Metadata = new System.Collections.Generic.Dictionary { { "target", "wallet" } } }; EasyPost.Models.API.CustomerPortal.AccountLink accountLink = await client.CustomerPortal.CreateAccountLink(parameters); Console.WriteLine(JsonConvert.SerializeObject(accountLink, Formatting.Indented)); } } } ``` #### Node.js ```javascript const EasyPostClient = require('@easypost/api'); const client = new EasyPostClient('EASYPOST_API_KEY'); (async () => { const accountLink = await client.CustomerPortal.createAccountLink({ session_type: 'account_management', user_id: 'user_...', refresh_url: 'https://example.com/refresh', return_url: 'https://example.com/return', metadata: { target: 'wallet' }, }); console.log(accountLink); })(); ``` #### PHP ```php customerPortal->createAccountLink([ 'session_type' => 'account_management', 'user_id' => 'user_...', 'refresh_url' => 'https://example.com/refresh', 'return_url' => 'https://example.com/return', 'metadata' => ['target' => 'wallet'], ]); echo $accountLink; ``` #### Python ```python import easypost client = easypost.EasyPostClient("EASYPOST_API_KEY") account_link = client.customer_portal.create_account_link( session_type="account_management", user_id="user_...", refresh_url="https://example.com/refresh", return_url="https://example.com/return", metadata={"target": "wallet"}, ) print(account_link) ``` #### Ruby ```ruby require 'easypost' client = EasyPost::Client.new(api_key: 'EASYPOST_API_KEY') account_link = client.customer_portal.create_account_link( { session_type: 'account_management', user_id: 'user_...', refresh_url: 'https://example.com/refresh', return_url: 'https://example.com/return', metadata: { target: 'wallet' }, }, ) puts account_link ``` --- ## Child User Carrier Account Management Upon creation, a Child User automatically inherits: - The Parent User's USPS account - Select Wallet Carrier Accounts These accounts are billed through the platform's wallet. > Note: Child Users do not maintain independent carrier billing relationships in the Centralized option. Carrier charges flow through the Parent User's Wallet and billing methods. Additional carriers may be added by: - Using the Carrier Account API with the Child User's Production API key. - Add carriers manually through the Forge Dashboard. - Enabling carrier account management through the Customer Portal using the `POST /customer_portal/account_link` endpoint. For more information, visit **Carrier Management** within the Forge section of the Help Center. Related: - [Forge Carrier Management](https://support.easypost.com/hc/en-us/sections/34550349817869-Carrier-Management) --- ## Child User Shipment Creation Shipment creation for Child Users follows the same process as shipment creaiton for Parent Users. **The Child User's API Keys must be used**. A shipment object consists of: - A valid `to_address` and `from_address` - A `parcel` with shipping details - Any required `forms` for international deliveries Once a `shipment` is created, a shipment object is used to retrieve shipping `rates` and purchase a label. Related: - [Shipments](https://docs.easypost.com/docs/shipments) --- ## Child User Billing Management All postage, insurance fees, and carrier adjustment charges generated by Child Users are billed to the Parent User's Wallet and billing methods. This structure enables: - Centralized pricing strategy - Controlled margin management - Simplified reconciliation All activity is tracked to each individual Child User, simplifying financial reporting and reconciliation for the marketplace or platform. Billing settings can be managed through the Forge Billing Page or via API. Related: - [Forge Billing](https://app.easypost.com/forge/billing) - [Billing](https://docs.easypost.com/docs/users/billing) --- ## FlexRate (Rate Adjustments) Forge FlexRate allows platform administrators to apply percentage-based or fixed-amount adjustments to carrier rates displayed to Child Users. This feature supports transactional revenue generation and pricing flexibility without requiring custom code or manual rate manipulation. When enabled, rate adjustments are returned in the `adjusted_rate` field in the API response. The underlying rate object remains unchanged in the response. The `adjusted_rate` field is included in addition to the original carrier rate. Adjustments can be configured: - Globally (Standard FlexRate) - By carrier and service level - By shipment attributes such as weight, zone, and surcharge type Supported evaluation models include: - Standard (single-rule) - Hierarchical (precedence-based) - Cumulative (additive). Sub Account Groups can be used in combination with FlexRate to segment pricing strategies across cohorts of Child Users. For detailed configuration guidance, see the Forge FlexRate article in the Help Center. Related: - [Forge FlexRate](https://support.easypost.com/hc/en-us/articles/40687325316237-Forge-FlexRate-Rate-Adjustments) --- ## Advanced Shipping Forge Advanced Shipping allows Child Users to access a white-labeled shipping interface for purchasing labels, viewing rates, and managing shipments. When Advanced Shipping is used with the Centralized (Self-Managed Billing) option, displayed shipping rates reflect any pricing adjustments configured through Forge FlexRate. Advanced Shipping provides an EasyPost-hosted interface powered by ShipBlink while maintaining the platform's self-managed billing and carrier configuration. For setup instructions and configuration details, see the Forge Advanced Shipping article in the Help Center. Related: - [Forge Advanced Shipping](https://support.easypost.com/hc/en-us/articles/44018208194829-Forge-Advanced-Shipping) --- ## Additional Resources Please visit the Help Center for more information. --- Source: https://docs.easypost.com/guides/get-started-with-forge # Get Started with Forge ## Overview This guide outlines essential steps for setting up Forge, including prerequisites, implementation options, and account onboarding. --- ## Prerequisites Before integrating Forge, complete the following steps: 1. **Account Registration:** Contact the EasyPost Sales Team to complete account registration. 2. **Carrier Account Registration:** Upon signing up with Forge, Wallet Carrier Accounts are available and can be enabled directly from the Dashboard. For additional carriers, the Bring Your Own Account (BYOA) option allows direct carrier integration. 3. **Software Requirements:** Download an EasyPost Client Library or utilize the REST API with cURL. 4. **Documentation Review:** Review the following EasyPost resources: 1. EasyPost Objects to understand the API structure, which is critical for constructing requests and interpreting responses. 2. EasyPost API offerings to determine the shipping features to integrate, including shipping label generation, parcel insurance, tracking, scheduled pick-ups, and address verification. Additional tools such as report generation and the Shipping UI Tutorial, are also available. Related: - [100+ Carriers, One Integration](https://www.easypost.com/carriers) --- ## Choose an Implementation Option Forge supports two implementation options that determine how shipping activity and billing are handled. Each implementation type determines the sub-account structure and onboarding process. ### Centralized (Self-Managed Billing) - The platform manages carrier accounts, billing, and pricing strategy. - Sub-accounts operate as Child Users, and all shipping charges flow through the platform's billing infrastructure. - Apply pricing adjustments using FlexRate and maintain full control over shipping costs. Refer to the Centralized (Self-Managed Billing) Implementation Guide for onboarding instructions. ### Decentralized (EasyPost-Managed Billing) - Each sub-account manages its own Wallet, carrier connections, and billing. - Sub-accounts operate as ReferralCustomer users, reducing financial risk for the platform while allowing customers to manage their own shipping activity. Refer to the Decentralized (EasyPost-Managed Billing) Implementation Guide for onboarding instructions. Related: - [Centralized (Self-Managed Billing)](https://docs.easypost.com/guides/get-started-with-forge/self-managed-billing-guide) - [Decentralized (EasyPost-Managed Billing)](https://docs.easypost.com/guides/get-started-with-forge/easypost-managed-billing-guide) --- ## Manage Sub-Accounts Forge supports three account management options for sub-accounts: ### Customer Portals (Recommended) - **Onboarding**: Sub accounts complete a conversion-optimized, co-branded onboarding process within an EasyPost-hosted environment. - **Account Management**: Sub accounts access a co-branded, EasyPost-hosted dashboard configured based on Forge platform settings. ### Custom API Integrations Build a fully customized onboarding and account management experience using EasyPost's APIs. ### No-Code Administration Manually create, onboard, and manage sub accounts directly through the Forge Dashboard. > Note: EasyPost recommends the Customer Portals method for onboarding and account management. This option automatically adapts to changing requirements and is configurable within the Forge Dashboard. --- ## Next Steps After selecting an implementation type, follow the corresponding integration guide: - Centralized (Self-Managed Billing) Guide - Decentralized (EasyPost-Managed Billing) Guide Related: - [Centralized (Self-Managed Billing)](https://docs.easypost.com/guides/get-started-with-forge/self-managed-billing-guide) - [Decentralized (EasyPost-Managed Billing)](https://docs.easypost.com/guides/get-started-with-forge/easypost-managed-billing-guide) --- ## Additional Resources Please visit the Help Center for more information. --- Source: https://docs.easypost.com/guides/getting-started # Getting Started with EasyPost Core This guide provides retailers and brands with a step-by-step process for shipping their first package using the EasyPost Core API Suite, outlining the necessary steps from setup to label generation. For alternative solutions: - **Forge (White-Label Solution):** Designed for marketplaces, platforms, and other technology businesses. Refer to the White Label API Guides for more information. - **EasyPost Enterprise API Guides:** Contact us for access. --- ## Prerequisites ### Account Registration Sign up for an EasyPost account to obtain a **Test** and **Production** API key. See Authentication and Key Management for more information. > Note: Negotiated rates are only available in Production mode. ### Carrier Account Registration Upon sign-up with EasyPost, users gain immediate access to Wallet Carrier Accounts, which can be enabled directly from the Dashboard. For additional carriers, EasyPost supports a Bring Your Own Carrier Account (BYOCA) option. This requires users to register directly with the respective carrier. ### Software Requirements Download an EasyPost Client Library or utilize the REST API with cURL. ### Documentation Review Examine the EasyPost Objects section to understand the API's structure, which is critical for constructing requests and interpreting responses. Related: - [EasyPost Objects](https://docs.easypost.com/docs/easypost-objects) - [Manage Carrier Accounts](https://app.easypost.com/account/settings?tab=carriers) --- ## Shipping Process ### Step 1: Create a Shipment and Retrieve Rates To create and rate a shipment, the API allows the `to_address`, `from_address`, and `parcel` objects nested within the shipment object to be defined. These objects do not need to be pre-created; they are created during the shipment creation process. Set parcel `weight` in ounces (oz). Pass `line_items` on that same shipment when EasyPost should file USPS Claims without asking for product value later. Each item needs `total_line_value` and `item_description`. `line_items` are claims-only: they are not sent to the carrier and are not returned on the Shipment. If the shipment already includes a customs form, EasyPost uses the CustomsItem `value` amounts instead. Additionally, insurance may be added during the purchase. To specify an amount to insure, pass the insurance attribute as a string. The currency of all insurance is U.S. Dollars (USD). **Add more carriers to the EasyPost Dashboard to receive rates beyond the default USPS options!** ### Example: POST /shipments #### cURL ```shell curl -X POST https://api.easypost.com/v2/shipments \ -u "EASYPOST_API_KEY": \ -H 'Content-Type: application/json' \ -d '{ "shipment": { "to_address": { "name": "Dr. Steve Brule", "street1": "179 N Harbor Dr", "city": "Redondo Beach", "state": "CA", "zip": "90277", "country": "US", "phone": "8573875756", "email": "dr_steve_brule@gmail.com" }, "from_address": { "name": "EasyPost", "street1": "417 Montgomery Street", "street2": "5th Floor", "city": "San Francisco", "state": "CA", "zip": "94104", "country": "US", "phone": "4153334445", "email": "support@easypost.com" }, "parcel": { "length": "20.2", "width": "10.9", "height": "5", "weight": "65.9" }, "line_items": [ { "total_line_value": "129.00", "item_description": "Mugs" }, { "total_line_value": "45.50", "item_description": "T-shirts" } ] } }' ``` #### Go ```go package example import ( "fmt" "github.com/EasyPost/easypost-go/v6" ) func create() { client := easypost.New("EASYPOST_API_KEY") shipment, _ := client.CreateShipment( &easypost.Shipment{ ToAddress: &easypost.Address{ Name: "Dr. Steve Brule", Street1: "179 N Harbor Dr", City: "Redondo Beach", State: "CA", Zip: "90277", Country: "US", Phone: "4155559999", Email: "dr_steve_brule@gmail.com", }, FromAddress: &easypost.Address{ Name: "EasyPost", Street1: "417 Montgomery Street", Street2: "5th Floor", City: "San Francisco", State: "CA", Zip: "90277", Country: "US", Phone: "4155559999", Email: "support@easypost.com", }, Parcel: &easypost.Parcel{ Length: 20.2, Width: 10.9, Height: 5, Weight: 65.9, }, LineItems: []*easypost.LineItem{ { TotalLineValue: "129.00", ItemDescription: "Mugs", }, { TotalLineValue: "45.50", ItemDescription: "T-shirts", }, }, }, ) fmt.Println(shipment) } ``` #### Java ```java package shipments; import com.easypost.exception.EasyPostException; import com.easypost.model.Shipment; import com.easypost.service.EasyPostClient; import java.util.ArrayList; import java.util.HashMap; import java.util.List; public class Create { public static void main(String[] args) throws EasyPostException { EasyPostClient client = new EasyPostClient("EASYPOST_API_KEY"); HashMap toAddressMap = new HashMap(); toAddressMap.put("name", "Dr. Steve Brule"); toAddressMap.put("street1", "179 N Harbor Dr"); toAddressMap.put("city", "Redondo Beach"); toAddressMap.put("state", "CA"); toAddressMap.put("country", "US"); toAddressMap.put("phone", "8573875756"); toAddressMap.put("email", "dr_steve_brule@gmail.com"); toAddressMap.put("zip", "90277"); HashMap fromAddressMap = new HashMap(); fromAddressMap.put("name", "EasyPost"); fromAddressMap.put("street1", "417 Montgomery Street"); fromAddressMap.put("street2", "5th Floor"); fromAddressMap.put("city", "San Francisco"); fromAddressMap.put("state", "CA"); fromAddressMap.put("zip", "94104"); fromAddressMap.put("country", "US"); fromAddressMap.put("phone", "4153334445"); fromAddressMap.put("email", "support@easypost.com"); HashMap parcelMap = new HashMap(); parcelMap.put("length", 20.2); parcelMap.put("width", 10.9); parcelMap.put("height", 5); parcelMap.put("weight", 65.9); HashMap mugLineItem = new HashMap(); mugLineItem.put("total_line_value", "129.00"); mugLineItem.put("item_description", "Mugs"); HashMap shirtLineItem = new HashMap(); shirtLineItem.put("total_line_value", "45.50"); shirtLineItem.put("item_description", "T-shirts"); List> lineItems = new ArrayList>(); lineItems.add(mugLineItem); lineItems.add(shirtLineItem); HashMap params = new HashMap(); params.put("to_address", toAddressMap); params.put("from_address", fromAddressMap); params.put("parcel", parcelMap); params.put("line_items", lineItems); Shipment shipment = client.shipment.create(params); System.out.println(shipment); } } ``` #### C# ```csharp using System; using System.Collections.Generic; using System.Threading.Tasks; using EasyPost; using Newtonsoft.Json; namespace EasyPostExamples { public class Examples { public static async Task Main() { var client = new EasyPost.Client(new EasyPost.ClientConfiguration("EASYPOST_API_KEY")); // Create a shipment using all data in one API call EasyPost.Parameters.Shipment.Create parameters = new() { ToAddress = new EasyPost.Parameters.Address.Create { Name = "Dr. Steve Brule", Street1 = "417 Montgomery Street", Street2 = "5th Floor", City = "San Francisco", State = "CA", Country = "US", Zip = "94104" }, FromAddress = new EasyPost.Parameters.Address.Create { Company = "EasyPost", Street1 = "417 Montgomery Street", Street2 = "Floor 5", City = "San Francisco", State = "CA", Country = "US", Zip = "94104" }, Parcel = new EasyPost.Parameters.Parcel.Create { Length = 8, Width = 6, Height = 5, Weight = 10 }, LineItems = new List { new EasyPost.Models.API.LineItem { TotalLineValue = "129.00", ItemDescription = "Mugs" }, new EasyPost.Models.API.LineItem { TotalLineValue = "45.50", ItemDescription = "T-shirts" }, } }; EasyPost.Models.API.Shipment shipment = await client.Shipment.Create(parameters); Console.WriteLine(JsonConvert.SerializeObject(shipment, Formatting.Indented)); // Create a shipment using existing addresses and parcel EasyPost.Models.API.Address toAddress = await client.Address.Retrieve("adr_..."); EasyPost.Models.API.Address fromAddress = await client.Address.Retrieve("adr_..."); EasyPost.Models.API.Parcel parcel = await client.Parcel.Retrieve("prcl_..."); parameters = new() { ToAddress = toAddress, FromAddress = fromAddress, Parcel = parcel, LineItems = new List { new EasyPost.Models.API.LineItem { TotalLineValue = "129.00", ItemDescription = "Mugs" }, new EasyPost.Models.API.LineItem { TotalLineValue = "45.50", ItemDescription = "T-shirts" }, } }; shipment = await client.Shipment.Create(parameters); Console.WriteLine(JsonConvert.SerializeObject(shipmentWithIds, Formatting.Indented)); } } } ``` #### Node.js ```javascript const EasyPostClient = require('@easypost/api'); const client = new EasyPostClient('EASYPOST_API_KEY'); (async () => { let shipment; shipment = await client.Shipment.create({ to_address: { name: 'Dr. Steve Brule', street1: '179 N Harbor Dr', city: 'Redondo Beach', state: 'CA', zip: '90277', country: 'US', email: 'dr_steve_brule@gmail.com', phone: '4155559999', }, from_address: { street1: '417 montgomery street', street2: 'FL 5', city: 'San Francisco', state: 'CA', zip: '94104', country: 'US', company: 'EasyPost', phone: '415-123-4567', }, parcel: { length: 20.2, width: 10.9, height: 5, weight: 65.9, }, line_items: [ { total_line_value: '129.00', item_description: 'Mugs', }, { total_line_value: '45.50', item_description: 'T-shirts', }, ], }); // or create by using IDs shipment = await client.Shipment.create({ to_address: { id: 'adr_...' }, from_address: { id: 'adr_...' }, parcel: { id: 'prcl_...' }, line_items: [ { total_line_value: '129.00', item_description: 'Mugs', }, { total_line_value: '45.50', item_description: 'T-shirts', }, ], }); console.log(shipment); })(); ``` #### PHP ```php shipment->create([ 'to_address' => [ 'name' => 'Dr. Steve Brule', 'street1' => '179 N Harbor Dr', 'city' => 'Redondo Beach', 'state' => 'CA', 'zip' => '90277', 'country' => 'US', 'phone' => '3331114444', 'email' => 'dr_steve_brule@gmail.com' ], 'from_address' => [ 'name' => 'EasyPost', 'street1' => '417 Montgomery Street', 'street2' => '5th Floor', 'city' => 'San Francisco', 'state' => 'CA', 'zip' => '94104', 'country' => 'US', 'phone' => '3331114444', 'email' => 'support@easypost.com' ], 'parcel' => [ 'length' => 20.2, 'width' => 10.9, 'height' => 5, 'weight' => 65.9 ], 'line_items' => [ [ 'total_line_value' => '129.00', 'item_description' => 'Mugs' ], [ 'total_line_value' => '45.50', 'item_description' => 'T-shirts' ] ] ]); echo $shipment; ``` #### Python ```python import easypost client = easypost.EasyPostClient("EASYPOST_API_KEY") shipment = client.shipment.create( to_address={ "name": "Dr. Steve Brule", "street1": "179 N Harbor Dr", "city": "Redondo Beach", "state": "CA", "zip": "90277", "country": "US", "phone": "4153334444", "email": "dr_steve_brule@gmail.com", }, from_address={ "name": "EasyPost", "street1": "417 Montgomery Street", "street2": "5th Floor", "city": "San Francisco", "state": "CA", "zip": "94104", "country": "US", "phone": "4153334444", "email": "support@easypost.com", }, parcel={ "length": 20.2, "width": 10.9, "height": 5, "weight": 65.9, }, line_items=[ { "total_line_value": "129.00", "item_description": "Mugs", }, { "total_line_value": "45.50", "item_description": "T-shirts", }, ], ) # or create by using IDs shipment = client.shipment.create( to_address={"id": "adr_..."}, from_address={"id": "adr_..."}, parcel={"id": "prcl_..."}, line_items=[ { "total_line_value": "129.00", "item_description": "Mugs", }, { "total_line_value": "45.50", "item_description": "T-shirts", }, ], ) print(shipment) ``` #### Ruby ```ruby require 'easypost' client = EasyPost::Client.new(api_key: 'EASYPOST_API_KEY') shipment = client.shipment.create( to_address: { name: 'Dr. Steve Brule', street1: '179 N Harbor Dr', city: 'Redondo Beach', state: 'CA', zip: '90277', country: 'US', phone: '4155559999', email: 'dr_steve_brule@gmail.com', }, from_address: { name: 'EasyPost', street1: '417 Montgomery Street', street2: '5th Floor', city: 'San Francisco', state: 'CA', zip: '94104', country: 'US', phone: '4153334445', email: 'support@easypost.com', }, parcel: { length: 20.2, width: 10.9, height: 5, weight: 65.9, }, line_items: [ { total_line_value: '129.00', item_description: 'Mugs', }, { total_line_value: '45.50', item_description: 'T-shirts', }, ], ) puts shipment ``` Related: - [Create a Shipment](https://docs.easypost.com/docs/shipments#create-a-shipment) - [Rates Object](https://docs.easypost.com/docs/shipments/rates) --- ### Step 2: Buy and Generate a Shipping Label Buying and generating a shipping label involves selecting a shipping rate, purchasing the label, and retrieving it for printing. #### Label Purchase - In client libraries, use the `buy` method on the `Shipment` object and pass the `id` of the chosen rate. - For REST API users, **POST** the chosen rate `id` to the shipment resource. - Client libraries have convenience functions for automatically selecting the lowest available rate every time. #### Label Retrieval - After purchasing the label, a URL for the label image is provided for download and printing. - This URL is located in the `postage_label.label_url` property of the `Shipment` object. - Labels are typically in PNG format, but other formats can be requested. #### Tracker ID Management - The response from EasyPost includes a tracking `id` for the package. See the Tracking Guide for additional information. - This tracker `id` can be used for internal storage or provided to customers for tracking. - EasyPost also offers automatic tracking updates through webhooks. ### Example: POST /shipments/:id/buy #### cURL ```shell curl -X POST https://api.easypost.com/v2/shipments \ -u "EASYPOST_API_KEY": \ -H 'Content-Type: application/json' \ -d '{ "shipment": { "to_address": { "name": "Dr. Steve Brule", "street1": "179 N Harbor Dr", "city": "Redondo Beach", "state": "CA", "zip": "90277", "country": "US", "phone": "8573875756", "email": "dr_steve_brule@gmail.com" }, "from_address": { "name": "EasyPost", "street1": "417 Montgomery Street", "street2": "5th Floor", "city": "San Francisco", "state": "CA", "zip": "94104", "country": "US", "phone": "4153334445", "email": "support@easypost.com" }, "parcel": { "length": "20.2", "width": "10.9", "height": "5", "weight": "65.9" }, "line_items": [ { "total_line_value": "129.00", "item_description": "Mugs" }, { "total_line_value": "45.50", "item_description": "T-shirts" } ] } }' ``` #### Go ```go package example import ( "fmt" "github.com/EasyPost/easypost-go/v6" ) func create() { client := easypost.New("EASYPOST_API_KEY") shipment, _ := client.CreateShipment( &easypost.Shipment{ ToAddress: &easypost.Address{ Name: "Dr. Steve Brule", Street1: "179 N Harbor Dr", City: "Redondo Beach", State: "CA", Zip: "90277", Country: "US", Phone: "4155559999", Email: "dr_steve_brule@gmail.com", }, FromAddress: &easypost.Address{ Name: "EasyPost", Street1: "417 Montgomery Street", Street2: "5th Floor", City: "San Francisco", State: "CA", Zip: "90277", Country: "US", Phone: "4155559999", Email: "support@easypost.com", }, Parcel: &easypost.Parcel{ Length: 20.2, Width: 10.9, Height: 5, Weight: 65.9, }, LineItems: []*easypost.LineItem{ { TotalLineValue: "129.00", ItemDescription: "Mugs", }, { TotalLineValue: "45.50", ItemDescription: "T-shirts", }, }, }, ) fmt.Println(shipment) } ``` #### Java ```java package shipments; import com.easypost.exception.EasyPostException; import com.easypost.model.Shipment; import com.easypost.service.EasyPostClient; import java.util.ArrayList; import java.util.HashMap; import java.util.List; public class Create { public static void main(String[] args) throws EasyPostException { EasyPostClient client = new EasyPostClient("EASYPOST_API_KEY"); HashMap toAddressMap = new HashMap(); toAddressMap.put("name", "Dr. Steve Brule"); toAddressMap.put("street1", "179 N Harbor Dr"); toAddressMap.put("city", "Redondo Beach"); toAddressMap.put("state", "CA"); toAddressMap.put("country", "US"); toAddressMap.put("phone", "8573875756"); toAddressMap.put("email", "dr_steve_brule@gmail.com"); toAddressMap.put("zip", "90277"); HashMap fromAddressMap = new HashMap(); fromAddressMap.put("name", "EasyPost"); fromAddressMap.put("street1", "417 Montgomery Street"); fromAddressMap.put("street2", "5th Floor"); fromAddressMap.put("city", "San Francisco"); fromAddressMap.put("state", "CA"); fromAddressMap.put("zip", "94104"); fromAddressMap.put("country", "US"); fromAddressMap.put("phone", "4153334445"); fromAddressMap.put("email", "support@easypost.com"); HashMap parcelMap = new HashMap(); parcelMap.put("length", 20.2); parcelMap.put("width", 10.9); parcelMap.put("height", 5); parcelMap.put("weight", 65.9); HashMap mugLineItem = new HashMap(); mugLineItem.put("total_line_value", "129.00"); mugLineItem.put("item_description", "Mugs"); HashMap shirtLineItem = new HashMap(); shirtLineItem.put("total_line_value", "45.50"); shirtLineItem.put("item_description", "T-shirts"); List> lineItems = new ArrayList>(); lineItems.add(mugLineItem); lineItems.add(shirtLineItem); HashMap params = new HashMap(); params.put("to_address", toAddressMap); params.put("from_address", fromAddressMap); params.put("parcel", parcelMap); params.put("line_items", lineItems); Shipment shipment = client.shipment.create(params); System.out.println(shipment); } } ``` #### C# ```csharp using System; using System.Collections.Generic; using System.Threading.Tasks; using EasyPost; using Newtonsoft.Json; namespace EasyPostExamples { public class Examples { public static async Task Main() { var client = new EasyPost.Client(new EasyPost.ClientConfiguration("EASYPOST_API_KEY")); // Create a shipment using all data in one API call EasyPost.Parameters.Shipment.Create parameters = new() { ToAddress = new EasyPost.Parameters.Address.Create { Name = "Dr. Steve Brule", Street1 = "417 Montgomery Street", Street2 = "5th Floor", City = "San Francisco", State = "CA", Country = "US", Zip = "94104" }, FromAddress = new EasyPost.Parameters.Address.Create { Company = "EasyPost", Street1 = "417 Montgomery Street", Street2 = "Floor 5", City = "San Francisco", State = "CA", Country = "US", Zip = "94104" }, Parcel = new EasyPost.Parameters.Parcel.Create { Length = 8, Width = 6, Height = 5, Weight = 10 }, LineItems = new List { new EasyPost.Models.API.LineItem { TotalLineValue = "129.00", ItemDescription = "Mugs" }, new EasyPost.Models.API.LineItem { TotalLineValue = "45.50", ItemDescription = "T-shirts" }, } }; EasyPost.Models.API.Shipment shipment = await client.Shipment.Create(parameters); Console.WriteLine(JsonConvert.SerializeObject(shipment, Formatting.Indented)); // Create a shipment using existing addresses and parcel EasyPost.Models.API.Address toAddress = await client.Address.Retrieve("adr_..."); EasyPost.Models.API.Address fromAddress = await client.Address.Retrieve("adr_..."); EasyPost.Models.API.Parcel parcel = await client.Parcel.Retrieve("prcl_..."); parameters = new() { ToAddress = toAddress, FromAddress = fromAddress, Parcel = parcel, LineItems = new List { new EasyPost.Models.API.LineItem { TotalLineValue = "129.00", ItemDescription = "Mugs" }, new EasyPost.Models.API.LineItem { TotalLineValue = "45.50", ItemDescription = "T-shirts" }, } }; shipment = await client.Shipment.Create(parameters); Console.WriteLine(JsonConvert.SerializeObject(shipmentWithIds, Formatting.Indented)); } } } ``` #### Node.js ```javascript const EasyPostClient = require('@easypost/api'); const client = new EasyPostClient('EASYPOST_API_KEY'); (async () => { let shipment; shipment = await client.Shipment.create({ to_address: { name: 'Dr. Steve Brule', street1: '179 N Harbor Dr', city: 'Redondo Beach', state: 'CA', zip: '90277', country: 'US', email: 'dr_steve_brule@gmail.com', phone: '4155559999', }, from_address: { street1: '417 montgomery street', street2: 'FL 5', city: 'San Francisco', state: 'CA', zip: '94104', country: 'US', company: 'EasyPost', phone: '415-123-4567', }, parcel: { length: 20.2, width: 10.9, height: 5, weight: 65.9, }, line_items: [ { total_line_value: '129.00', item_description: 'Mugs', }, { total_line_value: '45.50', item_description: 'T-shirts', }, ], }); // or create by using IDs shipment = await client.Shipment.create({ to_address: { id: 'adr_...' }, from_address: { id: 'adr_...' }, parcel: { id: 'prcl_...' }, line_items: [ { total_line_value: '129.00', item_description: 'Mugs', }, { total_line_value: '45.50', item_description: 'T-shirts', }, ], }); console.log(shipment); })(); ``` #### PHP ```php shipment->create([ 'to_address' => [ 'name' => 'Dr. Steve Brule', 'street1' => '179 N Harbor Dr', 'city' => 'Redondo Beach', 'state' => 'CA', 'zip' => '90277', 'country' => 'US', 'phone' => '3331114444', 'email' => 'dr_steve_brule@gmail.com' ], 'from_address' => [ 'name' => 'EasyPost', 'street1' => '417 Montgomery Street', 'street2' => '5th Floor', 'city' => 'San Francisco', 'state' => 'CA', 'zip' => '94104', 'country' => 'US', 'phone' => '3331114444', 'email' => 'support@easypost.com' ], 'parcel' => [ 'length' => 20.2, 'width' => 10.9, 'height' => 5, 'weight' => 65.9 ], 'line_items' => [ [ 'total_line_value' => '129.00', 'item_description' => 'Mugs' ], [ 'total_line_value' => '45.50', 'item_description' => 'T-shirts' ] ] ]); echo $shipment; ``` #### Python ```python import easypost client = easypost.EasyPostClient("EASYPOST_API_KEY") shipment = client.shipment.create( to_address={ "name": "Dr. Steve Brule", "street1": "179 N Harbor Dr", "city": "Redondo Beach", "state": "CA", "zip": "90277", "country": "US", "phone": "4153334444", "email": "dr_steve_brule@gmail.com", }, from_address={ "name": "EasyPost", "street1": "417 Montgomery Street", "street2": "5th Floor", "city": "San Francisco", "state": "CA", "zip": "94104", "country": "US", "phone": "4153334444", "email": "support@easypost.com", }, parcel={ "length": 20.2, "width": 10.9, "height": 5, "weight": 65.9, }, line_items=[ { "total_line_value": "129.00", "item_description": "Mugs", }, { "total_line_value": "45.50", "item_description": "T-shirts", }, ], ) # or create by using IDs shipment = client.shipment.create( to_address={"id": "adr_..."}, from_address={"id": "adr_..."}, parcel={"id": "prcl_..."}, line_items=[ { "total_line_value": "129.00", "item_description": "Mugs", }, { "total_line_value": "45.50", "item_description": "T-shirts", }, ], ) print(shipment) ``` #### Ruby ```ruby require 'easypost' client = EasyPost::Client.new(api_key: 'EASYPOST_API_KEY') shipment = client.shipment.create( to_address: { name: 'Dr. Steve Brule', street1: '179 N Harbor Dr', city: 'Redondo Beach', state: 'CA', zip: '90277', country: 'US', phone: '4155559999', email: 'dr_steve_brule@gmail.com', }, from_address: { name: 'EasyPost', street1: '417 Montgomery Street', street2: '5th Floor', city: 'San Francisco', state: 'CA', zip: '94104', country: 'US', phone: '4153334445', email: 'support@easypost.com', }, parcel: { length: 20.2, width: 10.9, height: 5, weight: 65.9, }, line_items: [ { total_line_value: '129.00', item_description: 'Mugs', }, { total_line_value: '45.50', item_description: 'T-shirts', }, ], ) puts shipment ``` Related: - [Tracking Guide](https://docs.easypost.com/guides/tracking-guide) - [Webhooks](https://docs.easypost.com/guides/webhooks-guide) --- ## Additional Resources ### Support and Troubleshooting EasyPost offers support to assist with FAQs, troubleshooting issues, and inquiries related to the EasyPost platform. Please visit the Help Center for more information. Related: - [Carrier Metadata](https://docs.easypost.com/docs/carrier-metadata) - [Help Center](https://support.easypost.com/hc/en-us) --- ## Talk to a Shipping Expert For questions about getting started with the EasyPost API please talk to a Shipping Expert or Contact Support. Related: - [Talk to a Shipping Expert](https://www.easypost.com/talk-to-easypost) - [Contact Support](https://support.easypost.com/hc/requests/new) --- Source: https://docs.easypost.com/guides/how-forge-works # How Forge Works ## Overview Forge provides a white-label shipping solution that enables marketplaces, software platforms, and logistics providers to embed multi-carrier shipping capabilities directly into their products. Forge connects platform applications, customer accounts, carriers, and EasyPost's shipping infrastructure to create a configurable shipping ecosystem. Platforms can control how shipping services are offered, how pricing is applied, and how customer accounts are managed. --- ## Key Features Forge provides a set of platform capabilities for managing shipping services at scale. ### Sub-Account Management Create and manage customer environments using sub-accounts. Platforms can configure sub-accounts using either Centralized (Self-Managed Billing) or Decentralized (EasyPost-Managed Billing) options. ### Multi-Carrier Shipping Access EasyPost's network of 100+ carriers through a single integration for label generation, tracking, and shipping operations. ### Pricing and Rate Control Configure pricing strategies using Forge FlexRate, which allows platforms to apply percentage-based or fixed adjustments to carrier rates returned to sub-accounts. ### Advanced Shipping Provide sub-accounts access to Advanced Shipping, a white-labeled shipping interface for purchasing labels and managing shipments. ### Analytics and Reporting Monitor shipping activity, operational performance, and financial metrics using Forge Analytics and Reporting tools. ### Reliable Infrastructure Forge leverages EasyPost's API platform, providing 99.99% uptime and scalable infrastructure. Related: - [Centralized (Self-Managed Billing)](https://docs.easypost.com/guides/get-started-with-forge/self-managed-billing-guide) - [Decentralized (EasyPost-Managed Billing)](https://docs.easypost.com/guides/get-started-with-forge/easypost-managed-billing-guide) --- ## Forge Integration Components A Forge integration consists of five main components: 1. **Platform Application:** A web or mobile application that interacts with Forge. 2. **Forge Account:** The platform's Forge account for managing sub-accounts, carriers, and billing. 3. **Customer Accounts:** Sub-accounts that represent businesses or end users accessing shipping services. 4. **Carriers:** Shipping providers available within Forge, including: 1. **Wallet Carriers:** Carriers integrated through EasyPost's network. 2. **Bring Your Own Carrier Account (BYOCA):** Custom carriers added by the platform. 5. **Billing & Payments:** The financial infrastructure managing postage costs, fees, and transactions within Forge. ![Forge Sub Account Management Offering](https://docs.easypost.com/images/forge-sub-account-offering.png) --- ## Sub-Account Management Options Forge allows platforms to manage customer accounts using either APIs or EasyPost-hosted tools. ### API Management Create and monitor sub-accounts via API, then use their API keys to make requests on their behalf. ### Forge Dashboard Manage sub-accounts through the Forge Dashboard and enable shipping services as needed. Related: - [Forge Sub Accounts](https://support.easypost.com/hc/en-us/articles/34368556417933-Forge-Sub-Accounts) - [Forge Sub Account Groups](https://support.easypost.com/hc/en-us/articles/44013451608717-Forge-Sub-Account-Groups) --- ## Implementation Options ### Centralized (Self-Managed Billing) The platform manages carrier accounts, billing, and pricing strategy. Shipping activity is billed through the platform's Wallet. Sub-accounts in this option are created as Child User accounts. ### Decentralized (EasyPost-Managed Billing) Each sub-account manages its own EasyPost Wallet. EasyPost processes carrier charges and shipping fees directly through the sub-account's wallet, reducing financial risk for the platform. Sub-accounts in this option are created as ReferralCustomer users. Related: - [Centralized (Self-Managed Billing)](https://docs.easypost.com/guides/get-started-with-forge/self-managed-billing-guide) - [Decentralized (EasyPost-Managed Billing)](https://docs.easypost.com/guides/get-started-with-forge/easypost-managed-billing-guide) --- ## Use Cases Forge is designed to support a variety of B2B industries, including: - **SaaS Platforms:** Web and mobile application providers embedding shipping capabilities within their products. - **Marketplaces:** Platforms enabling sellers to access low-cost, pre- and post-shipment functionality. - **3PLs and Logistics Service Providers:** Businesses optimizing shipping operations using EasyPost's reliable shipping API. - **Carriers:** Service providers expanding their offerings and unlocking new value with Forge. --- ## Next Steps To begin implementing Forge: Choose an implementation model: Centralized (Self-Managed Billing) or Decentralized (EasyPost-Managed Billing). Complete Forge onboarding with the EasyPost team. Follow the appropriate implementation guide: - Centralized (Self-Managed Billing) Guide - Decentralized (EasyPost-Managed Billing) Guide Related: - [Centralized (Self-Managed Billing)](https://docs.easypost.com/guides/get-started-with-forge/self-managed-billing-guide) - [Decentralized (EasyPost-Managed Billing)](https://docs.easypost.com/guides/get-started-with-forge/easypost-managed-billing-guide) --- ## Additional Resources Please visit the Help Center for more information. --- Source: https://docs.easypost.com/guides/landed-cost-guide # Landed Cost Guide ## Overview Landed cost is the total amount of duties, taxes, and fees associated with an international shipment. The EasyPost Landed Cost feature uses Zonos to calculate these costs before shipment purchase. For supported carrier services, landed cost calculations may also include a guarantee that locks in the quoted duties, taxes, and fees. Landed cost is intended for merchants, marketplaces, and logistics platforms shipping internationally that need greater visibility into customs-related costs before purchasing a shipment. Common use cases include: - Cross-border ecommerce checkout - International order confirmation - Duty and tax estimation before label purchase - Prepaid duties and taxes for Delivered Duty Paid (DDP) shipments > Note: Landed cost calculations are available only for international shipments. --- ## Prerequisites To enable Landed Cost functionality: 1. Accept the applicable Zonos Terms of Service. 2. Configure an eligible BYOCA carrier account with Zonos credentials. Contact an EasyPost account representative or Contact Support for access to Landed Cost. --- ## Landed Cost Terminology | Term | Description | |---|---| | Landed cost | Total duties, taxes, and fees associated with an international shipment. | | Duties | Government-imposed charges on imported goods based on factors such as product classification, origin, destination, and applicable trade agreements. | | Taxes | VAT, GST, or other taxes applied by the destination country. | | Fees | Additional customs processing or handling charges associated with an international shipment. | | Guarantee | A commitment from Zonos that the quoted landed cost amount is locked in for an eligible shipment. | | DDP | Delivered Duty Paid. Duties, taxes, and fees are paid by the shipper before delivery and are commonly included in checkout pricing. Landed cost guarantees are more commonly available for DDP-enabled services. | | DDU | Delivered Duty Unpaid. Duties, taxes, and fees are paid by the recipient upon delivery. | --- ## How Landed Cost Works Landed Cost can be used through the standard `Shipment` workflow. ### Shipment Workflow For eligible international shipments, EasyPost can calculate landed cost while retrieving carrier rates. 1. Create an international `Shipment` with customs information. 2. EasyPost retrieves `Rates` from eligible carrier accounts. 3. Supported `Rates` may include landed cost information. 4. Select a `Rate` containing the desired landed cost calculation. 5. Purchase the `Shipment`. 6. EasyPost activates the associated landed cost guarantee before purchasing the carrier label. 7. The purchased `Shipment` response includes landed cost information for the selected `Rate`. If a `Shipment` does not meet Landed Cost eligibility requirements, `Shipment` creation and rating can still succeed. Landed cost information is omitted from ineligible `Rates`. Landed Cost is currently returned during initial `Shipment` creation and on the selected `Rate` after purchase. --- ## CustomsInfo International shipments require `CustomsInfo` to calculate landed costs. `CustomsInfo` should include accurate product descriptions, values, quantities, origin countries, and applicable Harmonized System (HS) tariff numbers. Each `CustomsItem` valued over $20 USD requires an `hs_tariff_number`. Incomplete or inaccurate `CustomsInfo` may prevent landed cost calculation or guarantee activation. Related: - [Customs Guide](https://docs.easypost.com/guides/customs-guide) - [CustomsInfo Documentation](https://docs.easypost.com/docs/customs-infos) --- ## Landed Cost Guarantees Creating a landed cost quote does not automatically activate a guarantee. For supported carrier services, a quote may include guarantee information. In the standard `Shipment` workflow, EasyPost activates the guarantee during shipment purchase before purchasing the carrier label. Once activated, Zonos honors the landed cost calculation from the time of quote through customs clearance for up to 90 days. Guarantee availability varies by carrier and service level and is more commonly available for DDP-enabled services. Unsupported carrier services may still return landed cost calculations without a guarantee. --- ## Quote Lifecycle Landed cost quotes are valid for a limited activation window. - Expired quotes cannot be activated. - Quotes should be recreated when shipment details change. - Quotes should be recreated when `CustomsInfo` changes. - Quotes should be recreated when shipping costs change. The quote response includes expiration information when a guarantee is available. --- ## Supported Carriers The current Landed Cost workflow supports eligible BYOCA accounts for: - FedEx - UPS - DHL Express Supported service levels vary by carrier. ### Canada Post Canada Post uses a separate Zonos integration for landed cost calculation. Zonos credentials configured on the Canada Post carrier account are used during Canada Post rating rather than through the EasyPost Landed Cost Service. Canada Post Landed Cost is currently available through a separate configuration. --- ## Limitations - Landed Cost is available only for international shipments. - BYOCA carrier accounts are required for the Landed Cost Service workflow. - Landed cost information is returned during initial `Shipment` creation and is not refreshed automatically during re-rating. - One-Call Buy does not currently activate Landed Cost. - Guarantee availability depends on carrier and service level. - Canada Post uses a separate Landed Cost integration. --- ## Additional Resources Related: - [Shipment Documentation](https://docs.easypost.com/docs/shipments) - [Rate Object](https://docs.easypost.com/docs/shipments/rates#rate-object) --- Source: https://docs.easypost.com/guides/luma-guide # Luma Guide Luma is EasyPost's AI-powered rate shopping engine that enables shippers to automatically purchase shipping labels based on predefined business logic. When purchasing labels, shippers often need to balance speed, cost, and carrier preferences. Luma automates this decision-making process using predefined rules and AI predictions. This reduces manual configuration and ensures consistency in label selection. The following steps are required to activate Luma: 1. Set up shipping rules. 2. Configure the API. 3. (Optional) Decide whether to activate Luma Promise. Luma supports two methods for purchasing shipments: {/* prettier-ignore */} 1. One-Call Buy: Use `POST /shipments/luma` to create and purchase a shipment in a single request. This method is ideal for shippers with established rulesets who want to reduce API calls. {/* prettier-ignore */} 2. Standard Buy: Create a shipment using `POST /shipments`, then call `POST /shipments/:id/luma` to evaluate the rates against the Luma ruleset and purchase the label. This method is ideal for shippers that are doing rating (creating a shipment) first, and then want to rate shop with Luma to buy a label. ## Prerequisites {/* prettier-ignore */} 1. Sign up for an EasyPost account or log in to an existing account. 2. Add and configure carrier accounts via EasyPost API or the EasyPost Dashboard. Only rates from connected carriers will be evaluated by Luma. 3. Sign up for Luma. 4. Follow the required steps to activate Luma, including setting up rules and configuring the API. Step-by-step setup tutorial videos are available in the Luma Select Help Center article. Related: - [Getting Started Guide](https://docs.easypost.com/guides/getting-started) - [Manage Carrier Accounts](https://app.easypost.com/account/settings?tab=carriers) --- ## Luma Select Luma Select is the decision engine behind the Luma API. It evaluates carrier rates against a set of rules and selects the most appropriate shipping label. Rulesets are created in the EasyPost Dashboard and executed via the API. To activate Luma Select, watch the video below that explains rule setup. Video: [Setting Up Luma](https://easypost-api.wistia.com/medias/vdlavzwslp) ### Common rule types - **Delivery Settings**: Specifies a required delivery date or predefined delivery range (e.g., 2-Day Shipping). A **delivery date must be included** during shipment creation when this rule is used. - **Delivery Confidence**: Indicates the required confidence level for on-time delivery based on historical performance data. - Standard (75%) - High (90%) - Very High (95%) - **Carriers Used**: Restricts selection to carriers configured on the EasyPost account. - **Cost Threshold**: Defines the maximum acceptable rate. - **Contingency Plan**: Establishes a fallback carrier/service (e.g., USPS Ground Advantage) if no eligible rate satisfies the rules. For help managing rules through the EasyPost Dashboard, see the Luma Select Help Center article. Related: - [EasyPost Help Center - Luma](https://support.easypost.com/hc/en-us/categories/33497121486093-Luma) --- ## Benefits of using Luma - **Automated Rate Selection**: Eliminates manual logic and reduces errors by enforcing rules consistently. - **AI-Powered Predictions**: Uses AI to optimize based on on-time delivery probability. - **Fallback Logic**: Ensures a label is returned, even when ideal conditions are not met. - **Improved Efficiency**: Reduces effort and improves carrier performance insight. --- ## One-Call Buy workflow Use the One-Call Buy method to create and purchase a shipment in a single request. This approach reduces the number of API calls required. API configuration is required for Luma Select activation. See the video below for guidance. Video: [One-Call Buy](https://easypost-api.wistia.com/medias/73mo2xwkdt) ### 1. Define the business ruleset Before calling the Luma API, a ruleset must be defined. Work with an EasyPost account manager to configure rules based on: - **Days in Transit**: Maximum number of transit days desired. - **Confidence**: AI-predicted confidence that the shipment will arrive on time. - **Maximum Cost**: Maximum dollar amount allowed for the shipment. - **Included Carriers**: Specify which carriers to consider for the shipment. **Example Logic:** _“If FedEx or UPS can deliver within 3 days with 85% confidence and under $20, choose the cheapest rate. Otherwise, default to the cheapest available option.”_ Each ruleset is assigned a `ruleset_name` and configured by EasyPost. ### 2. Make the One-Call Buy API request Send a request to `POST /shipments/luma` with a complete `shipment` object in the request body. The object must include: - `to_address` - `from_address` - `parcel` - `ruleset_name` - `planned_ship_date` - `deliver_by_date` (optional) - `insurance` (optional) - `persist_label` (optional) ### 3. Receive a shipment and label in the response The response includes all shipment data, the selected rate, the postage label (or base64-encoded label if `persist_label` is `false`), and a `luma_info` object with rule evaluation details. For request parameters and examples, refer to the Luma API Docs. Related: - [API Docs - Luma](https://docs.easypost.com/docs/luma) - [One-Call Buys](https://docs.easypost.com/docs/shipments#buy-a-shipment-without-rating-one-call-buy) --- ## Standard Luma API workflow ### 1. Define the business ruleset Before calling the Luma API, a ruleset must be defined. Work with an EasyPost account manager to configure rules based on: - **Days in Transit**: Maximum number of transit days desired. - **Confidence**: AI-predicted confidence that the shipment will arrive on time. - **Maximum Cost**: Maximum dollar amount allowed for the shipment. - **Included Carriers**: Specify which carriers to consider for the shipment. **Example Logic:** _“If FedEx or UPS can deliver within 3 days with 85% confidence and under $20, choose the cheapest rate. Otherwise, default to the cheapest available option.”_ Each ruleset is assigned a `ruleset_name` and configured by EasyPost. ### 2. Create a shipment Use the standard create shipment endpoint. Include: - `to_address` - `from_ad`dress` - `parcel` - Any required options (e.g., `delivery_date` if used in ruleset logic) The response returns a `shipment_id`, which will be used in the Luma API call. ### 3. Call the Luma API After creating the shipment, pass the `shipment_id` into the Luma API to purchase a label based on the `ruleset_name` provided. For detailed parameters and examples, see the Luma API Docs. Related: - [One-Call Buys](https://docs.easypost.com/docs/shipments#buy-a-shipment-without-rating-one-call-buy) - [Manage Carrier Accounts](https://app.easypost.com/account/settings?tab=carriers) --- ## Luma Promise The Luma Promise endpoint evaluates shipping options based on a predefined ruleset without purchasing a label. This rating-only call returns the selected rate, predicted delivery date, and cost based on the defined business logic. To activate Luma Promise, watch the video below: Video: [Luma Promise](https://easypost-api.wistia.com/medias/r4ueatelwf) ### 1. Submit a Luma Promise request Send a request to `POST /luma/promise` with the following fields in the request body: - `to_address` - `from_address` - `parcel` - `ruleset_name` (required) - `planned_ship_date` (required) - `delivery_by_date` (optional) ### 2. Review the response The response includes: - The selected rate that satisfies the ruleset. - `luma_predicted_delivery_by_date` - A breakdown of all evaluated rates (`ai_results`). For detailed request and response examples, refer to the Luma API Docs. --- ## Understanding the Luma response The Luma response includes all fields returned by a typical buy request (selected rate, label URLs, carrier info), as well as a `luma_info` object that details how the rate was selected. Review the Luma Info Object for detailed information. Related: - [EasyPost Objects](https://docs.easypost.com/docs/easypost-objects) - [Manage Carrier Accounts](https://app.easypost.com/account/settings?tab=carriers) --- ## Testing the Luma API 1. Use a Test API key to avoid purchasing labels. 2. Create a test shipment. 3. Execute the Luma API call. 4. Review `luma_info` to verify logic is working as expected. --- ## Additional Resources - Luma - API Docs - Help Center - Luma --- Source: https://docs.easypost.com/guides/manifest-guide # Manifest Guide Manifests, often referred to as ScanForms at EasyPost, serve as a crucial checklist of packages awaiting carrier pickup. Although the terms are often used interchangeably, they have subtle differences: - Manifest: A general term for a document that lists all shipments ready for pickup. - ScanForm: A specific type of manifest that includes a scannable barcode used by carriers to acknowledge receipt of the shipments. Essential for advance notification, these documents streamline the pickup process and are required by some carriers before end-of-day pickups. Utilizing manifests, even when not required, improves operational efficiency by providing a consolidated form that details all shipments for pickup. --- ## Prerequisites {/* prettier-ignore */} 1. Sign up for an EasyPost account or log in to an existing account. 2. Webhook URLs need to be set up for both Test and Production Modes. 3. Utilize one of EasyPost's official client libraries. 4. Review the Getting Started Guide to familiarize yourself with the basic functionalities of EasyPost. Related: - [Webhooks Guide](https://docs.easypost.com/guides/getting-started) --- ## ScanForm Object In EasyPost, the ScanForm Object is used to create a manifest. When a shipment or batch is created for individual packages, they can be included in the ScanForm Object. ### Requirements To ensure successful ScanForm creation: - Refunded shipments **cannot** be added. - All shipments must have the same `origin_address`. - The `label_date` of shipments must be on or after the date of the ScanForm generation. - ScanForms **cannot** be updated post-creation; new shipments necessitate a new ScanForm. - A shipment can only be included in one ScanForm. - Shipments must be listed as an array. For detailed information on using the ScanForm Object, please visit the ScanForm section of the API Docs. ### Attributes The ScanForm object contains the following attributes that provide detailed information about the manifest: - `id`: Unique identifier of the ScanForm, which should be recorded for documentation purposes - `object`: Type of object, which will always be ScanForm. - `status`: Current status of the ScanForm. Possible values are "creating", "created", or "failed". - `message`: Field where errors are explained. - `address`: Origin address of the shipments. - `tracking_codes`: Tracking codes associated with all shipments in the ScanForm. - `form_url`: URL of ScanForm document. - `form_file_type`: File format of the ScanForm document. - `batch_id`: ID of the associated batch, if shipments were batched before being included in the ScanForm. Visit the API Docs to learn more about batches. - `created_at`: Timestamp indicating when the ScanForm was created. - `updated_at`: Timestamp of the latest update to the ScanForm. Related: - [Batches](https://docs.easypost.com/docs/scan-form) --- ## Step 1: Create a ScanForm This is a simple example of creating a **ScanForm**, but many users will first create a **Batch**, see the Batch Guide for more information. **Note**: A Batch is created in the background for shipments as an intermediate process to creating ScanForms. ScanForms can be created for one or a group of shipments. It is recommended to **keep each batch under 1,000 shipments.** This best practice helps avoid timeout errors during the batch buying process. #### Creating a ScanForm ### Example: POST /scan_forms #### cURL ```shell curl -X POST https://api.easypost.com/v2/scan_forms \ -u "EASYPOST_API_KEY": \ -H 'Content-Type: application/json' \ -d '{ "shipments": [ { "id": "shp_..." }, { "id": "shp_..." } ] }' ``` #### Go ```go package example import ( "fmt" "github.com/EasyPost/easypost-go/v6" ) func create() { client := easypost.New("EASYPOST_API_KEY") scanForm, _ := client.CreateScanForm("shp_...", "shp_...") fmt.Println(scanForm) } ``` #### Java ```java package shipments; import com.easypost.exception.EasyPostException; import com.easypost.model.ScanForm; import com.easypost.model.Shipment; import com.easypost.service.EasyPostClient; import java.util.ArrayList; import java.util.HashMap; import java.util.List; public class Create { public static void main(String[] args) throws EasyPostException { EasyPostClient client = new EasyPostClient("EASYPOST_API_KEY"); Shipment shipment = client.shipment.retrieve("shp_..."); List shipments = new ArrayList(); shipments.add(shipment); HashMap params = new HashMap(); params.put("shipments", shipments); ScanForm scanForm = client.scanform.create(params); System.out.println(scanForm); } } ``` #### C# ```csharp using System; using System.Collections.Generic; using System.Threading.Tasks; using EasyPost; using Newtonsoft.Json; namespace EasyPostExamples { public class Examples { public static async Task Main() { var client = new EasyPost.Client(new EasyPost.ClientConfiguration("EASYPOST_API_KEY")); EasyPost.Models.API.Shipment shipment = await client.Shipment.Retrieve("shp_..."); EasyPost.Parameters.ScanForm.Create parameters = new() { Shipments = new List { shipment } }; EasyPost.Models.API.ScanForm scanForm = await client.ScanForm.Create(parameters); Console.WriteLine(JsonConvert.SerializeObject(scanForm, Formatting.Indented)); } } } ``` #### Node.js ```javascript const EasyPostClient = require('@easypost/api'); const client = new EasyPostClient('EASYPOST_API_KEY'); (async () => { const scanForm = await client.ScanForm.create({ shipments: [{ id: 'shp_...' }, { id: 'shp_...' }], }); console.log(scanForm); })(); ``` #### PHP ```php scanForm->create([ 'shipments' => [ ['id' => 'shp_...'], ['id' => 'shp_...'], ] ]); echo $scanForm; ``` #### Python ```python import easypost client = easypost.EasyPostClient("EASYPOST_API_KEY") scan_form = client.scan_form.create( shipments=[ {"id": "shp_..."}, {"id": "shp_..."}, ] ) print(scan_form) ``` #### Ruby ```ruby require 'easypost' client = EasyPost::Client.new(api_key: 'EASYPOST_API_KEY') scan_form = client.scan_form.create( shipments: [ { id: 'shp_...', }, { id: 'shp_...', }, ], ) puts scan_form ``` [Content omitted: related links and resources. Review the rendered documentation for navigation links.] --- ## Step 2: Receive Webhook Upon completion of the ScanForm: - EasyPost will send an Event to the Webhook URLs. - The event to look for is `scan_form.created` in the Event's **description** field. Review the Webhooks Guide for information on handling Events. Related: - [API Documentation](https://docs.easypost.com/guides/webhooks-guide) --- #### Webhook POST JSON ```json { "result": { "id": "sf_...", "object": "ScanForm", "created_at": "2015-09-30T21:00:55Z", "updated_at": "2015-09-30T21:00:57Z", "tracking_codes": [ "9405536897846194850412", "9400136897846194907281", "9400136897846194977529" ], "address": { "id": "adr_tyRwEd23", "object": "Address", "created_at": "2015-09-30T21:00:55Z", "updated_at": "2015-09-30T21:00:55Z", "name": "George Costanza", "company": "Vandelay Industries", "street1": "1 E 161st St.", "street2": null, "city": "Bronx", "state": "NY", "zip": "10451", "country": "US", "phone": null, "email": null, "mode": "test", "carrier_facility": null, "residential": null, "federal_tax_id": null, "state_tax_id": null, "verifications": {} }, "status": "created", "message": null, "form_url": "https://easypost-files.s3-us-west-2.amazonaws.com/...2c0cb9.pdf", "form_file_type": null, "batch_id": "batch_...", "confirmation": null }, "description": "scan_form.created", "mode": "test", "previous_attributes": {}, "created_at": "2015-09-30T21:00:57Z", "pending_urls": [], "completed_urls": ["https://www.example.com/easypost-webhook"], "updated_at": "2015-09-30T21:00:57Z", "id": "evt_...", "user_id": "user_...", "status": "in_queue", "object": "Event" } ``` --- ## Additional Resources ### Support and Troubleshooting EasyPost offers support to assist with FAQs, troubleshooting issues, and inquiries related to the EasyPost platform. Please visit the API Docs or the Help Center for more information. Related: - [API Docs](https://docs.easypost.com/docs/authentication) - [Help Center](https://support.easypost.com/hc/en-us) --- Source: https://docs.easypost.com/guides/mcp-guide # EasyPost MCP Guide EasyPost MCP connects AI assistants and agents to your EasyPost account, so you can track packages, look up shipments, quote rates, and buy labels in plain language. Add the EasyPost app in ChatGPT or Claude and sign in. There is no API key to copy and nothing to install. Related: - [Add EasyPost to ChatGPT](https://chatgpt.com/plugins/plugin_asdk_app_6ace74f020f48191b8c3a4a8f341b807) - [Add EasyPost to Claude](https://claude.ai/directory/easypost) Building an agent or using Cursor, Claude Code, Codex, or VS Code? Connect the hosted [Model Context Protocol (MCP)](https://modelcontextprotocol.io/) server with a production API key. See [Connect with an API Key](#connect-with-an-api-key). **Server URL:** `https://app-api.easypost.com/mcp` **Production mode:** EasyPost MCP sends all requests in production mode. Labels it buys are real and are paid from your postage wallet. Test API keys are not supported. We want to hear how you use EasyPost MCP. If there is a shipping task you would like an assistant to handle, a tool you need, or something that didn't work, email [ai@easypost.com](mailto:ai@easypost.com). Your feedback shapes the tools we add next. --- ## What You Can Do Support and operations teams can answer shipping questions and ship packages without opening the dashboard, and developers can inspect an account without writing a script. Paste one of these into your assistant after you connect. Questions about your account: - "Which carrier accounts are connected to my EasyPost account?" - "List my shipments from the last seven days with carrier, service, and cost." - "Which of my shipments from the past week are still in transit?" - "Which USPS services can carry a package over 50 pounds?" - "Do I have any open insurance claims, and what is the status of each?" - "What is my postage wallet balance?" You can also ask about one record: "Where is tracking number 9405511899223197428490?" or "Show me shipment `shp_...`." Tasks that ship, insure, or refund: - "Get rates for a 2 lb box from our warehouse to this customer address, and tell me the cheapest option that arrives by Friday." - "Buy the USPS Ground Advantage rate and send me the label." - "Add $200 of insurance to shipment `shp_...`." - "Refund the unused label with tracking number 9405511899223197428490." - "Is this address deliverable?" --- ## Connect from ChatGPT or Claude The EasyPost app is listed in the ChatGPT and Claude app directories. You sign in with your EasyPost account, so there is no API key to copy. 1. Open the EasyPost app in ChatGPT or in the Claude directory. 2. Select **Connect** and sign in to EasyPost. 3. Approve access on the consent screen. 4. Ask: "Which EasyPost account am I connected to?" The Claude directory is shared by Claude on the web, desktop, and mobile, so you connect once. To disconnect, remove the EasyPost app in your ChatGPT or Claude settings. --- ## Connect with an API Key Use an API key to connect an agent, a coding tool, or your own application. You need: - An EasyPost account. To buy labels, the account also needs a funded postage wallet or a payment method that refills it. - A production API key. - An MCP client that supports remote servers over Streamable HTTP with custom request headers. --- ## Step 1: Set a Production API Key Sign in to the [EasyPost API Keys page](https://app.easypost.com/account/settings?tab=api-keys) and copy a production key. Set it as `EASYPOST_API_KEY` in the environment that launches your MCP client. ```shell # macOS or Linux EASYPOST_API_KEY="YOUR_EASYPOST_PRODUCTION_API_KEY"; export EASYPOST_API_KEY ``` ```shell # Windows PowerShell $env:EASYPOST_API_KEY = "YOUR_EASYPOST_PRODUCTION_API_KEY" ``` Do not put the key in the server URL, source control, or an agent prompt. --- ## Step 2: Configure Your MCP Client Choose the configuration for your client. Each example reads `EASYPOST_API_KEY` from the environment. ### Cursor [Install EasyPost MCP in Cursor](https://cursor.com/en/install-mcp?name=easypost&config=eyJ1cmwiOiJodHRwczovL2FwcC1hcGkuZWFzeXBvc3QuY29tL21jcCIsImhlYWRlcnMiOnsiQXV0aG9yaXphdGlvbiI6IkJlYXJlciAke2VudjpFQVNZUE9TVF9BUElfS0VZfSJ9fQ%3D%3D), or add the server manually to `~/.cursor/mcp.json` for all projects or `.cursor/mcp.json` for one project: ```json { "mcpServers": { "easypost": { "url": "https://app-api.easypost.com/mcp", "headers": { "Authorization": "Bearer ${env:EASYPOST_API_KEY}" } } } } ``` Restart Cursor after saving the file. ### Claude Code Add the server with one command: ```shell claude mcp add --scope project --transport http easypost \ https://app-api.easypost.com/mcp \ --header 'Authorization: Bearer ${EASYPOST_API_KEY}' ``` Use `--scope user` instead of `--scope project` to make the server available in every project. The command writes `.mcp.json` in the project root. To add it by hand, the equivalent entry is: ```json { "mcpServers": { "easypost": { "type": "http", "url": "https://app-api.easypost.com/mcp", "headers": { "Authorization": "Bearer ${EASYPOST_API_KEY}" } } } } ``` Restart Claude Code, then run `claude mcp list` to check the connection. ### Codex Add the server with the Codex CLI: ```shell codex mcp add easypost \ --url https://app-api.easypost.com/mcp \ --bearer-token-env-var EASYPOST_API_KEY ``` The equivalent `~/.codex/config.toml` entry is: ```shell [mcp_servers.easypost] url = "https://app-api.easypost.com/mcp" bearer_token_env_var = "EASYPOST_API_KEY" ``` ### VS Code Add the server to your user or workspace MCP settings. VS Code prompts for the key and stores it outside the configuration file: ```json { "servers": { "easypost": { "type": "http", "url": "https://app-api.easypost.com/mcp", "headers": { "Authorization": "Bearer ${input:easypost_api_key}" } } }, "inputs": [ { "type": "promptString", "id": "easypost_api_key", "description": "EasyPost production API key", "password": true } ] } ``` ### OpenAI Responses API Pass the server and header on the `mcp` tool. The Responses API does not store the header, so send it with every request: ```python import os from openai import OpenAI client = OpenAI() response = client.responses.create( model="gpt-5", tools=[ { "type": "mcp", "server_label": "easypost", "server_url": "https://app-api.easypost.com/mcp", "headers": { "Authorization": f"Bearer {os.environ['EASYPOST_API_KEY']}", }, } ], input="Which carrier accounts are connected to my EasyPost account?", ) print(response.output_text) ``` ### Other MCP Clients Use these connection settings in any client that supports remote Streamable HTTP servers, including workflow automation tools with a native MCP client step such as n8n: | Setting | Value | |---|---| | Name | easypost | | URL | https://app-api.easypost.com/mcp | | Request header | Authorization: Bearer YOUR_EASYPOST_PRODUCTION_API_KEY | --- ## Step 3: Verify the Connection Confirm that `easypost` is connected and lists tools in your client. Then ask: "Which EasyPost account am I connected to?" The client should call `whoami` and return the user associated with the production API key. Then try one of the shipping questions above. --- ## Current Tools EasyPost MCP has 20 tools. Read tools only look up data. Write tools create records, and some of them cost money. ### Read Tools | Tool | Purpose | API Reference | |---|---|---| | whoami | Identifies the connected EasyPost user. Includes the postage wallet balance on the billing account. | [User](https://docs.easypost.com/docs/users) | | list_payment_methods | Lists the card or bank account brand, last four digits, and priority. Cannot add or change a payment method. | [Billing](https://docs.easypost.com/docs/users/billing#retrieve-payment-methods) | | list_shipments | Lists Shipments for the connected account. | [Shipment](https://docs.easypost.com/docs/shipments) | | get_shipment | Retrieves a Shipment with label URLs, stored rates, and a Tracker summary. | [Shipment](https://docs.easypost.com/docs/shipments) | | list_trackers | Lists Trackers and their current delivery status. | [Tracker](https://docs.easypost.com/docs/trackers) | | get_tracker | Retrieves a Tracker with its latest scans. | [Tracker](https://docs.easypost.com/docs/trackers) | | get_address | Retrieves a stored Address by ID. Does not run a new verification. | [Address](https://docs.easypost.com/docs/addresses#retrieve-an-address) | | list_carrier_accounts | Lists connected carrier accounts without returning credentials. | [CarrierAccount](https://docs.easypost.com/docs/carrier-accounts) | | carrier_metadata | Describes carrier service levels, packages, shipment options, and supported features. | [Carrier Metadata](https://docs.easypost.com/docs/carrier-metadata) | | pickups | Retrieves scheduled Pickups. | [Pickup](https://docs.easypost.com/docs/pickups) | | refunds | Retrieves postage Refund request status. | [Refund](https://docs.easypost.com/docs/refunds) | | insurances | Retrieves standalone Insurance policies. | [Insurance](https://docs.easypost.com/docs/insurance) | | claims | Retrieves insurance Claims and their status history. | [Claims](https://docs.easypost.com/docs/insurance/claims) | ### Write Tools | Tool | Purpose | Cost | API Reference | |---|---|---|---| | create_shipment | Quotes rates for one US domestic Shipment. Does not buy a label. Verifies the delivery address. | Address verification is billed. Rating can be metered on a rating subscription. | [Create a Shipment](https://docs.easypost.com/docs/shipments#create-a-shipment) | | buy_shipment | Buys one rate on a Shipment and returns the label and tracking code. The price must match the quoted rate. | Postage, plus insurance if requested, is debited from the wallet. | [Buy a Shipment](https://docs.easypost.com/docs/shipments#buy-a-shipment) | | insure_shipment | Adds insurance to a label that was already bought and has no coverage. | Insurance is debited from the wallet. | [Insure a Shipment](https://docs.easypost.com/docs/shipments/shipping-insurance#insure-a-shipment) | | create_refund | Requests a refund for one unused label, by tracking code. | No charge. | [Create a Refund](https://docs.easypost.com/docs/refunds#create-a-refund) | | create_tracker | Starts tracking one tracking number that was not bought through EasyPost. | Billed the first time a number is tracked. | [Create a Tracker](https://docs.easypost.com/docs/trackers#create-a-tracker) | | create_and_verify_address | Checks that an address is deliverable and stores it. | Billed on every call. | [Verify an Address](https://docs.easypost.com/docs/addresses#verify-an-address) | | smartrate_delivery_date | Estimates the delivery date of each rate on a US domestic Shipment for a planned ship date. | Metered on every call. | [Delivery Date](https://docs.easypost.com/docs/shipments/shipping-smartrate#delivery-date) | `create_shipment` and `smartrate_delivery_date` work with US domestic shipments only. To ship internationally, use the EasyPost API. --- ## Buying Labels Safely Buying a label spends real money, so the tools are built to make mistakes hard: - **Quoting never buys.** `create_shipment` returns rates. A label is only bought when the assistant calls `buy_shipment`. - **The price has to match.** `buy_shipment` takes the price the user approved and refuses to buy if the rate's price is different. - **Retries don't buy twice.** If a buy times out, calling `buy_shipment` again with the same shipment and rate returns the label that was already bought. - **One label per refund.** `create_refund` takes one tracking code per call. Many clients ask you to approve a write tool before it runs. Keep that on for `buy_shipment`, `insure_shipment`, and `create_refund`. These three are marked as destructive, so clients that read MCP tool hints can flag them. Insurance works in two ways. You can add it when you buy, with the `insurance` amount on `buy_shipment`, or afterwards with `insure_shipment`. If your account has a default insurance amount, it may cover a shipment that you buy without setting insurance. To decline coverage, pass `0`. --- ## EasyPost MCP and the API Use EasyPost MCP for interactive shipping work and agent workflows covered by the current tools. Use the EasyPost API for application code, webhooks, international shipments, batches, and other high-volume automation. --- ## Data and Security - The connected EasyPost account determines which records the tools can access. - Tool responses never include carrier credentials, API keys, recharge settings, or fee rates. - `whoami` returns the postage wallet balance on the billing account. `list_payment_methods` returns the brand, last four digits, and expiry of each card, and the bank name. It cannot add, remove, or change a payment method. - Responses can include addresses, tracking details, and label URLs. Connect EasyPost only to MCP clients and other MCP servers that you trust. - A production API key can authorize requests outside MCP. Treat it as a secret. --- ## FAQs **Q: Do I need to install anything?** No. EasyPost hosts the server. Your client connects to it over HTTPS. **Q: Does connecting change anything in my EasyPost account?** Connecting doesn't. The read tools only look up records. The write tools create shipments, buy and insure labels, request refunds, create trackers, and verify addresses, and some of these are charged to your account. Your client should ask you before it runs one. **Q: Can I use a test API key?** No. EasyPost MCP sends requests in production mode, so it requires a production API key. **Q: Can I ship internationally?** Not yet. `create_shipment` quotes US domestic shipments only. Use the EasyPost API for international shipments. **Q: Can I use the same key in more than one client?** Yes. EasyPost rate limits apply to the account, not to each client. **Q: Which clients work?** ChatGPT and Claude through their app directories, and any MCP client that supports remote servers over Streamable HTTP with custom request headers. **Q: How do I request a tool that does not exist yet?** Email [ai@easypost.com](mailto:ai@easypost.com) with the shipping task you want an agent to complete. --- ## Troubleshooting | Symptom | What to check | |---|---| | No EasyPost tools appear | Confirm the server URL, Streamable HTTP support, and custom header support. Then restart the client. | | The client reports Authentication required | Confirm that EASYPOST_API_KEY is set in the environment that launched the client and is sent as a Bearer token. | | The response contains MODE.UNAUTHORIZED | Replace the test key with a production API key. | | The response contains APIKEY.INACTIVE | The key is disabled. Enable it or create a new one on the API Keys page. | | buy_shipment refuses with expected_rate does not match | The price changed or the wrong rate was picked. Confirm the price again, or create a new shipment for fresh rates. | | buy_shipment says the label may already be bought | The buy timed out or the connection dropped. Call buy_shipment again with the same shipment_id and rate_id. Do not create a new shipment, or you may buy a second label. | | create_shipment returns no rates | Read the messages in the response. They explain why each carrier returned no rate. | --- ## Additional Resources Related: - [API Keys](https://docs.easypost.com/docs/api-keys) - [Rate Limiting](https://docs.easypost.com/guides/rate-limiting-guide) - [Tracking Guide](https://docs.easypost.com/guides/tracking-guide) - [EasyPost Status](https://www.easypoststatus.com/) --- Source: https://docs.easypost.com/guides/rate-limiting-guide # Rate Limiting and Backoff Guide Rate limiting restricts the number of API calls a user can make to a service within a specific timeframe. This protects against attacks and prevents any user or group from monopolizing bandwidth. EasyPost implements rate limiting not only to safeguard its system but also to protect carrier partners from an overload of requests. For example, EasyPost enforces a rate limit of five requests per second across Index endpoints; exceeding this limit triggers a **429 HTTP Error**, signaling **“Too Many Requests.”** --- ## Prerequisites - Understanding of HTTP Status Codes, especially 429. - Knowledge of API calls and error handling. Related: - [Errors](https://docs.easypost.com/docs/errors) - [Errors Guide](https://docs.easypost.com/guides/errors-guide) --- ## Rate Limiting strategy EasyPost employs a dual-layer rate-limiting strategy designed to maintain system stability and ensure fair usage across all clients. - The primary **Load-based Limiter** dynamically protects overall capacity for high-priority operations, such as buying and rating. - A secondary **Fixed Requests Per Second (RPS)** limit is applied specifically to high-volume index endpoints to prevent short bursts of read traffic from destabilizing the infrastructure. Understanding and implementing Retry and Backoff logic is essential to managing fluctuating access limits efficiently. --- ## Carrier Account Limits for Rating To protect carrier infrastructure and maintain consistent API reliability, EasyPost enforces a maximum limit of **60 carrier accounts per rating request**. This limit applies to: - Carrier accounts explicitly provided in the `carrier_accounts` parameter. - Default behavior where rating is performed against all enabled carrier accounts on the user's account. If more than 60 carrier accounts are provided or enabled: - The API call will **NOT fail**. - Rating will be performed using the first 60 carrier accounts. - Any additional accounts beyond the first 60 will be ignored for that request. To optimize performance and control rating behavior, explicitly pass a scoped list of required carrier account IDs when possible. --- ## Handling 429 Errors When a `429 Too Many Requests` error occurs, it signals that the request rate has surpassed the allowed threshold. Strategies to manage this include: - Implementing retry logic to retry the request. - Temporarily slow down requests to avoid immediate retries. - Use backoff logic that pairs with retry logic, increasing the wait time between retries with growing intervals until the rate limiting is over. - Optimize API usage to minimize unnecessary calls to EasyPost. --- ## Optimization Tips - Use **TLS session resumption** and **connection pooling** to maintain efficient server connections. - Implement **timeout logic** to prevent connections from staying open too long. All of EasyPost's client libraries have configurable timeouts built in. - Leverage EasyPost's Batches endpoint for processing multiple shipments, utilizing its asynchronous workflow to handle large volumes efficiently. - Utilize filtering and smart Pagination to efficiently retrieve objects without overloading the system. Related: - [Batches Guide](https://docs.easypost.com/guides/batches-guide) - [Pagination](https://docs.easypost.com/docs/pagination) --- ## Retry and Backoff Example EasyPost's Python client library, combined with urllib3.util.retry, provides a straightforward method to implement retry and backoff logic: > Note: When using one of EasyPost's client libraries, wrap each EasyPost function call with try/catch and parse the error status/message and retry on failure. ```python import requests from urllib3.util.retry import Retry retry_strategy = Retry( total=3, backoff_factor=1, status_forcelist=[ 429, 500, 502, 503, 504, ], allowed_methods=[ "DELETE", "GET", ], ) requests_session = requests.Session() requests_http_adapter = requests.adapters.HTTPAdapter(max_retries=retry_strategy) requests_session.mount(prefix="https://", adapter=requests_http_adapter) ``` --- ## Additional Resources Related: - [EasyPost Client Libraries](https://docs.easypost.com/libraries) - [Help Center](https://support.easypost.com/hc/en-us) --- Source: https://docs.easypost.com/guides/shipping-insurance-guide # Insurance Guide This guide will teach you how to insure your EasyPost packages. In this example, we will be insuring an item worth $249.99. When insuring a shipment, you go through the same steps as shipping a package that is not insured, except that you need to add insurance to your shipment. If you don't know how to create a shipment, we recommend completing our Getting Started Guide before starting our Shipping Insurance Guide. [Content omitted: getting started checklist rendered dynamically. Review the rendered documentation for complete setup steps.] [Content omitted: related links and resources. Review the rendered documentation for navigation links.] --- ## Step 1: Adding Insurance to a Shipment It's really simple. After you have created a shipment **and purchased** your postage, you just have to use our "insure" method to purchase insurance. Pass through the dollar value of the contents of the package using the **amount** parameter of the insure method. To start a claim, simply email us a completed claims form along with a handful of key documents that are listed on the form. You'll receive reimbursement within 10 days. No more waiting periods, hassle or extensive forms. For insurance related inquiries, email us at insurance@easypost.com. We process claims within 48 hours of receiving all relevant documentation and payments are made within 10 business days. And unlike most insurance plans, we offer international coverage to virtually every country in the world. #### Adding Insurance to a Shipment ### Example: POST /shipments/:id/insure #### cURL ```shell curl -X POST https://api.easypost.com/v2/shipments/shp_.../insure \ -u "EASYPOST_API_KEY": \ -H 'Content-Type: application/json' \ -d '{ "amount": "200" }' ``` #### Go ```go package example import ( "fmt" "github.com/EasyPost/easypost-go/v6" ) func insure() { client := easypost.New("EASYPOST_API_KEY") shipment, _ := client.InsureShipment("shp_...", "100.00") fmt.Println(shipment) } ``` #### Java ```java package shipments; import com.easypost.exception.EasyPostException; import com.easypost.model.Shipment; import com.easypost.service.EasyPostClient; import java.util.HashMap; public class Insure { public static void main(String[] args) throws EasyPostException { EasyPostClient client = new EasyPostClient("EASYPOST_API_KEY"); HashMap params = new HashMap(); params.put("amount", 100); Shipment shipment = client.shipment.insure("shp_...", params); System.out.println(shipment); } } ``` #### C# ```csharp using System; using System.Collections.Generic; using System.Threading.Tasks; using EasyPost; using Newtonsoft.Json; namespace EasyPostExamples { public class Examples { public static async Task Main() { var client = new EasyPost.Client(new EasyPost.ClientConfiguration("EASYPOST_API_KEY")); EasyPost.Models.API.Shipment shipment = await client.Shipment.Insure("shp_...", 200); Console.WriteLine(JsonConvert.SerializeObject(shipment, Formatting.Indented)); } } } ``` #### Node.js ```javascript const EasyPostClient = require('@easypost/api'); const client = new EasyPostClient('EASYPOST_API_KEY'); (async () => { const shipment = await client.Shipment.insure('shp_...', 100); console.log(shipment); })(); ``` #### PHP ```php shipment->insure( 'shp_...', ['amount' => 100] ); echo $shipment; ``` #### Python ```python import easypost client = easypost.EasyPostClient("EASYPOST_API_KEY") shipment = client.shipment.insure("shp_...", amount=100) print(shipment) ``` #### Ruby ```ruby require 'easypost' client = EasyPost::Client.new(api_key: 'EASYPOST_API_KEY') shipment = client.shipment.insure('shp_...', amount: 100) puts shipment ``` [Content omitted: related links and resources. Review the rendered documentation for navigation links.] --- Congratulations! You've just purchased insurance with EasyPost! Check out our Full Reference API Documentation. [Content omitted: related links and resources. Review the rendered documentation for navigation links.] --- Source: https://docs.easypost.com/guides/smartrate-guide # SmartRate Guide The SmartRate API provides shippers with highly accurate, shipment-level transit time predictions. Users can leverage this data to make informed decisions about shipping strategies to save money, improve on-time delivery, and get reliable estimated delivery dates. ### Subscription The SmartRate API offers users 500 free SmartRate API calls for immediate use. Once the 500 call limit is exceeded, users are charged $0.03 per call or can sign up for a subscription. > Note: The SmartRate API is currently available exclusively for US domestic shipments. ## Prerequisites 1. Sign up for an EasyPost account or log in to an existing account. 1. Utilize one of EasyPost's official client libraries. 1. Review the Getting Started Guide to become familiar with the basic functionalities of EasyPost. 1. Create a Shipment. --- ## Functionality The SmartRate API accepts a Shipment ID and returns a time_in_transit object that includes transit days across various percentiles for every Rate associated with a given Shipment. Transit days are calculated as the number of business days from when the carrier first acknowledges possession of the shipment to the initial out-for-delivery attempt. Related: - [Rate Object](https://docs.easypost.com/docs/shipments) --- ## API Endpoints ### SmartRate The `/smartrate` endpoint accepts a Shipment ID and returns a time_in_transit object that includes transit business days across various percentiles for every Rate associated with a given Shipment. Transit business days are calculated as the number of business days (Monday-Friday) from when the carrier first acknowledges possession of the shipment to the initial out-for-delivery attempt. For detailed information on using this endpoint, please visit the SmartRate section of the API Docs. ### Delivery Date The `/delivery_date` endpoint provides estimated delivery dates for shipments, helping users identify cost-effective service levels and enhance delivery timeliness. This data helps identify cheaper service levels that meet time-in-transit Service Level Agreements (SLAs), enhance on-time delivery for time-sensitive shipments, and improve customer experience with accurate delivery date estimates. Unlike the `/smartrate` endpoint, the `days_in_transit` uses complex AI to consider the day of the week planned for shipping and account for shipments that extend over weekends and holidays. For detailed information on using this endpoint, please visit the SmartRate section of the API Docs. ### Precision Shipping The `/precision_shipping` endpoint of the SmartRate API enhances shipping accuracy by allowing shippers to specify a desired delivery date. The API then suggests the best ship date for each carrier and service level to meet this delivery date. In addition to the suggested `ship_on_date`, a `delivery_date_confidence` score is provided, indicating the likelihood of delivery on the desired date. Unlike the `/smartrate` endpoint, the `days_in_transit` uses complex AI to consider the day of the week planned for shipping and account for shipments that extend over weekends and holidays. For detailed information on using this endpoint, please visit the SmartRate section of the API Docs. ### Deliver By The `/smartrate/deliver_by` endpoint offers advanced predictions of delivery dates based on the entry point into the mailstream and intended delivery timelines. This time-in-transit data can be used in offline processes to identify cheaper service levels that meet time-in-transit Service Level Agreements (SLAs), enhance on-time delivery for time-sensitive shipments, and improve customer experience with accurate delivery date estimates. For detailed information on using this endpoint, please visit the SmartRate section of the API Docs. ## Deliver On The `/smartrate/deliver_on` endpoint of the SmartRate API enhances shipping accuracy by allowing shippers to specify a desired delivery date. The API then suggests the best ship date for each carrier and service level to meet this delivery date. In addition to the suggested `ship_on_date`, a `delivery_date_confidence` score is provided, indicating the likelihood of delivery on the desired date. For detailed information on using this endpoint, please visit the SmartRate section of the API Docs. [Content omitted: related links and resources. Review the rendered documentation for navigation links.] --- ## How to Use the SmartRate API ### Step 1: Create a Shipment To utilize SmartRate, first create a shipment for the parcel. Once the shipment is created, copy the `shipment_id` from the bottom of the response for the next step. Refer to the Getting Started Guide for detailed instructions on creating a shipment. ### Step 2: Select a SmartRate Endpoint and Call the SmartRate API Using the `shipment_id`, choose the appropriate SmartRate endpoint based on the shipping schedule or delivery requirements. **NOTE:** The **Deliver By** and **Deliver On** endpoints do not require a Shipment ID. ### Step 3: Select a Rate Use the response to select the most appropriate rate for the shipment. --- ## SmartRate Use Cases ### Save Money Identify cost-effective service levels that meet your transit time requirements. SmartRate provides granular, accurate transit time estimates, enabling cost savings on both shipping and packaging. ### Enhance Customer Experience Improve on-time delivery rates and checkout experiences by providing reliable delivery date estimates directly to customers. This is especially beneficial during peak seasons when carrier performance may vary. ## Additional Resources - SmartRate - API Docs - [Create Label Tool: SmartRate-powered label suggestions](https://support.easypost.com/hc/en-us/articles/20360596132109-Create-Label-Tool-SmartRate-powered-label-suggestions) - Shipping Optimization API: SmartRate - [SmartRate API FAQs](https://support.easypost.com/hc/en-us/articles/15433074900365-SmartRate-API-FAQs) - [How to Create Shipping Labels in EasyPost](https://support.easypost.com/hc/en-us/articles/17382407999373-How-to-Create-Shipping-Labels-in-EasyPost) --- Source: https://docs.easypost.com/guides/tracking-guide # Tracking Guide EasyPost provides two primary methods for tracking packages: - Supplying an existing carrier tracking number to create a `Tracker` object. - Purchasing a shipping label through EasyPost, which automatically generates a Tracker. Tracking updates are delivered through `Event` webhooks. Refer to the Webhooks Guide for implementation details on receiving `Event` objects. Related: - [Tracker API Reference](https://docs.easypost.com/guides/getting-started) - [Webhooks Guide](https://docs.easypost.com/docs/trackers) --- ## Prerequisites - Sign up or log in to an existing EasyPost account. - Configured webhook URLs for Test and Production mode. - One of the official EasyPost client libraries installed. - Familiarity with the Getting Started Guide (recommended). --- ## Method 1: Track an existing carrier shipment To track a shipment not created through EasyPost, create a `Tracker` with a `tracking_code` and, optionally, a `carrier`. If carrier is omitted, EasyPost attempts auto-detection. If the tracking code cannot be matched to a supported carrier, an error is returned. #### Creating a Tracker ### Example: POST /trackers #### cURL ```shell curl -X POST https://api.easypost.com/v2/trackers \ -u "EASYPOST_API_KEY": \ -H 'Content-Type: application/json' \ -d '{ "tracker": { "tracking_code": "EZ1000000001", "carrier": "USPS" } }' ``` #### Go ```go package example import ( "fmt" "github.com/EasyPost/easypost-go/v6" ) func create() { client := easypost.New("EASYPOST_API_KEY") tracker, _ := client.CreateTracker( &easypost.CreateTrackerOptions{ TrackingCode: "EZ1000000001", Carrier: "USPS", }, ) fmt.Println(tracker) } ``` #### Java ```java package trackers; import com.easypost.exception.EasyPostException; import com.easypost.model.Tracker; import com.easypost.service.EasyPostClient; import java.util.HashMap; public class Create { public static void main(String[] args) throws EasyPostException { EasyPostClient client = new EasyPostClient("EASYPOST_API_KEY"); HashMap params = new HashMap(); params.put("tracking_code", "EZ1000000001"); params.put("carrier", "USPS"); Tracker tracker = client.tracker.create(params); System.out.println(tracker); } } ``` #### C# ```csharp using System; using System.Collections.Generic; using System.Threading.Tasks; using EasyPost; using Newtonsoft.Json; namespace EasyPostExamples { public class Examples { public static async Task Main() { var client = new EasyPost.Client(new EasyPost.ClientConfiguration("EASYPOST_API_KEY")); EasyPost.Parameters.Tracker.Create parameters = new() { TrackingCode = "EZ1000000001", Carrier = "USPS" }; EasyPost.Models.API.Tracker tracker = await client.Tracker.Create(parameters); Console.WriteLine(JsonConvert.SerializeObject(tracker, Formatting.Indented)); } } } ``` #### Node.js ```javascript const EasyPostClient = require('@easypost/api'); const client = new EasyPostClient('EASYPOST_API_KEY'); (async () => { const tracker = await client.Tracker.create({ tracking_code: 'EZ1000000001', carrier: 'USPS', }); console.log(tracker); })(); ``` #### PHP ```php tracker->create([ 'tracking_code' => 'EZ1000000001', 'carrier' => 'USPS' ]); echo $tracker; ``` #### Python ```python import easypost client = easypost.EasyPostClient("EASYPOST_API_KEY") tracker = client.tracker.create( tracking_code="EZ1000000001", carrier="USPS", ) print(tracker) ``` #### Ruby ```ruby require 'easypost' client = EasyPost::Client.new(api_key: 'EASYPOST_API_KEY') tracker = client.tracker.create( tracking_code: 'EZ1000000001', carrier: 'USPS', ) puts tracker ``` After a `Tracker` is created, EasyPost periodically checks for new carrier updates and posts them via `tracker.updated` webhook `Events`. ### Return-label tracking for delayed use If you generated a return label during shipment creation but the customer may use it weeks or months later, create a standalone tracker with `tracker.options.is_return: true`. This classifies the tracker as a return tracker at creation time. Selection guidance: - Use `shipment.is_return` when creating return labels on the Return Shipment workflow. - Use `tracker.options.is_return` when creating a standalone tracker with `POST /trackers`. For return trackers in initial states, expiry is measured from tracker creation time (`created_at`), not from `updated_at` or the last scan. In practice, this means an unused return tracker can age out after roughly six months from creation even without scan activity. Creating a return tracker significantly before first carrier movement can reduce the remaining active window once the package starts moving. Polling tradeoff: - For return trackers in `unknown` or `pre_transit`, polling is generally about once per day. - After the package starts moving, polling intervals are recalculated by status and carrier behavior; they do not stay on a daily cadence for the full lifecycle. - Some integrations, including standalone USPS, can receive carrier-pushed updates instead of relying only on polling. - Earlier creation can improve early visibility but can consume more of the pre-movement window before carrier handoff. Duplicate create behavior: - If you submit `POST /trackers` again with the same `tracking_code`, `carrier`, and `tracker.options.is_return` for the same user, EasyPost returns the original tracker. - Re-submitting an identical request does not reset tracker age (`created_at`) and does not restart the return-expiry clock. - If `tracker.options.is_return` changes while `tracking_code` and `carrier` stay the same, that request is treated as a different tracker identity. For request syntax and parameter details, see the Create a Tracker API reference. --- ## Method 2: Track a shipment created through EasyPost Tracking is automatically enabled for all shipping labels purchased through EasyPost. No additional API calls are required. When a label is purchased: - A `Tracker` is automatically generated. - The response includes the `tracking_code`. - Tracking updates are delivered through webhook `Events`. For full shipment creation steps, see the Getting Started Guide. #### Buying Shipment ### Example: POST /shipments/:id/buy #### cURL ```shell curl -X POST https://api.easypost.com/v2/shipments \ -u "EASYPOST_API_KEY": \ -H 'Content-Type: application/json' \ -d '{ "shipment": { "to_address": { "name": "Dr. Steve Brule", "street1": "179 N Harbor Dr", "city": "Redondo Beach", "state": "CA", "zip": "90277", "country": "US", "phone": "8573875756", "email": "dr_steve_brule@gmail.com" }, "from_address": { "name": "EasyPost", "street1": "417 Montgomery Street", "street2": "5th Floor", "city": "San Francisco", "state": "CA", "zip": "94104", "country": "US", "phone": "4153334445", "email": "support@easypost.com" }, "parcel": { "length": "20.2", "width": "10.9", "height": "5", "weight": "65.9" }, "line_items": [ { "total_line_value": "129.00", "item_description": "Mugs" }, { "total_line_value": "45.50", "item_description": "T-shirts" } ] } }' ``` #### Go ```go package example import ( "fmt" "github.com/EasyPost/easypost-go/v6" ) func create() { client := easypost.New("EASYPOST_API_KEY") shipment, _ := client.CreateShipment( &easypost.Shipment{ ToAddress: &easypost.Address{ Name: "Dr. Steve Brule", Street1: "179 N Harbor Dr", City: "Redondo Beach", State: "CA", Zip: "90277", Country: "US", Phone: "4155559999", Email: "dr_steve_brule@gmail.com", }, FromAddress: &easypost.Address{ Name: "EasyPost", Street1: "417 Montgomery Street", Street2: "5th Floor", City: "San Francisco", State: "CA", Zip: "90277", Country: "US", Phone: "4155559999", Email: "support@easypost.com", }, Parcel: &easypost.Parcel{ Length: 20.2, Width: 10.9, Height: 5, Weight: 65.9, }, LineItems: []*easypost.LineItem{ { TotalLineValue: "129.00", ItemDescription: "Mugs", }, { TotalLineValue: "45.50", ItemDescription: "T-shirts", }, }, }, ) fmt.Println(shipment) } ``` #### Java ```java package shipments; import com.easypost.exception.EasyPostException; import com.easypost.model.Shipment; import com.easypost.service.EasyPostClient; import java.util.ArrayList; import java.util.HashMap; import java.util.List; public class Create { public static void main(String[] args) throws EasyPostException { EasyPostClient client = new EasyPostClient("EASYPOST_API_KEY"); HashMap toAddressMap = new HashMap(); toAddressMap.put("name", "Dr. Steve Brule"); toAddressMap.put("street1", "179 N Harbor Dr"); toAddressMap.put("city", "Redondo Beach"); toAddressMap.put("state", "CA"); toAddressMap.put("country", "US"); toAddressMap.put("phone", "8573875756"); toAddressMap.put("email", "dr_steve_brule@gmail.com"); toAddressMap.put("zip", "90277"); HashMap fromAddressMap = new HashMap(); fromAddressMap.put("name", "EasyPost"); fromAddressMap.put("street1", "417 Montgomery Street"); fromAddressMap.put("street2", "5th Floor"); fromAddressMap.put("city", "San Francisco"); fromAddressMap.put("state", "CA"); fromAddressMap.put("zip", "94104"); fromAddressMap.put("country", "US"); fromAddressMap.put("phone", "4153334445"); fromAddressMap.put("email", "support@easypost.com"); HashMap parcelMap = new HashMap(); parcelMap.put("length", 20.2); parcelMap.put("width", 10.9); parcelMap.put("height", 5); parcelMap.put("weight", 65.9); HashMap mugLineItem = new HashMap(); mugLineItem.put("total_line_value", "129.00"); mugLineItem.put("item_description", "Mugs"); HashMap shirtLineItem = new HashMap(); shirtLineItem.put("total_line_value", "45.50"); shirtLineItem.put("item_description", "T-shirts"); List> lineItems = new ArrayList>(); lineItems.add(mugLineItem); lineItems.add(shirtLineItem); HashMap params = new HashMap(); params.put("to_address", toAddressMap); params.put("from_address", fromAddressMap); params.put("parcel", parcelMap); params.put("line_items", lineItems); Shipment shipment = client.shipment.create(params); System.out.println(shipment); } } ``` #### C# ```csharp using System; using System.Collections.Generic; using System.Threading.Tasks; using EasyPost; using Newtonsoft.Json; namespace EasyPostExamples { public class Examples { public static async Task Main() { var client = new EasyPost.Client(new EasyPost.ClientConfiguration("EASYPOST_API_KEY")); // Create a shipment using all data in one API call EasyPost.Parameters.Shipment.Create parameters = new() { ToAddress = new EasyPost.Parameters.Address.Create { Name = "Dr. Steve Brule", Street1 = "417 Montgomery Street", Street2 = "5th Floor", City = "San Francisco", State = "CA", Country = "US", Zip = "94104" }, FromAddress = new EasyPost.Parameters.Address.Create { Company = "EasyPost", Street1 = "417 Montgomery Street", Street2 = "Floor 5", City = "San Francisco", State = "CA", Country = "US", Zip = "94104" }, Parcel = new EasyPost.Parameters.Parcel.Create { Length = 8, Width = 6, Height = 5, Weight = 10 }, LineItems = new List { new EasyPost.Models.API.LineItem { TotalLineValue = "129.00", ItemDescription = "Mugs" }, new EasyPost.Models.API.LineItem { TotalLineValue = "45.50", ItemDescription = "T-shirts" }, } }; EasyPost.Models.API.Shipment shipment = await client.Shipment.Create(parameters); Console.WriteLine(JsonConvert.SerializeObject(shipment, Formatting.Indented)); // Create a shipment using existing addresses and parcel EasyPost.Models.API.Address toAddress = await client.Address.Retrieve("adr_..."); EasyPost.Models.API.Address fromAddress = await client.Address.Retrieve("adr_..."); EasyPost.Models.API.Parcel parcel = await client.Parcel.Retrieve("prcl_..."); parameters = new() { ToAddress = toAddress, FromAddress = fromAddress, Parcel = parcel, LineItems = new List { new EasyPost.Models.API.LineItem { TotalLineValue = "129.00", ItemDescription = "Mugs" }, new EasyPost.Models.API.LineItem { TotalLineValue = "45.50", ItemDescription = "T-shirts" }, } }; shipment = await client.Shipment.Create(parameters); Console.WriteLine(JsonConvert.SerializeObject(shipmentWithIds, Formatting.Indented)); } } } ``` #### Node.js ```javascript const EasyPostClient = require('@easypost/api'); const client = new EasyPostClient('EASYPOST_API_KEY'); (async () => { let shipment; shipment = await client.Shipment.create({ to_address: { name: 'Dr. Steve Brule', street1: '179 N Harbor Dr', city: 'Redondo Beach', state: 'CA', zip: '90277', country: 'US', email: 'dr_steve_brule@gmail.com', phone: '4155559999', }, from_address: { street1: '417 montgomery street', street2: 'FL 5', city: 'San Francisco', state: 'CA', zip: '94104', country: 'US', company: 'EasyPost', phone: '415-123-4567', }, parcel: { length: 20.2, width: 10.9, height: 5, weight: 65.9, }, line_items: [ { total_line_value: '129.00', item_description: 'Mugs', }, { total_line_value: '45.50', item_description: 'T-shirts', }, ], }); // or create by using IDs shipment = await client.Shipment.create({ to_address: { id: 'adr_...' }, from_address: { id: 'adr_...' }, parcel: { id: 'prcl_...' }, line_items: [ { total_line_value: '129.00', item_description: 'Mugs', }, { total_line_value: '45.50', item_description: 'T-shirts', }, ], }); console.log(shipment); })(); ``` #### PHP ```php shipment->create([ 'to_address' => [ 'name' => 'Dr. Steve Brule', 'street1' => '179 N Harbor Dr', 'city' => 'Redondo Beach', 'state' => 'CA', 'zip' => '90277', 'country' => 'US', 'phone' => '3331114444', 'email' => 'dr_steve_brule@gmail.com' ], 'from_address' => [ 'name' => 'EasyPost', 'street1' => '417 Montgomery Street', 'street2' => '5th Floor', 'city' => 'San Francisco', 'state' => 'CA', 'zip' => '94104', 'country' => 'US', 'phone' => '3331114444', 'email' => 'support@easypost.com' ], 'parcel' => [ 'length' => 20.2, 'width' => 10.9, 'height' => 5, 'weight' => 65.9 ], 'line_items' => [ [ 'total_line_value' => '129.00', 'item_description' => 'Mugs' ], [ 'total_line_value' => '45.50', 'item_description' => 'T-shirts' ] ] ]); echo $shipment; ``` #### Python ```python import easypost client = easypost.EasyPostClient("EASYPOST_API_KEY") shipment = client.shipment.create( to_address={ "name": "Dr. Steve Brule", "street1": "179 N Harbor Dr", "city": "Redondo Beach", "state": "CA", "zip": "90277", "country": "US", "phone": "4153334444", "email": "dr_steve_brule@gmail.com", }, from_address={ "name": "EasyPost", "street1": "417 Montgomery Street", "street2": "5th Floor", "city": "San Francisco", "state": "CA", "zip": "94104", "country": "US", "phone": "4153334444", "email": "support@easypost.com", }, parcel={ "length": 20.2, "width": 10.9, "height": 5, "weight": 65.9, }, line_items=[ { "total_line_value": "129.00", "item_description": "Mugs", }, { "total_line_value": "45.50", "item_description": "T-shirts", }, ], ) # or create by using IDs shipment = client.shipment.create( to_address={"id": "adr_..."}, from_address={"id": "adr_..."}, parcel={"id": "prcl_..."}, line_items=[ { "total_line_value": "129.00", "item_description": "Mugs", }, { "total_line_value": "45.50", "item_description": "T-shirts", }, ], ) print(shipment) ``` #### Ruby ```ruby require 'easypost' client = EasyPost::Client.new(api_key: 'EASYPOST_API_KEY') shipment = client.shipment.create( to_address: { name: 'Dr. Steve Brule', street1: '179 N Harbor Dr', city: 'Redondo Beach', state: 'CA', zip: '90277', country: 'US', phone: '4155559999', email: 'dr_steve_brule@gmail.com', }, from_address: { name: 'EasyPost', street1: '417 Montgomery Street', street2: '5th Floor', city: 'San Francisco', state: 'CA', zip: '94104', country: 'US', phone: '4153334445', email: 'support@easypost.com', }, parcel: { length: 20.2, width: 10.9, height: 5, weight: 65.9, }, line_items: [ { total_line_value: '129.00', item_description: 'Mugs', }, { total_line_value: '45.50', item_description: 'T-shirts', }, ], ) puts shipment ``` --- ## Process Tracking Event Webhooks Once a `Tracker` is created, either manually or during label purchase, EasyPost begins sending tracking updates as webhook `Events`. ### Test Mode - Sends a single tracking event in a supported status. - No additional events follow. ### Production Mode - Sends an initial event with status unknown. - Additional events follow as the carrier scans the shipment. ### Event Identification Tracking updates always use: - `object: “Event”` - `description: “tracker.updated”` - `result:` A nested `Tracker` object containing the latest `status` and details. The top-level `status` field on the `Tracker` object is the most reliable indicator for business logic. #### Example Tracking Event Webhook ```json { "id": "evt_...", "object": "Event", "created_at": "2014-11-19T10:51:54Z", "updated_at": "2014-11-19T10:51:54Z", "description": "tracker.updated", "mode": "test", "previous_attributes": { "status": "unknown" }, "pending_urls": [], "completed_urls": [], "result": { "id": "trk_...", "object": "Tracker", "mode": "test", "tracking_code": "EZ4000000004", "status": "delivered", "created_at": "2014-11-18T10:51:54Z", "updated_at": "2014-11-19T10:51:54Z", "signed_by": "John Tester", "weight": 17.6, "est_delivery_date": "2014-11-27T00:00:00Z", "shipment_id": null, "carrier": "UPS", "public_url": "https://track.easypost.com/djE7...", "tracking_details": [ { "object": "TrackingDetail", "message": "BILLING INFORMATION RECEIVED", "status": "pre_transit", "datetime": "2014-11-21T14:24:00Z", "tracking_location": { "object": "TrackingLocation", "city": null, "state": null, "country": null, "zip": null } }, { "object": "TrackingDetail", "message": "ORIGIN SCAN", "status": "in_transit", "datetime": "2014-11-21T14:48:00Z", "tracking_location": { "object": "TrackingLocation", "city": "SOUTH SAN FRANCISCO", "state": "CA", "country": "US", "zip": null } }, { "object": "TrackingDetail", "message": "DEPARTURE SCAN", "status": "in_transit", "datetime": "2014-11-22T08:51:00Z", "tracking_location": { "object": "TrackingLocation", "city": "SOUTH SAN FRANCISCO", "state": "CA", "country": "US", "zip": null } }, { "object": "TrackingDetail", "message": "ARRIVAL SCAN", "status": "in_transit", "datetime": "2014-11-23T09:31:00Z", "tracking_location": { "object": "TrackingLocation", "city": "SAN FRANCISCO", "state": "CA", "country": "US", "zip": null } }, { "object": "TrackingDetail", "message": "OUT FOR DELIVERY", "status": "out_for_delivery", "datetime": "2014-11-24T08:10:00Z", "tracking_location": { "object": "TrackingLocation", "city": "SAN FRANCISCO", "state": "CA", "country": "US", "zip": null } }, { "object": "TrackingDetail", "message": "DELIVERED", "status": "delivered", "datetime": "2014-11-19T10:51:54Z", "tracking_location": { "object": "TrackingLocation", "city": "SAN FRANCISCO", "state": "CA", "country": "US", "zip": null } } ] } } ``` Related: - [Event Object](https://docs.easypost.com/docs/trackers) --- ## Tracking Details The `tracking_details` array contains all current and historical status information returned by the carrier. Each `TrackingDetail` includes: - Carrier message (e.g., `“OUT FOR DELIVERY”`) - Status - Timestamp - `tracking_location` field with location data when supplied. Oldest events appear first, and new events are appended as they are received. Because carriers occasionally send updates out of order, use the top-level status field for any primary workflow logic. --- ## Time Zones and Geocoded Tracking Locations Carriers do not consistently supply time zone information. Some return timestamps in local time without a zone, while others include full time-zoned timestamps. Historically, timestamps without time zones were interpreted as UTC, which could misrepresent the actual event time. To improve accuracy, EasyPost now attempts to determine the correct time zone for a tracking event using available carrier location data. When a `tracking_location` contains usable details, including city, state, zip, or country, EasyPost: - Maps the location to a real-world geographic point. - Determines the likely time zone. - Stores and presents the timestamp with the correct time zone whenever possible. If sufficient information is provided, the timestamp may still use UTC or a best-effort estimate. #### Key considerations - Time zone precision depends on the level of detail provided by the carrier. - Not all carriers provide adequate location data. - Events with explicit time zones from the carrier are preserved as provided. Applications should treat timestamps as best-effort values rather than guaranteed time-zone-accurate across all carriers. | Scenario | Timestamp Format | Reasoning | | ---------------------------------------------- | ------------------------- | ----------------------------------------------------------------------------------------------------------- | | Geocoded location available (e.g., Denver, CO) | 2025-01-12T07:03:00-07:00 | A valid city/state/ZIP allows EasyPost to assign the correct local time zone based on the scan location. | | Insufficient location data (no city/state/ZIP) | 2025-01-12T14:03:00Z | Without enough geographic detail, timestamps default to UTC to ensure consistent and accurate presentation. | ### Confidence Levels When assigning a time zone to a tracking event, EasyPost evaluates the quality of available carrier location data. Each event is assigned a confidence level that reflects how precisely the location could be determined. Confidence levels are informational and should be treated as best-effort indicators. They do not guarantee absolute accuracy. | Confidence Level | Description | | ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | HIGH | Time zone determined using precise city and state information provided by the carrier. | | MEDIUM | Time zone inferred using postal code-level data where city or state information is unavailable. | | LOW | Time zone estimated using carrier fallback logic or interpolated location data when precise geographic details are missing. | | NULL | The carrier did not provide valid location information. When location data is unavailable or cannot be determined for a tracking event, associated location fields are returned as 'null'. | --- ## Re-engaging Customers with Tracking Data Tracking events can be used to provide proactive shipment updates and improve the post-purchase experience. ### Advanced Tracking (recommended) For a fully branded, no-code post-purchase experience that includes automated email and SMS notifications, EasyPost offers Advanced Tracking, powered by WeSupply. Advanced Tracking provides: - Custom-branded tracking pages - Automated email and SMS notifications - Split-shipment visibility - End-customer insights and reporting This option is ideal for teams seeking a complete branded experience without managing custom notification logic. ### Custom Notifications through the API For workflows that require full programmatic control, such as managing internal alerts, operational notifications, or integrations with existing systems, tracking webhooks can drive custom logic for email, SMS, or other channels. Common patterns include: - Linking recipients to the public tracking page using the `public_url`. - Sending email updates when key events occur, such as `out_for_delivery` and `delivered`. - Sending SMS updates using providers such as Twilio. ![Tracking Details Web](https://docs.easypost.com/images/guides/tracking/tracking-details-web.png) --- Source: https://docs.easypost.com/guides/ups-eu-regulatory-updates-guide # UPS — EU Regulatory Updates UPS caps `ProductID` at 100 characters. EasyPost transliterates non-ASCII values and truncates `code`, `manufacturer_product_id`, and `standardized_product_id` to the cap rather than failing the shipment. `code` accepts up to 128 characters at the EasyPost API, so it is the only one that can exceed 100 on length alone. Transliteration runs before truncation and can lengthen a value — `ß` and `ж` become two characters, `щ` becomes four. ## Background - EasyPost is rolling out changes so you can supply the data UPS requests for the new EU regulation changes through the existing shipment API. - Separately, UPS has temporarily suspended one Worldwide Economy lane it can no longer clear under the new rules. This guide covers all of these changes. - For the broad, cross-carrier picture of the EU regulatory changes, see the [EU Regulatory Updates](/guides/eu-regulatory-updates-guide) guide. --- ## UPS Shipper & Consignee Type - **What it is:** two UPS carrier options, `shipper_type` and `consignee_type`, that classify the **shipper** (sender) and the **consignee** (recipient) of a shipment as a **business** or a **consumer**. - EasyPost maps them to UPS's `GlobalTaxInformation/ShipperTypeValue` and `GlobalTaxInformation/ConsigneeTypeValue` fields on the shipment request. - **Why it matters:** UPS uses these classifications for EU de minimis customs handling. - Providing them helps ensure shipments clear customs correctly; UPS may hold or return shipments into the EU that omit them. - EasyPost only passes the values through to UPS if set, and does not infer these values from other values (such as `residential` flags on an address). Set them under `options.carrier_options.ups` when creating a shipment. Each is independent — send either one, both, or neither. - Accepted values (both fields): `business`, `consumer`, `not_applicable`. Anything else is rejected with a clear validation error. - Both are optional and independent. Omitting a field leaves that classification unsent; omitting both leaves the shipment unchanged from prior behavior (no `GlobalTaxInformation` sent). **How to use it:** ```json { "shipment": { "options": { "carrier_options": { "ups": { "shipper_type": "business", "consignee_type": "consumer" } } } } } ``` These values are sent on the `GlobalTaxInformation` block on the UPS `ShipConfirm` request. `ShipperTypeValue` always precedes `ConsigneeTypeValue` per the UPS schema sequence. For example, `shipper_type: "consumer"` + `consignee_type: "consumer"` produces: ```xml 02 02 ``` --- ## Tax Identifier Address - **What it is:** - An optional `address` on each entry of a shipment's `tax_identifiers`, so you can supply the address (and, through it, the name) tied to a tax registration — e.g. the registered address behind an IOSS/VAT registration. - **Why it matters:** - UPS exposes structured IOSS fields — Number + **Name** + **Address** — for shipments into the EU. - Previously EasyPost's `tax_identifiers` only accepted the ID number and type, so there was no way to pass the registered name/address UPS wants. - This change closes that gap. ```json { "shipment": { "tax_identifiers": [ { "tax_id": "IM1234567890", "tax_id_type": "IOSS", "issuing_country": "DE", "address": { "name": "ACME GmbH", "street1": "Friedrichstraße 1", "city": "Berlin", "zip": "10117", "country": "DE" } } ] } } ``` Or, referencing an existing saved address: ```json { "tax_identifiers": [ { "tax_id": "IM1234567890", "tax_id_type": "IOSS", "issuing_country": "IE", "address": { "id": "adr_5843b8dd903611f19a3d0022480b361d" } } ] } ``` - `address` accepts either a reference to an existing saved address (`{ "id": "adr_..." }`) or a full address object - Optional; omitting it preserves current behavior. - Fields are not specific to UPS and may be used by other carriers When an IOSS tax identifier carries an `address`, EasyPost emits it as an `IOSSContact` under `ShipFrom/VendorInfo` on the UPS request: ```xml Example Shipper LLC Example Shipper
123 Example St Suite 100 Anytown CA 90210 US
5555550100 IMDEU1234567 IOSS IMDEU1234567 0356 ACME IOSS Ltd
10 Rue de Rivoli Paris 75001 FR
``` --- ## Worldwide Economy to Germany: Duty-Unpaid Suspended (BYOA and DAP) **What it is:** a temporary guard that rejects UPS **Worldwide Economy duty-unpaid (DDU)** rate and buy requests destined for **Germany (DE)**. WWE duty-paid (DDP) and every non-WWE UPS service are unaffected. **Why it matters:** UPS asked EasyPost to temporarily stop sending WWE DDU to DE for **both** BYOA and the DAP program. EasyPost rejects these up front — a 422 at rate/buy time, before any UPS call — so you don't buy labels that would just be returned to sender. UPS currently has no ETA for when this service will be restored. **What's blocked vs. kept:** - **Blocked:** WWE duty-unpaid (DDU / DAP incoterm) to DE — all account types (BYOA _and_ the DAP program). - **Kept:** WWE duty-paid (DDP) to DE, and all non-WWE UPS services. **What you'll see:** - Rating or buying a WWE DDU shipment to DE returns a 422: `UPS Worldwide Economy is temporarily unavailable for duty-unpaid (DDU) shipments to Germany (DE).` - On the DAP-program rate path the same rejection surfaces as `SHIPMENT.RATES.UNAVAILABLE`. **A note on the two "DAP"s:** "duty-unpaid" here is the **incoterm** (DDU / DAP = "Delivered At Place"), _not_ the UPSDAP **account type**. The block keys off destination + duty status only, so it applies to BYOA and the DAP program WWE DDU / DAP only, not WWE DDP. This is a temporary restriction and will be removed once UPS lifts it. ## Summary | Change | What it adds | Why it's required | |---|---|---| | `shipper_type` / `consignee_type` | `carrier_options.ups.shipper_type` / `consignee_type` (business/consumer/not_applicable) → UPS `ShipperTypeValue` / `ConsigneeTypeValue` | EU de minimis customs classification | | `tax_identifiers[].address` | Optional `address` on `tax_identifiers[]` → UPS IOSS Name / Address | EU IOSS registered name/address | | Worldwide Economy → Germany | Temporarily blocks WWE duty-unpaid (DDU) rate/buy to DE (422); keeps DDP | UPS cannot clear WWE DDU volume into DE | --- Source: https://docs.easypost.com/guides/usps-ship-eu-regulatory-updates-guide # USPS Ship — EU Regulatory Updates USPS Ship requires `options.commerce_type` on commercial shipments (`merchandise` or `sample`) into the EU. For `B2C` shipments it also requires two EU product identifiers on every customs item, plus a third when the item has one. For the cross-carrier picture of the EU changes, see the [EU Regulatory Updates](/guides/eu-regulatory-updates-guide) guide. For what USPS requires, see the [USPS product identifier requirements](https://www.usps.com/international/product-identifiers.htm). --- ## When These Rules Apply - The destination country is one of the destinations below, **and** - `customs_info.contents_type` is `merchandise` or `sample`. The destinations follow the [USPS Postal Bulletin 22715](https://about.usps.com/postal-bulletin/2026/pb22715/html/updt_003.htm) listing. The applicable ISO country codes are: `AT`, `AX`, `BE`, `BG`, `BL`, `CY`, `CZ`, `DE`, `DK`, `EE`, `ES`, `FI`, `FR`, `GF`, `GI`, `GP`, `GR`, `HR`, `HU`, `IE`, `IT`, `LT`, `LU`, `LV`, `MC`, `MF`, `MQ`, `MT`, `NL`, `PL`, `PT`, `RE`, `RO`, `SE`, `SI`, `SK`, `SM`, `YT` Other shipments are unchanged. Missing required fields are caught when you **buy** a label, not when you request rates. An invalid `commerce_type` value is rejected earlier, when you create the shipment. > Note: `commerce_type` is required for these shipments. Buying a label without it fails. --- ## Commerce Type Set `options.commerce_type` to one of the values below. Lowercase is accepted and normalized. An unknown value is rejected when you create the shipment, and a missing value is rejected when you buy the label, with an error naming `options.commerce_type`. | commerce_type | Meaning | Product identifiers sent to USPS | |---|---|---| | `B2C` | Business to consumer | Yes — code and manufacturer_product_id on every item; standardized_product_id when the item has one | | `B2B` | Business to business | No — ignored even if you supply them | | `C2B` | Consumer to business | No — ignored even if you supply them | | `C2C` | Consumer to consumer | No — ignored even if you supply them | - `B2C` and `B2B` are the commercial classifications. `C2B` and `C2C` are your declaration that the shipment is not commercial, so no commercial classification or product identifiers are sent to USPS. --- ## Product Identifiers For `B2C`, every customs item needs `code` and `manufacturer_product_id`. `standardized_product_id` is optional: include it when the item has a standardized identifier such as a UPC or ISBN, and leave it out otherwise. See the [EU Regulatory Updates](/guides/eu-regulatory-updates-guide) guide for what each means. | EasyPost field | Identifier | USPS Ship length | |---|---|---| | `code` | M-PID — merchant product ID | 1–50 characters | | `manufacturer_product_id` | NS-PID — manufacturer product ID | 1–64 characters | | `standardized_product_id` | S-PID — standardized ID (e.g. UPC, ISBN, GTIN/EAN). Optional; send only when the item has one | 1–50 characters | - Values cannot contain the characters `[`, `]`, `;`, or `=`, or control characters such as tabs and newlines. - USPS Ship does **not** transliterate or truncate. A missing `code` or `manufacturer_product_id`, or a too-long or invalid value, is rejected with an error naming the field. - The EasyPost API accepts longer `code` (up to 128) and `standardized_product_id` (up to 64) values, so creating the shipment succeeds and an over-limit value fails when you buy the label. `manufacturer_product_id` is limited to 64 by the API, so a longer value is rejected when you create the shipment. **Example:** the EU-specific part of a shipment request. See the [Shipments](/docs/shipments) docs for the full request. Each customs item also needs a `weight` in ounces greater than 0. ```json { "shipment": { "options": { "commerce_type": "B2C" }, "customs_info": { "contents_type": "merchandise", "customs_items": [ { "description": "Women's 100% Cotton T-Shirt, Navy, L", "quantity": 1, "value": "12.00", "weight": 8, "hs_tariff_number": "6109.10.0012", "origin_country": "US", "code": "123456", "manufacturer_product_id": "SH123456", "standardized_product_id": "00012345600012" } ] } } } ``` ## Summary | Change | What it does | Why it's required | |---|---|---| | `options.commerce_type` | Classifies the shipment as B2C, B2B, C2B or C2C. Required for commercial shipments to the EU. | USPS customs declaration for EU-bound commercial shipments | | Product identifiers | For `B2C`, `code`, `manufacturer_product_id` are required on every customs item. `standardized_product_id` is sent only when the item has one. They are sent to USPS as the EU product identifiers. | EU PID mandate (November 1, 2026) | --- Source: https://docs.easypost.com/guides/vcr-guide # Use VCR to Test Integrations This guide will focus on why you should use a VCR for testing against the EasyPost API and the features that we recommend to use. --- ## Why to use a VCR when testing against the EasyPost API Unit testing external APIs can be time-consuming and non-deterministic because the unit test has to rely on the external service, and assertions would fail if the API response is inconsistent. Down below, you can see the potential problem and the workaround to fix it. ### Problem When you're writing a unit test that makes a live API call to EasyPost, our system communicates with other carriers in real-time, meaning you cannot be certain that a valid response will be received, network connectivity issues, downtime and internal problems could cause an API call to return irregular data, which may result in unit test failures. In the past, we have seen a few users making thousands of live API calls in unit testing, which resulted in a Rate Limit for the user to our server and caused issues with the unit testing as the API is returning status code 429. ### Solution To prevent these issues and improve your backend unit testing performance, you should use a VCR for the unit testing. A VCR is a tool that records HTTP requests and responses to a "cassette" file which can be replayed on later runs of the test suite as if it was the real response. This effectively enables offline testing as well as ensuring that a given API call will always return the exact same data every time. In one of our engineering blogs about why you should use [VCR for API testing](https://www.easypost.com/blog/2022-10-04-vcr-the-must-have-companion-for-api-testing), we have proved that the unit testing speed went up 50x by using the VCR in our Python Client Library. --- ## VCR tools we used in our Client Libraries | Language | VCR name | Documentation | |---|---|---| | Python | vcrpy | [https://vcrpy.readthedocs.io/en/latest](https://vcrpy.readthedocs.io/en/latest) | | Java | easyvcr-java | [https://github.com/EasyPost/easyvcr-java](https://github.com/EasyPost/easyvcr-java) | | C# | easyvcr-csharp | [https://github.com/EasyPost/easyvcr-csharp](https://github.com/EasyPost/easyvcr-csharp) | | PHP | php-vcr | [http://php-vcr.github.io](http://php-vcr.github.io) | | Node | polly.js | [https://netflix.github.io/pollyjs](https://netflix.github.io/pollyjs) | | Ruby | vcr | [https://github.com/vcr/vcr](https://github.com/vcr/vcr) | | Go | go-vcr | [https://github.com/dnaeon/go-vcr](https://github.com/dnaeon/go-vcr) | --- ## Features we recommend using VCR provides flexibility by offering some advanced features. We highly recommend you use the below features. ### Request matching To replay previously-recorded cassettes, the VCR needs to match a pending HTTP request against the details of the recorded one. By default, a recording is often matched based only on the HTTP method and URI. You can customize the rules to account for other elements of a recorded request during the matching process, such as: - **Host**: The domain name of the server - **Body**: The body of the API request - **Header**: The request headers - **Path**: The path of the URI - **Query**: The query string of the request URI This feature is highly recommended if you have many unit tests that make API calls to the same endpoint, where matching only by method and URI could accidentally cause the wrong recording to be used. ### Filter sensitive data When interacting with an API service, you will often need to provide sensitive information in the request, such as an API key for authentication. This data may be written to the cassette file in plaintext, which can pose a serious problem in a public repository or when checking code into a version control system. Most VCR tools come with an option to censor data prior to storing the request in the cassette file. Our client libraries test suites utilize censoring to redact sensitive data, including API keys and PII such as phone numbers and email addresses, in our cassettes.You can find an example of the full code configuration in our [Ruby library](https://github.com/EasyPost/easypost-ruby/blob/5fde8154a43549fa35ba6fedfae48c6ab5c912d6/spec/support/vcr.rb#L36-L69) which uses the built-in **filter_sensitive_data** feature. ### Re-record the cassette by using expiration date While recording and replaying cassettes can help prevent data inconsistencies in your testing, you may want to eventually re-record your cassettes to account for any changes to response schemas. In most VCR tools, you can set an expiration date for a given cassette or recording, which the VCR will check during the replay process. You can often configure different actions for the VCR to take when it discovers an expired recording, such as warning the user, throwing an error, or even automatically re-recording the request. [Content omitted: related links and resources. Review the rendered documentation for navigation links.] --- Source: https://docs.easypost.com/guides/webhooks-guide # Webhooks Guide Several types of objects are processed asynchronously in the EasyPost system (e.g., Batches, Trackers). To provide updates on these background tasks, EasyPost dispatches webhook events whenever a new Event occurs. ### Understanding Webhooks Webhooks are push notifications (or callbacks) that keep applications up-to-date on the status of EasyPost objects. - Webhooks eliminate the need to poll for updates. - When triggered, each webhook sends an Event via HTTP `POST` request to the configured webhook URL. - A successful `2XX` response is exepected from each webhook; in the event of a failure, EasyPost retries the webhook. ### Webhook Examples - Webhook POST JSON - Retrieve a Webhook Event JSON - Receiving a Webhook Related: - [API Documentation](https://docs.easypost.com/docs/events) --- ## Prerequisites - An active EasyPost account. - Configure webhook URLs in the EasyPost account page. - Application readiness to handle and process webhook events. - Use HMAC validation or basic authentication with HTTPS to secure the webhook endpoint. --- ## Webhook Authentication Securing webhook endpoints is crucial to ensure data integrity and authenticity. EasyPost recommends two primary methods for securing webhooks: ### HMAC Validation HMAC validation ensures webhook data is untampered during transmission. Include a `webhook_secret` when creating or updating a webhook. EasyPost generates a signature with this secret, sent via the `X-Hmac-Signature` header in each event. Use `validate_webhook()` from EasyPost's client libraries (the function name may vary depending on the programming language; refer to the respective library documentation for the exact name). Pass the webhook secret, headers, and event body to this function. If the signature matches, the webhook is valid; otherwise, the event should be rejected to prevent fraudulent data. For a full description of how validation works, including timestamp verification and signature calculation, see the Webhook HMAC Validation Help Center article. This article describes the complete validation process for teams that need to understand or implement the logic manually. Related: - [EasyPost Client Libraries](https://docs.easypost.com/libraries) - [Webhook HMAC Validation](https://support.easypost.com/hc/en-us/articles/39826034964237-Webhook-HMAC-Validation) ### Basic Authentication Basic authentication requires a username and password in the webhook URL. For example: `https://username:secret@www.example.com/easypost-webhook` EasyPost will deliver a webhook to this endpoint, including an Authorization header. Validate the credentials to ensure they match stored values; otherwise, reject the webhook. #### Create a Webhook [Content omitted: API request example. Review the rendered documentation for complete request payloads, parameters, and code samples.] --- ## TLS and Certificate Validation EasyPost performs certificate validation and requires that any webhook recipient using TLS (HTTPS) must have a certificate signed by a trusted public certification authority. This helps ensure that the data being transmitted is secure. Webhooks sent over outdated or insecure protocols, such as SSLv2 or SSLv3, are not supported. Additionally, any connection using export-grade ciphers will be rejected. Refer to Mozilla's guide to Server-Side TLS and Qualys's SSL/TLS Deployment Best Practices for guidance on properly securing server configurations. --- ## Event Filtering and Safelisting ### Event Type Header To streamline event handling, EasyPost adds an `X-Easypost-Event-Type` header to webhook requests. Load balancers can use this header to filter out non-essential events without parsing the entire payload, reducing infrastructure load. --- ## Custom Outbound headers EasyPost supports custom headers on outbound webhook requests, allowing up to **three custom headers**, each with a name and value under **1000 ASCII characters**. The header names and values are stored and returned as plaintext. This feature allows customers to meet specific API gateway needs, such as load balancing or custom authorization checks, for more flexible integrations. ### Naming Conventions and Format The `custom_headers` attribute in the webhook object is a list of key-value pairs, where each entry consists of: - `` and `` must be valid strings, with a **character limit of 1000**. - Each `` must be **unique** within a webhook request. ### Validation Requirements - Custom headers must be specified as an **array of key-value pairs**. - If the `custom_headers` attribute is included in a `POST` or `PATCH` request, both `name` and `value` must be set for each header. - Only ASCII characters are allowed in both `` and ``. ### Blocked Header Names and Prefixes Certain headers are restricted to prevent conflicts with system-defined values: - Headers prefixed with `X-EasyPost-*` **cannot be used**. Any attempt to set a custom header with this prefix will result in a failure. - Headers using an existing `X-*` standard name or non-standard `X-*` headers will be overwritten in case of a conflict by EasyPost during webhook dispatch. ### Security - Custom header values are stored in plaintext in EasyPost's secure database. Encryption is **not** applied, so it is **strongly recommended** to use pre-encrypted values where necessary. - Headers should **not contain sensitive information** unless properly secured before transmission. ### Updating Custom Headers - Custom headers can be modified using a `PATCH` request. - The entire list of headers will be replaced with the new list provided in the request. Individual additions or deletions of specific headers are **not supported**. ### RFC Compliance All custom header names must conform to RFC 7230/ RFC 9112 formatting rules to ensure compatibility with standard HTTP header specifications. --- ## Response Time Webhooks require a response within seven seconds. If no response is received, EasyPost will automatically retry the webhook. **Recommendation:** Process the event in a background worker and immediately return a `2XX` status code to avoid duplicate notifications. --- ## Retrying Failed Webhooks EasyPost will retry failed webhook deliveries up to six times, with an increasing delay between retries. --- ## Handling Sensitive Data Avoid exposing sensitive information within webhook payloads. Secure transmission methods such as HTTPS and encryption are strongly recommended. --- ## Testing Webhook Integrations To understand webhook event contents, use an endpoint mocking service like Beeceptor to create a simple endpoint for inspecting webhook requests. > Note: EasyPost does not endorse Beeceptor; verify its security measures before sending actual user data. --- ## FAQs **Q: How many times will EasyPost attempt to deliver a webhook?** A: EasyPost will retry failed webhooks six times, with increasing delay intervals between attempts. **Q: What HTTP status code is required for webhooks?** A: A `2XX` status code is required, with `200 OK` or `200 Accepted` preferred. **Q: How long is there to respond to a webhook?** A: Respond within seven seconds. If no response is sent, the webhook event is considered a failure and will be retried. **Q: How can webhook integrations be tested?** A: Webhooks triggered in the **Test** environment behave the same way as in **Production**. Use services like Beeceptor to mock public endpoints for local testing. **Q: Can I allowlist EasyPost webhook source IP addresses?** A: EasyPost does not provide a fixed or guaranteed list of source IP addresses, CIDR ranges, or ASNs for outbound webhook delivery. Because our delivery infrastructure may change, IP-based allowlisting is not a supported method for authenticating EasyPost webhooks. Instead, we recommend using HMAC signature validation to verify the authenticity and integrity of incoming webhook requests. See our Webhook HMAC Validation Guide for implementation details. **Q: Does EasyPost support HTTPS webhook delivery?** A: Yes. EasyPost supports HTTPS webhook endpoints, using port 443 by default for standard HTTPS URLs. HTTPS is recommended to protect webhook data in transit. HTTPS endpoints must have a valid certificate signed by a trusted public certificate authority. **Q: Can webhooks be received for packages not shipped through EasyPost?** Yes, create an EasyPost Tracker object using the desired tracking code to receive webhooks for non-EasyPost shipments. **Q: How many webhook endpoints can be designated?** Most users configure 1–5 endpoints, but up to 30 endpoints can be designated. If more are needed, contact EasyPost support. --- ## Webhook Examples #### Webhook POST JSON Example ```json { "mode": "production", "description": "batch.created", "previous_attributes": { "state": "purchasing" }, "pending_urls": ["example.com/easypost-webhook"], "completed_urls": [], "created_at": "2015-12-03T19:09:19Z", "updated_at": "2015-12-03T19:09:19Z", "result": { "id": "batch_...", "object": "Batch", "mode": "production", "state": "purchased", "num_shipments": 1, "reference": null, "created_at": "2015-12-03T19:09:19Z", "updated_at": "2015-12-03T19:09:19Z", "scan_form": null, "shipments": [ { "batch_status": "postage_purchased", "batch_message": null, "id": "shp_a5b1348307694736aaqqqq8fqda53f93" } ], "status": { "created": 0, "queued_for_purchase": 0, "creation_failed": 0, "postage_purchased": 1, "postage_purchase_failed": 0 }, "pickup": null, "label_url": null }, "id": "evt_...", "object": "Event" } ``` #### Retrieve a Webhook Event JSON Example ```json { "description": "tracker.updated", "mode": "test", "previous_attributes": { "status": "pre_transit" }, "created_at": "2022-10-26T20:18:21.000Z", "pending_urls": [], "completed_urls": [], "updated_at": "2022-10-26T20:18:21.000Z", "id": "evt_55a53eb2556b11ed8945059f515d2b6d", "user_id": "user_060ab38db3c04ffaa60f262e5781a9be", "status": "pending", "object": "Event" } ``` #### Receiving a Webhook Example ```ruby require 'easypost' require 'sinatra' post '/easypost-webhook' do result = params['result'] case result['object'] when 'Batch' batch = client.batch.create(result) case batch.state when 'purchase_failed' batch.shipments.each do |shipment| if shipment.batch_status == 'postage_purchase_failed' client.batch.remove_shipments(batch.id, shipments: [shipment]) end end end end end ``` --- ## Additional Resources Related: - [Configuring Webhooks](https://support.easypost.com/hc/en-us/articles/360040154392-Configuring-Webhooks) - [Help Center](https://support.easypost.com/hc/en-us) --- Source: https://docs.easypost.com/carriers/accurate-courier-express-guide # Accurate Courier Express Guide Accurate Courier Express is a family-owned and operated logistics services company headquartered in Richmond, VA. It has more than 70 years of experience in the delivery services and logistics industry and a team of professionals who have grown with businesses and industry leaders. This guide includes detailed information on utilizing Accurate Courier Express shipping with the EasyPost API, focusing on account setup, rates, label creation, manifests, tracking, and more. --- ## Carrier Account Setup ### Account Registration Sign up for an EasyPost account to obtain a **Test** and **Production** API key. See Authentication and Key Management for more information. > Note: Negotiated rates are only available in Production mode. ### Carrier Setup Upon sign-up with EasyPost, users gain immediate access to Wallet Carrier Accounts, which can be enabled directly from the Dashboard. For additional carriers, EasyPost supports a Bring Your Own Carrier Account (BYOCA) option. This requires users to register directly with the respective carrier. #### Accurate Courier Express Account Registration 1. Contact Accurate Courier Express to request a shipper account. A representative will be in touch for additional details regarding the account. 2. Inform Accurate Courier Express about using EasyPost's API for label purchases. 3. Acquire rates and align any additional shipping needs. 4. Obtain the following production and test account credentials from Accurate Courier Express: 1. Accurate Username 2. Accurate Password 5. Input carrier-specific credentials within the EasyPost Carrier Account Dashboard for comprehensive rate access. #### Accurate Courier Express Account via API The API structure specified by EasyPost can also be used to add the carrier account. ```shell curl -X POST https://api.easypost.com/v2/carrier_accounts \ -u "$EASYPOST_API_KEY": \ -H 'Content-Type: application/json' \ -d '{ "carrier_account": { "type": "AccurateAccount", "description": "AccurateAccount", "credentials": { "password": "VALUE", "username": "VALUE" }, "test_credentials": { "password": "VALUE", "username": "VALUE" } } }' ``` ### Software Requirements Download an EasyPost Client Library or utilize the REST API with cURL. ### Documentation Review Examine the EasyPost Objects section to understand the API's structure, which is critical for constructing requests and interpreting responses. Related: - [Getting Started Guide](https://docs.easypost.com/guides/getting-started) - [Manage Carrier Accounts](https://app.easypost.com/account/settings?tab=carriers) --- ## Billing Billing is directly handled by Accurate Courier Express using a bill-on-delivery system. EasyPost does not participate in the billing process for Accurate Courier Express services. Contact an Accurate Courier Express representative for details. --- ## Rates ### Default Rate Display EasyPost always returns a $0.01 placeholder rate for Accurate Courier Express shipments. Live postage rates are not returned through this integration. Accurate Courier Express bills the actual postage through its billing system. --- ## Service Levels Accurate Courier Express offers the following service levels: Service levels are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=accurate`. Related: - [Service Levels](https://docs.easypost.com/docs/shipments/rates#service-levels) Related: - [Accurate Courier Express Service Levels](https://docs.easypost.com/docs/shipments/rates?carrier=accurate#service-levels) --- ## Predefined Packages Predefined packages provide a convenient way to classify parcels using carrier-defined package types and retrieve applicable rates. When creating a shipment with the EasyPost API, select a predefined package that matches the parcel's characteristics and provide its weight in ounces when required. See the predefined package documentation for supported values and example requests. Predefined packages are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=accurate`. Related: - [Predefined Packages](https://docs.easypost.com/docs/parcels#predefined-packages) --- ## Generating Shipping Labels With EasyPost, generating shipping labels for Accurate Courier Express is the same process as generating them for any other carrier. Review the Getting Started Guide for help generating a shipping label. ### One-Call Buys 1-call buys enable streamlined label purchasing through the EasyPost API by consolidating multiple operations into a single API request. This feature is designed to simplify and accelerate the shipping process by combining the creation of a shipment, retrieval of rates, and purchasing the shipping label into one efficient step. See Reducing API Response Times for more information. ### Manifests Manifesting is **not** supported or required for Accurate Courier Express. ### Returns Returns are **not** supported for the EasyPost Accurate Courier Express integration. ### Refunding and Voiding Labels Voiding Accurate Courier Express labels through EasyPost is supported. > Note: The **shipment.tracking_code** is required as it identifies the order within the carrier's system. ### Shipment Options Shipment options are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=accurate`. Related: - [Shipment Options](https://docs.easypost.com/docs/shipments/options) #### Label Formats EasyPost offers native Accurate Courier Express labels in PNG, ZPL, and PDF formats. Related: - [Shipment Documentation](https://docs.easypost.com/docs/shipments) - [Reducing API Response Times](https://support.easypost.com/hc/en-us/articles/360048825772-Reducing-API-Response-Times) --- ## Hazardous Materials (HAZMAT) The Accurate Courier Express policy on hazardous materials is not explicitly detailed in this guide. Shippers are advised to contact Accurate Courier Express directly for specific hazmat inquiries. --- ## Pickups Accurate Courier Express accommodates pickups based on individual agreements with customers. While regular pickups can be arranged directly with Accurate Courier Express during the account registration process, they **cannot be scheduled via the EasyPost API**. --- ## Tracking EasyPost simplifies package tracking by offering two methods: - Tracking with an existing number and carrier. - Using a Tracker included with an EasyPost-purchased shipping label. The service integrates webhooks for timely shipment updates. For detailed information on tracking methods, visit the Tracking Guide. Related: - [Trackers Documentation](https://docs.easypost.com/docs/trackers) - [Trackers Guide](https://docs.easypost.com/guides/tracking-guide) --- ## Additional Resources ### Carrier Metadata The Carrier Metadata endpoint can programmatically return information about service levels, predefined packages, supported features, and shipment options. Use this information to quickly integrate and make educated decisions about the mix of carriers for shipping needs. Additionally, the Carrier Metadata endpoint is available to retrieve comprehensive information about all carriers on the EasyPost platform, enhancing decision-making for carrier services. ### Support and Troubleshooting In addition to the guidance provided in the Carrier Guides, EasyPost offers support to assist with FAQs, troubleshooting issues, and inquiries related to the EasyPost platform. Visit the Help Center for more information. Related: - [Carrier Metadata](https://docs.easypost.com/docs/carrier-metadata) - [Help Center](https://support.easypost.com/hc/en-us) --- ## Talk to a Shipping Expert For questions about getting started with the EasyPost API please talk to a Shipping Expert or Contact Support. Related: - [Talk to a Shipping Expert](https://www.easypost.com/talk-to-easypost) - [Contact Support](https://support.easypost.com/hc/requests/new) --- Source: https://docs.easypost.com/carriers/amazon-shipping-guide # Amazon Shipping Guide Amazon Shipping offers reliable and on-time ground shipping for Amazon selling partners. With competitive rates designed to facilitate increased shipping efficiency and reduce concerns, more focus can be directed toward growing the business and maintaining a strong competitive edge. This guide includes detailed information on utilizing Amazon Shipping with the EasyPost API, focusing on account setup, rates, label creation, manifests, tracking, and more. For region-specific capabilities and frequently asked questions, see the Amazon Shipping Support & FAQs article. Related: - [Amazon Shipping Support & FAQs](https://support.easypost.com/hc/en-us/articles/47769104582925-Amazon-Shipping-Support-and-FAQs) --- ## Carrier Account Setup ### Account Registration Sign up for an EasyPost account to obtain a **Test** and **Production** API key. See Authentication and Key Management for more information. > Note: Negotiated rates are only available in Production mode. ### Carrier Setup Upon sign-up with EasyPost, users gain immediate access to Wallet Carrier Accounts, which can be enabled directly from the Dashboard. For additional carriers, EasyPost supports a Bring Your Own Carrier Account (BYOCA) option. This requires users to register directly with the respective carrier. #### Amazon Shipping Account Registration 1. Contact Amazon Shipping to request a shipper account. A representative will be in touch for additional details regarding the account. 2. Inform Amazon Shipping about using EasyPost's API for label purchases. 3. Acquire rates and align any additional shipping needs. #### Account Authorization 1. Log in to EasyPost and navigate to **Account Settings**. 2. Select the **Carriers** tab. 3. Search and select **Amazon Shipping**. 4. Select marketplace type. 5. Select marketplace region. 6. Add a description for the Amazon Shipping account and **Save and Connect**. 7. Users will be redirected ship.amazon.com to for OAuth authorization. 8. Log in to the Amazon Shipping account and authorize EasyPost. 9. Once authorized, details such as `account_number`, `refresh_token`, and `partner_oauth_url` will be automatically populated in the user's account settings. 10. Users are now ready to ship with Amazon Shipping! #### Amazon Shipping Account via API To create and validate a new Amazon Shipping account through the EasyPost API, an OAuth authorization process is required. This process ensures secure connection and verification with Amazon Shipping. The API structure specified by EasyPost supports adding an Amazon Shipping carrier account. Use the following example `curl` request to initiate the OAuth-based account creation: ```shell curl -X POST https://api.easypost.com/v2/carrier_accounts/register_oauth \ -u "$EASYPOST_API_KEY": \ -H 'Content-Type: application/json' \ -d '{ "carrier_account_oauth_registrations": { "type": "AmazonShippingAccount", "description": "My Shipping Account (optional)", "reference": "Internal reference id (optional)", "return_to_url": "https://example.com (optional)", "credentials": { "account_type": "shipper", "account_country": "US" } } }' ``` ### Software Requirements Download an EasyPost Client Library or utilize the REST API with cURL. ### Documentation Review Examine the EasyPost Objects section to understand the API's structure, which is critical for constructing requests and interpreting responses. Related: - [Getting Started Guide](https://docs.easypost.com/guides/getting-started) - [Manage Carrier Accounts](https://app.easypost.com/account/settings?tab=carriers) --- ## Billing When using an Amazon Shipping BYOCA, shipment charges are billed under the shipper's own Amazon Shipping account. --- ## Rates Amazon Shipping is a **Live Rating** integration, enabling real-time rate retrieval for shipments created via EasyPost. Rates are guaranteed valid for a minimum of five minutes. - When creating a shipment, EasyPost requests Amazon Shipping for shipment rates specific to the user's Amazon Shipping account. - The rates provided are directly from Amazon Shipping and tailored to the user's specific account details. - In cases of discrepancies or incorrect rates, users are advised to contact their Amazon Shipping account representative. - The representative can then update the rates to ensure user account accuracy. --- ## Service Levels Amazon Shipping offers the following service levels: Service levels are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=amazonshipping`. Related: - [Service Levels](https://docs.easypost.com/docs/shipments/rates#service-levels) Related: - [Amazon Shipping Service Levels](https://docs.easypost.com/docs/shipments/rates?carrier=amazonshipping#service-levels) --- ## Predefined Packages Predefined packages provide a convenient way to classify parcels using carrier-defined package types and retrieve applicable rates. When creating a shipment with the EasyPost API, select a predefined package that matches the parcel's characteristics and provide its weight in ounces when required. See the predefined package documentation for supported values and example requests. Predefined packages are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=amazonshipping`. Related: - [Predefined Packages](https://docs.easypost.com/docs/parcels#predefined-packages) --- ## Generating Shipping Labels ### Manifests Manifesting is **not** supported or required for Amazon Shipping. ### Refunding and Voiding Labels Voiding Amazon Shipping labels through EasyPost is supported. ### Shipment Options Shipment options are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=amazonshipping`. Related: - [Shipment Options](https://docs.easypost.com/docs/shipments/options) #### Label Formats EasyPost offers native Amazon Shipping labels in ZPL, PNG, and PDF formats. ### Amazon Shipments vs External Shipments Amazon Shipping categorizes shipments into two types: #### Amazon Shipments These originate from an **AMAZON** order and require specific order details: - A `to_address` is not required for **AMAZON** orders. The `to_address` will be populated from the Amazon Shipping API. Any `to_address` that is provided will be discarded. - The information must be included in the `fulfiller_order_items` field of the **shipment.options**. - The shipment is classified as **AMAZON** if the `fulfiller_order_items` field is populated. - The weight of each item in **AMAZON** shipments must not exceed the total package weight; otherwise, the shipment request will be rejected. #### Example ```json { "fulfiller_order_items": [ { "amazon_order_id": "order_...", "items": [ { "item_identifier": "item_...", "quantity": 1, "item_weight": { "unit": "OUNCE", "value": 4.0 }, "item_value": { "unit": "USD", "value": 20.0 }, "serial_numbers": ["000123", "000456"], "description": "Cotton T-Shirt", "hs_tariff_number": "610910" } ] } ] } ``` #### External Shipments External shipments are shipments that do not originate from the Amazon Marketplace. These shipments do not require the `fulfiller_order_items` field. > Note: Amazon requires Third-Party Logistics (3PL) customers to include the **Package Client Reference ID** for shipments originating from **AMAZON** orders as well as **EXTERNAL** shipments. This ID should be passed via the `print_custom_1` shipment option. If `print_custom_1` is not provided, the shipment ID is used as the Package Client Reference ID. ### Seller Display Name To use the seller display name feature, pass the name with the `merchant_name` shipment option. The value appears on the Tracking website, in Email and SMS notifications, and on the shipping label next to "Seller Name:". Related: - [Shipment Documentation](https://docs.easypost.com/docs/shipments) --- ## Hazardous Materials (HAZMAT) Amazon Shipping supports the shipment of certain dangerous goods. These must be declared using the `shipment.options.hazmat` field. > Note: For classes 2 and 3, the `shipment.options.liquid_volume_fl_oz` field is also required. ### Supported Classes and UN Codes #### Class 2 - Gases Flammable and non-flammable non-toxic gases (e.g., aerosols, gas cartridges): `”UN1950”`, `”UN2037”`, `”UN1956”` #### Class 3 - Flammable Liquids Includes items such as nail polish, hand sanitizers, perfumes, essential oils, acetone, and adhesives: `”UN1090”`, `”UN1120”`, `”UN1123”`, `”UN1130”`, `”UN1169”`, `”UN1170”`, `”UN1173”`, `”UN1197”`, `”UN1213”`, `”UN1266”`, `”UN1272”`, `”UN1993”`, `”UN2046”`, `”UN2052”`, `”UN2319”`, `”UN2541”`, `”UN2924”`, `”UN3271”`, `”UN3272”` #### Class 9 - Miscellaneous Dangerous Goods Products shipped with or containing lithium-ion batteries below 100 Wh, such as mobile phones, cameras, or electric toothbrushes: `”UN3481”`, `”UN3091”` --- ## Pickups Amazon Shipping accommodates pickups based on individual agreements with customers. While regular pickups can be arranged directly with Amazon Shipping during the account registration process, they **cannot be scheduled via the EasyPost API**. --- ## Tracking EasyPost simplifies package tracking by offering two methods: - Tracking with an existing number and carrier. - Using a Tracker included with an EasyPost-purchased shipping label. The service integrates webhooks for timely shipment updates. For detailed information on tracking methods, visit the Tracking Guide. ### Standalone Tracking Amazon Shipping supports standalone tracking when the shipment was created using the Amazon Shipping API. Tracking availability is determined by whether the package was purchased through Amazon's API and is not related to the EasyPost environment. Any shipment created with the Amazon Shipping API can be tracked through EasyPost, including Amazon Marketplace orders, as long as valid Amazon Shipping API credentials are provided. To enable standalone tracking through EasyPost, the customer must: - Have an Amazon Shipping API credential - Create the shipment using Amazon's API - Use the `"AmazonShipping"` carrier string when creating the Tracker. > Important: Only Amazon Shipping accounts are supported. Amazon Seller accounts cannot authenticate with the Amazon Shipping integration and cannot be used for tracking. Related: - [Trackers Documentation](https://docs.easypost.com/docs/trackers) - [Trackers Guide](https://docs.easypost.com/guides/tracking-guide) --- ## Additional Resources ### Carrier Metadata The Carrier Metadata endpoint can programmatically return information about service levels, predefined packages, supported features, and shipment options. Use this information to quickly integrate and make educated decisions about the mix of carriers for shipping needs. Additionally, the Carrier Metadata endpoint is available to retrieve comprehensive information about all carriers on the EasyPost platform, enhancing decision-making for carrier services. ### Support and Troubleshooting Amazon Shipping offers a dedicated support team by phone, chat, and email. To reach it, log in to the Amazon Shipping account and use the Contact Us page. In addition to the guidance provided in the Carrier Guides, EasyPost offers support to assist with FAQs, troubleshooting issues, and inquiries related to the EasyPost platform. Visit the Help Center for more information. Related: - [Carrier Metadata](https://docs.easypost.com/docs/carrier-metadata) - [Help Center](https://support.easypost.com/hc/en-us) --- ## Talk to a Shipping Expert For questions about getting started with the EasyPost API please talk to a Shipping Expert or Contact Support. Related: - [Talk to a Shipping Expert](https://www.easypost.com/talk-to-easypost) - [Contact Support](https://support.easypost.com/hc/requests/new) --- Source: https://docs.easypost.com/carriers/apc-guide # APC Postal Logistics Guide APC Postal Logistics empowers businesses to succeed globally with innovative delivery solutions. From seamless international shipping to precision-focused mail operations, they combine advanced technology, reliable service, and tailored support. Their expertise enables eCommerce brands, 3PLs, and mailing organizations to expand, optimize operations, and build lasting connections with customers worldwide. This guide includes detailed information on utilizing APC shipping with the EasyPost API, focusing on account setup, rates, label creation, manifests, tracking, and more. For operational details, shipment nuances, and frequently asked questions, refer to the APC Postal Logistics Carrier Support and FAQs article. Related: - [APC Postal Logistics Carrier Support and FAQs](https://support.easypost.com/hc/en-us/articles/42925800177421-APC-Postal-Logistics-Carrier-Support-and-FAQs) --- ## Carrier Account Setup ### Account Registration Sign up for an EasyPost account to obtain a **Test** and **Production** API key. See Authentication and Key Management for more information. > Note: Negotiated rates are only available in Production mode. ### Carrier Setup Upon sign-up with EasyPost, users gain immediate access to Wallet Carrier Accounts, which can be enabled directly from the Dashboard. For additional carriers, EasyPost supports a Bring Your Own Carrier Account (BYOCA) option. This requires users to register directly with the respective carrier. #### APC Shipper Account Registration 1. Contact APC to request a shipper account. A representative will be in touch for additional details regarding the account. 2. Inform APC about using EasyPost's API for label purchases. 3. Acquire rates and align any additional shipping needs. 4. Obtain the following production and test credentials: 1. APC Facility 2. APC Password 3. APC Shipper ID 5. Input carrier-specific credentials within the EasyPost Carrier Account Dashboard for comprehensive rate access. #### APC Account via API The API structure specified by EasyPost can also be used to add the APC carrier shipper account. ```shell curl -X POST https://api.easypost.com/v2/carrier_accounts \ -u "$EASYPOST_API_KEY": \ -H 'Content-Type: application/json' \ -d '{ "carrier_account": { "type": "ApcAccount", "description": "ApcAccount", "credentials": { "facility": "VALUE", "password": "VALUE", "shipper_id": "VALUE" } } }' ``` ### Software Requirements Download an EasyPost Client Library or utilize the REST API with cURL. ### Documentation Review Examine the EasyPost Objects section to understand the API's structure, which is critical for constructing requests and interpreting responses. Related: - [Getting Started Guide](https://docs.easypost.com/guides/getting-started) - [Manage Carrier Accounts](https://app.easypost.com/account/settings?tab=carriers) --- ## Billing APC shipments are pass-through billed and billed on scan. Because billing occurs when the label is scanned by APC: - Refunds are not supported. - Unused labels do not require voiding through the EasyPost API. - Unused labels do not need to be excluded from manifesting. --- ## Rates APC is a **Live Rating** integration, enabling real-time rate retrieval for shipments created via EasyPost. Rates are guaranteed valid for a minimum of five minutes. - When creating a shipment, EasyPost requests APC for shipment rates specific to the user's APC account. - The rates provided are directly from APC and tailored to the user's specific account details. - In cases of discrepancies or incorrect rates, users are advised to contact their APC account representative. - The representative can then update the rates to ensure user account accuracy. --- ## Service Levels APC offers the following services: Service levels are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=apc`. Related: - [Service Levels](https://docs.easypost.com/docs/shipments/rates#service-levels) Related: - [APC Service Levels](https://docs.easypost.com/docs/shipments/rates?carrier=apc#service-levels) --- ## Predefined Packages Predefined packages provide a convenient way to classify parcels using carrier-defined package types and retrieve applicable rates. When creating a shipment with the EasyPost API, select a predefined package that matches the parcel's characteristics and provide its weight in ounces when required. See the predefined package documentation for supported values and example requests. Predefined packages are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=apc`. Related: - [Predefined Packages](https://docs.easypost.com/docs/parcels#predefined-packages) --- ## Generating Shipping Labels With EasyPost, generating shipping labels for APC is the same process as generating them for any other carrier. Review the Getting Started Guide for help generating a shipping label. ### One-Call Buys One-call buys enable streamlined label purchasing through the EasyPost API by consolidating multiple operations into a single API request. This feature is designed to simplify and accelerate the shipping process by combining the creation of a shipment, retrieval of rates, and purchasing the shipping label into one efficient step. See Reducing API Response Times for more information. ### Manifests Manifesting is supported. ### Refunding and Voiding Labels Voiding APC labels through EasyPost is **not** supported. ### Shipment Options Shipment options are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=apc`. Related: - [Shipment Options](https://docs.easypost.com/docs/shipments/options) #### Label Formats EasyPost offers native APC labels in ZPL, PNG, and PDF formats. Related: - [Shipment Documentation](https://docs.easypost.com/docs/shipments) - [Reducing API Response Times](https://support.easypost.com/hc/en-us/articles/360048825772-Reducing-API-Response-Times) --- ## Hazardous Materials (HAZMAT) The APC policy on hazardous materials is not explicitly detailed in this guide. Shippers are advised to contact APC directly for specific hazmat inquiries. --- ## Pickups APC accommodates pickups based on individual agreements with customers. While regular pickups can be arranged directly with APC during the account registration process, they **cannot be scheduled via the EasyPost API**. --- ## Tracking EasyPost simplifies package tracking by offering two methods: - Tracking with an existing number and carrier. - Using a Tracker included with an EasyPost-purchased shipping label. The service integrates webhooks for timely shipment updates. For detailed information on tracking methods, visit the Tracking Guide. Related: - [Trackers Documentation](https://docs.easypost.com/docs/trackers) - [Trackers Guide](https://docs.easypost.com/guides/tracking-guide) --- ## Additional Resources ### Carrier Metadata The Carrier Metadata endpoint can programmatically return information about service levels, predefined packages, supported features, and shipment options. Use this information to quickly integrate and make educated decisions about the mix of carriers for shipping needs. Additionally, the Carrier Metadata endpoint is available to retrieve comprehensive information about all carriers on the EasyPost platform, enhancing decision-making for carrier services. ### Support and Troubleshooting In addition to the guidance provided in the Carrier Guides, EasyPost offers support to assist with FAQs, troubleshooting issues, and inquiries related to the EasyPost platform. Visit the Help Center for more information. Related: - [Carrier Metadata](https://docs.easypost.com/docs/carrier-metadata) - [Help Center](https://support.easypost.com/hc/en-us) --- ## Talk to a Shipping Expert For questions about getting started with the EasyPost API please talk to a Shipping Expert or Contact Support. Related: - [Talk to a Shipping Expert](https://www.easypost.com/talk-to-easypost) - [Contact Support](https://support.easypost.com/hc/requests/new) --- Source: https://docs.easypost.com/carriers/asendia-guide # Asendia USA Guide Asendia USA offers international shipping solutions that cover a broad range of destinations including Europe, Asia, the Middle East, Oceania, South America, the USA, and Canada. This service provides an economical option for reaching global markets, ensuring cost-effective delivery solutions across continents. This guide includes detailed information on utilizing Asendia USA shipping with the EasyPost API, focusing on account setup, rates, label creation, manifests, tracking, and more. --- ## Carrier Account Setup ### Account Registration Sign up for an EasyPost account to obtain a **Test** and **Production** API key. See Authentication and Key Management for more information. > Note: Negotiated rates are only available in Production mode. ### Carrier Setup Upon sign-up with EasyPost, users gain immediate access to Wallet Carrier Accounts, which can be enabled directly from the Dashboard. For additional carriers, EasyPost supports a Bring Your Own Carrier Account (BYOCA) option. This requires users to register directly with the respective carrier. #### Asendia USA Shipper Account Registration 1. Contact Asendia USA to request a shipper account. A representative will be in touch for additional details regarding the account. 2. Inform Asendia USA about using EasyPost's API for label purchases. 3. Acquire rates and align any additional shipping needs. 4. Obtain the following test and production account credentials: 1. Asendia USA Account Number 2. Asendia USA API Key 3. Asendia USA Carrier Facility / Processing Location (Optional) 4. Asendia USA Password 5. Asendia USA Sub Account Number 6. Asendia USA Username 5. Input carrier-specific credentials within the EasyPost Carrier Account Dashboard for comprehensive rate access. #### Asendia USA Account via API The API structure specified by EasyPost can also be used to add the Asendia USA carrier shipper account. ```shell curl -X POST https://api.easypost.com/v2/carrier_accounts \ -u "$EASYPOST_API_KEY": \ -H 'Content-Type: application/json' \ -d '{ "carrier_account": { "type": "AsendiaUsaAccount", "description": "AsendiaUsaAccount", "credentials": { "account_number": "VALUE", "api_key": "VALUE", "carrier_facility": "VALUE", "password": "VALUE", "sub_account_number": "VALUE", "username": "VALUE" }, "test_credentials": { "account_number": "VALUE", "api_key": "VALUE", "carrier_facility": "VALUE", "password": "VALUE", "sub_account_number": "VALUE", "username": "VALUE" } } }' ``` ### Software Requirements Download an EasyPost Client Library or utilize the REST API with cURL. ### Documentation Review Examine the EasyPost Objects section to understand the API's structure, which is critical for constructing requests and interpreting responses. Related: - [Getting Started Guide](https://docs.easypost.com/guides/getting-started) - [Manage Carrier Accounts](https://app.easypost.com/account/settings?tab=carriers) --- ## Billing When using an Asendia USA BYOCA, shipment charges are billed under the shipper's own Asendia USA account. --- ## Rates Asendia USA is a **Live Rating** integration, enabling real-time rate retrieval for shipments created via EasyPost. Rates are guaranteed valid for a minimum of five minutes. - When creating a shipment, EasyPost requests Asendia USA for shipment rates specific to the user's Asendia USA account. - The rates provided are directly from Asendia USA and tailored to the user's specific account details. - In cases of discrepancies or incorrect rates, users are advised to contact their Asendia USA account representative. - The representative can then update the rates to ensure user account accuracy. --- ## Service Levels Asendia USA offers the following service levels: Service levels are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=asendiausa`. Related: - [Service Levels](https://docs.easypost.com/docs/shipments/rates#service-levels) Related: - [Asendia USA Service Levels](https://docs.easypost.com/docs/shipments/rates?carrier=asendiausa#service-levels) --- ## Predefined Packages Predefined packages provide a convenient way to classify parcels using carrier-defined package types and retrieve applicable rates. When creating a shipment with the EasyPost API, select a predefined package that matches the parcel's characteristics and provide its weight in ounces when required. See the predefined package documentation for supported values and example requests. Predefined packages are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=asendiausa`. Related: - [Predefined Packages](https://docs.easypost.com/docs/parcels#predefined-packages) --- ## Generating Shipping Labels With EasyPost, generating shipping labels for Asendia USA is the same process as generating them for any other carrier. Review the Getting Started Guide for help generating a shipping label. ### Manifests Manifesting is **not** supported or required for Asendia USA. ### Refunding and Voiding Labels Asendia USA labels can be voided through EasyPost provided the shipment has not yet entered the mail stream. ### Shipment Options Shipment options are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=asendiausa`. Related: - [Shipment Options](https://docs.easypost.com/docs/shipments/options) #### Label Formats EasyPost offers native Asendia USA labels in PNG, PDF, and ZPL formats. Related: - [Shipment Documentation](https://docs.easypost.com/docs/shipments) - [Reducing API Response Times](https://support.easypost.com/hc/en-us/articles/360048825772-Reducing-API-Response-Times) --- ## Hazardous Materials (HAZMAT) The Asendia USA policy on hazardous materials is not explicitly detailed in this guide. Shippers are advised to contact Asendia USA directly for specific hazmat inquiries. --- ## Pickups Asendia USA accommodates pickups based on individual agreements with customers. While regular pickups can be arranged directly with Asendia USA during the account registration process, they **cannot be scheduled via the EasyPost API**. --- ## Tracking EasyPost simplifies package tracking by offering two methods: - Tracking with an existing number and carrier. - Using a Tracker included with an EasyPost-purchased shipping label. The service integrates webhooks for timely shipment updates. For detailed information on tracking methods, visit the Tracking Guide. Related: - [Trackers Documentation](https://docs.easypost.com/docs/trackers) - [Trackers Guide](https://docs.easypost.com/guides/tracking-guide) --- ## Additional Resources ### Carrier Metadata The Carrier Metadata endpoint can programmatically return information about service levels, predefined packages, supported features, and shipment options. Use this information to quickly integrate and make educated decisions about the mix of carriers for shipping needs. Additionally, the Carrier Metadata endpoint is available to retrieve comprehensive information about all carriers on the EasyPost platform, enhancing decision-making for carrier services. ### Support and Troubleshooting In addition to the guidance provided in the Carrier Guides, EasyPost offers support to assist with FAQs, troubleshooting issues, and inquiries related to the EasyPost platform. Visit the Help Center for more information. Related: - [Carrier Metadata](https://docs.easypost.com/docs/carrier-metadata) - [Help Center](https://support.easypost.com/hc/en-us) --- ## Talk to a Shipping Expert For questions about getting started with the EasyPost API please talk to a Shipping Expert or Contact Support. Related: - [Talk to a Shipping Expert](https://www.easypost.com/talk-to-easypost) - [Contact Support](https://support.easypost.com/hc/requests/new) --- Source: https://docs.easypost.com/carriers/australia-post-guide # Australia Post Guide Australia Post, the leading postal service in Australia, offers a wide range of domestic and international shipping solutions. Known for its reliability and extensive network, Australia Post caters to business and personal shipping needs, ensuring timely delivery across Australia and beyond. This guide includes detailed information on utilizing Australia Post shipping with the EasyPost API, focusing on account setup, rates, label creation, manifests, tracking, and more. --- ## Carrier Account Setup ### Account Registration Sign up for an EasyPost account to obtain a **Test** and **Production** API key. See Authentication and Key Management for more information. > Note: Negotiated rates are only available in Production mode. ### Carrier Setup Upon sign-up with EasyPost, users gain immediate access to Wallet Carrier Accounts, which can be enabled directly from the Dashboard. For additional carriers, EasyPost supports a Bring Your Own Carrier Account (BYOCA) option. This requires users to register directly with the respective carrier. #### Australia Post Shipper Account Registration 1. Contact Australia Post to request a shipper account. Please provide a mobile number and city when making the request. A representative will be in touch for additional details regarding the account. 2. Inform Australia Post about using EasyPost's API for label purchases. 3. Acquire rates and align any additional shipping needs. 4. Obtain the following account credentials from Australia Post: 1. Australia Post Account Number 2. Australia Post API Key 3. Australia Post Secret Key 4. Print as you go checkbox 5. Input carrier-specific credentials within the EasyPost Carrier Account Dashboard for comprehensive rate access. #### Australia Post Account via API The API structure specified by EasyPost can also be used to add the Australia Post carrier shipper account. ```shell curl -X POST https://api.easypost.com/v2/carrier_accounts \ -u "$EASYPOST_API_KEY": \ -H 'Content-Type: application/json' \ -d '{ "carrier_account": { "type": "AustraliaPostAccount", "description": "AustraliaPostAccount", "credentials": { "account_number": "VALUE", "api_key": "VALUE", "api_secret": "VALUE", "print_as_you_go": "VALUE" }, "test_credentials": { "account_number": "VALUE", "api_key": "VALUE", "api_secret": "VALUE", "print_as_you_go": "VALUE" } } }' ``` ### Software Requirements Download an EasyPost Client Library or utilize the REST API with cURL. ### Documentation Review Examine the EasyPost Objects section to understand the API's structure, which is critical for constructing requests and interpreting responses. Related: - [Getting Started Guide](https://docs.easypost.com/guides/getting-started) - [Manage Carrier Accounts](https://app.easypost.com/account/settings?tab=carriers) --- ## Billing Billing is directly handled by Australia Post after parcel delivery. EasyPost does not participate in the billing process for Australia Post services. Contact an Australia Post representative for details. --- ## Rates Australia Post is a **Live Rating** integration, enabling real-time rate retrieval for shipments created via EasyPost. Rates are guaranteed valid for a minimum of 5 minutes. - When creating a shipment, EasyPost requests Australia Post for shipment rates specific to the user's Australia Post account. - The rates provided are directly from Australia Post and tailored to the user's specific account details. In cases of discrepancies or incorrect rates, users are advised to contact their Australia Post account representative. The representative can then update the rates in the Australia Post database to ensure user account accuracy. --- ## Service Levels Australia Post delivers 6 days per week (Monday - Saturday). The service levels through EasyPost include: Service levels are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=australiapost`. Related: - [Service Levels](https://docs.easypost.com/docs/shipments/rates#service-levels) ### Coverage Area Australia Post provides wide-reaching delivery services, covering all of Australia and offering international shipping to numerous countries, ensuring reliable delivery across both urban and remote areas. Related: - [Australia Post Service Levels](https://docs.easypost.com/docs/shipments/rates?carrier=australiapost#service-levels) --- ## Predefined Packages Predefined packages provide a convenient way to classify parcels using carrier-defined package types and retrieve applicable rates. When creating a shipment with the EasyPost API, select a predefined package that matches the parcel's characteristics and provide its weight in ounces when required. See the predefined package documentation for supported values and example requests. Predefined packages are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=australiapost`. Related: - [Predefined Packages](https://docs.easypost.com/docs/parcels#predefined-packages) --- ## Generating Shipping Labels With EasyPost, generating shipping labels for Australia Post is the same process as generating them for any other carrier. Review the Getting Started Guide for help generating a shipping label. ### Manifests Manifesting shipments involves adding all unmanifested shipments to a batch and then manifesting the batch. Within the EasyPost API, manifests are referred to as ScanForms. For instructions on batching or creating a ScanForm, refer to Batches and ScanForms in the API Docs. The term **Order Summary** in Australia Post terminology refers to what is known in EasyPost as a ScanForm. When manifesting shipments with Australia Post, a PDF Order Summary is generated. This document may differ in appearance from standard ScanForms. ![Example Australia Post Order Summary Report](https://docs.easypost.com/images/guides/australia-post/australia-post-order-summary-report.png) #### Print as you go option The **Print as you go** checkbox in the Australia Post carrier account settings allow the user to control whether they get a ScanForm during the buy call or if they want to make a bulk manifest request later. - `print_as_you_go: true`: The customer makes a manifest request for a shipment or batch separately from the buy call. - `print_as_you_go: false`: The customer gets a manifest for each shipment during the buy call. The customer **cannot** manifest shipments as a batch in a manifest request because they get manifested during the buy call. ### Returns EasyPost supports return labels for domestic shipments within Australia but does not provide this service for international shipments with Australia Post. For domestic returns, it is necessary to disable the **print-as-you-go** option in the carrier account settings: `print_as_you_go: false` This adjustment ensures that shipment data is manifested upon creation. Failure to disable the **print-as-you-go** option may result in unmanifested shipment fees for customers using Australia Post for domestic returns. ### Refunding and Voiding Labels In EasyPost, labels can be voided/refunded by requesting a refund on the shipment. For guidance on refunding or voiding a shipment, refer to Refund a Shipment in the API Docs. ### Shipment Options Shipment options are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=australiapost`. Related: - [Shipment Options](https://docs.easypost.com/docs/shipments/options) #### Label Formats Australia Post offers the following label formats and sizes: - 8.5 x 11 PDF - 8.5 x 11 with Instructions PDF - 4 x 6 Thermal Label ZPL - 4 x 6 PNG, PDF Related: - [Shipment Documentation](https://docs.easypost.com/docs/shipments) - [Reducing API Response Times](https://support.easypost.com/hc/en-us/articles/360048825772-Reducing-API-Response-Times) --- ## Hazardous Materials (HAZMAT) This guide does not specify handling hazardous materials with Australia Post. Shippers are advised to Contact Australia Post directly for hazmat inquiries. --- ## Pickups Australia Post accommodates pickups based on individual agreements with customers. While regular pickups can be arranged directly with Australia Post during the account registration process, they **cannot be scheduled via the EasyPost API**. --- ## Tracking EasyPost simplifies package tracking by offering two methods: - Tracking with an existing number and carrier. - Using a Tracker included with an EasyPost-purchased shipping label. The service integrates webhooks for timely shipment updates. For detailed information on tracking methods, visit the Tracking Guide. Related: - [Trackers Documentation](https://docs.easypost.com/docs/trackers) - [Trackers Guide](https://docs.easypost.com/guides/tracking-guide) --- ## Additional Resources ### Carrier Metadata The Carrier Metadata endpoint can programmatically return information about service levels, predefined packages, supported features, and shipment options. Use this information to quickly integrate and make educated decisions about the mix of carriers for shipping needs. Additionally, the Carrier Metadata endpoint is available to retrieve comprehensive information about all carriers on the EasyPost platform, enhancing decision-making for carrier services. ### Support and Troubleshooting In addition to the guidance provided in the Carrier Guides, EasyPost offers support to assist with FAQs, troubleshooting issues, and inquiries related to the EasyPost platform. Visit the Help Center for more information. Related: - [Carrier Metadata](https://docs.easypost.com/docs/carrier-metadata) - [Help Center](https://support.easypost.com/hc/en-us) --- ## Talk to a Shipping Expert For questions about getting started with the EasyPost API please talk to a Shipping Expert or Contact Support. Related: - [Talk to a Shipping Expert](https://www.easypost.com/talk-to-easypost) - [Contact Support](https://support.easypost.com/hc/requests/new) --- Source: https://docs.easypost.com/carriers/better-trucks-guide # Better Trucks Guide Better Trucks specializes in last-mile delivery services covering the greater midwest region, and expanding network in the northeast, southwest, and the majority of Texas. Catering to both businesses and consumers, the company offers technology-driven solutions for same-day and standard shipping, ensuring efficient deliveries with real-time tracking. This guide includes detailed information on utilizing Better Trucks shipping with the EasyPost API, focusing on account setup, rates, label creation, manifests, tracking, and more. --- ## Carrier Account Setup ### Account Registration Sign up for an EasyPost account to obtain a **Test** and **Production** API key. See Authentication and Key Management for more information. > Note: Negotiated rates are only available in Production mode. ### Carrier Setup Upon sign-up with EasyPost, users gain immediate access to Wallet Carrier Accounts, which can be enabled directly from the Dashboard. For additional carriers, EasyPost supports a Bring Your Own Carrier Account (BYOCA) option. This requires users to register directly with the respective carrier. #### Better Trucks Shipper Account Registration 1. Contact Better Trucks to request a shipper account. A representative will be in touch for additional details regarding the account. 2. Inform Better Trucks about using EasyPost's API for label purchases. 3. Acquire rates and align any additional shipping needs. 4. Obtain the following test and production account credentials: 1. Better Trucks API Key 5. Input carrier-specific credentials within the EasyPost Carrier Account Dashboard for comprehensive rate access. #### Better Trucks Account via API The API structure specified by EasyPost can also be used to add the Better Trucks carrier shipper account. ```shell curl -X POST https://api.easypost.com/v2/carrier_accounts \ -u "$EASYPOST_API_KEY": \ -H 'Content-Type: application/json' \ -d '{ "carrier_account": { "type": "BetterTrucksAccount", "description": "BetterTrucksAccount", "credentials": { "api_key": "VALUE" }, "test_credentials": { "api_key": "VALUE" } } }' ``` ### Software Requirements Download an EasyPost Client Library or utilize the REST API with cURL. ### Documentation Review Examine the EasyPost Objects section to understand the API's structure, which is critical for constructing requests and interpreting responses. Related: - [Getting Started Guide](https://docs.easypost.com/guides/getting-started) - [Manage Carrier Accounts](https://app.easypost.com/account/settings?tab=carriers) --- ## Billing When using a Better Trucks BYOCA, shipment charges are billed under the shipper's own Better Trucks account. --- ## Rates Better Trucks is a **Live Rating** integration, enabling real-time rate retrieval for shipments created via EasyPost. Rates are guaranteed valid for a minimum of 5 minutes. - When creating a shipment, EasyPost requests Better Trucks for shipment rates specific to the user's Better Trucks account. - The rates provided are directly from Better Trucks and tailored to the user's specific account details. - In cases of discrepancies or incorrect rates, users are advised to contact their Better Trucks account representative. - The representative can then update the rates to ensure user account accuracy. --- ## Service Levels Better Trucks offers the following service levels: Service levels are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=bettertrucks`. Related: - [Service Levels](https://docs.easypost.com/docs/shipments/rates#service-levels) ### Coverage Area Better Trucks specializes in next-day, two day, and same day deliveries throughout the greater midwest region, and expanding network in the northeast, southwest, and the majority of Texas. ![Map indicating Better Trucks coverage area](https://docs.easypost.com/images/guides/better-trucks/better-trucks-coverage-map.png) Related: - [Better Trucks Service Levels](https://docs.easypost.com/docs/shipments/rates?carrier=bettertrucks#service-levels) --- ## Predefined Packages Predefined packages provide a convenient way to classify parcels using carrier-defined package types and retrieve applicable rates. When creating a shipment with the EasyPost API, select a predefined package that matches the parcel's characteristics and provide its weight in ounces when required. See the predefined package documentation for supported values and example requests. Predefined packages are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=bettertrucks`. Related: - [Predefined Packages](https://docs.easypost.com/docs/parcels#predefined-packages) --- ## Generating Shipping Labels With EasyPost, generating shipping labels for Better Trucks is the same process as generating them for any other carrier. Review the Getting Started Guide for help generating a shipping label. ### Manifests Manifesting is **not** supported or required for Better Trucks. ### Refunding and Voiding Labels Voiding Better Trucks labels through EasyPost is supported. ### Shipment Options Shipment options are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=bettertrucks`. Related: - [Shipment Options](https://docs.easypost.com/docs/shipments/options) Related: - [Shipment Documentation](https://docs.easypost.com/docs/shipments) - [Reducing API Response Times](https://support.easypost.com/hc/en-us/articles/360048825772-Reducing-API-Response-Times) --- ## Hazardous Materials (HAZMAT) The Better Trucks policy on hazardous materials is not explicitly detailed in this guide. Shippers are advised to contact Better Trucks directly for specific hazmat inquiries. --- ## Pickups Better Trucks pickup requests can be made via the EasyPost API. Review the Pickups documentation for details. > Note: Pickups may incur charges; users should consult their Better Trucks account representative for pricing details. Related: - [Pickups Documentation](https://docs.easypost.com/docs/pickups) --- ## Tracking EasyPost simplifies package tracking by offering two methods: - Tracking with an existing number and carrier. - Using a Tracker included with an EasyPost-purchased shipping label. The service integrates webhooks for timely shipment updates. For detailed information on tracking methods, visit the Tracking Guide. Related: - [Trackers Documentation](https://docs.easypost.com/docs/trackers) - [Trackers Guide](https://docs.easypost.com/guides/tracking-guide) --- ## Additional Resources ### Carrier Metadata The Carrier Metadata endpoint can programmatically return information about service levels, predefined packages, supported features, and shipment options. Use this information to quickly integrate and make educated decisions about the mix of carriers for shipping needs. Additionally, the Carrier Metadata endpoint is available to retrieve comprehensive information about all carriers on the EasyPost platform, enhancing decision-making for carrier services. ### Support and Troubleshooting In addition to the guidance provided in the Carrier Guides, EasyPost offers support to assist with FAQs, troubleshooting issues, and inquiries related to the EasyPost platform. Visit the Help Center for more information. Related: - [Carrier Metadata](https://docs.easypost.com/docs/carrier-metadata) - [Help Center](https://support.easypost.com/hc/en-us) --- ## Talk to a Shipping Expert For questions about getting started with the EasyPost API please talk to a Shipping Expert or Contact Support. Related: - [Talk to a Shipping Expert](https://www.easypost.com/talk-to-easypost) - [Contact Support](https://support.easypost.com/hc/requests/new) --- Source: https://docs.easypost.com/carriers/blue-streak-guide # Blue Streak Guide Blue Streak is a southeastern regional carrier that provides a broad array of time-definite messenger and courier services, parcel services, cargo, and freight shipping solutions. They have spent over 35 years building a reputation for professionalism and reliability in the transportation industry. This guide includes detailed information on utilizing Blue Streak shipping with the EasyPost API, focusing on account setup, rates, label creation, manifests, tracking, and more. --- ## Carrier Account Setup ### Account Registration Sign up for an EasyPost account to obtain a **Test** and **Production** API key. See Authentication and Key Management for more information. > Note: Negotiated rates are only available in Production mode. ### Carrier Setup Upon sign-up with EasyPost, users gain immediate access to Wallet Carrier Accounts, which can be enabled directly from the Dashboard. For additional carriers, EasyPost supports a Bring Your Own Carrier Account (BYOCA) option. This requires users to register directly with the respective carrier. #### Blue Streak Shipper Account Registration 1. Contact Blue Streak to request a shipper account. A representative will be in touch for additional details regarding the account. 2. Inform Blue Streak about using EasyPost's API for label purchases. 3. Obtain Blue Streak production and test credentials: 1. Blue Streak Username 2. Blue Streak Password 4. Input carrier-specific credentials within the EasyPost Carrier Account Dashboard for comprehensive rate access. #### Blue Streak Account via API The API structure specified by EasyPost can also be used to add the Blue Streak carrier shipper account. ```shell curl -X POST https://api.easypost.com/v2/carrier_accounts \ -u "$EASYPOST_API_KEY": \ -H 'Content-Type: application/json' \ -d '{ "carrier_account": { "type": "BluestreakAccount", "description": "BluestreakAccount", "credentials": { "password": "VALUE", "username": "VALUE" }, "test_credentials": { "password": "VALUE", "username": "VALUE" } } }' ``` ### Software Requirements Download an EasyPost Client Library or utilize the REST API with cURL. ### Documentation Review Examine the EasyPost Objects section to understand the API's structure, which is critical for constructing requests and interpreting responses. Related: - [Getting Started Guide](https://docs.easypost.com/guides/getting-started) - [Manage Carrier Accounts](https://app.easypost.com/account/settings?tab=carriers) --- ## Billing Billing is directly handled by Blue Streak using a bill-on-delivery system. EasyPost does not participate in the billing process for Blue Streak services. Contact a Blue Streak representative for details. --- ## Rates ### Default Rate Display EasyPost always returns a $0.01 placeholder rate for Blue Streak shipments. Live postage rates are not returned through this integration. Blue Streak bills the actual postage through its billing system. --- ## Service Levels Blue Streak offers the following services: Service levels are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=bluestreak`. Related: - [Service Levels](https://docs.easypost.com/docs/shipments/rates#service-levels) ### Coverage Area Blue Streak specializes in next-day and same-day deliveries throughout the southeastern region. ![Map indicating Blue Streak coverage area](https://docs.easypost.com/images/guides/blue-streak/blue-streak-coverage-map.png) Related: - [Blue Streak Service Levels](https://docs.easypost.com/docs/shipments/rates?carrier=bluestreak#service-levels) --- ## Predefined Packages Predefined packages provide a convenient way to classify parcels using carrier-defined package types and retrieve applicable rates. When creating a shipment with the EasyPost API, select a predefined package that matches the parcel's characteristics and provide its weight in ounces when required. See the predefined package documentation for supported values and example requests. Predefined packages are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=bluestreak`. Related: - [Predefined Packages](https://docs.easypost.com/docs/parcels#predefined-packages) --- ## Generating Shipping Labels With EasyPost, generating shipping labels for Blue Streak is the same process as generating them for any other carrier. Review the Getting Started Guide for help generating a shipping label. ### One-Call Buys 1-call buys enable streamlined label purchasing through the EasyPost API by consolidating multiple operations into a single API request. This feature is designed to simplify and accelerate the shipping process by combining the creation of a shipment, retrieval of rates, and purchasing the shipping label into one efficient step. See Reducing API Response Times for more information. ### Manifests Manifesting is **not** supported or required for Blue Streak integration. ### Refunding and Voiding Labels Voiding Blue Streak labels through EasyPost is supported. > Note: The **shipment.tracking_code** is required as it identifies the order within the carrier's system. ### Shipment Options Shipment options are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=bluestreak`. Related: - [Shipment Options](https://docs.easypost.com/docs/shipments/options) #### Label Formats EasyPost offers native Blue Streak labels in ZPL, PNG, and PDF formats. Related: - [Shipment Documentation](https://docs.easypost.com/docs/shipments) - [Reducing API Response Times](https://support.easypost.com/hc/en-us/articles/360048825772-Reducing-API-Response-Times) --- ## Hazardous Materials (HAZMAT) The Blue Streak policy on hazardous materials is not explicitly detailed in this guide. Shippers are advised to contact Blue Streak directly for specific hazmat inquiries. --- ## Pickups Blue Streak accommodates pickups based on individual agreements with customers. While regular pickups can be arranged directly with Blue Streak during the account registration process, they **cannot be scheduled via the EasyPost API**. --- ## Tracking EasyPost simplifies package tracking by offering two methods: - Tracking with an existing number and carrier. - Using a Tracker included with an EasyPost-purchased shipping label. The service integrates webhooks for timely shipment updates. For detailed information on tracking methods, visit the Tracking Guide. Related: - [Trackers Documentation](https://docs.easypost.com/docs/trackers) - [Trackers Guide](https://docs.easypost.com/guides/tracking-guide) --- ## Additional Resources ### Carrier Metadata The Carrier Metadata endpoint can programmatically return information about service levels, predefined packages, supported features, and shipment options. Use this information to quickly integrate and make educated decisions about the mix of carriers for shipping needs. Additionally, the Carrier Metadata endpoint is available to retrieve comprehensive information about all carriers on the EasyPost platform, enhancing decision-making for carrier services. ### Support and Troubleshooting In addition to the guidance provided in the Carrier Guides, EasyPost offers support to assist with FAQs, troubleshooting issues, and inquiries related to the EasyPost platform. Visit the Help Center for more information. Related: - [Carrier Metadata](https://docs.easypost.com/docs/carrier-metadata) - [Help Center](https://support.easypost.com/hc/en-us) --- ## Talk to a Shipping Expert For questions about getting started with the EasyPost API please talk to a Shipping Expert or Contact Support. Related: - [Talk to a Shipping Expert](https://www.easypost.com/talk-to-easypost) - [Contact Support](https://support.easypost.com/hc/requests/new) --- Source: https://docs.easypost.com/carriers/canada-post-byoca-guide # Canada Post BYOCA Guide Canada Post BYOCA (Bring Your Own Carrier Account) enables users to integrate their existing Canada Post credentials into the EasyPost platform. This setup allows access to contract-specific rates and services negotiated directly with Canada Post. The BYOCA option supports domestic, U.S., and international shipping, providing full access to Canada Post's network while maintaining control of existing account relationships and service agreements. For frequently asked questions, refer to the Canada Post FAQ article. Related: - [Canada Post FAQ](https://support.easypost.com/hc/en-us/articles/20510979781645-Canada-Post-FAQ) --- ## Carrier Account Setup ### Account Registration Sign up for an EasyPost account to obtain a **Test** and **Production** API key. See Authentication and Key Management for more information. > Note: Negotiated rates are only available in Production mode. Please review the Getting Started Guide for more information. ### Carrier Setup #### Bring Your Own Carrier Account (BYOCA) to EasyPost 1. Register or log into the Canada Post website, ensuring a valid payment method is on file under **My Profile** > **Payment** section. 2. Log in to EasyPost and navigate to **Account Settings** > **Carriers**. 3. Select the **Add Carrier** button at the top of the screen and choose **Canada Post**. 4. The page will redirect to the Canada Post website for login and account authentication. All relevant credentials will be automatically saved in the EasyPost system. 5. Start purchasing labels through the EasyPost shipping API. #### BYOCA to EasyPost via API To link an existing Canada Post account, ensure `not_platform=true` is set and use the developer keys obtained from the Canada Post developer portal. ```shell curl -X POST https://api.easypost.com/v2/carrier_accounts \ -u "$EASYPOST_API_KEY": \ -H 'Content-Type: application/json' \ -d '{ "carrier_account": { "type": "CanadaPostAccount", "description": "CanadaPostAccount", "credentials": { "api_key": "VALUE", "contract_id": "VALUE", "customer_number": "VALUE", "has_credit_card": "VALUE", "not_platform": "VALUE", "zonos_api_key": "VALUE", "zonos_enabled": "VALUE" }, "test_credentials": { "api_key": "VALUE", "contract_id": "VALUE", "customer_number": "VALUE", "has_credit_card": "VALUE", "not_platform": "VALUE", "zonos_api_key": "VALUE", "zonos_enabled": "VALUE" } } }' ## REQUIRES CUSTOM WORKFLOW ## ``` ### Software Requirements Download an EasyPost Client Library or utilize the REST API with cURL. ### Documentation Review Examine the EasyPost Objects section to understand the API's structure, which is critical for constructing requests and interpreting responses. Related: - [Getting Started Guide](https://docs.easypost.com/guides/getting-started) - [Manage Carrier Accounts](https://app.easypost.com/account/settings?tab=carriers) --- ## Billing When using Canada Post (BYOCA), billing is handled directly between the shipper and Canada Post. EasyPost facilitates label creation and shipment management through the API but does not deduct funds from the EasyPost Wallet. - **Bill-on-Scan:** Charges are applied when Canada Post first scans the package. - **Currency:** Labels purchased with existing Canada Post credentials are billed directly by Canada Post in CAD. - **Invoices:** Issued and reconciled by Canada Post. This setup allows EasyPost users to leverage existing negotiated rates and manage postage directly with Canada Post while maintaining full access to EasyPost's tracking and reporting tools. Related: - [EasyPost Wallet and Bring Your Own Account Plans](https://support.easypost.com/hc/en-us/articles/39984592062605-EasyPost-Wallet-and-Bring-Your-Own-Carrier-Account-Plans) - [Billing & Payments](https://support.easypost.com/hc/en-us/articles/360042414212-Billing-Payments) --- ## Rates For existing Canada Post accounts, real-time rates are provided based on the user's specific agreement with Canada Post. In cases of discrepancies or incorrect rates, users are advised to contact their Canada Post account representative. ### Surcharges Rate responses include itemized surcharges when applicable. These may include `fuel`, `dangerous_goods`, `address_correction`, or other fees. Each surcharge is returned in a `surcharges` array within the `rate` and `shipment` objects and includes: - `type`: Carrier-specific surcharge code. - `category`: Standardized surcharge category used across all participating carriers. - `amount`: Fee amount. - `currency`: ISO 4217 format (e.g., `USD`). For a full list of surcharge categories and descriptions, see the Surcharge Details in the Rate Response documentation. --- ## Service Levels Canada Post delivers five days per week (Monday-Friday), except during holidays. The service levels through EasyPost include: Service levels are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=canadapost`. Related: - [Service Levels](https://docs.easypost.com/docs/shipments/rates#service-levels) ### Coverage Area Canada Post supports a variety of service levels from Canadian origins. With Canada Post Default accounts, EasyPost users may ship to: - Domestic shipments within Canada (Canada to Canada) - Shipments from/to Canada to/from the United States (Canada to US) - International shipments from Canada to destinations outside the US (Canada to International) --- ## Predefined Packages Predefined packages provide a convenient way to classify parcels using carrier-defined package types and retrieve applicable rates. When creating a shipment with the EasyPost API, select a predefined package that matches the parcel's characteristics and provide its weight in ounces when required. See the predefined package documentation for supported values and example requests. Predefined packages are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=canadapost`. Related: - [Predefined Packages](https://docs.easypost.com/docs/parcels#predefined-packages) --- ## Generating Shipping Labels With EasyPost, the process for generating shipping labels for Canada Post is the same as generating them for any other carrier. Review the Getting Started Guide for help generating a shipping label. ### One-Call Buys One-call buys enable streamlined label purchasing through the EasyPost API by consolidating multiple operations into a single API request. This feature is designed to simplify and accelerate the shipping process by combining the creation of a shipment, retrieval of rates, and purchasing the shipping label into one efficient step. See Reducing API Response Times for more information. ### Manifests #### Retail Customers Manifesting is not required. #### Contract Customers Manifesting is required using the ScanForm object. Non-compliance results in a reassignment fee per unmanifested shipment. #### Notifications and Charges - Contract customers receive notifications for attempting to send unmanifested shipments. - An option is available to disable notifications by marking shipments as manifested in the API. - Despite disabling notifications, Canada Post charges for non-manifested shipments remain applicable. Related: - [Batch Documentation](https://docs.easypost.com/docs/batches) ### Refunding and Voiding Labels Voiding and refunds are supported. ### Shipment Options Shipment options are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=canadapost`. Related: - [Shipment Options](https://docs.easypost.com/docs/shipments/options) #### Label Formats Canada Post labels are available in PDF, PNG, ZPL, and EPL2 formats. ### QR Codes EasyPost supports three types of QR code forms for domestic shipments through Canada Post: - **RMA (box-free, label-free) QR code**: Used for returns where the recipient does not need to provide packaging or print a label. - **Returns label QR code**: Used for returns where the recipient does not need to print the label. - **Outbound label QR code**: Used for outbound shipments where the sender does not print the label. Please refer to the Canada Post - QR Codes Help Center article for details. Related: - [Shipment Documentation](https://docs.easypost.com/docs/shipments) - [Reducing API Response Times](https://support.easypost.com/hc/en-us/articles/360048825772-Reducing-API-Response-Times) --- ## Hazardous Materials (HAZMAT) Hazardous Materials (or Dangerous Goods) as defined by the Transportation of Dangerous Goods Regulations, are non-mailable matter. Canada Post will not accept packages that contain dangerous goods or that display dangerous goods symbols, except for lithium batteries described in the ABCs of mailing. Related: - [Transportation of Dangerous Goods Regulations](https://laws-lois.justice.gc.ca/eng/regulations/SOR-2001-286/index.html) - [Canada Post ABCs of Mailing](https://www.canadapost-postescanada.ca/cpc/en/support/articles/abcs-of-mailing/overview.page) --- ## Pickups Canada Post BYOCA pickup requests can be made via the EasyPost API. Review the pickups documentation for details. > Note: Pickups may incur charges; users should consult their Canada Post account representative for pricing details. Related: - [Pickup Documentation](https://docs.easypost.com/docs/pickups) --- ## Tracking EasyPost simplifies package tracking by offering two methods: - Tracking with an existing number and carrier. - Using a Tracker included with an EasyPost-purchased shipping label. The service integrates webhooks for timely shipment updates. For detailed information on tracking methods, visit the Tracking Guide. Related: - [Trackers Documentation](https://docs.easypost.com/docs/trackers) - [Trackers Guide](https://docs.easypost.com/guides/tracking-guide) --- ## Additional Resources ### Carrier Metadata The Carrier Metadata endpoint can programmatically return information about service levels, predefined packages, supported features, and shipment options. Use this information to quickly integrate and make educated decisions about the mix of carriers for shipping needs. Additionally, the Carrier Metadata endpoint is available to retrieve comprehensive information about all carriers on the EasyPost platform, enhancing decision-making for carrier services. ### Support and Troubleshooting In addition to the guidance provided in the Carrier Guides, EasyPost offers support to assist with FAQs, troubleshooting issues, and inquiries related to the EasyPost platform. Visit the Help Center for more information. Related: - [Carrier Metadata](https://docs.easypost.com/docs/carrier-metadata) - [Help Center](https://support.easypost.com/hc/en-us) --- ## Talk to a Shipping Expert For questions about getting started with the EasyPost API please talk to a Shipping Expert or Contact Support. Related: - [Talk to a Shipping Expert](https://www.easypost.com/talk-to-easypost) - [Contact Support](https://support.easypost.com/hc/requests/new) --- Source: https://docs.easypost.com/carriers/canada-post-wallet-guide # Canada Post Wallet Guide The Canada Post Wallet account is an integrated carrier account provided directly through EasyPost. This option provides immediate access to Canada Post shipping without requiring users to register directly with Canada Post. This streamlined setup offers a wide range of domestic and international shipping services through the Wallet integration, which allows access to pre-negotiated discounted rates, streamlined account setup, and consistent tracking. For frequently asked questions, refer to the Canada Post FAQ article. Related: - [Canada Post FAQ](https://support.easypost.com/hc/en-us/articles/20510979781645-Canada-Post-FAQ) --- ## Carrier Account Setup ### Account Registration Sign up for an EasyPost account to obtain a **Test** and **Production** API key. See Authentication and Key Management for more information. > Note: Negotiated rates are only available in Production mode. Please review the Getting Started Guide for more information. ### Carrier Setup #### Create via EasyPost Dashboard 1. Log in to EasyPost and navigate to **Account Settings**. 2. Select the **Carriers** tab. 3. Select the **EasyPost Wallet Carriers** tab. 4. Find Canada Post in the list of carriers and select **Create Account** to complete the account creation process. ![Steps to create a Canada Post Wallet Account in the EasyPost web UI](https://docs.easypost.com/images/guides/canada-post/canada-post-account-web-ui.png) #### Create via API The API structure specified by EasyPost can also be used to create a new Canada Post Wallet Carrier account. ```shell curl -X POST https://api.easypost.com/v2/carrier_accounts \ -u "$EASYPOST_API_KEY": \ -H 'Content-Type: application/json' \ -d '{ "carrier_account": { "type": "CanadaPostAccount", "description": "CanadaPostAccount", "payment_mode": "aggregation" } }' ``` > Note: For carrier setup in **Forge**, refer to the Forge section of the Help Center. ### Software Requirements Download an EasyPost Client Library or utilize the REST API with cURL. ### Documentation Review Examine the EasyPost Objects section to understand the API's structure, which is critical for constructing requests and interpreting responses. Related: - [Getting Started Guide](https://docs.easypost.com/guides/getting-started) - [Manage Carrier Accounts](https://app.easypost.com/account/settings?tab=carriers) --- ## Billing When shipping with a Canada Post Wallet account, billing is managed entirely through the EasyPost Wallet: - All charges are consolidated and billed through Easypost. - Rates are pre-negotiated; no direct billing occurs between the shipper and Canada Post. - Bill-on-Scan: Charges are applied when the carrier first scans the package. Related: - [EasyPost Wallet and Bring Your Own Account Plans](https://support.easypost.com/hc/en-us/articles/39984592062605-EasyPost-Wallet-and-Bring-Your-Own-Carrier-Account-Plans) - [Billing & Payments](https://support.easypost.com/hc/en-us/articles/360042414212-Billing-Payments) --- ## Rates Pre-negotiated rates for Canada Post Wallet accounts are returned in USD in both test and production. EasyPost converts the carrier's CAD amounts before returning the rate. The quoted USD amount is used for the initial postage charge to the EasyPost Wallet. Insurance and later carrier adjustments are separate. A personally connected Canada Post account (BYOCA) returns rates in CAD and is billed directly by Canada Post. ### Surcharges Rate responses include itemized surcharges when applicable. These may include `fuel`, `dangerous_goods`, `address_correction`, or other fees. Each surcharge is returned in a `surcharges` array within the `rate` and `shipment` objects and includes: - `type`: Carrier-specific surcharge code. - `category`: Standardized surcharge category used across all participating carriers. - `amount`: Fee amount. - `currency`: ISO 4217 format (e.g., `USD`). For a full list of surcharge categories and descriptions, see the Surcharge Details in the Rate Response documentation. --- ## Service Levels Canada Post delivers five days per week (Monday-Friday), except during holidays. The service levels through Wallet accounts include: Service levels are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=canadapost`. Related: - [Service Levels](https://docs.easypost.com/docs/shipments/rates#service-levels) ### Coverage Area Canada Post supports a variety of service levels from Canadian origins. With Canada Post Wallet accounts, EasyPost users may ship to: - Domestic shipments within Canada (Canada to Canada) - Shipments from/to Canada to/from the United States (Canada to US) --- ## Predefined Packages Predefined packages provide a convenient way to classify parcels using carrier-defined package types and retrieve applicable rates. When creating a shipment with the EasyPost API, select a predefined package that matches the parcel's characteristics and provide its weight in ounces when required. See the predefined package documentation for supported values and example requests. Predefined packages are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=canadapost`. Related: - [Predefined Packages](https://docs.easypost.com/docs/parcels#predefined-packages) --- ## Generating Shipping Labels With EasyPost, the process for generating shipping labels for the Canada Post Wallet carrier account is the same as generating them for any other carrier. Review the Getting Started Guide for help generating a shipping label. ### One-Call Buys One-call buys enable streamlined label purchasing through the EasyPost API by consolidating multiple operations into a single API request. This feature is designed to simplify and accelerate the shipping process by combining the creation of a shipment, retrieval of rates, and purchasing the shipping label into one efficient step. See Reducing API Response Times for more information. ### Manifests Manifesting is not required. ### Refunding and Voiding Labels Voiding labels is supported. ### Shipment Options Shipment options are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=canadapost`. Related: - [Shipment Options](https://docs.easypost.com/docs/shipments/options) #### Label Formats Canada Post labels are available in PDF, PNG, ZPL, and EPL2 formats. ### QR Codes EasyPost supports three types of QR code forms for domestic shipments through Canada Post: - **RMA (box-free, label-free) QR code**: Used for returns where the recipient does not need to provide packaging or print a label. - **Returns label QR code**: Used for returns where the recipient does not need to print the label. - **Outbound label QR code**: Used for outbound shipments where the sender does not print the label. Please refer to the Canada Post - QR Codes Help Center article for details. Related: - [Shipment Documentation](https://docs.easypost.com/docs/shipments) - [Reducing API Response Times](https://support.easypost.com/hc/en-us/articles/360048825772-Reducing-API-Response-Times) --- ## Hazardous Materials (HAZMAT) Hazardous Materials (or Dangerous Goods) as defined by the Transportation of Dangerous Goods Regulations, are non-mailable matter. Canada Post will not accept packages that contain dangerous goods or that display dangerous goods symbols, except for lithium batteries described in the ABCs of mailing. Related: - [Transportation of Dangerous Goods Regulations](https://laws-lois.justice.gc.ca/eng/regulations/SOR-2001-286/index.html) - [Canada Post ABCs of Mailing](https://www.canadapost-postescanada.ca/cpc/en/support/articles/abcs-of-mailing/overview.page) --- ## Pickups **Canada Post Wallet accounts do not support pickups.** All shipments must be dropped off at an eligible Canada Post location. Pickup scheduling is not available through the EasyPost API for Wallet accounts. --- ## Tracking EasyPost simplifies package tracking by offering two methods: - Tracking with an existing number and carrier. - Using a Tracker included with an EasyPost-purchased shipping label. The service integrates webhooks for timely shipment updates. For detailed information on tracking methods, visit the Tracking Guide. Related: - [Trackers Documentation](https://docs.easypost.com/docs/trackers) - [Trackers Guide](https://docs.easypost.com/guides/tracking-guide) --- ## Additional Resources ### Carrier Metadata The Carrier Metadata endpoint can programmatically return information about service levels, predefined packages, supported features, and shipment options. Use this information to quickly integrate and make educated decisions about the mix of carriers for shipping needs. Additionally, the Carrier Metadata endpoint is available to retrieve comprehensive information about all carriers on the EasyPost platform, enhancing decision-making for carrier services. ### Support and Troubleshooting In addition to the guidance provided in the Carrier Guides, EasyPost offers support to assist with FAQs, troubleshooting issues, and inquiries related to the EasyPost platform. Visit the Help Center for more information. Related: - [Carrier Metadata](https://docs.easypost.com/docs/carrier-metadata) - [Help Center](https://support.easypost.com/hc/en-us) --- ## Talk to a Shipping Expert For questions about getting started with the EasyPost API please talk to a Shipping Expert or Contact Support. Related: - [Talk to a Shipping Expert](https://www.easypost.com/talk-to-easypost) - [Contact Support](https://support.easypost.com/hc/requests/new) --- Source: https://docs.easypost.com/carriers/canpar-guide # Canpar Guide Canpar Express provides reliable, innovative, and cost-effective shipping solutions for anyone to ship with confidence within Canada, from Canada to the US, and from Canada to international. This guide provides detailed information on utilizing Canpar shipping with the EasyPost API, focusing on account setup, rates, label creation, pickups, tracking, and more. --- ## Carrier Account Setup ### Account Registration Sign up for an EasyPost account to obtain a **Test** and **Production** API key. See Authentication and Key Management for more information. > Note: Negotiated rates are only available in Production mode. Please review the Getting Started Guide for more information. ### Carrier Setup Upon sign-up with EasyPost, users gain immediate access to Wallet Carrier Accounts, which can be enabled directly from the Dashboard. For additional carriers, EasyPost supports a Bring Your Own Carrier Account (BYOCA) option. This requires users to register directly with the respective carrier. #### Register with Canpar 1. Contact a Canpar sales representative to gain access to the sandbox environment. 2. Receive sandbox credentials: Login Username, Password, and Sandbox Account Number. Credentials for Production and Test mode are separate and will be provided by Canpar's IT Service Desk. #### Sandbox Testing 1. Add sandbox credentials to a new Canpar carrier account on the EasyPost Carrier Account page. 2. Generate a test label via EasyPost's Sandbox environment. 3. Submit the sample label, request, and response files to Canpar for production environment access. 4. Upon approval, receive production environment credentials: Login Username, Password, and Production Account Number. #### Production Setup 1. Add production credentials to the EasyPost carrier account. 2. Begin generating Canpar production labels. #### Canpar Account via API The API structure specified by EasyPost can also be used to add the Canpar carrier shipper account. ```shell curl -X POST https://api.easypost.com/v2/carrier_accounts \ -u "$EASYPOST_API_KEY": \ -H 'Content-Type: application/json' \ -d '{ "carrier_account": { "type": "CanparAccount", "description": "CanparAccount", "credentials": { "account_number": "VALUE", "password": "VALUE", "username": "VALUE" }, "test_credentials": { "account_number": "VALUE", "password": "VALUE", "username": "VALUE" } } }' ``` ### Software Requirements Download an EasyPost Client Library or utilize the REST API with cURL. ### Documentation Review Examine the EasyPost Objects section to understand the API's structure, which is critical for constructing requests and interpreting responses. Related: - [Getting Started Guide](https://docs.easypost.com/guides/getting-started) - [Manage Carrier Accounts](https://app.easypost.com/account/settings?tab=carriers) --- ## Billing When using a Canpar BYOCA, shipment charges are billed under the shipper's own Canpar account. --- ## Rates Canpar is live-rated. To access rates, first integrate Canpar with EasyPost. Detailed rate information, including surcharges, will be available through the EasyPost API once the Canpar account is linked and operational. Rates consist of four key components: - Actual weight of the product. - Dimensional weight of the product (which considers the package size). - Origin and destination points. - Service type selected. --- ## Service Levels Canpar offers a variety of service levels to meet diverse shipping needs. Service levels are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=canpar`. Related: - [Service Levels](https://docs.easypost.com/docs/shipments/rates#service-levels) ### Coverage Area Canpar supports a variety of service levels for Canada domestic, US, and international shipments to more than 215 countries worldwide. - Domestic shipments within Canada (Canada to Canada) - Shipments from Canada to the United States (Canada to US) - International shipments from Canada to destinations outside the US (Canada to International) #### Select USA For rush USA shipping needs, Canpar Express also offers expedited service from Montreal, Toronto, and Vancouver to anywhere in the continental U.S. This service is guaranteed to be delivered on time. Related: - [Shipping in Canada](https://www.canpar.com/en/shipping/shipping_canada.htm) - [US and International](https://www.canpar.com/en/shipping/shipping_international.htm) - [Canpar Service Levels](https://docs.easypost.com/docs/shipments/rates?carrier=Canpar#service-levels) --- ## Predefined Packages Predefined packages provide a convenient way to classify parcels using carrier-defined package types and retrieve applicable rates. When creating a shipment with the EasyPost API, select a predefined package that matches the parcel's characteristics and provide its weight in ounces when required. See the predefined package documentation for supported values and example requests. Predefined packages are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=canpar`. Related: - [Predefined Packages](https://docs.easypost.com/docs/parcels#predefined-packages) --- ## Generating Shipping Labels With EasyPost, the process for generating shipping labels for Canpar is the same as generating them for any other carrier. Review the Getting Started Guide for help generating a shipping label. ### Manifests 1. Create an empty Batch object. 2. Add desired shipments to the Batch for manifesting. 3. Create a Manifest/ScanForm for the Batch. 4. Print the manifest document for Canpar drivers. Related: - [Batch Documentation](https://docs.easypost.com/docs/batches) ### Refunding and Voiding Labels Voiding Canpar labels through EasyPost is supported. ### Shipment Options Shipment options are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=canpar`. Related: - [Shipment Options](https://docs.easypost.com/docs/shipments/options) #### Label Formats EasyPost offers native Canpar labels in PNG and PDF formats. #### Label Size 4x6 labels are supported. Related: - [Shipment Documentation](https://docs.easypost.com/docs/shipments) - [Getting Started Guide](https://docs.easypost.com/guides/getting-started) --- ## Hazardous Materials (HAZMAT) This guide does not specify handling hazardous materials with Canpar. Users are encouraged to consult with Canpar for hazardous materials policies and procedures. See Canpar's What Not to Ship page for more information. Related: - [What Not to Ship](https://www.canpar.com/en/support/what_not_to_ship.htm) --- ## Pickups **Pickup Requests:** Can be made through the EasyPost API. \ **Pricing Details:** Consult a Canpar representative for specific pickup pricing. \ **Scheduling Pickups**: Detailed procedure is outlined in the Pickup documentation. Related: - [Pickups Documentation](https://docs.easypost.com/docs/pickups) --- ## Tracking EasyPost simplifies package tracking by offering two methods: - Tracking with an existing number and carrier. - Using a Tracker included with an EasyPost-purchased shipping label. The service integrates webhooks for timely shipment updates. For detailed information on tracking methods, visit the Tracking Guide. Related: - [Trackers Documentation](https://docs.easypost.com/docs/trackers) - [Trackers Guide](https://docs.easypost.com/guides/tracking-guide) --- ## Additional Resources ### Carrier Metadata The Carrier Metadata endpoint can programmatically return information about Canpar service levels, predefined packages, supported features, and shipment options. Use this information to quickly integrate with Canpar and make educated decisions about the mix of carriers for shipping needs. Additionally, the Carrier Metadata endpoint is available to retrieve comprehensive information about all carriers on the EasyPost platform, enhancing decision-making for carrier services. ### Support and Troubleshooting In addition to the guidance provided in the Carrier Guides, EasyPost offers support to assist with FAQs, troubleshooting issues, and inquiries related to the EasyPost platform. Visit the Help Center for more information. Related: - [Carrier Metadata](https://docs.easypost.com/docs/carrier-metadata) - [Help Center](https://support.easypost.com/hc/en-us) --- ## Talk to a Shipping Expert For questions about getting started with the EasyPost API please talk to a Shipping Expert or Contact Support. Related: - [Talk to a Shipping Expert](https://www.easypost.com/talk-to-easypost) - [Contact Support](https://support.easypost.com/hc/requests/new) --- Source: https://docs.easypost.com/carriers/cdl-guide # CDL Last Mile Solutions Guide CDL Last Mile Solutions (CDL) is a family-owned company established in 1955. What began as a trucking and messenger service is now a premier last-mile solution carrier from the northeast to the mid-Atlantic. This guide includes detailed information on utilizing CDL shipping with the EasyPost API, focusing on account setup, rates, label creation, manifests, tracking, and more. --- ## Carrier Account Setup ### Account Registration Sign up for an EasyPost account to obtain a **Test** and **Production** API key. See Authentication and Key Management for more information. > Note: Negotiated rates are only available in Production mode. ### Carrier Setup Upon sign-up with EasyPost, users gain immediate access to Wallet Carrier Accounts, which can be enabled directly from the Dashboard. For additional carriers, EasyPost supports a Bring Your Own Carrier Account (BYOCA) option. This requires users to register directly with the respective carrier. #### CDL Shipper Account Registration 1. Contact CDL to request a shipper account. A representative will be in touch for additional details regarding the account. 2. Inform CDL about using EasyPost's API for label purchases. 3. Acquire rates and align any additional shipping needs. 4. Obtain the following test and production account credentials: 1. CDL Customer Password 2. CDL Customer Username 5. Input carrier-specific credentials within the EasyPost Carrier Account Dashboard for comprehensive rate access. #### CDL Account via API The API structure specified by EasyPost can also be used to add the CDL carrier shipper account. ```shell curl -X POST https://api.easypost.com/v2/carrier_accounts \ -u "$EASYPOST_API_KEY": \ -H 'Content-Type: application/json' \ -d '{ "carrier_account": { "type": "ColumbusLastMileAccount", "description": "ColumbusLastMileAccount", "credentials": { "password": "VALUE", "username": "VALUE" }, "test_credentials": { "password": "VALUE", "username": "VALUE" } } }' ``` ### Software Requirements Download an EasyPost Client Library or utilize the REST API with cURL. ### Documentation Review Examine the EasyPost Objects section to understand the API's structure, which is critical for constructing requests and interpreting responses. Related: - [Getting Started Guide](https://docs.easypost.com/guides/getting-started) - [Manage Carrier Accounts](https://app.easypost.com/account/settings?tab=carriers) --- ## Billing CDL bills the actual postage through its billing system. --- ## Rates When integrating a CDL account with EasyPost, users should be aware of how rates are managed and displayed. Here's a breakdown of key points: ### Default Rate Display EasyPost always returns a $0.01 placeholder rate for CDL shipments. Live postage rates are not returned through this integration. --- ## Service Levels CDL offers the following services: Service levels are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=cdllastmilesolutions`. Related: - [Service Levels](https://docs.easypost.com/docs/shipments/rates#service-levels) ### Coverage Area Headquartered in NYC, CDL operates out of seven strategically located distribution centers with central sorting hubs located in Ridgewood, NY, and Moonachie, NJ. ![Map indicating CDL coverage area](https://docs.easypost.com/images/guides/cdl/cdl-coverage-map.png) Related: - [CDL Service Levels](https://docs.easypost.com/docs/shipments/rates?carrier=cdllastmilesolutions#service-levels) --- ## Predefined Packages Predefined packages provide a convenient way to classify parcels using carrier-defined package types and retrieve applicable rates. When creating a shipment with the EasyPost API, select a predefined package that matches the parcel's characteristics and provide its weight in ounces when required. See the predefined package documentation for supported values and example requests. Predefined packages are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=cdllastmilesolutions`. Related: - [Predefined Packages](https://docs.easypost.com/docs/parcels#predefined-packages) --- ## Generating Shipping Labels To generate shipping labels with CDL, follow the standard process with the addition of specific requirements for pickup and delivery scheduling. When creating a shipment with CDL, the following options must be included to successfully purchase labels: ```json { "options": { "pickup_min_datetime": "2024-09-06T06:38:16+00:00", "pickup_max_datetime": "2024-09-06T11:38:16+00:00", "delivery_min_datetime": "2024-09-07T00:38:16+00:00", "delivery_max_datetime": "2024-09-12T23:59:00+00:00" } } ``` These options specify the earliest and latest permissible `datetime` for pickup and delivery, ensuring that the logistics align with CDL's operational capabilities. ### One-Call Buys One-call buys enable streamlined label purchasing through the EasyPost API by consolidating multiple operations into a single API request. This feature is designed to simplify and accelerate the shipping process by combining the creation of a shipment, retrieval of rates, and purchasing the shipping label into one efficient step. See Reducing API Response Times for more information. ### Manifests Manifesting is **not** supported or required. ### Refunding and Voiding Labels Voiding CDL labels through EasyPost is **not** supported. ### Shipment Options Shipment options are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=cdllastmilesolutions`. Related: - [Shipment Options](https://docs.easypost.com/docs/shipments/options) #### Label Formats EasyPost offers native CDL labels in ZPL, PNG, and PDF formats. Related: - [Shipment Documentation](https://docs.easypost.com/docs/shipments) - [Reducing API Response Times](https://support.easypost.com/hc/en-us/articles/360048825772-Reducing-API-Response-Times) --- ## Hazardous Materials (HAZMAT) The CDL policy on hazardous materials is not explicitly detailed in this guide. Shippers are advised to contact CDL directly for specific hazmat inquiries. --- ## Pickups CDL accommodates pickups based on individual agreements with customers. While regular pickups can be arranged directly with CDL during the account registration process, they **cannot be scheduled via the EasyPost API**. --- ## Tracking EasyPost simplifies package tracking by offering two methods: - Tracking with an existing number and carrier. - Using a Tracker included with an EasyPost-purchased shipping label. The service integrates webhooks for timely shipment updates. For detailed information on tracking methods, visit the Tracking Guide. Related: - [Trackers Documentation](https://docs.easypost.com/docs/trackers) - [Trackers Guide](https://docs.easypost.com/guides/tracking-guide) --- ## Additional Resources ### Carrier Metadata The Carrier Metadata endpoint can programmatically return information about service levels, predefined packages, supported features, and shipment options. Use this information to quickly integrate and make educated decisions about the mix of carriers for shipping needs. Additionally, the Carrier Metadata endpoint is available to retrieve comprehensive information about all carriers on the EasyPost platform, enhancing decision-making for carrier services. ### Support and Troubleshooting In addition to the guidance provided in the Carrier Guides, EasyPost offers support to assist with FAQs, troubleshooting issues, and inquiries related to the EasyPost platform. Visit the Help Center for more information. Related: - [Carrier Metadata](https://docs.easypost.com/docs/carrier-metadata) - [Help Center](https://support.easypost.com/hc/en-us) --- ## Talk to a Shipping Expert For questions about getting started with the EasyPost API please talk to a Shipping Expert or Contact Support. Related: - [Talk to a Shipping Expert](https://www.easypost.com/talk-to-easypost) - [Contact Support](https://support.easypost.com/hc/requests/new) --- Source: https://docs.easypost.com/carriers/cirro-e-commerce-guide # GOFO/CIRRO E-Commerce Guide GOFO/CIRRO E-Commerce is a best-in-class domestic and international ecommerce logistics provider and consolidator. With a dynamic IT suite, GOFO/CIRRO E-Commerce can offer EasyPost customers a full range of services, including fully integrated tracking, DDP international shipments, built-in zone skipping, and more. This guide includes detailed information on utilizing GOFO/CIRRO E-Commerce shipping with the EasyPost API, focusing on account setup, rates, label creation, manifests, and tracking. For operational details, shipment nuances, and frequently asked questions, refer to the GOFO/CIRRO E-Commerce Carrier Support and FAQs article. **IMPORTANT:** As of February 2026, GOFO has acquired CIRRO E-Commerce USA. This further strengthens services you may have been, or are considering using, for your small parcel B2C needs. Related: - [GOFO/CIRRO E-Commerce Carrier Support & FAQs](https://support.easypost.com/hc/en-us/articles/44444262373389-GOFO-CIRRO-E-Commerce-Carrier-Support-FAQs) --- ## Carrier Account Setup ### Account Registration Sign up for an EasyPost account to obtain a **Test** and **Production** API key. See Authentication and Key Management for more information. > Note: Negotiated rates are only available in Production mode. ### Carrier Setup #### GOFO/CIRRO E-Commerce Shipper Account Registration 1. Contact GOFO/CIRRO E-Commerce to request a shipper account. A representative will be in touch for additional details regarding the account. 2. Inform GOFO/CIRRO E-Commerce about using EasyPost's API for label purchases. 3. Acquire rates and align any additional shipping needs. 4. Obtain the following account credentials from GOFO/CIRRO E-Commerce: 1. API Key 2. User ID 5. Input carrier-specific credentials on the Carrier Account Dashboard for comprehensive rate access and **choose the most convenient injection hub for drop-offs**. #### GOFO/CIRRO E-Commerce Account via API The API structure specified by EasyPost can also be used to add the GOFO/CIRRO E-Commerce carrier shipper account. ```shell curl -X POST https://api.easypost.com/v2/carrier_accounts \ -u "$EASYPOST_API_KEY": \ -H 'Content-Type: application/json' \ -d '{ "carrier_account": { "type": "ParcllAccount", "description": "ParcllAccount", "credentials": { "api_key": "VALUE", "origin_hub": "VALUE", "user_id": "VALUE" }, "test_credentials": { "api_key": "VALUE", "origin_hub": "VALUE", "user_id": "VALUE" } } }' ``` ### Software Requirements Download an EasyPost Client Library or utilize the REST API with cURL. ### Documentation Review Examine the EasyPost Objects section to understand the API's structure, which is critical for constructing requests and interpreting responses. Related: - [Getting Started Guide](https://docs.easypost.com/guides/getting-started) - [Manage Carrier Accounts](https://app.easypost.com/account/settings?tab=carriers) --- ## Billing Billing is directly handled by GOFO/CIRRO E-Commerce. EasyPost does not participate in the billing process for GOFO/CIRRO E-Commerce services. Contact a GOFO/CIRRO E-Commerce representative for details. --- ## Rates GOFO/CIRRO E-Commerce is recognized for offering competitive rates to low—and high-volume shippers thanks to its extensive logistics partnerships. Discounts may be available; talk to a shipping expert for eligibility. GOFO/CIRRO E-Commerce is a **Live Rating** integration, enabling real-time rate retrieval for shipments created via EasyPost. - When creating a shipment, EasyPost requests GOFO/CIRRO E-Commerce for shipment rates specific to the user's GOFO/CIRRO E-Commerce account. - The rates provided are directly from GOFO/CIRRO E-Commerce and tailored to the user's specific account details. - In cases of discrepancies or incorrect rates, users are advised to contact their GOFO/CIRRO E-Commerce account representative. - The representative can then update the rates in GOFO/CIRRO E-Commerce's database to ensure accuracy for the user's account. --- ## Service Levels GOFO/CIRRO E-Commerce provides a variety of small parcel services tailored to both B2B and B2C requirements, featuring: Service levels are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=cirroecommerce`. Related: - [Service Levels](https://docs.easypost.com/docs/shipments/rates#service-levels) ### Coverage Area and Hubs GOFO/CIRRO E-Commerce offers drop-off hubs in Los Angeles, Dallas, Miami, Chicago, New York, and Atlanta, with full shipping coverage in the US. GOFO/CIRRO E-Commerce also provides 1st-mile solutions on an account-by-account basis. Talk to a shipping expert to see if you qualify. ![Map indicating GOFO/CIRRO E-Commerce coverage area](https://docs.easypost.com/images/guides/cirro-e-commerce/cirro-e-commerce-coverage-map.png) Related: - [GOFO/CIRRO E-Commerce Service Levels](https://docs.easypost.com/docs/shipments/rates?carrier=CirroECommerce#service-levels) --- ## Predefined Packages Predefined packages provide a convenient way to classify parcels using carrier-defined package types and retrieve applicable rates. When creating a shipment with the EasyPost API, select a predefined package that matches the parcel's characteristics and provide its weight in ounces when required. See the predefined package documentation for supported values and example requests. Predefined packages are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=cirroecommerce`. Related: - [Predefined Packages](https://docs.easypost.com/docs/parcels#predefined-packages) --- ## Generating Shipping Labels With EasyPost, the process for generating shipping labels for GOFO/CIRRO E-Commerce is the same as generating them for any other carrier. Review the Getting Started Guide for help generating a shipping label. ### Manifests Manifesting is not supported or required for GOFO/CIRRO E-Commerce. ### Returns GOFO/CIRRO E-Commerce does not provide a separate service for returns. Any shipments will be subject to regular pricing. ### Refunding and Voiding Labels Voiding GOFO/CIRRO E-Commerce labels through EasyPost is not supported. ### Shipment Options Shipment options are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=cirroecommerce`. Related: - [Shipment Options](https://docs.easypost.com/docs/shipments/options) #### Label Formats GOFO/CIRRO E-Commerce labels are available in PNG, ZPL, and PDF formats. --- ## Hazardous Materials (HAZMAT) GOFO/CIRRO E-Commerce supports select hazardous materials shipments. Refer to the GOFO/CIRRO E-Commerce Carrier Support & FAQs support article for supported hazard classes and mapping details. --- ## Pickups GOFO/CIRRO E-Commerce accommodates pickups based on individual agreements with customers. While regular pickups can be arranged directly with GOFO/CIRRO E-Commerce during the account registration process, they **cannot be scheduled via the EasyPost API**. --- ## Tracking EasyPost simplifies package tracking by offering two methods: - Tracking with an existing number and carrier. - Using a Tracker included with an EasyPost-purchased shipping label. The service integrates webhooks for timely shipment updates. For detailed information on tracking methods, visit the Tracking Guide. Related: - [Trackers Documentation](https://docs.easypost.com/docs/trackers) - [Trackers Guide](https://docs.easypost.com/guides/tracking-guide) --- ## Additional Resources ### Carrier Metadata The Carrier Metadata endpoint can programmatically return information about service levels, predefined packages, supported features, and shipment options. Use this information to quickly integrate with and make educated decisions about the mix of carriers for shipping needs. Additionally, the Carrier Metadata endpoint is available to retrieve comprehensive information about all carriers on the EasyPost platform, enhancing decision-making for carrier services. ### Support and Troubleshooting In addition to the guidance provided in the Carrier Guides, EasyPost offers support to assist with FAQs, troubleshooting issues, and inquiries related to the EasyPost platform. Visit the Help Center for more information. Related: - [Carrier Metadata](https://docs.easypost.com/docs/carrier-metadata) - [Help Center](https://support.easypost.com/hc/en-us) --- ## Talk to a Shipping Expert For questions about getting started with the EasyPost API please talk to a Shipping Expert or Contact Support. Related: - [Talk to a Shipping Expert](https://www.easypost.com/talk-to-easypost) - [Contact Support](https://support.easypost.com/hc/requests/new) --- Source: https://docs.easypost.com/carriers/correos-guide # Correos Guide Correos is Spain's national postal operator. It delivers parcels across Spain, including the Balearic and Canary Islands, Ceuta, and Melilla, to mainland Portugal, and internationally. Delivery is to the door, a Correos office, or a Citypaq locker. Correos Express is a separate carrier and is not covered here. --- ## Carrier Account Setup ### Account Registration Sign up for an EasyPost account to obtain a Test and Production API key. See Authentication and Key Management for more information. ### Carrier Setup #### Correos Account Registration Request a Correos shipper account and credentials from Correos. Add the account in the Carrier Accounts Dashboard or with the API. The account type is `CorreosAccount`. Correos provides two key pairs and three account codes: - CorreosID client ID and client secret (`auth_client_id`, `auth_client_secret`) - API client ID and client secret (`api_client_id`, `api_client_secret`), sent on every call - Contract number (`contract_number`, maximum 8 characters) - Client number (`client_number`, maximum 10 characters) - Labeller code (`labeller_code`, maximum 4 characters) Production and test credentials are separate objects. A credential works only in its own environment. Correos accepts calls only from allowlisted IP addresses, in production and in test. #### Correos Account via API Use the Carrier Account API to add a Correos account: ```shell curl -X POST https://api.easypost.com/v2/carrier_accounts \ -u "$EASYPOST_API_KEY": \ -H 'Content-Type: application/json' \ -d '{ "carrier_account": { "type": "CorreosAccount", "description": "CorreosAccount", "credentials": { "api_client_id": "VALUE", "api_client_secret": "VALUE", "auth_client_id": "VALUE", "auth_client_secret": "VALUE", "client_number": "VALUE", "contract_number": "VALUE", "labeller_code": "VALUE" }, "test_credentials": { "api_client_id": "VALUE", "api_client_secret": "VALUE", "auth_client_id": "VALUE", "auth_client_secret": "VALUE", "client_number": "VALUE", "contract_number": "VALUE", "labeller_code": "VALUE" } } }' ``` ### Software Requirements Download an EasyPost Client Library or use the REST API with cURL. ### Documentation Review Review the EasyPost Objects documentation to understand requests and responses. Related: - [Getting Started Guide](https://docs.easypost.com/guides/getting-started) - [Manage Carrier Accounts](https://app.easypost.com/account/settings?tab=carriers) --- ## Billing The customer is billed by Correos. Correos uses bill-on-scan. --- ## Rates Correos supports rate table rating. Rate tables must be installed for each EasyPost account; otherwise the API returns one-cent placeholder rates (EUR). Contact EasyPost Support for help installing a Correos rate table. --- ## Service Levels Service levels are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=correos`. Office and Citypaq services need the destination office or locker code. EasyPost does not send that code. A parcel over the product's weight or size limit is rejected with a 422 before buying and is not rated. Related: - [Service Levels](https://docs.easypost.com/docs/shipments/rates#service-levels) ### Coverage Correos ships from Spain only. The ship-from country must be Spain, and the ship-from and ship-to addresses need a street and a city. Domestic services deliver within Spain, including the Balearic and Canary Islands, Ceuta, and Melilla. Shipments crossing into or out of the Canary Islands, Ceuta, or Melilla require a customs declaration. Shipments that stay within the same territory do not. Paq Premium and Paq Estándar also deliver to mainland Portugal, not the Portuguese islands. International services deliver worldwide outside Spain and require customs data. --- ## Predefined Packages Use parcel dimensions and weight when creating shipments. Predefined packages are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=correos`. Related: - [Predefined Packages](https://docs.easypost.com/docs/parcels#predefined-packages) --- ## Generating Shipping Labels Correos supports buying and one-call buys. The carrier draws PDF and ZPL labels at 4x6. PNG labels are converted from the carrier's ZPL. A CN22 or CN23 accompanies shipments that cross the EU customs border, including shipments that cross into or out of the Canary Islands, Ceuta, or Melilla. Shipments that stay within the same territory do not. That form is a PDF on A4 paper. QR codes, surcharges, and address verification are not supported. Review the Getting Started Guide for help generating a label. ### Manifests Manifesting is not supported. ### Refunding and Voiding Labels Voiding Correos labels through EasyPost is supported. Return labels are not supported. ### Shipment Options Shipment options are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=correos`. `label_format` accepts PDF, ZPL, or PNG. `delivery_confirmation` value `SIGNATURE` is not available for Paq Ligero or Citypaq. `DIRECT_SIGNATURE` delivers only to the named recipient and requires that recipient's identity document in `tax_identifiers`. `carrier_insurance_amount` is euros only, in whole euros, and is summed across containers into one declared value per shipment. Insurance is not available for Paq Ligero, Paq Azul, or Palet. On customs shipments, `customs_info.contents_type` cannot be mixed content. `customs_info.non_delivery_option` value `abandon` is international only. `endorsement` value `NO_RETURN_TO_SENDER` is international only. `incoterm` accepts `DAP` or `DDU`, and only across a customs border. `invoice_number` is limited to 15 characters on customs shipments. `tax_identifiers` accepts a Spanish DNI, NIE, or CIF, an EU ID, a passport, or the recipient's VAT number for imports. `return_address` must be the sender's address. For goods shipments that require a customs declaration, each item needs a description, an HS code (6, 8, or 10 digits), a quantity (maximum 999), a weight, and a value. Item value is euros only. Document shipments do not require item lines. Pass item records under `shipment.options.fulfiller_order_items[*].items[*]` using `description`, `hs_tariff_number`, `quantity`, `item_weight`, and `item_value`. Related: - [Shipment Options](https://docs.easypost.com/docs/shipments/options) --- ## Hazardous Materials (HAZMAT) Limited-quantity and fully regulated hazardous materials are not supported. --- ## Pickups Correos supports pickups in Spain only. A pickup is booked for one day and one 3-hour slot: 9–12, 12–15, 15–18, or 18–21 local time. Correos uses the first slot that fits entirely inside the requested window. Pickups are booked 3 to 80 days ahead and carry no charge. --- ## Tracking Correos supports tracking through the EasyPost API. Related: - [Tracking Documentation](https://docs.easypost.com/docs/trackers) --- ## Additional Resources ### Carrier Metadata The Carrier Metadata endpoint provides information about Correos service levels, predefined packages, supported features, and shipment options. ### Support and Troubleshooting Contact Correos for questions about carrier requirements, billing, or pickups. In addition to the guidance provided in the Carrier Guides, EasyPost offers support to assist with FAQs, troubleshooting issues, and inquiries related to the EasyPost platform. Visit the Help Center for more information. Related: - [Carrier Metadata](https://docs.easypost.com/docs/carrier-metadata) - [Help Center](https://support.easypost.com/hc/en-us) --- ## Talk to a Shipping Expert For questions about getting started with the EasyPost API please talk to a Shipping Expert or Contact Support. Related: - [Talk to a Shipping Expert](https://www.easypost.com/talk-to-easypost) - [Contact Support](https://support.easypost.com/hc/requests/new) --- Source: https://docs.easypost.com/carriers/courier-express-guide # Courier Express Guide Courier Express is a courier and logistics company that offers local delivery services in the southeast region of the United States. Their mission is to create transportation solutions, build logistics partnerships, and drive value - one delivery at a time. This guide includes detailed information on utilizing Courier Express shipping with the EasyPost API, focusing on account setup, rates, label creation, manifests, tracking, and more. --- ## Carrier Account Setup ### Account Registration Sign up for an EasyPost account to obtain a **Test** and **Production** API key. See Authentication and Key Management for more information. > Note: Negotiated rates are only available in Production mode. ### Carrier Setup Upon sign-up with EasyPost, users gain immediate access to Wallet Carrier Accounts, which can be enabled directly from the Dashboard. For additional carriers, EasyPost supports a Bring Your Own Carrier Account (BYOCA) option. This requires users to register directly with the respective carrier. #### Courier Express Shipper Account Registration 1. Contact Courier Express to request a shipper account. A representative will be in touch for additional details regarding the account. 2. Inform Courier Express about using EasyPost's API for label purchases. 3. Acquire rates and align any additional shipping needs. 4. Obtain the following test and production account credentials: 1. Courier Express API Key 2. Courier Express Shipper ID 5. Input carrier-specific credentials within the EasyPost Carrier Account Dashboard for comprehensive rate access. #### Courier Express Account via API The API structure specified by EasyPost can also be used to add the Courier Express carrier shipper account. ```shell curl -X POST https://api.easypost.com/v2/carrier_accounts \ -u "$EASYPOST_API_KEY": \ -H 'Content-Type: application/json' \ -d '{ "carrier_account": { "type": "CourierExpressAccount", "description": "CourierExpressAccount", "credentials": { "api_key": "VALUE", "shipper_id": "VALUE" }, "test_credentials": { "api_key": "VALUE", "shipper_id": "VALUE" } } }' ``` ### Software Requirements Download an EasyPost Client Library or utilize the REST API with cURL. ### Documentation Review Examine the EasyPost Objects section to understand the API's structure, which is critical for constructing requests and interpreting responses. Related: - [Getting Started Guide](https://docs.easypost.com/guides/getting-started) - [Manage Carrier Accounts](https://app.easypost.com/account/settings?tab=carriers) --- ## Billing When using a Courier Express BYOCA, shipment charges are billed under the shipper's own Courier Express account. --- ## Rates Courier Express is a **Live Rating** integration, enabling real-time rate retrieval for shipments created via EasyPost. Rates are guaranteed valid for a minimum of five minutes. - When creating a shipment, EasyPost requests Courier Express for shipment rates specific to the user's Courier Express account. - The rates provided are directly from Courier Express and tailored to the user's specific account details. - In cases of discrepancies or incorrect rates, users are advised to contact their Courier Express account representative. - The representative can then update the rates to ensure user account accuracy. --- ## Service Levels Courier Express offers the following service levels: Service levels are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=courierexpress`. Related: - [Service Levels](https://docs.easypost.com/docs/shipments/rates#service-levels) Related: - [Courier Express Service Levels](https://docs.easypost.com/docs/shipments/rates?carrier=courierexpress#service-levels) --- ## Predefined Packages Predefined packages provide a convenient way to classify parcels using carrier-defined package types and retrieve applicable rates. When creating a shipment with the EasyPost API, select a predefined package that matches the parcel's characteristics and provide its weight in ounces when required. See the predefined package documentation for supported values and example requests. Predefined packages are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=courierexpress`. Related: - [Predefined Packages](https://docs.easypost.com/docs/parcels#predefined-packages) --- ## Generating Shipping Labels With EasyPost, generating shipping labels for Courier Express is the same process as generating them for any other carrier. Review the Getting Started Guide for help generating a shipping label. ### Manifests Manifesting is **not** supported or required for Courier Express. ### Refunding and Voiding Labels Voiding Courier Express labels through EasyPost is supported. ### Shipment Options Shipment options are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=courierexpress`. Related: - [Shipment Options](https://docs.easypost.com/docs/shipments/options) #### Label Formats EasyPost offers native Courier Express labels in PNG, PDF, and ZPL formats. #### Label Options - 4x6-inch label size - `print_custom_1` - `print_custom_2` Related: - [Shipment Documentation](https://docs.easypost.com/docs/shipments) - [Reducing API Response Times](https://support.easypost.com/hc/en-us/articles/360048825772-Reducing-API-Response-Times) --- ## Hazardous Materials (HAZMAT) The Courier Express policy on hazardous materials is not explicitly detailed in this guide. Shippers are advised to contact Courier Express directly for specific hazmat inquiries. --- ## Pickups Courier Express accommodates pickups based on individual agreements with customers. While regular pickups can be arranged directly with Courier Express during the account registration process, they **cannot be scheduled via the EasyPost API**. --- ## Tracking EasyPost simplifies package tracking by offering two methods: - Tracking with an existing number and carrier. - Using a Tracker included with an EasyPost-purchased shipping label. The service integrates webhooks for timely shipment updates. For detailed information on tracking methods, visit the Tracking Guide. Related: - [Trackers Documentation](https://docs.easypost.com/docs/trackers) - [Trackers Guide](https://docs.easypost.com/guides/tracking-guide) --- ## Additional Resources ### Carrier Metadata The Carrier Metadata endpoint can programmatically return information about service levels, predefined packages, supported features, and shipment options. Use this information to quickly integrate and make educated decisions about the mix of carriers for shipping needs. Additionally, the Carrier Metadata endpoint is available to retrieve comprehensive information about all carriers on the EasyPost platform, enhancing decision-making for carrier services. ### Support and Troubleshooting In addition to the guidance provided in the Carrier Guides, EasyPost offers support to assist with FAQs, troubleshooting issues, and inquiries related to the EasyPost platform. Visit the Help Center for more information. Related: - [Carrier Metadata](https://docs.easypost.com/docs/carrier-metadata) - [Help Center](https://support.easypost.com/hc/en-us) --- ## Talk to a Shipping Expert For questions about getting started with the EasyPost API please talk to a Shipping Expert or Contact Support. Related: - [Talk to a Shipping Expert](https://www.easypost.com/talk-to-easypost) - [Contact Support](https://support.easypost.com/hc/requests/new) --- Source: https://docs.easypost.com/carriers/couriersplease-guide # CouriersPlease Guide CouriersPlease stands as Australia's fastest-growing franchised courier and parcel delivery service, catering to the diverse shipping needs of ecommerce retailers and traders nationwide. This guide includes detailed information on utilizing CouriersPlease shipping with the EasyPost API, focusing on account setup, rates, label creation, manifests, tracking, and more. --- ## Carrier Account Setup ### Account Registration Sign up for an EasyPost account to obtain a **Test** and **Production** API key. See Authentication and Key Management for more information. > Note: Negotiated rates are only available in Production mode. ### Carrier Setup Upon sign-up with EasyPost, users gain immediate access to Wallet Carrier Accounts, which can be enabled directly from the Dashboard. For additional carriers, EasyPost supports a Bring Your Own Carrier Account (BYOCA) option. This requires users to register directly with the respective carrier. #### CouriersPlease Shipper Account Registration 1. Contact CouriersPlease to request a shipper account. A representative will be in touch for additional details regarding the account. 2. Inform CouriersPlease about using EasyPost's API for label purchases. 3. Acquire rates and align any additional shipping needs. 4. Obtain the following test and production account credentials:: 1. Password 2. Account Number 5. Input carrier-specific credentials within the EasyPost Carrier Account Dashboard for comprehensive rate access. #### CouriersPlease Account via API The API structure specified by EasyPost can also be used to add the CouriersPlease carrier shipper account. ```shell curl -X POST https://api.easypost.com/v2/carrier_accounts \ -u "$EASYPOST_API_KEY": \ -H 'Content-Type: application/json' \ -d '{ "carrier_account": { "type": "CouriersPleaseAccount", "description": "CouriersPleaseAccount", "credentials": { "password": "VALUE", "username": "VALUE" }, "test_credentials": { "password": "VALUE", "username": "VALUE" } } }' ``` ### Software Requirements Download an EasyPost Client Library or utilize the REST API with cURL. ### Documentation Review Examine the EasyPost Objects section to understand the API's structure, which is critical for constructing requests and interpreting responses. Related: - [Getting Started Guide](https://docs.easypost.com/guides/getting-started) - [Manage Carrier Accounts](https://app.easypost.com/account/settings?tab=carriers) --- ## Billing When using a CouriersPlease BYOCA, shipment charges are billed under the shipper's own CouriersPlease account. --- ## Rates CouriersPlease is a **Live Rating** integration, enabling real-time rate retrieval for shipments created via EasyPost. Rates are guaranteed valid for a minimum of five minutes. - When creating a shipment, EasyPost requests CouriersPlease for shipment rates specific to the user's CouriersPlease account. - The rates provided are directly from CouriersPlease and tailored to the user's specific account details. - In cases of discrepancies or incorrect rates, users are advised to contact their CouriersPlease account representative. - The representative can then update the rates to ensure user account accuracy. --- ## Service Levels CouriersPlease offers the following service levels: Service levels are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=couriersplease`. Related: - [Service Levels](https://docs.easypost.com/docs/shipments/rates#service-levels) Related: - [CouriersPlease Service Levels](https://docs.easypost.com/docs/shipments/rates?carrier=couriersplease#service-levels) --- ## Predefined Packages Predefined packages provide a convenient way to classify parcels using carrier-defined package types and retrieve applicable rates. When creating a shipment with the EasyPost API, select a predefined package that matches the parcel's characteristics and provide its weight in ounces when required. See the predefined package documentation for supported values and example requests. Predefined packages are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=couriersplease`. Related: - [Predefined Packages](https://docs.easypost.com/docs/parcels#predefined-packages) --- ## Generating Shipping Labels With EasyPost, generating shipping labels for CouriersPlease is the same process as generating them for any other carrier. Review the Getting Started Guide for help generating a shipping label. ### Manifests Manifesting is **not** supported or required for CouriersPlease. ### Refunding and Voiding Labels Voiding CouriersPlease labels through EasyPost is **not** supported. ### Shipment Options Shipment options are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=couriersplease`. Related: - [Shipment Options](https://docs.easypost.com/docs/shipments/options) #### Label Formats EasyPost offers native CouriersPlease labels in PDF, PNG, and ZPL formats. Related: - [Shipment Documentation](https://docs.easypost.com/docs/shipments) - [Reducing API Response Times](https://support.easypost.com/hc/en-us/articles/360048825772-Reducing-API-Response-Times) --- ## Hazardous Materials (HAZMAT) The CouriersPlease policy on hazardous materials is not explicitly detailed in this guide. Shippers are advised to contact CouriersPlease directly for specific hazmat inquiries. --- ## Pickups CouriersPlease pickup requests are made at the time of label purchase. Contact CouriersPlease for additional information. --- ## Tracking EasyPost simplifies package tracking by offering two methods: - Tracking with an existing number and carrier. - Using a Tracker included with an EasyPost-purchased shipping label. The service integrates webhooks for timely shipment updates. For detailed information on tracking methods, visit the Tracking Guide. Related: - [Trackers Documentation](https://docs.easypost.com/docs/trackers) - [Trackers Guide](https://docs.easypost.com/guides/tracking-guide) --- ## Additional Resources ### Carrier Metadata The Carrier Metadata endpoint can programmatically return information about service levels, predefined packages, supported features, and shipment options. Use this information to quickly integrate and make educated decisions about the mix of carriers for shipping needs. Additionally, the Carrier Metadata endpoint is available to retrieve comprehensive information about all carriers on the EasyPost platform, enhancing decision-making for carrier services. ### Support and Troubleshooting In addition to the guidance provided in the Carrier Guides, EasyPost offers support to assist with FAQs, troubleshooting issues, and inquiries related to the EasyPost platform. Visit the Help Center for more information. Related: - [Carrier Metadata](https://docs.easypost.com/docs/carrier-metadata) - [Help Center](https://support.easypost.com/hc/en-us) --- ## Talk to a Shipping Expert For questions about getting started with the EasyPost API please talk to a Shipping Expert or Contact Support. Related: - [Talk to a Shipping Expert](https://www.easypost.com/talk-to-easypost) - [Contact Support](https://support.easypost.com/hc/requests/new) --- Source: https://docs.easypost.com/carriers/cs-logistics-guide # CS Logistics Guide CS Logistics, Inc., founded in 1998 in Milwaukee, Wisconsin, has expanded from a local courier service to a complete logistics solution in the Midwest. The company offers a broad range of services, including warehousing, distribution, and specialized delivery options such as next flight out and white glove air freight. This guide includes detailed information on utilizing CS Logistics shipping with the EasyPost API, focusing on account setup, rates, label creation, manifests, tracking, and more. --- ## Carrier Account Setup ### Account Registration Sign up for an EasyPost account to obtain a **Test** and **Production** API key. See Authentication and Key Management for more information. > Note: Negotiated rates are only available in Production mode. ### Carrier Setup Upon sign-up with EasyPost, users gain immediate access to Wallet Carrier Accounts, which can be enabled directly from the Dashboard. For additional carriers, EasyPost supports a Bring Your Own Carrier Account (BYOCA) option. This requires users to register directly with the respective carrier. #### CS Logistics Shipper Account Registration 1. Contact CS Logistics to request a shipper account. A representative will be in touch for additional details regarding the account. 2. Inform CS Logistics about using EasyPost's API for label purchases. 3. Acquire rates and align any additional shipping needs. 4. Obtain CS Logistics account credentials: 1. Username 2. Password 5. Input carrier-specific credentials within the EasyPost Carrier Account Dashboard for comprehensive rate access. #### CS Logistics Account via API The API structure specified by EasyPost can also be used to add the CS Logistics carrier shipper account. ```shell curl -X POST https://api.easypost.com/v2/carrier_accounts \ -u "$EASYPOST_API_KEY": \ -H 'Content-Type: application/json' \ -d '{ "carrier_account": { "type": "CSLogisticsAccount", "description": "CSLogisticsAccount", "credentials": { "password": "VALUE", "username": "VALUE" }, "test_credentials": { "password": "VALUE", "username": "VALUE" } } }' ``` ### Software Requirements Download an EasyPost Client Library or utilize the REST API with cURL. ### Documentation Review Examine the EasyPost Objects section to understand the API's structure, which is critical for constructing requests and interpreting responses. Related: - [Getting Started Guide](https://docs.easypost.com/guides/getting-started) - [Manage Carrier Accounts](https://app.easypost.com/account/settings?tab=carriers) --- ## Billing Billing is directly handled by CS Logistics after parcel delivery. EasyPost does not participate in the billing process for CS Logistics services. Contact a CS Logistics representative for details. --- ## Rates CS Logistics is a **Live Rating** integration, enabling real-time rate retrieval for shipments created via EasyPost. Rates are guaranteed valid for a minimum of 5 minutes. - When creating a shipment, EasyPost requests CS Logistics for shipment rates specific to the user's CS Logistics account. - The rates provided are directly from CS Logistics and tailored to the user's specific account details. - In cases of discrepancies or incorrect rates, users are advised to contact their CS Logistics account representative. - The representative can then update the rates in CS Logistics's database to ensure user account accuracy. --- ## Service Levels CS Logistics offers the following service levels: Service levels are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=cslogistics`. Related: - [Service Levels](https://docs.easypost.com/docs/shipments/rates#service-levels) Related: - [CS Logistics Service Levels](https://docs.easypost.com/docs/shipments/rates?carrier=CSLogistics#service-levels) --- ## Predefined Packages Predefined packages provide a convenient way to classify parcels using carrier-defined package types and retrieve applicable rates. When creating a shipment with the EasyPost API, select a predefined package that matches the parcel's characteristics and provide its weight in ounces when required. See the predefined package documentation for supported values and example requests. Predefined packages are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=cslogistics`. Related: - [Predefined Packages](https://docs.easypost.com/docs/parcels#predefined-packages) --- ## Generating Shipping Labels With EasyPost, the process for generating shipping labels for CS Logistics is the same as generating them for any other carrier. Review the Getting Started Guide for help generating a shipping label. ### One-Call Buys 1-call buys enable streamlined label purchasing through the EasyPost API by consolidating multiple operations into a single API request. This feature is designed to simplify and accelerate the shipping process by combining the creation of a shipment, retrieval of rates, and purchasing the shipping label into one efficient step. See Reducing API Response Times for more information. ### Manifests Manifesting is required for CS Logistics. ### Refunding and Voiding Labels Voiding CS Logistics labels through EasyPost is supported. > Note: The **shipment.tracking_code** is required as it identifies the order within the carrier's system. ### Shipment Options Shipment options are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=cslogistics`. Related: - [Shipment Options](https://docs.easypost.com/docs/shipments/options) #### Label Formats EasyPost offers native CS Logistics labels in PNG, PDF, and ZPL formats. Related: - [Shipment Documentation](https://docs.easypost.com/docs/shipments) - [Reducing API Response Times](https://support.easypost.com/hc/en-us/articles/360048825772-Reducing-API-Response-Times) --- ## Hazardous Materials (HAZMAT) CS Logistics's policy on hazardous materials is not explicitly detailed. Shippers are advised to contact CS Logistics directly for specific guidelines and compliance requirements. --- ## Pickups CS Logistics accommodates pickups based on individual agreements with customers. While regular pickups can be arranged directly with CS Logistics during the account registration process, they **cannot be scheduled via the EasyPost API**. --- ## Tracking EasyPost simplifies package tracking by offering two methods: - Tracking with an existing number and carrier. - Using a Tracker included with an EasyPost-purchased shipping label. The service integrates webhooks for timely shipment updates. For detailed information on tracking methods, visit the Tracking Guide. Related: - [Trackers Documentation](https://docs.easypost.com/docs/trackers) - [Trackers Guide](https://docs.easypost.com/guides/tracking-guide) --- ## Additional Resources ### Carrier Metadata The Carrier Metadata endpoint can programmatically return information about CS Logistics service levels, predefined packages, supported features, and shipment options. Use this information to quickly integrate with CS Logistics and make educated decisions about the mix of carriers for shipping needs. Additionally, the Carrier Metadata endpoint is available to retrieve comprehensive information about all carriers on the EasyPost platform, enhancing decision-making for carrier services. ### Support and Troubleshooting In addition to the guidance provided in the Carrier Guides, EasyPost offers support to assist with FAQs, troubleshooting issues, and inquiries related to the EasyPost platform. Visit the Help Center for more information. Related: - [Carrier Metadata](https://docs.easypost.com/docs/carrier-metadata) - [Help Center](https://support.easypost.com/hc/en-us) --- ## Talk to a Shipping Expert For questions about getting started with the EasyPost API please talk to a Shipping Expert or Contact Support. Related: - [Talk to a Shipping Expert](https://www.easypost.com/talk-to-easypost) - [Contact Support](https://support.easypost.com/hc/requests/new) --- Source: https://docs.easypost.com/carriers/ctt-express-guide # CTT Express Guide CTT Express is the express mail and parcel subsidiary of CTT – Correios de Portugal, the national postal service of Portugal. It primarily operates as a courier and logistics operator throughout the Iberian Peninsula, handling B2B and B2C express shipments and e-commerce deliveries. CTT Express also supports international shipment logistics. This guide provides detailed information on utilizing CTT Express shipping with the EasyPost API, focusing on account setup, rates, label creation, manifests, tracking, and more. For operational details, shipment nuances, and frequently asked questions, refer to the CTT Express Carrier Support and FAQs article. Related: - [CTT Express Carrier Support and FAQs](https://support.easypost.com/hc/en-us/articles/48290329241229-CTT-Express-Carrier-Support-and-FAQs) --- ## Carrier Account Setup ### Account Registration Sign up for an EasyPost account to obtain a **Test** and **Production** API key. See Authentication and Key Management for more information. > Note: Negotiated rates are only available in Production mode. ### Carrier Setup #### CTT Express Account Registration 1. Contact CTT Express to request a shipper account. A representative will be in touch for additional details regarding the account. 2. Inform CTT Express about using EasyPost's API for label purchases. 3. Acquire rates and align any additional shipping needs. 4. Provide EasyPost with the following information: 1. Client_id 2. Contract_id 3. Distribution_channel_id 4. Authentication_id 5. User_id #### CTT Express Account via API The API structure specified by EasyPost can also be used to add the CTT Express carrier shipper account. ```shell curl -X POST https://api.easypost.com/v2/carrier_accounts \ -u "$EASYPOST_API_KEY": \ -H 'Content-Type: application/json' \ -d '{ "carrier_account": { "type": "CttExpressAccount", "description": "CttExpressAccount", "credentials": { "authentication_id": "VALUE", "client_id": "VALUE", "contract_id": "VALUE", "distribution_channel_id": "VALUE", "user_id": "VALUE" }, "test_credentials": { "authentication_id": "VALUE", "client_id": "VALUE", "contract_id": "VALUE", "distribution_channel_id": "VALUE", "user_id": "VALUE" } } }' ``` ### Software Requirements Download an EasyPost Client Library or utilize the REST API with cURL. ### Documentation Review Examine the EasyPost Objects section to understand the API's structure, which is critical for constructing requests and interpreting responses. Related: - [Getting Started Guide](https://docs.easypost.com/guides/getting-started) - [Manage Carrier Accounts](https://app.easypost.com/account/settings?tab=carriers) --- ## Billing Billing is handled directly by CTT Express and follows a **bill-on-scan** model. - Charges are applied when the shipment is scanned into the CTT Express network, not at the time of label creation. - EasyPost is not involved in the billing process. - All invoices, adjustments, and billing inquiries are managed through CTT Express. --- ## Rates ### Default Rate Display - EasyPost initially returns a one-cent rate for shipments once the CTT Express account is set up. - CTT Express will charge the appropriate amount for postage via their billing system. ### Rate Card - CTT Express representatives provide rate cards detailing expected costs based on shipment parameters (package size, weight, location, etc.). - Acquiring this custom rate card from CTT Express is required to receive custom negotiated rates as part of the API rate response. ### Rate Card Integration - Once the rate card is received from CTT Express, users should contact EasyPost support at support@easypost.com for assistance installing this rate card to their account. --- ## Service Levels CTT Express Codes are automatically selected per shipment based on the shipment type; however, service levels may also be configured per shipper account. CTT Express supports the following Service Codes: Service levels are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=cttexpress`. Related: - [Service Levels](https://docs.easypost.com/docs/shipments/rates#service-levels) ### Coverage Area CTT Express provides robust support for e-commerce throughout the Iberian Peninsula and offers adaptable international shipping options for parcel delivery. --- ## Predefined Packages Predefined packages provide a convenient way to classify parcels using carrier-defined package types and retrieve applicable rates. When creating a shipment with the EasyPost API, select a predefined package that matches the parcel's characteristics and provide its weight in ounces when required. See the predefined package documentation for supported values and example requests. Predefined packages are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=cttexpress`. Related: - [Predefined Packages](https://docs.easypost.com/docs/parcels#predefined-packages) --- ## Generating Shipping Labels With EasyPost, generating shipping labels for CTT Express is the same process as generating them for any other carrier. Review the Getting Started Guide for help generating a shipping label. ### One-Call Buys One-call buys enable streamlined label purchasing through the EasyPost API by consolidating multiple operations into a single API request. This feature is designed to simplify and accelerate the shipping process by combining the creation of a shipment, retrieval of rates, and purchasing the shipping label into one efficient step. See Reducing API Response Times for more information. ### Manifests Manifesting is **not** supported. ### Refunding and Voiding Labels Voids and refunds are **not** supported. ### Shipment Options Shipment options are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=cttexpress`. Related: - [Shipment Options](https://docs.easypost.com/docs/shipments/options) ### Multi-Piece Shipping Multi-piece shipments are supported. Related: - [Shipment Documentation](https://docs.easypost.com/docs/shipments) - [CTT Express Carrier Support and FAQs](https://support.easypost.com/hc/en-us/articles/48290329241229-CTT-Express-Carrier-Support-and-FAQs) --- ## Hazardous Materials (HAZMAT) Hazmat shipments are **not** supported. --- ## Pickups Pickups are **not** supported. --- ## Tracking Tracking is **not** supported. --- ## Additional Resources ### Carrier Metadata The Carrier Metadata endpoint can programmatically return information about service levels, predefined packages, supported features, and shipment options. Use this information to quickly integrate and make educated decisions about the mix of carriers for shipping needs. Additionally, the Carrier Metadata endpoint is available to retrieve comprehensive information about all carriers on the EasyPost platform, enhancing decision-making for carrier services. ### Support and Troubleshooting In addition to the guidance provided in the Carrier Guides, EasyPost offers support to assist with FAQs, troubleshooting issues, and inquiries related to the EasyPost platform. Visit the Help Center for more information. Related: - [Carrier Metadata](https://docs.easypost.com/docs/carrier-metadata) - [Help Center](https://support.easypost.com/hc/en-us) --- ## Talk to a Shipping Expert For questions about getting started with the EasyPost API please talk to a Shipping Expert or Contact Support. Related: - [Talk to a Shipping Expert](https://www.easypost.com/talk-to-easypost) - [Contact Support](https://support.easypost.com/hc/requests/new) --- Source: https://docs.easypost.com/carriers/ctt-express-spain-guide # CTT Express Spain Guide CTT Express is the express mail and parcel subsidiary of CTT – Correios de Portugal, the national postal service of Portugal. It operates throughout the Iberian Peninsula and supports B2B and B2C express shipments, e-commerce deliveries, and international logistics. The CTT Express Spain integration is separate from the CTT Express integration and is intended for shipments originating in Spain. This guide provides detailed information on using CTT Express Spain with the EasyPost API, including account setup, rates, labels, tracking, and more. For operational details, shipment nuances, and frequently asked questions, refer to the CTT Express Carrier Support and FAQs article. Related: - [CTT Express Carrier Support and FAQs](https://support.easypost.com/hc/en-us/articles/48290329241229-CTT-Express-Carrier-Support-and-FAQs) --- ## Carrier Account Setup ### Account Registration Sign up for an EasyPost account to obtain a **Test** and **Production** API key. See Authentication and Key Management for more information. > Note: Negotiated rates are only available in Production mode. ### Carrier Setup #### CTT Express Spain Account Registration 1. Contact CTT Express to request a CTT Express Spain shipper account and credentials. 2. Inform CTT Express that the account will be used with the EasyPost API. 3. Acquire a rate card and align any additional shipping needs with CTT Express. 4. Obtain the following production and test credentials: ##### Required Credentials - Client ID - Client secret - Cost center code CTT Express Spain may also provide an optional department code. #### CTT Express Spain Account via API The API structure specified by EasyPost can also be used to add a CTT Express Spain carrier account. ```shell curl -X POST https://api.easypost.com/v2/carrier_accounts \ -u "$EASYPOST_API_KEY": \ -H 'Content-Type: application/json' \ -d '{ "carrier_account": { "type": "CttExpressSpainAccount", "description": "CttExpressSpainAccount", "credentials": { "client_id": "VALUE", "client_secret": "VALUE", "cost_center_code": "VALUE" }, "test_credentials": { "client_id": "VALUE", "client_secret": "VALUE", "cost_center_code": "VALUE" } } }' ``` ### Software Requirements Download an EasyPost Client Library or use the REST API with cURL. ### Documentation Review Review the EasyPost Objects documentation to understand the API structure used to construct requests and interpret responses. Related: - [Getting Started Guide](https://docs.easypost.com/guides/getting-started) - [Manage Carrier Accounts](https://app.easypost.com/account/settings?tab=carriers) --- ## Billing Billing is handled directly by CTT Express Spain using a **bill-on-scan** model. Charges are applied when a shipment is scanned into the carrier network rather than when the label is created. CTT Express handles all invoices, adjustments, and billing inquiries. --- ## Rates CTT Express Spain supports rate card rating. Rate cards must be installed for each EasyPost account; otherwise, the API returns one-cent rates. After receiving a rate card from CTT Express, contact EasyPost Support for help installing it on the EasyPost account. --- ## Service Levels CTT Express Spain supports domestic shipments within Spain and international shipments. Service levels are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=cttexpressspain`. Related: - [Service Levels](https://docs.easypost.com/docs/shipments/rates#service-levels) --- ## Predefined Packages Use parcel dimensions and weight when creating shipments. Predefined packages are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=cttexpressspain`. Related: - [Predefined Packages](https://docs.easypost.com/docs/parcels#predefined-packages) --- ## Generating Shipping Labels Generating CTT Express Spain labels follows the same process as generating labels for other carriers with EasyPost. CTT Express Spain supplies carrier-generated labels in PDF and PNG formats. Review the Getting Started Guide for help generating a shipping label. ### One-Call Buys CTT Express Spain supports label purchases and one-call buys. One-call buys combine shipment creation, rate retrieval, and label purchase in a single API request. See Reducing API Response Times for more information. ### Manifests Manifesting is **not** supported. ### Returns Return labels are **not** supported. ### Refunding and Voiding Labels Voids and refunds are **not** supported. ### Shipment Options Shipment options are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=cttexpressspain`. Cash on delivery and carrier insurance amounts must use EUR. Carrier insurance is calculated as the sum of the insured value across all containers. Incoterms are supported for international shipments. International shipments can also include a customs signer in `customs_info.customs_signer` and tax identifiers in `tax_identifiers`. The customs contents type is required for international shipments. Related: - [Shipment Options](https://docs.easypost.com/docs/shipments/options) ### Multi-Piece Shipping Multi-piece shipments are supported. ### Additional Limitations CTT Express Spain does not support QR codes, surcharges, commercial invoices, or address verification. Related: - [Shipment Documentation](https://docs.easypost.com/docs/shipments) - [CTT Express Carrier Support and FAQs](https://support.easypost.com/hc/en-us/articles/48290329241229-CTT-Express-Carrier-Support-and-FAQs) --- ## Hazardous Materials (HAZMAT) Limited quantity and fully regulated hazardous material shipments are **not** supported. --- ## Pickups Pickups are **not** supported through the EasyPost API. Contact CTT Express to arrange pickups. --- ## Tracking CTT Express Spain supports tracking through the EasyPost API. Related: - [Tracking Documentation](https://docs.easypost.com/docs/trackers) --- ## Additional Resources ### Carrier Metadata The Carrier Metadata endpoint can programmatically return information about CTT Express Spain service levels, predefined packages, supported features, and shipment options. Use this information to integrate with CTT Express Spain and make informed decisions about the carriers used for shipping. The Carrier Metadata endpoint can also retrieve information about all carriers on the EasyPost platform. ### Support and Troubleshooting Contact CTT Express for questions about carrier requirements, rates, or pickups. In addition to the guidance provided in the Carrier Guides, EasyPost offers support to assist with FAQs, troubleshooting issues, and inquiries related to the EasyPost platform. Visit the Help Center for more information. Related: - [Carrier Metadata](https://docs.easypost.com/docs/carrier-metadata) - [Help Center](https://support.easypost.com/hc/en-us) --- ## Talk to a Shipping Expert For questions about getting started with the EasyPost API please talk to a Shipping Expert or Contact Support. Related: - [Talk to a Shipping Expert](https://www.easypost.com/talk-to-easypost) - [Contact Support](https://support.easypost.com/hc/requests/new) --- Source: https://docs.easypost.com/carriers/dai-post-guide # DAI Post Guide Established in 2000 in Melbourne, Australia, DAI Post is an Australian-owned company that has been focused on getting parcels delivered safely for over 20 years. They specialize in ecommerce, wholesale international inbound parcel delivery in Australia, New Zealand, and Singapore. This guide includes detailed information on utilizing DAI Post shipping with the EasyPost API, focusing on account setup, rates, label creation, manifests, tracking, and more. For operational details, shipment nuances, and frequently asked questions, refer to the DAI Post Carrier Support and FAQs article. Related: - [DAI Post Carrier Support and FAQs](https://support.easypost.com/hc/en-us/articles/42926701187853-DAI-Post-Carrier-Support-and-FAQs) --- ## Carrier Account Setup ### Account Registration Sign up for an EasyPost account to obtain a **Test** and **Production** API key. See Authentication and Key Management for more information. > Note: Negotiated rates are only available in Production mode. ### Carrier Setup Upon sign-up with EasyPost, users gain immediate access to Wallet Carrier Accounts, which can be enabled directly from the Dashboard. For additional carriers, EasyPost supports a Bring Your Own Carrier Account (BYOCA) option. This requires users to register directly with the respective carrier. **Tracking Authentication Requirement:** DAI Post now requires an API key issued directly by DAI Post for tracking requests. This requirement applies only to tracking functionality. Rate retrieval and label generation continue to operate using existing credentials and do not require a DAI Post API key. #### DAI Post Shipper Account Registration 1. Contact DAI Post to request a shipper account. A representative will be in touch for additional details regarding the account. 2. Inform DAI Post about using EasyPost's API for label purchases. 3. Acquire rates and align any additional shipping needs. 4. Obtain the following production credentials: 1. 3-letter account code for customers with multiple accounts 2. DAI Post default origin terminal 3. DAI Post client secret 4. DAI Post customer username 5. Tracking API Key Requirement: For tracking services, DAI Post requires customers to use a DAI Post-issued API key. 5. Input carrier-specific credentials within the EasyPost Carrier Account Dashboard for comprehensive rate access. #### DAI Post Account via API The API structure specified by EasyPost can also be used to add the DAI Post carrier shipper account. ```shell curl -X POST https://api.easypost.com/v2/carrier_accounts \ -u "$EASYPOST_API_KEY": \ -H 'Content-Type: application/json' \ -d '{ "carrier_account": { "type": "DaiPostAccount", "description": "DaiPostAccount", "credentials": { "account_code": "VALUE", "api_key": "VALUE", "origin_terminal": "VALUE", "password": "VALUE", "username": "VALUE" } } }' ``` ### Software Requirements Download an EasyPost Client Library or utilize the REST API with cURL. ### Documentation Review Examine the EasyPost Objects section to understand the API's structure, which is critical for constructing requests and interpreting responses. Related: - [Getting Started Guide](https://docs.easypost.com/guides/getting-started) - [Manage Carrier Accounts](https://app.easypost.com/account/settings?tab=carriers) --- ## Billing Billing for DAI Post shipments is handled directly between the shipper and DAI Post. EasyPost is not part of the billing chain for this carrier integration. --- ## Rates When integrating a DAI Post account with EasyPost, users should be aware of how rates are managed and displayed. Here's a breakdown of key points: ### Default Rate Display - EasyPost initially returns a $0.01 rate for shipments once the DAI Post account is set up. - DAI Post will charge the appropriate amount for postage via their billing system. ### Rate Card - DAI Post representatives provide rate cards detailing expected costs based on shipment parameters (package size, weight, location, etc.). - Acquiring this custom rate card from DAI Post is crucial, as EasyPost is not automatically privy to these rates. ### Rate Card Integration Once the rate card is received from DAI Post, users should contact EasyPost support at support@easypost.com for assistance installing the rate card into their account. --- ## Service Levels DAI Post offers the following services: Service levels are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=daipost`. Related: - [Service Levels](https://docs.easypost.com/docs/shipments/rates#service-levels) Related: - [DAI Post Service Levels](https://docs.easypost.com/docs/shipments/rates?carrier=daipost#service-levels) --- ## Predefined Packages Predefined packages provide a convenient way to classify parcels using carrier-defined package types and retrieve applicable rates. When creating a shipment with the EasyPost API, select a predefined package that matches the parcel's characteristics and provide its weight in ounces when required. See the predefined package documentation for supported values and example requests. Predefined packages are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=daipost`. Related: - [Predefined Packages](https://docs.easypost.com/docs/parcels#predefined-packages) --- ## Generating Shipping Labels With EasyPost, generating shipping labels for DAI Post is the same process as generating them for any other carrier. Review the Getting Started Guide for help generating a shipping label. ### One-Call Buys One-call buys enable streamlined label purchasing through the EasyPost API by consolidating multiple operations into a single API request. This feature is designed to simplify and accelerate the shipping process by combining the creation of a shipment, retrieval of rates, and purchasing the shipping label into one efficient step. See Reducing API Response Times for more information. ### Manifests Manifesting is supported. ### Refunding and Voiding Labels Voiding DAI Post labels through EasyPost is supported. ### Shipment Options Shipment options are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=daipost`. Related: - [Shipment Options](https://docs.easypost.com/docs/shipments/options) #### Label Formats EasyPost offers native DAI Post labels in ZPL, PNG, and PDF formats. Related: - [Shipment Documentation](https://docs.easypost.com/docs/shipments) - [Reducing API Response Times](https://support.easypost.com/hc/en-us/articles/360048825772-Reducing-API-Response-Times) --- ## Hazardous Materials (HAZMAT) The DAI Post policy on hazardous materials is not explicitly detailed in this guide. Shippers are advised to contact DAI Post directly for specific hazmat inquiries. --- ## Pickups DAI Post accommodates pickups based on individual agreements with customers. While regular pickups can be arranged directly with DAI Post during the account registration process, they **cannot be scheduled via the EasyPost API**. --- ## Tracking EasyPost simplifies package tracking by offering two methods: - Tracking with an existing number and carrier. - Using a Tracker included with an EasyPost-purchased shipping label. The service integrates webhooks for timely shipment updates. For detailed information on tracking methods, visit the Tracking Guide. ### Tracking Authentication Requirements DAI Post requires a carrier-issued API key for tracking requests. This requirement applies only to tracking functionality. - Rates and label generation do not require a DAI Post API key and continue to function as normal. - Tracking requests must be authenticated using a DAI Post-issued API key unless otherwise noted. All other customers must request a tracking API key directly from DAI Post. To request an API key, Contact DAI Post Related: - [Trackers Documentation](https://docs.easypost.com/docs/trackers) - [Trackers Guide](https://docs.easypost.com/guides/tracking-guide) --- ## Additional Resources ### Carrier Metadata The Carrier Metadata endpoint can programmatically return information about service levels, predefined packages, supported features, and shipment options. Use this information to quickly integrate and make educated decisions about the mix of carriers for shipping needs. Additionally, the Carrier Metadata endpoint is available to retrieve comprehensive information about all carriers on the EasyPost platform, enhancing decision-making for carrier services. ### Support and Troubleshooting In addition to the guidance provided in the Carrier Guides, EasyPost offers support to assist with FAQs, troubleshooting issues, and inquiries related to the EasyPost platform. Visit the Help Center for more information. Related: - [Carrier Metadata](https://docs.easypost.com/docs/carrier-metadata) - [Help Center](https://support.easypost.com/hc/en-us) --- ## Talk to a Shipping Expert For questions about getting started with the EasyPost API please talk to a Shipping Expert or Contact Support. Related: - [Talk to a Shipping Expert](https://www.easypost.com/talk-to-easypost) - [Contact Support](https://support.easypost.com/hc/requests/new) --- Source: https://docs.easypost.com/carriers/deutsche-post-uk-guide # Deutsche Post UK Guide Deutsche Post UK is part of the Deutsche Post DHL Group, one of the world's leading postal and logistics companies. Known for its efficiency and reliability, Deutsche Post UK specializes in providing streamlined logistics for documents, parcels, and freight, ensuring timely and secure delivery to corporate clients with complex logistics needs. This guide includes detailed information on utilizing Deutsche Post UK shipping with the EasyPost API, focusing on account setup, rates, label creation, manifests, tracking, and more. --- ## Carrier Account Setup ### Account Registration Sign up for an EasyPost account to obtain a **Test** and **Production** API key. See Authentication and Key Management for more information. > Note: Negotiated rates are only available in Production mode. ### Carrier Setup Upon sign-up with EasyPost, users gain immediate access to Wallet Carrier Accounts, which can be enabled directly from the Dashboard. For additional carriers, EasyPost supports a Bring Your Own Carrier Account (BYOCA) option. This requires users to register directly with the respective carrier. #### Deutsche Post UK Shipper Account Registration 1. Contact Deutsche Post UK to request a shipper account. A representative will be in touch for additional details regarding the account. 2. Inform Deutsche Post UK about using EasyPost's API for label purchases. 3. Acquire rates and align any additional shipping needs. 4. Obtain the following production and test credentials: 1. Deutsche Post UK Account Number 2. Deutsche Post UK Client ID 3. Deutsche Post UK Secret 5. Input carrier-specific credentials within the EasyPost Carrier Account Dashboard for comprehensive rate access. #### Deutsche Post UK Account via API The API structure specified by EasyPost can also be used to add the Deutsche Post UK carrier shipper account. ```shell curl -X POST https://api.easypost.com/v2/carrier_accounts \ -u "$EASYPOST_API_KEY": \ -H 'Content-Type: application/json' \ -d '{ "carrier_account": { "type": "DeutschePostUKAccount", "description": "DeutschePostUKAccount", "credentials": { "account_number": "VALUE", "api_key": "VALUE", "client_id": "VALUE", "client_secret": "VALUE", "customer_identification": "VALUE", "customer_pricing_reference": "VALUE" }, "test_credentials": { "account_number": "VALUE", "api_key": "VALUE", "client_id": "VALUE", "client_secret": "VALUE", "customer_identification": "VALUE", "customer_pricing_reference": "VALUE" } } }' ``` ### Software Requirements Download an EasyPost Client Library or utilize the REST API with cURL. ### Documentation Review Examine the EasyPost Objects section to understand the API's structure, which is critical for constructing requests and interpreting responses. Related: - [Getting Started Guide](https://docs.easypost.com/guides/getting-started) - [Manage Carrier Accounts](https://app.easypost.com/account/settings?tab=carriers) --- ## Billing Deutsche Post UK bills the actual postage through its billing system. --- ## Rates When integrating a Deutsche Post UK account with EasyPost, users should be aware of how rates are managed and displayed. Here's a breakdown of key points: ### Default Rate Display EasyPost returns a $0.01 placeholder rate for Deutsche Post UK shipments until a rate table is loaded on EasyPost's end. ### Rate Card - Deutsche Post UK representatives provide rate cards detailing expected costs based on shipment parameters (package size, weight, location, etc.). - Acquiring this custom rate card from Deutsche Post UK is crucial, as EasyPost is not automatically privy to these rates. ### Rate Card Integration Once the rate card is received from Deutsche Post UK, users should contact support@easypost.com for assistance installing this rate card into their account. --- ## Service Levels Deutsche Post UK offers the following services: Service levels are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=deutschepostuk`. Related: - [Service Levels](https://docs.easypost.com/docs/shipments/rates#service-levels) Related: - [Deutsche Post UK Service Levels](https://docs.easypost.com/docs/shipments/rates?carrier=deutschepostuk#service-levels) --- ## Predefined Packages Predefined packages provide a convenient way to classify parcels using carrier-defined package types and retrieve applicable rates. When creating a shipment with the EasyPost API, select a predefined package that matches the parcel's characteristics and provide its weight in ounces when required. See the predefined package documentation for supported values and example requests. Predefined packages are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=deutschepostuk`. Related: - [Predefined Packages](https://docs.easypost.com/docs/parcels#predefined-packages) --- ## Generating Shipping Labels With EasyPost, generating shipping labels for Deutsche Post UK is the same process as generating them for any other carrier. Review the Getting Started Guide for help generating a shipping label. ### One-Call Buys 1-call buys enable streamlined label purchasing through the EasyPost API by consolidating multiple operations into a single API request. This feature is designed to simplify and accelerate the shipping process by combining the creation of a shipment, retrieval of rates, and purchasing the shipping label into one efficient step. See Reducing API Response Times for more information. ### Manifests Manifesting is supported. ### Refunding and Voiding Labels Voiding Deutsche Post UK labels through EasyPost is **not** supported. ### Shipment Options Shipment options are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=deutschepostuk`. Related: - [Shipment Options](https://docs.easypost.com/docs/shipments/options) #### Label Formats EasyPost offers native Deutsche Post UK labels in ZPL, PNG, and PDF formats. Related: - [Shipment Documentation](https://docs.easypost.com/docs/shipments) - [Reducing API Response Times](https://support.easypost.com/hc/en-us/articles/360048825772-Reducing-API-Response-Times) --- ## Hazardous Materials (HAZMAT) The Deutsche Post UK policy on hazardous materials is not explicitly detailed in this guide. Shippers are advised to contact Deutsche Post UK directly for specific hazmat inquiries. --- ## Pickups Deutsche Post UK accommodates pickups based on individual agreements with customers. While regular pickups can be arranged directly with Deutsche Post UK during the account registration process, they **cannot be scheduled via the EasyPost API**. --- ## Tracking EasyPost simplifies package tracking by offering two methods: - Tracking with an existing number and carrier. - Using a Tracker included with an EasyPost-purchased shipping label. The service integrates webhooks for timely shipment updates. For detailed information on tracking methods, visit the Tracking Guide. Related: - [Trackers Documentation](https://docs.easypost.com/docs/trackers) - [Trackers Guide](https://docs.easypost.com/guides/tracking-guide) --- ## Additional Resources ### Carrier Metadata The Carrier Metadata endpoint can programmatically return information about service levels, predefined packages, supported features, and shipment options. Use this information to quickly integrate and make educated decisions about the mix of carriers for shipping needs. Additionally, the Carrier Metadata endpoint is available to retrieve comprehensive information about all carriers on the EasyPost platform, enhancing decision-making for carrier services. ### Support and Troubleshooting In addition to the guidance provided in the Carrier Guides, EasyPost offers support to assist with FAQs, troubleshooting issues, and inquiries related to the EasyPost platform. Visit the Help Center for more information. Related: - [Carrier Metadata](https://docs.easypost.com/docs/carrier-metadata) - [Help Center](https://support.easypost.com/hc/en-us) --- ## Talk to a Shipping Expert For questions about getting started with the EasyPost API please talk to a Shipping Expert or Contact Support. Related: - [Talk to a Shipping Expert](https://www.easypost.com/talk-to-easypost) - [Contact Support](https://support.easypost.com/hc/requests/new) --- Source: https://docs.easypost.com/carriers/dhl-ecommerce-byoca-guide # DHL eCommerce BYOCA Guide DHL eCommerce provides specialized, value-driven shipping solutions for B2C and B2B customers, focusing on lightweight (under 5 lb) international and domestic parcel delivery using the USPS as a carrier partner. DHL eCommerce BYOCA (Bring Your Own Carrier Account) allows users to integrate their own DHL eCommerce account with EasyPost. This guide outlines how to configure, rate, and ship using existing DHL eCommerce credentials through EasyPost's API. --- ## Carrier Account Setup ### Account Registration Sign up for an EasyPost account to obtain a **Test** and **Production** API key. See Authentication and Key Management for more information. > Note: Negotiated rates are only available in Production mode. ### Carrier Setup #### Bring Your Own Carrier Account (BYOCA) to EasyPost 1. Contact DHL eCommerce to request a shipper account. A representative will be in touch for additional details regarding the account. 2. Inform DHL eCommerce about using EasyPost's API for label purchases. 3. Acquire rates and align any additional shipping needs. 4. Obtain the following production and test account credentials: 1. DHL eCommerce Solutions Client ID 2. DHL eCommerce Solutions Client Secret 3. DHL eCommerce Solutions Pickup ID 4. DHL eCommerce Solutions Distribution Center 5. {/* prettier-ignore */}Input carrier-specific credentials on the Carrier Account Dashboard for comprehensive rate access. #### DHL eCommerce BYOCA via API The API structure specified by EasyPost can also be used to add the DHL eCommerce BYOCA account. ```shell curl -X POST https://api.easypost.com/v2/carrier_accounts \ -u "$EASYPOST_API_KEY": \ -H 'Content-Type: application/json' \ -d '{ "carrier_account": { "type": "DhlEcsAccount", "description": "DhlEcsAccount", "credentials": { "client_id": "VALUE", "client_secret": "VALUE", "distribution_center": "VALUE", "pickup_id": "VALUE" }, "test_credentials": { "client_id": "VALUE", "client_secret": "VALUE", "distribution_center": "VALUE", "pickup_id": "VALUE" } } }' ``` ### Software Requirements Download an EasyPost Client Library or utilize the REST API with cURL. ### Documentation Review Examine the EasyPost Objects section to understand the API's structure, which is critical for constructing requests and interpreting responses. Related: - [Getting Started Guide](https://docs.easypost.com/guides/getting-started) --- ## Billing When using a DHL eCommerce BYOCA, shipment charges are billed under the shipper's own DHL eCommerce account. Labels are billed on scan. --- ## Rates DHL eCommerce (BYOCA) is a **Live Rating** integration, enabling real-time rate retrieval for shipments created via EasyPost. - When creating a shipment, EasyPost requests DHL eCommerce for shipment rates specific to the user's DHL eCommerce account. - The rates provided are directly from DHL eCommerce, tailored to the specific account details of the user. - In cases of discrepancies or incorrect rates, users are advised to contact their DHL eCommerce account representative. - The representative can then update the rates in DHL eCommerce's database to ensure accuracy for the user's account. --- ## Service Levels Service levels included with the **EasyPost DHL eCommerce BYOCA** account provide nationwide domestic services and U.S. export coverage to over 220+ countries worldwide. Visit DHL eCommerce's website for detailed information on domestic and international shipping services. ### Delivered Duty Unpaid (DDU) and Delivered Duty Paid (DDP) Options For international shipping via DHL eCommerce, it's important to understand two INCOTERMS: DDU and DDP, which dictate the payment of important duties and taxes: - **DDU:** The recipient is responsible for paying any import duties and taxes. - **DDP:** The shipper pays all costs, including import duties and taxes, ensuring hassle-free delivery for the recipient. Choosing between DDU and DDP affects how duties and taxes are managed, influencing the overall shipping process. See DDP vs DDU for E-Commerce Business for more information. ### DHL eCommerce BYOCA Service Levels Service levels are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=dhlecommercesolutionsbyoca`. Related: - [Service Levels](https://docs.easypost.com/docs/shipments/rates#service-levels) ### Additional DHL eCommerce Services DHL eCommerce may not return rates for specific services during a standard rating call with EasyPost. However, these services can still be accessed through the API using a unique method known as the ‘one-call buy'. Related: - [Service Levels and Parcels](https://docs.easypost.com/docs/shipments/rates#service-levels) - [DDU vs DDP for E-Commerce Business](https://www.dhl.com/discover/en-my/e-commerce-advice/e-commerce-best-practice/ddu-vs-ddp) --- ## Predefined Packages Predefined packages provide a convenient way to classify parcels using carrier-defined package types and retrieve applicable rates. When creating a shipment with the EasyPost API, select a predefined package that matches the parcel's characteristics and provide its weight in ounces when required. See the predefined package documentation for supported values and example requests. Predefined packages are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=dhlecommercesolutionsbyoca`. Related: - [Predefined Packages](https://docs.easypost.com/docs/parcels#predefined-packages) --- ## Generating Shipping Labels With EasyPost, the process for generating shipping labels for DHL eCommerce is the same as generating them for any other carrier. Review the Getting Started Guide for help generating a shipping label. ### One-Call Buys One-call buys enable streamlined label purchasing through the EasyPost API by consolidating multiple operations into a single API request. This feature is designed to simplify and accelerate the shipping process by combining the creation of a shipment, retrieval of rates, and purchasing the shipping label into one efficient step. See Reducing API Response Times for more information. ### Manifests Manifesting DHL eCommerce shipments serves two primary functions: - **Electronic Data Transmission:** It fulfills the DHL eCommerce requirement of electronically transmitting shipment data. - **Driver Manifest Shipment Summary:** Generates a summary document needed for DHL eCommerce driver pickup. ![DHL eCommerce Driver's Manifest Shipment Summary](https://docs.easypost.com/images/guides/dhl-ecommerce/dhl-driver-manifest-shipment-summary.png) #### Asynchronous Manifesting Manifesting is not instantaneous and may take **several minutes** to complete and receive a manifest document. Immediate receipt of a driver manifest summary is not possible; it becomes available shortly after the manifesting process: 1. Create a batch with a list of shipments (or add shipments to the batch throughout the day). 2. Batch Processing 1. **Option A:** Wait approximately 1-3 seconds for the batch creation to complete. 2. **Option B:** Monitor for a `batch.updated` webhook event indicating the `batch.state` has changed to `created`. > Note: Initiating the next step during the **“creating”** status leads to errors. 3. Execute the manifest `scan_form` batch. 4. Manifest Confirmation 1. **Option A:** Wait up to five minutes and retrieve the `scan_form` to confirm completion. 2. **Option B:** Use webhooks to wait for the `scan_form.updated` event and obtain the manifest document URL at that time. Related: - [Batches Documentation](https://docs.easypost.com/docs/batches) - [Manifest Guide](https://docs.easypost.com/guides/manifest-guide) ### Returns Creating return labels with DHL eCommerce returns a nominal 1-cent rate during the rating call. - DHL eCommerce bypasses the standard rating process for return labels. - The rating call, however, enables users to review and select from available return services. - Post label purchase and usage, DHL eCommerce bills for the return label through its billing system, applying the correct postage fees. ### Shipment Options Shipment options are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=dhlecommercesolutionsbyoca`. Related: - [Shipment Options](https://docs.easypost.com/docs/shipments/options) #### Label Formats DHL eCommerce supports PNG and ZPL labels. #### Label Sizes The standard label size is 4 x 6. ### Customs Services When shipping to a country with customs clearance, all shipments will be checked by customs in that country. Therefore, it is mandatory to include the customs forms with shipments. EasyPost offers a Customs Guide that outlines the process for including customs information in shipments. This guide enables the automatic generation of required customs forms for international shipping between two countries. Related: - [Shipment Documentation](https://docs.easypost.com/docs/shipments) - [Customs Guide](https://www.dhl.com/us-en/home/ecommerce.html) - [Customs Guide](https://docs.easypost.com/guides/customs-guide) --- ## Hazardous Materials (HAZMAT) DHL eCommerce is committed to the safe handling and transportation of dangerous or hazardous goods. All shipments containing hazardous materials must be properly classified, described, packaged, marked, labeled, and in proper condition for transportation. See Hazardous Goods and Unacceptable Shipments for DHL eCommerce policies on the shipping and handling of lithium batteries, goods classified under the Limited Quantity Guidelines, and Unacceptable Shipments. Related: - [Hazardous Goods and Unacceptable Shipments](https://www.dhl.com/us-en/home/ecommerce/business-help-center/hazardous-goods-and-unacceptable-shipments.html#:~:text=DHL%20eCommerce%20only%20ships%20hazardous,be%20approved%20prior%20to%20shipment.) --- ## Pickups DHL eCommerce BYOCA accommodates pickups based on individual agreements with customers. While regular pickups can be arranged directly with DHL eCommerce during the account registration process, they **cannot be scheduled via the EasyPost API**. --- ## Tracking DHL eCommerce tracking operates similarly to other carriers integrated with EasyPost. - DHL may transfer packages to USPS for last-mile delivery within the United States. - The accuracy of final delivery tracking is contingent upon DHL receiving and then conveying USPS updates to EasyPost. EasyPost simplifies package tracking by offering two methods: - Tracking with an existing number and carrier. - Using a Tracker included with an EasyPost-purchased shipping label. The service integrates webhooks for timely shipment updates. For detailed information on tracking methods, visit the Tracking Guide. Related: - [Trackers Documentation](https://docs.easypost.com/docs/trackers) - [Trackers Guide](https://docs.easypost.com/guides/tracking-guide) --- ## Additional Resources ### Carrier Metadata The Carrier Metadata endpoint can programmatically return information about service levels, predefined packages, supported features, and shipment options. Use this information to quickly integrate and make educated decisions about the mix of carriers for shipping needs. Additionally, the Carrier Metadata endpoint is available to retrieve comprehensive information about all carriers on the EasyPost platform, enhancing decision-making for carrier services. ### Support and Troubleshooting In addition to the guidance provided in the Carrier Guides, EasyPost offers support to assist with FAQs, troubleshooting issues, and inquiries related to the EasyPost platform. Visit the Help Center for more information. Related: - [Carrier Metadata](https://docs.easypost.com/docs/carrier-metadata) - [Help Center](https://support.easypost.com/hc/en-us) --- ## Talk to a Shipping Expert For questions about getting started with the EasyPost API please talk to a Shipping Expert or Contact Support. Related: - [Talk to a Shipping Expert](https://www.easypost.com/talk-to-easypost) - [Contact Support](https://support.easypost.com/hc/requests/new) --- Source: https://docs.easypost.com/carriers/dhl-ecommerce-wallet-guide # DHL eCommerce Wallet Guide DHL eCommerce provides specialized, value-driven shipping solutions for B2C and C2C customers, focusing on lightweight (under 5 lb) international parcel delivery using the USPS as the first mile. EasyPost provides an integrated DHL eCommerce account with discounted international rates and no minimum volume or contracts required. This guide covers integration using the EasyPost-provided account, also known as the Wallet account. > Note: DHL eCommerce Wallet is a consumer-to-consumer (C2C) or business-to-consumer (B2C) service. Packages cannot be shipped to businesses. --- ## Carrier Account Setup ### Account Registration Sign up for an EasyPost account to obtain a **Test** and **Production** API key. See Authentication and Key Management for more information. > Note: Negotiated rates are only available in Production mode. ### Carrier Setup #### Create an EasyPost DHL eCommerce Wallet Account 1. Log in to EasyPost and navigate to **Account Settings**. 2. Select the **Carriers** tab. 3. Select the **EasyPost Wallet Carriers** tab. 4. Find DHL eCommerce in the list of carriers and select **Create Account** to complete the account creation process. ![Steps to create a DHL eCommerce Wallet Account in the EasyPost web UI](https://docs.easypost.com/images/guides/dhl-ecommerce/dhl-ecs-account-web-ui.png) #### DHL eCommerce Wallet Account via API The API structure specified by EasyPost can also be used to add the DHL eCommerce Wallet account. ```shell curl -X POST https://api.easypost.com/v2/carrier_accounts \ -u "$EASYPOST_API_KEY": \ -H 'Content-Type: application/json' \ -d '{ "carrier_account": { "type": "DhlEcsAccount", "description": "DhlEcsAccount", "payment_mode": "aggregation" } }' ``` ### Software Requirements Download an EasyPost Client Library or utilize the REST API with cURL. ### Documentation Review Examine the EasyPost Objects section to understand the API's structure, which is critical for constructing requests and interpreting responses. Related: - [Getting Started Guide](https://docs.easypost.com/guides/getting-started) - [Manage Carrier Accounts](https://app.easypost.com/account/settings?tab=carriers) --- ## Billing When utilizing the **EasyPost DHL eCommerce Wallet** account, billing occurs directly through EasyPost, deducting label fees from the EasyPost wallet. For the purchase of labels in a production environment, sufficient funds must be available in the wallet to cover the cost of the label. Should there be any price adjustments post-purchase of labels and the shipment of physical items, EasyPost will modify the final amount deducted from the wallet accordingly. --- ## Rates DHL eCommerce Wallet accounts use EasyPost's pre-negotiated rates. --- ## Service Levels Discounted service levels included with the **DHL eCommerce Wallet** account provide U.S. export coverage to over 220+ countries worldwide. Visit DHL eCommerce's website for detailed information on international shipping services. ### DHL eCommerce Wallet Service Levels Service levels are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=dhlecommercesolutionswallet`. Related: - [Service Levels](https://docs.easypost.com/docs/shipments/rates#service-levels) ### Additional DHL eCommerce Services DHL eCommerce may not return rates for specific services during a standard rating call with EasyPost. However, these services can still be accessed through the API using a unique method known as the ‘one-call buy'. ### Delivered Duty Unpaid (DDU) and Delivered Duty Paid (DDP) Options For international shipping via DHL eCommerce, it's important to understand two INCOTERMS: DDU and DDP, which dictate the payment of important duties and taxes: - **DDU:** The recipient is responsible for paying any import duties and taxes. - **DDP:** The shipper pays all costs, including import duties and taxes, ensuring hassle-free delivery for the recipient. Choosing between DDU and DDP affects how duties and taxes are managed, influencing the overall shipping process. See DDP vs DDU for E-Commerce Business for more information. Pre-pay for duties and taxes as part of the label cost to provide a seamless delivery experience for customers, or select a DDU option to leave duties and taxes to the recipient. EasyPost integrates DHL's Duty & Tax Calculator to help estimate accurate shipping costs. The label cost returned by EasyPost reflects the final price* when DDP is selected. For example, when shipping with DHL Parcel International Direct SMB, the label rate at checkout includes applicable duties and taxes. \*Use caution during peak season, as seasonal surcharges may not be included. DDP services, such as DHL Parcel International Direct SMB, include duties and taxes in the label cost, while DDU services pass those charges to the recipient. ### DHL eCommerce Wallet Account Weight and Size Limits - DHL eCommerce - Parcel International Direct - DHL eCommerce - Parcel International Standard > Note: This solution leverages USPS for first-mile delivery into a DHL eCommerce facility. From there, DHL eCommerce handles the movement of the parcel to the destination country and hands it off for final-mile delivery to a trusted third-party partner. Related: - [Capitalize on eCommerce Growth Blog](https://www.easypost.com/blog/2024-09-10-capitalize-on-ecommerce-growth-easypost-and-dhl-ecommerce-reduce-international-shipping-rates/) - [DDU vs DDP for E-Commerce Business](https://www.dhl.com/discover/en-my/e-commerce-advice/e-commerce-best-practice/ddu-vs-ddp) --- ## Predefined Packages Predefined packages provide a convenient way to classify parcels using carrier-defined package types and retrieve applicable rates. When creating a shipment with the EasyPost API, select a predefined package that matches the parcel's characteristics and provide its weight in ounces when required. See the predefined package documentation for supported values and example requests. Predefined packages are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=dhlecommercesolutionswallet`. Related: - [Predefined Packages](https://docs.easypost.com/docs/parcels#predefined-packages) --- ## Generating Shipping Labels Generating shipping labels for DHL eCommerce requires specific fields during the shipping creation process. > Note: It's very important to review the DHL eCommerce Wallet International Shipping Guide for detailed instructions in order to obtain rates and shipping labels. ### One-Call Buys One-call buys enable streamlined label purchasing through the EasyPost API by consolidating multiple operations into a single API request. This feature is designed to simplify and accelerate the shipping process by combining the creation of a shipment, retrieval of rates, and purchasing the shipping label into one efficient step. See Reducing API Response Times for more information. ### Manifests Manifesting DHL eCommerce shipments serves two primary functions: - **Electronic Data Transmission:** It fulfills the DHL eCommerce requirement of electronically transmitting shipment data. - **Driver Manifest Shipment Summary:** Generates a summary document needed for DHL eCommerce driver pickup. ![DHL eCommerce Driver's Manifest Shipment Summary](https://docs.easypost.com/images/guides/dhl-ecommerce/dhl-driver-manifest-shipment-summary.png) #### Asynchronous Manifesting Manifesting is not instantaneous and may take **several minutes** to complete and receive a manifest document. Immediate receipt of a driver manifest summary is not possible; it becomes available shortly after the manifesting process: 1. Create a batch with a list of shipments (or add shipments to the batch throughout the day). 2. Batch Processing 1. **Option A:** Wait approximately 1-3 seconds for the batch creation to complete. 2. **Option B:** Monitor for a `batch.updated` webhook event indicating the `batch.state` has changed to `created`. > Note: Initiating the next step during the **“creating”** status leads to errors. 3. Execute the manifest `scan_form` batch. 4. Manifest Confirmation 1. **Option A:** Wait up to five minutes and retrieve the `scan_form` to confirm completion. 2. **Option B:** Use webhooks to wait for the `scan_form.updated` event and obtain the manifest document URL at that time. Related: - [Batches Documentation](https://docs.easypost.com/docs/batches) - [Manifest Guide](https://docs.easypost.com/guides/manifest-guide) ### Returns Return services are not available with EasyPost DHL eCommerce Wallet accounts. ### Shipment Options Shipment options are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=dhlecommercesolutionswallet`. Related: - [Shipment Options](https://docs.easypost.com/docs/shipments/options) #### Label Formats DHL eCommerce supports PNG and ZPL labels. #### Label Sizes The standard label size is 4 x 6. ### Customs Services When shipping to a country with customs clearance, all shipments will be checked by customs in that country. Therefore, it is mandatory to include the customs forms with shipments. EasyPost offers a Customs Guide that outlines the process for including customs information in shipments. This guide enables the automatic generation of required customs forms for international shipping between two countries. Related: - [Shipment Documentation](https://docs.easypost.com/docs/shipments) - [Customs Guide](https://www.dhl.com/us-en/home/ecommerce.html) - [Customs Guide](https://docs.easypost.com/guides/customs-guide) --- ## Hazardous Materials (HAZMAT) ### DHL eCommerce Wallet Accounts When utilizing the **DHL eCommerce Wallet** account, dangerous goods or hazardous items that are flagged during the inspection process cannot be shipped in the DHL eCommerce network. These items will be returned by the inspection facility. Return charges incurred by the inspection facility are submitted by DHL eCommerce as a debit to the customer's account. Dangerous Goods/Hazardous items are returned weekly, and the inspection facility issues a report with the issue summary and return tracking details. ![DHL eCommerce Wallet Account Dangers Goods Tracking](https://docs.easypost.com/images/guides/dhl-ecommerce/dhl-ecs-dangerous-goods-tracking.png) Related: - [Hazardous Goods and Unacceptable Shipments](https://www.dhl.com/us-en/home/ecommerce/business-help-center/hazardous-goods-and-unacceptable-shipments.html#:~:text=DHL%20eCommerce%20only%20ships%20hazardous,be%20approved%20prior%20to%20shipment.) --- ## Pickups EasyPost DHL eCommerce Wallet account shipments must be handed off to USPS via either drop-off or pickup. USPS will transfer the package to DHL eCommerce for delivery on the shipper's behalf. --- ## Tracking DHL eCommerce tracking operates similarly to other carriers integrated with EasyPost. - DHL may transfer packages to USPS for last-mile delivery within the United States. - The accuracy of final delivery tracking is contingent upon DHL receiving and then conveying USPS updates to EasyPost. EasyPost simplifies package tracking by offering two methods: - Tracking with an existing number and carrier. - Using a Tracker included with an EasyPost-purchased shipping label. The service integrates webhooks for timely shipment updates. For detailed information on tracking methods, visit the Tracking Guide. Related: - [Trackers Documentation](https://docs.easypost.com/docs/trackers) - [Trackers Guide](https://docs.easypost.com/guides/tracking-guide) --- ## Additional Resources ### Carrier Metadata The Carrier Metadata endpoint can programmatically return information about service levels, predefined packages, supported features, and shipment options. Use this information to quickly integrate and make educated decisions about the mix of carriers for shipping needs. Additionally, the Carrier Metadata endpoint is available to retrieve comprehensive information about all carriers on the EasyPost platform, enhancing decision-making for carrier services. ### Support and Troubleshooting In addition to the guidance provided in the Carrier Guides, EasyPost offers support to assist with FAQs, troubleshooting issues, and inquiries related to the EasyPost platform. Visit the Help Center for more information. Related: - [Carrier Metadata](https://docs.easypost.com/docs/carrier-metadata) - [Help Center](https://support.easypost.com/hc/en-us) --- ## Talk to a Shipping Expert For questions about getting started with the EasyPost API please talk to a Shipping Expert or Contact Support. Related: - [Talk to a Shipping Expert](https://www.easypost.com/talk-to-easypost) - [Contact Support](https://support.easypost.com/hc/requests/new) --- Source: https://docs.easypost.com/carriers/dhl-express-byoca-guide # DHL Express BYOCA Guide DHL Express is the international shipping division of DHL Group, a global leader in express logistics. DHL Express facilitates cross-border shipping across numerous countries and territories worldwide, making it an ideal choice for businesses needing reliable international logistics solutions. **Domestic Shipments:** DHL Express provides support for domestic shipments in many countries around the world. This service enables businesses to efficiently manage their regional logistics needs. However, it's important to note that DHL Express does not offer domestic shipping services within the U.S. and Canada, where its operations are focused exclusively on international shipments. ### Import and Export Accounts DHL Express uniquely assigns users an import or export account based on their specific shipping needs. All DHL Express customers are provided with an export account by default. Import accounts are established only if a customer requires a dedicated returns service through DHL Express. This guide includes detailed information on utilizing EasyPost for shipping with DHL Express, focusing on account setup, rate retrieval, and label generation. EasyPost supports DHL Express through two account options: - **DHL Express Wallet:** Use an EasyPost-managed DHL Express account with EasyPost Wallet billing. - **DHL Express BYOCA:** Connect an existing DHL Express account to EasyPost with carrier-provided credentials and carrier-direct billing. --- ## Carrier Account Setup ### Account Registration Sign up for an EasyPost account to obtain a **Test** and **Production** API key. See Authentication and Key Management for more information. > Note: Negotiated rates are only available in Production mode. ### Carrier Setup #### Bring Your Own Carrier Account (BYOCA) to EasyPost 1. Contact DHL Express to request a shipper account. A representative will be in touch for additional details regarding the account. 2. Inform DHL Express about using EasyPost's API for label purchases. 3. Acquire rates and align any additional shipping needs. 4. Obtain the following production account credentials: 1. DHL Express Account Number 2. Account Country Code (2 Letters) 3. Reseller Account? Check this box if the account supports reseller rates. 4. Password (Optional) 5. Site ID (Optional) 5. Input carrier-specific credentials within the EasyPost Carrier Account Dashboard for comprehensive rate access. #### DHL Express Account via API The API structure specified by EasyPost can also be used to add the DHL Express carrier shipper account. ```shell curl -X POST https://api.easypost.com/v2/carrier_accounts \ -u "$EASYPOST_API_KEY": \ -H 'Content-Type: application/json' \ -d '{ "carrier_account": { "type": "DhlExpressAccount", "description": "DhlExpressAccount", "credentials": { "account_number": "VALUE", "country": "VALUE", "is_reseller": "VALUE", "password": "VALUE", "site_id": "VALUE", "zonos_api_key": "VALUE", "zonos_enabled": "VALUE" } } }' ``` ### Software Requirements Download an EasyPost Client Library or utilize the REST API with cURL. ### Documentation Review Examine the EasyPost Objects section to understand the API's structure, which is critical for constructing requests and interpreting responses. Related: - [Getting Started Guide](https://docs.easypost.com/guides/getting-started) - [Manage Carrier Accounts](https://app.easypost.com/account/settings?tab=carriers) --- ## Billing When using a BYOCA, billing is handled directly between the shipper and DHL Express. EasyPost facilitates label creation and shipment management, but no funds are deducted from the EasyPost Wallet. Related: - [EasyPost Wallet and Bring Your Own Carrier Account Plans](https://support.easypost.com/hc/en-us/articles/39984592062605-EasyPost-Wallet-and-Bring-Your-Own-Carrier-Account-Plans) - [Billing & Payments](https://support.easypost.com/hc/en-us/articles/360042414212-Billing-Payments) --- ## Rates ### DHL Express BYOCA Rates DHL Express (BYOCA) is a **Live Rating** integration, enabling real-time rate retrieval for shipments created via EasyPost. Rates are guaranteed valid for a minimum of five minutes. - When creating a shipment, EasyPost requests DHL Express for shipment rates specific to the user's DHL Express account. - The rates provided are directly from DHL Express and tailored to the user's specific account details. - In cases of discrepancies or incorrect rates, users are advised to contact their DHL Express account representative. - The representative can then update the rates to ensure user account accuracy. --- ## Service Levels DHL Express provides several service levels with specific transit times, dimensions, and weight limits. Service levels are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=dhlexpressbyoca`. Related: - [Service Levels](https://docs.easypost.com/docs/shipments/rates#service-levels) --- ## Predefined Packages Predefined packages provide a convenient way to classify parcels using carrier-defined package types and retrieve applicable rates. When creating a shipment with the EasyPost API, select a predefined package that matches the parcel's characteristics and provide its weight in ounces when required. See the predefined package documentation for supported values and example requests. Predefined packages are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=dhlexpressbyoca`. Related: - [Predefined Packages](https://docs.easypost.com/docs/parcels#predefined-packages) --- ## Generating Shipping Labels With EasyPost, the process for generating shipping labels for DHL Express is the same as generating them for any other carrier. Review the Getting Started Guide for help generating a shipping label. ### Manifests Manifesting is **not** supported or required. ### Refunding and Voiding Labels Voiding DHL Express labels through EasyPost is supported. ### Shipment Options Shipment options are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=dhlexpressbyoca`. Related: - [Shipment Options](https://docs.easypost.com/docs/shipments/options) #### Label Formats Native DHL Express labels are available in PDF, PNG, and ZPL formats. Related: - [Shipment Documentation](https://docs.easypost.com/docs/shipments) - [Customs Guide](https://docs.easypost.com/guides/customs-guide) --- ## Hazardous Materials (HAZMAT) > Note: Hazardous materials (Dangerous Goods) shipping with DHL Express is available only to BYOCA account holders who have received approval from DHL. Wallet merchants cannot ship Dangerous Goods. Approved BYOCA account holders must follow DHL Express regulations and guidelines. To learn more please visit the DHL Express resource: Shipping Dangerous Goods. Hazardous shipping is specified using the `shipment.options` object. Supported values include: - “LITHIUM” - “PI965-II” - “PI966-II” - “PI967-II” - “PI969-II” #### HAZMAT Example ```json { "shipment": { "to_address": { "name": "Dr. Steve Brule", "street1": "179 N Harbor Dr", "city": "Redondo Beach", "state": "CA", "zip": "90277", "country": "US", "phone": "8573875756", "email": "dr_steve_brule@gmail.com" }, "from_address": { "name": "EasyPost", "street1": "417 Montgomery Street", "street2": "5th Floor", "city": "San Francisco", "state": "CA", "zip": "94104", "country": "US", "phone": "4153334445", "email": "support@easypost.com" }, "parcel": { "weight": "23" }, "options": { "hazmat": "LITHIUM" } } } ``` --- ## Pickups DHL Express pickup requests can be made via the EasyPost API. Review the Pickups documentation for details. > Note: BYOCA merchants may be charged for non-standard pickups. Consult the DHL Express account representative for pricing details. Wallet merchants receive complimentary DHL Express pickups. Related: - [Pickups Documentation](https://docs.easypost.com/docs/pickups) --- ## Tracking EasyPost simplifies package tracking by offering two methods: - Tracking with an existing number and carrier. - Using a Tracker included with an EasyPost-purchased shipping label. The service integrates webhooks for timely shipment updates. For detailed information on tracking methods, visit the Tracking Guide. Related: - [Trackers Documentation](https://docs.easypost.com/docs/trackers) - [Trackers Guide](https://docs.easypost.com/guides/tracking-guide) --- ## Additional Resources ### Carrier Metadata The Carrier Metadata endpoint can programmatically return information about service levels, predefined packages, supported features, and shipment options. Use this information to quickly integrate and make educated decisions about the mix of carriers for shipping needs. Additionally, the Carrier Metadata endpoint is available to retrieve comprehensive information about all carriers on the EasyPost platform, enhancing decision-making for carrier services. ### Support and Troubleshooting In addition to the guidance provided in the Carrier Guides, EasyPost offers support to assist with FAQs, troubleshooting issues, and inquiries related to the EasyPost platform. Visit the Help Center for more information. Related: - [Carrier Metadata](https://docs.easypost.com/docs/carrier-metadata) - [Help Center](https://support.easypost.com/hc/en-us) --- ## Talk to a Shipping Expert For questions about getting started with the EasyPost API please talk to a Shipping Expert or Contact Support. Related: - [Talk to a Shipping Expert](https://www.easypost.com/talk-to-easypost) - [Contact Support](https://support.easypost.com/hc/requests/new) --- Source: https://docs.easypost.com/carriers/dhl-express-wallet-guide # DHL Express Wallet Guide DHL Express is the international shipping division of DHL Group, a global leader in express logistics. DHL Express facilitates cross-border shipping across numerous countries and territories worldwide, making it an ideal choice for businesses needing reliable international logistics solutions. **Domestic Shipments:** DHL Express provides support for domestic shipments in many countries around the world. This service enables businesses to efficiently manage their regional logistics needs. However, it's important to note that DHL Express does not offer domestic shipping services within the U.S. and Canada, where its operations are focused exclusively on international shipments. ### Import and Export Accounts DHL Express uniquely assigns users an import or export account based on their specific shipping needs. All DHL Express customers are provided with an export account by default. Import accounts are established only if a customer requires a dedicated returns service through DHL Express. This guide includes detailed information on utilizing EasyPost for shipping with DHL Express, focusing on account setup, rate retrieval, and label generation. EasyPost supports DHL Express through two account options: - **DHL Express Wallet:** Use an EasyPost-managed DHL Express account with EasyPost Wallet billing. - **DHL Express BYOCA:** Connect an existing DHL Express account to EasyPost with carrier-provided credentials and carrier-direct billing. --- ## Carrier Account Setup ### Account Registration Sign up for an EasyPost account to obtain a **Test** and **Production** API key. See Authentication and Key Management for more information. > Note: Negotiated rates are only available in Production mode. ### Carrier Setup #### Create a DHL Express Wallet Carrier Account 1. Log in to EasyPost and navigate to **Account Settings**. 2. Select the **Carriers** tab. 3. Select the **EasyPost Wallet Carriers** tab. 4. Find DHL Express in the list of carriers and select **Create Account** to complete the account creation process. ![Steps to create a DHL Express Wallet Account in the EasyPost web UI](https://docs.easypost.com/images/guides/dhl-express/dhl-express-account-web-ui.png) #### DHL Express Wallet Account via API The API structure specified by EasyPost can also be used to add a DHL Express Wallet carrier account. ```shell curl -X POST https://api.easypost.com/v2/carrier_accounts \ -u "$EASYPOST_API_KEY": \ -H 'Content-Type: application/json' \ -d '{ "carrier_account": { "type": "DhlExpressAccount", "description": "DhlExpressAccount", "payment_mode": "aggregation" } }' ``` ### Software Requirements Download an EasyPost Client Library or utilize the REST API with cURL. ### Documentation Review Examine the EasyPost Objects section to understand the API's structure, which is critical for constructing requests and interpreting responses. Related: - [Getting Started Guide](https://docs.easypost.com/guides/getting-started) - [Manage Carrier Accounts](https://app.easypost.com/account/settings?tab=carriers) --- ## Billing When shipping with a Wallet Carrier account, billing is managed entirely through the EasyPost Wallet. - All charges are consolidated and billed through EasyPost. - Rates are pre-negotiated; no direct billing occurs between the shipper and DHL Express. - Bill-on-Scan: Charges are applied when the carrier first scans the package. Related: - [EasyPost Wallet and Bring Your Own Carrier Account Plans](https://support.easypost.com/hc/en-us/articles/39984592062605-EasyPost-Wallet-and-Bring-Your-Own-Carrier-Account-Plans) - [Billing & Payments](https://support.easypost.com/hc/en-us/articles/360042414212-Billing-Payments) --- ## Rates ### DHL Express Wallet Account Rates DHL Express offers real-time rates for shipments created via EasyPost. - All DHL Express rating calls **must** be made with parcel dimensions, otherwise the call will result in an error. - For reseller accounts, users **must** upload their rate table to receive negotiated rates. Contact support@easypost.com for assistance. --- ## Service Levels DHL Express provides several service levels with specific transit times, dimensions, and weight limits. Service levels are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=dhlexpresswallet`. Related: - [Service Levels](https://docs.easypost.com/docs/shipments/rates#service-levels) --- ## Predefined Packages Predefined packages provide a convenient way to classify parcels using carrier-defined package types and retrieve applicable rates. When creating a shipment with the EasyPost API, select a predefined package that matches the parcel's characteristics and provide its weight in ounces when required. See the predefined package documentation for supported values and example requests. Predefined packages are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=dhlexpresswallet`. Related: - [Predefined Packages](https://docs.easypost.com/docs/parcels#predefined-packages) --- ## Generating Shipping Labels With EasyPost, the process for generating shipping labels for DHL Express is the same as generating them for any other carrier. Review the Getting Started Guide for help generating a shipping label. ### Manifests Manifesting is **not** supported or required. ### Refunding and Voiding Labels Voiding DHL Express labels through EasyPost is supported. ### Shipment Options Shipment options are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=dhlexpresswallet`. Related: - [Shipment Options](https://docs.easypost.com/docs/shipments/options) #### Label Formats Native DHL Express labels are available in PDF, PNG, and ZPL formats. Related: - [Shipment Documentation](https://docs.easypost.com/docs/shipments) - [Customs Guide](https://docs.easypost.com/guides/customs-guide) --- ## Hazardous Materials (HAZMAT) > Note: Wallet merchants cannot ship Dangerous Goods with DHL Express. Hazardous materials shipping is available only to BYOCA account holders who have received approval from DHL. The shipment options below apply only to approved BYOCA account holders. See the DHL Express BYOCA Guide for account setup. To learn more please visit the DHL Express resource: Shipping Dangerous Goods. Hazardous shipping is specified using the `shipment.options` object. Supported values include: - “LITHIUM” - “PI965-II” - “PI966-II” - “PI967-II” - “PI969-II” #### HAZMAT Example ```json { "shipment": { "to_address": { "name": "Dr. Steve Brule", "street1": "179 N Harbor Dr", "city": "Redondo Beach", "state": "CA", "zip": "90277", "country": "US", "phone": "8573875756", "email": "dr_steve_brule@gmail.com" }, "from_address": { "name": "EasyPost", "street1": "417 Montgomery Street", "street2": "5th Floor", "city": "San Francisco", "state": "CA", "zip": "94104", "country": "US", "phone": "4153334445", "email": "support@easypost.com" }, "parcel": { "weight": "23" }, "options": { "hazmat": "LITHIUM" } } } ``` --- ## Pickups DHL Express pickup requests can be made via the EasyPost API. Review the Pickups documentation for details. > Note: Wallet merchants receive complimentary DHL Express pickups. BYOCA merchants may be charged for non-standard pickups; users should consult their DHL Express account representative for pricing details. Related: - [Pickups Documentation](https://docs.easypost.com/docs/pickups) --- ## Tracking EasyPost simplifies package tracking by offering two methods: - Tracking with an existing number and carrier. - Using a Tracker included with an EasyPost-purchased shipping label. The service integrates webhooks for timely shipment updates. For detailed information on tracking methods, visit the Tracking Guide. Related: - [Trackers Documentation](https://docs.easypost.com/docs/trackers) - [Trackers Guide](https://docs.easypost.com/guides/tracking-guide) --- ## Additional Resources ### Carrier Metadata The Carrier Metadata endpoint can programmatically return information about service levels, predefined packages, supported features, and shipment options. Use this information to quickly integrate and make educated decisions about the mix of carriers for shipping needs. Additionally, the Carrier Metadata endpoint is available to retrieve comprehensive information about all carriers on the EasyPost platform, enhancing decision-making for carrier services. ### Support and Troubleshooting In addition to the guidance provided in the Carrier Guides, EasyPost offers support to assist with FAQs, troubleshooting issues, and inquiries related to the EasyPost platform. Visit the Help Center for more information. Related: - [Carrier Metadata](https://docs.easypost.com/docs/carrier-metadata) - [Help Center](https://support.easypost.com/hc/en-us) --- ## Talk to a Shipping Expert For questions about getting started with the EasyPost API please talk to a Shipping Expert or Contact Support. Related: - [Talk to a Shipping Expert](https://www.easypost.com/talk-to-easypost) - [Contact Support](https://support.easypost.com/hc/requests/new) --- Source: https://docs.easypost.com/carriers/doordash-guide # DoorDash Guide DoorDash specializes in last-mile delivery services spanning nationwide. The company offers technology-driven solutions for same-day and standard shipping, ensuring efficient deliveries with real-time tracking. This guide includes detailed information on utilizing DoorDash shipping with the EasyPost API, focusing on account setup, rates, label creation, manifests, tracking, and more. For operational details, shipment nuances, and frequently asked questions, refer to the DoorDash Carrier Support and FAQs article. Related: - [DoorDash Carrier Support and FAQs](https://support.easypost.com/hc/en-us/articles/40870751055885-DoorDash-Carrier-Support-and-FAQs) --- ## Carrier Account Setup ### Account Registration Sign up for an EasyPost account to obtain a **Test** and **Production** API key. See Authentication and Key Management for more information. > Note: Negotiated rates are only available in Production mode. ### Carrier Setup #### DoorDash Shipper Account Registration 1. Contact DoorDash to request a shipper account. A representative will be in touch for additional details regarding the account. 2. Inform DoorDash about using EasyPost's API for label purchases. 3. Acquire rates and align any additional shipping needs. 4. Obtain the following account credentials: 1. DoorDash API Developer ID 2. DoorDash API Key ID 3. DoorDash API Signing Secret 4. DoorDash Pickup External Business ID 5. Input carrier-specific credentials within the EasyPost Carrier Account Dashboard for comprehensive rate access. #### DoorDash Account via API The API structure specified by EasyPost can also be used to add the DoorDash carrier shipper account. ```shell curl -XPOST -H 'Content-Type: application/json' -H 'X-EasyPost-User-Id: ' https://api.easypost.com/v2/carrier_accounts -d '{ "billToEasyPost": false, "credentials": { "developer_id": "VALUE", "key_id": "VALUE", "signing_secret": "VALUE", "pickup_external_business_id": "VALUE" }, "test_credentials": {}, "type": "DoorDashAccount" }' ``` ### Software Requirements Download an EasyPost Client Library or utilize the REST API with cURL. ### Documentation Review Examine the EasyPost Objects section to understand the API's structure, which is critical for constructing requests and interpreting responses. Related: - [Getting Started Guide](https://docs.easypost.com/guides/getting-started) - [Manage Carrier Accounts](https://app.easypost.com/account/settings?tab=carriers) --- ## Billing All DoorDash shipments purchased through EasyPost are billed by DoorDash in USD. Contact DoorDash for specific invoicing procedures. Refer to the Help Center for more information about payment methods, wallet funding, or account billing. --- ## Rates DoorDash is a **Live Rating** integration, enabling real-time rate retrieval for shipments created via EasyPost. - When creating a shipment, EasyPost requests DoorDash for shipment rates specific to the user's DoorDash account. - The rates provided are directly from DoorDash and tailored to the user's specific account details. - In cases of discrepancies or incorrect rates, users are advised to contact their DoorDash account representative. - The representative can then update the rates to ensure user account accuracy. --- ## Service Levels DoorDash offers the following service levels: Service levels are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=doordash`. Related: - [Service Levels](https://docs.easypost.com/docs/shipments/rates#service-levels) ### Coverage Area DoorDash specializes in last-mile delivery services spanning nationwide. Their coverage area is constantly evolving and growing. Contact a DoorDash account representative for the most up-to-date coverage area. --- ## Predefined Packages Predefined packages provide a convenient way to classify parcels using carrier-defined package types and retrieve applicable rates. When creating a shipment with the EasyPost API, select a predefined package that matches the parcel's characteristics and provide its weight in ounces when required. See the predefined package documentation for supported values and example requests. Predefined packages are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=doordash`. Related: - [Predefined Packages](https://docs.easypost.com/docs/parcels#predefined-packages) --- ## Generating Shipping Labels With EasyPost, generating shipping labels for DoorDash is the same process as generating them for any other carrier. Review the Getting Started Guide for help generating a shipping label. ### One-Call Buys One-call buys enable streamlined label purchasing through the EasyPost API by consolidating multiple operations into a single API request. This feature is designed to simplify and accelerate the shipping process by combining the creation of a shipment, retrieval of rates, and purchasing the shipping label into one efficient step. See Reducing API Response Times for more information. ### Manifests Manifesting is not supported or required for DoorDash. ### Refunding and Voiding Labels Voiding DoorDash labels through EasyPost is supported. ### Shipment Options Shipment options are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=doordash`. Related: - [Shipment Options](https://docs.easypost.com/docs/shipments/options) DoorDash supports several shipment options via the EasyPost API. For complete details, see: DoorDash Carrier Support and FAQs. Related: - [Shipment Documentation](https://docs.easypost.com/docs/shipments) - [DoorDash Support and FAQs](https://support.easypost.com/hc/en-us/articles/40870751055885-DoorDash-Carrier-Support-and-FAQs) --- ## Hazardous Materials (HAZMAT) Hazardous materials shipping is approved on a one-off basis. Please contact a DoorDash account representative for more information. --- ## Pickups DoorDash accommodates pickups based on individual agreements with customers. While regular pickups can be arranged directly with DoorDash during the account registration process, they **cannot be scheduled via the EasyPost API.** --- ## Tracking EasyPost simplifies package tracking by offering two methods: - Tracking with an existing number and carrier. - Using a Tracker included with an EasyPost-purchased shipping label. The service integrates webhooks for timely shipment updates. For detailed information on tracking methods, visit the Tracking Guide. Related: - [Trackers Documentation](https://docs.easypost.com/docs/trackers) - [Trackers Guide](https://docs.easypost.com/guides/tracking-guide) --- ## Additional Resources ### Carrier Metadata The Carrier Metadata endpoint can programmatically return information about service levels, predefined packages, supported features, and shipment options. Use this information to quickly integrate and make educated decisions about the mix of carriers for shipping needs. Additionally, the Carrier Metadata endpoint is available to retrieve comprehensive information about all carriers on the EasyPost platform, enhancing decision-making for carrier services. ### Support and Troubleshooting In addition to the guidance provided in the Carrier Guides, EasyPost offers support to assist with FAQs, troubleshooting issues, and inquiries related to the EasyPost platform. Visit the Help Center for more information. Related: - [Carrier Metadata](https://docs.easypost.com/docs/carrier-metadata) - [Help Center](https://support.easypost.com/hc/en-us) --- ## Talk to a Shipping Expert For questions about getting started with the EasyPost API please talk to a Shipping Expert or Contact Support. Related: - [Talk to a Shipping Expert](https://www.easypost.com/talk-to-easypost) - [Contact Support](https://support.easypost.com/hc/requests/new) --- Source: https://docs.easypost.com/carriers/douglas-express-delivery-guide # Douglas Express Delivery Guide Douglas Express Delivery specializes in the prompt distribution of various items throughout the southeastern region of the United States. Established in 1953 as a fourth-generation family business, Douglas Express Delivery upholds the principles of courtesy and quality. Customers can expect deliveries made on time, at the desired location, and in excellent condition, reflecting the company's longstanding dedication to reliable service. This guide includes detailed information on utilizing Douglas Express Delivery shipping with the EasyPost API, focusing on account setup, rates, label creation, manifests, tracking, and more. --- ## Carrier Account Setup ### Account Registration Sign up for an EasyPost account to obtain a **Test** and **Production** API key. See Authentication and Key Management for more information. > Note: Negotiated rates are only available in Production mode. ### Carrier Setup Upon sign-up with EasyPost, users gain immediate access to Wallet Carrier Accounts, which can be enabled directly from the Dashboard. For additional carriers, EasyPost supports a Bring Your Own Carrier Account (BYOCA) option. This requires users to register directly with the respective carrier. #### Douglas Express Delivery Shipper Account Registration 1. Contact Douglas Express Delivery to request a shipper account. A representative will be in touch for additional details regarding the account. 2. Inform Douglas Express Delivery about using EasyPost's API for label purchases. 3. Acquire rates and align any additional shipping needs. 4. Obtain production and test credentials: 1. Douglas Password 2. Douglas Username 5. Input carrier-specific credentials within the EasyPost Carrier Account Dashboard for comprehensive rate access. #### Douglas Express Delivery Account via API The API structure specified by EasyPost can also be used to add the Douglas Express Delivery carrier shipper account. ```shell curl -X POST https://api.easypost.com/v2/carrier_accounts \ -u "$EASYPOST_API_KEY": \ -H 'Content-Type: application/json' \ -d '{ "carrier_account": { "type": "DouglasAccount", "description": "DouglasAccount", "credentials": { "password": "VALUE", "username": "VALUE" }, "test_credentials": { "password": "VALUE", "username": "VALUE" } } }' ``` ### Software Requirements Download an EasyPost Client Library or utilize the REST API with cURL. ### Documentation Review Examine the EasyPost Objects section to understand the API's structure, which is critical for constructing requests and interpreting responses. Related: - [Getting Started Guide](https://docs.easypost.com/guides/getting-started) - [Manage Carrier Accounts](https://app.easypost.com/account/settings?tab=carriers) --- ## Billing Billing is directly handled by Douglas Express Delivery using a bill-on-delivery system. EasyPost does not participate in the billing process for Douglas Express Delivery services. Contact a Douglas Express Delivery representative for details. --- ## Rates ### Default Rate Display EasyPost always returns a $0.01 placeholder rate for Douglas Express Delivery shipments. Live postage rates are not returned through this integration. Douglas Express Delivery bills the actual postage through its billing system. --- ## Service Levels Douglas Express Delivery offers the following services: Service levels are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=douglas`. Related: - [Service Levels](https://docs.easypost.com/docs/shipments/rates#service-levels) Related: - [Douglas Express Delivery Service Levels](https://docs.easypost.com/docs/shipments/rates?carrier=douglas#service-levels) --- ## Predefined Packages Predefined packages provide a convenient way to classify parcels using carrier-defined package types and retrieve applicable rates. When creating a shipment with the EasyPost API, select a predefined package that matches the parcel's characteristics and provide its weight in ounces when required. See the predefined package documentation for supported values and example requests. Predefined packages are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=douglas`. Related: - [Predefined Packages](https://docs.easypost.com/docs/parcels#predefined-packages) --- ## Generating Shipping Labels With EasyPost, generating shipping labels for Douglas Express Delivery is the same process as generating them for any other carrier. Review the Getting Started Guide for help generating a shipping label. ### One-Call Buys 1-call buys enable streamlined label purchasing through the EasyPost API by consolidating multiple operations into a single API request. This feature is designed to simplify and accelerate the shipping process by combining the creation of a shipment, retrieval of rates, and purchasing the shipping label into one efficient step. See Reducing API Response Times for more information. ### Manifests Manifesting is not supported or required. ### Refunding and Voiding Labels Voiding Douglas Express Delivery labels through EasyPost is supported. > Note: The **shipment.tracking_code** is required as it identifies the order within the carrier's system. ### Shipment Options Shipment options are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=douglas`. Related: - [Shipment Options](https://docs.easypost.com/docs/shipments/options) #### Label Formats EasyPost offers native Douglas Express Delivery labels in ZPL, PNG, and PDF formats. Related: - [Shipment Documentation](https://docs.easypost.com/docs/shipments) - [Reducing API Response Times](https://support.easypost.com/hc/en-us/articles/360048825772-Reducing-API-Response-Times) --- ## Hazardous Materials (HAZMAT) The Douglas Express Delivery policy on hazardous materials is not explicitly detailed. Shippers are advised to contact Douglas Express Delivery directly for specific hazmat inquiries. --- ## Pickups Douglas Express Delivery accommodates pickups based on individual agreements with customers. While regular pickups can be arranged directly with Douglas Express Delivery during the account registration process, they **cannot be scheduled via the EasyPost API**. --- ## Tracking EasyPost simplifies package tracking by offering two methods: - Tracking with an existing number and carrier. - Using a Tracker included with an EasyPost-purchased shipping label. The service integrates webhooks for timely shipment updates. For detailed information on tracking methods, visit the Tracking Guide. Related: - [Trackers Documentation](https://docs.easypost.com/docs/trackers) - [Trackers Guide](https://docs.easypost.com/guides/tracking-guide) --- ## Additional Resources ### Carrier Metadata The Carrier Metadata endpoint can programmatically return information about service levels, predefined packages, supported features, and shipment options. Use this information to quickly integrate and make educated decisions about the mix of carriers for shipping needs. Additionally, the Carrier Metadata endpoint is available to retrieve comprehensive information about all carriers on the EasyPost platform, enhancing decision-making for carrier services. ### Support and Troubleshooting In addition to the guidance provided in the Carrier Guides, EasyPost offers support to assist with FAQs, troubleshooting issues, and inquiries related to the EasyPost platform. Visit the Help Center for more information. Related: - [Carrier Metadata](https://docs.easypost.com/docs/carrier-metadata) - [Help Center](https://support.easypost.com/hc/en-us) --- ## Talk to a Shipping Expert For questions about getting started with the EasyPost API please talk to a Shipping Expert or Contact Support. Related: - [Talk to a Shipping Expert](https://www.easypost.com/talk-to-easypost) - [Contact Support](https://support.easypost.com/hc/requests/new) --- Source: https://docs.easypost.com/carriers/dpd-guide # DPD Guide DPD is part of Geopost, one of the world's leading parcel delivery networks operating in more than 50 countries. Their 57,000 delivery experts deliver more than eight million parcels worldwide daily through DPD, Chronopost, SEUR, BRT, Speedy, and Jadlog. This guide includes detailed information on utilizing DPD shipping with the EasyPost API, focusing on account setup, rates, label creation, manifests, tracking, and more. > Note: This carrier guide is specifically provided for the **DPD Germany** service. --- ## Carrier Account Setup ### Account Registration Sign up for an EasyPost account to obtain a **Test** and **Production** API key. See Authentication and Key Management for more information. > Note: Negotiated rates are only available in Production mode. ### Carrier Setup Upon sign-up with EasyPost, users gain immediate access to Wallet Carrier Accounts, which can be enabled directly from the Dashboard. For additional carriers, EasyPost supports a Bring Your Own Carrier Account (BYOCA) option. This requires users to register directly with the respective carrier. #### DPD Account Registration 1. Contact DPD to request a shipper account. A representative will be in touch for additional details regarding the account. 2. Inform DPD about using EasyPost's API for label purchases. 3. Acquire rates and align any additional shipping needs. 4. Obtain the following production and test credentials: 1. DPD Customer Number 2. WebConnect Password 3. WebConnect Username 5. Input carrier-specific credentials within the EasyPost Carrier Account Dashboard for comprehensive rate access. #### DPD Account via API The API structure specified by EasyPost can also be used to add the DPD carrier shipper account. ```shell curl -X POST https://api.easypost.com/v2/carrier_accounts \ -u "$EASYPOST_API_KEY": \ -H 'Content-Type: application/json' \ -d '{ "carrier_account": { "type": "DpdAccount", "description": "DpdAccount", "credentials": { "customer_number": "VALUE", "password": "VALUE", "username": "VALUE" }, "test_credentials": { "customer_number": "VALUE", "password": "VALUE", "username": "VALUE" } } }' ``` ### Software Requirements Download an EasyPost Client Library or utilize the REST API with cURL. ### Documentation Review Examine the EasyPost Objects section to understand the API's structure, which is critical for constructing requests and interpreting responses. Related: - [Getting Started Guide](https://docs.easypost.com/guides/getting-started) - [Manage Carrier Accounts](https://app.easypost.com/account/settings?tab=carriers) --- ## Billing DPD bills the actual postage through its billing system. --- ## Rates When integrating a DPD account with EasyPost, users should be aware of how rates are managed and displayed. Here's a breakdown of key points: ### Default Rate Display EasyPost always returns a €0.01 placeholder rate for DPD shipments. Live postage rates are not returned through this integration. --- ## Service Levels DPD offers the following services: Service levels are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=dpd`. Related: - [Service Levels](https://docs.easypost.com/docs/shipments/rates#service-levels) --- ## Predefined Packages Predefined packages provide a convenient way to classify parcels using carrier-defined package types and retrieve applicable rates. When creating a shipment with the EasyPost API, select a predefined package that matches the parcel's characteristics and provide its weight in ounces when required. See the predefined package documentation for supported values and example requests. Predefined packages are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=dpd`. Related: - [Predefined Packages](https://docs.easypost.com/docs/parcels#predefined-packages) --- ## Generating Shipping Labels With EasyPost, generating shipping labels for DPD is the same process as generating them for any other carrier. Review the Getting Started Guide for help generating a shipping label. ### One-Call Buys 1-call buys enable streamlined label purchasing through the EasyPost API by consolidating multiple operations into a single API request. This feature is designed to simplify and accelerate the shipping process by combining the creation of a shipment, retrieval of rates, and purchasing the shipping label into one efficient step. See Reducing API Response Times for more information. ### Manifests Manifesting is **not** supported or required for DPD integration. ### Refunding and Voiding Labels Voiding DPD labels through EasyPost is **not** supported. ### Shipment Options Shipment options are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=dpd`. Related: - [Shipment Options](https://docs.easypost.com/docs/shipments/options) #### Label Formats EasyPost offers native DPD labels in ZPL, PNG, and PDF formats. Related: - [Shipment Documentation](https://docs.easypost.com/docs/shipments) - [Reducing API Response Times](https://support.easypost.com/hc/en-us/articles/360048825772-Reducing-API-Response-Times) --- ## Hazardous Materials (HAZMAT) The DPD policy on hazardous materials is not explicitly detailed in this guide. Shippers are advised to contact DPD directly for specific hazmat inquiries. Shippers can indicate limited quantities of hazardous materials in their shipments by adding: `shipment.options.hazmat=“LIMITED_QUANTITY”` --- ## Pickups DPD accommodates pickups based on individual agreements with customers. While regular pickups can be arranged directly with DPD during the account registration process, they **cannot be scheduled via the EasyPost API**. --- ## Tracking EasyPost simplifies package tracking by offering two methods: - Tracking with an existing number and carrier. - Using a Tracker included with an EasyPost-purchased shipping label. The service integrates webhooks for timely shipment updates. For detailed information on tracking methods, visit the Tracking Guide. Related: - [Trackers Documentation](https://docs.easypost.com/docs/trackers) - [Trackers Guide](https://docs.easypost.com/guides/tracking-guide) --- ## Additional Resources ### Carrier Metadata The Carrier Metadata endpoint can programmatically return information about service levels, predefined packages, supported features, and shipment options. Use this information to quickly integrate and make educated decisions about the mix of carriers for shipping needs. Additionally, the Carrier Metadata endpoint is available to retrieve comprehensive information about all carriers on the EasyPost platform, enhancing decision-making for carrier services. ### Support and Troubleshooting In addition to the guidance provided in the Carrier Guides, EasyPost offers support to assist with FAQs, troubleshooting issues, and inquiries related to the EasyPost platform. Visit the Help Center for more information. Related: - [Carrier Metadata](https://docs.easypost.com/docs/carrier-metadata) - [Help Center](https://support.easypost.com/hc/en-us) --- ## Talk to a Shipping Expert For questions about getting started with the EasyPost API please talk to a Shipping Expert or Contact Support. Related: - [Talk to a Shipping Expert](https://www.easypost.com/talk-to-easypost) - [Contact Support](https://support.easypost.com/hc/requests/new) --- Source: https://docs.easypost.com/carriers/dpdnl-guide # DPD NL Guide DPD NL is part of Geopost, one of the world's leading parcel delivery networks operating in more than 50 countries. Their 57,000 delivery experts deliver more than eight million parcels worldwide daily. This guide includes detailed information on utilizing DPD NL shipping with the EasyPost API, focusing on account setup, rates, label creation, manifests, tracking, and more. > Note: This carrier guide is specifically provided for the **DPD Netherlands** service. --- ## Carrier Account Setup ### Account Registration Sign up for an EasyPost account to obtain a **Test** and **Production** API key. See Authentication and Key Management for more information. > Note: Negotiated rates are only available in Production mode. ### Carrier Setup Upon sign-up with EasyPost, users gain immediate access to Wallet Carrier Accounts, which can be enabled directly from the Dashboard. For additional carriers, EasyPost supports a Bring Your Own Carrier Account (BYOCA) option. This requires users to register directly with the respective carrier. #### DPD NL Shipper Account Registration 1. Contact DPD NL to request a shipper account. A representative will be in touch for additional details regarding the account. 2. Inform DPD NL about using EasyPost's API for label purchases. 3. Acquire rates and align any additional shipping needs. 4. Obtain the following production and test credentials: 1. Password 2. Delis ID 5. Input carrier-specific credentials within the EasyPost Carrier Account Dashboard for comprehensive rate access. #### DPD NL Account via API The API structure specified by EasyPost can also be used to add the DPD NL carrier shipper account. ```shell curl -X POST https://api.easypost.com/v2/carrier_accounts \ -u "$EASYPOST_API_KEY": \ -H 'Content-Type: application/json' \ -d '{ "carrier_account": { "type": "DpdNlAccount", "description": "DpdNlAccount", "credentials": { "password": "VALUE", "username": "VALUE" }, "test_credentials": { "password": "VALUE", "username": "VALUE" } } }' ``` ### Software Requirements Download an EasyPost Client Library or utilize the REST API with cURL. ### Documentation Review Examine the EasyPost Objects section to understand the API's structure, which is critical for constructing requests and interpreting responses. Related: - [Getting Started Guide](https://docs.easypost.com/guides/getting-started) - [Manage Carrier Accounts](https://app.easypost.com/account/settings?tab=carriers) --- ## Billing DPD NL bills the actual postage through its billing system. --- ## Rates When integrating a DPD NL account with EasyPost, users should be aware of how rates are managed and displayed. Here's a breakdown of key points: ### Default Rate Display EasyPost always returns a $0.01 placeholder rate for DPD NL shipments. Live postage rates are not returned through this integration. --- ## Service Levels DPD NL offers the following services: Service levels are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=dpdnl`. Related: - [Service Levels](https://docs.easypost.com/docs/shipments/rates#service-levels) Related: - [DPD NL Service Levels](https://docs.easypost.com/docs/shipments/rates?carrier=dpdnl#service-levels) --- ## Predefined Packages Predefined packages provide a convenient way to classify parcels using carrier-defined package types and retrieve applicable rates. When creating a shipment with the EasyPost API, select a predefined package that matches the parcel's characteristics and provide its weight in ounces when required. See the predefined package documentation for supported values and example requests. Predefined packages are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=dpdnl`. Related: - [Predefined Packages](https://docs.easypost.com/docs/parcels#predefined-packages) --- ## Generating Shipping Labels With EasyPost, generating shipping labels for DPD NL is the same process as generating them for any other carrier. Review the Getting Started Guide for help generating a shipping label. ### One-Call Buys 1-call buys enable streamlined label purchasing through the EasyPost API by consolidating multiple operations into a single API request. This feature is designed to simplify and accelerate the shipping process by combining the creation of a shipment, retrieval of rates, and purchasing the shipping label into one efficient step. See Reducing API Response Times for more information. ### Manifests Manifesting is **not** supported or required. ### Refunding and Voiding Labels Voiding DPD NL labels through EasyPost is **not** supported. ### Shipment Options Shipment options are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=dpdnl`. Related: - [Shipment Options](https://docs.easypost.com/docs/shipments/options) #### Label Formats EasyPost offers DPD NL labels in ZPL, PNG, and PDF formats. Related: - [Shipment Documentation](https://docs.easypost.com/docs/shipments) - [Reducing API Response Times](https://support.easypost.com/hc/en-us/articles/360048825772-Reducing-API-Response-Times) --- ## Hazardous Materials (HAZMAT) The DPD NL policy on hazardous materials is not explicitly detailed in this guide. Shippers are advised to contact DPD NL directly for specific hazmat inquiries. --- ## Pickups DPD NL accommodates pickups based on individual agreements with customers. While regular pickups can be arranged directly with DPD NL during the account registration process, they **cannot be scheduled via the EasyPost API**. --- ## Tracking EasyPost simplifies package tracking by offering two methods: - Tracking with an existing number and carrier. - Using a Tracker included with an EasyPost-purchased shipping label. The service integrates webhooks for timely shipment updates. For detailed information on tracking methods, visit the Tracking Guide. Related: - [Trackers Documentation](https://docs.easypost.com/docs/trackers) - [Trackers Guide](https://docs.easypost.com/guides/tracking-guide) --- ## Additional Resources ### Carrier Metadata The Carrier Metadata endpoint can programmatically return information about service levels, predefined packages, supported features, and shipment options. Use this information to quickly integrate and make educated decisions about the mix of carriers for shipping needs. Additionally, the Carrier Metadata endpoint is available to retrieve comprehensive information about all carriers on the EasyPost platform, enhancing decision-making for carrier services. ### Support and Troubleshooting In addition to the guidance provided in the Carrier Guides, EasyPost offers support to assist with FAQs, troubleshooting issues, and inquiries related to the EasyPost platform. Visit the Help Center for more information. Related: - [Carrier Metadata](https://docs.easypost.com/docs/carrier-metadata) - [Help Center](https://support.easypost.com/hc/en-us) --- ## Talk to a Shipping Expert For questions about getting started with the EasyPost API please talk to a Shipping Expert or Contact Support. Related: - [Talk to a Shipping Expert](https://www.easypost.com/talk-to-easypost) - [Contact Support](https://support.easypost.com/hc/requests/new) --- Source: https://docs.easypost.com/carriers/dpduk-guide # DPD UK Guide DPD UK is a prominent parcel delivery service and part of Geopost, renowned for its commitment to reliability and customer service. As a member of one of Europe's leading logistics networks, DPD UK offers a wide range of domestic and international shipping solutions. This guide includes detailed information on utilizing DPD UK shipping with the EasyPost API, focusing on account setup, rates, label creation, manifests, tracking, and more. > Note: This carrier guide is specifically provided for the **DPD United Kingdom** service. --- ## Carrier Account Setup ### Account Registration Sign up for an EasyPost account to obtain a **Test** and **Production** API key. See Authentication and Key Management for more information. > Note: Negotiated rates are only available in Production mode. ### Carrier Setup Upon sign-up with EasyPost, users gain immediate access to Wallet Carrier Accounts, which can be enabled directly from the Dashboard. For additional carriers, EasyPost supports a Bring Your Own Carrier Account (BYOCA) option. This requires users to register directly with the respective carrier. #### DPD UK Shipper Account Registration 1. Contact DPD UK to request a shipper account. A representative will be in touch for additional details regarding the account. 2. Inform DPD UK about using EasyPost's API for label purchases. 3. Acquire rates and align any additional shipping needs. 4. Obtain the following production and test credentials: 1. DPD UK Account Number 2. DPD UK Password 3. DPD UK Username 5. Input carrier-specific credentials within the EasyPost Carrier Account Dashboard for comprehensive rate access. #### DPD UK Account via API The API structure specified by EasyPost can also be used to add the DPD UK carrier shipper account. ```shell curl -X POST https://api.easypost.com/v2/carrier_accounts \ -u "$EASYPOST_API_KEY": \ -H 'Content-Type: application/json' \ -d '{ "carrier_account": { "type": "DpdUkAccount", "description": "DpdUkAccount", "credentials": { "account_number": "VALUE", "password": "VALUE", "username": "VALUE" } } }' ``` ### Software Requirements Download an EasyPost Client Library or utilize the REST API with cURL. ### Documentation Review Examine the EasyPost Objects section to understand the API's structure, which is critical for constructing requests and interpreting responses. Related: - [Getting Started Guide](https://docs.easypost.com/guides/getting-started) - [Manage Carrier Accounts](https://app.easypost.com/account/settings?tab=carriers) --- ## Billing - DPD UK will charge the appropriate amount for postage via their billing system. --- ## Rates When integrating a DPD UK account with EasyPost, users should be aware of how rates are managed and displayed. Here's a breakdown of key points: ### Default Rate Display - EasyPost initially returns a $0.01 rate for shipments once the DPD UK account is set up. ### Rate Card - DPD UK representatives provide rate cards detailing expected costs based on shipment parameters (package size, weight, location, etc.). - Acquiring this custom rate card from DPD UK is crucial, as EasyPost is not automatically privy to these rates. ### Rate Card Integration Once the rate card is received from DPD UK, users should contact support@easypost.com for assistance installing this rate card into their account. --- ## Service Levels DPD UK offers the following services: Service levels are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=dpduk`. Related: - [Service Levels](https://docs.easypost.com/docs/shipments/rates#service-levels) Related: - [DPD UK Service Levels](https://docs.easypost.com/docs/shipments/rates?carrier=dpduk#service-levels) ### Ship2Shop DPD UK supports Ship2Shop, a convenient option that allows customers to pick up their parcels at designated pickup locations. Specific details must be set in the shipment creation process to use this service. - **Buyer Address:** The `buyer_address` field must be populated with the end customer's details, including a phone number and email to facilitate communication regarding pickup instructions. - **Carrier Facility:** The `carrier_facility` field to specify the Ship2Shop pickup location code. #### Important Notes - **Contact Information:** Ensure the phone number and email are included in the `buyer_address` to contact the customer with pickup instructions. - **Location Codes:** EasyPost does not provide support for looking up location codes by zip code or latitude/longitude; customers must obtain these location codes from DPD UK. - **Label Override:** When using the Ship2Shop service, DPD UK will override the address on the label with the address corresponding to the provided location code. Ensure the location code is correct to prevent misrouting. ![DPD UK Ship2Shop Label Example](https://docs.easypost.com/images/guides/dpduk/dpduk-ship-2-shop-label-example.png) --- ## Predefined Packages Predefined packages provide a convenient way to classify parcels using carrier-defined package types and retrieve applicable rates. When creating a shipment with the EasyPost API, select a predefined package that matches the parcel's characteristics and provide its weight in ounces when required. See the predefined package documentation for supported values and example requests. Predefined packages are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=dpduk`. Related: - [Predefined Packages](https://docs.easypost.com/docs/parcels#predefined-packages) --- ## Generating Shipping Labels With EasyPost, generating shipping labels for DPD UK is the same process as generating them for any other carrier. Review the Getting Started Guide for help generating a shipping label. ### One-Call Buys 1-call buys enable streamlined label purchasing through the EasyPost API by consolidating multiple operations into a single API request. This feature is designed to simplify and accelerate the shipping process by combining the creation of a shipment, retrieval of rates, and purchasing the shipping label into one efficient step. See Reducing API Response Times for more information. ### Manifests Manifesting is **not** supported or required. ### Refunding and Voiding Labels Voiding DPD UK labels through EasyPost is **not** supported. ### Shipment Options Shipment options are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=dpduk`. Related: - [Shipment Options](https://docs.easypost.com/docs/shipments/options) #### Label Formats EasyPost offers native DPD UK labels in EPL, ZPL, PNG, and PDF formats. ### Shipments Between UK and Ireland DPD UK supports the Windsor Framework requirements set forth by the UK when shipments between the UK and Ireland meet certain criteria. Refer to DPD UK or the GOV.UK websites for information about specific shipping needs. DPD UK supports the following specialized fields to support the Windsor Framework: - `shipment.options.ukims_at_risk`: A declaration by the shipper indicating whether the goods in the package are at risk of entering the EU. Possible values: - "YES" - “NO” - `Shipment.options.ukims_is_business`: A declaration by the shipper indicating whether or not the consignee is a business. Possible values: - "YES" - “NO” - `taxidentifier.tax_id_type`: The type of tax ID that is used with the shipment. See Tax Identifiers for a list of possible tax ID types by carrier. An Economic Operators Registration and Identification (EORI) number is recommended for Windsor Framework shipments. - `taxidentifier.tax_id`: The tax ID of the shipper. Required for Windsor Framework shipments. Related: - [Shipment Documentation](https://docs.easypost.com/docs/shipments) - [Reducing API Response Times](https://support.easypost.com/hc/en-us/articles/360048825772-Reducing-API-Response-Times) --- ## Hazardous Materials (HAZMAT) The DPD UK policy on hazardous materials is not explicitly detailed in this guide. Shippers are advised to contact DPD UK directly for specific hazmat inquiries. --- ## Pickups DPD UK accommodates pickups based on individual agreements with customers. While regular pickups can be arranged directly with DPD UK during the account registration process, they **cannot be scheduled via the EasyPost API**. --- ## Tracking EasyPost simplifies package tracking by offering two methods: - Tracking with an existing number and carrier. - Using a Tracker included with an EasyPost-purchased shipping label. The service integrates webhooks for timely shipment updates. For detailed information on tracking methods, visit the Tracking Guide. Related: - [Trackers Documentation](https://docs.easypost.com/docs/trackers) - [Trackers Guide](https://docs.easypost.com/guides/tracking-guide) --- ## Additional Resources ### Carrier Metadata The Carrier Metadata endpoint can programmatically return information about service levels, predefined packages, supported features, and shipment options. Use this information to quickly integrate and make educated decisions about the mix of carriers for shipping needs. Additionally, the Carrier Metadata endpoint is available to retrieve comprehensive information about all carriers on the EasyPost platform, enhancing decision-making for carrier services. ### Support and Troubleshooting In addition to the guidance provided in the Carrier Guides, EasyPost offers support to assist with FAQs, troubleshooting issues, and inquiries related to the EasyPost platform. Visit the Help Center for more information. Related: - [Carrier Metadata](https://docs.easypost.com/docs/carrier-metadata) - [Help Center](https://support.easypost.com/hc/en-us) --- ## Talk to a Shipping Expert For questions about getting started with the EasyPost API please talk to a Shipping Expert or Contact Support. Related: - [Talk to a Shipping Expert](https://www.easypost.com/talk-to-easypost) - [Contact Support](https://support.easypost.com/hc/requests/new) --- Source: https://docs.easypost.com/carriers/ehub-guide # eHub Guide eHub is a shipping aggregation platform that provides access to multiple carriers through eHub Orchestrate. Through the EasyPost API, eHub supports U.S. domestic shipments and enables merchants to retrieve rates, generate labels, void shipments, and receive tracking updates. For operational details, shipment nuances, and frequently asked questions, refer to the eHub Carrier Support and FAQs article. Related: - [eHub Carrier Support & FAQs](https://support.easypost.com/hc/en-us/articles/44643699795597-eHub-Carrier-Support-and-FAQs) --- ## Carrier Account Setup ### Account Registration Sign up for an EasyPost account to obtain a **Test** and **Production** API key. See Authentication and Key Management for more information. > Note: Negotiated rates are only available in Production mode. ### Carrier Setup #### eHub Account Registration 1. Contact eHub to create a shipper account. 2. Inform eHub about using EasyPost's API for label purchases. 3. Acquire rates and align any additional shipping needs. 4. Obtain the following test and production account credentials: 1. `api_key` 5. Input carrier-specific credentials within the EasyPost Carrier Account Dashboard for comprehensive rate access. #### eHub Shipping Account via API The API structure specified by EasyPost can also be used to add the eHub carrier shipper account. ```shell curl -X POST https://api.easypost.com/v2/carrier_accounts \ -u "$EASYPOST_API_KEY": \ -H 'Content-Type: application/json' \ -d '{ "carrier_account": { "type": "EhubAccount", "description": "EhubAccount", "credentials": { "api_key": "VALUE" }, "test_credentials": { "api_key": "VALUE" } } }' ``` ### Software Requirements Download an EasyPost Client Library or utilize the REST API with cURL. ### Documentation Review Examine the EasyPost Objects section to understand the API's structure, which is critical for constructing requests and interpreting responses. Related: - [Getting Started Guide](https://docs.easypost.com/guides/getting-started) - [Manage Carrier Accounts](https://app.easypost.com/account/settings?tab=carriers) --- ## Billing All eHub shipments purchased through EasyPost are billed by eHub in USD. Contact eHub for specific invoicing procedures. Refer to the Help Center for more information about payment methods, wallet funding, or account billing. --- ## Rates eHub is a **Live Rating** integration, enabling real-time rate retrieval for shipments created via EasyPost. - When creating a shipment, EasyPost requests eHub for shipment rates specific to the user's eHub account. - The rates provided are directly from eHub and tailored to the user's specific account details. - In cases of discrepancies or incorrect rates, users are advised to contact their eHub account representative. --- ## Service Levels eHub offers the following service levels: Service levels are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=ehub`. Related: - [Service Levels](https://docs.easypost.com/docs/shipments/rates#service-levels) --- ## Predefined Packages Predefined packages provide a convenient way to classify parcels using carrier-defined package types and retrieve applicable rates. When creating a shipment with the EasyPost API, select a predefined package that matches the parcel's characteristics and provide its weight in ounces when required. See the predefined package documentation for supported values and example requests. Predefined packages are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=ehub`. Related: - [Predefined Packages](https://docs.easypost.com/docs/parcels#predefined-packages) --- ## Generating Shipping Labels Generating shipping labels with eHub follows the same process as generating labels for other carriers through the EasyPost API. Review the Getting Started Guide for help generating a shipping label. ### One-Call Buys One-call buys enable streamlined label purchasing through the EasyPost API by consolidating multiple operations into a single API request. This feature is designed to simplify and accelerate the shipping process by combining the creation of a shipment, retrieval of rates, and purchasing the shipping label into one efficient step. See Reducing API Response Times for more information. ### Manifests Manifesting is not currently required and is therefore not supported by eHub. ### Refunding and Voiding Labels Voiding eHub labels through EasyPost is supported. ### Shipment Options Shipment options are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=ehub`. Related: - [Shipment Options](https://docs.easypost.com/docs/shipments/options) Related: - [Shipment Documentation](https://docs.easypost.com/docs/shipments) - [eHub Carrier Support and FAQs](https://support.easypost.com/hc/en-us/articles/44643699795597-eHub-Carrier-Support-and-FAQs) --- ## Hazardous Materials (HAZMAT) The eHub policy on hazardous materials is not explicitly detailed in this guide. Shippers are advised to contact eHub directly for hazmat inquiries. --- ## Pickups Pickup scheduling is not managed through the EasyPost API for eHub. Pickups are coordinated directly through eHub. Requirements such as a Bill of Lading (BOL), pickup schedule, and on-site contact coordination are handled directly through eHub. --- ## Tracking EasyPost simplifies package tracking by offering two methods: - Tracking with an existing number and carrier. - Using a Tracker included with an EasyPost-purchased shipping label. The service integrates webhooks for timely shipment updates. For detailed information on tracking methods, visit the Tracking Guide. Related: - [Trackers Documentation](https://docs.easypost.com/docs/trackers) - [Trackers Guide](https://docs.easypost.com/guides/tracking-guide) --- ## Additional Resources ### Carrier Metadata The Carrier Metadata endpoint can programmatically return information about service levels, predefined packages, supported features, and shipment options. Use this information to quickly integrate and make educated decisions about the mix of carriers for shipping needs. Additionally, the Carrier Metadata endpoint is available to retrieve comprehensive information about all carriers on the EasyPost platform, enhancing decision-making for carrier services. ### Support and Troubleshooting In addition to the guidance provided in the Carrier Guides, EasyPost offers support to assist with FAQs, troubleshooting issues, and inquiries related to the EasyPost platform. Visit the Help Center for more information. Related: - [Carrier Metadata](https://docs.easypost.com/docs/carrier-metadata) - [Help Center](https://support.easypost.com/hc/en-us) --- ## Talk to a Shipping Expert For questions about getting started with the EasyPost API please talk to a Shipping Expert or Contact Support. Related: - [Talk to a Shipping Expert](https://www.easypost.com/talk-to-easypost) - [Contact Support](https://support.easypost.com/hc/requests/new) --- Source: https://docs.easypost.com/carriers/epost-global-guide # ePost Global Guide ePost Global's international parcel and mail shipping solutions enable businesses to streamline global distribution and enhance customer satisfaction. Their worldwide network, technology-backed support model, and extensive knowledge of international shipping requirements ensure a seamless experience with reliable, accurate, and consistent delivery. This guide includes detailed information on utilizing ePost Global shipping with the EasyPost API, focusing on account setup, rates, label creation, manifests, tracking, and more. For operational details, shipment nuances, and frequently asked questions, refer to the ePost Global Carrier Support and FAQs article. Related: - [ePost Global Carrier Support and FAQs](https://support.easypost.com/hc/en-us/articles/44626463930637-ePost-Global-Carrier-Support-and-FAQs) --- ## Carrier Account Setup ### Account Registration Sign up for an EasyPost account to obtain a **Test** and **Production** API key. See Authentication and Key Management for more information. > Note: Negotiated rates are only available in Production mode. ### Carrier Setup #### ePost Global Shipper Account Registration 1. Contact ePost Global to request a shipper account. A representative will be in touch for additional details regarding the account. 2. Inform ePost Global about using EasyPost's API for label purchases. 3. Acquire rates and align any additional shipping needs. 4. Obtain the following ePost Global credentials: 1. ePost Global Account Number 5. Input carrier-specific credentials within the EasyPost Carrier Account Dashboard for comprehensive rate access. ### Software Requirements Download an EasyPost Client Library or utilize the REST API with cURL. ### Documentation Review Examine the EasyPost Objects section to understand the API's structure, which is critical for constructing requests and interpreting responses. Related: - [Getting Started Guide](https://docs.easypost.com/guides/getting-started) - [Manage Carrier Accounts](https://app.easypost.com/account/settings?tab=carriers) --- ## Billing ePost Global directly handles billing after parcel delivery. EasyPost does not participate in the billing process for ePost Global services. Contact an ePost Global representative for details. --- ## Rates When integrating an ePost Global account with EasyPost, users should be aware of how rates are managed and displayed. Here's a breakdown of key points: ### Default Rate Display - EasyPost initially returns a $0.01 rate for shipments once the ePost Global account is set up. - ePost Global will charge the appropriate amount for postage via their billing system. ### Rate Card - ePost Global representatives provide rate cards detailing expected costs based on shipment parameters (package size, weight, location, etc.). - Acquiring this custom rate card from ePost Global is crucial, as EasyPost is not automatically privy to these rates. ### Rate Card Integration Once the rate card is received from ePost Global, users should contact EasyPost support at support@easypost.com for assistance installing the rate card into their account. --- ## Service Levels ePost Global offers the following service levels: Service levels are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=epostglobal`. Related: - [Service Levels](https://docs.easypost.com/docs/shipments/rates#service-levels) --- ## Predefined Packages Predefined packages provide a convenient way to classify parcels using carrier-defined package types and retrieve applicable rates. When creating a shipment with the EasyPost API, select a predefined package that matches the parcel's characteristics and provide its weight in ounces when required. See the predefined package documentation for supported values and example requests. Predefined packages are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=epostglobal`. Related: - [Predefined Packages](https://docs.easypost.com/docs/parcels#predefined-packages) --- ## Generating Shipping Labels With EasyPost, generating shipping labels for ePost Global is the same process as generating them for any other carrier. Review the Getting Started Guide for help generating a shipping label. ### One-Call Buys One-Call buys enable streamlined label purchasing through the EasyPost API by consolidating multiple operations into a single API request. This feature is designed to simplify and accelerate the shipping process by combining the creation of a shipment, retrieval of rates, and purchasing the shipping label into one efficient step. See Reducing API Response Times for more information. ### Manifests Manual manifesting is not supported. This integration creates labels and performs scheduled manifesting to ensure the labels are valid in the carrier's mailstream. ### Refunding and Voiding Labels Voiding ePost Global labels is not supported. ### Shipment Options Shipment options are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=epostglobal`. Related: - [Shipment Options](https://docs.easypost.com/docs/shipments/options) #### Label Formats EasyPost offers native ePost Global labels in ZPL, PNG, PDF, and EPL2 formats. #### Label Size Options Possible values for ePost Global shipping label sizes: - 4 x 6 - 8.5 x 11 Related: - [Shipment Documentation](https://docs.easypost.com/docs/shipments) --- ## Hazardous Materials (HAZMAT) The ePost Global policy on hazardous materials is not explicitly detailed. Shippers are advised to contact ePost Global directly for specific guidelines and compliance requirements. --- ## Pickups ePost Global accommodates pickups based on individual agreements with customers. While regular pickups can be arranged directly with ePost Global during the account registration process, they **cannot be scheduled via the EasyPost API**. --- ## Tracking EasyPost simplifies package tracking by offering two methods: - Tracking with an existing number and carrier. - Using a Tracker included with an EasyPost-purchased shipping label. The service integrates webhooks for timely shipment updates. For detailed information on tracking methods, visit the Tracking Guide. Related: - [Trackers Documentation](https://docs.easypost.com/docs/trackers) - [Trackers Guide](https://docs.easypost.com/guides/tracking-guide) --- ## Additional Resources ### Carrier Metadata The Carrier Metadata endpoint can programmatically return information about service levels, predefined packages, supported features, and shipment options. Use this information to quickly integrate and make educated decisions about the mix of carriers for shipping needs. Additionally, the Carrier Metadata endpoint is available to retrieve comprehensive information about all carriers on the EasyPost platform, enhancing decision-making for carrier services. ### Support and Troubleshooting In addition to the guidance provided in the Carrier Guides, EasyPost offers support to assist with FAQs, troubleshooting issues, and inquiries related to the EasyPost platform. Visit the Help Center for more information. Related: - [Carrier Metadata](https://docs.easypost.com/docs/carrier-metadata) - [Help Center](https://support.easypost.com/hc/en-us) --- ## Talk to a Shipping Expert For questions about getting started with the EasyPost API please talk to a Shipping Expert or Contact Support. Related: - [Talk to a Shipping Expert](https://www.easypost.com/talk-to-easypost) - [Contact Support](https://support.easypost.com/hc/requests/new) --- Source: https://docs.easypost.com/carriers/estafeta-guide # Estafeta Guide Estafeta, a 100% Mexican company, boasts over 42 years of experience in shipping, parcels, and logistics. Its primary objective is to deliver exceptional service that fosters business growth. This guide includes detailed information on utilizing Estafeta shipping with the EasyPost API, focusing on account setup, rates, label creation, manifests, tracking, and more. --- ## Carrier Account Setup ### Account Registration Sign up for an EasyPost account to obtain a **Test** and **Production** API key. See Authentication and Key Management for more information. > Note: Negotiated rates are only available in Production mode. ### Carrier Setup Upon sign-up with EasyPost, users gain immediate access to Wallet Carrier Accounts, which can be enabled directly from the Dashboard. For additional carriers, EasyPost supports a Bring Your Own Carrier Account (BYOCA) option. This requires users to register directly with the respective carrier. #### Estafeta Shipper Account Registration 1. Contact Estafeta to request a shipper account. Inform Estafeta about using EasyPost's API for label purchases. Use the following verbiage in the correspondence: _"Please associate account_ **[account_number]** _with Simpler Postage Inc. (EasyPost) account_ **0001536**." A representative will be in touch for additional details regarding the account. 2. Acquire rates and align any additional shipping needs. 3. Obtain the following account credentials from Estafeta: 1. Customer Number 2. Office Number 4. Input carrier-specific credentials within the EasyPost Carrier Account Dashboard for comprehensive rate access. #### Estafeta Account via API The API structure specified by EasyPost can also be used to add the Estafeta carrier shipper account. ```shell curl -X POST https://api.easypost.com/v2/carrier_accounts \ -u "$EASYPOST_API_KEY": \ -H 'Content-Type: application/json' \ -d '{ "carrier_account": { "type": "EstafetaAccount", "description": "EstafetaAccount", "credentials": { "buy_api_key": "VALUE", "buy_client_id": "VALUE", "buy_client_secret": "VALUE", "customer_number": "VALUE", "hub_id": "VALUE", "rate_api_key": "VALUE", "rate_client_id": "VALUE", "rate_client_secret": "VALUE", "track_api_key": "VALUE", "track_client_id": "VALUE", "track_client_secret": "VALUE" }, "test_credentials": { "buy_api_key": "VALUE", "buy_client_id": "VALUE", "buy_client_secret": "VALUE", "customer_number": "VALUE", "hub_id": "VALUE", "rate_api_key": "VALUE", "rate_client_id": "VALUE", "rate_client_secret": "VALUE", "track_api_key": "VALUE", "track_client_id": "VALUE", "track_client_secret": "VALUE" } } }' ``` ### Software Requirements Download an EasyPost Client Library or utilize the REST API with cURL. ### Documentation Review Examine the EasyPost Objects section to understand the API's structure, which is critical for constructing requests and interpreting responses. Related: - [Getting Started Guide](https://docs.easypost.com/guides/getting-started) - [Manage Carrier Accounts](https://app.easypost.com/account/settings?tab=carriers) --- ## Billing Billing is directly handled by Estafeta after parcel delivery. EasyPost does not participate in the billing process for Estafeta services. Contact an Estafeta representative for details. --- ## Rates Estafeta is a **Live Rating** integration, enabling real-time rate retrieval for shipments created via EasyPost. - When creating a shipment, EasyPost requests Estafeta for shipment rates specific to the user's Estafeta account. - The rates provided are directly from Estafeta and tailored to the user's specific account details. - In cases of discrepancies or incorrect rates, users are advised to contact their Estafeta account representative. > Important: Estafeta requires **Address Line 2** to be included in the `to_address` and `from_address` objects when requesting rates. Omitting **Address Line 2** will prevent rates from being returned. --- ## Service Levels Estafeta delivers six days per week (Monday - Saturday). The service levels through EasyPost include: Service levels are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=estafeta`. Related: - [Service Levels](https://docs.easypost.com/docs/shipments/rates#service-levels) Related: - [Estafeta Service Levels](https://docs.easypost.com/docs/shipments/rates?carrier=estafeta#service-levels) --- ## Predefined Packages Predefined packages provide a convenient way to classify parcels using carrier-defined package types and retrieve applicable rates. When creating a shipment with the EasyPost API, select a predefined package that matches the parcel's characteristics and provide its weight in ounces when required. See the predefined package documentation for supported values and example requests. Predefined packages are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=estafeta`. Related: - [Predefined Packages](https://docs.easypost.com/docs/parcels#predefined-packages) --- ## Generating Shipping Labels With EasyPost, generating shipping labels for Estafeta follows the same general process as other carriers, with an additional requirement. > Note: Estafeta requires **Address Line 2** to be included in both the `to_address` and `from_address` objects. Without **Address Line 2**, rates will not return and labels cannot be generated. Review the Getting Started Guide for help generating a shipping label. ### Manifests Manifesting is **not** supported or required for Estafeta ### Returns Estafeta does **not** provide a separate service for returns. Any shipments will be subject to regular pricing. ### Refunding and Voiding Labels Voiding Estafeta labels through EasyPost is **not** supported. ### Shipment Options Shipment options are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=estafeta`. Related: - [Shipment Options](https://docs.easypost.com/docs/shipments/options) Related: - [Shipment Documentation](https://docs.easypost.com/docs/shipments) - [Reducing API Response Times](https://support.easypost.com/hc/en-us/articles/360048825772-Reducing-API-Response-Times) --- ## Hazardous Materials (HAZMAT) The Estafeta policy on hazardous materials is not explicitly detailed in this guide. Shippers are advised to contact Estafeta directly for specific hazmat inquiries. --- ## Pickups Estafeta accommodates pickups based on individual agreements with customers. While regular pickups can be arranged directly with Estefeta during the account registration process, they **cannot be scheduled via the EasyPost API**. --- ## Tracking EasyPost simplifies package tracking by offering two methods: - Tracking with an existing number and carrier. - Using a Tracker included with an EasyPost-purchased shipping label. The service integrates webhooks for timely shipment updates. For detailed information on tracking methods, visit the Tracking Guide. Related: - [Trackers Documentation](https://docs.easypost.com/docs/trackers) - [Trackers Guide](https://docs.easypost.com/guides/tracking-guide) --- ## Additional Resources ### Carrier Metadata The Carrier Metadata endpoint can programmatically return information about service levels, predefined packages, supported features, and shipment options. Use this information to quickly integrate and make educated decisions about the mix of carriers for shipping needs. Additionally, the Carrier Metadata endpoint is available to retrieve comprehensive information about all carriers on the EasyPost platform, enhancing decision-making for carrier services. ### Support and Troubleshooting In addition to the guidance provided in the Carrier Guides, EasyPost offers support to assist with FAQs, troubleshooting issues, and inquiries related to the EasyPost platform. Visit the Help Center for more information. Related: - [Carrier Metadata](https://docs.easypost.com/docs/carrier-metadata) - [Help Center](https://support.easypost.com/hc/en-us) --- ## Talk to a Shipping Expert For questions about getting started with the EasyPost API please talk to a Shipping Expert or Contact Support. Related: - [Talk to a Shipping Expert](https://www.easypost.com/talk-to-easypost) - [Contact Support](https://support.easypost.com/hc/requests/new) --- Source: https://docs.easypost.com/carriers/evri-guide # EVRi Guide EVRi is a leading logistics provider known for its cost-effective and flexible delivery solutions. Operating extensively within the UK, EVRi specializes in both domestic and international parcel delivery services. This guide includes detailed information on utilizing EVRi shipping with the EasyPost API, focusing on account setup, rates, label creation, manifests, tracking, and more. --- ## Carrier Account Setup ### Account Registration Sign up for an EasyPost account to obtain a **Test** and **Production** API key. See Authentication and Key Management for more information. > Note: Negotiated rates are only available in Production mode. ### Carrier Setup Upon sign-up with EasyPost, users gain immediate access to Wallet Carrier Accounts, which can be enabled directly from the Dashboard. For additional carriers, EasyPost supports a Bring Your Own Carrier Account (BYOCA) option. This requires users to register directly with the respective carrier. #### EVRi Shipper Account Registration 1. Contact EVRi to request a shipper account. A representative will be in touch for additional details regarding the account. 2. Inform EVRi about using EasyPost's API for label purchases. 3. Acquire rates and align additional shipping needs. 4. Obtain production and test credentials: 1. EVRi API Key 2. EVRi Auth ID 3. EVRi Auth Secret 4. EVRi Client ID 5. EVRi Client Name 6. EVRi Password 7. EVRi Username 5. Input carrier-specific credentials within the EasyPost Carrier Account Dashboard for comprehensive rate access. #### EVRi Account via API The API structure specified by EasyPost can also be used to add the EVRi carrier shipper account. ```shell curl -X POST https://api.easypost.com/v2/carrier_accounts \ -u "$EASYPOST_API_KEY": \ -H 'Content-Type: application/json' \ -d '{ "carrier_account": { "type": "HermesAccount", "description": "HermesAccount", "credentials": { "api_key": "VALUE", "auth_id": "VALUE", "auth_secret": "VALUE", "client_id": "VALUE", "client_name": "VALUE", "password": "VALUE", "username": "VALUE" } } }' ``` ### Software Requirements Download an EasyPost Client Library or utilize the REST API with cURL. ### Documentation Review Examine the EasyPost Objects section to understand the API's structure, which is critical for constructing requests and interpreting responses. Related: - [Getting Started Guide](https://docs.easypost.com/guides/getting-started) - [Manage Carrier Accounts](https://app.easypost.com/account/settings?tab=carriers) --- ## Billing For Domestic and International shipments, billing is directly handled by EVRi after parcel delivery. EasyPost does not participate in the billing process for EVRi services. Contact an EVRi representative for details. --- ## Rates ### Domestic Shipments When integrating an EVRi account with EasyPost, users should know how rates are managed and displayed. Here's a breakdown of key points: #### Default Rate Display - EasyPost initially returns a $0.01 rate for shipments once the EVRi account is set up. - EVRi will charge the appropriate amount for postage via their billing system. #### Rate Card - EVRi representatives provide rate cards detailing expected costs based on shipment parameters (package size, weight, location, etc.). - Acquiring this custom rate card from EVRi is crucial, as EasyPost is not automatically privy to these rates. - Once the rate card is received from EVRi, users should contact support@easypost.com for assistance installing this rate card into the account. ### International Shipments #### Default Rate Display EasyPost returns a $0.01 placeholder rate for international EVRi shipments until an international rate card is loaded on EasyPost's end. EVRi bills the actual postage through its billing system. --- ## Service Levels EVRi offers the following services: Service levels are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=evri`. Related: - [Service Levels](https://docs.easypost.com/docs/shipments/rates#service-levels) Related: - [EVRi Service Levels](https://docs.easypost.com/docs/shipments/rates?carrier=evri#service-levels) --- ## Predefined Packages Predefined packages provide a convenient way to classify parcels using carrier-defined package types and retrieve applicable rates. When creating a shipment with the EasyPost API, select a predefined package that matches the parcel's characteristics and provide its weight in ounces when required. See the predefined package documentation for supported values and example requests. Predefined packages are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=evri`. Related: - [Predefined Packages](https://docs.easypost.com/docs/parcels#predefined-packages) --- ## Generating Shipping Labels With EasyPost, generating shipping labels for EVRi is the same process as generating them for any other carrier. Review the Getting Started Guide for help generating a shipping label. ### One-Call Buys 1-call buys enable streamlined label purchasing through the EasyPost API by consolidating multiple operations into a single API request. This feature is designed to simplify and accelerate the shipping process by combining the creation of a shipment, retrieval of rates, and purchasing the shipping label into one efficient step. See Reducing API Response Times for more information. ### Manifests Manifesting is **not** supported or required for EVRi integration. ### Returns Returns are supported using `shipment.is_return = True`. ### Refunding and Voiding Labels Voiding EVRi labels through EasyPost is **not** supported. ### Shipment Options Shipment options are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=evri`. Related: - [Shipment Options](https://docs.easypost.com/docs/shipments/options) #### Label Formats EasyPost offers native EVRi labels in ZPL, PNG, and PDF formats. Related: - [Shipment Documentation](https://docs.easypost.com/docs/shipments) - [Reducing API Response Times](https://support.easypost.com/hc/en-us/articles/360048825772-Reducing-API-Response-Times) --- ## Hazardous Materials (HAZMAT) The EVRi policy on hazardous materials is not explicitly detailed in this guide. Shippers are advised to contact EVRi directly for specific hazmat inquiries. --- ## Pickups EVRi accommodates pickups based on individual agreements with customers. While regular pickups can be arranged directly with EVRi during the account registration process, they **cannot be scheduled via the EasyPost API**. --- ## Tracking EasyPost simplifies package tracking by offering two methods: - Tracking with an existing number and carrier. - Using a Tracker included with an EasyPost-purchased shipping label. The service integrates webhooks for timely shipment updates. For detailed information on tracking methods, visit the Tracking Guide. Related: - [Trackers Documentation](https://docs.easypost.com/docs/trackers) - [Trackers Guide](https://docs.easypost.com/guides/tracking-guide) --- ## Additional Resources ### Carrier Metadata The Carrier Metadata endpoint can programmatically return information about service levels, predefined packages, supported features, and shipment options. Use this information to quickly integrate and make educated decisions about the mix of carriers for shipping needs. Additionally, the Carrier Metadata endpoint is available to retrieve comprehensive information about all carriers on the EasyPost platform, enhancing decision-making for carrier services. ### Support and Troubleshooting In addition to the guidance provided in the Carrier Guides, EasyPost offers support to assist with FAQs, troubleshooting issues, and inquiries related to the EasyPost platform. Visit the Help Center for more information. Related: - [Carrier Metadata](https://docs.easypost.com/docs/carrier-metadata) - [Help Center](https://support.easypost.com/hc/en-us) --- ## Talk to a Shipping Expert For questions about getting started with the EasyPost API please talk to a Shipping Expert or Contact Support. Related: - [Talk to a Shipping Expert](https://www.easypost.com/talk-to-easypost) - [Contact Support](https://support.easypost.com/hc/requests/new) --- Source: https://docs.easypost.com/carriers/fedex-byoca-guide # FedEx BYOCA Guide **IMPORTANT:** Starting March 1, 2026, all FedEx Bring Your Own Carrier Account (BYOCA) accounts must be REST-enabled through the Multi-Factor Authentication (MFA) process. Refer to the FedEx Multi-Factor Authentication support article for additional details. FedEx's extensive fleet includes over 650 aircraft and 49,000 trucks, ensuring timely delivery of packages, envelopes, and parcels across the globe. Daily, FedEx processes over 14 million packages worldwide. EasyPost integrates with FedEx's complete range of services, as well as offering support for over 100 additional carriers. This guide includes detailed information on utilizing FedEx for shipping with the EasyPost API, focusing on account setup, rate retrieval, service levels, label generation, tracking, and more. EasyPost supports FedEx through two account options: - **FedEx Wallet:** Use an EasyPost-managed FedEx account with EasyPost Wallet billing. - **FedEx BYOCA:** Connect an existing FedEx account to EasyPost with FedEx-provided credentials and carrier-direct billing. For frequently asked questions, refer to the FedEx FAQs section of the Help Center. Related: - [FedEx FAQs](https://support.easypost.com/hc/en-us/sections/28347277430669-FedEx-FAQs) --- ## Carrier Account Setup ### Account Registration Sign up for an EasyPost account to obtain a **Test** and **Production** API key. See Authentication and Key Management for more information. > Note: Negotiated rates are only available in Production mode. Please review the Getting Started Guide for more information. ### Carrier Setup #### Bring Your Own Carrier Account (BYOCA) to EasyPost 1. Register for a FedEx account. 2. Contact a FedEx representative to discuss volume rate discounts. 3. Obtain the following account credentials from FedEx: 1. FedEx Account Number 4. Input carrier-specific credentials within the EasyPost Carrier Account Dashboard for comprehensive rate access. #### FedEx Account via API The API structure specified by EasyPost can also be used to add a FedEx carrier account. ```shell curl -X POST https://api.easypost.com/v2/carrier_accounts/register \ -u "$EASYPOST_API_KEY": \ -H 'Content-Type: application/json' \ -d '{ "carrier_account": { "type": "FedexAccount", "description": "FedexAccount", "registration_data": { "shipping_city": "VALUE", "shipping_country_code": "VALUE", "shipping_postal_code": "VALUE", "shipping_state": "VALUE", "shipping_streets": "VALUE", "corporate_city": "VALUE", "corporate_company_name": "VALUE", "corporate_country_code": "VALUE", "corporate_email_address": "VALUE", "corporate_first_name": "VALUE", "corporate_job_title": "VALUE", "corporate_last_name": "VALUE", "corporate_phone_number": "VALUE", "corporate_postal_code": "VALUE", "corporate_state": "VALUE", "corporate_streets": "VALUE", "account_number": "VALUE" } } }' ``` **FedEx REST Enabled Accounts** Starting March 1, 2026, all FedEx accounts must be created using the FedEx Multi-Factor Authentication (MFA) API flow. Documentation for the MFA flow is available in the FedEx Multi-Factor Authentication support article. **FedEx Legacy WebServices (SOAP) Accounts [Deprecated]** The WebServices (SOAP) carrier account integration is **no longer available** and has been replaced by the REST Multifactor Authentication flow. Documentation for the MFA flow is available in the FedEx Multifactor Authentication support article. ### Software Requirements Download an EasyPost Client Library or utilize the REST API with cURL. ### Documentation Review - Examine the EasyPost Objects section to understand the API's structure, which is critical for constructing requests and interpreting responses. - Download the FedEx API documentation on the FedEx website. The documentation includes additional information about various fields and formats they accept. > Note: The FedEx API interface may differ from the EasyPost API, which is standardized to provide a consistent experience across various shipping carriers. Related: - [Getting Started Guide](https://docs.easypost.com/guides/getting-started) - [FedEx Account Sign-Up](https://www.fedex.com/fcl/web/jsp/contactInfo1.jsp?appName=oadr&locale=us_en&step3URL=https%3A%2F%2Fwww.fedex.com%2Ffcl%2FExistingAccountFclStep3&afterwardsURL=https%3A%2F%2Fwww.fedex.com%2Ffcl%2Foptionhome&programIndicator=ss90705920) - [FedEx Developer Kit](https://developer.fedex.com/api/en-us/home.html) --- ## Billing Billing is directly handled by FedEx. EasyPost does not participate in the billing process for FedEx BYOCA services. --- ## Rates Custom rates apply for BYOCA FedEx accounts linked to EasyPost. The negotiated rates will appear in the rate requests from EasyPost. ### Surcharges Rate responses include itemized surcharges when applicable. These may include `fuel`, `dangerous_goods`, `address_correction`, or other fees. Each surcharge is returned in a `surcharges` array within the `rate` and `shipment` objects and includes: - `type`: Carrier-specific surcharge code. - `category`: Standardized surcharge category used across all participating carriers. - `amount`: Fee amount. - `currency`: ISO 4217 format (e.g., `USD`). For a full list of surcharge categories and descriptions, see the Surcharge Details in the Rate Response documentation. ### FedEx One Rate FedEx One Rate offers flat-rate pricing for shipments sent in eligible FedEx One Rate packaging represented by a supported `predefined_package` value. EasyPost may return FedEx One Rate rates and request One Rate on eligible label purchases. To opt out of this behavior, set the `exclude_fedex_one_rate` carrier option to `true` when creating a shipment. For more information on FedEx One Rate, see the FedEx One Rate support article. > Note: `exclude_fedex_one_rate` is supported for FedEx BYOCA accounts. When `exclude_fedex_one_rate` is set to `true`: - **Rating:** EasyPost requests FedEx exclude One Rate rates, regardless of the predefined package or service level in the request. - **Label purchase:** EasyPost no longer requests One Rate from FedEx on one-call buys. Omit the option or set it to `false` (the default) to leave existing One Rate behavior unchanged. Set the option under `options.carrier_options.fedex` on the shipment: [Content omitted: interactive code examples. Review the rendered documentation for request and response examples.] > Note: In rare cases, FedEx may ignore the exclude request and return a One Rate rate anyway. If that rate is selected, EasyPost purchases One Rate to honor the rate FedEx returned. Related: - [FedEx One Rate](https://support.easypost.com/hc/en-us/articles/360041592051-FedEx-One-Rate) Related: - [FedEx Retail Rate Calculator](https://www.fedex.com/ratetools/RateToolsMain.do?link=2) - [FedEx Platform Account Rate Charts](https://www.easypost.com/fedex-platform-account-rate-chart) --- ## Service Levels FedEx has several service levels supported by EasyPost, each with specific transit times and conditions. > Note: FedEx UK outbound service levels differ from FedEx US outbound service levels. Review the docs for each carrier's Service Levels. > Note: When using the FedEx `SMART_POST` service, only `NO_SIGNATURE`, `null`, or `SERVICE_DEFAULT` values are supported for the `delivery_confirmation` option. Other values are not compatible and will cause an error when purchasing a shipment. Service levels are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=fedexbyoca`. Related: - [Service Levels](https://docs.easypost.com/docs/shipments/rates#service-levels) Related: - [FedEx Service Levels](https://docs.easypost.com/docs/shipments/rates?carrier=FedEx#service-levels) --- ## Predefined Packages Predefined packages provide a convenient way to classify parcels using carrier-defined package types and retrieve applicable rates. When creating a shipment with the EasyPost API, select a predefined package that matches the parcel's characteristics and provide its weight in ounces when required. See the predefined package documentation for supported values and example requests. Predefined packages are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=fedexbyoca`. Related: - [Predefined Packages](https://docs.easypost.com/docs/parcels#predefined-packages) --- ## Generating Shipping Labels With EasyPost, the process for generating shipping labels for FedEx is the same as generating them for any other carrier. Review the Getting Started Guide for help generating a shipping label. ### Shipment Options Shipment options are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=fedexbyoca`. > Note: FedEx retired C.O.D. for shipments within and to the U.S. on July 31, 2023. FedEx Ground C.O.D. within and to Canada is still available. This affects the `cod_amount`, `cod_method`, and `cod_address_id` options. Related: - [Shipment Options](https://docs.easypost.com/docs/shipments/options) #### Label Formats FedEx labels are available in PNG, PDF, EPL2, and ZPL formats. #### Label Size Options Possible values for FedEx shipping label sizes: - 4x6 (default) - 8.5x11 - 4x8 - 4x9 - 7x4.75 - 8.5x11_BOTTOM_HALF_LABEL - 8.5x11_TOP_HALF_LABEL ### Custom Text Label Options Shipments can have a variety of additional options that can be specified when creating a shipment. These options include custom messages that can be printed on labels. See Options for more details. The custom text will appear on the FedEx label beneath the address: ![Example FedEx Label with Custom Text](https://docs.easypost.com/images/guides/fedex/fedex-custom-label-text.png) Related: - [Shipment Documentation](https://docs.easypost.com/docs/shipments) --- ## Hazardous Materials (HAZMAT) When shipping hazardous materials or dangerous goods via FedEx, it is crucial to adhere to specific regulations and guidelines to ensure safety and compliance. ### Dangerous Goods (lithium batteries) EasyPost's FedEx integration supports **International Air Transport Association (IATA) Section II exempt lithium-ion and lithium-metal batteries.** Both modern IATA Packing Instruction (PI) codes and legacy hazmat terms are accepted. The PI codes listed below are the recommended standard. #### Supported HazMat Codes | PI code | Legacy terms (also accepted) | Battery type | Packing method | |---|---|---|---| | PI967-II | SECONDARY_CONTAINED, SECONDARY | Lithium ion (rechargeable) | Contained in device | | PI966-II | SECONDARY_PACKED | Lithium ion (rechargeable) | Packed separately in same box | | PI970-II | PRIMARY_CONTAINED, PRIMARY, LITHIUM | Lithium metal (non-rechargeable) | Contained in device | | PI969-II | PRIMARY_PACKED | Lithium metal (non-rechargeable) | Packed separately in same box | To learn more please visit FedEx Dangerous Goods & Lithium Batteries in the Help Center or the FedEx's Learn How to Ship Dangerous Goods and Hazardous Materials. Related: - [FedEx Dangerous Goods & Lithium Batteries](https://support.easypost.com/hc/en-us/articles/41267578640269-FedEx-Dangerous-Goods-Lithium-Batteries) - [FedEx - Learn How to Ship Dangerous Goods and Hazardous Materials](https://www.fedex.com/en-us/service-guide/dangerous-goods-hazardous-materials.html) --- ## Pickups FedEx pickup requests can be made via the EasyPost API. Review the Pickups API documentation for details. > Note: Pickups incur charges; users should consult their FedEx account representative for pricing details. Related: - [Pickups Documentation](https://docs.easypost.com/docs/pickups) --- ## Tracking EasyPost simplifies package tracking by offering two methods: - Tracking with an existing number and carrier. - Using a Tracker included with an EasyPost-purchased shipping label. The service integrates webhooks for timely shipment updates. For detailed information on tracking methods, visit the Tracking Guide. Related: - [Trackers Documentation](https://docs.easypost.com/docs/trackers) - [Trackers Guide](https://docs.easypost.com/guides/tracking-guide) --- ## Additional Resources ### Carrier Metadata The Carrier Metadata endpoint can programmatically return information about service levels, predefined packages, supported features, and shipment options. Use this information to quickly integrate and make educated decisions about the mix of carriers for shipping needs. Additionally, the Carrier Metadata endpoint is available to retrieve comprehensive information about all carriers on the EasyPost platform, enhancing decision-making for carrier services. ### Support and Troubleshooting In addition to the guidance provided in the Carrier Guides, EasyPost offers support to assist with FAQs, troubleshooting issues, and inquiries related to the EasyPost platform. Visit the Help Center for more information. Related: - [Carrier Metadata](https://docs.easypost.com/docs/carrier-metadata) - [Help Center](https://support.easypost.com/hc/en-us) --- ## Talk to a Shipping Expert For questions about getting started with the EasyPost API please talk to a Shipping Expert or Contact Support. Related: - [Talk to a Shipping Expert](https://www.easypost.com/talk-to-easypost) - [Contact Support](https://support.easypost.com/hc/requests/new) --- Source: https://docs.easypost.com/carriers/fedex-wallet-guide # FedEx Wallet Guide FedEx's extensive fleet includes over 650 aircraft and 49,000 trucks, ensuring timely delivery of packages, envelopes, and parcels across the globe. Daily, FedEx processes over 14 million packages worldwide. EasyPost integrates with FedEx's complete range of services, as well as offering support for over 100 additional carriers. EasyPost supports FedEx through two account options: - **FedEx Wallet:** Use an EasyPost-managed FedEx account with EasyPost Wallet billing. - **FedEx BYOCA:** Connect an existing FedEx account to EasyPost with FedEx-provided credentials and carrier-direct billing. This guide includes detailed information on utilizing FedEx Wallet shipping with the EasyPost API, focusing on account setup, rate retrieval, service levels, label generation, tracking, and more. For frequently asked questions, refer to the FedEx FAQs section of the Help Center. Related: - [FedEx FAQs](https://support.easypost.com/hc/en-us/sections/28347277430669-FedEx-FAQs) --- ## Carrier Account Setup ### Account Registration Sign up for an EasyPost account to obtain a **Test** and **Production** API key. See Authentication and Key Management for more information. > Note: Negotiated rates are only available in Production mode. Please review the Getting Started Guide for more information. ### Carrier Setup #### Create a FedEx Wallet Carrier Account 1. Log in to EasyPost and navigate to **Account Settings**. 2. Select the **Carriers** tab. 3. Select the **EasyPost Wallet Carriers** tab. 4. Find **FedEx Wallet Account** in the list of carriers and select **Create Account** to complete the account creation process. ![Steps to create a FedEx Wallet Account in the EasyPost web UI](https://docs.easypost.com/images/guides/fedex/fedex-create-account-web-ui.png) #### FedEx Wallet Account via API The API structure specified by EasyPost can also be used to add a FedEx Wallet carrier account. ```shell curl -X POST https://api.easypost.com/v2/carrier_accounts/open \ -u "$EASYPOST_API_KEY": \ -H 'Content-Type: application/json' \ -d '{ "carrier_account": { "type": "FedexDefaultAccount", "name": "VALUE", "street1": "VALUE", "city": "VALUE", "state": "VALUE", "postal_code": "VALUE", "country": "VALUE", "phone": "VALUE", "email": "VALUE", "payment_mode": "aggregation" } }' ``` ### Software Requirements Download an EasyPost Client Library or utilize the REST API with cURL. ### Documentation Review - Examine the EasyPost Objects section to understand the API's structure, which is critical for constructing requests and interpreting responses. - Download the FedEx API documentation on the FedEx website. The documentation includes additional information about various fields and formats they accept. > Note: The FedEx API interface may differ from the EasyPost API, which is standardized to provide a consistent experience across various shipping carriers. Related: - [Getting Started Guide](https://docs.easypost.com/guides/getting-started) - [FedEx Account Sign-Up](https://www.fedex.com/fcl/web/jsp/contactInfo1.jsp?appName=oadr&locale=us_en&step3URL=https%3A%2F%2Fwww.fedex.com%2Ffcl%2FExistingAccountFclStep3&afterwardsURL=https%3A%2F%2Fwww.fedex.com%2Ffcl%2Foptionhome&programIndicator=ss90705920) - [FedEx Developer Kit](https://developer.fedex.com/api/en-us/home.html) --- ## Billing Billing is handled through the EasyPost Wallet. Shipment charges are deducted directly from the customer's EasyPost Wallet. If FedEx determines that shipment details differ from the information provided when the label was purchased, the shipment may be subject to a billing adjustment. Any resulting charge or credit is applied to the EasyPost Wallet. --- ## Rates EasyPost offers all users a FedEx Wallet Account with pre-negotiated rates. Simply create an EasyPost account, add **FedEx Wallet Account** to the carrier lineup, and start shipping. ### Surcharges Rate responses include itemized surcharges when applicable. These may include `fuel`, `dangerous_goods`, `address_correction`, or other fees. Each surcharge is returned in a `surcharges` array within the `rate` and `shipment` objects and includes: - `type`: Carrier-specific surcharge code. - `category`: Standardized surcharge category used across all participating carriers. - `amount`: Fee amount. - `currency`: ISO 4217 format (e.g., `USD`). For a full list of surcharge categories and descriptions, see the Surcharge Details in the Rate Response documentation. ### FedEx One Rate FedEx One Rate offers flat-rate pricing for shipments sent in eligible FedEx One Rate packaging represented by a supported `predefined_package` value. EasyPost may return FedEx One Rate rates and request One Rate on eligible label purchases. To opt out of this behavior, set the `exclude_fedex_one_rate` carrier option to `true` when creating a shipment. For more information on FedEx One Rate, see the FedEx One Rate support article. > Note: `exclude_fedex_one_rate` is supported for FedEx Wallet accounts. When `exclude_fedex_one_rate` is set to `true`: - **Rating:** EasyPost requests FedEx exclude One Rate rates, regardless of the predefined package or service level in the request. - **Label purchase:** EasyPost no longer requests One Rate from FedEx on one-call buys. Omit the option or set it to `false` (the default) to leave existing One Rate behavior unchanged. Set the option under `options.carrier_options.fedex` on the shipment: [Content omitted: interactive code examples. Review the rendered documentation for request and response examples.] > Note: In rare cases, FedEx may ignore the exclude request and return a One Rate rate anyway. If that rate is selected, EasyPost purchases One Rate to honor the rate FedEx returned. Related: - [FedEx One Rate](https://support.easypost.com/hc/en-us/articles/360041592051-FedEx-One-Rate) Related: - [FedEx Retail Rate Calculator](https://www.fedex.com/ratetools/RateToolsMain.do?link=2) - [FedEx Platform Account Rate Charts](https://www.easypost.com/fedex-platform-account-rate-chart) --- ## Service Levels FedEx has several service levels supported by EasyPost, each with specific transit times and conditions. > Note: FedEx UK outbound service levels differ from FedEx US outbound service levels. Review the docs for each carrier's Service Levels. > Note: When using the FedEx `SMART_POST` service, only `NO_SIGNATURE`, `null`, or `SERVICE_DEFAULT` values are supported for the `delivery_confirmation` option. Other values are not compatible and will cause an error when purchasing a shipment. Service levels are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=fedexwallet`. Related: - [Service Levels](https://docs.easypost.com/docs/shipments/rates#service-levels) Related: - [FedEx Service Levels](https://docs.easypost.com/docs/shipments/rates?carrier=FedEx#service-levels) --- ## Predefined Packages Predefined packages provide a convenient way to classify parcels using carrier-defined package types and retrieve applicable rates. When creating a shipment with the EasyPost API, select a predefined package that matches the parcel's characteristics and provide its weight in ounces when required. See the predefined package documentation for supported values and example requests. Predefined packages are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=fedexwallet`. Related: - [Predefined Packages](https://docs.easypost.com/docs/parcels#predefined-packages) --- ## Generating Shipping Labels With EasyPost, the process for generating shipping labels for FedEx is the same as generating them for any other carrier. Review the Getting Started Guide for help generating a shipping label. ### Shipment Options Shipment options are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=fedexwallet`. Related: - [Shipment Options](https://docs.easypost.com/docs/shipments/options) #### Label Formats FedEx labels are available in PNG, PDF, EPL2, and ZPL formats. #### Label Size Options Possible values for FedEx shipping label sizes: - 4x6 (default) - 8.5x11 - 4x8 - 4x9 - 7x4.75 - 8.5x11_BOTTOM_HALF_LABEL - 8.5x11_TOP_HALF_LABEL ### Custom Text Label Options Shipments can have a variety of additional options that can be specified when creating a shipment. These options include custom messages that can be printed on labels. See Options for more details. The custom text will appear on the FedEx label beneath the address: ![Example FedEx Label with Custom Text](https://docs.easypost.com/images/guides/fedex/fedex-custom-label-text.png) Related: - [Shipment Documentation](https://docs.easypost.com/docs/shipments) --- ## Hazardous Materials (HAZMAT) When shipping hazardous materials or dangerous goods via FedEx, it is crucial to adhere to specific regulations and guidelines to ensure safety and compliance. ### Dangerous Goods (lithium batteries) EasyPost's FedEx integration supports **International Air Transport Association (IATA) Section II exempt lithium-ion and lithium-metal batteries.** Both modern IATA Packing Instruction (PI) codes and legacy hazmat terms are accepted. The PI codes listed below are the recommended standard. #### Supported HazMat Codes | PI code | Legacy terms (also accepted) | Battery type | Packing method | |---|---|---|---| | PI967-II | SECONDARY_CONTAINED, SECONDARY | Lithium ion (rechargeable) | Contained in device | | PI966-II | SECONDARY_PACKED | Lithium ion (rechargeable) | Packed separately in same box | | PI970-II | PRIMARY_CONTAINED, PRIMARY, LITHIUM | Lithium metal (non-rechargeable) | Contained in device | | PI969-II | PRIMARY_PACKED | Lithium metal (non-rechargeable) | Packed separately in same box | To learn more please visit FedEx Dangerous Goods & Lithium Batteries in the Help Center or the FedEx's Learn How to Ship Dangerous Goods and Hazardous Materials. Related: - [FedEx Dangerous Goods & Lithium Batteries](https://support.easypost.com/hc/en-us/articles/41267578640269-FedEx-Dangerous-Goods-Lithium-Batteries) - [FedEx - Learn How to Ship Dangerous Goods and Hazardous Materials](https://www.fedex.com/en-us/service-guide/dangerous-goods-hazardous-materials.html) --- ## Pickups FedEx pickup requests can be made via the EasyPost API. Review the Pickups API documentation for details. > Note: Pickups incur charges; users should consult their FedEx account representative for pricing details. Related: - [Pickups Documentation](https://docs.easypost.com/docs/pickups) --- ## Tracking EasyPost simplifies package tracking by offering two methods: - Tracking with an existing number and carrier. - Using a Tracker included with an EasyPost-purchased shipping label. The service integrates webhooks for timely shipment updates. For detailed information on tracking methods, visit the Tracking Guide. Related: - [Trackers Documentation](https://docs.easypost.com/docs/trackers) - [Trackers Guide](https://docs.easypost.com/guides/tracking-guide) --- ## Additional Resources ### Carrier Metadata The Carrier Metadata endpoint can programmatically return information about service levels, predefined packages, supported features, and shipment options. Use this information to quickly integrate and make educated decisions about the mix of carriers for shipping needs. Additionally, the Carrier Metadata endpoint is available to retrieve comprehensive information about all carriers on the EasyPost platform, enhancing decision-making for carrier services. ### Support and Troubleshooting In addition to the guidance provided in the Carrier Guides, EasyPost offers support to assist with FAQs, troubleshooting issues, and inquiries related to the EasyPost platform. Visit the Help Center for more information. Related: - [Carrier Metadata](https://docs.easypost.com/docs/carrier-metadata) - [Help Center](https://support.easypost.com/hc/en-us) --- ## Talk to a Shipping Expert For questions about getting started with the EasyPost API please talk to a Shipping Expert or Contact Support. Related: - [Talk to a Shipping Expert](https://www.easypost.com/talk-to-easypost) - [Contact Support](https://support.easypost.com/hc/requests/new) --- Source: https://docs.easypost.com/carriers/first-choice-delivery-guide # 1st Choice Delivery Guide 1st Choice Delivery specializes in last-mile delivery solutions, ensuring efficient distribution services for various industries. The company offers tailored delivery schedules catering to urgent delivery needs. This guide includes detailed information on utilizing 1st Choice Delivery shipping with the EasyPost API, focusing on account setup, rates, label creation, manifests, tracking, and more. --- ## Carrier Account Setup ### Account Registration Sign up for an EasyPost account to obtain a **Test** and **Production** API key. See Authentication and Key Management for more information. > Note: Negotiated rates are only available in Production mode. ### Carrier Setup Upon sign-up with EasyPost, users gain immediate access to Wallet Carrier Accounts, which can be enabled directly from the Dashboard. For additional carriers, EasyPost supports a Bring Your Own Carrier Account (BYOCA) option. This requires users to register directly with the respective carrier. #### 1st Choice Delivery Account Registration 1. Contact 1st Choice Delivery to request a shipper account. A representative will be in touch for additional details regarding the account. 2. Inform 1st Choice Delivery about using EasyPost's API for label purchases. 3. Acquire rates and align any additional shipping needs. 4. Obtain the following test and production account credentials:: 1. First Choice Username 2. First Choice Password 3. First Choice Account Number 4. First Choice Customer Key 5. First Choice Customer Code 6. First Choice API Key 5. Input carrier-specific credentials within the EasyPost Carrier Account Dashboard for comprehensive rate access. #### 1st Choice Delivery Account via API The API structure specified by EasyPost can also be used to add the 1st Choice Delivery carrier shipper account. ```shell curl -X POST https://api.easypost.com/v2/carrier_accounts \ -u "$EASYPOST_API_KEY": \ -H 'Content-Type: application/json' \ -d '{ "carrier_account": { "type": "FirstChoiceAccount", "description": "FirstChoiceAccount", "credentials": { "account_number": "VALUE", "api_key": "VALUE", "customer_code": "VALUE", "customer_key": "VALUE", "password": "VALUE", "username": "VALUE" }, "test_credentials": { "account_number": "VALUE", "api_key": "VALUE", "customer_code": "VALUE", "customer_key": "VALUE", "password": "VALUE", "username": "VALUE" } } }' ``` ### Software Requirements Download an EasyPost Client Library or utilize the REST API with cURL. ### Documentation Review Examine the EasyPost Objects section to understand the API's structure, which is critical for constructing requests and interpreting responses. Related: - [Getting Started Guide](https://docs.easypost.com/guides/getting-started) - [Manage Carrier Accounts](https://app.easypost.com/account/settings?tab=carriers) --- ## Billing Billing is directly handled by 1st Choice Delivery using a bill-on delivery system. EasyPost does not participate in the billing process for 1st Choice Delivery services. Contact a 1st Choice Delivery representative for details. --- ## Rates ### Default Rate Display EasyPost always returns a $0.01 placeholder rate for 1st Choice Delivery shipments. Live postage rates are not returned through this integration. 1st Choice Delivery bills the actual postage through its billing system. --- ## Service Levels 1st Choice Delivery offers the following services: Service levels are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=firstchoice`. Related: - [Service Levels](https://docs.easypost.com/docs/shipments/rates#service-levels) Related: - [1st Choice Delivery Service Levels](https://docs.easypost.com/docs/shipments/rates?carrier=firstchoice#service-levels) --- ## Predefined Packages Predefined packages provide a convenient way to classify parcels using carrier-defined package types and retrieve applicable rates. When creating a shipment with the EasyPost API, select a predefined package that matches the parcel's characteristics and provide its weight in ounces when required. See the predefined package documentation for supported values and example requests. Predefined packages are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=firstchoice`. Related: - [Predefined Packages](https://docs.easypost.com/docs/parcels#predefined-packages) --- ## Generating Shipping Labels With EasyPost, generating shipping labels for 1st Choice Delivery is the same process as generating them for any other carrier. Review the Getting Started Guide for help generating a shipping label. ### Manifests Manifesting is **not** supported or required. ### Refunding and Voiding Labels Voiding 1st Choice Delivery labels through EasyPost is **not** supported. ### Shipment Options Shipment options are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=firstchoice`. Related: - [Shipment Options](https://docs.easypost.com/docs/shipments/options) #### Label Formats EasyPost offers native 1st Choice Delivery labels in ZPL, PNG, and PDF formats. Related: - [Shipment Documentation](https://docs.easypost.com/docs/shipments) - [Reducing API Response Times](https://support.easypost.com/hc/en-us/articles/360048825772-Reducing-API-Response-Times) --- ## Hazardous Materials (HAZMAT) The 1st Choice Delivery policy on hazardous materials is not explicitly detailed in this guide. Shippers are advised to contact 1st Choice Delivery directly for specific hazmat inquiries. --- ## Pickups 1st Choice Delivery accommodates pickups based on individual agreements with customers. While regular pickups can be arranged directly with 1st Choice Delivery during the account registration process, they **cannot be scheduled via the EasyPost API**. --- ## Tracking EasyPost simplifies package tracking by offering two methods: - Tracking with an existing number and carrier. - Using a Tracker included with an EasyPost-purchased shipping label. The service integrates webhooks for timely shipment updates. For detailed information on tracking methods, visit the Tracking Guide. Related: - [Trackers Documentation](https://docs.easypost.com/docs/trackers) - [Trackers Guide](https://docs.easypost.com/guides/tracking-guide) --- ## Additional Resources ### Carrier Metadata The Carrier Metadata endpoint can programmatically return information about service levels, predefined packages, supported features, and shipment options. Use this information to quickly integrate and make educated decisions about the mix of carriers for shipping needs. Additionally, the Carrier Metadata endpoint is available to retrieve comprehensive information about all carriers on the EasyPost platform, enhancing decision-making for carrier services. ### Support and Troubleshooting In addition to the guidance provided in the Carrier Guides, EasyPost offers support to assist with FAQs, troubleshooting issues, and inquiries related to the EasyPost platform. Visit the Help Center for more information. Related: - [Carrier Metadata](https://docs.easypost.com/docs/carrier-metadata) - [Help Center](https://support.easypost.com/hc/en-us) --- ## Talk to a Shipping Expert For questions about getting started with the EasyPost API please talk to a Shipping Expert or Contact Support. Related: - [Talk to a Shipping Expert](https://www.easypost.com/talk-to-easypost) - [Contact Support](https://support.easypost.com/hc/requests/new) --- Source: https://docs.easypost.com/carriers/flexport-parcel-guide # Flexport Parcel Guide Flexport Parcel offers a specialized parcel shipment service designed for businesses looking to streamline their logistics. They provide reliable and cost-effective delivery solutions, ensuring timely and transparent shipment of parcels across all 50 states and globally. This guide includes detailed information on utilizing Flexport Parcel shipping with the EasyPost API, focusing on account setup, rates, label creation, manifests, tracking, and more. --- ## Carrier Account Setup ### Account Registration Sign up for an EasyPost account to obtain a **Test** and **Production** API key. See Authentication and Key Management for more information. > Note: Negotiated rates are only available in Production mode. ### Carrier Setup Upon sign-up with EasyPost, users gain immediate access to Wallet Carrier Accounts, which can be enabled directly from the Dashboard. For additional carriers, EasyPost supports a Bring Your Own Carrier Account (BYOCA) option. This requires users to register directly with the respective carrier. #### Flexport Parcel Shipper Account Registration 1. Contact Flexport Parcel to request a shipper account. A representative will be in touch for additional details regarding the account. 2. Inform Flexport Parcel about using EasyPost's API for label purchases. 3. Acquire rates and align any additional shipping needs. 4. Obtain the following account credentials: 1. Flexport Account API Key 5. Input carrier-specific credentials within the EasyPost Carrier Account Dashboard for comprehensive rate access. #### Flexport Parcel Account via API The API structure specified by EasyPost can also be used to add the Flexport Parcel carrier shipper account. ```shell curl -X POST https://api.easypost.com/v2/carrier_accounts \ -u "$EASYPOST_API_KEY": \ -H 'Content-Type: application/json' \ -d '{ "carrier_account": { "type": "FlexportAccount", "description": "FlexportAccount", "credentials": { "api_key": "VALUE" } } }' ``` ### Software Requirements Download an EasyPost Client Library or utilize the REST API with cURL. ### Documentation Review Examine the EasyPost Objects section to understand the API's structure, which is critical for constructing requests and interpreting responses. Related: - [Getting Started Guide](https://docs.easypost.com/guides/getting-started) - [Manage Carrier Accounts](https://app.easypost.com/account/settings?tab=carriers) --- ## Billing When using a Flexport Parcel BYOCA, shipment charges are billed under the shipper's own Flexport Parcel account. --- ## Rates Flexport Parcel's rates are returned in real-time via the Shipping API, contingent upon proper account setup with EasyPost. Flexport Parcel requires the `carrier_facility` field to be populated when creating the address object for the `from_address` with the city code for the sortation center from which the package will be sent. Sortation center city codes are listed below: - Atlanta: `ATL` - Newark: `EWR` - Dallas/Fort Worth: `DFW` - Los Angeles: `LAX` - Chicago: `ORD` - San Francisco: `SFO` The API Docs provide detailed guidance on address creation. Related: - [Addresses](https://docs.easypost.com/docs/addresses) --- ## Service Levels Flexport Parcel delivers on weekdays (Monday-Friday), offering the following service levels: - **Expedited:** Five business days, with a cutoff time of 5:00 PM at Flexport sortation centers. - **Standard:** Seven business days, with a cutoff time of 7:00 PM at Flexport sortation centers. Service levels are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=flexport`. Related: - [Service Levels](https://docs.easypost.com/docs/shipments/rates#service-levels) ### Coverage Area Flexport Parcel supports US domestic shipments to all 50 states, including Hawaii and Alaska, for all supported service levels. ![Map indicating Flexport Parcel coverage area](https://docs.easypost.com/images/guides/flexport-parcel/flexport-parcel-coverage-map.png) Related: - [Flexport Parcel Service Levels](https://docs.easypost.com/docs/shipments/rates?carrier=flexport#service-levels) --- ## Predefined Packages Predefined packages provide a convenient way to classify parcels using carrier-defined package types and retrieve applicable rates. When creating a shipment with the EasyPost API, select a predefined package that matches the parcel's characteristics and provide its weight in ounces when required. See the predefined package documentation for supported values and example requests. Predefined packages are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=flexport`. Related: - [Predefined Packages](https://docs.easypost.com/docs/parcels#predefined-packages) --- ## Generating Shipping Labels With EasyPost, generating shipping labels for Flexport Parcel is the same process as generating them for any other carrier. Review the Getting Started Guide for help generating a shipping label. ### Manifests Manifesting is **not** supported or required for Flexport Parcel. ### Returns Returns with Flexport Parcel are not supported through the EasyPost API. ### Shipment Options Shipment options are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=flexport`. Related: - [Shipment Options](https://docs.easypost.com/docs/shipments/options) #### Label Formats EasyPost offers native Flexport Parcel labels in the following formats: - PNG - ZPL Related: - [Shipment Documentation](https://docs.easypost.com/docs/shipments) - [Reducing API Response Times](https://support.easypost.com/hc/en-us/articles/360048825772-Reducing-API-Response-Times) --- ## Hazardous Materials (HAZMAT) This guide does not specify handling hazardous materials with Flexport Parcel. Shippers are advised to contact Flexport Parcel directly for specific hazmat inquiries. --- ## Pickups Regular pickups can be coordinated directly with the Flexport Parcel Team during the registration process; however, they cannot be scheduled through the EasyPost API. Eligibility for scheduled pickups is subject to Flexport's current policies and priorities. ### Dropoffs Flexport Parcel has a national network of sortation centers available for dropoffs in the following cities/zip codes: - ATL: 30213 - EWR: 08817 - DFW: 75050 - LAX: 92518 - ORD: 60164 - SFO: 95688 --- ## Tracking EasyPost simplifies package tracking by offering two methods: - Tracking with an existing number and carrier. - Using a Tracker included with an EasyPost-purchased shipping label. The service integrates webhooks for timely shipment updates. For detailed information on tracking methods, visit the Tracking Guide. Related: - [Trackers Documentation](https://docs.easypost.com/docs/trackers) - [Trackers Guide](https://docs.easypost.com/guides/tracking-guide) --- ## Additional Resources ### Carrier Metadata The Carrier Metadata endpoint can programmatically return information about service levels, predefined packages, supported features, and shipment options. Use this information to quickly integrate and make educated decisions about the mix of carriers for shipping needs. Additionally, the Carrier Metadata endpoint is available to retrieve comprehensive information about all carriers on the EasyPost platform, enhancing decision-making for carrier services. ### Support and Troubleshooting In addition to the guidance provided in the Carrier Guides, EasyPost offers support to assist with FAQs, troubleshooting issues, and inquiries related to the EasyPost platform. Visit the Help Center for more information. Related: - [Carrier Metadata](https://docs.easypost.com/docs/carrier-metadata) - [Help Center](https://support.easypost.com/hc/en-us) --- ## Talk to a Shipping Expert For questions about getting started with the EasyPost API please talk to a Shipping Expert or Contact Support. Related: - [Talk to a Shipping Expert](https://www.easypost.com/talk-to-easypost) - [Contact Support](https://support.easypost.com/hc/requests/new) --- Source: https://docs.easypost.com/carriers/gio-express-guide # GIO Express Guide Founded in 2006, GIO Express has become a dominant company in the logistics and freight industry. The company balances its capability to handle projects with a personal touch, ensuring that each parcel receives the attention it deserves. GIO Express prioritizes speedy delivery, offering services such as scheduling for the next available flight and door-to-door hand delivery to ensure expedited handling and transport. This guide includes detailed information on utilizing GIO Express shipping with the EasyPost API, focusing on account setup, rates, label creation, manifests, tracking, and more. --- ## Carrier Account Setup ### Account Registration Sign up for an EasyPost account to obtain a **Test** and **Production** API key. See Authentication and Key Management for more information. > Note: Negotiated rates are only available in Production mode. ### Carrier Setup Upon sign-up with EasyPost, users gain immediate access to Wallet Carrier Accounts, which can be enabled directly from the Dashboard. For additional carriers, EasyPost supports a Bring Your Own Carrier Account (BYOCA) option. This requires users to register directly with the respective carrier. #### GIO Express Shipper Account Registration 1. Contact GIO Express to request a shipper account. A representative will be in touch for additional details regarding the account. 2. Inform GIO Express about using EasyPost's API for label purchases. 3. Acquire rates and align any additional shipping needs. 4. Obtain GIO Express account credentials: 1. Username 2. Password 5. Input carrier-specific credentials within the EasyPost Carrier Account Dashboard for comprehensive rate access. #### GIO Express Account via API The API structure specified by EasyPost can also be used to add the GIO Express carrier shipper account. ```shell curl -X POST https://api.easypost.com/v2/carrier_accounts \ -u "$EASYPOST_API_KEY": \ -H 'Content-Type: application/json' \ -d '{ "carrier_account": { "type": "GioAccount", "description": "GioAccount", "credentials": { "password": "VALUE", "username": "VALUE" }, "test_credentials": { "password": "VALUE", "username": "VALUE" } } }' ``` ### Software Requirements Download an EasyPost Client Library or utilize the REST API with cURL. ### Documentation Review Examine the EasyPost Objects section to understand the API's structure, which is critical for constructing requests and interpreting responses. Related: - [Getting Started Guide](https://docs.easypost.com/guides/getting-started) - [Manage Carrier Accounts](https://app.easypost.com/account/settings?tab=carriers) --- ## Billing Billing is directly handled by GIO Express after parcel delivery. EasyPost does not participate in the billing process for GIO Express services. Contact a GIO Express representative for details. --- ## Rates GIO Express is a **Live Rating** integration, enabling real-time rate retrieval for shipments created via EasyPost. Rates are guaranteed valid for a minimum of 5 minutes. - When creating a shipment, EasyPost requests GIO Express for shipment rates specific to the user's GIO Express account. - The rates provided are directly from GIO Express and tailored to the user's specific account details. - In cases of discrepancies or incorrect rates, users are advised to contact their GIO Express account representative. - The representative can then update the rates in GIO Express's database to ensure user account accuracy. --- ## Service Levels GIO Express offers the following service levels: Service levels are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=gio`. Related: - [Service Levels](https://docs.easypost.com/docs/shipments/rates#service-levels) Related: - [GIO Express Service Levels](https://docs.easypost.com/docs/shipments/rates?carrier=GIO#service-levels) --- ## Predefined Packages Predefined packages provide a convenient way to classify parcels using carrier-defined package types and retrieve applicable rates. When creating a shipment with the EasyPost API, select a predefined package that matches the parcel's characteristics and provide its weight in ounces when required. See the predefined package documentation for supported values and example requests. Predefined packages are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=gio`. Related: - [Predefined Packages](https://docs.easypost.com/docs/parcels#predefined-packages) --- ## Generating Shipping Labels To generate shipping labels with GIO Express, follow the standard process with the addition of specific requirements for pickup and delivery scheduling. When creating a shipment with GIO Express, the following options must be included to successfully purchase labels: ```json { "options": { "pickup_min_datetime": "2024-09-06T06:38:16+00:00", "pickup_max_datetime": "2024-09-06T11:38:16+00:00", "delivery_min_datetime": "2024-09-07T00:38:16+00:00", "delivery_max_datetime": "2024-09-12T23:59:00+00:00" } } ``` These options specify the earliest and latest permissible `datetime` for pickup and delivery, ensuring that the logistics align with GIO Express's operational capabilities. ### One-Call Buys 1-call buys enable streamlined label purchasing through the EasyPost API by consolidating multiple operations into a single API request. This feature is designed to simplify and accelerate the shipping process by combining the creation of a shipment, retrieval of rates, and purchasing the shipping label into one efficient step. See Reducing API Response Times for more information. ### Manifests Manifesting is required for GIO Express. ### Refunding and Voiding Labels Voiding GIO Express labels through EasyPost is supported. > Note: The **shipment.tracking_code** is required as it identifies the order within the carrier's system. ### Shipment Options Shipment options are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=gio`. Related: - [Shipment Options](https://docs.easypost.com/docs/shipments/options) #### Label Formats EasyPost offers native GIO Express labels in PNG, PDF, and ZPL formats. Related: - [Shipment Documentation](https://docs.easypost.com/docs/shipments) - [Reducing API Response Times](https://support.easypost.com/hc/en-us/articles/360048825772-Reducing-API-Response-Times) --- ## Hazardous Materials (HAZMAT) GIO Express's policy on hazardous materials is not explicitly detailed. Shippers are advised to contact GIO Express directly for specific guidelines and compliance requirements. --- ## Pickups GIO Express accommodates pickups based on individual agreements with customers. While regular pickups can be arranged directly with GIO Express during the account registration process, they **cannot be scheduled via the EasyPost API**. --- ## Tracking EasyPost simplifies package tracking by offering two methods: - Tracking with an existing number and carrier. - Using a Tracker included with an EasyPost-purchased shipping label. The service integrates webhooks for timely shipment updates. For detailed information on tracking methods, visit the Tracking Guide. Related: - [Trackers Documentation](https://docs.easypost.com/docs/trackers) - [Trackers Guide](https://docs.easypost.com/guides/tracking-guide) --- ## Additional Resources ### Carrier Metadata The Carrier Metadata endpoint can programmatically return information about GIO Express service levels, predefined packages, supported features, and shipment options. Use this information to quickly integrate with GIO Express and make educated decisions about the mix of carriers for shipping needs. Additionally, the Carrier Metadata endpoint is available to retrieve comprehensive information about all carriers on the EasyPost platform, enhancing decision-making for carrier services. ### Support and Troubleshooting In addition to the guidance provided in the Carrier Guides, EasyPost offers support to assist with FAQs, troubleshooting issues, and inquiries related to the EasyPost platform. Visit the Help Center for more information. Related: - [Carrier Metadata](https://docs.easypost.com/docs/carrier-metadata) - [Help Center](https://support.easypost.com/hc/en-us) --- ## Talk to a Shipping Expert For questions about getting started with the EasyPost API please talk to a Shipping Expert or Contact Support. Related: - [Talk to a Shipping Expert](https://www.easypost.com/talk-to-easypost) - [Contact Support](https://support.easypost.com/hc/requests/new) --- Source: https://docs.easypost.com/carriers/gls-guide # GLS US Guide GLS US, formerly known as GSO, is a prominent regional parcel delivery company in the United States. It provides reliable and efficient shipping solutions for both business and residential needs. As part of the GLS network, GLS US leverages extensive logistics expertise to offer a variety of services, including ground parcel, freight, and expedited shipping options. This guide includes detailed information on utilizing GLS US shipping with the EasyPost API, focusing on account setup, rates, label creation, manifests, tracking, and more. --- ## Carrier Account Setup ### Account Registration Sign up for an EasyPost account to obtain a **Test** and **Production** API key. See Authentication and Key Management for more information. > Note: Negotiated rates are only available in Production mode. ### Carrier Setup Upon sign-up with EasyPost, users gain immediate access to Wallet Carrier Accounts, which can be enabled directly from the Dashboard. For additional carriers, EasyPost supports a Bring Your Own Carrier Account (BYOCA) option. This requires users to register directly with the respective carrier. #### GLS US Shipper Account Registration 1. Contact GLS US to request a shipper account. A representative will be in touch for additional details regarding the account. 2. Inform GLS US about using EasyPost's API for label purchases. 3. Acquire rates and align any additional shipping needs. 4. Obtain the following production account credentials: 1. GLS US Account Number 2. Password 3. Username 5. Input carrier-specific credentials within the EasyPost Carrier Account Dashboard for comprehensive rate access. #### GLS US Account via API The API structure specified by EasyPost can also be used to add the GLS US carrier shipper account. ```shell curl -X POST https://api.easypost.com/v2/carrier_accounts \ -u "$EASYPOST_API_KEY": \ -H 'Content-Type: application/json' \ -d '{ "carrier_account": { "type": "GsoAccount", "description": "GsoAccount", "credentials": { "account_number": "VALUE", "password": "VALUE", "username": "VALUE" } } }' ``` ### Software Requirements Download an EasyPost Client Library or utilize the REST API with cURL. ### Documentation Review Examine the EasyPost Objects section to understand the API's structure, which is critical for constructing requests and interpreting responses. Related: - [Getting Started Guide](https://docs.easypost.com/guides/getting-started) - [Manage Carrier Accounts](https://app.easypost.com/account/settings?tab=carriers) --- ## Billing When using a GLS US BYOCA, shipment charges are billed under the shipper's own GLS US account. --- ## Rates GLS US is a **Live Rating** integration, enabling real-time rate retrieval for shipments created via EasyPost. Rates are guaranteed valid for a minimum of five minutes. - When creating a shipment, EasyPost requests GLS US for shipment rates specific to the user's GLS US account. - The rates provided are directly from GLS US and tailored to the user's specific account details. - In cases of discrepancies or incorrect rates, users are advised to contact their GLS US account representative. - The representative can then update the rates to ensure user account accuracy. --- ## Service Levels GLS US offers the following service levels: Service levels are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=gls`. Related: - [Service Levels](https://docs.easypost.com/docs/shipments/rates#service-levels) Related: - [GLS US Service Levels](https://docs.easypost.com/docs/shipments/rates?carrier=gso#service-levels) --- ## Predefined Packages Predefined packages provide a convenient way to classify parcels using carrier-defined package types and retrieve applicable rates. When creating a shipment with the EasyPost API, select a predefined package that matches the parcel's characteristics and provide its weight in ounces when required. See the predefined package documentation for supported values and example requests. Predefined packages are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=gls`. Related: - [Predefined Packages](https://docs.easypost.com/docs/parcels#predefined-packages) --- ## Generating Shipping Labels With EasyPost, generating shipping labels for GLS US is the same process as generating them for any other carrier. Review the Getting Started Guide for help generating a shipping label. ### Manifests Manifesting is **not** supported or required for GLS US. ### Refunding and Voiding Labels Voiding and refunds of GLS US labels through EasyPost are supported. ### Shipment Options Shipment options are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=gls`. Related: - [Shipment Options](https://docs.easypost.com/docs/shipments/options) #### Label Formats EasyPost offers native GLS US labels in PNG, ZPL, and PDF formats. Related: - [Shipment Documentation](https://docs.easypost.com/docs/shipments) --- ## Hazardous Materials (HAZMAT) The GLS US policy on hazardous materials is not explicitly detailed in this guide. Shippers are advised to contact GLS US directly for specific hazmat inquiries. --- ## Pickups GLS US accommodates pickups based on individual agreements with customers. While regular pickups can be arranged directly with GLS US during the account registration process, they **cannot be scheduled via the EasyPost API**. --- ## Tracking EasyPost simplifies package tracking by offering two methods: - Tracking with an existing number and carrier. - Using a Tracker included with an EasyPost-purchased shipping label. The service integrates webhooks for timely shipment updates. For detailed information on tracking methods, visit the Tracking Guide. Related: - [Trackers Documentation](https://docs.easypost.com/docs/trackers) - [Trackers Guide](https://docs.easypost.com/guides/tracking-guide) --- ## Additional Resources ### Carrier Metadata The Carrier Metadata endpoint can programmatically return information about service levels, predefined packages, supported features, and shipment options. Use this information to quickly integrate and make educated decisions about the mix of carriers for shipping needs. Additionally, the Carrier Metadata endpoint is available to retrieve comprehensive information about all carriers on the EasyPost platform, enhancing decision-making for carrier services. ### Support and Troubleshooting In addition to the guidance provided in the Carrier Guides, EasyPost offers support to assist with FAQs, troubleshooting issues, and inquiries related to the EasyPost platform. Visit the Help Center for more information. Related: - [Carrier Metadata](https://docs.easypost.com/docs/carrier-metadata) - [Help Center](https://support.easypost.com/hc/en-us) --- ## Talk to a Shipping Expert For questions about getting started with the EasyPost API please talk to a Shipping Expert or Contact Support. Related: - [Talk to a Shipping Expert](https://www.easypost.com/talk-to-easypost) - [Contact Support](https://support.easypost.com/hc/requests/new) --- Source: https://docs.easypost.com/carriers/gofo-byoca-guide # GOFO BYOCA Guide GOFO is a U.S.-founded, technology-driven last-mile delivery carrier providing domestic delivery services for ecommerce platforms and brands. EasyPost supports GOFO through two account options: - **GOFO Wallet:** Use GOFO through an EasyPost Wallet without establishing a separate billing relationship with GOFO. Shipment charges are billed through EasyPost. - **GOFO BYOCA:** Connect an existing GOFO account to EasyPost using credentials provided by GOFO. Billing is handled directly by GOFO. This guide includes detailed information on utilizing GOFO BYOCA shipping with the EasyPost API, focusing on account setup, rates, label creation, tracking, and more. For operational details, shipment nuances, and frequently asked questions, refer to the GOFO/CIRRO E-Commerce Carrier Support & FAQs article. Related: - [GOFO/CIRRO E-Commerce Carrier Support & FAQs](https://support.easypost.com/hc/en-us/articles/44444262373389-GOFO-CIRRO-E-Commerce-Carrier-Support-FAQs) --- ## Carrier Account Setup ### Account Registration Sign up for an EasyPost account to obtain a **Test** and **Production** API key. See Authentication and Key Management for more information. > Note: Negotiated rates are only available in Production mode. ### Carrier Setup #### GOFO BYOCA Account Setup Use these steps when connecting an existing GOFO account with GOFO-provided credentials. Do not use the **EasyPost Wallet Carriers** tab for GOFO BYOCA setup. 1. Contact GOFO to request a shipper account. A representative will be in touch for additional details about the account. 2. Inform GOFO about using EasyPost's API for label purchases. 3. Acquire rates and align any additional shipping needs. 4. Obtain the following account credentials from GOFO: 1. `username` 2. `password` 5. On the EasyPost Dashboard, go to Account Settings > Carriers, select **Add Carrier**, and choose **GOFO BYOCA**. 6. Input carrier-specific credentials, then select the entry port closest to the shipment origin address. #### Supported Entry Ports - `ATL` — Atlanta, Georgia (Hartsfield-Jackson) - `CLT` — Charlotte, North Carolina - `DEN` — Denver, Colorado - `DFW` — Dallas / Fort Worth, Texas - `EWR` — Newark, New Jersey - `IAH` — Houston, Texas - `JFK` — New York City, New York - `LAX` — Los Angeles, California - `MIA` — Miami, Florida - `ORD` — Chicago, Illinois - `SEA` — Seattle, Washington - `SFO` — San Francisco, California - `SLC` — Salt Lake City, Utah #### GOFO BYOCA Account via API The API structure specified by EasyPost can also be used to add the GOFO carrier shipper account. ```shell curl -X POST https://api.easypost.com/v2/carrier_accounts \ -u "$EASYPOST_API_KEY": \ -H 'Content-Type: application/json' \ -d '{ "carrier_account": { "type": "GofoAccount", "description": "GofoAccount", "credentials": { "origin_hub": "VALUE", "password": "VALUE", "username": "VALUE" }, "test_credentials": { "origin_hub": "VALUE", "password": "VALUE", "username": "VALUE" } } }' ``` ### Software Requirements Download an EasyPost Client Library or utilize the REST API with cURL. ### Documentation Review Examine the EasyPost Objects section to understand the API's structure, which is critical for constructing requests and interpreting responses. Related: - [Getting Started Guide](https://docs.easypost.com/guides/getting-started) - [Manage Carrier Accounts](https://app.easypost.com/account/settings?tab=carriers) --- ## Billing Billing is directly handled by GOFO. EasyPost does not participate in the billing process for GOFO services. Contact a GOFO representative for details. Refer to the Help Center for more information about payment methods, wallet funding, or account billing. --- ## Rates GOFO BYOCA is a **Live Rating** integration, enabling real-time rate retrieval for shipments created via EasyPost. - When creating a shipment, EasyPost requests GOFO for shipment rates specific to the user's GOFO BYOCA account. - The rates provided are directly from GOFO and tailored to the user's specific account details. - In cases of discrepancies or incorrect rates, users are advised to contact their GOFO account representative. --- ## Service Levels Service levels are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=gofobyoca`. Related: - [Service Levels](https://docs.easypost.com/docs/shipments/rates#service-levels) ### Coverage Area and Parcel Limits GOFO provides shipping coverage within the United States. Customers must select the supported entry port closest to the shipment origin address when configuring the GOFO account. GOFO supports parcels up to 25 lbs in actual weight and 30 inches in length. GOFO's standard delivery days are Monday through Sunday, including public and local holidays. Standard delivery times are 6 a.m. to 11 p.m. ![Map indicating GOFO coverage area within the United States](https://docs.easypost.com/images/guides/gofo/gofo-coverage-map.png) Related: - [Service Levels and Parcels](https://docs.easypost.com/docs/shipments/rates#service-levels) --- ## Predefined Packages Predefined packages provide a convenient way to classify parcels using carrier-defined package types and retrieve applicable rates. When creating a shipment with the EasyPost API, select a predefined package that matches the parcel's characteristics and provide its weight in ounces when required. See the predefined package documentation for supported values and example requests. Predefined packages are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=gofobyoca`. Related: - [Predefined Packages](https://docs.easypost.com/docs/parcels#predefined-packages) --- ## Generating Shipping Labels With EasyPost, generating shipping labels for GOFO BYOCA is the same process as generating them for any other carrier. Review the Getting Started Guide for help generating a shipping label. ### One-Call Buys One-call buys enable streamlined label purchasing through the EasyPost API by consolidating multiple operations into a single API request. This feature is designed to simplify and accelerate the shipping process by combining the creation of a shipment, retrieval of rates, and purchasing the shipping label into one efficient step. See Reducing API Response Times for more information. ### Manifests Manifesting is not supported or required for GOFO BYOCA. ### Returns GOFO BYOCA does not support returns. ### Refunding and Voiding Labels GOFO supports refunding and voiding labels through the EasyPost API. ### Shipment Options GOFO assigns a merchant code that can optionally be provided using the `merchant_id` shipment option. Shipment options are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=gofobyoca`. Related: - [Shipment Options](https://docs.easypost.com/docs/shipments/options) #### Label Formats GOFO labels are available in PNG, ZPL, and PDF formats. Related: - [Shipment Documentation](https://docs.easypost.com/docs/shipments) --- ## Hazardous Materials (HAZMAT) GOFO does not support hazardous materials through the EasyPost integration. --- ## Pickups GOFO pickups cannot be scheduled via the EasyPost API. Contact GOFO directly to arrange pickups. --- ## Tracking EasyPost simplifies package tracking by offering two methods: - Tracking with an existing number and carrier. - Using a Tracker included with an EasyPost-purchased shipping label. The service integrates webhooks for timely shipment updates. For detailed information on tracking methods, visit the Tracking Guide. ### Proof of Delivery GOFO provides picture proof of delivery for all deliveries and makes up to three delivery attempts. Signature service is not currently available. Related: - [Trackers Documentation](https://docs.easypost.com/docs/trackers) - [Trackers Guide](https://docs.easypost.com/guides/tracking-guide) --- ## Additional Resources ### Carrier Metadata The Carrier Metadata endpoint can programmatically return information about service levels, predefined packages, supported features, and shipment options. Use this information to quickly integrate and make educated decisions about the mix of carriers for shipping needs. Additionally, the Carrier Metadata endpoint is available to retrieve comprehensive information about all carriers on the EasyPost platform, enhancing decision-making for carrier services. ### Support and Troubleshooting In addition to the guidance provided in the Carrier Guides, EasyPost offers support to assist with FAQs, troubleshooting issues, and inquiries related to the EasyPost platform. Visit the Help Center for more information. Related: - [Carrier Metadata](https://docs.easypost.com/docs/carrier-metadata) - [Help Center](https://support.easypost.com/hc/en-us) --- ## Talk to a Shipping Expert For questions about getting started with the EasyPost API please talk to a Shipping Expert or Contact Support. Related: - [Talk to a Shipping Expert](https://www.easypost.com/talk-to-easypost) - [Contact Support](https://support.easypost.com/hc/requests/new) --- Source: https://docs.easypost.com/carriers/gofo-wallet-guide # GOFO Wallet Guide GOFO is a U.S.-founded, technology-driven last-mile delivery carrier providing domestic delivery services for ecommerce platforms and brands. EasyPost supports GOFO through two account options: - **GOFO Wallet:** Use GOFO through an EasyPost Wallet without establishing a separate billing relationship with GOFO. Shipment charges are billed through EasyPost. - **GOFO BYOCA:** Connect an existing GOFO account to EasyPost using credentials provided by GOFO. Billing is handled directly by GOFO. This guide includes detailed information on utilizing GOFO Wallet shipping with the EasyPost API, focusing on account setup, rates, label creation, tracking, and more. For operational details, shipment nuances, and frequently asked questions, refer to the GOFO/CIRRO E-Commerce Carrier Support & FAQs article. Related: - [GOFO/CIRRO E-Commerce Carrier Support & FAQs](https://support.easypost.com/hc/en-us/articles/44444262373389-GOFO-CIRRO-E-Commerce-Carrier-Support-FAQs) --- ## Carrier Account Setup ### Account Registration Sign up for an EasyPost account to obtain a **Test** and **Production** API key. See Authentication and Key Management for more information. ### Carrier Setup #### GOFO Wallet Account Setup Use these steps if you want EasyPost-managed wallet billing and do not want to provide GOFO credentials. If you want to connect an existing GOFO account using GOFO-provided credentials with carrier-direct billing, use GOFO BYOCA instead. 1. Log in on the EasyPost Dashboard and navigate to **Account Settings**. 2. Select the **Carriers** tab. 3. Select the **EasyPost Wallet Carriers** tab. 4. Find GOFO in the list of carriers and select **Create Account**. 5. Select the entry port closest to the shipment origin address to complete the account creation process. #### Supported Entry Ports - `ATL` — Atlanta, Georgia (Hartsfield-Jackson) - `CLT` — Charlotte, North Carolina - `DEN` — Denver, Colorado - `DFW` — Dallas / Fort Worth, Texas - `EWR` — Newark, New Jersey - `IAH` — Houston, Texas - `JFK` — New York City, New York - `LAX` — Los Angeles, California - `MIA` — Miami, Florida - `ORD` — Chicago, Illinois - `SEA` — Seattle, Washington - `SFO` — San Francisco, California - `SLC` — Salt Lake City, Utah #### GOFO Wallet Account via API The API structure specified by EasyPost can also be used to add the GOFO Wallet carrier account. ```shell curl -X POST https://api.easypost.com/v2/carrier_accounts/open \ -u "$EASYPOST_API_KEY": \ -H 'Content-Type: application/json' \ -d '{ "carrier_account": { "type": "GofoWalletAccount", "description": "GofoWalletAccount", "credentials": { "origin_hub": "VALUE" }, "payment_mode": "aggregation" } }' ``` ### Software Requirements Download an EasyPost Client Library or utilize the REST API with cURL. ### Documentation Review Examine the EasyPost Objects section to understand the API's structure, which is critical for constructing requests and interpreting responses. Related: - [Getting Started Guide](https://docs.easypost.com/guides/getting-started) - [Manage Carrier Accounts](https://app.easypost.com/account/settings?tab=carriers) --- ## Billing Billing is handled through the EasyPost Wallet. Shipment charges are deducted directly from the customer's EasyPost Wallet. If GOFO determines that the shipment details differ from the information provided when the shipment was purchased, the shipment may be subject to a billing adjustment. Any resulting charge or credit is applied to the EasyPost Wallet. --- ## Rates GOFO is a **Live Rating** integration, enabling real-time rate retrieval for shipments created via EasyPost. Rates are specific to the GOFO Wallet account and are returned when rating an eligible shipment. --- ## Service Levels Service levels are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=gofowallet`. Related: - [Service Levels](https://docs.easypost.com/docs/shipments/rates#service-levels) ### Coverage Area and Parcel Limits GOFO provides shipping coverage within the United States. Customers must select the supported entry port closest to the shipment origin address when configuring the GOFO Wallet account. GOFO supports parcels up to 25 lbs in actual weight and 30 inches in length. GOFO's standard delivery days are Monday through Sunday, including public and local holidays. Standard delivery times are 6 a.m. to 11 p.m. ![Map indicating GOFO coverage area within the United States](https://docs.easypost.com/images/guides/gofo/gofo-coverage-map.png) Related: - [Service Levels and Parcels](https://docs.easypost.com/docs/shipments/rates#service-levels) --- ## Predefined Packages Predefined packages provide a convenient way to classify parcels using carrier-defined package types and retrieve applicable rates. When creating a shipment with the EasyPost API, select a predefined package that matches the parcel's characteristics and provide its weight in ounces when required. See the predefined package documentation for supported values and example requests. Predefined packages are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=gofowallet`. Related: - [Predefined Packages](https://docs.easypost.com/docs/parcels#predefined-packages) --- ## Generating Shipping Labels With EasyPost, generating shipping labels for GOFO is the same process as generating them for any other carrier. Review the Getting Started Guide for help generating a shipping label. ### One-Call Buys One-call buys enable streamlined label purchasing through the EasyPost API by consolidating multiple operations into a single API request. This feature is designed to simplify and accelerate the shipping process by combining the creation of a shipment, retrieval of rates, and purchasing the shipping label into one efficient step. See Reducing API Response Times for more information. ### Manifests Manifesting is not supported or required for GOFO. ### Returns GOFO does not support returns. ### Refunding and Voiding Labels GOFO supports refunding and voiding labels through the EasyPost API. ### Shipment Options GOFO assigns a merchant code that can optionally be provided using the `merchant_id` shipment option. Shipment options are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=gofowallet`. Related: - [Shipment Options](https://docs.easypost.com/docs/shipments/options) #### Label Formats GOFO labels are available in PNG, ZPL, and PDF formats. Related: - [Shipment Documentation](https://docs.easypost.com/docs/shipments) --- ## Hazardous Materials (HAZMAT) GOFO does not support hazardous materials through the EasyPost integration. --- ## Pickups GOFO pickups cannot be scheduled via the EasyPost API. To request a pickup, Contact Support. --- ## Tracking EasyPost simplifies package tracking by offering two methods: - Tracking with an existing number and carrier. - Using a Tracker included with an EasyPost-purchased shipping label. The service integrates webhooks for timely shipment updates. For detailed information on tracking methods, visit the Tracking Guide. ### Proof of Delivery GOFO provides picture proof of delivery for all deliveries and makes up to three delivery attempts. Signature service is not currently available. Related: - [Trackers Documentation](https://docs.easypost.com/docs/trackers) - [Trackers Guide](https://docs.easypost.com/guides/tracking-guide) --- ## Additional Resources ### Carrier Metadata The Carrier Metadata endpoint can programmatically return information about service levels, predefined packages, supported features, and shipment options. Use this information to quickly integrate and make educated decisions about the mix of carriers for shipping needs. Additionally, the Carrier Metadata endpoint is available to retrieve comprehensive information about all carriers on the EasyPost platform, enhancing decision-making for carrier services. ### Support and Troubleshooting In addition to the guidance provided in the Carrier Guides, EasyPost offers support to assist with FAQs, troubleshooting issues, and inquiries related to the EasyPost platform. Visit the Help Center for more information. Related: - [Carrier Metadata](https://docs.easypost.com/docs/carrier-metadata) - [Help Center](https://support.easypost.com/hc/en-us) --- ## Talk to a Shipping Expert For questions about getting started with the EasyPost API please talk to a Shipping Expert or Contact Support. Related: - [Talk to a Shipping Expert](https://www.easypost.com/talk-to-easypost) - [Contact Support](https://support.easypost.com/hc/requests/new) --- Source: https://docs.easypost.com/carriers/gori-guide # Gori Company dba ShipBae Guide Gori Company dba ShipBae is a special carrier available through EasyPost that provides access to USPS Global Direct Entry (GDE) rates for international USPS shipments. This partnership enables shippers to benefit from faster customs clearance and delivery times, cost savings on shipping and logistics, expanded global market reach, and improved reliability and compliance. The GDE program is particularly advantageous for ecommerce businesses, exporters, and high-volume international shippers seeking to streamline their cross-border operations through EasyPost's unified shipping API. After using EasyPost to print Gori shipments, customers utilize a first-mile freight carrier to transport palletized Gori shipments into the United States. Once customs clearance is complete, the shipments are distributed throughout the United States using the USPS network. This guide provides detailed information on utilizing Gori shipping with the EasyPost API, covering account setup, rates, label creation, manifests, tracking, and more. For operational details, shipment nuances, and frequently asked questions, refer to the Gori Company dba ShipBae Carrier Support and FAQs article. Related: - [Gori Company dba ShipBae Carrier Support and FAQs](https://support.easypost.com/hc/en-us/articles/40386448124941-Gori-Carrier-Support-and-FAQs) --- ## Carrier Account Setup ### Account Registration Sign up for an EasyPost account to obtain a **Test** and **Production** API key. See Authentication and Key Management for more information. > Note: Negotiated rates are only available in Production mode. ### Carrier Setup #### Gori Shipper Account Registration 1. To register for a Gori shipping account, sign up through Shipbae—the official registration portal for Gori. 2. Inform Gori about using EasyPost's API for label purchases. 3. Acquire rates and align any additional shipping needs. 4. Obtain the following account credentials: 1. `client_id` 2. `client_secret` 5. Input carrier-specific credentials within the EasyPost Carrier Account Dashboard for comprehensive rate access. #### Gori Account via API The API structure specified by EasyPost can also be used to add the Gori carrier account. ```shell curl -X POST https://api.easypost.com/v2/carrier_accounts \ -u "$EASYPOST_API_KEY": \ -H 'Content-Type: application/json' \ -d '{ "carrier_account": { "type": "GoriAccount", "description": "GoriAccount", "credentials": { "client_id": "VALUE", "client_secret": "VALUE" }, "test_credentials": { "client_id": "VALUE", "client_secret": "VALUE" } } }' ``` ### Software Requirements Download an EasyPost Client Library or utilize the REST API with cURL. ### Documentation Review Examine the EasyPost Objects section to understand the API's structure, which is critical for constructing requests and interpreting responses. Related: - [Getting Started Guide](https://docs.easypost.com/guides/getting-started) - [Manage Carrier Accounts](https://app.easypost.com/account/settings?tab=carriers) --- ## Billing All Gori shipments purchased through EasyPost are billed by Gori in USD. Contact Gori for specific invoicing procedures. Refer to the Help Center for more information about payment methods, wallet funding, or account billing. --- ## Rates Gori is a **Live Rating** integration, enabling real-time rate retrieval for shipments created via EasyPost. - When creating a shipment, EasyPost requests Gori for shipment rates specific to the user's Gori account. - The rates provided are directly from Gori and tailored to the user's specific account details. - In cases of discrepancies or incorrect rates, users are advised to contact their Gori account representative. --- ## Service Levels Gori offers the following service levels: Service levels are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=gori`. Related: - [Service Levels](https://docs.easypost.com/docs/shipments/rates#service-levels) --- ## Predefined Packages Predefined packages provide a convenient way to classify parcels using carrier-defined package types and retrieve applicable rates. When creating a shipment with the EasyPost API, select a predefined package that matches the parcel's characteristics and provide its weight in ounces when required. See the predefined package documentation for supported values and example requests. Predefined packages are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=gori`. Related: - [Predefined Packages](https://docs.easypost.com/docs/parcels#predefined-packages) --- ## Generating Shipping Labels With EasyPost, generating shipping labels for Gori is the same process as generating them for any other carrier. Review the Getting Started Guide for help generating a shipping label. ### One-Call Buys One-call buys enable streamlined label purchasing through the EasyPost API by consolidating multiple operations into a single API request. This feature is designed to simplify and accelerate the shipping process by combining the creation of a shipment, retrieval of rates, and purchasing the shipping label into one efficient step. See Reducing API Response Times for more information. ### Manifests Gori supports API synchronous manifesting and automatic manifesting. - If a shipment is not manifested through the API, an auto manifest will occur at midnight Central Time on the ship date of the shipment. - If packages are inducted into the mail stream before API or auto manifesting has occurred, they could be returned or incur an unmanifested fee. ### Returns Gori supports return labels through the EasyPost API with the `usps_ground_advantage` and `usps_priority` service levels. To create a return label, set `is_return` to `true` when creating the Shipment. Keep the original `to_address` and `from_address`; EasyPost swaps them before sending the request to Gori. ### Refunding and Voiding Labels Voiding Gori labels through EasyPost is supported. ### Shipment Options Shipment options are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=gori`. Related: - [Shipment Options](https://docs.easypost.com/docs/shipments/options) Gori supports a few shipment options via the EasyPost API. For complete details see: Gori Carrier Support and FAQs. #### Label Formats EasyPost offers Gori labels in ZPL, PNG, and PDF formats. Related: - [Shipment Documentation](https://docs.easypost.com/docs/shipments) - [Gori Support and FAQs](https://support.easypost.com/hc/en-us/articles/40386448124941-Gori-Carrier-Support-and-FAQs) --- ## Hazardous Materials (HAZMAT) The Gori policy on hazardous materials is not explicitly detailed in this guide. Shippers are advised to contact Gori directly for hazmat inquiries. --- ## Pickups Due to the Gori shipping flow, pickups are not available and **cannot be scheduled via the EasyPost API.** --- ## Tracking EasyPost simplifies package tracking by offering two methods: - Tracking with an existing number and carrier. - Using a Tracker included with an EasyPost-purchased shipping label. The service integrates webhooks for timely shipment updates. For detailed information on tracking methods, visit the Tracking Guide. Related: - [Trackers Documentation](https://docs.easypost.com/docs/trackers) - [Trackers Guide](https://docs.easypost.com/guides/tracking-guide) --- ## Additional Resources ### Carrier Metadata The Carrier Metadata endpoint can programmatically return information about service levels, predefined packages, supported features, and shipment options. Use this information to quickly integrate and make educated decisions about the mix of carriers for shipping needs. Additionally, the Carrier Metadata endpoint is available to retrieve comprehensive information about all carriers on the EasyPost platform, enhancing decision-making for carrier services. ### Support and Troubleshooting In addition to the guidance provided in the Carrier Guides, EasyPost offers support to assist with FAQs, troubleshooting issues, and inquiries related to the EasyPost platform. Visit the Help Center for more information. Related: - [Carrier Metadata](https://docs.easypost.com/docs/carrier-metadata) - [Help Center](https://support.easypost.com/hc/en-us) --- ## Talk to a Shipping Expert For questions about getting started with the EasyPost API please talk to a Shipping Expert or Contact Support. Related: - [Talk to a Shipping Expert](https://www.easypost.com/talk-to-easypost) - [Contact Support](https://support.easypost.com/hc/requests/new) --- Source: https://docs.easypost.com/carriers/hailify-guide # Hailify Guide Hailify leverages on-demand driver fleets, utilizing their downtime to offer last-mile delivery gigs. This innovative approach helps to keep drivers earning and provides retailers and brands with cost-effective, sustainable, and reliable shipping options, including a next-day delivery service for as low as $4 per drop. This guide includes detailed information on utilizing Hailify shipping with the EasyPost API, focusing on account setup, rates, label creation, manifests, tracking, and more. --- ## Carrier Account Setup ### Account Registration Sign up for an EasyPost account to obtain a **Test** and **Production** API key. See Authentication and Key Management for more information. > Note: Negotiated rates are only available in Production mode. ### Carrier Setup Upon sign-up with EasyPost, users gain immediate access to Wallet Carrier Accounts, which can be enabled directly from the Dashboard. For additional carriers, EasyPost supports a Bring Your Own Carrier Account (BYOCA) option. This requires users to register directly with the respective carrier. #### Hailify Shipper Account Registration 1. Contact Hailify to request a shipper account. A representative will be in touch for additional details regarding the account. 2. Inform Hailify about using EasyPost's API for label purchases. 3. Acquire rates and align any additional shipping needs. 4. Obtain Hailify account credentials: 1. Production Hailify Partner ID 2. Test Hailify Partner ID 5. Input carrier-specific credentials on the Carrier Account Dashboard for comprehensive rate access. #### Hailify Account via API The API structure specified by EasyPost can also be used to add the Hailify carrier shipper account. ```shell curl -X POST https://api.easypost.com/v2/carrier_accounts \ -u "$EASYPOST_API_KEY": \ -H 'Content-Type: application/json' \ -d '{ "carrier_account": { "type": "HailifyAccount", "description": "HailifyAccount", "credentials": { "partner_id": "VALUE" }, "test_credentials": { "partner_id": "VALUE" } } }' ``` ### Software Requirements Download an EasyPost Client Library or utilize the REST API with cURL. ### Documentation Review Examine the EasyPost Objects section to understand the API's structure, which is critical for constructing requests and interpreting responses. Related: - [Getting Started Guide](https://docs.easypost.com/guides/getting-started) - [Manage Carrier Accounts](https://app.easypost.com/account/settings?tab=carriers) --- ## Billing Billing is directly handled by Hailify. EasyPost does not participate in the billing process for Hailify services. Contact a Hailify representative for details. --- ## Rates Hailify is a **Live Rating** integration, enabling real-time rate retrieval for shipments created via EasyPost. Rates are guaranteed valid for a minimum of 5 minutes. - When creating a shipment, EasyPost requests Hailify for shipment rates specific to the user's Hailify account. - The rates provided are directly from Hailify and tailored to the user's specific account details. - In cases of discrepancies or incorrect rates, users are advised to contact their Hailify account representative. - The representative can then update the rates in Hailify's database to ensure user account accuracy. --- ## Service Levels Hailify delivers 7 days per week, excluding holidays, and offers the following service: Service levels are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=hailify`. Related: - [Service Levels](https://docs.easypost.com/docs/shipments/rates#service-levels) ### Coverage Area and Hubs Hailify supports next-day delivery for shipments within the following core markets: Los Angeles, Dallas, Chicago, New York, New Jersey, and Philadelphia. The service operates out of 5 shipping hubs across the nation. ![Map indicating Hailify coverage area](https://docs.easypost.com/images/guides/hailify/hailify-coverage-map.png) Related: - [Hailify Service Levels](https://docs.easypost.com/docs/shipments/rates?carrier=Hailify#service-levels) --- ## Predefined Packages Predefined packages provide a convenient way to classify parcels using carrier-defined package types and retrieve applicable rates. When creating a shipment with the EasyPost API, select a predefined package that matches the parcel's characteristics and provide its weight in ounces when required. See the predefined package documentation for supported values and example requests. Predefined packages are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=hailify`. Related: - [Predefined Packages](https://docs.easypost.com/docs/parcels#predefined-packages) --- ## Generating Shipping Labels With EasyPost, the process for generating shipping labels for Hailify is the same as generating them for any other carrier. Review the Getting Started Guide for help generating a shipping label. ### Manifests Manifesting is not supported or required for Hailify. ### Returns Returns are not supported. ### Refunding and Voiding Labels Voiding Hailify labels through EasyPost is supported. ### Shipment Options Shipment options are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=hailify`. Related: - [Shipment Options](https://docs.easypost.com/docs/shipments/options) #### Label Formats EasyPost offers native Hailify labels PDF and ZPL formats. If a PNG label is needed, EasyPost requests a PDF label from Hailify then converts it to a PNG label. Related: - [Shipment Documentation](https://docs.easypost.com/docs/shipments) --- ## Hazardous Materials (HAZMAT) Hailify's policy on hazardous materials is not explicitly detailed. Shippers are advised to contact Hailify directly for specific guidelines and compliance requirements. --- ## Pickups Hailify accommodates pickups based on individual agreements with customers. While regular pickups can be arranged directly with Hailify during the account registration process, they cannot be scheduled via the EasyPost API. --- ## Tracking EasyPost simplifies package tracking by offering two methods: - Tracking with an existing number and carrier. - Using a Tracker included with an EasyPost-purchased shipping label. The service integrates webhooks for timely shipment updates. For detailed information on tracking methods, visit the Tracking Guide. Related: - [Trackers Documentation](https://docs.easypost.com/docs/trackers) - [Trackers Guide](https://docs.easypost.com/guides/tracking-guide) --- ## Additional Resources ### Carrier Metadata The Carrier Metadata endpoint can programmatically return information about Hailify service levels, predefined packages, supported features, and shipment options. Use this information to quickly integrate with Hailify and make educated decisions about the mix of carriers for shipping needs. Additionally, the Carrier Metadata endpoint is available to retrieve comprehensive information about all carriers on the EasyPost platform, enhancing decision-making for carrier services. ### Support and Troubleshooting In addition to the guidance provided in the Carrier Guides, EasyPost offers support to assist with FAQs, troubleshooting issues, and inquiries related to the EasyPost platform. Visit the Help Center for more information. Related: - [Carrier Metadata](https://docs.easypost.com/docs/carrier-metadata) - [Help Center](https://support.easypost.com/hc/en-us) --- ## Talk to a Shipping Expert For questions about getting started with the EasyPost API please talk to a Shipping Expert or Contact Support. Related: - [Talk to a Shipping Expert](https://www.easypost.com/talk-to-easypost) - [Contact Support](https://support.easypost.com/hc/requests/new) --- Source: https://docs.easypost.com/carriers/henry-industries-guide # Henry Industries Guide Henry Industries is a full-service nationwide solutions provider for distribution centers, warehouses, and logistic needs. They have combined the latest distribution, warehouse, and logistic technology with professionals who understand the importance of accuracy and timeliness. This guide includes detailed information on utilizing Henry Industries with the EasyPost API, focusing on account setup, rates, label creation, manifests, tracking, and more. --- ## Carrier Account Setup ### Account Registration Sign up for an EasyPost account to obtain a **Test** and **Production** API key. See Authentication and Key Management for more information. > Note: Negotiated rates are only available in Production mode. ### Carrier Setup Upon sign-up with EasyPost, users gain immediate access to Wallet Carrier Accounts, which can be enabled directly from the Dashboard. For additional carriers, EasyPost supports a Bring Your Own Carrier Account (BYOCA) option. This requires users to register directly with the respective carrier. #### Henry Industries Shipper Account Registration 1. Contact Henry Industries to request a shipper account. A representative will be in touch for additional details regarding the account. 2. Inform Henry Industries about using EasyPost's API for label purchases. 3. Acquire rates and align any additional shipping needs. 4. Obtain the following test and production account credentials:: 1. Henry username 2. Henry password 5. Input carrier-specific credentials within the EasyPost Carrier Account Dashboard for comprehensive rate access. #### Henry Industries Account via API The API structure specified by EasyPost can also be used to add the Henry Industries carrier shipper account. ```shell curl -X POST https://api.easypost.com/v2/carrier_accounts \ -u "$EASYPOST_API_KEY": \ -H 'Content-Type: application/json' \ -d '{ "carrier_account": { "type": "HenryAccount", "description": "HenryAccount", "credentials": { "password": "VALUE", "username": "VALUE" }, "test_credentials": { "password": "VALUE", "username": "VALUE" } } }' ``` ### Software Requirements Download an EasyPost Client Library or utilize the REST API with cURL. ### Documentation Review Examine the EasyPost Objects section to understand the API's structure, which is critical for constructing requests and interpreting responses. Related: - [Getting Started Guide](https://docs.easypost.com/guides/getting-started) - [Manage Carrier Accounts](https://app.easypost.com/account/settings?tab=carriers) --- ## Billing Henry Industries directly handles billing after parcel delivery. EasyPost does not participate in the billing process for Henry Industries services. Contact a Henry Industries account representative for details. --- ## Rates Henry Industries is a **Live Rating** integration, enabling real-time rate retrieval for shipments created via EasyPost. Rates are guaranteed valid for a minimum of five minutes. - When creating a shipment, EasyPost requests Henry Industries for shipment rates specific to the user's Henry Industries account. - The rates provided are directly from Henry Industries and tailored to the user's specific account details. - In cases of discrepancies or incorrect rates, users are advised to contact their Henry Industries account representative. - The representative can then update the rates to ensure user account accuracy. --- ## Service Levels Henry Industries offers the following services: Service levels are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=henry`. Related: - [Service Levels](https://docs.easypost.com/docs/shipments/rates#service-levels) ### Henry Industries Market Locations ![Map indicating Henry Industries market locations](https://docs.easypost.com/images/guides/henry/henry-industries-market-locations.png) Related: - [Henry Industries Service Levels](https://docs.easypost.com/docs/shipments/rates?carrier=henry#service-levels) --- ## Predefined Packages Predefined packages provide a convenient way to classify parcels using carrier-defined package types and retrieve applicable rates. When creating a shipment with the EasyPost API, select a predefined package that matches the parcel's characteristics and provide its weight in ounces when required. See the predefined package documentation for supported values and example requests. Predefined packages are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=henry`. Related: - [Predefined Packages](https://docs.easypost.com/docs/parcels#predefined-packages) --- ## Generating Shipping Labels With EasyPost, generating shipping labels for Henry Industries is the same process as generating them for any other carrier. Review the Getting Started Guide for help generating a shipping label. ### One-Call Buys 1-call buys enable streamlined label purchasing through the EasyPost API by consolidating multiple operations into a single API request. This feature is designed to simplify and accelerate the shipping process by combining the creation of a shipment, retrieval of rates, and purchasing the shipping label into one efficient step. See Reducing API Response Times for more information. ### Manifests Manifesting is **not** supported or required for Henry Industries. ### Returns Henry Industries does **not** provide a separate service for returns. Any shipments will be subject to regular pricing. ### Refunding and Voiding Labels Voiding Henry Industries labels through EasyPost is supported. > Note: The **shipment.tracking_code** is required as it identifies the order within the carrier's system. The **Refund** button in the EasyPost dashboard, or the **/refund** endpoint accessible through the API, allows for voiding unused Henry Industries labels. See Refund a Shipment for more information. ### Shipment Options Shipment options are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=henry`. Related: - [Shipment Options](https://docs.easypost.com/docs/shipments/options) #### Label Formats EasyPost offers native Henry Industries labels in PNG, ZPL, and PDF formats. Related: - [Shipment Documentation](https://docs.easypost.com/docs/shipments) - [Reducing API Response Times](https://support.easypost.com/hc/en-us/articles/360048825772-Reducing-API-Response-Times) --- ## Hazardous Materials (HAZMAT) The Henry Industries policy on hazardous materials is not explicitly detailed in this guide. Shippers are advised to contact Henry Industries directly for specific hazmat inquiries. --- ## Pickups Henry Industries accommodates pickups based on individual agreements with customers. While regular pickups can be arranged directly with Henry Industries during the account registration process, they **cannot be scheduled via the EasyPost API**. --- ## Tracking EasyPost simplifies package tracking by offering two methods: - Tracking with an existing number and carrier. - Using a Tracker included with an EasyPost-purchased shipping label. The service integrates webhooks for timely shipment updates. For detailed information on tracking methods, visit the Tracking Guide. Related: - [Trackers Documentation](https://docs.easypost.com/docs/trackers) - [Trackers Guide](https://docs.easypost.com/guides/tracking-guide) --- ## Additional Resources ### Carrier Metadata The Carrier Metadata endpoint can programmatically return information about service levels, predefined packages, supported features, and shipment options. Use this information to quickly integrate and make educated decisions about the mix of carriers for shipping needs. Additionally, the Carrier Metadata endpoint is available to retrieve comprehensive information about all carriers on the EasyPost platform, enhancing decision-making for carrier services. ### Support and Troubleshooting In addition to the guidance provided in the Carrier Guides, EasyPost offers support to assist with FAQs, troubleshooting issues, and inquiries related to the EasyPost platform. Visit the Help Center for more information. Related: - [Carrier Metadata](https://docs.easypost.com/docs/carrier-metadata) - [Help Center](https://support.easypost.com/hc/en-us) --- ## Talk to a Shipping Expert For questions about getting started with the EasyPost API please talk to a Shipping Expert or Contact Support. Related: - [Talk to a Shipping Expert](https://www.easypost.com/talk-to-easypost) - [Contact Support](https://support.easypost.com/hc/requests/new) --- Source: https://docs.easypost.com/carriers/interlink-express-guide # Interlink Express Guide Interlink Express is a prominent parcel delivery service and part of Geopost, renowned for its commitment to reliability and customer service. As a member of one of Europe's leading logistics networks, Interlink Express offers a wide range of domestic and international shipping solutions. This guide includes detailed information on utilizing Interlink Express shipping with the EasyPost API, focusing on account setup, rates, label creation, manifests, tracking, and more. > Note: Interlink Express is now part of **DPD UK**. Any references to Interlink Express within this guide will redirect to **DPD UK** as they are now part of the same company under the **Geopost** umbrella. --- ## Carrier Account Setup ### Account Registration Sign up for an EasyPost account to obtain a **Test** and **Production** API key. See Authentication and Key Management for more information. > Note: Negotiated rates are only available in Production mode. ### Carrier Setup #### Interlink Express Shipper Account Registration 1. Contact Interlink Express to request a shipper account. A representative will be in touch for additional details regarding the account. 2. Inform Interlink Express about using EasyPost's API for label purchases. 3. Acquire rates and align any additional shipping needs. 4. Obtain the following production and test credentials: 1. Interlink Express Account Number 2. Interlink Express Password 3. Interlink Express Username 4. VAT Number 5. Input carrier-specific credentials within the EasyPost Carrier Account Dashboard for comprehensive rate access. #### Interlink Express Account via API The API structure specified by EasyPost can also be used to add the Interlink Express carrier shipper account. ```shell curl -X POST https://api.easypost.com/v2/carrier_accounts \ -u "$EASYPOST_API_KEY": \ -H 'Content-Type: application/json' \ -d '{ "carrier_account": { "type": "InterlinkExpressAccount", "description": "InterlinkExpressAccount", "credentials": { "account_number": "VALUE", "password": "VALUE", "username": "VALUE", "vat_number": "VALUE" } } }' ``` ### Software Requirements Download an EasyPost Client Library or utilize the REST API with cURL. ### Documentation Review Examine the EasyPost Objects section to understand the API's structure, which is critical for constructing requests and interpreting responses. Related: - [Getting Started Guide](https://docs.easypost.com/guides/getting-started) - [Manage Carrier Accounts](https://app.easypost.com/account/settings?tab=carriers) --- ## Billing - Interlink Express will charge the appropriate amount for postage via their billing system. --- ## Rates When integrating an Interlink Express account with EasyPost, users should be aware of how rates are managed and displayed. Here's a breakdown of key points: ### Default Rate Display - EasyPost initially returns a $0.01 rate for shipments once the Interlink Express account is set up. ### Rate Card - Interlink Express representatives provide rate cards detailing expected costs based on shipment parameters (package size, weight, location, etc.). - Acquiring this custom rate card from Interlink Express is crucial, as EasyPost is not automatically privy to these rates. ### Rate Card Integration Once the rate card is received from Interlink Express, users should contact support@easypost.com for assistance installing this rate card into their account. --- ## Service Levels Interlink Express offers the following services: Service levels are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=interlinkexpress`. Related: - [Service Levels](https://docs.easypost.com/docs/shipments/rates#service-levels) Related: - [Interlink Express Service Levels](https://docs.easypost.com/docs/shipments/rates?carrier=interlinkexpress#service-levels) ### Ship2Shop Interlink Express supports Ship2Shop, a convenient option that allows customers to pick up their parcels at designated pickup locations. Specific details must be set in the shipment creation process to use this service. - **Buyer Address:** The `buyer_address` field must be populated with the end customer's details, including a phone number and email to facilitate communication regarding pickup instructions. - **Carrier Facility:** The `carrier_facility` field to specify the Ship2Shop pickup location code. #### Important Notes - **Contact Information:** Ensure the phone number and email are included in the `buyer_address` to contact the customer with pickup instructions. - **Location Codes:** EasyPost does not provide support for looking up location codes by zip code or latitude/longitude; customers must obtain these location codes from Interlink Express. - **Label Override:** When using the Ship2Shop service, Interlink Express will override the address on the label with the address corresponding to the provided location code. Ensure the location code is correct to prevent misrouting. ![Interlink Express Ship2Shop Label Example](https://docs.easypost.com/images/guides/dpduk/dpduk-ship-2-shop-label-example.png) --- ## Predefined Packages Predefined packages provide a convenient way to classify parcels using carrier-defined package types and retrieve applicable rates. When creating a shipment with the EasyPost API, select a predefined package that matches the parcel's characteristics and provide its weight in ounces when required. See the predefined package documentation for supported values and example requests. Predefined packages are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=interlinkexpress`. Related: - [Predefined Packages](https://docs.easypost.com/docs/parcels#predefined-packages) --- ## Generating Shipping Labels With EasyPost, generating shipping labels for Interlink Express is the same process as generating them for any other carrier. Review the Getting Started Guide for help generating a shipping label. ### One-Call Buys One-call buys enable streamlined label purchasing through the EasyPost API by consolidating multiple operations into a single API request. This feature is designed to simplify and accelerate the shipping process by combining the creation of a shipment, retrieval of rates, and purchasing the shipping label into one efficient step. See Reducing API Response Times for more information. ### Manifests Manifesting is **not** supported or required. ### Refunding and Voiding Labels Voiding Interlink Express labels through EasyPost is **not** supported. ### Shipment Options Shipment options are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=interlinkexpress`. Related: - [Shipment Options](https://docs.easypost.com/docs/shipments/options) #### Label Formats EasyPost offers native Interlink Express labels in EPL, ZPL, PNG, and PDF formats. ### Incoterm (DDP) Behavior Interlink Express requires the non-standard incoterm value DT1 to indicate that the sender pays duties and taxes. - `DT1`: Sender pays duties and taxes (equivalent to `DDP`) - `DAP`: Receiver pays duties and taxes The standard incoterm `DDP` is not supported and will result in an error if passed directly in `customs_info.incoterm`. > Note: This behavior is specific to Interlink Express and differs from other carriers that support `DDP` directly. ### Tax Identifiers Interlink Express does not support passing EORI or VAT numbers through `shipment.tax_identifiers`. For international shipments that require EORI or VAT numbers, provide the values using the applicable `from_address` or `to_address` fields: `state_tax_id`: EORI number `federal_tax_id`: VAT number > Note: This behavior is specific to Interlink Express and differs from carriers that support tax identifiers through `shipment.tax_identifiers`. ### Shipments Between UK and Ireland Interlink Express supports the Windsor Framework requirements set forth by the UK when shipments between the UK and Ireland meet certain criteria. Refer to Interlink Express or the GOV.UK websites for information about specific shipping needs. Interlink Express supports the following specialized fields to support the Windsor Framework: - `shipment.options.ukims_at_risk`: A declaration by the shipper indicating whether the goods in the package are at risk of entering the EU. Possible values: - "YES" - “NO” - `shipment.options.ukims_is_business`: A declaration by the shipper indicating whether or not the consignee is a business. Possible values: - "YES" - “NO” Related: - [Shipment Documentation](https://docs.easypost.com/docs/shipments) - [Reducing API Response Times](https://support.easypost.com/hc/en-us/articles/360048825772-Reducing-API-Response-Times) --- ## Hazardous Materials (HAZMAT) The Interlink Express policy on hazardous materials is not explicitly detailed in this guide. Shippers are advised to contact Interlink Express directly for specific hazmat inquiries. --- ## Pickups Interlink Express accommodates pickups based on individual agreements with customers. While regular pickups can be arranged directly with Interlink Express during the account registration process, they **cannot be scheduled via the EasyPost API**. --- ## Tracking EasyPost simplifies package tracking by offering two methods: - Tracking with an existing number and carrier. - Using a Tracker included with an EasyPost-purchased shipping label. The service integrates webhooks for timely shipment updates. For detailed information on tracking methods, visit the Tracking Guide. Related: - [Trackers Documentation](https://docs.easypost.com/docs/trackers) - [Trackers Guide](https://docs.easypost.com/guides/tracking-guide) --- ## Additional Resources ### Carrier Metadata The Carrier Metadata endpoint can programmatically return information about service levels, predefined packages, supported features, and shipment options. Use this information to quickly integrate and make educated decisions about the mix of carriers for shipping needs. Additionally, the Carrier Metadata endpoint is available to retrieve comprehensive information about all carriers on the EasyPost platform, enhancing decision-making for carrier services. ### Support and Troubleshooting In addition to the guidance provided in the Carrier Guides, EasyPost offers support to assist with FAQs, troubleshooting issues, and inquiries related to the EasyPost platform. Visit the Help Center for more information. Related: - [Carrier Metadata](https://docs.easypost.com/docs/carrier-metadata) - [Help Center](https://support.easypost.com/hc/en-us) --- ## Talk to a Shipping Expert For questions about getting started with the EasyPost API please talk to a Shipping Expert or Contact Support. Related: - [Talk to a Shipping Expert](https://www.easypost.com/talk-to-easypost) - [Contact Support](https://support.easypost.com/hc/requests/new) --- Source: https://docs.easypost.com/carriers/jet-transportation-guide # Jet Transportation Guide Jet Transportation, based in New Jersey, offers freight and logistics services tailored to meet the demands of regional and national delivery needs. With a focus on efficiency and customer satisfaction, Jet Transportation provides a robust solution for businesses seeking dependable transportation solutions. This guide includes detailed information on utilizing Jet Transportation shipping with the EasyPost API, focusing on account setup, rates, label creation, manifests, tracking, and more. --- ## Carrier Account Setup ### Account Registration Sign up for an EasyPost account to obtain a **Test** and **Production** API key. See Authentication and Key Management for more information. > Note: Negotiated rates are only available in Production mode. ### Carrier Setup Upon sign-up with EasyPost, users gain immediate access to Wallet Carrier Accounts, which can be enabled directly from the Dashboard. For additional carriers, EasyPost supports a Bring Your Own Carrier Account (BYOCA) option. This requires users to register directly with the respective carrier. #### Jet Transportation Account Registration 1. Call Jet Transportation at (800)225-5538 to request a shipper account. 2. Inform Jet Transportation about using EasyPost's API for label purchases. 3. Acquire rates and align any additional shipping needs. 4. Obtain the following test and production account credentials:: 1. Jet Username 2. Jet Password 5. Input carrier-specific credentials within the EasyPost Carrier Account Dashboard for comprehensive rate access. #### Jet Transportation via API The API structure specified by EasyPost can also be used to add the Jet Transportation carrier shipper account. ```shell curl -X POST https://api.easypost.com/v2/carrier_accounts \ -u "$EASYPOST_API_KEY": \ -H 'Content-Type: application/json' \ -d '{ "carrier_account": { "type": "JetAccount", "description": "JetAccount", "credentials": { "password": "VALUE", "username": "VALUE" }, "test_credentials": { "password": "VALUE", "username": "VALUE" } } }' ``` ### Software Requirements Download an EasyPost Client Library or utilize the REST API with cURL. ### Documentation Review Examine the EasyPost Objects section to understand the API's structure, which is critical for constructing requests and interpreting responses. Related: - [Getting Started Guide](https://docs.easypost.com/guides/getting-started) - [Manage Carrier Accounts](https://app.easypost.com/account/settings?tab=carriers) --- ## Billing When using a Jet Transportation BYOCA, shipment charges are billed under the shipper's own Jet Transportation account. --- ## Rates Jet Transportation is a **Live Rating** integration, enabling real-time rate retrieval for shipments created via EasyPost. Rates are guaranteed valid for a minimum of five minutes. - When creating a shipment, EasyPost requests Jet Transportation for shipment rates specific to the user's Jet Transportation account. - In cases of discrepancies or incorrect rates, users are advised to contact their Jet Transportation account representative. - The representative can then update the rates to ensure user account accuracy. --- ## Service Levels Jet Transportation offers the following service levels: Service levels are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=jet`. Related: - [Service Levels](https://docs.easypost.com/docs/shipments/rates#service-levels) Related: - [Jet Transportation Service Levels](https://docs.easypost.com/docs/shipments/rates?carrier=jet#service-levels) --- ## Predefined Packages Predefined packages provide a convenient way to classify parcels using carrier-defined package types and retrieve applicable rates. When creating a shipment with the EasyPost API, select a predefined package that matches the parcel's characteristics and provide its weight in ounces when required. See the predefined package documentation for supported values and example requests. Predefined packages are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=jet`. Related: - [Predefined Packages](https://docs.easypost.com/docs/parcels#predefined-packages) --- ## Generating Shipping Labels With EasyPost, generating shipping labels for Jet Transportation is the same process as generating them for any other carrier. Review the Getting Started Guide for help generating a shipping label. ### Manifests Manifesting is **not** supported or required for Jet Transportation. ### Refunding and Voiding Labels Voiding Jet Transportation labels through EasyPost is supported. ### Shipment Options Shipment options are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=jet`. Related: - [Shipment Options](https://docs.easypost.com/docs/shipments/options) #### Label Formats EasyPost offers native Jet Transportation labels in PNG, ZPL, and PDF formats. Related: - [Shipment Documentation](https://docs.easypost.com/docs/shipments) - [Reducing API Response Times](https://support.easypost.com/hc/en-us/articles/360048825772-Reducing-API-Response-Times) --- ## Hazardous Materials (HAZMAT) The Jet Transportation policy on hazardous materials is not explicitly detailed in this guide. Shippers are advised to contact Jet Transportation directly for specific hazmat inquiries. --- ## Pickups Jet Transportation accommodates pickups based on individual agreements with customers. While regular pickups can be arranged directly with Jet Transportation during the account registration process, they **cannot be scheduled via the EasyPost API**. --- ## Tracking EasyPost simplifies package tracking by offering two methods: - Tracking with an existing number and carrier. - Using a Tracker included with an EasyPost-purchased shipping label. The service integrates webhooks for timely shipment updates. For detailed information on tracking methods, visit the Tracking Guide. Related: - [Trackers Documentation](https://docs.easypost.com/docs/trackers) - [Trackers Guide](https://docs.easypost.com/guides/tracking-guide) --- ## Additional Resources ### Carrier Metadata The Carrier Metadata endpoint can programmatically return information about service levels, predefined packages, supported features, and shipment options. Use this information to quickly integrate and make educated decisions about the mix of carriers for shipping needs. Additionally, the Carrier Metadata endpoint is available to retrieve comprehensive information about all carriers on the EasyPost platform, enhancing decision-making for carrier services. ### Support and Troubleshooting In addition to the guidance provided in the Carrier Guides, EasyPost offers support to assist with FAQs, troubleshooting issues, and inquiries related to the EasyPost platform. Visit the Help Center for more information. Related: - [Carrier Metadata](https://docs.easypost.com/docs/carrier-metadata) - [Help Center](https://support.easypost.com/hc/en-us) --- ## Talk to a Shipping Expert For questions about getting started with the EasyPost API please talk to a Shipping Expert or Contact Support. Related: - [Talk to a Shipping Expert](https://www.easypost.com/talk-to-easypost) - [Contact Support](https://support.easypost.com/hc/requests/new) --- Source: https://docs.easypost.com/carriers/jitsu-guide # Jitsu Guide Jitsu, formerly known as AxleHire, is a last-mile delivery service that helps numerous brands meet and exceed customer expectations. This guide includes detailed information on utilizing Jitsu shipping with the EasyPost API, focusing on account setup, rates, label creation, manifests, tracking, and more. For operational details, shipment nuances, and frequently asked questions, refer to the Jitsu Carrier Support and FAQs article. Related: - [Jitsu Carrier Support and FAQs](https://support.easypost.com/hc/en-us/articles/40904451001357-Jitsu-Carrier-Support-and-FAQs) --- ## Carrier Account Setup ### Account Registration Sign up for an EasyPost account to obtain a **Test** and **Production** API key. See Authentication and Key Management for more information. > Note: Negotiated rates are only available in Production mode. Please review the Getting Started Guide for more information. ### Carrier Setup Upon sign-up with EasyPost, users gain immediate access to Wallet Carrier Accounts, which can be enabled directly from the Dashboard. For additional carriers, EasyPost supports a Bring Your Own Carrier Account (BYOCA) option. This requires users to register directly with the respective carrier. #### Jitsu Shipper Account Registration 1. Contact Jitsu to request a shipper account. A representative will be in touch for additional details regarding the account. 2. Inform Jitsu about using EasyPost's API for label purchases. 3. Acquire rates and align any additional shipping needs. 4. Obtain Jitsu's account credentials: 1. Client Secret 5. Input carrier-specific credentials within the EasyPost Carrier Account Dashboard for comprehensive rate access. #### Jitsu Account via API The API structure specified by EasyPost can also be used to add the Jitsu carrier shipper account. ```shell curl -X POST https://api.easypost.com/v2/carrier_accounts \ -u "$EASYPOST_API_KEY": \ -H 'Content-Type: application/json' \ -d '{ "carrier_account": { "type": "JitsuAccount", "description": "JitsuAccount", "credentials": { "api_key": "VALUE" }, "test_credentials": { "api_key": "VALUE" } } }' ``` ### Software Requirements Download an EasyPost Client Library or utilize the REST API with cURL. ### Documentation Review Examine the EasyPost Objects section to understand the API's structure, which is critical for constructing requests and interpreting responses. Related: - [Getting Started Guide](https://docs.easypost.com/guides/getting-started) - [Manage Carrier Accounts](https://app.easypost.com/account/settings?tab=carriers) --- ## Billing When using a Jitsu BYOCA, shipment charges are billed under the shipper's own Jitsu account. --- ## Rates Jitsu is a **Live Rating** integration, enabling real-time rate retrieval for shipments created via EasyPost. Rates are guaranteed valid for a minimum of 5 minutes. - When creating a shipment, EasyPost requests Jitsu for shipment rates specific to the user's Jitsu account. - The rates provided are directly from Jitsu and tailored to the user's specific account details. - In cases of discrepancies or incorrect rates, users are advised to contact their Jitsu account representative. - The representative can then update the rates in Jitsu's database to ensure user account accuracy. --- ## Service Levels Jitsu delivers seven days per week. Service levels are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=jitsu`. Related: - [Service Levels](https://docs.easypost.com/docs/shipments/rates#service-levels) --- ## Predefined Packages Predefined packages provide a convenient way to classify parcels using carrier-defined package types and retrieve applicable rates. When creating a shipment with the EasyPost API, select a predefined package that matches the parcel's characteristics and provide its weight in ounces when required. See the predefined package documentation for supported values and example requests. Predefined packages are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=jitsu`. Related: - [Predefined Packages](https://docs.easypost.com/docs/parcels#predefined-packages) --- ## Generating Shipping Labels With EasyPost, the process for generating shipping labels for Jitsu is the same as generating them for any other carrier. Review the Getting Started Guide for help generating a shipping label. ### Manifests Manifesting is not supported or required for Jitsu. ### Refunding and Voiding Labels Voiding Jitsu labels through EasyPost is supported. ### Shipment Options Shipment options are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=jitsu`. Related: - [Shipment Options](https://docs.easypost.com/docs/shipments/options) #### Label Formats EasyPost offers native JItsu labels in PDF and ZPL formats. Related: - [Shipment Documentation](https://docs.easypost.com/docs/shipments) - [Jitsu Support and FAQs](https://support.easypost.com/hc/en-us/articles/40904451001357-Jitsu-Carrier-Support-and-FAQs) --- ## Hazardous Materials (HAZMAT) Jitsu's policy on hazardous materials is not explicitly detailed. Shippers are advised to contact Jitsu directly for specific guidelines and compliance requirements. --- ## Pickups Pickups are **not** supported through the EasyPost API. --- ## Tracking EasyPost simplifies package tracking by offering two methods: - Tracking with an existing number and carrier. - Using a Tracker included with an EasyPost-purchased shipping label. The service integrates webhooks for timely shipment updates. For detailed information on tracking methods, visit the Tracking Guide. Related: - [Trackers Documentation](https://docs.easypost.com/docs/trackers) - [Trackers Guide](https://docs.easypost.com/guides/tracking-guide) --- ## Additional Resources ### Carrier Metadata The Carrier Metadata endpoint can programmatically return information about Jitsu service levels, predefined packages, supported features, and shipment options. Use this information to quickly integrate with Jitsu and make educated decisions about the mix of carriers for shipping needs. Additionally, the Carrier Metadata endpoint is available to retrieve comprehensive information about all carriers on the EasyPost platform, enhancing decision-making for carrier services. ### Support and Troubleshooting In addition to the guidance provided in the Carrier Guides, EasyPost offers support to assist with FAQs, troubleshooting issues, and inquiries related to the EasyPost platform. Visit the Help Center for more information. Related: - [Carrier Metadata](https://docs.easypost.com/docs/carrier-metadata) - [Help Center](https://support.easypost.com/hc/en-us) --- ## Talk to a Shipping Expert For questions about getting started with the EasyPost API please talk to a Shipping Expert or Contact Support. Related: - [Talk to a Shipping Expert](https://www.easypost.com/talk-to-easypost) - [Contact Support](https://support.easypost.com/hc/requests/new) --- Source: https://docs.easypost.com/carriers/loomis-express-guide # Loomis Express Guide Loomis Express is a versatile Canadian shipping partner that offers a wide array of domestic and export services. It ensures package delivery to locations throughout Canada and to over 220 countries globally, maintaining extensive coverage from coast to coast within Canada and internationally. This guide includes detailed information on utilizing Loomis Express shipping with the EasyPost API, focusing on account setup, rates, label creation, manifests, tracking, and more. --- ## Carrier Account Setup ### Account Registration Sign up for an EasyPost account to obtain a **Test** and **Production** API key. See Authentication and Key Management for more information. > Note: Negotiated rates are only available in Production mode. ### Carrier Setup Upon sign-up with EasyPost, users gain immediate access to Wallet Carrier Accounts, which can be enabled directly from the Dashboard. For additional carriers, EasyPost supports a Bring Your Own Carrier Account (BYOCA) option. This requires users to register directly with the respective carrier. #### Loomis Express Shipper Account Registration 1. Contact Loomis Express to request a shipper account. A representative will be in touch for additional details regarding the account. 2. Inform Loomis Express about using EasyPost's API for label purchases. 3. Acquire rates and align any additional shipping needs. 4. Obtain Loomis Express production and test credentials: 1. Loomis Express Account Number 2. Loomis Express Username 3. Loomis Express Password 5. Input carrier-specific credentials within the EasyPost Carrier Account Dashboard for comprehensive rate access. #### Loomis Express Account via API The API structure specified by EasyPost can also be used to add the Loomis Express carrier shipper account. ```shell curl -X POST https://api.easypost.com/v2/carrier_accounts \ -u "$EASYPOST_API_KEY": \ -H 'Content-Type: application/json' \ -d '{ "carrier_account": { "type": "LoomisExpressAccount", "description": "LoomisExpressAccount", "credentials": { "account_number": "VALUE", "password": "VALUE", "username": "VALUE" }, "test_credentials": { "account_number": "VALUE", "password": "VALUE", "username": "VALUE" } } }' ``` ### Software Requirements Download an EasyPost Client Library or utilize the REST API with cURL. ### Documentation Review Examine the EasyPost Objects section to understand the API's structure, which is critical for constructing requests and interpreting responses. Related: - [Getting Started Guide](https://docs.easypost.com/guides/getting-started) - [Manage Carrier Accounts](https://app.easypost.com/account/settings?tab=carriers) --- ## Billing Billing is directly handled by Loomis Express after parcel delivery. EasyPost does not participate in the billing process for Loomis Express services. Contact a Loomis Express representative for details. --- ## Rates Loomis Express is a **Live Rating** integration, enabling real-time rate retrieval for shipments created via EasyPost. Rates are guaranteed valid for a minimum of 5 minutes. - When creating a shipment, EasyPost requests Loomis Express for shipment rates specific to the user's Loomis Express account. - The rates provided are directly from Loomis Express and tailored to the user's specific account details. - In cases of discrepancies or incorrect rates, users are advised to contact their Loomis Express account representative. - The representative can then update the rates in the Loomis Express database to ensure user account accuracy. --- ## Service Levels Loomis Express offers the following services: Service levels are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=loomisexpress`. Related: - [Service Levels](https://docs.easypost.com/docs/shipments/rates#service-levels) Related: - [Loomis Express Service Levels](https://docs.easypost.com/docs/shipments/rates?carrier=LoomisExpress#service-levels) --- ## Predefined Packages Predefined packages provide a convenient way to classify parcels using carrier-defined package types and retrieve applicable rates. When creating a shipment with the EasyPost API, select a predefined package that matches the parcel's characteristics and provide its weight in ounces when required. See the predefined package documentation for supported values and example requests. Predefined packages are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=loomisexpress`. Related: - [Predefined Packages](https://docs.easypost.com/docs/parcels#predefined-packages) --- ## Generating Shipping Labels With EasyPost, generating shipping labels for Loomis Express is the same process as generating them for any other carrier. Review the Getting Started Guide for help generating a shipping label. ### Manifests Manifesting is supported and required. ### Refunding and Voiding Labels Voiding Loomis Express labels through EasyPost is supported. > Note: The **shipment.tracking_code** is required as it identifies the order within the carrier's system. ### Shipment Options Shipment options are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=loomisexpress`. Related: - [Shipment Options](https://docs.easypost.com/docs/shipments/options) #### Label Formats EasyPost offers native Loomis Express labels in PNG, PDF, and ZPL formats. Related: - [Shipment Documentation](https://docs.easypost.com/docs/shipments) - [Reducing API Response Times](https://support.easypost.com/hc/en-us/articles/360048825772-Reducing-API-Response-Times) --- ## Hazardous Materials (HAZMAT) Loomis Express's policy on hazardous materials is not explicitly detailed. Shippers are advised to contact Loomis Express directly for specific guidelines and compliance requirements. --- ## Pickups Loomis Express pickup requests can be made via the EasyPost API. Review the Pickups documentation for details. Related: - [Pickups Documentation](https://docs.easypost.com/docs/pickups) --- ## Tracking EasyPost simplifies package tracking by offering two methods: - Tracking with an existing number and carrier. - Using a Tracker included with an EasyPost-purchased shipping label. The service integrates webhooks for timely shipment updates. For detailed information on tracking methods, visit the Tracking Guide. Related: - [Trackers Documentation](https://docs.easypost.com/docs/trackers) - [Trackers Guide](https://docs.easypost.com/guides/tracking-guide) --- ## Additional Resources ### Carrier Metadata The Carrier Metadata endpoint can programmatically return information about Loomis Express service levels, predefined packages, supported features, and shipment options. Use this information to quickly integrate with Loomis Express and make educated decisions about the mix of carriers for shipping needs. Additionally, the Carrier Metadata endpoint is available to retrieve comprehensive information about all carriers on the EasyPost platform, enhancing decision-making for carrier services. ### Support and Troubleshooting In addition to the guidance provided in the Carrier Guides, EasyPost offers support to assist with FAQs, troubleshooting issues, and inquiries related to the EasyPost platform. Visit the Help Center for more information. Related: - [Carrier Metadata](https://docs.easypost.com/docs/carrier-metadata) - [Help Center](https://support.easypost.com/hc/en-us) --- ## Talk to a Shipping Expert For questions about getting started with the EasyPost API please talk to a Shipping Expert or Contact Support. Related: - [Talk to a Shipping Expert](https://www.easypost.com/talk-to-easypost) - [Contact Support](https://support.easypost.com/hc/requests/new) --- Source: https://docs.easypost.com/carriers/lso-guide # LSO Guide Lone Star Overnight (LSO) is a leading regional parcel carrier offering a full selection of Ground and Express shipping services to ecommerce merchants, fulfillment centers, and online sellers. This guide provides detailed information on utilizing LSO shipping with the EasyPost API, focusing on account setup, rates, label creation, pickups, tracking, and more. --- ## Carrier Account Setup ### Account Registration Sign up for an EasyPost account to obtain a **Test** and **Production** API key. See Authentication and Key Management for more information. > Note: Negotiated rates are only available in Production mode. ### Carrier Setup Upon sign-up with EasyPost, users gain immediate access to Wallet Carrier Accounts, which can be enabled directly from the Dashboard. For additional carriers, EasyPost supports a Bring Your Own Carrier Account (BYOCA) option. This requires users to register directly with the respective carrier. #### LSO Shipper Account Registration 1. Register or log into the LSO website, ensuring a valid payment method is on file. 2. Log into EasyPost and navigate to **Account Settings > Carriers**. 3. Select the **Add Carrier** button at the top of the screen and choose **LSO**. 4. Add the following LSO credentials: 1. Production Account Number 2. User Name 3. Password 5. Start purchasing labels through the EasyPost shipping API. #### LSO Account via API The API structure specified by EasyPost can also be used to add the LSO carrier shipper account. ```shell curl -X POST https://api.easypost.com/v2/carrier_accounts \ -u "$EASYPOST_API_KEY": \ -H 'Content-Type: application/json' \ -d '{ "carrier_account": { "type": "LsoAccount", "description": "LsoAccount", "credentials": { "account_number": "VALUE", "password": "VALUE", "username": "VALUE" }, "test_credentials": { "account_number": "VALUE", "password": "VALUE", "username": "VALUE" } } }' ``` ### Software Requirements Download an EasyPost Client Library or utilize the REST API with cURL. ### Documentation Review Examine the EasyPost Objects section to understand the API's structure, which is critical for constructing requests and interpreting responses. Related: - [Getting Started Guide](https://docs.easypost.com/guides/getting-started) - [Manage Carrier Accounts](https://app.easypost.com/account/settings?tab=carriers) --- ## Billing When using an LSO BYOCA, shipment charges are billed under the shipper's own LSO account. --- ## Rates LSO is a **Live Rating** integration, enabling real-time rate retrieval for shipments created via EasyPost. Rates are guaranteed valid for a minimum of 5 minutes. - When creating a shipment, EasyPost requests LSO for shipment rates specific to the user's LSO account. - The rates provided are directly from LSO and tailored to the user's specific account details. - In cases of discrepancies or incorrect rates, users are advised to contact their LSO account representative. - The representative can then update the rates in LSO's database to ensure user account accuracy. --- ## Service Levels Service levels are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=lso`. Related: - [Service Levels](https://docs.easypost.com/docs/shipments/rates#service-levels) ### Coverage Area ![Map indicating LSO coverage area](https://docs.easypost.com/images/guides/lso/lso-coverage-area-map.png) Related: - [LSO Service Levels](https://docs.easypost.com/docs/shipments/rates?carrier=LSO#service-levels) --- ## Predefined Packages Predefined packages provide a convenient way to classify parcels using carrier-defined package types and retrieve applicable rates. When creating a shipment with the EasyPost API, select a predefined package that matches the parcel's characteristics and provide its weight in ounces when required. See the predefined package documentation for supported values and example requests. Predefined packages are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=lso`. Related: - [Predefined Packages](https://docs.easypost.com/docs/parcels#predefined-packages) --- ## Generating Shipping Labels With EasyPost, the process for generating shipping labels for LSO is the same as generating them for any other carrier. Review the Getting Started Guide for help generating a shipping label. ### Refunding and Voiding Labels LSO does not allow the voiding of labels. Please contact EasyPost support for refunds. ### Shipment Options Shipment options are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=lso`. Related: - [Shipment Options](https://docs.easypost.com/docs/shipments/options) Related: - [Shipment Documentation](https://docs.easypost.com/docs/shipments) - [Refunds](https://docs.easypost.com/docs/shipments/shipping-refund#refund-a-shipment) --- ## Hazardous Materials (HAZMAT) LSO does not handle shipments of dangerous goods or hazardous materials. For detailed information, please review the LSO Service Guide. Related: - [LSO Service Guide](https://assets-global.website-files.com/610bd2c21f6eaa53c3ceab9f/63caf872ce8eef2b0e2810f8_2023%20LSO%20Service%20Guide.pdf) ## Pickups Pickups with LSO are free of charge and can be scheduled in two ways (Please note that a 24-hour notice is required to set pickups): 1. Schedule a pickup via EasyPost's Pickup API. OR 2. Schedule pickups by calling LSO customer service at 512-872-6900. Let the agent know you are an EasyPost customer and have the following information ready: - Pickup address - Special instructions: gate code, etc. - Commercial or residential location - Contact name and phone number - Time packages will be ready - please allow a 2 hour window (minimum) - Open time and latest pickup time (e.g., no later than 4 PM) - Number of packages shipping per day - Type of package: Poly, box, standard dimensions - Service type: Express, Ecommerce, or Ground service Related: - [Pickups Documentation](https://docs.easypost.com/docs/pickups) --- ## Tracking EasyPost simplifies package tracking by offering two methods: - Tracking with an existing number and carrier. - Using a Tracker included with an EasyPost-purchased shipping label. The service integrates webhooks for timely shipment updates. For detailed information on tracking methods, visit the Tracking Guide. Related: - [Trackers Documentation](https://docs.easypost.com/docs/trackers) - [Trackers Guide](https://docs.easypost.com/guides/tracking-guide) --- ## Additional Resources ### Carrier Metadata The Carrier Metadata endpoint can programmatically return information about LSO service levels, predefined packages, supported features, and shipment options. Use this information to quickly integrate with LSO and make educated decisions about the mix of carriers for shipping needs. Additionally, the Carrier Metadata endpoint is available to retrieve comprehensive information about all carriers on the EasyPost platform, enhancing decision-making for carrier services. ### Support and Troubleshooting In addition to the guidance provided in the Carrier Guides, EasyPost offers support to assist with FAQs, troubleshooting issues, and inquiries related to the EasyPost platform. Visit the Help Center for more information. Related: - [Carrier Metadata](https://docs.easypost.com/docs/carrier-metadata) - [Help Center](https://support.easypost.com/hc/en-us) --- ## Talk to a Shipping Expert For questions about getting started with the EasyPost API please talk to a Shipping Expert or Contact Support. Related: - [Talk to a Shipping Expert](https://www.easypost.com/talk-to-easypost) - [Contact Support](https://support.easypost.com/hc/requests/new) --- Source: https://docs.easypost.com/carriers/maersk-guide # Maersk Parcel Guide Maersk Parcel is a large regional carrier available exclusively through EasyPost, offering three-day shipping from major metropolitan areas at the most competitive rates. This service is ideal for small and medium-sized businesses that may not have the shipping volume or negotiating power to secure lower rates independently. Maersk Parcel provides a cost-effective solution to supplement existing carrier options. This guide includes detailed information on utilizing Maersk Parcel shipping with the EasyPost API, focusing on account setup, rates, label creation, manifests, tracking, and more. For operational details, shipment nuances, and frequently asked questions, refer to the Maersk Parcel Carrier Support and FAQs article. Related: - [Maersk Parcel Carrier Support and FAQs](https://support.easypost.com/hc/en-us/articles/40483227494029-Maersk-Parcel-Carrier-Support-and-FAQs) --- ## Carrier Account Setup ### Account Registration Sign up for an EasyPost account to obtain a **Test** and **Production** API key. See Authentication and Key Management for more information. ### Carrier Setup Maersk Parcel accounts are created directly through EasyPost. New accounts are automatically created when Maersk Parcel is added to the EasyPost Dashboard or through the EasyPost API. 1. Log in to the EasyPost Dashboard and navigate to **Account Settings**. 2. Select the **Carriers** tab. 3. Select **Add Carrier**. 4. Select Maersk from the list of carriers and complete the following sections to add an account: 1. Contact and Company Information 2. Origin Address 3. Billing Address 4. Estimated Volume 5. Select the checkbox stating that the Terms & Conditions have been read. If an existing Maersk Parcel account already exists with the same demographic information, EasyPost will associate that account rather than duplicating it. > Note: Maersk Parcel accounts are specific to the shipment origin. A separate account is required for each origin, and a new account must be created if the shipping location changes. #### Maersk Parcel Account via API The API structure specified by EasyPost can also be used to add the Maersk Parcel carrier shipper account. ```shell curl -X POST https://api.easypost.com/v2/carrier_accounts \ -u "$EASYPOST_API_KEY": \ -H 'Content-Type: application/json' \ -d '{ "carrier_account": { "type": "MaerskAccount", "description": "Maersk Account", "reference": null, "credentials": { "first_name": "VALUE", "last_name": "VALUE", "company_name": "VALUE", "email": "VALUE", "phone": "VALUE", "daily_number_of_shipments": "VALUE", "channel": "VALUE", "accepted_terms": "true", "serial_number": "VALUE", "origin_address_line_1": "VALUE", "origin_address_line_2": "VALUE", "origin_postal_code": "VALUE", "origin_city": "VALUE", "origin_state": "VALUE", "billing_address_line_1": "VALUE", "billing_address_line_2": "VALUE", "billing_postal_code": "VALUE", "billing_city": "VALUE", "billing_state": "VALUE" }, "test_credentials": {} } }' ``` ### Software Requirements Download an EasyPost Client Library or utilize the REST API with cURL. ### Documentation Review Examine the EasyPost Objects section to understand the API's structure, which is critical for constructing requests and interpreting responses. Related: - [Getting Started Guide](https://docs.easypost.com/guides/getting-started) - [Manage Carrier Accounts](https://app.easypost.com/account/settings?tab=carriers) --- ## Billing Maersk Parcel is an aggregate carrier, which means it consolidates shipping services from multiple final-mile carriers. When a label is purchased through EasyPost, two separate billing events occur. - **EasyPost Wallet charge:** The EasyPost Wallet is charged immediately for the label purchase. - **Final mile carrier charge:** Maersk Parcel is billed by the final mile carrier according to that carrier's billing process, which may be bill-on-scan (when the parcel is first scanned into their network) or bill-on-creation (at the time the label is generated). Billing details, rates, and adjustments are managed by EasyPost in partnership with Maersk Parcel, ensuring end users are charged the correct amount through their EasyPost Wallet. --- ## Rates Maersk Parcel is a **Live Rating** integration, enabling real-time rate retrieval for shipments created via EasyPost. In cases of discrepancies or incorrect rates, users are advised to contact their Maersk Parcel account representative at 1 (385) 458-7940. Rates are charged in USD through the EasyPost Wallet. --- ## Service Levels Maersk Parcel has the following service supported by EasyPost: Service levels are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=maersk`. Related: - [Service Levels](https://docs.easypost.com/docs/shipments/rates#service-levels) --- ## Predefined Packages Predefined packages provide a convenient way to classify parcels using carrier-defined package types and retrieve applicable rates. When creating a shipment with the EasyPost API, select a predefined package that matches the parcel's characteristics and provide its weight in ounces when required. See the predefined package documentation for supported values and example requests. Predefined packages are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=maersk`. Related: - [Predefined Packages](https://docs.easypost.com/docs/parcels#predefined-packages) --- ## Generating Shipping Labels With EasyPost, generating shipping labels for Maersk Parcel is the same process as generating them for any other carrier. Review the Getting Started Guide for help generating a shipping label. ### One-Call Buys One-call buys enable streamlined label purchasing through the EasyPost API by consolidating multiple operations into a single API request. This feature is designed to simplify and accelerate the shipping process by combining the creation of a shipment, retrieval of rates, and purchasing the shipping label into one efficient step. See Reducing API Response Times for more information. ### Manifests Manifesting is **not** supported or required for Maersk Parcel. ### Returns Maersk Parcel returns are supported. ### Refunding and Voiding Labels Voiding Maersk Parcel labels through EasyPost is supported. The **Refund** button in the EasyPost dashboard, or the `/refund` endpoint accessible through the API, allows for voiding unused Maersk Parcel labels. See Refund a Shipment for more information. ### Shipment Options Shipment options are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=maersk`. Related: - [Shipment Options](https://docs.easypost.com/docs/shipments/options) #### Label Formats EasyPost offers native Maersk Parcel labels PNG, ZPL, and PDF formats. #### Label Size Options Maersk Parcel offers a 6 x 4 label size. Related: - [Shipment Documentation](https://docs.easypost.com/docs/shipments) - [Reducing API Response Times](https://support.easypost.com/hc/en-us/articles/360048825772-Reducing-API-Response-Times) --- ## Hazardous Materials (HAZMAT) This guide does not specify handling hazardous materials with Maersk Parcel. Shippers are advised to contact Maersk Parcel directly for hazmat inquiries. --- ## Pickups Maersk Parcel pickup requests can be made via the EasyPost API and the EasyPost Dashboard. > Note: Not all origin locations support pickups. Pickups may incur charges; users should consult their Maersk Parcel account representative for pricing details. Related: - [Pickups Documentation](https://docs.easypost.com/docs/pickups) --- ## Tracking EasyPost simplifies package tracking by offering two methods: - Tracking with an existing number and carrier. - Using a Tracker included with an EasyPost-purchased shipping label. The service integrates webhooks for timely shipment updates. For detailed information on tracking methods, visit the Tracking Guide. Related: - [Trackers Documentation](https://docs.easypost.com/docs/trackers) - [Trackers Guide](https://docs.easypost.com/guides/tracking-guide) --- ## Additional Resources ### Carrier Metadata The Carrier Metadata endpoint can programmatically return information about service levels, predefined packages, supported features, and shipment options. Use this information to quickly integrate and make educated decisions about the mix of carriers for shipping needs. Additionally, the Carrier Metadata endpoint is available to retrieve comprehensive information about all carriers on the EasyPost platform, enhancing decision-making for carrier services. ### Support and Troubleshooting In addition to the guidance provided in the Carrier Guides, EasyPost offers support to assist with FAQs, troubleshooting issues, and inquiries related to the EasyPost platform. Visit the Help Center for more information. Related: - [Carrier Metadata](https://docs.easypost.com/docs/carrier-metadata) - [Help Center](https://support.easypost.com/hc/en-us) --- ## Talk to a Shipping Expert For questions about getting started with the EasyPost API please talk to a Shipping Expert or Contact Support. Related: - [Talk to a Shipping Expert](https://www.easypost.com/talk-to-easypost) - [Contact Support](https://support.easypost.com/hc/requests/new) --- Source: https://docs.easypost.com/carriers/mrw-guide # MRW Guide MRW is a Spanish express courier and parcel delivery company. The MRW integration supports shipments within Spain, Portugal, Gibraltar, and Andorra. --- ## Carrier Account Setup ### Account Registration Sign up for an EasyPost account to obtain Test and Production API keys. See Authentication and Key Management for more information. > Note: Negotiated rates are only available in Production mode. ### Carrier Setup #### MRW Account Registration Contact MRW to obtain a shipper account, rate card, and production and test credentials. Add the account through the Carrier Accounts Dashboard or the API. The account uses the `MrwAccount` type and the following credentials: - Franchise code - Subscriber code - Department code (optional) - Username - Password #### MRW Account via API Use the Carrier Account API to add an MRW account: ```shell curl -X POST https://api.easypost.com/v2/carrier_accounts \ -u "$EASYPOST_API_KEY": \ -H 'Content-Type: application/json' \ -d '{ "carrier_account": { "type": "MrwAccount", "description": "MrwAccount", "credentials": { "department_code": "VALUE", "franchise_code": "VALUE", "password": "VALUE", "subscriber_code": "VALUE", "username": "VALUE" }, "test_credentials": { "department_code": "VALUE", "franchise_code": "VALUE", "password": "VALUE", "subscriber_code": "VALUE", "username": "VALUE" } } }' ``` ### Software Requirements Download an EasyPost Client Library or use the REST API with cURL. ### Documentation Review Review the EasyPost Objects documentation to understand requests and responses. Related: - [Getting Started Guide](https://docs.easypost.com/guides/getting-started) - [Manage Carrier Accounts](https://app.easypost.com/account/settings?tab=carriers) --- ## Billing MRW bills customers directly on a bill-on-scan basis. Contact MRW with billing or rate questions. --- ## Rates MRW supports rate card rating. Rate cards must be installed for each EasyPost account; otherwise, the API returns one-cent rates. Contact EasyPost Support for help installing your MRW rate card. --- ## Service Levels Service levels are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=mrw`. Related: - [Service Levels](https://docs.easypost.com/docs/shipments/rates#service-levels) --- ## Predefined Packages Use parcel dimensions and weight when creating shipments. Predefined packages are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=mrw`. Related: - [Predefined Packages](https://docs.easypost.com/docs/parcels#predefined-packages) --- ## Generating Shipping Labels MRW provides carrier-generated labels in PDF and PNG formats. See the Getting Started Guide for help creating a label. ### One-Call Buys MRW supports label purchases and one-call buys, which combine shipment creation, rating, and purchase in one request. ### Manifests Manifesting is not supported. ### Refunding and Voiding Labels Refunds, voids, and return labels are not supported. ### Shipment Options Shipment options are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=mrw`. Cash on delivery amounts must be in EUR, in whole euros, and no greater than 999 EUR. Carrier insurance amounts must be in EUR and are summed across containers. The label date defaults to the current date in Spain when omitted. The description of the first item in `shipment.options.fulfiller_order_items` is sent as instructions. Item values use `item_value.value` and the currency from `shipment.options.currency`. For customs, `documents` in `customs_info.contents_type` is sent as `DOC`; only the recipient VAT is supported in `tax_identifiers`. MRW requires the name, street address, and city in both the ship-from and ship-to addresses. ### Multi-Piece Shipping Multi-piece shipments are supported. ### Additional Limitations QR codes, signatures, surcharges, commercial invoices, incoterms, and address verification are not supported. Related: - [Shipment Options](https://docs.easypost.com/docs/shipments/options) - [Shipment Documentation](https://docs.easypost.com/docs/shipments) --- ## Hazardous Materials (HAZMAT) Limited quantity and fully regulated hazardous material shipments are not supported. --- ## Pickups Pickups are not supported through the EasyPost API. Contact MRW to arrange pickups. --- ## Tracking Tracking is not yet supported for MRW through the EasyPost API. --- ## Additional Resources ### Carrier Metadata The Carrier Metadata endpoint provides information about MRW service levels, predefined packages, supported features, and shipment options. ### Support and Troubleshooting Contact MRW for questions about carrier requirements or pickups. In addition to the guidance provided in the Carrier Guides, EasyPost offers support to assist with FAQs, troubleshooting issues, and inquiries related to the EasyPost platform. Visit the Help Center for more information. Related: - [Carrier Metadata](https://docs.easypost.com/docs/carrier-metadata) - [Help Center](https://support.easypost.com/hc/en-us) --- ## Talk to a Shipping Expert For questions about getting started with the EasyPost API please talk to a Shipping Expert or Contact Support. Related: - [Talk to a Shipping Expert](https://www.easypost.com/talk-to-easypost) - [Contact Support](https://support.easypost.com/hc/requests/new) --- Source: https://docs.easypost.com/carriers/ontrac-guide # OnTrac Guide OnTrac is a leading provider of same-day and next-day delivery services. With the merger of OnTrac and Lasership, OnTrac partners with over 7,000 independent contractors to make residential and business deliveries for some of the world's largest retailers. This guide includes detailed information on integrating OnTrac with the EasyPost API, focusing on account setup, rates, label creation, manifests, tracking, and more. --- ## Carrier Account Setup ### Account Registration Sign up for an EasyPost account to obtain a **Test** and **Production** API key. See Authentication and Key Management for more information. > Note: Negotiated rates are only available in Production mode. ### Carrier Setup Upon sign-up with EasyPost, users gain immediate access to Wallet Carrier Accounts, which can be enabled directly from the Dashboard. For additional carriers, EasyPost supports a Bring Your Own Carrier Account (BYOCA) option. This requires users to register directly with the respective carrier. #### Create an OnTrac Account 1. Contact OnTrac to request a shipper account. A representative will be in touch for additional details regarding the account. 2. Inform OnTrac about using EasyPost's API for label purchases. 3. Acquire rates and align any additional shipping needs. 4. Obtain the following production account credentials from OnTrac: 1. OntracV3 API Key 2. OntracV3 API ID 3. OntracV3 Customer Branch 4. Tender at Address Contact 5. Tender at Address Street1 6. Tender at Address Street2 7. Tender at Address City 8. Tender at Address State 9. Tender at Address Postal Code 10. Tender at Address Country Code 11. Tender at Address Phone 12.Tender at Address Instruction 5. Input carrier-specific credentials within the EasyPost Carrier Account Dashboard for comprehensive rate access. #### OnTrac Account via API The API structure specified by EasyPost can also be used to add the OnTrac carrier shipper account. ```shell curl -X POST https://api.easypost.com/v2/carrier_accounts \ -u "$EASYPOST_API_KEY": \ -H 'Content-Type: application/json' \ -d '{ "carrier_account": { "type": "OntracV3Account", "description": "OntracV3Account", "credentials": { "api_id": "VALUE", "api_key": "VALUE", "facility": "VALUE", "injection_city": "VALUE", "injection_contact": "VALUE", "injection_country": "VALUE", "injection_facility_code": "VALUE", "injection_instruction": "VALUE", "injection_phone": "VALUE", "injection_state": "VALUE", "injection_street1": "VALUE", "injection_street2": "VALUE", "injection_zip": "VALUE", "pickup_type": "VALUE" } } }' ``` ### Software Requirements Download an EasyPost Client Library or utilize the REST API with cURL. ### Documentation Review Examine the EasyPost Objects section to understand the API's structure, which is critical for constructing requests and interpreting responses. Related: - [Getting Started Guide](https://docs.easypost.com/guides/getting-started) --- ## Billing Billing is directly handled by OnTrac after parcel delivery. EasyPost does not participate in the billing process for OnTrac services. Contact a OnTrac representative for details. --- ## Rates OnTrac is a **Live Rating** integration, enabling real-time rate retrieval for shipments created via EasyPost. Rates are guaranteed valid for a minimum of 5 minutes. - When creating a shipment, EasyPost requests OnTrac for shipment rates specific to the user's OnTrac account. - The rates provided are directly from OnTrac and tailored to the user's specific account details. - In cases of discrepancies or incorrect rates, users are advised to contact their OnTrac account representative. - The representative can then update the rates in the OnTrac database to ensure user account accuracy. --- ## Service Levels OnTrac offers scheduled service seven days per week. Service levels are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=ontracv3`. Related: - [Service Levels](https://docs.easypost.com/docs/shipments/rates#service-levels) ### Coverage Area Map ![Map indicating OnTrac coverage area](https://docs.easypost.com/images/guides/ontrac/ontrac-coverage-map.png) Related: - [OnTrac Service Levels](https://docs.easypost.com/docs/shipments/rates?carrier=ontracv3#service-levels) --- ## Predefined Packages Predefined packages provide a convenient way to classify parcels using carrier-defined package types and retrieve applicable rates. When creating a shipment with the EasyPost API, select a predefined package that matches the parcel's characteristics and provide its weight in ounces when required. See the predefined package documentation for supported values and example requests. Predefined packages are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=ontracv3`. Related: - [Predefined Packages](https://docs.easypost.com/docs/parcels#predefined-packages) --- ## Generating Shipping Labels With EasyPost, generating shipping labels for OnTrac is the same process as generating them for any other carrier. Review the Getting Started Guide for help generating a shipping label. ### One-Call Buys 1-call buys enable streamlined label purchasing through the EasyPost API by consolidating multiple operations into a single API request. This feature is designed to simplify and accelerate the shipping process by combining the creation of a shipment, retrieval of rates, and purchasing the shipping label into one efficient step. See Reducing API Response Times for more information. ### Manifests OnTrac does not require users to manifest shipments. ### Refunding and Voiding Labels Voiding OnTrac labels through EasyPost is supported. ### Shipment Options Shipment options are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=ontracv3`. Related: - [Shipment Options](https://docs.easypost.com/docs/shipments/options) OnTrac supports three different label formats. The label format selected determines the label size. See Shipment Options for more details. Related: - [Shipment Documentation](https://docs.easypost.com/docs/shipments) - [Reducing API Response Times](https://support.easypost.com/hc/en-us/articles/360048825772-Reducing-API-Response-Times) --- ## Hazardous Materials (HAZMAT) OnTrac's policy on hazardous materials is not explicitly detailed. Shippers are advised to contact OnTrac directly for specific guidelines and compliance requirements. --- ## Pickups OnTrac accommodates pickups based on individual agreements with customers. While regular pickups can be arranged directly with OnTrac during the account registration process, they **cannot be scheduled via the EasyPost API**. --- ## Tracking EasyPost simplifies package tracking by offering two methods: - Tracking with an existing number and carrier. - Using a Tracker included with an EasyPost-purchased shipping label. The service integrates webhooks for timely shipment updates. For detailed information on tracking methods, visit the Tracking Guide. Related: - [Trackers Documentation](https://docs.easypost.com/docs/trackers) - [Trackers Guide](https://docs.easypost.com/guides/tracking-guide) --- ## Additional Resources ### Carrier Metadata The Carrier Metadata endpoint can programmatically return information about OnTrac service levels, predefined packages, supported features, and shipment options. Use this information to quickly integrate with OnTrac and make educated decisions about the mix of carriers for shipping needs. Additionally, the Carrier Metadata endpoint is available to retrieve comprehensive information about all carriers on the EasyPost platform, enhancing decision-making for carrier services. ### Support and Troubleshooting In addition to the guidance provided in the Carrier Guides, EasyPost offers support to assist with FAQs, troubleshooting issues, and inquiries related to the EasyPost platform. Visit the Help Center for more information. Related: - [Carrier Metadata](https://docs.easypost.com/docs/carrier-metadata) - [Help Center](https://support.easypost.com/hc/en-us) --- ## Talk to a Shipping Expert For questions about getting started with the EasyPost API please talk to a Shipping Expert or Contact Support. Related: - [Talk to a Shipping Expert](https://www.easypost.com/talk-to-easypost) - [Contact Support](https://support.easypost.com/hc/requests/new) --- Source: https://docs.easypost.com/carriers/optima-guide # Optima Guide Optima is a regional last-mile delivery service exclusively covering the New England area, including Connecticut, Maine, Massachusetts, New Hampshire, Rhode Island, and Vermont. With next-day delivery to over 1,000 zip codes in the region, a dedicated customer service team, and a 99% on-time delivery rate, Optima is a reliable shipping partner for businesses. This guide includes detailed information on utilizing Optima shipping with the EasyPost API, focusing on account setup, rates, label creation, manifests, tracking, and more. --- ## Carrier Account Setup ### Account Registration Sign up for an EasyPost account to obtain a **Test** and **Production** API key. See Authentication and Key Management for more information. > Note: Negotiated rates are only available in Production mode. ### Carrier Setup Upon sign-up with EasyPost, users gain immediate access to Wallet Carrier Accounts, which can be enabled directly from the Dashboard. For additional carriers, EasyPost supports a Bring Your Own Carrier Account (BYOCA) option. This requires users to register directly with the respective carrier. #### Optima Shipper Account Registration 1. Contact Optima to request a shipper account. A representative will be in touch for additional details regarding the account. 2. Inform Optima about using EasyPost's API for label purchases. 3. Acquire rates and align any additional shipping needs. 4. Obtain the following test and production account credentials: 1. Optima Username 2. Optima Password 3. Optima Account Number 5. Input carrier-specific credentials within the EasyPost Carrier Account Dashboard for comprehensive rate access. #### Optima Account via API The API structure specified by EasyPost can also be used to add the Optima carrier shipper account. ```shell curl -X POST https://api.easypost.com/v2/carrier_accounts \ -u "$EASYPOST_API_KEY": \ -H 'Content-Type: application/json' \ -d '{ "carrier_account": { "type": "OptimaAccount", "description": "OptimaAccount", "credentials": { "account_number": "VALUE", "password": "VALUE", "username": "VALUE" }, "test_credentials": { "account_number": "VALUE", "password": "VALUE", "username": "VALUE" } } }' ``` ### Software Requirements Download an EasyPost Client Library or utilize the REST API with cURL. ### Documentation Review Examine the EasyPost Objects section to understand the API's structure, which is critical for constructing requests and interpreting responses. Related: - [Getting Started Guide](https://docs.easypost.com/guides/getting-started) - [Manage Carrier Accounts](https://app.easypost.com/account/settings?tab=carriers) --- ## Billing Optima bills the actual postage through its billing system. --- ## Rates When integrating an Optima account with EasyPost, users should be aware of how rates are managed and displayed. Here's a breakdown of key points: ### Default Rate Display EasyPost returns Optima's live rates for Optima shipments. --- ## Service Levels Optima delivers six days per week (Monday - Saturday) and offers the following services: Service levels are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=optima`. Related: - [Service Levels](https://docs.easypost.com/docs/shipments/rates#service-levels) ### Coverage Area Optima supports two-day delivery services across New England, including Connecticut, Maine, Massachusetts, New Hampshire, Rhode Island, and Vermont. Related: - [Optima Service Levels](https://docs.easypost.com/docs/shipments/rates?carrier=optima#service-levels) --- ## Predefined Packages Predefined packages provide a convenient way to classify parcels using carrier-defined package types and retrieve applicable rates. When creating a shipment with the EasyPost API, select a predefined package that matches the parcel's characteristics and provide its weight in ounces when required. See the predefined package documentation for supported values and example requests. Predefined packages are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=optima`. Related: - [Predefined Packages](https://docs.easypost.com/docs/parcels#predefined-packages) --- ## Generating Shipping Labels With EasyPost, generating shipping labels for Optima is the same process as generating them for any other carrier. Review the Getting Started Guide for help generating a shipping label. ### Manifests Manifesting is **not** supported or required for Optima. ### Returns Returns are **not** supported. ### Refunding and Voiding Labels Voiding Optima labels through EasyPost is **not** supported. ### Shipment Options Shipment options are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=optima`. Related: - [Shipment Options](https://docs.easypost.com/docs/shipments/options) #### Label Formats EasyPost offers native Optima labels in PNG, ZPL, and PDF formats. Related: - [Shipment Documentation](https://docs.easypost.com/docs/shipments) - [Reducing API Response Times](https://support.easypost.com/hc/en-us/articles/360048825772-Reducing-API-Response-Times) --- ## Hazardous Materials (HAZMAT) This guide does not specify handling hazardous materials with Optima. Shippers are advised to contact Optima directly for specific hazmat inquiries. --- ## Pickups Optima accommodates pickups based on individual agreements with customers. While regular pickups can be arranged directly with Optima during the account registration process, **they cannot be scheduled via the EasyPost API.** --- ## Tracking EasyPost simplifies package tracking by offering two methods: - Tracking with an existing number and carrier. - Using a Tracker included with an EasyPost-purchased shipping label. The service integrates webhooks for timely shipment updates. For detailed information on tracking methods, visit the Tracking Guide. Related: - [Trackers Documentation](https://docs.easypost.com/docs/trackers) - [Trackers Guide](https://docs.easypost.com/guides/tracking-guide) --- ## Additional Resources ### Carrier Metadata The Carrier Metadata endpoint can programmatically return information about service levels, predefined packages, supported features, and shipment options. Use this information to quickly integrate and make educated decisions about the mix of carriers for shipping needs. Additionally, the Carrier Metadata endpoint is available to retrieve comprehensive information about all carriers on the EasyPost platform, enhancing decision-making for carrier services. ### Support and Troubleshooting In addition to the guidance provided in the Carrier Guides, EasyPost offers support to assist with FAQs, troubleshooting issues, and inquiries related to the EasyPost platform. Visit the Help Center for more information. Related: - [Carrier Metadata](https://docs.easypost.com/docs/carrier-metadata) - [Help Center](https://support.easypost.com/hc/en-us) --- ## Talk to a Shipping Expert For questions about getting started with the EasyPost API please talk to a Shipping Expert or Contact Support. Related: - [Talk to a Shipping Expert](https://www.easypost.com/talk-to-easypost) - [Contact Support](https://support.easypost.com/hc/requests/new) --- Source: https://docs.easypost.com/carriers/osm-guide # OSM Worldwide Guide OSM Worldwide provides data-driven domestic and international shipping services. They partner with USPS for last-mile delivery on all domestic packages. By combining their expertise with the extensive coverage of USPS, they can provide greater efficiency, accuracy, and a lower total cost of shipping for any business. This guide provides detailed information on utilizing OSM shipping with the EasyPost API, focusing on account setup, rates, label creation, manifests, tracking, and more. --- ## Carrier Account Setup ### Account Registration Sign up for an EasyPost account to obtain a **Test** and **Production** API key. See Authentication and Key Management for more information. > Note: Negotiated rates are only available in Production mode. Please review the Getting Started Guide for more information. ### Carrier Setup Upon sign-up with EasyPost, users gain immediate access to Wallet Carrier Accounts, which can be enabled directly from the Dashboard. For additional carriers, EasyPost supports a Bring Your Own Carrier Account (BYOCA) option. This requires users to register directly with the respective carrier. #### OSM Shipper Account Registration 1. Complete registration on the OSM website. Once registered, an OSM representative will be in touch for additional details regarding the account. 2. Inform OSM about using EasyPost's API for label purchases. 3. Obtain the following account credentials from OSM: 1. Account Number 2. Mailer ID 3. Facility Code/Cost Center ID (optional) 4. Company Name 5. SFTP Account 4. Input carrier-specific credentials within the EasyPost Carrier Account Dashboard for comprehensive rate access. #### OSM Account via API The API structure specified by EasyPost can also be used to add the OSM carrier shipper account. ```shell curl -X POST https://api.easypost.com/v2/carrier_accounts \ -u "$EASYPOST_API_KEY": \ -H 'Content-Type: application/json' \ -d '{ "carrier_account": { "type": "OsmWorldwideAccount", "description": "OsmWorldwideAccount", "credentials": { "account_number": "VALUE", "aws_sftp_username": "VALUE", "company_name": "VALUE", "facility_code": "VALUE", "mailer_id": "VALUE" } } }' ``` ### Software Requirements Download an EasyPost Client Library or utilize the REST API with cURL. ### Documentation Review Examine the EasyPost Objects section to understand the API's structure, which is critical for constructing requests and interpreting responses. Related: - [Getting Started Guide](https://docs.easypost.com/guides/getting-started) - [Manage Carrier Accounts](https://app.easypost.com/account/settings?tab=carriers) --- ## Billing OSM bills the actual postage through its billing system. --- ## Rates When integrating an OSM account with EasyPost, users should be aware of how rates are managed and displayed. Here's a breakdown of key points: #### Default Rate Display In production, OSM rates require a rate card loaded on EasyPost's end. Without a loaded rate card, the rate request returns an error. EasyPost returns a $0.01 rate for OSM shipments only in test mode. #### Rate Card - OSM Worldwide representatives provide rate cards detailing expected costs based on shipment parameters (package size, weight, location, etc.) . - Acquiring this custom rate card from OSM is crucial, as EasyPost is not automatically privy to these rates. #### Rate Card Integration Once the rate card is received from OSM, users should Contact Support for assistance installing this rate card to their account. --- ## Service Levels OSM delivers 6 days per week (Mon-Sat). The service levels through EasyPost include: Service levels are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=osmworldwide`. Related: - [Service Levels](https://docs.easypost.com/docs/shipments/rates#service-levels) Related: - [OSM Service Levels](https://docs.easypost.com/docs/shipments/rates?carrier=OSMWorldwide#service-levels) --- ## Predefined Packages Predefined packages provide a convenient way to classify parcels using carrier-defined package types and retrieve applicable rates. When creating a shipment with the EasyPost API, select a predefined package that matches the parcel's characteristics and provide its weight in ounces when required. See the predefined package documentation for supported values and example requests. Predefined packages are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=osmworldwide`. Related: - [Predefined Packages](https://docs.easypost.com/docs/parcels#predefined-packages) --- ## Generating Shipping Labels With EasyPost, the process for generating shipping labels for OSM is the same as generating them for any other carrier. Review the Getting Started Guide for help generating a shipping label. ### Manifests Manifesting is both supported and required for all label purchases with OSM. - **Manifesting Timeline** - Shipments purchased over 120 days ago are archived by OSM and cannot be manifested. - Labels purchased up to 119 days ago are eligible for manifesting, but it is not recommended. It is advisable to manifest shipment labels within 10 days of purchase for optimal processing and compliance with OSM guidelines. ### Shipment Options Shipment options are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=osmworldwide`. Related: - [Shipment Options](https://docs.easypost.com/docs/shipments/options) #### Label Formats and Sizes - **ZPL Format Requirement** - Labels submitted to OSM for validation during onboarding must be exclusively in ZPL format. - Conversion to or from other formats is not supported and will result in failure. - **Recommended Printer Models** - OSM Worldwide recommends using Zebra Models S4M and GK420d. - **Supported Label Size** - OSM supports a 4 x 6 label size. #### Advanced Options and Returns - **Return Label Support** - Return label types are supported by OSM. - A separate service level is available specifically for returns. - **Pricing for Returns** - Return services are offered at discounted rates compared to standard ground service levels. - **Rating and Purchasing Returns** - No unique rules are required for rating and purchasing a return label with OSM. Related: - [Generating Return labels](https://docs.easypost.com/docs/shipments/returns#create-return-for-a-shipment) Related: - [Shipment Documentation](https://docs.easypost.com/docs/shipments) - [Getting Started Guide](https://docs.easypost.com/guides/getting-started) --- ## Hazardous Materials (HAZMAT) For safety reasons, most hazardous materials are non-mailable. However, some hazardous materials and otherwise restricted matter, or perishable matter are permitted to be mailed when the requirements of the USPS are met. OSM Worldwide follows USPS guidelines for shipping hazardous materials. For a list of items and definitions of other terms that relate to hazardous materials, refer to the USPS Hazardous Materials Guidelines. See the EasyPost USPS Guide for detailed information on shipping restrictions, labeling requirements, transportation, and more. Related: - [EasyPost USPS Guide](https://docs.easypost.com/carriers/usps-guide) - [OSM Hazardous Material Shipping](https://www.osmworldwide.com/hazardousmaterial/) --- ## Pickups OSM supports pickups at the customer's facility. - **Customer Agreement** - Pickup services are available to any customer based on their specific agreement with OSM. - **Arrangement and Limitations** - Regular pickups can be arranged directly with the OSM team during the registration process. - Pickups _CANNOT_ be scheduled through the EasyPost API. Related: - [Pickups Documentation](https://docs.easypost.com/docs/pickups) --- ## Tracking EasyPost simplifies package tracking by offering two methods: - Tracking with an existing number and carrier. - Using a Tracker included with an EasyPost-purchased shipping label. The service integrates webhooks for timely shipment updates. For detailed information on tracking methods, visit the Tracking Guide. Related: - [Trackers Documentation](https://docs.easypost.com/docs/trackers) - [Trackers Guide](https://docs.easypost.com/guides/tracking-guide) --- ## Additional Resources ### Carrier Metadata The Carrier Metadata endpoint can programmatically return information about OSM service levels, predefined packages, supported features, and shipment options. Use this information to quickly integrate with OSM and make educated decisions about the mix of carriers for shipping needs. Additionally, the Carrier Metadata endpoint is available to retrieve comprehensive information about all carriers on the EasyPost platform, enhancing decision-making for carrier services. ### Support and Troubleshooting In addition to the guidance provided in the Carrier Guides, EasyPost offers support to assist with FAQs, troubleshooting issues, and inquiries related to the EasyPost platform. Visit the Help Center for more information. Related: - [Carrier Metadata](https://docs.easypost.com/docs/carrier-metadata) - [Help Center](https://support.easypost.com/hc/en-us) --- ## Talk to a Shipping Expert For questions about getting started with the EasyPost API please talk to a Shipping Expert or Contact Support. Related: - [Talk to a Shipping Expert](https://www.easypost.com/talk-to-easypost) - [Contact Support](https://support.easypost.com/hc/requests/new) --- Source: https://docs.easypost.com/carriers/osm-v2-guide # OSM Worldwide v2 Guide OSM Worldwide v2 is a shipping solution that integrates with the EasyPost API, supporting both domestic and international shipments. OSM partners with USPS for last-mile delivery on all domestic shipments and utilizes additional partners for middle and last-mile transportation. This guide provides detailed information on utilizing OSM v2 shipping with the EasyPost API, focusing on account setup, rates, label creation, tracking, and more. --- ## Carrier Account Setup ### Account Registration Sign up for an EasyPost account to obtain a **Test** and **Production** API key. See Authentication and Key Management for more information. > Note: Negotiated rates are only available in Production mode. Please review the Getting Started Guide for more information. ### Carrier Setup #### OSM v2 Shipper Account Registration 1. Complete registration on the OSM website. Once registered, an OSM representative will be in touch for additional details regarding the account. 2. Inform OSM about using EasyPost's API for label purchases. 3. Obtain the following account credentials from OSM: 1. `client_id` 2. `api_key` 3. `rate_key` 4. `mailer_id` 4. Input carrier-specific credentials within the EasyPost Carrier Account Dashboard for comprehensive rate access. #### OSM v2 Account via API The API structure specified by EasyPost can also be used to add the OSM v2 carrier account. ```shell curl -X POST https://api.easypost.com/v2/carrier_accounts \ -u "$EASYPOST_API_KEY": \ -H 'Content-Type: application/json' \ -d '{ "carrier_account": { "type": "OsmWorldwideV2Account", "description": "OsmWorldwideV2Account", "credentials": { "api_key": "VALUE", "client_id": "VALUE", "mailer_id": "VALUE", "rate_key": "VALUE" } } }' ``` ### Software Requirements Download an EasyPost Client Library or utilize the REST API with cURL. ### Documentation Review Examine the EasyPost Objects section to understand the API's structure, which is critical for constructing requests and interpreting responses. Related: - [Getting Started Guide](https://docs.easypost.com/guides/getting-started) - [Manage Carrier Accounts](https://app.easypost.com/account/settings?tab=carriers) --- ## Billing Billing is handled directly by OSM and follows a **bill-on-scan** model. - Charges are applied when the shipment is scanned into the OSM network, not at the time of label creation. - EasyPost is not involved in the billing process. - All invoices, adjustments, and billing inquiries are managed through OSM. --- ## Rates OSM v2 is a **Live Rating** integration, enabling real-time rate retrieval for shipments created via EasyPost. - When creating a shipment, EasyPost requests OSM for shipment rates specific to the user's OSM account. - The rates provided are directly from OSM and tailored to the user's specific account details. - In cases of discrepancies or incorrect rates, users are advised to contact their OSM account representative. --- ## Service Levels OSM delivers six days per week (Mon-Sat). The service levels through EasyPost include: Service levels are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=osmworldwidev2`. Related: - [Service Levels](https://docs.easypost.com/docs/shipments/rates#service-levels) ### Coverage OSM v2 covers shipments in the United States and United States territories. Related: - [OSM Service Levels](https://docs.easypost.com/docs/shipments/rates?carrier=OSMWorldwide#service-levels) --- ## Predefined Packages Predefined packages provide a convenient way to classify parcels using carrier-defined package types and retrieve applicable rates. When creating a shipment with the EasyPost API, select a predefined package that matches the parcel's characteristics and provide its weight in ounces when required. See the predefined package documentation for supported values and example requests. Predefined packages are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=osmworldwidev2`. Related: - [Predefined Packages](https://docs.easypost.com/docs/parcels#predefined-packages) --- ## Generating Shipping Labels With EasyPost, the process for generating shipping labels for OSM v2 is the same as generating them for any other carrier. Review the Getting Started Guide for help generating a shipping label. ### One-Call Buys 1-call buys enable streamlined label purchasing through the EasyPost API by consolidating multiple operations into a single API request. This feature is designed to simplify and accelerate the shipping process by combining the creation of a shipment, retrieval of rates, and purchasing the shipping label into one efficient step. See Reducing API Response Times for more information. ### Manifests Manifesting is not supported or required. ### Refunding and Voiding Labels Voiding labels is not supported at this time. ### Shipment Options Shipment options are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=osmworldwidev2`. Related: - [Shipment Options](https://docs.easypost.com/docs/shipments/options) Related: - [Shipment Documentation](https://docs.easypost.com/docs/shipments) - [Reducing API Response Times](https://support.easypost.com/hc/en-us/articles/360048825772-Reducing-API-Response-Times) --- ## Hazardous Materials (HAZMAT) For safety reasons, most hazardous materials are non-mailable. However, some hazardous materials and otherwise restricted matter, or perishable matter are permitted to be mailed when the requirements of the USPS are met. OSM Worldwide follows USPS guidelines for shipping hazardous materials. For a list of items and definitions of other terms that relate to hazardous materials, refer to the USPS Hazardous Materials Guidelines. See the EasyPost USPS Guide for detailed information on shipping restrictions, labeling requirements, transportation, and more. Related: - [EasyPost USPS Guide](https://docs.easypost.com/carriers/usps-guide) - [OSM Hazardous Material Shipping](https://www.osmworldwide.com/hazardousmaterial/) --- ## Pickups OSM Worldwide accommodates pickups based on individual agreements with customers. While regular pickups can be arranged directly with OSM during the account registration process, they **cannot be scheduled via the EasyPost API**. --- ## Tracking EasyPost simplifies package tracking by offering two methods: - Tracking with an existing number and carrier. - Using a Tracker included with an EasyPost-purchased shipping label. The service integrates webhooks for timely shipment updates. For detailed information on tracking methods, visit the Tracking Guide. Related: - [Trackers Documentation](https://docs.easypost.com/docs/trackers) - [Trackers Guide](https://docs.easypost.com/guides/tracking-guide) --- ## Additional Resources ### Carrier Metadata The Carrier Metadata endpoint can programmatically return information about OSM service levels, predefined packages, supported features, and shipment options. Use this information to quickly integrate with OSM and make educated decisions about the mix of carriers for shipping needs. Additionally, the Carrier Metadata endpoint is available to retrieve comprehensive information about all carriers on the EasyPost platform, enhancing decision-making for carrier services. ### Support and Troubleshooting In addition to the guidance provided in the Carrier Guides, EasyPost offers support to assist with FAQs, troubleshooting issues, and inquiries related to the EasyPost platform. Visit the Help Center for more information. Related: - [Carrier Metadata](https://docs.easypost.com/docs/carrier-metadata) - [Help Center](https://support.easypost.com/hc/en-us) --- ## Talk to a Shipping Expert For questions about getting started with the EasyPost API please talk to a Shipping Expert or Contact Support. Related: - [Talk to a Shipping Expert](https://www.easypost.com/talk-to-easypost) - [Contact Support](https://support.easypost.com/hc/requests/new) --- Source: https://docs.easypost.com/carriers/p2p-guide # Point2Point Global (P2P) Guide Point2Point Global (P2P) specializes in cross-border ecommerce and international shipping, with additional support for select domestic multi-modal shipping services. This guide provides detailed information on utilizing P2P shipping with the EasyPost API, covering account setup, rates, label creation, manifests, tracking, and more. For operational details, shipment nuances, and frequently asked questions, refer to the P2P Carrier Support and FAQs article. Related: - [P2P Carrier Support & FAQs](https://support.easypost.com/hc/en-us/articles/44643367722893-P2P-Carrier-Support-and-FAQs) --- ## Carrier Account Setup ### Account Registration Sign up for an EasyPost account to obtain a **Test** and **Production** API key. See Authentication and Key Management for more information. > Note: Negotiated rates are only available in Production mode. ### Carrier Setup #### P2P Account Registration 1. Contact P2P to request a shipper account. A representative will be in touch for additional details regarding the account. 2. Inform P2P about using EasyPost's API for label purchases. 3. Acquire rates and align any additional shipping needs. 4. Obtain the following account credentials: 1. `username` 2. `api_key` 3. `customer_id` 5. Input carrier-specific credentials within the EasyPost Carrier Account Dashboard for comprehensive rate access. #### P2P Shipping Account via API The API structure specified by EasyPost can also be used to add the P2P carrier shipper account. ```shell curl -X POST https://api.easypost.com/v2/carrier_accounts \ -u "$EASYPOST_API_KEY": \ -H 'Content-Type: application/json' \ -d '{ "carrier_account": { "type": "P2PAccount", "description": "P2PAccount", "credentials": { "api_key": "VALUE", "customer_id": "VALUE", "username": "VALUE" }, "test_credentials": { "api_key": "VALUE", "customer_id": "VALUE", "username": "VALUE" } } }' ``` ### Software Requirements Download an EasyPost Client Library or utilize the REST API with cURL. ### Documentation Review Examine the EasyPost Objects section to understand the API's structure, which is critical for constructing requests and interpreting responses. Related: - [Getting Started Guide](https://docs.easypost.com/guides/getting-started) - [Manage Carrier Accounts](https://app.easypost.com/account/settings?tab=carriers) --- ## Billing All P2P shipments purchased through EasyPost are billed by P2P in USD. Contact P2P for specific invoicing procedures. Refer to the Help Center for more information about payment methods, wallet funding, or account billing. --- ## Rates P2P is a **Live Rating** integration, enabling real-time rate retrieval for shipments created via EasyPost. - When creating a shipment, EasyPost requests P2P for shipment rates specific to the user's P2P account. - The rates provided are directly from P2P and tailored to the user's specific account details. - In cases of discrepancies or incorrect rates, users are advised to contact their P2P account representative. --- ## Service Levels P2P offers the following service levels: Service levels are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=p2p`. Related: - [Service Levels](https://docs.easypost.com/docs/shipments/rates#service-levels) --- ## Predefined Packages Predefined packages provide a convenient way to classify parcels using carrier-defined package types and retrieve applicable rates. When creating a shipment with the EasyPost API, select a predefined package that matches the parcel's characteristics and provide its weight in ounces when required. See the predefined package documentation for supported values and example requests. Predefined packages are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=p2p`. Related: - [Predefined Packages](https://docs.easypost.com/docs/parcels#predefined-packages) --- ## Generating Shipping Labels With EasyPost, generating shipping labels for P2P is the same process as generating them for any other carrier. Review the Getting Started Guide for help generating a shipping label. ### One-Call Buys One-call buys enable streamlined label purchasing through the EasyPost API by consolidating multiple operations into a single API request. This feature is designed to simplify and accelerate the shipping process by combining the creation of a shipment, retrieval of rates, and purchasing the shipping label into one efficient step. See Reducing API Response Times for more information. ### Manifests Manifesting is supported for P2P. ### Refunding and Voiding Labels Voiding P2P labels through EasyPost is supported, with some restrictions: “Parcels can only be cancelled under certain circumstances, for example, before the parcel has been received and processed by Point2Point Global (if sending your parcels to Point2Point Global) or before you have manifested the parcel (if sending your parcel directly to the carrier).” ### Shipment Options Shipment options are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=p2p`. Related: - [Shipment Options](https://docs.easypost.com/docs/shipments/options) #### Label Formats EasyPost offers P2P labels in PNG, PDF, and ZPL formats. #### Label Size Options Possible values for P2P shipping label sizes: - 4 x 6 Related: - [Shipment Documentation](https://docs.easypost.com/docs/shipments) - [P2P Carrier Support and FAQs](https://support.easypost.com/hc/en-us/articles/44643367722893-P2P-Carrier-Support-and-FAQs) --- ## Hazardous Materials (HAZMAT) This guide does not specify handling hazardous materials with P2P. Shippers are advised to contact P2P directly for hazmat inquiries. --- ## Pickups P2P accommodates pickups based on individual agreements with customers. While regular pickups can be arranged directly with P2P during the account registration process, they **cannot be scheduled via the EasyPost API**. --- ## Tracking EasyPost simplifies package tracking by offering two methods: - Tracking with an existing number and carrier. - Using a Tracker included with an EasyPost-purchased shipping label. The service integrates webhooks for timely shipment updates. For detailed information on tracking methods, visit the Tracking Guide. Related: - [Trackers Documentation](https://docs.easypost.com/docs/trackers) - [Trackers Guide](https://docs.easypost.com/guides/tracking-guide) --- ## Additional Resources ### Carrier Metadata The Carrier Metadata endpoint can programmatically return information about service levels, predefined packages, supported features, and shipment options. Use this information to quickly integrate and make educated decisions about the mix of carriers for shipping needs. Additionally, the Carrier Metadata endpoint is available to retrieve comprehensive information about all carriers on the EasyPost platform, enhancing decision-making for carrier services. ### Support and Troubleshooting In addition to the guidance provided in the Carrier Guides, EasyPost offers support to assist with FAQs, troubleshooting issues, and inquiries related to the EasyPost platform. Visit the Help Center for more information. Related: - [Carrier Metadata](https://docs.easypost.com/docs/carrier-metadata) - [Help Center](https://support.easypost.com/hc/en-us) --- ## Talk to a Shipping Expert For questions about getting started with the EasyPost API please talk to a Shipping Expert or Contact Support. Related: - [Talk to a Shipping Expert](https://www.easypost.com/talk-to-easypost) - [Contact Support](https://support.easypost.com/hc/requests/new) --- Source: https://docs.easypost.com/carriers/passport-global-guide # Passport Global Guide Passport Global is an international shipping carrier specializing in cross-border ecommerce deliveries. Known for its streamlined logistics solutions, Passport Global offers cost-effective shipping rates and reliable transit times. This guide includes detailed information on utilizing Passport Global shipping with the EasyPost API, focusing on account setup, rates, label creation, manifests, tracking, and more. --- ## Carrier Account Setup ### Account Registration Sign up for an EasyPost account to obtain a **Test** and **Production** API key. See Authentication and Key Management for more information. > Note: Negotiated rates are only available in Production mode. ### Carrier Setup Upon sign-up with EasyPost, users gain immediate access to Wallet Carrier Accounts, which can be enabled directly from the Dashboard. For additional carriers, EasyPost supports a Bring Your Own Carrier Account (BYOCA) option. This requires users to register directly with the respective carrier. #### Passport Global Shipper Account Registration 1. Contact Passport Global to request a shipper account. A representative will be in touch for additional details regarding the account. 2. Inform Passport Global about using EasyPost's API for label purchases. 3. Acquire rates and align any additional shipping needs. 4. Obtain the following production and test credentials: 1. Passport Global API Key 2. Customer company name registered with Passport Global 3. Customer email address registered with Passport Global 4. Customer name registered with Passport Global 5. Customer phone number registered with Passport Global (optional) 5. Input carrier-specific credentials within the EasyPost Carrier Account Dashboard for comprehensive rate access. #### Passport Global Account via API The API structure specified by EasyPost can also be used to add the Passport Global carrier shipper account. ```shell curl -X POST https://api.easypost.com/v2/carrier_accounts \ -u "$EASYPOST_API_KEY": \ -H 'Content-Type: application/json' \ -d '{ "carrier_account": { "type": "PassportGlobalAccount", "description": "PassportGlobalAccount", "credentials": { "api_key": "VALUE", "company_name": "VALUE", "email": "VALUE", "name": "VALUE", "phone": "VALUE" }, "test_credentials": { "api_key": "VALUE", "company_name": "VALUE", "email": "VALUE", "name": "VALUE", "phone": "VALUE" } } }' ``` ### Software Requirements Download an EasyPost Client Library or utilize the REST API with cURL. ### Documentation Review Examine the EasyPost Objects section to understand the API's structure, which is critical for constructing requests and interpreting responses. Related: - [Getting Started Guide](https://docs.easypost.com/guides/getting-started) - [Manage Carrier Accounts](https://app.easypost.com/account/settings?tab=carriers) --- ## Billing When using a Passport Global BYOCA, shipment charges are billed under the shipper's own Passport Global account. --- ## Rates Passport Global is a **Live Rating** integration, enabling real-time rate retrieval for shipments created via EasyPost. Rates are guaranteed valid for a minimum of five minutes. - When creating a shipment, EasyPost requests Passport Global for shipment rates specific to the user's Passport Global account. - The rates provided are directly from Passport Global and tailored to the user's specific account details. - In cases of discrepancies or incorrect rates, users are advised to contact their Passport Global account representative. - The representative can then update the rates to ensure user account accuracy. --- ## Service Levels Passport Global offers the following service levels: Service levels are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=passportglobal`. Related: - [Service Levels](https://docs.easypost.com/docs/shipments/rates#service-levels) Related: - [Passport Global Service Levels](https://docs.easypost.com/docs/shipments/rates?carrier=passportglobal#service-levels) --- ## Predefined Packages Predefined packages provide a convenient way to classify parcels using carrier-defined package types and retrieve applicable rates. When creating a shipment with the EasyPost API, select a predefined package that matches the parcel's characteristics and provide its weight in ounces when required. See the predefined package documentation for supported values and example requests. Predefined packages are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=passportglobal`. Related: - [Predefined Packages](https://docs.easypost.com/docs/parcels#predefined-packages) --- ## Generating Shipping Labels With EasyPost, generating shipping labels for Passport Global is the same process as generating them for any other carrier. Review the Getting Started Guide for help generating a shipping label. ### One-Call Buys 1-call buys enable streamlined label purchasing through the EasyPost API by consolidating multiple operations into a single API request. This feature is designed to simplify and accelerate the shipping process by combining the creation of a shipment, retrieval of rates, and purchasing the shipping label into one efficient step. See Reducing API Response Times for more information. ### Manifests Manifesting is **not** supported or required. ### Refunding and Voiding Labels Voiding Passport Global labels through EasyPost is supported. ### Shipment Options Shipment options are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=passportglobal`. Related: - [Shipment Options](https://docs.easypost.com/docs/shipments/options) #### Label Formats EasyPost offers native Passport Global labels in ZPL, PNG, and PDF formats. Related: - [Shipment Documentation](https://docs.easypost.com/docs/shipments) - [Reducing API Response Times](https://support.easypost.com/hc/en-us/articles/360048825772-Reducing-API-Response-Times) --- ## Hazardous Materials (HAZMAT) The Passport Global policy on hazardous materials is not explicitly detailed in this guide. Shippers are advised to contact Passport Global directly for specific hazmat inquiries. --- ## Pickups Passport Global accommodates pickups based on individual agreements with customers. While regular pickups can be arranged directly with Passport Global during the account registration process, they **cannot be scheduled via the EasyPost API**. --- ## Tracking EasyPost simplifies package tracking by offering two methods: - Tracking with an existing number and carrier. - Using a Tracker included with an EasyPost-purchased shipping label. The service integrates webhooks for timely shipment updates. For detailed information on tracking methods, visit the Tracking Guide. Related: - [Trackers Documentation](https://docs.easypost.com/docs/trackers) - [Trackers Guide](https://docs.easypost.com/guides/tracking-guide) --- ## Additional Resources ### Carrier Metadata The Carrier Metadata endpoint can programmatically return information about service levels, predefined packages, supported features, and shipment options. Use this information to quickly integrate and make educated decisions about the mix of carriers for shipping needs. Additionally, the Carrier Metadata endpoint is available to retrieve comprehensive information about all carriers on the EasyPost platform, enhancing decision-making for carrier services. ### Support and Troubleshooting In addition to the guidance provided in the Carrier Guides, EasyPost offers support to assist with FAQs, troubleshooting issues, and inquiries related to the EasyPost platform. Visit the Help Center for more information. Related: - [Carrier Metadata](https://docs.easypost.com/docs/carrier-metadata) - [Help Center](https://support.easypost.com/hc/en-us) --- ## Talk to a Shipping Expert For questions about getting started with the EasyPost API please talk to a Shipping Expert or Contact Support. Related: - [Talk to a Shipping Expert](https://www.easypost.com/talk-to-easypost) - [Contact Support](https://support.easypost.com/hc/requests/new) --- Source: https://docs.easypost.com/carriers/purolator-guide # Purolator Guide Purolator is a leading integrated freight, package, and logistics provider, delivering packages to, from, and within Canada. With one of the most extensive networks in Canada, they reach some of the most remote locations, helping businesses to deliver their promises and drive results through customized shipping and supply chain solutions. This guide includes detailed information on utilizing Purolator shipping with the EasyPost API, focusing on account setup, rates, label creation, manifests, tracking, and more. --- ## Carrier Account Setup ### Account Registration Sign up for an EasyPost account to obtain a **Test** and **Production** API key. See Authentication and Key Management for more information. > Note: Negotiated rates are only available in Production mode. ### Carrier Setup Upon sign-up with EasyPost, users gain immediate access to Wallet Carrier Accounts, which can be enabled directly from the Dashboard. For additional carriers, EasyPost supports a Bring Your Own Carrier Account (BYOCA) option. This requires users to register directly with the respective carrier. #### Purolator Account Registration 1. Contact Purolator to request a shipper account. A representative will be in touch for additional details regarding the account. 2. Inform Purolator about using EasyPost's API for label purchases. 3. Acquire rates and align any additional shipping needs. 4. Obtain the following account credentials: 1. Purolator Account Number 2. Production API Key 3. Production API Key Password 5. Input carrier-specific credentials within the EasyPost Carrier Account Dashboard for comprehensive rate access. #### Purolator Account via API The API structure specified by EasyPost can also be used to add the Purolator carrier shipper account. ```shell curl -X POST https://api.easypost.com/v2/carrier_accounts \ -u "$EASYPOST_API_KEY": \ -H 'Content-Type: application/json' \ -d '{ "carrier_account": { "type": "PurolatorAccount", "description": "PurolatorAccount", "credentials": { "account_number": "VALUE", "api_key": "VALUE", "password": "VALUE" } } }' ``` ### Software Requirements Download an EasyPost Client Library or utilize the REST API with cURL. ### Documentation Review Examine the EasyPost Objects section to understand the API's structure, which is critical for constructing requests and interpreting responses. Related: - [Getting Started Guide](https://docs.easypost.com/guides/getting-started) - [Manage Carrier Accounts](https://app.easypost.com/account/settings?tab=carriers) --- ## Billing When using a Purolator BYOCA, shipment charges are billed under the shipper's own Purolator account. --- ## Rates Purolator is a **Live Rating** integration, enabling real-time rate retrieval for shipments created via EasyPost. Rates are guaranteed valid for a minimum of five minutes. - When creating a shipment, EasyPost requests Purolator for shipment rates specific to the user's Purolator account. - The rates provided are directly from Purolator and tailored to the user's specific account details. - In cases of discrepancies or incorrect rates, users are advised to contact their Purolator account representative. - The representative can then update the rates to ensure user account accuracy. --- ## Service Levels Purolator offers the following service levels: Service levels are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=purolator`. Related: - [Service Levels](https://docs.easypost.com/docs/shipments/rates#service-levels) Related: - [Purolator Service Levels](https://docs.easypost.com/docs/shipments/rates?carrier=purolator#service-levels) --- ## Predefined Packages Predefined packages provide a convenient way to classify parcels using carrier-defined package types and retrieve applicable rates. When creating a shipment with the EasyPost API, select a predefined package that matches the parcel's characteristics and provide its weight in ounces when required. See the predefined package documentation for supported values and example requests. Predefined packages are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=purolator`. Related: - [Predefined Packages](https://docs.easypost.com/docs/parcels#predefined-packages) --- ## Generating Shipping Labels With EasyPost, generating shipping labels for Purolator is the same process as generating them for any other carrier. Review the Getting Started Guide for help generating a shipping label. ### One-Call Buys One-call buys enable streamlined label purchasing through the EasyPost API by consolidating multiple operations into a single API request. This feature is designed to simplify and accelerate the shipping process by combining the creation of a shipment, retrieval of rates, and purchasing the shipping label into one efficient step. See Reducing API Response Times for more information. ### Manifests Manifesting is **not** supported or required for Purolator. ### Refunding and Voiding Labels Voiding Purolator labels through the EasyPost API is supported, but requests must be submitted on the same day the label is created. If this timeframe is missed, refunds must be requested directly through a Purolator representative. ### Shipment Options Shipment options are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=purolator`. Related: - [Shipment Options](https://docs.easypost.com/docs/shipments/options) #### Label Formats EasyPost offers native Purolator labels in ZPL, PNG, and PDF formats. Related: - [Shipment Documentation](https://docs.easypost.com/docs/shipments) - [Reducing API Response Times](https://support.easypost.com/hc/en-us/articles/360048825772-Reducing-API-Response-Times) --- ## Hazardous Materials (HAZMAT) The Purolator policy on hazardous materials is not explicitly detailed in this guide. Shippers are advised to contact Purolator directly for specific hazmat inquiries. --- ## Pickups Purolator pickup requests can be made via the EasyPost API. Review the Pickups documentation for details. > Note: Pickups may incur charges; users should consult their Purolator account representative for pricing details. Related: - [Pickups Documentation](https://docs.easypost.com/docs/pickups) --- ## Tracking EasyPost simplifies package tracking by offering two methods: - Tracking with an existing number and carrier. - Using a Tracker included with an EasyPost-purchased shipping label. The service integrates webhooks for timely shipment updates. For detailed information on tracking methods, visit the Tracking Guide. Related: - [Trackers Documentation](https://docs.easypost.com/docs/trackers) - [Trackers Guide](https://docs.easypost.com/guides/tracking-guide) --- ## Additional Resources ### Carrier Metadata The Carrier Metadata endpoint can programmatically return information about service levels, predefined packages, supported features, and shipment options. Use this information to quickly integrate and make educated decisions about the mix of carriers for shipping needs. Additionally, the Carrier Metadata endpoint is available to retrieve comprehensive information about all carriers on the EasyPost platform, enhancing decision-making for carrier services. ### Support and Troubleshooting In addition to the guidance provided in the Carrier Guides, EasyPost offers support to assist with FAQs, troubleshooting issues, and inquiries related to the EasyPost platform. Visit the Help Center for more information. Related: - [Carrier Metadata](https://docs.easypost.com/docs/carrier-metadata) - [Help Center](https://support.easypost.com/hc/en-us) --- ## Talk to a Shipping Expert For questions about getting started with the EasyPost API please talk to a Shipping Expert or Contact Support. Related: - [Talk to a Shipping Expert](https://www.easypost.com/talk-to-easypost) - [Contact Support](https://support.easypost.com/hc/requests/new) --- Source: https://docs.easypost.com/carriers/quick-courier-guide # Quick Courier Guide Since 1976, Quick Courier has been a leading provider of delivery services in Pennsylvania and surrounding areas. From six regional centers throughout Pennsylvania, the Quick Courier team of transportation experts stands ready to meet various shipping needs across town or the country. This guide includes detailed information on utilizing Quick Courier shipping with the EasyPost API, focusing on account setup, rates, label creation, manifests, tracking, and more. --- ## Carrier Account Setup ### Account Registration Sign up for an EasyPost account to obtain a **Test** and **Production** API key. See Authentication and Key Management for more information. > Note: Negotiated rates are only available in Production mode. ### Carrier Setup Upon sign-up with EasyPost, users gain immediate access to Wallet Carrier Accounts, which can be enabled directly from the Dashboard. For additional carriers, EasyPost supports a Bring Your Own Carrier Account (BYOCA) option. This requires users to register directly with the respective carrier. #### Quick Courier Shipper Account Registration 1. Contact Quick Courier to request a shipper account. A representative will be in touch for additional details regarding the account. 2. Inform Quick Courier about using EasyPost's API for label purchases. 3. Acquire rates and align any additional shipping needs. 4. Obtain Quick Courier production and test credentials: 1. Quick Username 2. Quick Password 5. Input carrier-specific credentials within the EasyPost Carrier Account Dashboard for comprehensive rate access. #### Quick Courier Account via API The API structure specified by EasyPost can also be used to add the Quick Courier carrier shipper account. ```shell curl -X POST https://api.easypost.com/v2/carrier_accounts \ -u "$EASYPOST_API_KEY": \ -H 'Content-Type: application/json' \ -d '{ "carrier_account": { "type": "QuickAccount", "description": "QuickAccount", "credentials": { "password": "VALUE", "username": "VALUE" }, "test_credentials": { "password": "VALUE", "username": "VALUE" } } }' ``` ### Software Requirements Download an EasyPost Client Library or utilize the REST API with cURL. ### Documentation Review Examine the EasyPost Objects section to understand the API's structure, which is critical for constructing requests and interpreting responses. Related: - [Getting Started Guide](https://docs.easypost.com/guides/getting-started) - [Manage Carrier Accounts](https://app.easypost.com/account/settings?tab=carriers) --- ## Billing Billing is directly handled by Quick Courier after parcel delivery. EasyPost does not participate in the billing process for Quick Courier services. Contact a Quick Courier representative for details. --- ## Rates Quick Courier is a **Live Rating** integration, enabling real-time rate retrieval for shipments created via EasyPost. Rates are guaranteed valid for a minimum of 5 minutes. - When creating a shipment, EasyPost requests Quick Courier for shipment rates specific to the user's Quick Courier account. - The rates provided are directly from Quick Courier and tailored to the user's specific account details. - In cases of discrepancies or incorrect rates, users are advised to contact their Quick Courier account representative. - The representative can then update the rates in the Quick Courier database to ensure user account accuracy. --- ## Service Levels Quick Courier offers the following services: Service levels are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=quick`. Related: - [Service Levels](https://docs.easypost.com/docs/shipments/rates#service-levels) Related: - [Quick Courier Service Levels](https://docs.easypost.com/docs/shipments/rates?carrier=quick#service-levels) --- ## Predefined Packages Predefined packages provide a convenient way to classify parcels using carrier-defined package types and retrieve applicable rates. When creating a shipment with the EasyPost API, select a predefined package that matches the parcel's characteristics and provide its weight in ounces when required. See the predefined package documentation for supported values and example requests. Predefined packages are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=quick`. Related: - [Predefined Packages](https://docs.easypost.com/docs/parcels#predefined-packages) --- ## Generating Shipping Labels With EasyPost, generating shipping labels for Quick Courier is the same process as generating them for any other carrier. Review the Getting Started Guide for help generating a shipping label. ### One-Call Buys 1-call buys enable streamlined label purchasing through the EasyPost API by consolidating multiple operations into a single API request. This feature is designed to simplify and accelerate the shipping process by combining the creation of a shipment, retrieval of rates, and purchasing the shipping label into one efficient step. See Reducing API Response Times for more information. ### Manifests Manifesting is not supported or required. ### Refunding and Voiding Labels Voiding Quick Courier labels through EasyPost is supported. > Note: The **shipment.tracking_code** is required as it identifies the order within the carrier's system. ### Shipment Options Shipment options are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=quick`. Related: - [Shipment Options](https://docs.easypost.com/docs/shipments/options) #### Label Formats EasyPost offers native Quick Courier labels in ZPL, PNG, and PDF formats. Related: - [Shipment Documentation](https://docs.easypost.com/docs/shipments) - [Reducing API Response Times](https://support.easypost.com/hc/en-us/articles/360048825772-Reducing-API-Response-Times) --- ## Hazardous Materials (HAZMAT) The Quick Courier policy on hazardous materials is not explicitly detailed. Shippers are advised to contact Quick Courier directly for specific guidelines and compliance requirements. --- ## Pickups Quick Courier accommodates pickups based on individual agreements with customers. While regular pickups can be arranged directly with Quick Courier during the account registration process, they **cannot be scheduled via the EasyPost API**. --- ## Tracking EasyPost simplifies package tracking by offering two methods: - Tracking with an existing number and carrier. - Using a Tracker included with an EasyPost-purchased shipping label. The service integrates webhooks for timely shipment updates. For detailed information on tracking methods, visit the Tracking Guide. Related: - [Trackers Documentation](https://docs.easypost.com/docs/trackers) - [Trackers Guide](https://docs.easypost.com/guides/tracking-guide) --- ## Additional Resources ### Carrier Metadata The Carrier Metadata endpoint can programmatically return information about service levels, predefined packages, supported features, and shipment options. Use this information to quickly integrate and make educated decisions about the mix of carriers for shipping needs. Additionally, the Carrier Metadata endpoint is available to retrieve comprehensive information about all carriers on the EasyPost platform, enhancing decision-making for carrier services. ### Support and Troubleshooting In addition to the guidance provided in the Carrier Guides, EasyPost offers support to assist with FAQs, troubleshooting issues, and inquiries related to the EasyPost platform. Visit the Help Center for more information. Related: - [Carrier Metadata](https://docs.easypost.com/docs/carrier-metadata) - [Help Center](https://support.easypost.com/hc/en-us) --- ## Talk to a Shipping Expert For questions about getting started with the EasyPost API please talk to a Shipping Expert or Contact Support. Related: - [Talk to a Shipping Expert](https://www.easypost.com/talk-to-easypost) - [Contact Support](https://support.easypost.com/hc/requests/new) --- Source: https://docs.easypost.com/carriers/roadie-guide # Roadie Guide Roadie is a delivery platform that facilitates same-day, urgent, and scheduled deliveries within the United States. It supports the transportation of groceries, perishable goods, and other shipments on behalf of independent retailers. Roadie enables the fast and reliable delivery of large items through the nation's largest local same-day network, helping businesses provide high-performance delivery experiences. This guide provides detailed information on utilizing Roadie shipping with the EasyPost API, covering account setup, rates, label creation, manifests, tracking, and more. For operational details, shipment nuances, and frequently asked questions, refer to the Roadie Carrier Support and FAQs article. Related: - [Roadie Carrier Support and FAQs](https://support.easypost.com/hc/en-us/articles/39537442618381-Roadie-Carrier-Support-and-FAQs) --- ## Carrier Account Setup ### Account Registration Sign up for an EasyPost account to obtain a **Test** and **Production** API key. See Authentication and Key Management for more information. > Note: Negotiated rates are only available in Production mode. ### Carrier Setup #### Roadie Shipper Account Registration 1. Contact Roadie to request a shipper account. A representative will be in touch for additional details regarding the account. 2. Inform Roadie about using EasyPost's API for label purchases. 3. Acquire rates and align any additional shipping needs. 4. Obtain the following account credentials: 1. Roadie access token 5. Input carrier-specific credentials within the EasyPost Carrier Account Dashboard for comprehensive rate access. #### Roadie Account via API The API structure specified by EasyPost can also be used to add the Roadie carrier shipper account. ```shell curl -X POST https://api.easypost.com/v2/carrier_accounts \ -u "$EASYPOST_API_KEY": \ -H 'Content-Type: application/json' \ -d '{ "carrier_account": { "type": "RoadieAccount", "description": "RoadieAccount", "credentials": { "access_token": "VALUE", "service_level": "VALUE" }, "test_credentials": { "access_token": "VALUE", "service_level": "VALUE" } } }' ``` ### Software Requirements Download an EasyPost Client Library or utilize the REST API with cURL. ### Documentation Review Examine the EasyPost Objects section to understand the API's structure, which is critical for constructing requests and interpreting responses. Related: - [Getting Started Guide](https://docs.easypost.com/guides/getting-started) - [Manage Carrier Accounts](https://app.easypost.com/account/settings?tab=carriers) --- ## Billing When using a Roadie BYOCA, shipment charges are billed under the shipper's own Roadie account. --- ## Rates Roadie is a **Live Rating** integration, enabling real-time rate retrieval for shipments created via EasyPost. Rates are guaranteed valid for a minimum of five minutes. - When creating a shipment, EasyPost requests Roadie for shipment rates specific to the user's Roadie account. - The rates provided are directly from Roadie and tailored to the user's specific account details. - In cases of discrepancies or incorrect rates, users are advised to contact their Roadie account representative. --- ## Service Levels Roadie offers the following service levels: Service levels are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=roadie`. Related: - [Service Levels](https://docs.easypost.com/docs/shipments/rates#service-levels) ### Coverage Area Roadie operates in all 50 U.S. states and reaches approximately 97% of U.S. households. --- ## Predefined Packages Predefined packages provide a convenient way to classify parcels using carrier-defined package types and retrieve applicable rates. When creating a shipment with the EasyPost API, select a predefined package that matches the parcel's characteristics and provide its weight in ounces when required. See the predefined package documentation for supported values and example requests. Predefined packages are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=roadie`. Related: - [Predefined Packages](https://docs.easypost.com/docs/parcels#predefined-packages) --- ## Generating Shipping Labels With EasyPost, generating shipping labels for Roadie is the same process as generating them for any other carrier. Review the Getting Started Guide for help generating a shipping label. ### Manifests Manifesting is not supported or required for Roadie. ### Refunding and Voiding Labels Voiding Roadie labels through EasyPost is supported. ### Shipment Options Shipment options are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=roadie`. Related: - [Shipment Options](https://docs.easypost.com/docs/shipments/options) Roadie supports several shipment options via the EasyPost API, such as delivery confirmation levels, recipient SMS notifications, and container requirements. For complete details see: Roadie Carrier Support and FAQs. #### Label Formats EasyPost offers Roadie labels in PNG, PDF, and ZPL formats. Related: - [Shipment Documentation](https://docs.easypost.com/docs/shipments) - [Roadie Support and FAQs](https://support.easypost.com/hc/en-us/articles/39537442618381-Roadie-Carrier-Support-and-FAQs) --- ## Hazardous Materials (HAZMAT) This guide does not specify handling hazardous materials with Roadie. Shippers are advised to contact Roadie directly for hazmat inquiries. --- ## Pickups Roadie accommodates pickups based on individual agreements with customers. While regular pickups can be arranged directly with Roadie during the account registration process, they **cannot be scheduled via the EasyPost API**. --- ## Tracking EasyPost simplifies package tracking by offering two methods: - Tracking with an existing number and carrier. - Using a Tracker included with an EasyPost-purchased shipping label. The service integrates webhooks for timely shipment updates. For detailed information on tracking methods, visit the Tracking Guide. Related: - [Trackers Documentation](https://docs.easypost.com/docs/trackers) - [Trackers Guide](https://docs.easypost.com/guides/tracking-guide) --- ## Additional Resources ### Carrier Metadata The Carrier Metadata endpoint can programmatically return information about service levels, predefined packages, supported features, and shipment options. Use this information to quickly integrate and make educated decisions about the mix of carriers for shipping needs. Additionally, the Carrier Metadata endpoint is available to retrieve comprehensive information about all carriers on the EasyPost platform, enhancing decision-making for carrier services. ### Support and Troubleshooting In addition to the guidance provided in the Carrier Guides, EasyPost offers support to assist with FAQs, troubleshooting issues, and inquiries related to the EasyPost platform. Visit the Help Center for more information. Related: - [Carrier Metadata](https://docs.easypost.com/docs/carrier-metadata) - [Help Center](https://support.easypost.com/hc/en-us) --- ## Talk to a Shipping Expert For questions about getting started with the EasyPost API please talk to a Shipping Expert or Contact Support. Related: - [Talk to a Shipping Expert](https://www.easypost.com/talk-to-easypost) - [Contact Support](https://support.easypost.com/hc/requests/new) --- Source: https://docs.easypost.com/carriers/rover-guide # Rover Guide Rover offers multi-mode, customizable solutions to meet present-day transportation needs through a sweeping pool of qualified outside transporters. This guide includes detailed information on utilizing Rover shipping with the EasyPost API, focusing on account setup, rates, label creation, manifests, tracking, and more. --- ## Carrier Account Setup ### Account Registration Sign up for an EasyPost account to obtain a **Test** and **Production** API key. See Authentication and Key Management for more information. > Note: Negotiated rates are only available in Production mode. ### Carrier Setup Upon sign-up with EasyPost, users gain immediate access to Wallet Carrier Accounts, which can be enabled directly from the Dashboard. For additional carriers, EasyPost supports a Bring Your Own Carrier Account (BYOCA) option. This requires users to register directly with the respective carrier. #### Rover Shipper Account Registration 1. Contact Rover to request a shipper account. A representative will be in touch for additional details regarding the account. 2. Inform Rover about using EasyPost's API for label purchases. 3. Obtain the following production and test credentials: 1. Rover Password 2. Rover Username 4. Input carrier-specific credentials within the EasyPost Carrier Account Dashboard for comprehensive rate access. #### Rover Account via API The API structure specified by EasyPost can also be used to add the Rover carrier shipper account. ```shell curl -X POST https://api.easypost.com/v2/carrier_accounts \ -u "$EASYPOST_API_KEY": \ -H 'Content-Type: application/json' \ -d '{ "carrier_account": { "type": "RoverAccount", "description": "RoverAccount", "credentials": { "password": "VALUE", "username": "VALUE" }, "test_credentials": { "password": "VALUE", "username": "VALUE" } } }' ``` ### Software Requirements Download an EasyPost Client Library or utilize the REST API with cURL. ### Documentation Review Examine the EasyPost Objects section to understand the API's structure, which is critical for constructing requests and interpreting responses. Related: - [Getting Started Guide](https://docs.easypost.com/guides/getting-started) - [Manage Carrier Accounts](https://app.easypost.com/account/settings?tab=carriers) --- ## Billing Billing is directly handled by Rover using a bill-on-delivery system. EasyPost does not participate in the billing process for Rover services. Contact a Rover representative for details. --- ## Rates ### Default Rate Display EasyPost always returns a $0.01 placeholder rate for Rover shipments. Live postage rates are not returned through this integration. Rover bills the actual postage through its billing system. --- ## Service Levels Rover offers the following services: Service levels are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=rover`. Related: - [Service Levels](https://docs.easypost.com/docs/shipments/rates#service-levels) Related: - [Rover Service Levels](https://docs.easypost.com/docs/shipments/rates?carrier=rover#service-levels) --- ## Predefined Packages Predefined packages provide a convenient way to classify parcels using carrier-defined package types and retrieve applicable rates. When creating a shipment with the EasyPost API, select a predefined package that matches the parcel's characteristics and provide its weight in ounces when required. See the predefined package documentation for supported values and example requests. Predefined packages are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=rover`. Related: - [Predefined Packages](https://docs.easypost.com/docs/parcels#predefined-packages) --- ## Generating Shipping Labels With EasyPost, generating shipping labels for Rover is the same process as generating them for any other carrier. Review the Getting Started Guide for help generating a shipping label. ### One-Call Buys 1-call buys enable streamlined label purchasing through the EasyPost API by consolidating multiple operations into a single API request. This feature is designed to simplify and accelerate the shipping process by combining the creation of a shipment, retrieval of rates, and purchasing the shipping label into one efficient step. See Reducing API Response Times for more information. ### Manifests Manifesting is **not** supported or required. ### Refunding and Voiding Labels Voiding Rover labels through EasyPost is supported. ### Shipment Options Shipment options are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=rover`. Related: - [Shipment Options](https://docs.easypost.com/docs/shipments/options) #### Label Formats EasyPost offers native Rover labels in ZPL, PNG, and PDF formats. Related: - [Shipment Documentation](https://docs.easypost.com/docs/shipments) - [Reducing API Response Times](https://support.easypost.com/hc/en-us/articles/360048825772-Reducing-API-Response-Times) --- ## Hazardous Materials (HAZMAT) The Rover policy on hazardous materials is not explicitly detailed in this guide. Shippers are advised to contact Rover directly for specific hazmat inquiries. --- ## Pickups Rover accommodates pickups based on individual agreements with customers. While regular pickups can be arranged directly with Rover during the account registration process, they **cannot be scheduled via the EasyPost API**. --- ## Tracking EasyPost simplifies package tracking by offering two methods: - Tracking with an existing number and carrier. - Using a Tracker included with an EasyPost-purchased shipping label. The service integrates webhooks for timely shipment updates. For detailed information on tracking methods, visit the Tracking Guide. Related: - [Trackers Documentation](https://docs.easypost.com/docs/trackers) - [Trackers Guide](https://docs.easypost.com/guides/tracking-guide) --- ## Additional Resources ### Carrier Metadata The Carrier Metadata endpoint can programmatically return information about service levels, predefined packages, supported features, and shipment options. Use this information to quickly integrate and make educated decisions about the mix of carriers for shipping needs. Additionally, the Carrier Metadata endpoint is available to retrieve comprehensive information about all carriers on the EasyPost platform, enhancing decision-making for carrier services. ### Support and Troubleshooting In addition to the guidance provided in the Carrier Guides, EasyPost offers support to assist with FAQs, troubleshooting issues, and inquiries related to the EasyPost platform. Visit the Help Center for more information. Related: - [Carrier Metadata](https://docs.easypost.com/docs/carrier-metadata) - [Help Center](https://support.easypost.com/hc/en-us) --- ## Talk to a Shipping Expert For questions about getting started with the EasyPost API please talk to a Shipping Expert or Contact Support. Related: - [Talk to a Shipping Expert](https://www.easypost.com/talk-to-easypost) - [Contact Support](https://support.easypost.com/hc/requests/new) --- Source: https://docs.easypost.com/carriers/royal-mail-guide # Royal Mail Guide Royal Mail is an established brand with more than 500 years of history, from its beginning as a postal service exclusively for the King and his Court to the international delivery service it is today. This guide provides detailed information on utilizing Royal Mail shipping with the EasyPost API, focusing on account setup, rates, label creation, tracking, and more. --- ## Carrier Account Setup ### Account Registration Sign up for an EasyPost account to obtain a **Test** and **Production** API key. See Authentication and Key Management for more information. > Note: Negotiated rates are only available in Production mode. ### Carrier Setup #### Carrier Registration For Royal Mail OBA (online business account) registration, visit Royal Mail OBA Registration. #### Onboarding with EasyPost As an approved Royal Mail vendor, EasyPost **requires** Royal Mail accounts to undergo an onboarding process. Extra verification steps are required for account security during Royal Mail onboarding. This process, involving coordination with Royal Mail, can take up to two weeks. > Note: A designated support liaison is **required** for handling all Royal Mail issues, which EasyPost facilitates. #### Adding a Royal Mail Account 1. Navigate to the Carrier Accounts page on the EasyPost dashboard and select **Add Carrier**. 2. Select Royal Mail and provide the following: 1. **Reference:** A custom reference used for documentation purposes. 2. **Description:** A custom description used for documentation purposes. 3. **Royal Mail Account Number:** If unknown, contact a Royal Mail representative. 4. **OBA Email Address:** The email registered with the Royal Mail account. 5. **Posting Location Number (PLN):** A 10-digit number starting with 90, available from Royal Mail. #### Contact EasyPost Support After adding Royal Mail account details to the EasyPost dashboard, contact EasyPost Support to begin the onboarding process. Provide the following details to expedite the process: - OBA Email Address - PLN Number Upon completion of the onboarding process, the following services will have been loaded and available for use: - RoyalMail - InternationalSigned - InternationalTracked - InternationalTrackedAndSigned - SpecialDeliveryGuaranteed1pm - SpecialDeliveryGuaranteed9am #### Additional Contracted Services Enabling additional contracted Royal Mail services in EasyPost is a separate process that can only be done once onboarding has been completed. - To enable additional contracted services post-onboarding, provide EasyPost with the contract numbers (four digits plus “TS” or “TN”) associated with each service. - Request contract numbers from business.customer.service@royalmail.com. #### Royal Mail Account via API The API structure specified by EasyPost can also be used to add a Royal Mail carrier account. ```shell curl -X POST https://api.easypost.com/v2/carrier_accounts \ -u "$EASYPOST_API_KEY": \ -H 'Content-Type: application/json' \ -d '{ "carrier_account": { "type": "RoyalMailAccount", "description": "RoyalMailAccount", "credentials": { "account_number": "VALUE", "posting_location_number": "VALUE", "username": "VALUE" } } }' ``` ### Software Requirements Download an EasyPost Client Library or utilize the REST API with cURL. ### Documentation Review Examine the EasyPost Objects section to understand the API's structure, which is critical for constructing requests and interpreting responses. Related: - [Getting Started Guide](https://docs.easypost.com/guides/getting-started) - [Manage Carrier Accounts](https://app.easypost.com/account/settings?tab=carriers) --- ## Billing - Royal Mail will charge the appropriate amount for postage via their billing system. --- ## Rates While Royal Mail does not offer real-time rates, generic rates are returned for some of the default services onboarded. ### Default Rate Display - Services not covered under default offerings are set at a rate of $0.01 unless negotiated rates are available. ### Rate Table - To obtain negotiated rates, contact a Royal Mail representative. - Request the negotiated rate tables along with the account number for verification. ### Rate Table Integration - Once the rate table is received from Royal Mail, users should contact EasyPost support at support@easypost.com for assistance installing this rate table to their account. - This enables the provision of accurate Royal Mail rates within the EasyPost platform. --- ## Service Levels Royal Mail has several service levels supported by EasyPost: Service levels are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=royalmail`. Related: - [Service Levels](https://docs.easypost.com/docs/shipments/rates#service-levels) Related: - [Royal Mail Service Levels](https://docs.easypost.com/docs/shipments/rates?carrier=royalmail#service-levels) --- ## Predefined Packages Predefined packages provide a convenient way to classify parcels using carrier-defined package types and retrieve applicable rates. When creating a shipment with the EasyPost API, select a predefined package that matches the parcel's characteristics and provide its weight in ounces when required. See the predefined package documentation for supported values and example requests. Predefined packages are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=royalmail`. Related: - [Predefined Packages](https://docs.easypost.com/docs/parcels#predefined-packages) --- ## Generating Shipping Labels With EasyPost, the process for generating shipping labels for Royal Mail is the same as generating them for any other carrier. Review the Getting Started Guide for help generating a shipping label. ### Manifests Manifesting is supported and **required** for Royal Mail. Please visit Royal Mail Manifesting for additional information. ### Shipment Options Shipment options are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=royalmail`. Related: - [Shipment Options](https://docs.easypost.com/docs/shipments/options) Related: - [Shipment Documentation](https://docs.easypost.com/docs/shipments) - [Reducing API Response Times](https://support.easypost.com/hc/en-us/articles/360048825772-Reducing-API-Response-Times) --- ## Hazardous Materials (HAZMAT) This guide does not specify handling hazardous materials with Royal Mail. Shippers are advised to contact support@easypost.com directly for hazmat inquiries. --- ## Pickups Royal Mail accommodates pickups based on individual agreements with customers. While regular pickups can be arranged directly with Royal Mail during the account registration process, they **cannot be scheduled via the EasyPost API**. --- ## Tracking EasyPost simplifies package tracking by offering two methods: - Tracking with an existing number and carrier. - Using a Tracker included with an EasyPost-purchased shipping label. The service integrates webhooks for timely shipment updates. For detailed information on tracking methods, visit the Tracking Guide. Related: - [Trackers Documentation](https://docs.easypost.com/docs/trackers) - [Trackers Guide](https://docs.easypost.com/guides/tracking-guide) --- ## Additional Resources ### Carrier Metadata The Carrier Metadata endpoint can programmatically return information about service levels, predefined packages, supported features, and shipment options. Use this information to quickly integrate and make educated decisions about the mix of carriers for shipping needs. Additionally, the Carrier Metadata endpoint is available to retrieve comprehensive information about all carriers on the EasyPost platform, enhancing decision-making for carrier services. ### Support and Troubleshooting In addition to the guidance provided in the Carrier Guides, EasyPost offers support to assist with FAQs, troubleshooting issues, and inquiries related to the EasyPost platform. Visit the Help Center for more information. Related: - [Carrier Metadata](https://docs.easypost.com/docs/carrier-metadata) - [Help Center](https://support.easypost.com/hc/en-us) --- ## Talk to a Shipping Expert For questions about getting started with the EasyPost API please talk to a Shipping Expert or Contact Support. Related: - [Talk to a Shipping Expert](https://www.easypost.com/talk-to-easypost) - [Contact Support](https://support.easypost.com/hc/requests/new) --- Source: https://docs.easypost.com/carriers/royal-mail-v3-guide # Royal Mail v3 Guide Royal Mail v3 is an established brand with more than 500 years of history, from its beginning as a postal service exclusively for the King and his Court to the international delivery service it is today. This guide provides detailed information on utilizing Royal Mail v3 shipping with the EasyPost API, focusing on account setup, rates, label creation, pickups, tracking, and more. **Parcelforce Customers:** Parcelforce services are now available through Royal Mail v3. Contact Royal Mail to apply for an account, then add Royal Mail v3 to your EasyPost integration to continue shipping with Parcelforce. For operational details, shipment nuances, and frequently asked questions, refer to the Royal Mail v3 Carrier Support and FAQs article. Related: - [Royal Mail v3 Carrier Support and FAQs](https://support.easypost.com/hc/en-us/articles/40544613053581-Royal-Mail-v3-Carrier-Support-and-FAQs) --- ## Carrier Account Setup ### Account Registration Sign up for an EasyPost account to obtain a **Test** and **Production** API key. See Authentication and Key Management for more information. > Note: Negotiated rates are only available in Production mode. ### Onboarding with EasyPost As an approved Royal Mail vendor, Royal Mail **requires** new carrier accounts to undergo an onboarding process. Extra verification steps are required during Royal Mail v3 onboarding. > Note: A designated support liaison is **required** for handling all Royal Mail issues, which EasyPost facilitates. #### Adding a Royal Mail v3 Account This option is for new users or customers who have not received an email from EasyPost with credentials to migrate to Royal Mail v3. If migrating from Royal Mail to Royal Mail v3, see instructions below. > Note: Registration with Royal Mail's Online Business Account (OBA) is **required** before a Royal Mail v3 account can be processed. To register, visit the Royal Mail OBA registration page. 1. Navigate to the Carrier Accounts page on the EasyPost dashboard and select **Add Carrier**. 2. Select Royal Mail v3 and provide the following: 1. `account_number`: If unknown, contact a Royal Mail v3 representative. 2. `oba_email_address`: The email registered with the Royal Mail account. 3. `posting_location_number`: A 10-digit number starting with 90, available from Royal Mail. 4. `oba_access_code`: Royal Mail Online Business Account, this will be automatically added once the account is approved. Leave this field blank. 5. `contact_name` 6. `contact_phone` 7. `dispatch_street1`: Primary address from which shipments will be sent. 8. `dispatch_street2 `: Additional address from which shipments will be sent. 9. `dispatch_city`: City from which shipments will be sent. 10. `dispatch_zip`: ZIP code of the shipment origin. 11. `dispatch_state`: State from which shipments will be sent. 12. `dispatch_country`: Country from which shipments will be sent. 13. `registered_billing_postcode`: Postcode registered with Royal Mail for invoicing. > Note: The `registered_billing_postcode` field is required for all **new** Royal Mail v3 carrier accounts. This field must match the value provided by Royal Mail. **Existing accounts do not require updates**. #### Migrate from an existing EasyPost Royal Mail account to Royal Mail v3 This option is for users who have an **existing** EasyPost Royal Mail account and have received an email **containing the credentials** needed to migrate to Royal Mail v3. 1. Navigate to the Carrier Accounts page on the EasyPost dashboard and select **Add Carrier**. 2. Select Royal Mail v3 and provide the following: 1. `account_number`: Provided in the email received from EasyPost. 2. `oba_email_address`: Provided in the email received from EasyPost. 3. `posting_location_number`: Provided in the email received from EasyPost. 4. `oba_access_code`: Provided in the email received from EasyPost. 5. `contact_name` 6. `contact_phone` 7. `dispatch_street1`: Primary address from which shipments will be sent. 8. `dispatch_street2 `: Additional address from which shipments will be sent. 9. `dispatch_city`: City from which shipments will be sent. 10. `dispatch_zip`: ZIP code of the shipment origin. 11. `dispatch_state`: State from which shipments will be sent. 12. `dispatch_country`: Country from which shipments will be sent. 13. `registered_billing_postcode`: Postcode registered with Royal Mail for invoicing. 3. Once the credentials are filled in and saved, the Royal Mail v3 carrier is ready to ship. For additional information, see the Royal Mail vs. Royal Mail v3: Key Differences support article. ### Royal Mail v3 Account via API The API structure specified by EasyPost can also be used to add the Royal Mail v3 carrier shipper account. ```shell curl -X POST https://api.easypost.com/v2/carrier_accounts \ -u "$EASYPOST_API_KEY": \ -H 'Content-Type: application/json' \ -d '{ "carrier_account": { "type": "RoyalMailV3Account", "description": "RoyalMailV3Account", "credentials": { "account_number": "VALUE", "contact_name": "VALUE", "contact_phone": "VALUE", "dispatch_city": "VALUE", "dispatch_country": "VALUE", "dispatch_state": "VALUE", "dispatch_street1": "VALUE", "dispatch_street2": "VALUE", "dispatch_zip": "VALUE", "internal_location_id": "VALUE", "oba_access_code": "VALUE", "oba_email_address": "VALUE", "posting_location_number": "VALUE", "registered_billing_postcode": "VALUE" } } }' ``` ### Software Requirements Download an EasyPost Client Library or utilize the REST API with cURL. ### Documentation Review Examine the EasyPost Objects section to understand the API's structure, which is critical for constructing requests and interpreting responses. Related: - [Getting Started Guide](https://docs.easypost.com/guides/getting-started) - [Manage Carrier Accounts](https://app.easypost.com/account/settings?tab=carriers) --- ## Billing Billing is directly handled by Royal Mail after parcel delivery. EasyPost does not participate in the billing process for Royal Mail services. Contact a Royal Mail representative for details. --- ## Rates While Royal Mail v3 does not offer real-time rates, generic rates are returned for some of the default services onboarded. ### Default Rate Display - Services not covered under default offerings are set at a rate of $0.01 unless negotiated rates are available. - Royal Mail v3 will charge the appropriate amount for postage via their billing system. ### Rate Card - To obtain negotiated rates, contact a Royal Mail v3 representative. - Request the negotiated rate card along with the account number for verification. Inform the representative that the integration uses Intersoft to ensure the appropriate rate card is received. - To verify that the appropriate rate card is received, please see the rates section of the Royal Mail vs. Royal Mail v3: Key Differences help center article. ### Rate Card Integration - Once the rate card is received from Royal Mail v3, users should contact EasyPost support at support@easypost.com for assistance installing this rate card into their account. - This enables the provision of accurate Royal Mail v3 rates within the EasyPost platform. --- ## Service Levels Royal Mail v3 supports all service levels offered by Royal Mail. Royal Mail offers the following service levels: > Note: Please note that the service levels for Royal Mail v3 have been updated and some may require specific options. Review the Royal Mail vs. Royal Mail v3: Key Differences help center article for details. Service levels are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=royalmailv3`. Related: - [Service Levels](https://docs.easypost.com/docs/shipments/rates#service-levels) ### Coverage Area Royal Mail v3 provides service within the United Kingdom and to over 230 countries and territories. Complete details on delivery destinations are available in the Royal Mail Country Sending Guides or the Tracked and Signature Services Coverage page. ![Map indicating Royal Mail coverage area](https://docs.easypost.com/images/guides/royal-mail-v3/royal-mail-v3-service-availability-map.png) [Content omitted: related links and resources. Review the rendered documentation for navigation links.] --- ## Predefined Packages Predefined packages provide a convenient way to classify parcels using carrier-defined package types and retrieve applicable rates. When creating a shipment with the EasyPost API, select a predefined package that matches the parcel's characteristics and provide its weight in ounces when required. See the predefined package documentation for supported values and example requests. Predefined packages are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=royalmailv3`. Related: - [Predefined Packages](https://docs.easypost.com/docs/parcels#predefined-packages) --- ## Generating Shipping Labels With EasyPost, generating shipping labels for Royal Mail is the same process as generating them for any other carrier. Review the Getting Started Guide for help generating a shipping label. ### One-Call Buys One-call buys enable streamlined label purchasing through the EasyPost API by consolidating multiple operations into a single API request. This feature is designed to simplify and accelerate the shipping process by combining the creation of a shipment, retrieval of rates, and purchasing the shipping label into one efficient step. See Reducing API Response Times for more information. ### Manifests Manifesting is supported and required for Royal Mail v3. Please visit Royal Mail Manifesting for additional information. > Note: Return shipments cannot be manifested. ### Refunding and Voiding Labels Voiding Royal Mail v3 labels through EasyPost is supported. > Note: Return shipments cannot be voided. The shipment will not be billed unless the label is used. ### Shipment Options Shipment options are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=royalmailv3`. Related: - [Shipment Options](https://docs.easypost.com/docs/shipments/options) #### Label Formats EasyPost offers native Royal Mail v3 labels in ZPL, PNG, and PDF formats. Related: - [Shipment Documentation](https://docs.easypost.com/docs/shipments) - [Reducing API Response Times](https://support.easypost.com/hc/en-us/articles/360048825772-Reducing-API-Response-Times) --- ## Hazardous Materials (HAZMAT) Royal Mail v3 supports hazardous materials shipping, review the options section of the Royal Mail vs. Royal Mail v3: Key Differences help center article for details. Shippers are advised to contact support@easypost.com directly for hazmat inquiries. --- ## Pickups Royal Mail v3 accommodates pickups based on individual agreements with customers. While regular pickups can be arranged directly with Royal Mail during the account registration process, they **cannot be scheduled via the EasyPost API**. --- ## Tracking EasyPost simplifies package tracking by offering two methods: - Tracking with an existing number and carrier. - Using a Tracker included with an EasyPost-purchased shipping label. The service integrates webhooks for timely shipment updates. For detailed information on tracking methods, visit the Tracking Guide. Related: - [Trackers Documentation](https://docs.easypost.com/docs/trackers) - [Trackers Guide](https://docs.easypost.com/guides/tracking-guide) --- ## Additional Resources ### Carrier Metadata The Carrier Metadata endpoint can programmatically return information about service levels, predefined packages, supported features, and shipment options. Use this information to quickly integrate and make educated decisions about the mix of carriers for shipping needs. Additionally, the Carrier Metadata endpoint is available to retrieve comprehensive information about all carriers on the EasyPost platform, enhancing decision-making for carrier services. ### Support and Troubleshooting In addition to the guidance provided in the Carrier Guides, EasyPost offers support to assist with FAQs, troubleshooting issues, and inquiries related to the EasyPost platform. Visit the Help Center for more information. Related: - [Carrier Metadata](https://docs.easypost.com/docs/carrier-metadata) - [Help Center](https://support.easypost.com/hc/en-us) --- ## Talk to a Shipping Expert For questions about getting started with the EasyPost API please talk to a Shipping Expert or Contact Support. Related: - [Talk to a Shipping Expert](https://www.easypost.com/talk-to-easypost) - [Contact Support](https://support.easypost.com/hc/requests/new) --- Source: https://docs.easypost.com/carriers/seko-omniparcel-guide # SEKO OmniParcel Guide SEKO OmniParcel (aka OmniParcel) is a division of SEKO Logistics, specializing in global ecommerce and cross-border shipping solutions. They leverage advanced logistics technology and a network of partnerships to offer seamless and efficient shipping services. This guide includes detailed information on utilizing OmniParcel shipping with the EasyPost API, focusing on account setup, rates, label creation, manifests, tracking, and more. --- ## Carrier Account Setup ### Account Registration Sign up for an EasyPost account to obtain a **Test** and **Production** API key. See Authentication and Key Management for more information. > Note: Negotiated rates are only available in Production mode. ### Carrier Setup Upon sign-up with EasyPost, users gain immediate access to Wallet Carrier Accounts, which can be enabled directly from the Dashboard. For additional carriers, EasyPost supports a Bring Your Own Carrier Account (BYOCA) option. This requires users to register directly with the respective carrier. #### OmniParcel Shipper Account Registration 1. Contact OmniParcel to request a shipper account. A representative will be in touch for additional details regarding the account. 2. Inform OmniParcel about using EasyPost's API for label purchases. 3. Acquire rates and align any additional shipping needs. 4. OmniParcel will provide a set of four API keys, each designated for specific shipping operations: 1. **Production Outbound Shipments API Key:** Used for live shipments. 2. **Test Outbound Shipments API Key:** Used for testing outbound shipments. 3. **Production Return Shipments API Key:** Used for live return shipments. 4. **Test Return Shipments API Key:** Used for testing return shipments. Each API Key will be enabled by OmniParcel for a single origin country, allowing shipments only from the specified country. Each API key must also be enabled for the destination countries to which shipments are planned. 5. Input carrier-specific credentials within the EasyPost Carrier Account Dashboard for comprehensive rate access. #### OmniParcel Account via API The API structure specified by EasyPost can also be used to add the OmniParcel carrier shipper account. ```shell curl -X POST https://api.easypost.com/v2/carrier_accounts \ -u "$EASYPOST_API_KEY": \ -H 'Content-Type: application/json' \ -d '{ "carrier_account": { "type": "OmniParcelAccount", "description": "OmniParcelAccount", "credentials": { "api_access_key": "VALUE", "return_api_access_key": "VALUE" }, "test_credentials": { "api_access_key": "VALUE", "return_api_access_key": "VALUE" } } }' ``` ### Software Requirements Download an EasyPost Client Library or utilize the REST API with cURL. ### Documentation Review Examine the EasyPost Objects section to understand the API's structure, which is critical for constructing requests and interpreting responses. Related: - [Getting Started Guide](https://docs.easypost.com/guides/getting-started) - [Manage Carrier Accounts](https://app.easypost.com/account/settings?tab=carriers) --- ## Billing When using an OmniParcel BYOCA, shipment charges are billed under the shipper's own OmniParcel account. --- ## Rates OmniParcel is a **Live Rating** integration, enabling real-time rate retrieval for shipments created via EasyPost. Rates are guaranteed valid for a minimum of five minutes. - When creating a shipment, EasyPost requests OmniParcel for shipment rates specific to the user's OmniParcel account. - The rates provided are directly from OmniParcel and tailored to the user's specific account details. - In cases of discrepancies or incorrect rates, users are advised to contact their OmniParcel account representative. - The representative can then update the rates to ensure user account accuracy. > Note: For OmniParcel requests to be processed successfully, the `state` field must be completed. If the origin or destination lacks a corresponding state, the city name must be entered in **both** the `city` and `state` fields. --- ## Service Levels OmniParcel offers the following service levels: Service levels are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=sekoomniparcel`. Related: - [Service Levels](https://docs.easypost.com/docs/shipments/rates#service-levels) Related: - [OmniParcel Service Levels](https://docs.easypost.com/docs/shipments/rates?carrier=sekoomniparcel#service-levels) --- ## Predefined Packages Predefined packages provide a convenient way to classify parcels using carrier-defined package types and retrieve applicable rates. When creating a shipment with the EasyPost API, select a predefined package that matches the parcel's characteristics and provide its weight in ounces when required. See the predefined package documentation for supported values and example requests. Predefined packages are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=sekoomniparcel`. Related: - [Predefined Packages](https://docs.easypost.com/docs/parcels#predefined-packages) --- ## Generating Shipping Labels With EasyPost, generating shipping labels for OmniParcel is the same process as generating them for any other carrier. Review the Getting Started Guide for help generating a shipping label. ### Manifests Manifesting is supported for OmniParcel. ### Returns To create an international return via OmniParcel, a domestic return must be initiated to send the package back to a designated OmniParcel warehouse. Upon receipt at the warehouse, OmniParcel uses the API key associated with the package to determine its final destination. The package is then forwarded to its final destination. ### Refunding and Voiding Labels Voiding OmniParcel labels through EasyPost is supported. ### Shipment Options Shipment options are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=sekoomniparcel`. Related: - [Shipment Options](https://docs.easypost.com/docs/shipments/options) #### Label Formats EasyPost offers OmniParcel labels in ZPL, PNG, and PDF formats. Related: - [Shipment Documentation](https://docs.easypost.com/docs/shipments) --- ## Hazardous Materials (HAZMAT) The OmniParcel policy on hazardous materials is not explicitly detailed in this guide. Shippers are advised to contact OmniParcel directly for specific hazmat inquiries. --- ## Pickups OmniParcel accommodates pickups based on individual agreements with customers. While regular pickups can be arranged directly with OmniParcel during the account registration process, they **cannot be scheduled via the EasyPost API**. --- ## Tracking EasyPost simplifies package tracking by offering two methods: - Tracking with an existing number and carrier. - Using a Tracker included with an EasyPost-purchased shipping label. The service integrates webhooks for timely shipment updates. For detailed information on tracking methods, visit the Tracking Guide. Related: - [Trackers Documentation](https://docs.easypost.com/docs/trackers) - [Trackers Guide](https://docs.easypost.com/guides/tracking-guide) --- ## Additional Resources ### Carrier Metadata The Carrier Metadata endpoint can programmatically return information about service levels, predefined packages, supported features, and shipment options. Use this information to quickly integrate and make educated decisions about the mix of carriers for shipping needs. Additionally, the Carrier Metadata endpoint is available to retrieve comprehensive information about all carriers on the EasyPost platform, enhancing decision-making for carrier services. ### Support and Troubleshooting In addition to the guidance provided in the Carrier Guides, EasyPost offers support to assist with FAQs, troubleshooting issues, and inquiries related to the EasyPost platform. Visit the Help Center for more information. Related: - [Carrier Metadata](https://docs.easypost.com/docs/carrier-metadata) - [Help Center](https://support.easypost.com/hc/en-us) --- ## Talk to a Shipping Expert For questions about getting started with the EasyPost API please talk to a Shipping Expert or Contact Support. Related: - [Talk to a Shipping Expert](https://www.easypost.com/talk-to-easypost) - [Contact Support](https://support.easypost.com/hc/requests/new) --- Source: https://docs.easypost.com/carriers/sf-express-guide # SF Express Guide SF Express has become the largest integrated logistics service provider in China and Asia, and the fourth largest in the world. Centering on the logistics ecosystem, SF Express has continually developed its portfolio of product and service capabilities to provide customers with domestic and international end-to-end one-stop supply chain services. This guide includes detailed information on utilizing SF Express shipping with the EasyPost API, focusing on account setup, rates, label creation, manifests, tracking, and more. --- ## Carrier Account Setup ### Account Registration Sign up for an EasyPost account to obtain a **Test** and **Production** API key. See Authentication and Key Management for more information. > Note: Negotiated rates are only available in Production mode. ### Carrier Setup Upon sign-up with EasyPost, users gain immediate access to Wallet Carrier Accounts, which can be enabled directly from the Dashboard. For additional carriers, EasyPost supports a Bring Your Own Carrier Account (BYOCA) option. This requires users to register directly with the respective carrier. #### SF Express Shipper Account Registration 1. Contact SF Express to request a shipper account. A representative will be in touch for additional details regarding the account. 2. Inform SF Express about using EasyPost's API for label purchases. 3. Obtain the following production and test credentials: 1. SF Express Checkword 2. SF Express Customer Code 3. SF Express Customer ID 4. Input carrier-specific credentials within the EasyPost Carrier Account Dashboard for comprehensive rate access. #### SF Express Account via API The API structure specified by EasyPost can also be used to add the SF Express carrier shipper account. ```shell curl -X POST https://api.easypost.com/v2/carrier_accounts \ -u "$EASYPOST_API_KEY": \ -H 'Content-Type: application/json' \ -d '{ "carrier_account": { "type": "SfExpressAccount", "description": "SfExpressAccount", "credentials": { "checkword": "VALUE", "customer_code": "VALUE", "customer_id": "VALUE" }, "test_credentials": { "checkword": "VALUE", "customer_code": "VALUE", "customer_id": "VALUE" } } }' ``` ### Software Requirements Download an EasyPost Client Library or utilize the REST API with cURL. ### Documentation Review Examine the EasyPost Objects section to understand the API's structure, which is critical for constructing requests and interpreting responses. Related: - [Getting Started Guide](https://docs.easypost.com/guides/getting-started) - [Manage Carrier Accounts](https://app.easypost.com/account/settings?tab=carriers) --- ## Billing SF Express will charge the appropriate amount for postage via their billing system. --- ## Rates When integrating an SF Express account with EasyPost, users should be aware of how rates are managed and displayed. Here's a breakdown of key points: ### Default Rate Display - EasyPost initially returns a $0.01 rate for shipments once the SF Express account is set up. ### Rate Card - SF Express representatives provide rate cards detailing expected costs based on shipment parameters (package size, weight, location, etc.). - Acquiring this custom rate card from SF Express is crucial, as EasyPost is not automatically privy to these rates. ### Rate Card Integration Once the rate card is received from SF Express, users should contact support@easypost.com for assistance installing the rate card into their account. --- ## Service Levels SF Express offers the following services: Service levels are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=sfexpress`. Related: - [Service Levels](https://docs.easypost.com/docs/shipments/rates#service-levels) ### Coverage Area Use the SF Express Service Coverage tool to view coverage areas. Related: - [SF Express Service Levels](https://docs.easypost.com/docs/shipments/rates?carrier=sfexpress#service-levels) --- ## Predefined Packages Predefined packages provide a convenient way to classify parcels using carrier-defined package types and retrieve applicable rates. When creating a shipment with the EasyPost API, select a predefined package that matches the parcel's characteristics and provide its weight in ounces when required. See the predefined package documentation for supported values and example requests. Predefined packages are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=sfexpress`. Related: - [Predefined Packages](https://docs.easypost.com/docs/parcels#predefined-packages) --- ## Generating Shipping Labels With EasyPost, generating shipping labels for SF Express is the same process as generating them for any other carrier. Review the Getting Started Guide for help generating a shipping label. ### One-Call Buys 1-call buys enable streamlined label purchasing through the EasyPost API by consolidating multiple operations into a single API request. This feature is designed to simplify and accelerate the shipping process by combining the creation of a shipment, retrieval of rates, and purchasing the shipping label into one efficient step. See Reducing API Response Times for more information. ### Manifests Manifesting is **not** supported or required. ### Refunding and Voiding Labels Voiding SF Express labels through EasyPost is supported. ### Shipment Options Shipment options are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=sfexpress`. Related: - [Shipment Options](https://docs.easypost.com/docs/shipments/options) #### Label Formats EasyPost offers native SF Express labels in ZPL, PNG, and PDF formats. Related: - [Shipment Documentation](https://docs.easypost.com/docs/shipments) - [Reducing API Response Times](https://support.easypost.com/hc/en-us/articles/360048825772-Reducing-API-Response-Times) --- ## Hazardous Materials (HAZMAT) The SF Express policy on hazardous materials is not explicitly detailed in this guide. Shippers are advised to contact SF Express directly for specific hazmat inquiries. --- ## Pickups SF Express accommodates pickups based on individual agreements with customers. While regular pickups can be arranged directly with SF Express during the account registration process, they **cannot be scheduled via the EasyPost API**. --- ## Tracking EasyPost simplifies package tracking by offering two methods: - Tracking with an existing number and carrier. - Using a Tracker included with an EasyPost-purchased shipping label. The service integrates webhooks for timely shipment updates. For detailed information on tracking methods, visit the Tracking Guide. Related: - [Trackers Documentation](https://docs.easypost.com/docs/trackers) - [Trackers Guide](https://docs.easypost.com/guides/tracking-guide) --- ## Additional Resources ### Carrier Metadata The Carrier Metadata endpoint can programmatically return information about service levels, predefined packages, supported features, and shipment options. Use this information to quickly integrate and make educated decisions about the mix of carriers for shipping needs. Additionally, the Carrier Metadata endpoint is available to retrieve comprehensive information about all carriers on the EasyPost platform, enhancing decision-making for carrier services. ### Support and Troubleshooting In addition to the guidance provided in the Carrier Guides, EasyPost offers support to assist with FAQs, troubleshooting issues, and inquiries related to the EasyPost platform. Visit the Help Center for more information. Related: - [Carrier Metadata](https://docs.easypost.com/docs/carrier-metadata) - [Help Center](https://support.easypost.com/hc/en-us) --- ## Talk to a Shipping Expert For questions about getting started with the EasyPost API please talk to a Shipping Expert or Contact Support. Related: - [Talk to a Shipping Expert](https://www.easypost.com/talk-to-easypost) - [Contact Support](https://support.easypost.com/hc/requests/new) --- Source: https://docs.easypost.com/carriers/smartkargo-guide # SmartKargo Guide SmartKargo offers an innovative domestic shipping solution, delivering rapid service at ground rates. With a simplified flat-rate pricing model, shippers are not burdened by concerns over zones or accessorial fees. This service ensures fast, environmentally-friendly, and cost-effective delivery with 93% contiguous coverage throughout the United States. This guide includes detailed information on utilizing SmartKargo shipping with the EasyPost API, focusing on account setup, rates, label creation, manifests, tracking, and more. --- ## Carrier Account Setup ### Account Registration Sign up for an EasyPost account to obtain a **Test** and **Production** API key. See Authentication and Key Management for more information. > Note: Negotiated rates are only available in Production mode. ### Carrier Setup Upon sign-up with EasyPost, users gain immediate access to Wallet Carrier Accounts, which can be enabled directly from the Dashboard. For additional carriers, EasyPost supports a Bring Your Own Carrier Account (BYOCA) option. This requires users to register directly with the respective carrier. #### SmartKargo Shipper Account Registration 1. Contact SmartKargo to request a shipper account. A representative will be in touch for additional details regarding the account. 2. Inform SmartKargo about using EasyPost's API for label purchases. 3. Acquire rates and align any additional shipping needs. 4. Obtain the following account credentials: 1. SmartKargo Account Number 5. Input carrier-specific credentials within the EasyPost Carrier Account Dashboard for comprehensive rate access. #### SmartKargo Account via API The API structure specified by EasyPost can also be used to add the SmartKargo carrier shipper account. ```shell curl -X POST https://api.easypost.com/v2/carrier_accounts \ -u "$EASYPOST_API_KEY": \ -H 'Content-Type: application/json' \ -d '{ "carrier_account": { "type": "SmartKargoAccount", "description": "SmartKargoAccount", "credentials": { "account_number": "VALUE" }, "test_credentials": { "account_number": "VALUE" } } }' ``` ### Software Requirements Download an EasyPost Client Library or utilize the REST API with cURL. ### Documentation Review Examine the EasyPost Objects section to understand the API's structure, which is critical for constructing requests and interpreting responses. Related: - [Getting Started Guide](https://docs.easypost.com/guides/getting-started) - [Manage Carrier Accounts](https://app.easypost.com/account/settings?tab=carriers) --- ## Billing Billing is directly handled by SmartKargo after parcel delivery. EasyPost does not participate in the billing process for SmartKargo services. Contact a SmartKargo representative for details. --- ## Rates SmartKargo is a **Live Rating** integration, enabling real-time rate retrieval for shipments created via EasyPost. Rates are guaranteed valid for a minimum of five minutes. - When creating a shipment, EasyPost requests SmartKargo for shipment rates specific to the user's SmartKargo account. - The rates provided are directly from SmartKargo and tailored to the user's specific account details. - In cases of discrepancies or incorrect rates, users are advised to contact their SmartKargo account representative. - The representative can then update the rates in the SmartKargo database to ensure user account accuracy. --- ## Service Levels SmartKargo delivers six days per week (Monday - Saturday). The service levels through EasyPost include: Service levels are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=smartkargo`. Related: - [Service Levels](https://docs.easypost.com/docs/shipments/rates#service-levels) ### Coverage Area SmartKargo supports two-day delivery within the United States except to Alaska, Hawaii, Maine, and North Dakota. ### Parcel Limitations - Weight limitation of 50 lbs or less - Length, Width, and Height must be no larger than 48 inches Related: - [SmartKargo Service Levels](https://docs.easypost.com/docs/shipments/rates?carrier=smartkargo#service-levels) --- ## Predefined Packages Predefined packages provide a convenient way to classify parcels using carrier-defined package types and retrieve applicable rates. When creating a shipment with the EasyPost API, select a predefined package that matches the parcel's characteristics and provide its weight in ounces when required. See the predefined package documentation for supported values and example requests. Predefined packages are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=smartkargo`. Related: - [Predefined Packages](https://docs.easypost.com/docs/parcels#predefined-packages) --- ## Generating Shipping Labels With EasyPost, generating shipping labels for SmartKargo is the same process as generating them for any other carrier. Review the Getting Started Guide for help generating a shipping label. ### Required Options SmartKargo requires a `PackageDescription` which is mapped in EasyPost to `shipment.options.content_description`. ### Manifests Manifesting is **not** supported or required for SmartKargo. ### Returns SmartKargo does not provide a separate service for return shipment labels. All shipments are subject to regular pricing. ### Refunding and Voiding Labels Voiding SmartKargo labels through EasyPost is supported. ### Shipment Options Shipment options are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=smartkargo`. Related: - [Shipment Options](https://docs.easypost.com/docs/shipments/options) #### Label Formats EasyPost offers native SmartKargo labels in PNG, ZPL, and PDF formats. Related: - [Shipment Documentation](https://docs.easypost.com/docs/shipments) - [Reducing API Response Times](https://support.easypost.com/hc/en-us/articles/360048825772-Reducing-API-Response-Times) --- ## Hazardous Materials (HAZMAT) This guide does not specify handling hazardous materials with SmartKargo. Shippers are advised to contact SmartKargo directly for specific hazmat inquiries. --- ## Pickups SmartKargo accommodates pickups based on individual agreements with customers. While regular pickups can be arranged directly with SmartKargo during the account registration process, **they cannot be scheduled via the EasyPost API**. --- ## Tracking EasyPost simplifies package tracking by offering two methods: - Tracking with an existing number and carrier. - Using a Tracker included with an EasyPost-purchased shipping label. The service integrates webhooks for timely shipment updates. For detailed information on tracking methods, visit the Tracking Guide. Related: - [Trackers Documentation](https://docs.easypost.com/docs/trackers) - [Trackers Guide](https://docs.easypost.com/guides/tracking-guide) --- ## Additional Resources ### Carrier Metadata The Carrier Metadata endpoint can programmatically return information about service levels, predefined packages, supported features, and shipment options. Use this information to quickly integrate and make educated decisions about the mix of carriers for shipping needs. Additionally, the Carrier Metadata endpoint is available to retrieve comprehensive information about all carriers on the EasyPost platform, enhancing decision-making for carrier services. ### Support and Troubleshooting In addition to the guidance provided in the Carrier Guides, EasyPost offers support to assist with FAQs, troubleshooting issues, and inquiries related to the EasyPost platform. Visit the Help Center for more information. Related: - [Carrier Metadata](https://docs.easypost.com/docs/carrier-metadata) - [Help Center](https://support.easypost.com/hc/en-us) --- ## Talk to a Shipping Expert For questions about getting started with the EasyPost API please talk to a Shipping Expert or Contact Support. Related: - [Talk to a Shipping Expert](https://www.easypost.com/talk-to-easypost) - [Contact Support](https://support.easypost.com/hc/requests/new) --- Source: https://docs.easypost.com/carriers/sonic-guide # Sonic Guide Sonic is dedicated to providing its shippers with the most consistent and quality shipping service. They are an express shipping expert within Florida and have served the state for 30+ years. Get reliable next- and same-day shipping today with Sonic and EasyPost. This guide includes detailed information on utilizing Sonic shipping with the EasyPost API, focusing on account setup, rates, label creation, manifests, tracking, and more. --- ## Carrier Account Setup ### Account Registration Sign up for an EasyPost account to obtain a **Test** and **Production** API key. See Authentication and Key Management for more information. > Note: Negotiated rates are only available in Production mode. ### Carrier Setup Upon sign-up with EasyPost, users gain immediate access to Wallet Carrier Accounts, which can be enabled directly from the dashboard. For additional carriers, EasyPost supports a Bring Your Own Carrier Account (BYOCA) option. This requires users to register directly with the respective carrier. #### Sonic Shipper Account Registration 1. Complete registration on the Sonic website. Once registered, a representative will be in touch for additional details regarding the account. 2. Inform Sonic about using EasyPost's API for label purchases. 3. Acquire rates and align any additional shipping needs. 4. Obtain Sonic production and test account credentials: 1. Sonic Username 2. Sonic Password 3. Sonic Account Number 5. Input carrier-specific credentials within the EasyPost Carrier Account Dashboard for comprehensive rate access. #### Sonic Account via API The API structure specified by EasyPost can also be used to add Sonic carrier shipper account. ```shell curl -X POST https://api.easypost.com/v2/carrier_accounts \ -u "$EASYPOST_API_KEY": \ -H 'Content-Type: application/json' \ -d '{ "carrier_account": { "type": "SonicAccount", "description": "SonicAccount", "credentials": { "account_number": "VALUE", "password": "VALUE", "username": "VALUE" }, "test_credentials": { "account_number": "VALUE", "password": "VALUE", "username": "VALUE" } } }' ``` ### Software Requirements Download an EasyPost Client Library or utilize the REST API with cURL. ### Documentation Review Examine the EasyPost Objects section to understand the API's structure, which is critical for constructing requests and interpreting responses. Related: - [Getting Started Guide](https://docs.easypost.com/guides/getting-started) - [Manage Carrier Accounts](https://app.easypost.com/account/settings?tab=carriers) --- ## Billing Sonic handles billing directly using a bill-on delivery system. EasyPost does not participate in the billing process for Sonic services. Contact a Sonic representative for details. --- ## Rates ### Default Rate Display EasyPost always returns a $0.01 placeholder rate for Sonic shipments. Live postage rates are not returned through this integration. Sonic bills the actual postage through its billing system. --- ## Service Levels Sonic delivers 6 days per week (Monday - Saturday). The service levels through EasyPost include: Service levels are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=sonic`. Related: - [Service Levels](https://docs.easypost.com/docs/shipments/rates#service-levels) ### Coverage Area Sonic supports next-day and same-day delivery within Florida. ### Parcel Restrictions There is a weight limit of 100 lbs on the NEXTDAY service level. Related: - [Sonic Service Levels](https://docs.easypost.com/docs/shipments/rates?carrier=Sonic#service-levels) --- ## Predefined Packages Predefined packages provide a convenient way to classify parcels using carrier-defined package types and retrieve applicable rates. When creating a shipment with the EasyPost API, select a predefined package that matches the parcel's characteristics and provide its weight in ounces when required. See the predefined package documentation for supported values and example requests. Predefined packages are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=sonic`. Related: - [Predefined Packages](https://docs.easypost.com/docs/parcels#predefined-packages) --- ## Generating Shipping Labels With EasyPost, generating shipping labels for Sonic is the same process as generating them for any other carrier. Review the Getting Started Guide for help generating a shipping label. ### Manifests Manifesting is not supported or required for Sonic. ### Returns Returns are not supported for the EasyPost Sonic integration. ### Refunding and Voiding Labels Voiding Sonic labels through EasyPost is supported. ### Shipment Options Shipment options are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=sonic`. Related: - [Shipment Options](https://docs.easypost.com/docs/shipments/options) #### Label Formats EasyPost offers native Sonic labels in PNG, ZPL, PDF, and EPL2 formats. Related: - [Shipment Documentation](https://docs.easypost.com/docs/shipments) - [Reducing API Response Times](https://support.easypost.com/hc/en-us/articles/360048825772-Reducing-API-Response-Times) --- ## Hazardous Materials (HAZMAT) This guide does not specify handling hazardous materials with Sonic. Shippers are advised to contact Sonic directly for specific guidelines and compliance requirements. --- ## Pickups Returns are not supported for the EasyPost Sonic integration. regular pickups can be arranged directly with Sonic during the account registration process, they cannot be scheduled via the EasyPost API. --- ## Tracking EasyPost simplifies package tracking by offering two methods: - Tracking with an existing number and carrier. - Using a Tracker included with an EasyPost-purchased shipping label. The service integrates webhooks for timely shipment updates. For detailed information on tracking methods, visit the Tracking Guide. Related: - [Trackers Documentation](https://docs.easypost.com/docs/trackers) - [Trackers Guide](https://docs.easypost.com/guides/tracking-guide) --- ## Additional Resources ### Carrier Metadata The Carrier Metadata endpoint can programmatically return information about service levels, predefined packages, supported features, and shipment options. Use this information to quickly integrate and make educated decisions about the mix of carriers for shipping needs. Additionally, the Carrier Metadata endpoint is available to retrieve comprehensive information about all carriers on the EasyPost platform, enhancing decision-making for carrier services. ### Support and Troubleshooting In addition to the guidance provided in the Carrier Guides, EasyPost offers support to assist with FAQs, troubleshooting issues, and inquiries related to the EasyPost platform. Visit the Help Center for more information. Related: - [Carrier Metadata](https://docs.easypost.com/docs/carrier-metadata) - [Help Center](https://support.easypost.com/hc/en-us) --- ## Talk to a Shipping Expert For questions about getting started with the EasyPost API please talk to a Shipping Expert or Contact Support. Related: - [Talk to a Shipping Expert](https://www.easypost.com/talk-to-easypost) - [Contact Support](https://support.easypost.com/hc/requests/new) --- Source: https://docs.easypost.com/carriers/speedee-guide # Spee-Dee Guide Spee-Dee offers ground delivery services throughout the Midwest, ensuring a next-day delivery footprint across Illinois, Iowa, Minnesota, North Dakota, South Dakota, and Wisconsin. This regional carrier also serves selected cities and ZIP codes in Michigan, Missouri, and Nebraska, making it a reliable option for timely distribution within these areas. This guide includes detailed information on utilizing Spee-Dee shipping with the EasyPost API, focusing on account setup, rates, label creation, tracking, and more. --- ## Carrier Account Setup ### Account Registration Sign up for an EasyPost account to obtain a **Test** and **Production** API key. See Authentication and Key Management for more information. > Note: Negotiated rates are only available in Production mode. ### Carrier Setup Upon sign-up with EasyPost, users gain immediate access to Wallet Carrier Accounts, which can be enabled directly from the Dashboard. For additional carriers, EasyPost supports a Bring Your Own Carrier Account (BYOCA) option. This requires users to register directly with the respective carrier. #### Spee-Dee Shipper Account Registration 1. Contact Spee-Dee to request a shipper account. A representative will be in touch for additional details regarding the account. 2. Contact Spee-Dee at manifest@speedeedelivery.com to activate FTP manifesting for the account through EasyPost. 3. Obtain the following test and production account credentials: 1. Spee-Dee Account Number 4. Input carrier-specific credentials within the EasyPost Carrier Account Dashboard for comprehensive rate access. #### Spee-Dee Account via API The API structure specified by EasyPost can also be used to add the Spee-Dee carrier shipper account. ```shell curl -X POST https://api.easypost.com/v2/carrier_accounts \ -u "$EASYPOST_API_KEY": \ -H 'Content-Type: application/json' \ -d '{ "carrier_account": { "type": "SpeedeeAccount", "description": "SpeedeeAccount", "credentials": { "account_number": "VALUE" } } }' ``` ### Software Requirements Download an EasyPost Client Library or utilize the REST API with cURL. ### Documentation Review Examine the EasyPost Objects section to understand the API's structure, which is critical for constructing requests and interpreting responses. Related: - [Getting Started Guide](https://docs.easypost.com/guides/getting-started) - [Manage Carrier Accounts](https://app.easypost.com/account/settings?tab=carriers) --- ## Billing When using a Spee-Dee BYOCA, shipment charges are billed under the shipper's own Spee-Dee account. --- ## Rates Spee-Dee is a **Live Rating** integration, enabling real-time rate retrieval for shipments created via EasyPost. Rates are guaranteed valid for a minimum of five minutes. - When creating a shipment, EasyPost requests Spee-Dee for shipment rates. - The rates provided are directly from Spee-Dee. - In cases of discrepancies or incorrect rates, users are advised to contact their Spee-Dee account representative. --- ## Service Levels Spee-Dee offers the following service levels: Service levels are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=speedee`. Related: - [Service Levels](https://docs.easypost.com/docs/shipments/rates#service-levels) Related: - [Spee-Dee Service Levels](https://docs.easypost.com/docs/shipments/rates?carrier=speedee#service-levels) --- ## Predefined Packages Predefined packages provide a convenient way to classify parcels using carrier-defined package types and retrieve applicable rates. When creating a shipment with the EasyPost API, select a predefined package that matches the parcel's characteristics and provide its weight in ounces when required. See the predefined package documentation for supported values and example requests. Predefined packages are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=speedee`. Related: - [Predefined Packages](https://docs.easypost.com/docs/parcels#predefined-packages) --- ## Generating Shipping Labels With EasyPost, generating shipping labels for Spee-Dee is the same process as generating them for any other carrier. Review the Getting Started Guide for help generating a shipping label. ### One-Call Buys One-Call Buys enable streamlined label purchasing through the EasyPost API by consolidating multiple operations into a single API request. This feature is designed to simplify and accelerate the shipping process by combining the creation of a shipment, retrieval of rates, and purchasing the shipping label into one efficient step. See Reducing API Response Times for more information. ### Manifests Spee-Dee requires all shipments to be manifested before they are accepted by the carrier. Create a ScanForm after generating shipment labels to manifest Spee-Dee shipments. ### Refunding and Voiding Labels Voiding Spee-Dee labels through EasyPost is **not** supported. ### Shipment Options Shipment options are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=speedee`. Related: - [Shipment Options](https://docs.easypost.com/docs/shipments/options) Related: - [Shipment Documentation](https://docs.easypost.com/docs/shipments) - [Reducing API Response Times](https://support.easypost.com/hc/en-us/articles/360048825772-Reducing-API-Response-Times) --- ## Hazardous Materials (HAZMAT) The Spee-Dee policy on hazardous materials is not explicitly detailed in this guide. Shippers are advised to contact Spee-Dee directly for specific hazmat inquiries. --- ## Pickups Pickups are **not** supported through the EasyPost API. --- ## Tracking EasyPost simplifies package tracking by offering two methods: - Tracking with an existing number and carrier. - Using a Tracker included with an EasyPost-purchased shipping label. The service integrates webhooks for timely shipment updates. For detailed information on tracking methods, visit the Tracking Guide. Related: - [Trackers Documentation](https://docs.easypost.com/docs/trackers) - [Trackers Guide](https://docs.easypost.com/guides/tracking-guide) --- ## Additional Resources ### Carrier Metadata The Carrier Metadata endpoint can programmatically return information about service levels, predefined packages, supported features, and shipment options. Use this information to quickly integrate and make educated decisions about the mix of carriers for shipping needs. Additionally, the Carrier Metadata endpoint is available to retrieve comprehensive information about all carriers on the EasyPost platform, enhancing decision-making for carrier services. ### Support and Troubleshooting In addition to the guidance provided in the Carrier Guides, EasyPost offers support to assist with FAQs, troubleshooting issues, and inquiries related to the EasyPost platform. Visit the Help Center for more information. Related: - [Carrier Metadata](https://docs.easypost.com/docs/carrier-metadata) - [Help Center](https://support.easypost.com/hc/en-us) --- ## Talk to a Shipping Expert For questions about getting started with the EasyPost API please talk to a Shipping Expert or Contact Support. Related: - [Talk to a Shipping Expert](https://www.easypost.com/talk-to-easypost) - [Contact Support](https://support.easypost.com/hc/requests/new) --- Source: https://docs.easypost.com/carriers/speedx-guide # SpeedX Guide SpeedX transcends traditional delivery services by offering a partnership geared towards success in ecommerce. This company ensures delivery is not a hassle, financial burden, or stressor, providing a next-level delivery experience tailored to meet evolving business needs. This guide includes detailed information on utilizing SpeedX shipping with the EasyPost API, focusing on account setup, rates, label creation, tracking, and more. --- ## Carrier Account Setup ### Account Registration Sign up for an EasyPost account to obtain a **Test** and **Production** API key. See Authentication and Key Management for more information. > Note: Negotiated rates are only available in Production mode. ### Carrier Setup Upon sign-up with EasyPost, users gain immediate access to Wallet Carrier Accounts, which can be enabled directly from the Dashboard. For additional carriers, EasyPost supports a Bring Your Own Carrier Account (BYOCA) option. This requires users to register directly with the respective carrier. #### SpeedX Shipper Account Registration 1. Contact SpeedX to request a shipper account. A representative will be in touch for additional details regarding the account. 2. Inform SpeedX about using EasyPost's API for label purchases. 3. Acquire rates and align any additional shipping needs. 4. Obtain the following test and production account credentials: 1. SpeedX API Key 5. Input carrier-specific credentials within the EasyPost Carrier Account Dashboard for comprehensive rate access. > Note: A new SpeedX carrier account must be used for each unique shipment origin by hub location. SpeedX can provide guidance for each hub location and pickup account ID. #### SpeedX Account via API The API structure specified by EasyPost can also be used to add the SpeedX carrier shipper account. ```shell curl -X POST https://api.easypost.com/v2/carrier_accounts \ -u "$EASYPOST_API_KEY": \ -H 'Content-Type: application/json' \ -d '{ "carrier_account": { "type": "SpeedXAccount", "description": "SpeedXAccount", "credentials": { "api_key": "VALUE", "pickup_account_num": "VALUE" }, "test_credentials": { "api_key": "VALUE", "pickup_account_num": "VALUE" } } }' ``` ### Software Requirements Download an EasyPost Client Library or utilize the REST API with cURL. ### Documentation Review Examine the EasyPost Objects section to understand the API's structure, which is critical for constructing requests and interpreting responses. Related: - [Getting Started Guide](https://docs.easypost.com/guides/getting-started) - [Manage Carrier Accounts](https://app.easypost.com/account/settings?tab=carriers) --- ## Billing When using a SpeedX BYOCA, shipment charges are billed under the shipper's own SpeedX account. --- ## Rates SpeedX is a **Live Rating** integration, enabling real-time rate retrieval for shipments created via EasyPost. Rates are guaranteed valid for a minimum of five minutes. - When creating a shipment, EasyPost requests SpeedX for shipment rates specific to the user's SpeedX account. - The rates provided are directly from SpeedX and tailored to the user's specific account details. - In cases of discrepancies or incorrect rates, users are advised to contact their SpeedX account representative. - The representative can then update the rates to ensure user account accuracy. --- ## Service Levels SpeedX offers the following service levels: Service levels are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=speedx`. Related: - [Service Levels](https://docs.easypost.com/docs/shipments/rates#service-levels) ### Coverage Area SpeedX services more than 8,000 zip codes in and around New York City, Miami, Dallas, Los Angeles, and Chicago. ![Map indicating SpeedX coverage area](https://docs.easypost.com/images/guides/speedx/speedx-us-coverage-map.png) Related: - [SpeedX Service Levels](https://docs.easypost.com/docs/shipments/rates?carrier=speedx#service-levels) --- ## Predefined Packages Predefined packages provide a convenient way to classify parcels using carrier-defined package types and retrieve applicable rates. When creating a shipment with the EasyPost API, select a predefined package that matches the parcel's characteristics and provide its weight in ounces when required. See the predefined package documentation for supported values and example requests. Predefined packages are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=speedx`. Related: - [Predefined Packages](https://docs.easypost.com/docs/parcels#predefined-packages) --- ## Generating Shipping Labels With EasyPost, generating shipping labels for SpeedX is the same process as generating them for any other carrier. Review the Getting Started Guide for help generating a shipping label. ### One-Call Buys 1-call buys enable streamlined label purchasing through the EasyPost API by consolidating multiple operations into a single API request. This feature is designed to simplify and accelerate the shipping process by combining the creation of a shipment, retrieval of rates, and purchasing the shipping label into one efficient step. See Reducing API Response Times for more information. ### Refunding and Voiding Labels Voiding SpeedX labels through EasyPost is supported. ### Shipment Options Shipment options are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=speedx`. Related: - [Shipment Options](https://docs.easypost.com/docs/shipments/options) #### Label Formats EasyPost offers native SpeedX labels in PDF, PNG, and ZPL formats. Related: - [Shipment Documentation](https://docs.easypost.com/docs/shipments) - [Reducing API Response Times](https://support.easypost.com/hc/en-us/articles/360048825772-Reducing-API-Response-Times) --- ## Hazardous Materials (HAZMAT) The SpeedX policy on hazardous materials is not explicitly detailed in this guide. Shippers are advised to contact SpeedX directly for specific hazmat inquiries. --- ## Pickups SpeedX accommodates pickups based on individual agreements with customers. While regular pickups can be arranged directly with SpeedX during the account registration process, they **cannot be scheduled via the EasyPost API**. --- ## Tracking EasyPost simplifies package tracking by offering two methods: - Tracking with an existing number and carrier. - Using a Tracker included with an EasyPost-purchased shipping label. The service integrates webhooks for timely shipment updates. For detailed information on tracking methods, visit the Tracking Guide. Related: - [Trackers Documentation](https://docs.easypost.com/docs/trackers) - [Trackers Guide](https://docs.easypost.com/guides/tracking-guide) --- ## Additional Resources ### Carrier Metadata The Carrier Metadata endpoint can programmatically return information about service levels, predefined packages, supported features, and shipment options. Use this information to quickly integrate and make educated decisions about the mix of carriers for shipping needs. Additionally, the Carrier Metadata endpoint is available to retrieve comprehensive information about all carriers on the EasyPost platform, enhancing decision-making for carrier services. ### Support and Troubleshooting In addition to the guidance provided in the Carrier Guides, EasyPost offers support to assist with FAQs, troubleshooting issues, and inquiries related to the EasyPost platform. Visit the Help Center for more information. Related: - [Carrier Metadata](https://docs.easypost.com/docs/carrier-metadata) - [Help Center](https://support.easypost.com/hc/en-us) --- ## Talk to a Shipping Expert For questions about getting started with the EasyPost API please talk to a Shipping Expert or Contact Support. Related: - [Talk to a Shipping Expert](https://www.easypost.com/talk-to-easypost) - [Contact Support](https://support.easypost.com/hc/requests/new) --- Source: https://docs.easypost.com/carriers/sway-guide # Sway Guide Sway is a customer-focused shipping experience specializing in returns that offer same-day and next-day pickups, all for less than the cost of ground shipping. This guide includes detailed information on utilizing Sway shipping with the EasyPost API, focusing on account setup, rates, label creation, manifests, tracking, and more. --- ## Carrier Account Setup ### Account Registration Sign up for an EasyPost account to obtain a **Test** and **Production** API key. See Authentication and Key Management for more information. > Note: Negotiated rates are only available in Production mode. ### Carrier Setup Upon sign-up with EasyPost, users gain immediate access to Wallet Carrier Accounts, which can be enabled directly from the Dashboard. For additional carriers, EasyPost supports a Bring Your Own Carrier Account (BYOCA) option. This requires users to register directly with the respective carrier. #### Sway Shipper Account Registration 1. Contact Sway to request a shipper account. A representative will be in touch for additional details regarding the account. 2. Inform Sway about using EasyPost's API for label purchases. 3. Acquire rates, a pickup location slug, and align any additional shipping needs. 4. Obtain the following test and production account credentials: 1. Sway API Key 5. Input carrier-specific credentials within the EasyPost Carrier Account Dashboard for comprehensive rate access. #### Sway Account via API The API structure specified by EasyPost can also be used to add the Sway carrier shipper account. ```shell curl -X POST https://api.easypost.com/v2/carrier_accounts \ -u "$EASYPOST_API_KEY": \ -H 'Content-Type: application/json' \ -d '{ "carrier_account": { "type": "SwayAccount", "description": "SwayAccount", "credentials": { "api_key": "VALUE" }, "test_credentials": { "api_key": "VALUE" } } }' ``` ### Software Requirements Download an EasyPost Client Library or utilize the REST API with cURL. ### Documentation Review Examine the EasyPost Objects section to understand the API's structure, which is critical for constructing requests and interpreting responses. Related: - [Getting Started Guide](https://docs.easypost.com/guides/getting-started) - [Manage Carrier Accounts](https://app.easypost.com/account/settings?tab=carriers) --- ## Billing When using a Sway BYOCA, shipment charges are billed under the shipper's own Sway account. --- ## Rates Sway is a **Live Rating** integration, enabling real-time rate retrieval for shipments created via EasyPost. Rates are guaranteed valid for a minimum of five minutes. - When creating a shipment, EasyPost requests Sway for shipment rates specific to the user's Sway account. - The rates provided are directly from Sway and tailored to the user's specific account details. - In cases of discrepancies or incorrect rates, users are advised to contact their Sway account representative. - The representative can then update the rates to ensure user account accuracy. --- ## Service Levels Sway offers the following service levels: Service levels are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=sway`. Related: - [Service Levels](https://docs.easypost.com/docs/shipments/rates#service-levels) --- ## Predefined Packages Predefined packages provide a convenient way to classify parcels using carrier-defined package types and retrieve applicable rates. When creating a shipment with the EasyPost API, select a predefined package that matches the parcel's characteristics and provide its weight in ounces when required. See the predefined package documentation for supported values and example requests. Predefined packages are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=sway`. Related: - [Predefined Packages](https://docs.easypost.com/docs/parcels#predefined-packages) --- ## Generating Shipping Labels The process for generating shipping labels with EasyPost for Sway is similar to other carriers, with a few special requirements. ### Special Requirements Users must pass in a Pickup Location Slug (provided by Sway) to EasyPost's `shipment.from_address.carrier_facility` field. A user may have multiple slugs, each representing a different delivery region. > Note: Please contact Sway to obtain a pickup location slug specific to the delivery region. ### One-Call Buys 1-call buys enable streamlined label purchasing through the EasyPost API by consolidating multiple operations into a single API request. This feature is designed to simplify and accelerate the shipping process by combining the creation of a shipment, retrieval of rates, and purchasing the shipping label into one efficient step. See Reducing API Response Times for more information. ### Manifests Manifesting is **not** supported or required for Sway. ### Refunding and Voiding Labels Voiding Sway labels through EasyPost is supported. ### Shipment Options Shipment options are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=sway`. Related: - [Shipment Options](https://docs.easypost.com/docs/shipments/options) #### Label Formats EasyPost offers native Sway labels in PNG, ZPL, and PDF formats. Related: - [Shipment Documentation](https://docs.easypost.com/docs/shipments) - [Reducing API Response Times](https://support.easypost.com/hc/en-us/articles/360048825772-Reducing-API-Response-Times) --- ## Hazardous Materials (HAZMAT) The Sway policy on hazardous materials is not explicitly detailed in this guide. Shippers are advised to contact Sway directly for specific hazmat inquiries. --- ## Pickups Sway accommodates pickups based on individual agreements with customers. While regular pickups can be arranged directly with Sway during the account registration process, they **cannot be scheduled via the EasyPost API**. **Coming Soon:** In early 2025, the EasyPost API will support pickup options for Sway. --- ## Tracking EasyPost simplifies package tracking by offering two methods: - Tracking with an existing number and carrier. - Using a Tracker included with an EasyPost-purchased shipping label. The service integrates webhooks for timely shipment updates. For detailed information on tracking methods, visit the Tracking Guide. Related: - [Trackers Documentation](https://docs.easypost.com/docs/trackers) - [Trackers Guide](https://docs.easypost.com/guides/tracking-guide) --- ## Additional Resources ### Carrier Metadata The Carrier Metadata endpoint can programmatically return information about service levels, predefined packages, supported features, and shipment options. Use this information to quickly integrate and make educated decisions about the mix of carriers for shipping needs. Additionally, the Carrier Metadata endpoint is available to retrieve comprehensive information about all carriers on the EasyPost platform, enhancing decision-making for carrier services. ### Support and Troubleshooting In addition to the guidance provided in the Carrier Guides, EasyPost offers support to assist with FAQs, troubleshooting issues, and inquiries related to the EasyPost platform. Visit the Help Center for more information. Related: - [Carrier Metadata](https://docs.easypost.com/docs/carrier-metadata) - [Help Center](https://support.easypost.com/hc/en-us) --- ## Talk to a Shipping Expert For questions about getting started with the EasyPost API please talk to a Shipping Expert or Contact Support. Related: - [Talk to a Shipping Expert](https://www.easypost.com/talk-to-easypost) - [Contact Support](https://support.easypost.com/hc/requests/new) --- Source: https://docs.easypost.com/carriers/swyft-guide # Swyft Guide Want to use EasyPost to ship with Swyft? This guide will break down all the necessary steps to make it happen. If you haven't generated your first shipping label with EasyPost, we recommend reading our Getting Started Guide to learn how. Related: - [Getting Started Guide](https://docs.easypost.com/guides/getting-started) Swyft is a last-mile delivery solution offering affordable and scalable next-day delivery guaranteed. Their network of professional local and regional couriers service major cities across the US and Canada, giving customers access to fast reliable shipping at ground rates without compromises. Swyft provides accurate delivery estimates, quality service, and a responsive support team to maximize visibility and customer satisfaction. Let's start shipping --- ## Carrier Account Setup ### Account Registration Follow the instructions below to start shipping with Swyft through EasyPost. If you have not created an EasyPost account, sign up now! ### Carrier Setup - Register for a Swyft shipper account: - Register for a Swyft shipper account on Swyft's website, and Swyft will contact you. - Let them know you will be using EasyPost's API to purchase labels. - Acquire rates and align any additional shipping needs. - Link your Swyft shipper account to EasyPost: - Log in to your EasyPost account and navigate to the Carrier Accounts page. - Add your Swyft carrier account credentials to access Swyft's services. - Begin purchasing labels through the EasyPost Shipping API! #### Swyft Account via API The API structure specified by EasyPost can also be used to add the Swyft carrier shipper account. ```shell curl -X POST https://api.easypost.com/v2/carrier_accounts \ -u "$EASYPOST_API_KEY": \ -H 'Content-Type: application/json' \ -d '{ "carrier_account": { "type": "SwyftAccount", "description": "SwyftAccount", "credentials": { "password": "VALUE" }, "test_credentials": { "password": "VALUE" } } }' ``` Related: - [Manage Carrier Accounts](https://app.easypost.com/account/settings?tab=carriers) --- ## Billing When using a Swyft BYOCA, shipment charges are billed under the shipper's own Swyft account. --- ## Rates Your agreed-upon rates with Swyft will return from the Shipping API in real-time, once you set up your Swyft account within EasyPost. --- ## Service Levels Swyft delivers 6 days per week (Mon-Sat). Service levels are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=swyft`. Related: - [Service Levels](https://docs.easypost.com/docs/shipments/rates#service-levels) See service levels for all EasyPost-supported carriers. ### Coverage Area Swyft supports next-day delivery within major cities in the U.S. and Canada, such as Los Angeles, Atlanta, Chicago, New Jersey, New York City, San Diego, Calgary, Toronto, and Vancouver. Expansion to Dallas, Houston, and San Francisco is coming soon. ![Swyft Coverage Map](https://docs.easypost.com/images/guides/swyft/swyft-coverage-map.png) Related: - [EasyPost Supported Carriers](https://docs.easypost.com/docs/shipments/rates?carrier=Swyft#service-levels) --- ## Predefined Packages Predefined packages provide a convenient way to classify parcels using carrier-defined package types and retrieve applicable rates. When creating a shipment with the EasyPost API, select a predefined package that matches the parcel's characteristics and provide its weight in ounces when required. See the predefined package documentation for supported values and example requests. Predefined packages are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=swyft`. Related: - [Predefined Packages](https://docs.easypost.com/docs/parcels#predefined-packages) --- ## Generating Shipping Labels Generating shipping labels for Swyft is the same as generating them for any other carrier with EasyPost. See our Getting Started Guide for help generating your first shipping label. ### Shipment Options Shipment options are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=swyft`. Related: - [Shipment Options](https://docs.easypost.com/docs/shipments/options) #### Label Formats EasyPost offers native Swyft labels in PNG, ZPL, and PDF formats. Related: - [Shipment Documentation](https://docs.easypost.com/docs/shipments) - [Getting Started Guide](https://docs.easypost.com/guides/getting-started) --- ## Hazardous Materials (HAZMAT) Hazardous materials handling for Swyft is not documented on this page. --- ## Pickups Swyft can support pickups for any customer based on their agreement. Regular pickups can be arranged with the Swyft team during the registration process; however, pickups cannot be scheduled through the EasyPost API. ### Dropoffs Swyft has 6 strategically located drop-off centers in Chicago, Dallas, Los Angeles (servicing Las Vegas and San Diego drop-offs), Toronto, Calgary, and Vancouver to streamline the drop-off process. --- ## Tracking Tracking statuses are available for all Swyft shipments. Creating a Tracker for Swyft is identical to creating a tracker with any other carrier through EasyPost. Take a look at our Tracking Guide for support in creating your first Tracker. Related: - [Trackers Documentation](https://docs.easypost.com/docs/trackers) - [Trackers Guide](https://docs.easypost.com/guides/tracking-guide) --- ## Additional Resources ### Carrier Metadata Our Carrier Metadata endpoint can programatically return information about Swyft including service levels, predefined packages, supported features, and shipment options. Use this information to quickly integrate with Swyft or make educated decisions about your carrier mix. You can also use the Carrier Metadata endpoint to retrieve information about all the carriers on the EasyPost platform. ### Support and Troubleshooting In addition to the guidance provided in the Carrier Guides, EasyPost offers support to assist with FAQs, troubleshooting issues, and inquiries related to the EasyPost platform. Visit the Help Center for more information. Related: - [Carrier Metadata](https://docs.easypost.com/docs/carrier-metadata) - [Help Center](https://support.easypost.com/hc/en-us) --- ## Talk to a Shipping Expert For questions about getting started with the EasyPost API please talk to a Shipping Expert or Contact Support. Related: - [Talk to a Shipping Expert](https://www.easypost.com/talk-to-easypost) - [Contact Support](https://support.easypost.com/hc/requests/new) --- Source: https://docs.easypost.com/carriers/tcc-guide # The Courier Connection Guide The Courier Connection (TCC) offers specialized courier services across the Mid-Atlantic and Southeast regions of the United States. They cater to unique shipping needs, offering full-service courier, shipping, and logistic services to both business and individual clients. This guide includes detailed information on utilizing TCC shipping with the EasyPost API, focusing on account setup, rates, label creation, manifests, tracking, and more. --- ## Carrier Account Setup ### Account Registration Sign up for an EasyPost account to obtain a **Test** and **Production** API key. See Authentication and Key Management for more information. > Note: Negotiated rates are only available in Production mode. ### Carrier Setup Upon sign-up with EasyPost, users gain immediate access to Wallet Carrier Accounts, which can be enabled directly from the Dashboard. For additional carriers, EasyPost supports a Bring Your Own Carrier Account (BYOCA) option. This requires users to register directly with the respective carrier. #### TCC Shipper Account Registration 1. Contact TCC to request a shipper account. A representative will be in touch for additional details regarding the account. 2. Inform TCC about using EasyPost's API for label purchases. 3. Acquire rates and align any additional shipping needs. 4. Obtain the following production and test credentials: 1. TCC Password 2. TCC Username 5. Input carrier-specific credentials within the EasyPost Carrier Account Dashboard for comprehensive rate access. #### TCC Account via API The API structure specified by EasyPost can also be used to add the TCC carrier shipper account. ```shell curl -X POST https://api.easypost.com/v2/carrier_accounts \ -u "$EASYPOST_API_KEY": \ -H 'Content-Type: application/json' \ -d '{ "carrier_account": { "type": "TccAccount", "description": "TccAccount", "credentials": { "password": "VALUE", "username": "VALUE" }, "test_credentials": { "password": "VALUE", "username": "VALUE" } } }' ``` ### Software Requirements Download an EasyPost Client Library or utilize the REST API with cURL. ### Documentation Review Examine the EasyPost Objects section to understand the API's structure, which is critical for constructing requests and interpreting responses. Related: - [Getting Started Guide](https://docs.easypost.com/guides/getting-started) - [Manage Carrier Accounts](https://app.easypost.com/account/settings?tab=carriers) --- ## Billing TCC bills the actual postage through its billing system. --- ## Rates When integrating a TCC account with EasyPost, users should be aware of how rates are managed and displayed. Here's a breakdown of key points: ### Default Rate Display EasyPost always returns a $0.01 placeholder rate for TCC shipments. Live postage rates are not returned through this integration. --- ## Service Levels TCC offers the following service levels: Service levels are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=tcc`. Related: - [Service Levels](https://docs.easypost.com/docs/shipments/rates#service-levels) Related: - [TCC Service Levels](https://docs.easypost.com/docs/shipments/rates?carrier=tcc#service-levels) --- ## Predefined Packages Predefined packages provide a convenient way to classify parcels using carrier-defined package types and retrieve applicable rates. When creating a shipment with the EasyPost API, select a predefined package that matches the parcel's characteristics and provide its weight in ounces when required. See the predefined package documentation for supported values and example requests. Predefined packages are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=tcc`. Related: - [Predefined Packages](https://docs.easypost.com/docs/parcels#predefined-packages) --- ## Generating Shipping Labels With EasyPost, generating shipping labels for TCC is the same process as generating them for any other carrier. Review the Getting Started Guide for help generating a shipping label. ### Manifests Manifesting is **not** supported or required for TCC. ### Refunding and Voiding Labels Voiding TCC labels through EasyPost is supported. ### Shipment Options Shipment options are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=tcc`. Related: - [Shipment Options](https://docs.easypost.com/docs/shipments/options) #### Label Formats EasyPost offers TCC labels in ZPL, PNG, and PDF formats. Related: - [Shipment Documentation](https://docs.easypost.com/docs/shipments) --- ## Hazardous Materials (HAZMAT) The TCC policy on hazardous materials is not explicitly detailed in this guide. Shippers are advised to contact TCC directly for specific hazmat inquiries. --- ## Pickups TCC accommodates pickups based on individual agreements with customers. While regular pickups can be arranged directly with TCC during the account registration process, they **cannot be scheduled via the EasyPost API**. --- ## Tracking EasyPost simplifies package tracking by offering two methods: - Tracking with an existing number and carrier. - Using a Tracker included with an EasyPost-purchased shipping label. The service integrates webhooks for timely shipment updates. For detailed information on tracking methods, visit the Tracking Guide. Related: - [Trackers Documentation](https://docs.easypost.com/docs/trackers) - [Trackers Guide](https://docs.easypost.com/guides/tracking-guide) --- ## Additional Resources ### Carrier Metadata The Carrier Metadata endpoint can programmatically return information about service levels, predefined packages, supported features, and shipment options. Use this information to quickly integrate and make educated decisions about the mix of carriers for shipping needs. Additionally, the Carrier Metadata endpoint is available to retrieve comprehensive information about all carriers on the EasyPost platform, enhancing decision-making for carrier services. ### Support and Troubleshooting In addition to the guidance provided in the Carrier Guides, EasyPost offers support to assist with FAQs, troubleshooting issues, and inquiries related to the EasyPost platform. Visit the Help Center for more information. Related: - [Carrier Metadata](https://docs.easypost.com/docs/carrier-metadata) - [Help Center](https://support.easypost.com/hc/en-us) --- ## Talk to a Shipping Expert For questions about getting started with the EasyPost API please talk to a Shipping Expert or Contact Support. Related: - [Talk to a Shipping Expert](https://www.easypost.com/talk-to-easypost) - [Contact Support](https://support.easypost.com/hc/requests/new) --- Source: https://docs.easypost.com/carriers/tforce-logistics-guide # TForce Logistics Guide TForce Logistics offers tailored last-mile delivery solutions to cater to the growing demands of ecommerce, financial, and B2B sectors. With competitive pricing and an expansive network of over 75 shipping centers across the US and Canada, TForce Logistics stands out for its customized service offerings and exceptional reliability. This guide includes detailed information on utilizing TForce Logistics shipping with the EasyPost API, focusing on account setup, rates, label creation, manifests, tracking, and more. --- ## Carrier Account Setup ### Account Registration Sign up for an EasyPost account to obtain a **Test** and **Production** API key. See Authentication and Key Management for more information. > Note: Negotiated rates are only available in Production mode. ### Carrier Setup Upon sign-up with EasyPost, users gain immediate access to Wallet Carrier Accounts, which can be enabled directly from the Dashboard. For additional carriers, EasyPost supports a Bring Your Own Carrier Account (BYOCA) option. This requires users to register directly with the respective carrier. #### TForce Logistics Shipper Account Registration 1. Contact TForce Logistics to request a shipper account. A representative will be in touch for additional details regarding the account. 2. Inform TForce Logistics about using EasyPost's API for label purchases. 3. Obtain the following test and production account credentials:: 1. TForce Username 2. TForce Password 3. TForce Account Number 4. Input carrier-specific credentials within the EasyPost Carrier Account Dashboard for comprehensive rate access. 5. Acquire rates in **.csv** format from TForce Logistics. Formatting requirements include: 1. The file must be in lbs. not ounces. 2. File must be formatted according to this example: | cost | meta.min | meta.max | | ---- | -------- | -------- | | 4.68 | 0 | 4 | | 4.87 | 4.01 | 5 | | 5.06 | 5.01 | 6 | | 5.25 | 7.01 | 7 | 6. Send the .csv file to EasyPost Support with a request to load the rates into the new TForce Logistics carrier account. Please note that the default rate without a loaded rate card is $0.01. See Rates for more details. #### TForce Logistics Account via API The API structure specified by EasyPost can also be used to add the TForce Logistics carrier shipper account. ```shell curl -X POST https://api.easypost.com/v2/carrier_accounts \ -u "$EASYPOST_API_KEY": \ -H 'Content-Type: application/json' \ -d '{ "carrier_account": { "type": "TforceConciseAccount", "description": "TforceConciseAccount", "credentials": { "account_number": "VALUE", "password": "VALUE", "username": "VALUE" }, "test_credentials": { "account_number": "VALUE", "password": "VALUE", "username": "VALUE" } } }' ``` ### Software Requirements Download an EasyPost Client Library or utilize the REST API with cURL. ### Documentation Review Examine the EasyPost Objects section to understand the API's structure, which is critical for constructing requests and interpreting responses. Related: - [Getting Started Guide](https://docs.easypost.com/guides/getting-started) - [Manage Carrier Accounts](https://app.easypost.com/account/settings?tab=carriers) --- ## Billing Billing is directly handled by TForce Logistics after parcel delivery. EasyPost does not participate in the billing process for TForce Logistics services. Contact a TForce Logistics representative for details. --- ## Rates When integrating a TForce Logistics account with EasyPost, users should know how rates are managed and displayed. Here's a breakdown of key points: #### Default Rate Display - EasyPost initially returns a one-cent rate for shipments once the TForce Logistics account is set up. - TForce Logistics will charge the appropriate amount for postage via their billing system. #### Rate Card - TForce Logistics representatives provide rate cards detailing expected costs based on shipment parameters (package size, weight, location, etc.). - Acquiring this custom rate card from TForce Logistics is crucial, as EasyPost is not automatically privy to these rates. #### Rate Card Integration Once the rate card is received from TForce Logistics, users should contact EasyPost Support for assistance installing this rate card into their account. --- ## Service Levels The TForce Logistics service levels through EasyPost include: Service levels are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=tforce`. Related: - [Service Levels](https://docs.easypost.com/docs/shipments/rates#service-levels) ### Package Restrictions - Packages cannot exceed a weight of 30 lbs. - No single side of the package should surpass 18 inches in length. ### Coverage Area TForce Logistics supports next-day delivery to the entire US and Canada. It has more than 75 strategic shipping centers, which provide a more streamlined drop-off experience and offer industry-leading on-time delivery performance. ![Map indicating TForce Logistics coverage area](https://docs.easypost.com/images/guides/tforce-logistics/tforce-coverage-map.png) Related: - [TForce Logistics Service Levels](https://docs.easypost.com/docs/shipments/rates?carrier=tforce#service-levels) --- ## Predefined Packages Predefined packages provide a convenient way to classify parcels using carrier-defined package types and retrieve applicable rates. When creating a shipment with the EasyPost API, select a predefined package that matches the parcel's characteristics and provide its weight in ounces when required. See the predefined package documentation for supported values and example requests. Predefined packages are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=tforce`. Related: - [Predefined Packages](https://docs.easypost.com/docs/parcels#predefined-packages) --- ## Generating Shipping Labels With EasyPost, generating shipping labels for TForce Logistics is the same process as generating them for any other carrier. Review the Getting Started Guide for help generating a shipping label. ### Manifests Manifesting is **not** supported or required for TForce Logistics. ### Refunding and Voiding Labels Voiding TForce Logistics labels through EasyPost is **not** supported. ### Shipment Options Shipment options are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=tforce`. Related: - [Shipment Options](https://docs.easypost.com/docs/shipments/options) #### Label Formats EasyPost offers native TForce Logistics labels in PNG and ZPL formats. Related: - [Shipment Documentation](https://docs.easypost.com/docs/shipments) - [Reducing API Response Times](https://support.easypost.com/hc/en-us/articles/360048825772-Reducing-API-Response-Times) --- ## Hazardous Materials (HAZMAT) The TForce Logistics policy on hazardous materials is not explicitly detailed in this guide. Shippers are advised to contact TForce Logistics directly for specific hazmat inquiries. --- ## Pickups TForce Logistics accommodates pickups based on individual agreements with customers. While regular pickups can be arranged directly with TForce Logistics during the account registration process, **they cannot be scheduled via the EasyPost API**. --- ## Tracking EasyPost simplifies package tracking by offering two methods: - Tracking with an existing number and carrier. - Using a Tracker included with an EasyPost-purchased shipping label. The service integrates webhooks for timely shipment updates. For detailed information on tracking methods, visit the Tracking Guide. Related: - [Trackers Documentation](https://docs.easypost.com/docs/trackers) - [Trackers Guide](https://docs.easypost.com/guides/tracking-guide) --- ## Additional Resources ### Carrier Metadata The Carrier Metadata endpoint can programmatically return information about service levels, predefined packages, supported features, and shipment options. Use this information to quickly integrate and make educated decisions about the mix of carriers for shipping needs. Additionally, the Carrier Metadata endpoint is available to retrieve comprehensive information about all carriers on the EasyPost platform, enhancing decision-making for carrier services. ### Support and Troubleshooting In addition to the guidance provided in the Carrier Guides, EasyPost offers support to assist with FAQs, troubleshooting issues, and inquiries related to the EasyPost platform. Visit the Help Center for more information. Related: - [Carrier Metadata](https://docs.easypost.com/docs/carrier-metadata) - [Help Center](https://support.easypost.com/hc/en-us) --- ## Talk to a Shipping Expert For questions about getting started with the EasyPost API please talk to a Shipping Expert or Contact Support. Related: - [Talk to a Shipping Expert](https://www.easypost.com/talk-to-easypost) - [Contact Support](https://support.easypost.com/hc/requests/new) --- Source: https://docs.easypost.com/carriers/uds-guide # UDS Guide United Delivery Service (UDS) is a regional carrier known for its efficient and reliable parcel delivery services, primarily in the Midwestern United States. Specializing in last-mile delivery, UDS offers a range of flexible shipping options tailored to meet the needs of both businesses and consumers. This guide includes detailed information on utilizing UDS shipping with the EasyPost API, focusing on account setup, rates, label creation, manifests, tracking, and more. --- ## Carrier Account Setup ### Account Registration Sign up for an EasyPost account to obtain a **Test** and **Production** API key. See Authentication and Key Management for more information. > Note: Negotiated rates are only available in Production mode. ### Carrier Setup Upon sign-up with EasyPost, users gain immediate access to Wallet Carrier Accounts, which can be enabled directly from the Dashboard. For additional carriers, EasyPost supports a Bring Your Own Carrier Account (BYOCA) option. This requires users to register directly with the respective carrier. #### UDS Shipper Account Registration 1. Contact UDS to request a shipper account. A representative will be in touch for additional details regarding the account. 2. Inform UDS about using EasyPost's API for label purchases. 3. Acquire rates and align any additional shipping needs. 4. Obtain the following production credentials: 1. FTP Password 2. FTP Username 5. Input carrier-specific credentials within the EasyPost Carrier Account Dashboard for comprehensive rate access. #### UDS Account via API The API structure specified by EasyPost can also be used to add the UDS carrier shipper account. ```shell curl -X POST https://api.easypost.com/v2/carrier_accounts \ -u "$EASYPOST_API_KEY": \ -H 'Content-Type: application/json' \ -d '{ "carrier_account": { "type": "UdsAccount", "description": "UdsAccount", "credentials": { "ftp_password": "VALUE", "ftp_username": "VALUE" } } }' ``` ### Software Requirements Download an EasyPost Client Library or utilize the REST API with cURL. ### Documentation Review Examine the EasyPost Objects section to understand the API's structure, which is critical for constructing requests and interpreting responses. Related: - [Getting Started Guide](https://docs.easypost.com/guides/getting-started) - [Manage Carrier Accounts](https://app.easypost.com/account/settings?tab=carriers) --- ## Billing Billing is directly handled by UDS using a bill-on-delivery system. EasyPost does not participate in the billing process for UDS services. Contact a UDS representative for details. --- ## Rates ### Default Rate Display EasyPost always returns a $0.01 placeholder rate for UDS shipments. Live postage rates are not returned through this integration. UDS bills the actual postage through its billing system. --- ## Service Levels UDS offers the following services: Service levels are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=uds`. Related: - [Service Levels](https://docs.easypost.com/docs/shipments/rates#service-levels) Related: - [UDS Service Levels](https://docs.easypost.com/docs/shipments/rates?carrier=uds#service-levels) --- ## Predefined Packages Predefined packages provide a convenient way to classify parcels using carrier-defined package types and retrieve applicable rates. When creating a shipment with the EasyPost API, select a predefined package that matches the parcel's characteristics and provide its weight in ounces when required. See the predefined package documentation for supported values and example requests. Predefined packages are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=uds`. Related: - [Predefined Packages](https://docs.easypost.com/docs/parcels#predefined-packages) --- ## Generating Shipping Labels With EasyPost, generating shipping labels for UDS is the same process as generating them for any other carrier. Review the Getting Started Guide for help generating a shipping label. ### One-Call Buys 1-call buys enable streamlined label purchasing through the EasyPost API by consolidating multiple operations into a single API request. This feature is designed to simplify and accelerate the shipping process by combining the creation of a shipment, retrieval of rates, and purchasing the shipping label into one efficient step. See Reducing API Response Times for more information. ### Manifests Manifesting is supported and required for all purchased UDS shipments. ### Refunding and Voiding Labels Voiding UDS labels through EasyPost is **not** supported. ### Shipment Options Shipment options are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=uds`. Related: - [Shipment Options](https://docs.easypost.com/docs/shipments/options) #### Label Formats EasyPost offers native UDS labels in ZPL, PNG, and PDF formats. Related: - [Shipment Documentation](https://docs.easypost.com/docs/shipments) - [Reducing API Response Times](https://support.easypost.com/hc/en-us/articles/360048825772-Reducing-API-Response-Times) --- ## Hazardous Materials (HAZMAT) The UDS policy on hazardous materials is not explicitly detailed in this guide. Shippers are advised to contact UDS directly for specific hazmat inquiries. --- ## Pickups UDS accommodates pickups based on individual agreements with customers. While regular pickups can be arranged directly with UDS during the account registration process, they **cannot be scheduled via the EasyPost API**. --- ## Tracking EasyPost simplifies package tracking by offering two methods: - Tracking with an existing number and carrier. - Using a Tracker included with an EasyPost-purchased shipping label. The service integrates webhooks for timely shipment updates. For detailed information on tracking methods, visit the Tracking Guide. Related: - [Trackers Documentation](https://docs.easypost.com/docs/trackers) - [Trackers Guide](https://docs.easypost.com/guides/tracking-guide) --- ## Additional Resources ### Carrier Metadata The Carrier Metadata endpoint can programmatically return information about service levels, predefined packages, supported features, and shipment options. Use this information to quickly integrate and make educated decisions about the mix of carriers for shipping needs. Additionally, the Carrier Metadata endpoint is available to retrieve comprehensive information about all carriers on the EasyPost platform, enhancing decision-making for carrier services. ### Support and Troubleshooting In addition to the guidance provided in the Carrier Guides, EasyPost offers support to assist with FAQs, troubleshooting issues, and inquiries related to the EasyPost platform. Visit the Help Center for more information. Related: - [Carrier Metadata](https://docs.easypost.com/docs/carrier-metadata) - [Help Center](https://support.easypost.com/hc/en-us) --- ## Talk to a Shipping Expert For questions about getting started with the EasyPost API please talk to a Shipping Expert or Contact Support. Related: - [Talk to a Shipping Expert](https://www.easypost.com/talk-to-easypost) - [Contact Support](https://support.easypost.com/hc/requests/new) --- Source: https://docs.easypost.com/carriers/uniuni-guide # UniUni Guide UniUni is a last-mile delivery carrier serving ecommerce businesses across the United States and Canada. With a focus on speed, reliability, and adaptability, UniUni helps businesses streamline the final leg of the shipping process while supporting scalable, tech-driven logistics solutions. This guide provides detailed information on utilizing UniUni shipping with the EasyPost API, covering account setup, rates, label creation, manifests, tracking, and more. For operational details, shipment nuances, and frequently asked questions, refer to the UniUni Carrier Support and FAQs article. Related: - [UniUni Carrier Support and FAQs](https://support.easypost.com/hc/en-us/articles/39585029870477-UniUni-Carrier-Support-and-FAQs) --- ## Carrier Account Setup ### Account Registration Sign up for an EasyPost account to obtain a **Test** and **Production** API key. See Authentication and Key Management for more information. > Note: Negotiated rates are only available in Production mode. ### Carrier Setup #### UniUni Shipper Account Registration 1. Contact UniUni to request a shipper account. A representative will be in touch for additional details regarding the account. 2. Inform UniUni about using EasyPost's API for label purchases. 3. Acquire rates and align any additional shipping needs. 4. Obtain the following account credentials: 1. `client_id` 2. `client_secret` 3. `customer_number` 4. `pickup_warehouse`: Accepted values: “ATL”, “DEN”, “DFW”, “EWR”, “JFK”, “LAX”, “MIA”, “ORD”, “SEA”, “SJC”, “SLC”, “YEG”, “YOW”, “YQB”, “YQR”, “YUL”, “YVR”, “YWG”, “YXE”, “YYC”, “YYZ” 5. Input carrier-specific credentials within the EasyPost Carrier Account Dashboard for comprehensive rate access. #### UniUni Account via API The API structure specified by EasyPost can also be used to add the UniUni carrier shipper account. ```shell curl -X POST https://api.easypost.com/v2/carrier_accounts \ -u "$EASYPOST_API_KEY": \ -H 'Content-Type: application/json' \ -d '{ "carrier_account": { "type": "UniUniAccount", "description": "UniUniAccount", "credentials": { "client_id": "VALUE", "client_secret": "VALUE", "customer_number": "VALUE", "pickup_warehouse": "VALUE" } } }' ``` ### Software Requirements Download an EasyPost Client Library or utilize the REST API with cURL. ### Documentation Review Examine the EasyPost Objects section to understand the API's structure, which is critical for constructing requests and interpreting responses. Related: - [Getting Started Guide](https://docs.easypost.com/guides/getting-started) - [Manage Carrier Accounts](https://app.easypost.com/account/settings?tab=carriers) --- ## Billing When using a UniUni BYOCA, shipment charges are billed under the shipper's own UniUni account. --- ## Rates UniUni is a **Live Rating** integration, enabling real-time rate retrieval for shipments created via EasyPost. - When creating a shipment, EasyPost requests UniUni for shipment rates specific to the user's UniUni account. - The rates provided are directly from UniUni and tailored to the user's specific account details. - In cases of discrepancies or incorrect rates, users are advised to contact their UniUni account representative. --- ## Service Levels UniUni offers the following service levels: Service levels are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=uniuni`. Related: - [Service Levels](https://docs.easypost.com/docs/shipments/rates#service-levels) ### Coverage Area UniUni has 100+ warehouses and sorting centers across North America. ![Map indicating UniUni coverage area](https://docs.easypost.com/images/guides/uniuni/uniuni-coverage-area-map.png) --- ## Predefined Packages Predefined packages provide a convenient way to classify parcels using carrier-defined package types and retrieve applicable rates. When creating a shipment with the EasyPost API, select a predefined package that matches the parcel's characteristics and provide its weight in ounces when required. See the predefined package documentation for supported values and example requests. Predefined packages are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=uniuni`. Related: - [Predefined Packages](https://docs.easypost.com/docs/parcels#predefined-packages) --- ## Generating Shipping Labels With EasyPost, generating shipping labels for UniUni is the same process as generating them for any other carrier. Review the Getting Started Guide for help generating a shipping label. ### One-Call Buys One-call buys enable streamlined label purchasing through the EasyPost API by consolidating multiple operations into a single API request. This feature is designed to simplify and accelerate the shipping process by combining the creation of a shipment, retrieval of rates, and purchasing the shipping label into one efficient step. See Reducing API Response Times for more information. ### Parcel Weight and Size Limitations - Max length: 20 inches - Max width: 20 inches - Max height: 20 inches - Max perimeter (sum of 3 sides): Less than 50 inches. ### Manifests Manifesting is not supported or required for UniUni. ### Refunding and Voiding Labels Voiding UniUni labels through EasyPost is supported. ### Shipment Options Shipment options are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=uniuni`. Related: - [Shipment Options](https://docs.easypost.com/docs/shipments/options) UniUni supports several shipment options via the EasyPost API. For complete details see: UniUni Carrier Support and FAQs. Related: - [Shipment Documentation](https://docs.easypost.com/docs/shipments) - [UniUni Support and FAQs](https://support.easypost.com/hc/en-us/articles/39585029870477-UniUni-Carrier-Support-and-FAQs) --- ## Hazardous Materials (HAZMAT) UniUni supports limited hazardous materials shipments within the United States. - Shippers must email UniUni at least 48 hours in advance to request approval before tendering hazardous materials. - Only intra-U.S. shipments are eligible for HAZMAT handling. - Requests should include details about the material type and quantity. Please review the UniUni Carrier Support and FAQs article for details. --- ## Pickups UniUni accommodates pickups based on individual agreements with customers. While regular pickups can be arranged directly with UniUni during the account registration process, they **cannot be scheduled via the EasyPost API**. --- ## Tracking EasyPost simplifies package tracking by offering two methods: - Tracking with an existing number and carrier. - Using a Tracker included with an EasyPost-purchased shipping label. The service integrates webhooks for timely shipment updates. For detailed information on tracking methods, visit the Tracking Guide. Related: - [Trackers Documentation](https://docs.easypost.com/docs/trackers) - [Trackers Guide](https://docs.easypost.com/guides/tracking-guide) --- ## Additional Resources ### Carrier Metadata The Carrier Metadata endpoint can programmatically return information about service levels, predefined packages, supported features, and shipment options. Use this information to quickly integrate and make educated decisions about the mix of carriers for shipping needs. Additionally, the Carrier Metadata endpoint is available to retrieve comprehensive information about all carriers on the EasyPost platform, enhancing decision-making for carrier services. ### Support and Troubleshooting In addition to the guidance provided in the Carrier Guides, EasyPost offers support to assist with FAQs, troubleshooting issues, and inquiries related to the EasyPost platform. Visit the Help Center for more information. Related: - [Carrier Metadata](https://docs.easypost.com/docs/carrier-metadata) - [Help Center](https://support.easypost.com/hc/en-us) --- ## Talk to a Shipping Expert For questions about getting started with the EasyPost API please talk to a Shipping Expert or Contact Support. Related: - [Talk to a Shipping Expert](https://www.easypost.com/talk-to-easypost) - [Contact Support](https://support.easypost.com/hc/requests/new) --- Source: https://docs.easypost.com/carriers/ups-byoca-guide # UPS BYOCA Guide With operations in over 200 countries and territories, UPS is committed to advancing global communities through reliable delivery services supported by a foundation of justice and economic opportunity for all. While this guide does not cover UPS Mail Innovations service levels, users can explore this UPS-USPS partnership service for mail and small parcel delivery in more detail separately. Additionally, UPS Worldwide Economy offers a cost-effective solution for lightweight, low-value cross-border B2C shipments, supporting ecommerce businesses in expanding into new international markets. This guide includes detailed information on utilizing UPS for shipping with the EasyPost API, focusing on account setup, rate retrieval, service levels, label generation, tracking, and more. EasyPost supports UPS through two account options: - **UPS Wallet:** Use UPS through EasyPost with wallet billing and EasyPost-managed account setup. - **UPS BYOCA:** Connect an existing UPS account via `UpsAccount` to EasyPost with UPS-provided credentials and carrier-direct billing. UPS DAP (`UpsDapAccount`) is a separate carrier account type and is not a BYOCA account. For frequently asked questions, refer to the UPS Frequently Asked Questions article. Related: - [UPS Frequently Asked Questions](https://support.easypost.com/hc/en-us/articles/360044206872-UPS-Frequently-Asked-Questions) ### UPS Ground Saver® Availability Update **Effective April 17, 2026**, UPS Ground Saver® delivery to Alaska, Hawaii, and U.S. Territories is available on UPS® Digital Access Program (DAP) partner platforms. This update restores a cost-effective UPS shipping option for these destinations. Availability depends on platform readiness and may require enablement before the service is accessible. --- ## Carrier Account Setup ### Account Registration Sign up for an EasyPost account to obtain a **Test** and **Production** API key. See Authentication and Key Management for more information. > Note: Negotiated rates are only available in Production mode. Please review the Getting Started Guide for more information. ### Carrier Setup #### Bring Your Own Carrier Account (BYOCA) to EasyPost > Note: Some UPS BYOCA accounts use an OAuth flow for authorization. For details and API-based setup, see the UPS OAuth 2.0 Update article. 1. Register for a UPS account. 2. Obtain the following account credentials from UPS: 1. UPS Account Number 3. Input carrier-specific credentials within the EasyPost Carrier Account Dashboard for comprehensive rate access. #### UPS Account via API The API structure specified by EasyPost can also be used to add a UPS carrier account. ```shell curl -X POST https://api.easypost.com/v2/carrier_accounts/register_oauth \ -u "$EASYPOST_API_KEY": \ -H 'Content-Type: application/json' \ -d '{ "carrier_account_oauth_registrations": { "type": "UpsAccount", "account_number": "CUSTOMER UPS ACCOUNT NUMBER", "description": "CUSTOMER ACCOUNT DESCRIPTION (optional)", "reference": "UNIQUE ACCOUNT REFERENCE (optional)", "return_to_url": "https://example.com (optional)" } }' ``` ### Software Requirements Download an EasyPost Client Library or utilize the REST API with cURL. ### Documentation Review - Examine the EasyPost Objects section to understand the API's structure, which is critical for constructing requests and interpreting responses. - Download the UPS API documentation on the UPS website. The documentation includes additional information about various fields and formats they accept. > Note: The UPS API interface may differ from the EasyPost API, which is standardized to provide a consistent experience across various shipping carriers. Related: - [Getting Started Guide](https://docs.easypost.com/guides/getting-started) - [UPS Account Sign-Up](https://wwwapps.ups.com/doapp/signup?loc=en_US) - [UPS Ready Program](https://www.easypost.com/ups-ready-program) - [UPS Developer Kit](https://www.ups.com/upsdeveloperkit) --- ## Billing Billing is directly handled by UPS. EasyPost does not participate in the billing process for UPS BYOCA services. --- ## Rates ### UPS Ready As a UPS Ready program partner, all UPS functionality is accessible using the EasyPost API when you Bring Your Own Carrier Account (BYOCA). There are monthly subscriptions for volume shippers and no hidden fees or extra charges. The EasyPost features include rating, shipping, tracking and webhooks, address validation, and more. ### Surcharges and Fees A standard UPS shipping surcharge of $16.00 per package applies for all air services. For UPS Ground packages, a charge of $3.00 per package is incurred when opting for Saturday pickup on the shipping label. Rate responses include itemized surcharges when applicable. These may include `commodity_type`, `delivery_convenience`, `hazmat`, or other fees. Each surcharge is returned in a `surcharges` array within the `rate` and `shipment` objects and includes: - `type`: Carrier-specific surcharge code. - `category`: Standardized surcharge category used across all participating carriers. - `amount`: Fee amount. - `currency`: ISO 4217 format (e.g., `USD`). For a full list of surcharge categories and descriptions, see the Surcharge Details in the Rate Response documentation. Related: - [UPS Ready Program](https://www.easypost.com/ups-ready-program) - [Discounted UPS® Shipping Rates on EasyPost](https://www.easypost.com/discounted-ups-shipping) --- ## Service Levels UPS has several service levels supported by EasyPost, catering to different speeds and types of shipments. Requirements include: - Maximum package weight of 150 lbs. - Maximum package length of 108 inches. - Packages with a large size-to-weight ratio require special pricing and dimensional weight calculations. Service levels are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=upsbyoca`. Related: - [Service Levels](https://docs.easypost.com/docs/shipments/rates#service-levels) Related: - [UPS Service Levels](https://docs.easypost.com/docs/shipments/rates?carrier=UPS#service-levels) --- ## Predefined Packages Predefined packages provide a convenient way to classify parcels using carrier-defined package types and retrieve applicable rates. When creating a shipment with the EasyPost API, select a predefined package that matches the parcel's characteristics and provide its weight in ounces when required. See the predefined package documentation for supported values and example requests. Predefined packages are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=upsbyoca`. Related: - [Predefined Packages](https://docs.easypost.com/docs/parcels#predefined-packages) --- ## Generating Shipping Labels With EasyPost, the process for generating shipping labels for UPS is the same as generating them for any other carrier. Review the Getting Started Guide for help generating a shipping label. ### Shipment Options Shipment options are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=upsbyoca`. Related: - [Shipment Options](https://docs.easypost.com/docs/shipments/options) ### UPS Premier UPS Premier is a UPS service for healthcare and life sciences shipments that require enhanced monitoring and handling, including temperature-sensitive and time-critical deliveries. UPS Premier supports three service tiers: - Silver (01) - Gold (02) - Platinum (03) Additional configuration is available for: - Temperature monitoring (sensor ID) - Special handling instructions For supported fields, handling instruction codes, and validation requirements, see the UPS Premier support article. Related: - [Shipment Documentation](https://docs.easypost.com/docs/shipments) - [Getting Started Guide](https://docs.easypost.com/guides/getting-started) --- ## Hazardous Materials (HAZMAT) As a transportation company, UPS must comply with all governmental laws and regulations relating to the transportation of Hazardous Materials. For detailed information, visit the UPS Hazardous Materials Resource Center. ### Transportation Some HAZMAT types are restricted from aircraft and will only return available ground rates. ### Shippers' Responsibilities Shippers are responsible for other required HAZMAT markings and packaging documentation. Related: - [UPS Hazardous Materials Resource Center](https://www.ups.com/us/en/support/shipping-support/shipping-special-care-regulated-items/hazardous-materials-guide.page) --- ## Pickups EasyPost enables the ability to schedule a UPS pickup. UPS also provides a service for picking up packages on Saturdays, subject to a fee. This service is accessible for US domestic shipping labels across various service levels, including: - UPS Next Day Air Early - UPS Next Day Air - UPS Next Day Saver - UPS 2nd Day Air A.M. - UPS 2nd Day Air - UPS Ground For details on configuring the UPS pickups option, refer to the Pickups API documentation. Related: - [Rates Documentation](https://docs.easypost.com/docs/shipments/rates) - [Pickups Documentation](https://docs.easypost.com/docs/pickups) --- ## Tracking EasyPost simplifies package tracking by offering two methods: - Tracking with an existing number and carrier. - Using a Tracker included with an EasyPost-purchased shipping label. The service integrates webhooks for timely shipment updates. For detailed information on tracking methods, visit the Tracking Guide. Related: - [Trackers Documentation](https://docs.easypost.com/docs/trackers) - [Trackers Guide](https://docs.easypost.com/guides/tracking-guide) --- ## Additional Resources ### Carrier Metadata The Carrier Metadata endpoint can programmatically return information about UPS service levels, predefined packages, supported features, and shipment options. Use this information to quickly integrate and make educated decisions about the mix of carriers for shipping needs. Additionally, the Carrier Metadata endpoint is available to retrieve comprehensive information about all carriers on the EasyPost platform, enhancing decision-making for carrier services. ### Support and Troubleshooting In addition to the guidance provided in the Carrier Guides, EasyPost offers support to assist with FAQs, troubleshooting issues, and inquiries related to the EasyPost platform. Visit the Help Center for more information. Related: - [Carrier Metadata](https://docs.easypost.com/docs/carrier-metadata) - [Help Center](https://support.easypost.com/hc/en-us) --- ## Talk to a Shipping Expert For questions about getting started with the EasyPost API please talk to a Shipping Expert or Contact Support. Related: - [Talk to a Shipping Expert](https://www.easypost.com/talk-to-easypost) - [Contact Support](https://support.easypost.com/hc/requests/new) --- Source: https://docs.easypost.com/carriers/ups-wallet-guide # UPS Wallet Guide With operations in over 200 countries and territories, UPS is committed to advancing global communities through reliable delivery services supported by a foundation of justice and economic opportunity for all. While this guide does not cover UPS Mail Innovations service levels, users can explore this UPS-USPS partnership service for mail and small parcel delivery in more detail separately. Additionally, UPS Worldwide Economy offers a cost-effective solution for lightweight, low-value cross-border B2C shipments, supporting ecommerce businesses in expanding into new international markets. This guide includes detailed information on utilizing UPS for shipping with the EasyPost API, focusing on account setup, rate retrieval, service levels, label generation, tracking, and more. EasyPost supports UPS through two account options: - **UPS Wallet:** Use UPS through EasyPost with wallet billing and EasyPost-managed account setup. - **UPS BYOCA:** Connect an existing UPS account (`UpsAccount`) to EasyPost with UPS-provided credentials and carrier-direct billing. UPS DAP (`UpsDapAccount`) is a separate carrier account type and is not a BYOCA account. For frequently asked questions, refer to the UPS Frequently Asked Questions article. Related: - [UPS Frequently Asked Questions](https://support.easypost.com/hc/en-us/articles/360044206872-UPS-Frequently-Asked-Questions) ### UPS Ground Saver® Availability Update **Effective April 17, 2026**, UPS Ground Saver® delivery to Alaska, Hawaii, and U.S. Territories is available on UPS® Digital Access Program (DAP) partner platforms. This update restores a cost-effective UPS shipping option for these destinations. Availability depends on platform readiness and may require enablement before the service is accessible. --- ## Carrier Account Setup ### Account Registration Sign up for an EasyPost account to obtain a **Test** and **Production** API key. See Authentication and Key Management for more information. > Note: Negotiated rates are only available in Production mode. Please review the Getting Started Guide for more information. ### Carrier Setup #### Create a UPS Wallet Account 1. Log in to EasyPost and navigate to **Account Settings**. 2. Select the **Carriers** tab. 3. Select the **EasyPost Wallet Carriers** tab. 4. Find **UPS Through EasyPost** in the list of carriers and check the boxes to agree to Terms and Conditions. 5. Select **Create Account** to complete the account creation process. After the account is established, the UPS Wallet Account and the Account ID will be displayed ![Steps to create a UPS Wallet account in the EasyPost web UI](https://docs.easypost.com/images/guides/ups/ups-create-account-web-ui.png) #### UPS Wallet Account via API The API structure specified by EasyPost can also be used to add a UPS Wallet account. ```shell curl -X POST https://api.easypost.com/v2/carrier_accounts/register_oauth \ -u "$EASYPOST_API_KEY": \ -H 'Content-Type: application/json' \ -d '{ "carrier_account_oauth_registrations": { "type": "UpsAccount", "account_number": "CUSTOMER UPS ACCOUNT NUMBER", "description": "CUSTOMER ACCOUNT DESCRIPTION (optional)", "reference": "UNIQUE ACCOUNT REFERENCE (optional)", "return_to_url": "https://example.com (optional)", "payment_mode": "aggregation" } }' ``` ### Software Requirements Download an EasyPost Client Library or utilize the REST API with cURL. ### Documentation Review - Examine the EasyPost Objects section to understand the API's structure, which is critical for constructing requests and interpreting responses. - Download the UPS API documentation on the UPS website. The documentation includes additional information about various fields and formats they accept. > Note: The UPS API interface may differ from the EasyPost API, which is standardized to provide a consistent experience across various shipping carriers. Related: - [Getting Started Guide](https://docs.easypost.com/guides/getting-started) - [UPS Account Sign-Up](https://wwwapps.ups.com/doapp/signup?loc=en_US) - [UPS Ready Program](https://www.easypost.com/ups-ready-program) - [UPS Developer Kit](https://www.ups.com/upsdeveloperkit) --- ## Billing Billing is handled through the EasyPost Wallet. Shipment charges are deducted directly from the customer's EasyPost Wallet. --- ## Rates ### UPS Through EasyPost (DAP) Accounts Once a UPS Through EasyPost (DAP) account is enabled, UPS shippers can reduce billing friction for ecommerce merchants, improve partner claims processing, deploy a proactive webhook tracking solution, and adapt internal-facing APIs to provide partner-facing value. Special discounted UPS rates are available for this account type, including significant savings on various domestic and international services. Specific discounts apply to UPS Ground® shipments, UPS 2nd Day Air®, UPS Next Day Air®, and international services. ### Surcharges and Fees A standard UPS shipping surcharge of $16.00 per package applies for all air services. For UPS Ground packages, a charge of $3.00 per package is incurred when opting for Saturday pickup on the shipping label. Rate responses include itemized surcharges when applicable. These may include `commodity_type`, `delivery_convenience`, `hazmat`, or other fees. Each surcharge is returned in a `surcharges` array within the `rate` and `shipment` objects and includes: - `type`: Carrier-specific surcharge code. - `category`: Standardized surcharge category used across all participating carriers. - `amount`: Fee amount. - `currency`: ISO 4217 format (e.g., `USD`). For a full list of surcharge categories and descriptions, see the Surcharge Details in the Rate Response documentation. Related: - [UPS Ready Program](https://www.easypost.com/ups-ready-program) - [Discounted UPS® Shipping Rates on EasyPost](https://www.easypost.com/discounted-ups-shipping) --- ## Service Levels UPS has several service levels supported by EasyPost, catering to different speeds and types of shipments. Requirements include: - Maximum package weight of 150 lbs. - Maximum package length of 108 inches. - Packages with a large size-to-weight ratio require special pricing and dimensional weight calculations. Service levels are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=upswallet`. Related: - [Service Levels](https://docs.easypost.com/docs/shipments/rates#service-levels) Related: - [UPS Service Levels](https://docs.easypost.com/docs/shipments/rates?carrier=UPS#service-levels) --- ## Predefined Packages Predefined packages provide a convenient way to classify parcels using carrier-defined package types and retrieve applicable rates. When creating a shipment with the EasyPost API, select a predefined package that matches the parcel's characteristics and provide its weight in ounces when required. See the predefined package documentation for supported values and example requests. Predefined packages are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=upswallet`. Related: - [Predefined Packages](https://docs.easypost.com/docs/parcels#predefined-packages) --- ## Generating Shipping Labels With EasyPost, the process for generating shipping labels for UPS is the same as generating them for any other carrier. Review the Getting Started Guide for help generating a shipping label. ### Shipment Options Shipment options are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=upswallet`. Related: - [Shipment Options](https://docs.easypost.com/docs/shipments/options) ### UPS Premier UPS Premier is a UPS service for healthcare and life sciences shipments that require enhanced monitoring and handling, including temperature-sensitive and time-critical deliveries. UPS Premier supports three service tiers: - Silver (01) - Gold (02) - Platinum (03) Additional configuration is available for: - Temperature monitoring (sensor ID) - Special handling instructions For supported fields, handling instruction codes, and validation requirements, see the UPS Premier support article. Related: - [Shipment Documentation](https://docs.easypost.com/docs/shipments) - [Getting Started Guide](https://docs.easypost.com/guides/getting-started) --- ## Hazardous Materials (HAZMAT) As a transportation company, UPS must comply with all governmental laws and regulations relating to the transportation of Hazardous Materials. For detailed information, visit the UPS Hazardous Materials Resource Center. ### Transportation Some HAZMAT types are restricted from aircraft and will only return available ground rates. ### Shippers' Responsibilities Shippers are responsible for other required HAZMAT markings and packaging documentation. Related: - [UPS Hazardous Materials Resource Center](https://www.ups.com/us/en/support/shipping-support/shipping-special-care-regulated-items/hazardous-materials-guide.page) --- ## Pickups EasyPost enables the ability to schedule a UPS pickup. UPS also provides a service for picking up packages on Saturdays, subject to a fee. This service is accessible for US domestic shipping labels across various service levels, including: - UPS Next Day Air Early - UPS Next Day Air - UPS Next Day Saver - UPS 2nd Day Air A.M. - UPS 2nd Day Air - UPS Ground For details on configuring the UPS pickups option, refer to the Pickups API documentation. Related: - [Rates Documentation](https://docs.easypost.com/docs/shipments/rates) - [Pickups Documentation](https://docs.easypost.com/docs/pickups) --- ## Tracking EasyPost simplifies package tracking by offering two methods: - Tracking with an existing number and carrier. - Using a Tracker included with an EasyPost-purchased shipping label. The service integrates webhooks for timely shipment updates. For detailed information on tracking methods, visit the Tracking Guide. Related: - [Trackers Documentation](https://docs.easypost.com/docs/trackers) - [Trackers Guide](https://docs.easypost.com/guides/tracking-guide) --- ## Additional Resources ### Carrier Metadata The Carrier Metadata endpoint can programmatically return information about UPS service levels, predefined packages, supported features, and shipment options. Use this information to quickly integrate and make educated decisions about the mix of carriers for shipping needs. Additionally, the Carrier Metadata endpoint is available to retrieve comprehensive information about all carriers on the EasyPost platform, enhancing decision-making for carrier services. ### Support and Troubleshooting In addition to the guidance provided in the Carrier Guides, EasyPost offers support to assist with FAQs, troubleshooting issues, and inquiries related to the EasyPost platform. Visit the Help Center for more information. Related: - [Carrier Metadata](https://docs.easypost.com/docs/carrier-metadata) - [Help Center](https://support.easypost.com/hc/en-us) --- ## Talk to a Shipping Expert For questions about getting started with the EasyPost API please talk to a Shipping Expert or Contact Support. Related: - [Talk to a Shipping Expert](https://www.easypost.com/talk-to-easypost) - [Contact Support](https://support.easypost.com/hc/requests/new) --- Source: https://docs.easypost.com/carriers/usa-export-pba-guide # USA Export - Powered by Asendia Guide USA Export - Powered by Asendia is an EasyPost-exclusive international shipping solution that utilizes USPS for the first-mile delivery and Asendia USA for export to destinations all over the globe. This service is ideal for shippers with packages ranging from sub-pound up to 66 pounds and offers competitive rates via EasyPost-powered carrier accounts. This guide includes detailed information on utilizing USA Export - Powered by Asendia with the EasyPost API, focusing on account setup, rates, label creation, manifests, tracking, and more. --- ## Carrier Account Setup ### Account Registration Sign up for an EasyPost account to obtain a **Test** and **Production** API key. See Authentication and Key Management for more information. > Note: Negotiated rates are only available in Production mode. ### Carrier Setup #### USA Export - Powered by Asendia Account Setup 1. Log in to the EasyPost Dashboard. 2. Navigate to **Account Settings** > **Carriers** > **EasyPost Carrier Accounts**. 3. Locate **USA Export—Powered by Asendia** and click **Create Account**. Upon initiating setup, the user will receive an email outlining the necessary steps to complete the process. 4. Click the **[ ⋯ ]** menu next to the added account and select **Edit Account**. 5. Complete all required fields. An email will be sent confirming the account setup. #### USA Export - Powered by Asendia Account via API The API structure specified by EasyPost can also be used to add the USA Export - Powered by Asendia carrier account. > Note: Credentials are used as endshipper details for the first-mile USPS leg of the shipment. EasyPost Platform users shipping on behalf of others should use the endshipper API to generate and send endshippers to the buy API endpoint and leave credentials blank. ```shell curl -X POST https://api.easypost.com/v2/carrier_accounts \ -u "$EASYPOST_API_KEY": \ -H 'Content-Type: application/json' \ -d '{ "carrier_account": { "type": "UsaExportPbaAccount", "description": "UsaExportPbaAccount", "credentials": { "address_city": "VALUE", "address_state": "VALUE", "address_street": "VALUE", "address_street2": "VALUE", "address_zip": "VALUE", "company_name": "VALUE", "country": "VALUE", "email": "VALUE", "name": "VALUE", "phone": "VALUE" }, "payment_mode": "aggregation" } }' ``` ### Software Requirements Download an EasyPost Client Library or utilize the REST API with cURL. ### Documentation Review Examine the EasyPost Objects section to understand the API's structure, which is critical for constructing requests and interpreting responses. Related: - [Getting Started Guide](https://docs.easypost.com/guides/getting-started) - [Manage Carrier Accounts](https://app.easypost.com/account/settings?tab=carriers) --- ## Billing USA Export - Powered by Asendia is an aggregate carrier. This means the shipping workflow involves multiple carrier services combined into one, with USPS handling the first mile and Asendia USA handling the international export leg. Billing is managed entirely through the EasyPost Wallet: - Both USPS and Asendia USA charges are applied at the time of label purchase. - These may appear as two separate price adjustments, one for each carrier segment. - All rates are pre-negotiated and billed through EasyPost. No direct billing occurs with USPS or Asendia USA. This process allows EasyPost to provide a streamlined international shipping solution using multiple underlying carriers, while consolidating charges into a single EasyPost-managed transaction. Related: - [EasyPost Wallet and Bring Your Own Account Plans](https://support.easypost.com/hc/en-us/articles/39984592062605-EasyPost-Wallet-and-Bring-Your-Own-Carrier-Account-Plans) - [Billing & Payments](https://support.easypost.com/hc/en-us/articles/360042414212-Billing-Payments) --- ## Rates USA Export - Powered by Asendia is a **Live Rating** integration, enabling real-time rate retrieval for shipments created via EasyPost. - Rates for USPS and Asendia USA are returned through the EasyPost and Asendia USA APIs, respectively. - Separate rate adjustments may occur for USPS and Asendia USA. --- ## Service Levels USA Export - Powered by Asendia offers the following service levels: Service levels are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=usaexportpba`. Related: - [Service Levels](https://docs.easypost.com/docs/shipments/rates#service-levels) --- ## Predefined Packages Predefined packages provide a convenient way to classify parcels using carrier-defined package types and retrieve applicable rates. When creating a shipment with the EasyPost API, select a predefined package that matches the parcel's characteristics and provide its weight in ounces when required. See the predefined package documentation for supported values and example requests. Predefined packages are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=usaexportpba`. Related: - [Predefined Packages](https://docs.easypost.com/docs/parcels#predefined-packages) --- ## Generating Shipping Labels Label generation for USA Export - Powered by Asendia differs slightly from standard carrier workflows. A USPS label is generated for each shipment. This label is addressed to the Asendia hub. The Asendia hub will re-label the shipment to its final international destination. ### One-Call Buys One-call buys are not supported at this time. ### Manifests Manifesting is not supported or required. ### Returns Returns are not supported at this time. ### Refunding and Voiding Labels Supported asynchronously. Refunds may take up to 24 hours. ### Shipment Options Shipment options are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=usaexportpba`. Related: - [Shipment Options](https://docs.easypost.com/docs/shipments/options) #### Label Formats EasyPost offers labels in PNG, PDF, and ZPL formats. ### Special Requirements - **Customs Items:** The `customs_items` object must include a code string (e.g., SKU or UPC). - **EasyPost Platform Users:** EndShipper addresses must be included in all shipments due to USPS first-mile handling. An EndShipper refers to the final shipper on whose behalf a platform is purchasing postage. Refer to the EasyPost EndShipper documentation for more details. Related: - [Shipment Documentation](https://docs.easypost.com/docs/shipments) --- ## Hazardous Materials (HAZMAT) The USA Export - Powered by Asendia policy on hazardous materials is not explicitly detailed in this guide. At this time, hazmat is not supported. --- ## Pickups Pickups are not supported and **cannot be scheduled via the EasyPost API.** --- ## Tracking EasyPost simplifies package tracking by offering two methods: - Tracking with an existing number and carrier. - Using a Tracker included with an EasyPost-purchased shipping label. The service integrates webhooks for timely shipment updates. For detailed information on tracking methods, visit the Tracking Guide. > Note: The USA Export - Powered by Asendia services provide end-to-end tracking visibility for all services except for the USA Export Standard service level, which provides limited tracking details up to delivery into the destination country. Related: - [Trackers Documentation](https://docs.easypost.com/docs/trackers) - [Trackers Guide](https://docs.easypost.com/guides/tracking-guide) --- ## Additional Resources ### Carrier Metadata The Carrier Metadata endpoint can programmatically return information about service levels, predefined packages, supported features, and shipment options. Use this information to quickly integrate and make educated decisions about the mix of carriers for shipping needs. Additionally, the Carrier Metadata endpoint is available to retrieve comprehensive information about all carriers on the EasyPost platform, enhancing decision-making for carrier services. ### Support and Troubleshooting In addition to the guidance provided in the Carrier Guides, EasyPost offers support to assist with FAQs, troubleshooting issues, and inquiries related to the EasyPost platform. Visit the Help Center for more information. Related: - [Carrier Metadata](https://docs.easypost.com/docs/carrier-metadata) - [Help Center](https://support.easypost.com/hc/en-us) --- ## Talk to a Shipping Expert For questions about getting started with the EasyPost API please talk to a Shipping Expert or Contact Support. Related: - [Talk to a Shipping Expert](https://www.easypost.com/talk-to-easypost) - [Contact Support](https://support.easypost.com/hc/requests/new) --- Source: https://docs.easypost.com/carriers/usps-guide # USPS Guide The U.S. Postal Service (USPS) is the only delivery service that reaches every address in the nation: nearly 167 million residences, businesses, and Post Office Boxes. The Postal Service generally receives no tax dollars for operating expenses and relies on the sale of postage, products, and services to fund its operations. This is the default USPS guide. It covers EasyPost's standard USPS account, which is added at signup and billed through the EasyPost Wallet. EasyPost supports these USPS accounts: - **USPS:** EasyPost's standard USPS account, added at signup, with EasyPost Wallet billing. This guide covers that account. - **USPS Ship:** A USPS-managed integration that uses USPS authorization and negotiated rates. For operational details, shipment nuances, and frequently asked questions, refer to the USPS Support and FAQs article. Related: - [USPS Support and FAQs](https://support.easypost.com/hc/en-us/articles/17409498201869-USPS-Support-and-FAQs) --- ## Carrier Account Setup ### Account Registration Sign up for an EasyPost account to obtain a **Test** and **Production** API key. See Authentication and Key Management for more information. Negotiated Service Agreement (NSA) rates are only available in Production mode. ### Carrier Setup #### USPS account at signup The standard USPS account is added when you sign up for EasyPost. #### USPS Account via API The API structure specified by EasyPost can also be used to add the standard USPS carrier account. ```shell curl -X POST https://api.easypost.com/v2/carrier_accounts \ -u "$EASYPOST_API_KEY": \ -H 'Content-Type: application/json' \ -d '{ "carrier_account": { "type": "UspsAccount", "description": "UspsAccount", "credentials": { "address_city": "VALUE", "address_state": "VALUE", "address_street": "VALUE", "address_zip": "VALUE", "company_name": "VALUE", "email": "VALUE", "phone": "VALUE", "shipper_id": "VALUE" } } }' ``` ### Software Requirements Download an EasyPost Client Library or utilize the REST API with cURL. ### Documentation Review Examine the EasyPost Objects section to understand the API's structure, which is critical for constructing requests and interpreting responses. Related: - [Getting Started Guide](https://docs.easypost.com/guides/getting-started) --- ## Billing Billing is handled through the EasyPost Wallet. Shipment charges are deducted directly from the customer's EasyPost Wallet. --- ## Rates > Note: **Starting July 12, 2026**, USPS requires length, width, and height on all commercial parcel manifests. As of this date, rating requests missing required dimensions will return an error. See the USPS Support and FAQs article for more details. Three USPS pricing tiers impact shipping rates: - **USPS Retail Pricing**: The rate paid at a local Post Office or other retail location. - **USPS Commercial Pricing**: Offers savings over USPS Retail pricing available to business shippers. - **USPS Merchant Discount Pricing**: A special negotiated rate between EasyPost and USPS that allows EasyPost to provide discounts below USPS Commercial Pricing. See the USPS Rate Chart for more details. Cubic Pricing is based on package volume and is useful for small, dense packages. ### Surcharges Rate responses include itemized surcharges when applicable. These may include `international_handling` or other fees. Each surcharge is returned in a `surcharges` array within the `rate` and `shipment` objects and includes: - `type`: Carrier-specific surcharge code. - `category`: Standardized surcharge category used across all participating carriers. - `amount`: Fee amount. - `currency`: ISO 4217 format (e.g., `USD`). For a full list of surcharge categories and descriptions, see the Surcharge Details in the Rate Response documentation. Related: - [USPS Rate Chart](https://www.easypost.com/usps-rate-chart) - [Cubic Pricing](https://www.easypost.com/cubic-pricing) --- ## Service Levels USPS has several service levels supported by EasyPost, each with specific transit times and conditions. Service levels are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=usps`. Related: - [Service Levels](https://docs.easypost.com/docs/shipments/rates#service-levels) --- ## Predefined Packages Predefined packages provide a convenient way to classify parcels using carrier-defined package types and retrieve applicable rates. When creating a shipment with the EasyPost API, select a predefined package that matches the parcel's characteristics and provide its weight in ounces when required. See the predefined package documentation for supported values and example requests. Predefined packages are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=usps`. Related: - [Predefined Packages](https://docs.easypost.com/docs/parcels#predefined-packages) --- ## Generating Shipping Labels With EasyPost, the process for generating shipping labels for USPS is the same as generating them for any other carrier. Review the Getting Started Guide for help generating a shipping label. ### Manifests EasyPost automatically manifests USPS shipments. When a USPS label is purchased, EasyPost transmits the required electronic files to USPS, eliminating the need for manual manifesting in most cases. Some shippers prefer to group shipments together to generate a single Driver Manifest Summary document. This can be accomplished by manually creating an End-of-Day (EOD) manifest using the following steps. 1. Create a new batch. 2. Add shipments to the batch. 3. Generate a ScanForm (manifest) for the batch. #### Automatic (Nightly) Manifesting EasyPost is required by USPS to automatically manifest all unmanifested shipments each night, typically around 10 PM PST. Attempts to create a manifest after the nightly auto-manifest has been processed may return an error indicating that one or more shipments in the batch were "not found" or "already manifested." #### Avoiding Auto-Manifesting The auto-manifest process can be controlled or delayed by setting a future shipment date. Two shipment options are available to manage this behavior: - `shipment.options.label_date`: Accepts an ISO date/time stamp that defines the intended shipping date for the label. When not specified, EasyPost defaults to the current UTC timestamp. - `shipment.options.date_advance`: Increments the `label_date` by a specified number of days. For example, setting `date_advance: 1` indicates that the shipment will be shipped the following day. EasyPost's nightly auto-manifest process respects any future `label_date` values. Shipments with a future date are not manifested until the declared date is reached. > Important: Shipments created on one day and manifested after the nightly auto-manifest may trigger an error indicating that the shipment has already been manifested. Setting a future `label_date` or using `date_advance` prevents this issue. ### Shipment Options Shipment options are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=usps`. Related: - [Shipment Options](https://docs.easypost.com/docs/shipments/options) #### Label Formats EasyPost supports both domestic and international USPS labels in the following formats: - PNG - PDF - ZPL (may not be supported for letter and card label sizes) - EPL2 Use the EasyPost Label API for file-type requests or conversions. ![USPS International Label](https://docs.easypost.com/images/guides/usps/updated-usps-international-sample.png) ![USPS Domestic Label](https://docs.easypost.com/images/guides/usps/updated-usps-domestic-sample.png) See the Customs Guide for more information. #### Label Size Options Possible values for USPS shipping label sizes: - 4x6 (default) - 4x4 - 8.5x11 - 7x3 (Available when using **predefined_package: Letter** when **First** rate is purchased.) - 6x4 (Available when using **predefined_package: Card** or **Letter** and when **First** rate is purchased.) ### Custom Text Label Options Shipments can have a variety of additional options that can be specified when creating a shipment. These options include custom messages that can be printed on labels. The locations of custom text fields will be displayed according to specific carrier label templates. ![USPS Domestic Label](https://docs.easypost.com/images/guides/usps/updated-usps-domestic-sample-with-fields-highlighted.png) #### JSON Example ```json { "options": { "print_custom_1": "printCustom1", "print_custom_2": "printCustom2", "print_custom_3": "printCustom3", "invoice_number": "INVOICE12345", "label_size": "4x6", "label_format": "PNG" } } ``` Related: - [Shipment Docs](https://docs.easypost.com/docs/shipments) - [Customs Guide](https://docs.easypost.com/guides/customs-guide) --- ## Hazardous Materials (HAZMAT) According to USPS, HazMat is any article or substance designated by the U.S. Department of Transportation as being capable of posing an unreasonable risk to health, safety, or property during transportation. In international commerce, HazMat is known as "dangerous goods." EasyPost is in full compliance with all USPS HazMat guidelines. Users are responsible for specifying the type of HazMat included in each shipment. ### Shipping Restrictions - Extra services are restricted to only adult signatures or USPS Insurance. - Refunds for Priority Mail Express are not available for HazMat if delivered or attempted within three days of mailing. ### Labeling Requirements - Service indicator **H** for identification. - **HAZMAT - Surface Transportation Only** below the return address for surface-only packages. - **HAZMAT after USPS TRACKING #** above the tracking barcode. ![USPS HazMat Label](https://docs.easypost.com/images/guides/usps/usps-hazmat-label.png) ### Transportation Some HazMat types are restricted from aircraft and will only return available ground rates. ### Shippers' Responsibilities Shippers are responsible for other required HAZMAT markings and packaging documentation. ### EasyPost Integration EasyPost will upload HazMat-type electronic data to USPS. ### Carrier Limitations Due to the complexity of HazMat regulations and how each carrier handles them differently, many HazMat types are limited to specific carriers. ### USPS Supported HazMat Types See the table below for valid string values and descriptions of each HazMat type supported by USPS. For more information, refer to USPS Pub 52 Hazardous Material and Dangerous Goods Regulations. | String | Description | |---|---| | AIR_ELIGIBLE_ETHANOL | Air Eligible Ethanol Package | | CLASS_1 | Class 1 - Toy Propellant/Safety Fuse Package | | CLASS_3 | Class 3 - Package | | CLASS_7 | Class 7 - Radioactive Materials Package | | CLASS_8_CORROSIVE | Class 8 - Corrosive Materials Package | | CLASS_8_WET_BATTERY | Class 8 - Nonspillable Wet Battery Package | | CLASS_9_NEW_LITHIUM_INDIVIDUAL | Class 9 - Lithium Battery Marked - Ground Only Package | | CLASS_9_USED_LITHIUM | Class 9 - Lithium Battery - Returns Package | | CLASS_9_NEW_LITHIUM_DEVICE | Class 9 - Lithium batteries, marked package | | CLASS_9_DRY_ICE | Class 9 - Dry Ice Package | | CLASS_9_UNMARKED_LITHIUM | Class 9 - Lithium batteries, unmarked package | | CLASS_9_MAGNETIZED | Class 9 - Magnetized Materials Package | | DIVISION_4_1 | Division 4.1 - Mailable flammable solids and Safety Matches Package | | DIVISION_5_1 | Division 5.1 - Oxidizers Package | | DIVISION_5_2 | Organic Peroxides Package | | DIVISION_6_1 | Division 6.1 - Toxic Materials Package (with an LD50 of 50 mg/kg or less) | | DIVISION_6_2 | Division 6.2 | | EXCEPTED_QUANTITY_PROVISION | Excepted Quantity Provision Package | | GROUND_ONLY | Ground Only | | ID8000 | ID8000 Consumer Commodity Package | | LIGHTERS | Lighters Package | | LIMITED_QUANTITY | Limited Quantity Ground Package | | SMALL_QUANTITY_PROVISION | Small Quantity Provision Package | ### USPS Resources Related: - [USPS HazMat Guide](https://www.easypost.com/blog/2023-05-02-how-to-comply-with-uspss-new-hazmat-shipping-rules-effective-july-9-2023) - [USPS Pub 52](https://pe.usps.com/text/pub52/pub52c2_001.htm) --- ## Pickups USPS will pickup the following package types for free: - Priority Mail Express - Priority Mail - Ground Advantage - USPS Returns - International ### Scheduling Request by 2:00 AM CST for same-day pickup. Packages must be properly sealed and ready for shipment. Related: - [Pickups](https://docs.easypost.com/docs/pickups) --- ## Tracking EasyPost simplifies package tracking by offering two methods: - Tracking with an existing number and carrier. - Using a Tracker included with an EasyPost-purchased shipping label. The service integrates webhooks for timely shipment updates. For detailed information on tracking methods, visit the Tracking Guide. Related: - [Trackers Documentation](https://docs.easypost.com/docs/trackers) - [Trackers Guide](https://docs.easypost.com/guides/tracking-guide) --- ## Additional Resources ### Carrier Metadata The Carrier Metadata endpoint can programmatically return information about USPS service levels, predefined packages, supported features, and shipment options. Use this information to quickly integrate with USPS and make educated decisions about the mix of carriers for shipping needs. Additionally, the Carrier Metadata endpoint is available to retrieve comprehensive information about all carriers on the EasyPost platform, enhancing decision-making for carrier services. ### Support and Troubleshooting In addition to the guidance provided in the Carrier Guides, EasyPost offers support to assist with FAQs, troubleshooting issues, and inquiries related to the EasyPost platform. Visit the Help Center for more information. Related: - [Carrier Metadata](https://docs.easypost.com/docs/carrier-metadata) - [Help Center](https://support.easypost.com/hc/en-us) ### USPS Web Tools USPS offers public APIs called USPS Web Tools. Related: - [USPS Web Tools](https://www.easypost.com/usps-web-tools) --- ## Talk to a Shipping Expert For questions about getting started with the EasyPost API please talk to a Shipping Expert or Contact Support. Related: - [Talk to a Shipping Expert](https://www.easypost.com/talk-to-easypost) - [Contact Support](https://support.easypost.com/hc/requests/new) --- Source: https://docs.easypost.com/carriers/usps-ship-guide # USPS Ship Guide USPS Ship is a USPS integration that enables live rates and label generation through EasyPost using USPS-provided credentials. Rates and labels are generated by USPS systems and returned through the EasyPost API. --- ## Carrier Account Setup ### USPS Account Types **PC Postage** (`USPS`): EasyPost-managed USPS account with EasyPost Wallet billing. No USPS account or USPS authorization required. **USPS Ship Direct NSA** (`UspsShipAccount`): Direct USPS account with negotiated rates. Requires USPS authorization and USPS account credentials. **USPS Ship CeC Platform** (`UspsShipAccount`): Platform or marketplace participating in the USPS Connect eCommerce (CeC) program. Requires Platform EPS, Merchant EPA, and USPS onboarding. **USPS Ship Platform Account** (`UspsShipPlatformAccount`): Child or UTM account that inherits USPS Ship configuration from a parent USPS Ship account. Used for multi-user or multi-merchant implementations. For account setup instructions, see: - USPS Ship Wallet Carrier Account (Direct NSA) - USPS Ship Wallet Carrier Account (CeC Platform NSA) - Add a USPS Ship Wallet Account from the Dashboard ### Account Registration Sign up for an EasyPost account to obtain a **Test** and **Production** API key. See Authentication and Key Management for more information. > Note: Negotiated rates are only available in Production mode. ### Carrier Setup #### USPS Requirements USPS Ship carrier accounts are added using an OAuth flow. During setup, users are redirected to USPS to authorize EasyPost. After authorization, USPS provides account identifiers, such as EPA, CRID, and MID, which are used to complete account configuration. - **Enterprise Payment Account (EPA):** A USPS-managed account configured with negotiated rates, allowing EasyPost to generate designated pricing. Although technically a payment account, for USPS Ship Wallet accounts USPS is only using this to manage rate cards, so there is no need to fund the EPA. EasyPost manages all payments for these accounts via EasyPost Wallet. - **Customer Registration ID (CRID):** A unique identifier automatically assigned by USPS when a business creates a USPS account. - **Mailer ID (MID):** A 6-digit or 9-digit identifier assigned by USPS to a shipper. Used to identify the mailer on outbound shipments and in manifest submissions. - High-volume shippers processing more than 10M pieces within a 120-day period must obtain a 6-digit MID directly from USPS. A 6-digit MID provides a larger pool of unique tracking codes and helps avoid duplication at scale. - If multiple MIDS are not tied to specific locations, any MID from the available MID pool can be used across shipments. - If MIDs are tied to specific shipping locations, a separate carrier account should be configured for each location using the corresponding MID. - **Manifest Mailer ID (Manifest MID):** A MID designated for manifest submissions. Depending on account configuration, this may be the same as the primary MID or a separate value. - The Manifest MID is used for the Electronic File Number (EFN) displayed on the ScanForm and is not included on individual shipping labels. - USPS does not require the Manifest MID to differ from the Mailer ID unless a separate Manifest MID has been explicitly assigned. - **Returns Mailer ID (Returns MID):** A MID designated for return label generation. Required when the account is enrolled in USPS returns services and used to identify the return destination on USPS return labels. - **Contract Number:** The USPS 7-digit contract identifier associated with negotiated USPS rates. This value may be required for accounts using contract pricing and is used during USPS onboarding. Contact your USPS representative if you have an NSA but do not know the contract number. #### USPS Ship Account Configurations USPS Ship supports different account configurations, including: - **Direct Negotiated Service Agreement (NSA):** A Direct NSA is a negotiated contract between USPS and a high-volume shipper (e.g., large retailer or enterprise). The shipper has a direct relationship with USPS and uses their own negotiated rates. - **Connect eCommerce (CeC) NSA:** A CeC NSA is a negotiated USPS contract with a platform or marketplace. The platform gets discounted USPS rates, sells postage to merchants at a higher merchant rate, and earns commission from the difference. Refer to the following guides for setup instructions: - USPS Ship Wallet Carrier Account (NSA) - USPS Ship Wallet Carrier Account (CeC Platform) Related: - [USPS Ship Carrier Account (NSA)](https://support.easypost.com/hc/en-us/articles/45004340959373-USPS-Ship-Carrier-Account-NSA) - [USPS Ship Wallet Carrier Account (CeC Platform)](https://support.easypost.com/hc/en-us/articles/45004353305101-USPS-Ship-Wallet-Carrier-Account-CeC-Platform) #### USPS Ship Account via API The API structure specified by EasyPost can also be used to add a USPS Ship carrier account. ```shell curl -X POST https://api.easypost.com/v2/carrier_accounts/register_oauth \ -u "$EASYPOST_API_KEY": \ -H 'Content-Type: application/json' \ -d '{ "carrier_account": { "type": "UspsShipAccount", "description": "UspsShipAccount", "credentials": { "account_number": "VALUE", "address_city": "VALUE", "address_state": "VALUE", "address_street": "VALUE", "address_zip": "VALUE", "client_id": "VALUE", "client_secret": "VALUE", "company_name": "VALUE", "contract_number": "VALUE", "customer_registration_id": "VALUE", "email": "VALUE", "mailer_id": "VALUE", "manifest_id": "VALUE", "partner_oauth_url": "VALUE", "phone": "VALUE", "platform_account_number": "VALUE", "refresh_token": "VALUE", "returns_mailer_id": "VALUE", "secondary_account_number": "VALUE", "shipper_id": "VALUE" } } }' ``` ### Software Requirements Download an EasyPost Client Library or utilize the REST API with cURL. ### Documentation Review Examine the EasyPost Objects section to understand the API's structure, which is critical for constructing requests and interpreting responses. Related: - [Getting Started Guide](https://docs.easypost.com/guides/getting-started) - [Manage Carrier Accounts](https://app.easypost.com/account/settings?tab=carriers) --- ## Billing For USPS Ship Wallet accounts, billing is managed through the EasyPost Wallet. Postage payment, adjustments, and refunds are processed through the Wallet, while rate cards and contract configuration are managed directly by USPS. Passthrough USPS Ship accounts are billed by USPS directly; contact your USPS representative with billing inquiries. For Wallet accounts, refund behavior depends on when the refund request is submitted. - **Before manifest:** The label is canceled, and the full postage amount is refunded to the Wallet. - **After manifest:** USPS charges a 10% fee for unused manifested labels. This fee is deducted from the refund amount issued to the Wallet. --- ## Rates USPS Ship is a Live Rating integration, enabling real-time rate retrieval for shipments created via EasyPost. - When creating a shipment, EasyPost requests USPS for shipment rates specific to the user's USPS account or contract. - The rates provided are directly from USPS and tailored to the user's specific account details. > Note: USPS Ship requires parcel dimensions (length, width, and height) for all shipments. Rates cannot be retrieved using weight alone. If dimensions are not provided, the following error is returned: ”shipment.parcel: All of length, width, and height must be present”. --- ## Service Levels USPS Ship offers the following service levels: Service levels are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=uspsship`. Related: - [Service Levels](https://docs.easypost.com/docs/shipments/rates#service-levels) --- ## Predefined Packages Predefined packages provide a convenient way to classify parcels using carrier-defined package types and retrieve applicable rates. When creating a shipment with the EasyPost API, select a predefined package that matches the parcel's characteristics and provide its weight in ounces when required. See the predefined package documentation for supported values and example requests. Predefined packages are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=uspsship`. ### Parcel Weight and Size Limitations #### Domestic Packages - **Maximum weight limit:** 70 pounds. - **Maximum dimensions:** 108 inches combined length and girth. - **Exception:** USPS Ground Advantage™ mailpieces may measure up to 130 inches in combined length and girth. #### International Packages - Maximum weight and size vary by destination country. - Dimensions and weight limits can be determined using the [USPS Postage Calculator](https://postcalc.usps.com/). Related: - [Predefined Packages](https://docs.easypost.com/docs/parcels#predefined-packages) --- ## Generating Shipping Labels With EasyPost, generating shipping labels for USPS Ship is the same process as generating them for any other carrier. Review the Getting Started Guide for help generating a shipping label. ### One-Call Buys One-call buys enable streamlined label purchasing through the EasyPost API by consolidating multiple operations into a single API request. This feature is designed to simplify and accelerate the shipping process by combining the creation of a shipment, retrieval of rates, and purchasing the shipping label into one efficient step. See Reducing API Response Times for more information. ### Manifests USPS recommends creating a ScanForm to consolidate shipments for acceptance. However, manifesting is not required for USPS Ship, and labels are valid upon creation. ScanForms can be created using the ScanForm endpoint or as part of a Batch. ### Returns USPS Ship supports return label generation through EasyPost. To create a return shipment, set `is_return` to `true` when creating the Shipment. Supported return service levels include: Service levels are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=uspsship`. Select the applicable return service when purchasing the Shipment. The purchased label is generated as a USPS return label. ### Refunding and Voiding Labels Voiding USPS Ship labels through EasyPost is supported. ### Shipment Options Shipment options are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=uspsship`. Related: - [Shipment Options](https://docs.easypost.com/docs/shipments/options) For USPS Ship custom label text fields, EasyPost now applies silent truncation. Values longer than 30 characters in `print_custom_*` fields are silently truncated, and a warning is returned in `shipment.messages`. #### Label Formats EasyPost offers USPS Ship labels in PDF, PNG, and ZPL formats. #### Label Size Options - **Domestic:** 4 x 6 and 4 x 5 - **International:** 4 x 6 Related: - [Shipment Documentation](https://docs.easypost.com/docs/shipments) --- ## Hazardous Materials (HAZMAT) This guide does not specify handling hazardous materials with USPS Ship. Please review the USPS Carrier Guide for specific USPS guidelines, shipping restrictions, and requirements. ### Domestic Values - `AIR_ELIGIBLE_ETHANOL` - `CLASS_1` - `CLASS_3` - `CLASS_7` - `CLASS_8_CORROSIVE` - `CLASS_8_WET_BATTERY` - `CLASS_9_NEW_LITHIUM_INDIVIDUAL` - `CLASS_9_USED_LITHIUM` - `CLASS_9_NEW_LITHIUM_DEVICE` - `CLASS_9_DRY_ICE` - `CLASS_9_UNMARKED_LITHIUM` - `CLASS_9_MAGNETIZED` - `DIVISION_4_1` - `DIVISION_5_1` - `DIVISION_5_2` - `DIVISION_6_1` - `DIVISION_6_2` - `EXCEPTED_QUANTITY_PROVISION` - `GROUND_ONLY` - `ID8000` - `LIGHTERS` - `LIMITED_QUANTITY` - `SMALL_QUANTITY_PROVISION` ### International Values (subset) - `CLASS_7` - `CLASS_9_UNMARKED_LITHIUM` - `DIVISION_6_2` --- ## Pickups USPS pickups are supported for `UspsShipAccount` and `UspsShipPlatformAccount` carrier accounts through EasyPost. See the Pickups documentation for information about creating and managing pickups. --- ## Tracking EasyPost simplifies package tracking by offering two methods: - Tracking with an existing number and carrier. - Using a Tracker included with an EasyPost-purchased shipping label. The service integrates webhooks for timely shipment updates. For detailed information on tracking methods, visit the Tracking Guide. Related: - [Trackers Documentation](https://docs.easypost.com/docs/trackers) - [Trackers Guide](https://docs.easypost.com/guides/tracking-guide) --- ## Additional Resources ### Carrier Metadata The Carrier Metadata endpoint can programmatically return information about service levels, predefined packages, supported features, and shipment options. Use this information to quickly integrate and make educated decisions about the mix of carriers for shipping needs. Additionally, the Carrier Metadata endpoint is available to retrieve comprehensive information about all carriers on the EasyPost platform, enhancing decision-making for carrier services. ### Support and Troubleshooting In addition to the guidance provided in the Carrier Guides, EasyPost offers support to assist with FAQs, troubleshooting issues, and inquiries related to the EasyPost platform. Visit the Help Center for more information. Related: - [Carrier Metadata](https://docs.easypost.com/docs/carrier-metadata) - [Help Center](https://support.easypost.com/hc/en-us) --- ## Talk to a Shipping Expert For questions about getting started with the EasyPost API please talk to a Shipping Expert or Contact Support. Related: - [Talk to a Shipping Expert](https://www.easypost.com/talk-to-easypost) - [Contact Support](https://support.easypost.com/hc/requests/new) --- Source: https://docs.easypost.com/carriers/usps-wallet-guide # USPS Wallet Guide The U.S. Postal Service (USPS) is the only delivery service that reaches every address in the nation: nearly 167 million residences, businesses, and Post Office Boxes. The Postal Service generally receives no tax dollars for operating expenses and relies on the sale of postage, products, and services to fund its operations. This guide provides detailed information on utilizing USPS shipping with the EasyPost API, focusing on account setup, rates, label creation, pickups, tracking, and more. This guide covers the USPS Wallet carrier account, billed through EasyPost. It routes shipments to USPS Ship Platform when the platform is healthy and otherwise falls back to the PC Postage account. For the standard USPS account added at signup, see the USPS Guide. For USPS Ship setup and onboarding, see the USPS Ship Carrier Guide. For operational details, shipment nuances, and frequently asked questions, refer to the USPS Support and FAQs article. Related: - [USPS Support and FAQs](https://support.easypost.com/hc/en-us/articles/17409498201869-USPS-Support-and-FAQs) --- ## Carrier Account Setup ### Account Registration Sign up for an EasyPost account to obtain a **Test** and **Production** API key. See Authentication and Key Management for more information. Negotiated Service Agreement (NSA) rates are only available in Production mode. ### Carrier Setup #### Create a USPS Wallet Carrier Account 1. Log in to EasyPost and navigate to **Account Settings**. 2. Select the **Carriers** tab. 3. Select the **EasyPost Wallet Carriers** tab. 4. Navigate to **USPS Account** in the list of carriers and select **Create Account** to complete the account creation process. ![USPS Create Account](https://docs.easypost.com/images/guides/usps/usps-create-account.png) #### USPS Wallet Account via API The API structure specified by EasyPost can also be used to add a USPS Wallet carrier account. ```shell curl -X POST https://api.easypost.com/v2/carrier_accounts \ -u "$EASYPOST_API_KEY": \ -H 'Content-Type: application/json' \ -d '{ "carrier_account": { "type": "UspsAccount", "description": "UspsAccount", "payment_mode": "aggregation" } }' ``` ### Software Requirements Download an EasyPost Client Library or utilize the REST API with cURL. ### Documentation Review Examine the EasyPost Objects section to understand the API's structure, which is critical for constructing requests and interpreting responses. Related: - [Getting Started Guide](https://docs.easypost.com/guides/getting-started) --- ## Billing Billing is handled through the EasyPost Wallet. Shipment charges are deducted directly from the customer's EasyPost Wallet. --- ## Rates > Note: **Starting July 12, 2026**, USPS requires length, width, and height on all commercial parcel manifests. As of this date, rating requests missing required dimensions will return an error. See the USPS Support and FAQs article for more details. Three USPS pricing tiers impact shipping rates: - **USPS Retail Pricing**: The rate paid at a local Post Office or other retail location. - **USPS Commercial Pricing**: Offers savings over USPS Retail pricing available to business shippers. - **USPS Merchant Discount Pricing**: A special negotiated rate between EasyPost and USPS that allows EasyPost to provide discounts below USPS Commercial Pricing. See the USPS Rate Chart for more details. Cubic Pricing is based on package volume and is useful for small, dense packages. ### Surcharges Rate responses include itemized surcharges when applicable. These may include `international_handling` or other fees. Each surcharge is returned in a `surcharges` array within the `rate` and `shipment` objects and includes: - `type`: Carrier-specific surcharge code. - `category`: Standardized surcharge category used across all participating carriers. - `amount`: Fee amount. - `currency`: ISO 4217 format (e.g., `USD`). For a full list of surcharge categories and descriptions, see the Surcharge Details in the Rate Response documentation. Related: - [USPS Rate Chart](https://www.easypost.com/usps-rate-chart) - [Cubic Pricing](https://www.easypost.com/cubic-pricing) --- ## Service Levels USPS has several service levels supported by EasyPost, each with specific transit times and conditions. Service levels are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=uspswallet`. Related: - [Service Levels](https://docs.easypost.com/docs/shipments/rates#service-levels) --- ## Predefined Packages Predefined packages provide a convenient way to classify parcels using carrier-defined package types and retrieve applicable rates. When creating a shipment with the EasyPost API, select a predefined package that matches the parcel's characteristics and provide its weight in ounces when required. See the predefined package documentation for supported values and example requests. Predefined packages are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=uspswallet`. Related: - [Predefined Packages](https://docs.easypost.com/docs/parcels#predefined-packages) --- ## Generating Shipping Labels With EasyPost, the process for generating shipping labels for USPS is the same as generating them for any other carrier. Review the Getting Started Guide for help generating a shipping label. ### Manifests EasyPost automatically manifests USPS shipments. When a USPS label is purchased, EasyPost transmits the required electronic files to USPS, eliminating the need for manual manifesting in most cases. Some shippers prefer to group shipments together to generate a single Driver Manifest Summary document. This can be accomplished by manually creating an End-of-Day (EOD) manifest using the following steps. 1. Create a new batch. 2. Add shipments to the batch. 3. Generate a ScanForm (manifest) for the batch. #### Automatic (Nightly) Manifesting EasyPost is required by USPS to automatically manifest all unmanifested shipments each night, typically around 10 PM PST. Attempts to create a manifest after the nightly auto-manifest has been processed may return an error indicating that one or more shipments in the batch were "not found" or "already manifested." #### Avoiding Auto-Manifesting The auto-manifest process can be controlled or delayed by setting a future shipment date. Two shipment options are available to manage this behavior: - `shipment.options.label_date`: Accepts an ISO date/time stamp that defines the intended shipping date for the label. When not specified, EasyPost defaults to the current UTC timestamp. - `shipment.options.date_advance`: Increments the `label_date` by a specified number of days. For example, setting `date_advance: 1` indicates that the shipment will be shipped the following day. EasyPost's nightly auto-manifest process respects any future `label_date` values. Shipments with a future date are not manifested until the declared date is reached. > Important: Shipments created on one day and manifested after the nightly auto-manifest may trigger an error indicating that the shipment has already been manifested. Setting a future `label_date` or using `date_advance` prevents this issue. ### Shipment Options Shipment options are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=uspswallet`. Related: - [Shipment Options](https://docs.easypost.com/docs/shipments/options) #### Label Formats EasyPost supports both domestic and international USPS labels in the following formats: - PNG - PDF - ZPL (may not be supported for letter and card label sizes) - EPL2 Use the EasyPost Label API for file-type requests or conversions. ![USPS International Label](https://docs.easypost.com/images/guides/usps/updated-usps-international-sample.png) ![USPS Domestic Label](https://docs.easypost.com/images/guides/usps/updated-usps-domestic-sample.png) See the Customs Guide for more information. #### Label Size Options Possible values for USPS shipping label sizes: - 4x6 (default) - 4x4 - 8.5x11 - 7x3 (Available when using **predefined_package: Letter** when **First** rate is purchased.) - 6x4 (Available when using **predefined_package: Card** or **Letter** and when **First** rate is purchased.) ### Custom Text Label Options Shipments can have a variety of additional options that can be specified when creating a shipment. These options include custom messages that can be printed on labels. The locations of custom text fields will be displayed according to specific carrier label templates. ![USPS Domestic Label](https://docs.easypost.com/images/guides/usps/updated-usps-domestic-sample-with-fields-highlighted.png) #### JSON Example ```json { "options": { "print_custom_1": "printCustom1", "print_custom_2": "printCustom2", "print_custom_3": "printCustom3", "invoice_number": "INVOICE12345", "label_size": "4x6", "label_format": "PNG" } } ``` Related: - [Shipment Docs](https://docs.easypost.com/docs/shipments) - [Customs Guide](https://docs.easypost.com/guides/customs-guide) --- ## Hazardous Materials (HAZMAT) According to USPS, HazMat is any article or substance designated by the U.S. Department of Transportation as being capable of posing an unreasonable risk to health, safety, or property during transportation. In international commerce, HazMat is known as "dangerous goods." EasyPost is in full compliance with all USPS HazMat guidelines. Users are responsible for specifying the type of HazMat included in each shipment. ### Shipping Restrictions - Extra services are restricted to only adult signatures or USPS Insurance. - Refunds for Priority Mail Express are not available for HazMat if delivered or attempted within three days of mailing. ### Labeling Requirements - Service indicator **H** for identification. - **HAZMAT - Surface Transportation Only** below the return address for surface-only packages. - **HAZMAT after USPS TRACKING #** above the tracking barcode. ![USPS HazMat Label](https://docs.easypost.com/images/guides/usps/usps-hazmat-label.png) ### Transportation Some HazMat types are restricted from aircraft and will only return available ground rates. ### Shippers' Responsibilities Shippers are responsible for other required HAZMAT markings and packaging documentation. ### EasyPost Integration EasyPost will upload HazMat-type electronic data to USPS. ### Carrier Limitations Due to the complexity of HazMat regulations and how each carrier handles them differently, many HazMat types are limited to specific carriers. ### USPS Supported HazMat Types See the table below for valid string values and descriptions of each HazMat type supported by USPS. For more information, refer to USPS Pub 52 Hazardous Material and Dangerous Goods Regulations. | String | Description | |---|---| | AIR_ELIGIBLE_ETHANOL | Air Eligible Ethanol Package | | CLASS_1 | Class 1 - Toy Propellant/Safety Fuse Package | | CLASS_3 | Class 3 - Package | | CLASS_7 | Class 7 - Radioactive Materials Package | | CLASS_8_CORROSIVE | Class 8 - Corrosive Materials Package | | CLASS_8_WET_BATTERY | Class 8 - Nonspillable Wet Battery Package | | CLASS_9_NEW_LITHIUM_INDIVIDUAL | Class 9 - Lithium Battery Marked - Ground Only Package | | CLASS_9_USED_LITHIUM | Class 9 - Lithium Battery - Returns Package | | CLASS_9_NEW_LITHIUM_DEVICE | Class 9 - Lithium batteries, marked package | | CLASS_9_DRY_ICE | Class 9 - Dry Ice Package | | CLASS_9_UNMARKED_LITHIUM | Class 9 - Lithium batteries, unmarked package | | CLASS_9_MAGNETIZED | Class 9 - Magnetized Materials Package | | DIVISION_4_1 | Division 4.1 - Mailable flammable solids and Safety Matches Package | | DIVISION_5_1 | Division 5.1 - Oxidizers Package | | DIVISION_5_2 | Organic Peroxides Package | | DIVISION_6_1 | Division 6.1 - Toxic Materials Package (with an LD50 of 50 mg/kg or less) | | DIVISION_6_2 | Division 6.2 | | EXCEPTED_QUANTITY_PROVISION | Excepted Quantity Provision Package | | GROUND_ONLY | Ground Only | | ID8000 | ID8000 Consumer Commodity Package | | LIGHTERS | Lighters Package | | LIMITED_QUANTITY | Limited Quantity Ground Package | | SMALL_QUANTITY_PROVISION | Small Quantity Provision Package | ### USPS Resources Related: - [USPS HazMat Guide](https://www.easypost.com/blog/2023-05-02-how-to-comply-with-uspss-new-hazmat-shipping-rules-effective-july-9-2023) - [USPS Pub 52](https://pe.usps.com/text/pub52/pub52c2_001.htm) --- ## Pickups USPS will pickup the following package types for free: - Priority Mail Express - Priority Mail - Ground Advantage - USPS Returns - International ### Scheduling Request by 2:00 AM CST for same-day pickup. Packages must be properly sealed and ready for shipment. Related: - [Pickups](https://docs.easypost.com/docs/pickups) --- ## Tracking EasyPost simplifies package tracking by offering two methods: - Tracking with an existing number and carrier. - Using a Tracker included with an EasyPost-purchased shipping label. The service integrates webhooks for timely shipment updates. For detailed information on tracking methods, visit the Tracking Guide. Related: - [Trackers Documentation](https://docs.easypost.com/docs/trackers) - [Trackers Guide](https://docs.easypost.com/guides/tracking-guide) --- ## Additional Resources ### Carrier Metadata The Carrier Metadata endpoint can programmatically return information about USPS service levels, predefined packages, supported features, and shipment options. Use this information to quickly integrate with USPS and make educated decisions about the mix of carriers for shipping needs. Additionally, the Carrier Metadata endpoint is available to retrieve comprehensive information about all carriers on the EasyPost platform, enhancing decision-making for carrier services. ### Support and Troubleshooting In addition to the guidance provided in the Carrier Guides, EasyPost offers support to assist with FAQs, troubleshooting issues, and inquiries related to the EasyPost platform. Visit the Help Center for more information. Related: - [Carrier Metadata](https://docs.easypost.com/docs/carrier-metadata) - [Help Center](https://support.easypost.com/hc/en-us) ### USPS Web Tools USPS offers public APIs called USPS Web Tools. Related: - [USPS Web Tools](https://www.easypost.com/usps-web-tools) --- ## Talk to a Shipping Expert For questions about getting started with the EasyPost API please talk to a Shipping Expert or Contact Support. Related: - [Talk to a Shipping Expert](https://www.easypost.com/talk-to-easypost) - [Contact Support](https://support.easypost.com/hc/requests/new) --- Source: https://docs.easypost.com/carriers/veho-byoca-guide # Veho Guide Veho revolutionizes package delivery for the modern economy. Combined with EasyPost, they provide ecommerce shippers with seamless access to a best-in-class delivery experience. This guide includes detailed information on utilizing Veho shipping with the EasyPost API, focusing on account setup, rates, label creation, manifests, tracking, and more. --- ## Carrier Account Setup ### Account Registration Sign up for an EasyPost account to obtain a **Test** and **Production** API key. See Authentication and Key Management for more information. > Note: Negotiated rates are only available in Production mode. Please review the Getting Started Guide for more information. ### Carrier Setup Upon sign-up with EasyPost, users gain immediate access to Wallet Carrier Accounts, which can be enabled directly from the Dashboard. For additional carriers, EasyPost supports a Bring Your Own Carrier Account (BYOCA) option. This requires users to register directly with the respective carrier. #### Veho Shipper Account Registration 1. Contact Veho to request a shipper account. A representative will be in touch for additional details regarding the account. 2. Inform Veho about using EasyPost's API for label purchases. 3. Acquire rates and align any additional shipping needs. 4. Obtain Veho's account credentials: 1. Veho API Key 5. Input carrier-specific credentials within the EasyPost Carrier Account Dashboard for comprehensive rate access. #### Veho Account via API The API structure specified by EasyPost can also be used to add the Veho carrier shipper account. ```shell curl -X POST https://api.easypost.com/v2/carrier_accounts \ -u "$EASYPOST_API_KEY": \ -H 'Content-Type: application/json' \ -d '{ "carrier_account": { "type": "VehoAccount", "description": "VehoAccount", "credentials": { "api_key": "VALUE" }, "test_credentials": { "api_key": "VALUE" } } }' ``` ### Software Requirements Download an EasyPost Client Library or utilize the REST API with cURL. ### Documentation Review Examine the EasyPost Objects section to understand the API's structure, which is critical for constructing requests and interpreting responses. Related: - [Getting Started Guide](https://docs.easypost.com/guides/getting-started) - [Manage Carrier Accounts](https://app.easypost.com/account/settings?tab=carriers) --- ## Billing When using a Veho BYOCA, shipment charges are billed under the shipper's own Veho account. --- ## Rates Veho is a **Live Rating** integration, enabling real-time rate retrieval for shipments created via EasyPost. Rates are guaranteed valid for a minimum of five minutes. - When creating a shipment, EasyPost requests Veho for shipment rates specific to the user's Veho account. - The rates provided are directly from Veho and tailored to the user's specific account details. - In cases of discrepancies or incorrect rates, users are advised to contact their Veho account representative. - The representative can then update the rates in Veho's database to ensure user account accuracy. **IMPORTANT:** Veho's rate areas will receive an update **effective April 1, 2025**. Users should verify their rates after this date and contact Veho with any questions. --- ## Service Levels Veho delivers seven days per week. Service levels are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=vehobyoca`. Related: - [Service Levels](https://docs.easypost.com/docs/shipments/rates#service-levels) > Note: Some services are contracted by Veho. Availability of services may vary based on contractual agreement. Contact a Veho representative for clarification on contracted services. ### Coverage Area ![Veho Coverage Map](https://docs.easypost.com/images/guides/veho/veho-coverage-map.png) Related: - [Veho Service Levels](https://docs.easypost.com/docs/shipments/rates?carrier=Veho#service-levels) --- ## Predefined Packages Predefined packages provide a convenient way to classify parcels using carrier-defined package types and retrieve applicable rates. When creating a shipment with the EasyPost API, select a predefined package that matches the parcel's characteristics and provide its weight in ounces when required. See the predefined package documentation for supported values and example requests. Predefined packages are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=vehobyoca`. Related: - [Predefined Packages](https://docs.easypost.com/docs/parcels#predefined-packages) --- ## Generating Shipping Labels With EasyPost, the process for generating shipping labels for Veho is the same as generating them for any other carrier. Review the Getting Started Guide for help generating a shipping label. ### Manifests Manifesting requirements may vary by agreement type: - **Retailers:** Manifesting is contractually required. - **Perishable, Meal Kit, and other Partners:** Manifesting is not required if exact delivery dates are provided to Veho. Contact Veho directly for questions regarding specific manifesting requirements. Related: - [ScanForms](https://docs.easypost.com/docs/scan-form) - [Manifest Guide](https://docs.easypost.com/guides/manifest-guide) ### Refunding and Voiding Labels Voiding Veho labels through EasyPost is supported. The **Refund** button in the EasyPost dashboard, or the **/refund** endpoint accessible through the API, allows for the voiding of unused Veho labels. See Refund a Shipment for more information. ### Shipment Options Shipment options are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=vehobyoca`. Related: - [Shipment Options](https://docs.easypost.com/docs/shipments/options) #### Label Formats EasyPost offers native Veho labels in PNG, PDF, and ZPL formats. Related: - [Shipment Documentation](https://docs.easypost.com/docs/shipments) - [Shipment Refunds Documentation](https://docs.easypost.com/docs/shipments/shipping-refund#refund-a-shipment) --- ## Hazardous Materials (HAZMAT) Veho's policy on hazardous materials is not explicitly detailed. Shippers are advised to contact Veho directly for specific guidelines and compliance requirements. --- ## Pickups Veho accommodates pickups based on individual agreements with customers. While regular pickups can be arranged directly with Veho during the account registration process, they **cannot be scheduled via the EasyPost API**. --- ## Tracking EasyPost simplifies package tracking by offering two methods: - Tracking with an existing number and carrier. - Using a Tracker included with an EasyPost-purchased shipping label. The service integrates webhooks for timely shipment updates. For detailed information on tracking methods, visit the Tracking Guide. Related: - [Trackers Documentation](https://docs.easypost.com/docs/trackers) - [Trackers Guide](https://docs.easypost.com/guides/tracking-guide) --- ## Additional Resources ### Carrier Metadata The Carrier Metadata endpoint can programmatically return information about Veho service levels, predefined packages, supported features, and shipment options. Use this information to quickly integrate with Veho and make educated decisions about the mix of carriers for shipping needs. Additionally, the Carrier Metadata endpoint is available to retrieve comprehensive information about all carriers on the EasyPost platform, enhancing decision-making for carrier services. ### Support and Troubleshooting In addition to the guidance provided in the Carrier Guides, EasyPost offers support to assist with FAQs, troubleshooting issues, and inquiries related to the EasyPost platform. Visit the Help Center for more information. Related: - [Carrier Metadata](https://docs.easypost.com/docs/carrier-metadata) - [Help Center](https://support.easypost.com/hc/en-us) --- ## Talk to a Shipping Expert For questions about getting started with the EasyPost API please talk to a Shipping Expert or Contact Support. Related: - [Talk to a Shipping Expert](https://www.easypost.com/talk-to-easypost) - [Contact Support](https://support.easypost.com/hc/requests/new) --- Source: https://docs.easypost.com/carriers/veho-wallet-guide # Veho Wallet Guide Veho is a last-mile delivery and returns service carrier with limited service in the United States. EasyPost supports Veho through two account options: - **Veho Wallet:** Use Veho through an EasyPost Wallet without establishing a separate billing relationship with Veho. Shipment charges are billed through EasyPost. - **Veho BYOCA:** Connect an existing Veho account to EasyPost using credentials provided by Veho. Billing is handled directly by Veho. This guide includes detailed information on utilizing Veho Wallet shipping with the EasyPost API, focusing on account setup, rates, billing, label creation, pickups, tracking, and more. --- ## Carrier Account Setup ### Account Registration Sign up for an EasyPost account to obtain a **Test** and **Production** API key. See Authentication and Key Management for more information. > Note: EasyPost negotiated rates are only available in Production mode. ### Carrier Setup #### Create via EasyPost Dashboard 1. Log in to EasyPost and navigate to **Account Settings**. 2. Select the **Carriers** tab. 3. Select the **EasyPost Wallet Carriers** tab. 4. Find Veho in the list of carriers and select **Create Account**. #### Create via API The API structure specified by EasyPost can also be used to add a Veho Wallet carrier account. ##### Carrier Account Type The Veho Wallet carrier account includes the following fields: - `company`: Merchant company name. - `agreed_to_terms_at`: Timestamp when Veho terms were accepted. ```shell curl -X POST https://api.easypost.com/v2/carrier_accounts/open \ -u "$EASYPOST_API_KEY": \ -H 'Content-Type: application/json' \ -d '{ "carrier_account": { "type": "VehoWalletAccount", "description": "VehoWalletAccount", "credentials": { "agreed_to_terms_at": "VALUE" }, "payment_mode": "aggregation" } }' ``` ### Software Requirements Download an EasyPost Client Library or utilize the REST API with cURL. ### Documentation Review Examine the EasyPost Objects section to understand the API's structure, which is critical for constructing requests and interpreting responses. Related: - [Getting Started Guide](https://docs.easypost.com/guides/getting-started) - [Manage Carrier Accounts](https://app.easypost.com/account/settings?tab=carriers) --- ## Billing Billing is handled through the EasyPost Wallet. Shipment charges are deducted directly from the customer's EasyPost Wallet. If Veho determines that shipment details differ from the information provided when the label was purchased, the shipment may be subject to a billing adjustment. Any resulting charge or credit is applied to the EasyPost Wallet. Related: - [EasyPost Wallet and Bring Your Own Account Plans](https://support.easypost.com/hc/en-us/articles/39984592062605-EasyPost-Wallet-and-Bring-Your-Own-Carrier-Account-Plans) - [Billing & Payments](https://support.easypost.com/hc/en-us/articles/360042414212-Billing-Payments) --- ## Rates Veho Wallet uses API-based live rating. --- ## Service Levels Veho Wallet supports one service level: Service levels are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=vehowallet`. Related: - [Service Levels](https://docs.easypost.com/docs/shipments/rates#service-levels) ### Coverage Area Veho currently operates in limited areas within the United States. > Note: Veho Wallet shipments must originate from Atlanta, GA. ![Veho Coverage Map](https://docs.easypost.com/images/guides/veho/veho-coverage-map.png) For Veho coverage details, visit Veho's service area page. --- ## Predefined Packages Predefined packages provide a convenient way to classify parcels using carrier-defined package types and retrieve applicable rates. When creating a shipment with the EasyPost API, select a predefined package that matches the parcel's characteristics and provide its weight in ounces when required. See the predefined package documentation for supported values and example requests. Predefined packages are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=vehowallet`. ### Parcel Weight and Size Limitations | Parcel Questions | Answer | | --------------------------------- | -------------------- | | Max weight per parcel | 50 lbs actual weight | | Max dimensions per parcel | 48 inches in length | | Standard delivery days | Monday to Sunday | | Standard delivery times | 8 a.m. - 10 p.m. | | Delivers on public/local holidays | Yes | | Delivery attempts | 2 delivery attempts | | Picture POD available | Yes | | Signature service available | Not currently | Related: - [Predefined Packages](https://docs.easypost.com/docs/parcels#predefined-packages) --- ## Generating Shipping Labels With EasyPost, generating shipping labels for Veho Wallet is the same process as generating them for any other carrier. Review the Getting Started Guide for help generating a shipping label. ### One-Call Buys Buying labels and one-call buys are supported via API. See Reducing API Response Times for more information. ### Returns Returns are not supported. ### Refunding and Voiding Labels Voiding labels is supported through the EasyPost API. ### Shipment Options Shipment options are generated from live carrier metadata and are not included in this file. Retrieve them from the Carrier Metadata endpoint: https://docs.easypost.com/docs/carrier-metadata. Use `carrier=vehowallet`. Related: - [Shipment Options](https://docs.easypost.com/docs/shipments/options) #### Label Formats Veho Wallet labels are available in PNG, PDF, and ZPL formats. Related: - [Shipment Documentation](https://docs.easypost.com/docs/shipments) - [One-Call Buy](https://docs.easypost.com/docs/shipments#buy-a-shipment-without-rating-one-call-buy) --- ## Hazardous Materials (HAZMAT) Veho Wallet does not support hazardous materials. --- ## Pickups Pickup purchasing is currently supported only in Atlanta, with expansion forthcoming to Los Angeles, Dallas, Philadelphia and Chicago before the end of 2026 via API with the following constraints: - Minimum of 20 shipments. - Minimum 3-hour pickup window. - Currently supported only in Atlanta. Veho pickups are billed at a fixed rate and can be voided through the API. --- ## Tracking Tracking is supported via API and webhooks. EasyPost simplifies package tracking by offering two methods: - Tracking with an existing number and carrier. - Using a Tracker included with an EasyPost-purchased shipping label. The service integrates webhooks for timely shipment updates. For detailed information on tracking methods, visit the Tracking Guide. Related: - [Trackers Documentation](https://docs.easypost.com/docs/trackers) - [Trackers Guide](https://docs.easypost.com/guides/tracking-guide) --- ## Additional Resources ### Carrier Metadata The Carrier Metadata endpoint can programmatically return information about service levels, predefined packages, supported features, and shipment options. ### Support and Troubleshooting In addition to the guidance provided in the Carrier Guides, EasyPost offers support to assist with FAQs, troubleshooting issues, and inquiries related to the EasyPost platform. Visit the Help Center for more information. Related: - [Carrier Metadata](https://docs.easypost.com/docs/carrier-metadata) - [Help Center](https://support.easypost.com/hc/en-us) --- ## Talk to a Shipping Expert For questions about getting started with the EasyPost API please talk to a Shipping Expert or Contact Support. Related: - [Talk to a Shipping Expert](https://www.easypost.com/talk-to-easypost) - [Contact Support](https://support.easypost.com/hc/requests/new)