Get started with the Shippo API

Want to automate and customize your shipping beyond what our web app offers? Our API lets you build your own shipping experience, tailored to exactly how your business works. This guide covers what our API does, how it compares to the web app, what you'll need to integrate it, and answers to the questions we hear most.


What is an API?

API stands for “application programming interface.” It's the code that lets two systems communicate with each other. Businesses use APIs to connect internal and external applications, choosing exactly what data they want to send and receive between them.


Why use the Shippo API

With a single integration, you get everything from labels and manifests to tracking and returns. We standardize carrier processes and handle the complexity of shipping, so you can offer a best-in-class experience without the ongoing upkeep.

Businesses across a range of use cases build on our API, including:

Setup is quick and straightforward, so you can generate your first label in no time.


Web app vs. API: what's the difference

Both let you ship through Shippo, but they serve different needs.

Web app

With our web app, you can set up an account in five minutes or less and start printing USPS, DHL, and other carrier labels right away. You can also connect more carriers, integrate with e-commerce platforms, and customize the experience for your business.

API

Developers can use the Shippo API to customize and automate shipping to fit your business's exact needs. Integrate with multiple carriers through one API, backed by step-by-step sample code, pre-built client libraries, and test keys.

So, what's the real difference?

With the API, you build your own shipping experience. It's more customizable and supports a highly automated workflow.

For high-volume shippers, the API offers more flexibility: most of our highest-volume customers use it to create labels because it lets them batch more than 100 labels at once. The API also unlocks features like third-party billing, multi-piece shipments, and cash on delivery.

API_Quick_Guide_2021-07-30_at_11.37.16_AM.jpg


Integrate the Shippo API

Integrating your e-commerce store with our API is a great way to automate and customize Shippo for your needs. That said, it's not a beginner's task; it typically requires a qualified engineer.

Don't have engineers on your team? No problem. You can use Shippo entirely through our web interface instead.

If you're integrating our API, start with our API overview guide to learn the basics of getting set up.

Endpoints you'll need

To create shipping labels through the API, you'll integrate the following endpoints:

  • Address: create the sender and recipient addresses (and a return address, if applicable).
  • Parcel: create the packages you want to ship.
  • Shipment: combine the sender address, recipient address, and parcel.
  • Rate: retrieve shipping rates for a given shipment.
  • Transaction: purchase a label for a given rate.

We also offer API wrappers in Ruby, Python, PHP, and Node.js at github.com/goshippo.


API FAQs

For deeper detail on any of these topics, our full API documentation is the best resource. Here are answers to what we're asked most.

How do I compare carriers with the API?

You can create, modify, delete, and specify which carriers you want to use through the API. This lets you connect your shipping accounts to compare and purchase rates for each shipment. Once you add your own carrier account, you'll get your negotiated rates. See the Carrier Accounts page in our API documentation for more on managing multiple carrier accounts.

How do I validate addresses with the API?

See the Address Validation Guide in our API documentation for details on validation logic and API calls. You can also check out our API Address Validation article for the full list of countries covered and the level of detail provided for each.

How does tracking work with the API?

Our Tracking API tracks shipments across every carrier with normalized data, full tracking history, and real-time updates. Pair it with webhooks to get push-style notifications any time a tracking update comes in from the carrier. See the Tracking Guide in our API documentation for details on tracking objects and webhooks.

Can I ship internationally with the API?

Yes, including creating customs forms. See the International Guide in our API documentation for details on customs items, customs declarations, and commercial invoices.

Why are rates and labels returned asynchronously?

Our API returns rates and labels asynchronously. See the Async Responses page in our API documentation for more on what that means, why we use it, and how polling works.

What if I run into an issue?

Our support team has you covered, whether it's a quick question about retrieving rates or something that seems off in your integration. Send your API code to support@shippo.com and we'll help diagnose it.

 

Was this article helpful?

Related articles