Skip to content

ShipEngine API (1.1.202604070904)

ShipEngine's easy-to-use REST API lets you manage all of your shipping needs without worrying about the complexities of different carrier APIs and protocols. We handle all the heavy lifting so you can focus on providing a first-class shipping experience for your customers at the best possible prices.

Each of ShipEngine's features can be used by itself or in conjunction with each other to build powerful shipping functionality into your application or service.

Download OpenAPI description
Languages
Servers
Mock server
https://docs.shipstation.com/_mock/apis/shipengine/openapi/
https://api.shipengine.com/

Account

For additional information about the ShipEngine account.

Operations

Addresses

No matter your shipping volume, failed deliveries and address change surcharges cut into your bottom line and damage perception with customers. Our address validation services ensure your packages make it to the right place the first time. Learn how to leverage our address validation services here.

ShipEngine supports address validation for virtually every country on Earth, including the United States, Canada, Great Britain, Australia, Germany, France, Norway, Spain, Sweden, Israel, Italy, and over 160 others.

Operations

Parse an address

Request

The address-recognition API makes it easy for you to extract address data from unstructured text, including the recipient name, line 1, line 2, city, postal code, and more.

Data often enters your system as unstructured text (for example: emails, SMS messages, support tickets, or other documents). ShipEngine's address-recognition API helps you extract meaningful, structured data from this unstructured text. The parsed address data is returned in the same structure that's used for other ShipEngine APIs, such as address validation, rate quotes, and shipping labels.

Note: Address recognition is currently supported for the United States, Canada, Australia, New Zealand, the United Kingdom, and Ireland.

Security
api_key
Bodyapplication/jsonrequired

The only required field is text, which is the text to be parsed. You can optionally also provide an address containing already-known values. For example, you may already know the recipient's name, city, and country, and only want to parse the street address into separate lines.

textstringnon-emptyrequired

The unstructured text that contains address-related entities

Example: "Margie McMiller at 3800 North Lamar suite 200 in austin, tx. The zip code there is 78652."
addressobject(partial_address)

You can optionally provide any already-known address values. For example, you may already know the recipient's name, city, and country, and only want to parse the street address into separate lines.

curl -i -X PUT \
  https://docs.shipstation.com/_mock/apis/shipengine/openapi/v1/addresses/recognize \
  -H 'API-Key: YOUR_API_KEY_HERE' \
  -H 'Content-Type: application/json' \
  -d '{
    "text": "Margie McMiller at 3800 North Lamar suite 200 in austin, tx.  The zip code there is 78652."
  }'

Responses

Returns the parsed address, as well as a confidence score and a list of all the entities that were recognized in the text.

Bodyapplication/json
scorenumber(double)[ 0 .. 1 ]required

A confidence score between zero and one that indicates how certain the API is that it understood the text.

addressobject(partial_address)required

The parsed address. This address may not be complete, depending on how much information was included in the text and how confident the API is about each recognized entity.

Note: The address-recognition API does not currently perform any validation of the parsed address, so we recommend that you use the address-validation API to ensure that the address is correct.

address.​namestringnon-empty

The name of a contact person at this address. This field may be set instead of - or in addition to - the company_name field.

Example: "John Doe"
address.​phonestringnon-empty

The phone number of a contact person at this address. The format of this phone number varies depending on the country.

Example: "+1 204-253-9411 ext. 123"
address.​emailstring or null

Email for the address owner.

Example: "example@example.com"
address.​company_namestring or nullnon-empty

If this is a business address, then the company name should be specified here.

Example: "The Home Depot"
address.​address_line1stringnon-empty

The first line of the street address. For some addresses, this may be the only line. Other addresses may require 2 or 3 lines.

Example: "1999 Bishop Grandin Blvd."
address.​address_line2string or nullnon-empty

The second line of the street address. For some addresses, this line may not be needed.

Example: "Unit 408"
address.​address_line3string or nullnon-empty

The third line of the street address. For some addresses, this line may not be needed.

Example: "Building #7"
address.​city_localitystringnon-empty

The name of the city or locality

Example: "Winnipeg"
address.​state_provincestringnon-empty

The state or province. For some countries (including the U.S.) only abbreviations are allowed. Other countries allow the full name or abbreviation.

Example: "Manitoba"
address.​postal_codestring(postal_code)non-empty

postal code

Example: "78756-3717"
address.​country_codestring(country_code)= 2 characters
Example: "CA"
address.​address_residential_indicatorstring(address_residential_indicator)

Indicates whether this is a residential address.

Default "unknown"
Enum"unknown""yes""no"
Example: "no"
entitiesArray of objects(recognized_entity)>= 0 itemsrequired

All of the entities that were recognized in the text. An "entity" is a single piece of data, such as a city, a postal code, or an address line. Each entity includes the original text and the parsed value.

entities[].​typestringnon-emptyrequired

The Entity type (e.g. "weight", "person", "address_line1", etc.)

entities[].​scorenumber(double)[ 0 .. 1 ]required

A confidence score between zero and one that indicates how certain the API is that it correctly recognized this entity

entities[].​textstringnon-emptyrequired

The substring from the original text that was recognized as this entity

entities[].​start_indexinteger>= 0required

The index of the first character of this entity within the original text

entities[].​end_indexinteger>= 0required

The index of the last character of this entity within the original text

entities[].​resultobject(normalized_entity)

The normalized value of the entity.

Most entity results have a value field, which is the normalized value of the entity. For example, if the substring "john doe" was recognized as a "person" entity, then the value might be normalized to have proper capitalization (e.g. "John Doe"). Or if the substring "ft worth" was recognized as a "city" entity, then the value might be normalized to "Fort Worth".

Some entities have other information in addition to, or instead of a value. For example, a "dimensions" entity will have separate fields for length, width, height, and unit.

Response
application/json

This response shows that the address-recognition API was able to recognize all the address entities in the text. Notice that the country_code is not populated and the address_residential_indicator is "unknown", since neither of these fields was included in the text.

{ "score": 0.9122137426845613, "address": { "name": "Margie McMiller", "address_line1": "3800 North Lamar", "address_line2": "Suite 200", "city_locality": "Austin", "state_province": "TX", "postal_code": "78652", "address_residential_indicator": "unknown" }, "entities": [ {}, {}, {}, {}, {}, {}, {}, {} ] }

Validate an address

Request

Address validation ensures accurate addresses and can lead to reduced shipping costs by preventing address correction surcharges. ShipEngine cross references multiple databases to validate addresses and identify potential deliverability issues.

Security
api_key
Bodyapplication/jsonrequiredArray [
namestringnon-empty

The name of a contact person at this address. This field may be set instead of - or in addition to - the company_name field.

Example: "John Doe"
phonestringnon-empty

The phone number of a contact person at this address. The format of this phone number varies depending on the country.

Example: "+1 204-253-9411 ext. 123"
emailstring or null

Email for the address owner.

Example: "example@example.com"
company_namestring or nullnon-empty

If this is a business address, then the company name should be specified here.

Example: "The Home Depot"
address_line1stringnon-emptyrequired

The first line of the street address. For some addresses, this may be the only line. Other addresses may require 2 or 3 lines.

Example: "1999 Bishop Grandin Blvd."
address_line2string or nullnon-empty

The second line of the street address. For some addresses, this line may not be needed.

Example: "Unit 408"
address_line3string or nullnon-empty

The third line of the street address. For some addresses, this line may not be needed.

Example: "Building #7"
city_localitystringnon-emptyrequired

The name of the city or locality

Example: "Winnipeg"
state_provincestringnon-emptyrequired

The state or province. For some countries (including the U.S.) only abbreviations are allowed. Other countries allow the full name or abbreviation.

Example: "Manitoba"
postal_codestring(postal_code)non-empty

postal code

Example: "78756-3717"
country_codestring(country_code)= 2 charactersrequired
Example: "CA"
address_residential_indicatorstring(address_residential_indicator)

Indicates whether this is a residential address.

Default "unknown"
Enum"unknown""yes""no"
Example: "no"
]
curl -i -X POST \
  https://docs.shipstation.com/_mock/apis/shipengine/openapi/v1/addresses/validate \
  -H 'API-Key: YOUR_API_KEY_HERE' \
  -H 'Content-Type: application/json' \
  -d '[
    {
      "name": "Mickey and Minnie Mouse",
      "phone": "714-781-4565",
      "company_name": "The Walt Disney Company",
      "address_line1": "500 South Buena Vista Street",
      "city_locality": "Burbank",
      "state_province": "CA",
      "postal_code": "91521",
      "country_code": "US"
    }
  ]'

Responses

The request was a success.

Bodyapplication/jsonArray [
statusstring(address_validation_status)required

The possible address validation status values

Enum"unverified""verified""warning""error"
original_addressobject(partial_address)required

Any residential or business mailing address, anywhere in the world.

Note: Either name or company_name must be set. Both may be specified, if relevant.

original_address.​namestringnon-emptyrequired

The name of a contact person at this address. This field may be set instead of - or in addition to - the company_name field.

Example: "John Doe"
original_address.​phonestringnon-empty

The phone number of a contact person at this address. The format of this phone number varies depending on the country.

Example: "+1 204-253-9411 ext. 123"
original_address.​emailstring or null

Email for the address owner.

Example: "example@example.com"
original_address.​company_namestring or nullnon-empty

If this is a business address, then the company name should be specified here.

Example: "The Home Depot"
original_address.​address_line1stringnon-emptyrequired

The first line of the street address. For some addresses, this may be the only line. Other addresses may require 2 or 3 lines.

Example: "1999 Bishop Grandin Blvd."
original_address.​address_line2string or nullnon-empty

The second line of the street address. For some addresses, this line may not be needed.

Example: "Unit 408"
original_address.​address_line3string or nullnon-empty

The third line of the street address. For some addresses, this line may not be needed.

Example: "Building #7"
original_address.​city_localitystringnon-emptyrequired

The name of the city or locality

Example: "Winnipeg"
original_address.​state_provincestringnon-emptyrequired

The state or province. For some countries (including the U.S.) only abbreviations are allowed. Other countries allow the full name or abbreviation.

Example: "Manitoba"
original_address.​postal_codestring(postal_code)non-emptyrequired

postal code

Example: "78756-3717"
original_address.​country_codestring(country_code)= 2 characters
Example: "CA"
original_address.​address_residential_indicatorstring(address_residential_indicator)

Indicates whether this is a residential address.

Default "unknown"
Enum"unknown""yes""no"
Example: "no"
matched_addressobject or null(partial_address)read-onlyrequired

Any residential or business mailing address, anywhere in the world.

Note: Either name or company_name must be set. Both may be specified, if relevant.

matched_address.​namestringnon-emptyrequired

The name of a contact person at this address. This field may be set instead of - or in addition to - the company_name field.

Example: "John Doe"
matched_address.​phonestringnon-empty

The phone number of a contact person at this address. The format of this phone number varies depending on the country.

Example: "+1 204-253-9411 ext. 123"
matched_address.​emailstring or null

Email for the address owner.

Example: "example@example.com"
matched_address.​company_namestring or nullnon-empty

If this is a business address, then the company name should be specified here.

Example: "The Home Depot"
matched_address.​address_line1stringnon-emptyrequired

The first line of the street address. For some addresses, this may be the only line. Other addresses may require 2 or 3 lines.

Example: "1999 Bishop Grandin Blvd."
matched_address.​address_line2string or nullnon-empty

The second line of the street address. For some addresses, this line may not be needed.

Example: "Unit 408"
matched_address.​address_line3string or nullnon-empty

The third line of the street address. For some addresses, this line may not be needed.

Example: "Building #7"
matched_address.​city_localitystringnon-emptyrequired

The name of the city or locality

Example: "Winnipeg"
matched_address.​state_provincestringnon-emptyrequired

The state or province. For some countries (including the U.S.) only abbreviations are allowed. Other countries allow the full name or abbreviation.

Example: "Manitoba"
matched_address.​postal_codestring(postal_code)non-emptyrequired

postal code

Example: "78756-3717"
matched_address.​country_codestring(country_code)= 2 characters
Example: "CA"
matched_address.​address_residential_indicatorstring(address_residential_indicator)

Indicates whether this is a residential address.

Default "unknown"
Enum"unknown""yes""no"
Example: "no"
messagesArray of objects(response_message)read-onlyrequired

The list of messages that were generated during the address validation request.

Default []
messages[].​codestring(address_validation_code)read-onlyrequired

The error codes that can be returned by the address validation API

Enum"a1000""a1001""a1002""a1003""a1004""a1005""a1006""a1007""a1008""r1000"
messages[].​messagestringnon-emptyread-onlyrequired

Message explaining the address validation error

Example: "Invalid Postal Code"
messages[].​typestring(address_validation_message_type)read-onlyrequired

The different types of messages that can be returned by the address validation API

Enum"error""warning""info"
messages[].​detail_codestring or null(address_validation_detail_code)required

The detailed error codes that can be returned by the address validation API

Enum"unsupported_country""non_supported_country""minimum_postal_code_verification_failed""street_does_not_match_unique_street_name""multiple_directionals""multiple_matches""suite_not_valid""suite_missing""incompatible_paired_labels""invalid_house_number"
]
Response
application/json

A response for a verified status call.

[ { "status": "verified", "original_address": {}, "matched_address": {}, "messages": [] } ]

Batches

batches

Operations

Carrier Accounts

A carrier account is a connection to a shipping carrier that allows you to create labels, track packages, and more. You can connect your own carrier accounts to ShipEngine, or use one of our built-in carrier accounts. Learn more about carrier accounts here.

Operations

Carriers

carriers

Operations

Downloads

downloads

Operations

Insurance

insurance

Operations

Labels

Print shipping labels for any of the top global carriers in minutes—instead of weeks. Simply connect your existing carrier accounts in the API dashboard, and then begin creating labels.

Operations

LTL Shipping

Less-than-truckload (LTL) shipping API endpoints for managing freight shipments. Connect LTL carriers, request quotes, schedule pickups, and track freight shipments.

Operations

Manifests

manifests

Operations

Package Pickups

Scheduled package pickups

Operations

Package Types

custom package types

Operations

Rates

Make sure you ship as cost-effectively as possible by quickly comparing rates using the ShipEngine Rates API. As long as you have the carrier connected to your account, you'll be able to see and compare different rates and services.

Operations

Service Points

Service points allow customers to pick up their packages at convenient locations.

Operations

Shipments

Shipments are at the center of the ShipEngine API. A shipment is the first step in creating a shipping label, or creating a manifest. It's also essential for getting shipping rates.

Operations

Tags

tags

Operations

Tokens

Manage authentication tokens for secure API access.

Operations

Tracking

Track packages across any of our 20+ supported carrier accounts and create tracking events to keep your customers up-to-date. Easily integrate real-time tracking information for shipments into your app, email, or SMS.

Operations

Warehouses

warehouses

Operations

Webhooks

Webhooks are a powerful feature of ShipEngine that can save you from sending repeated polling requests to check on the state of something. With webhooks, ShipEngine will automatically contact your servers when the state changes. This can include parcel tracking events, notification of the completion of a batch operation, or new sales orders.

Operations