How to get your API Key?
Before you started with using our REST API services, you will need to obatin your API key under your own user account.
Once you've registered your API it's easy to start requesting data from AfterShip.
All endpoints are only accessible via https and are located at api.aftership.com.
All API call must include this header in order to auth the useage of AfterShip API.Replace your API_API_KEY with your own key.
All the request and response are in JSON string.
Be nice. If you're sending too many requests too quickly, we'll send back a 429 error code (TooManyRequestsError).
You are limited to 10 reqs/sec (36,000 reqs/hr) per API KEY. Practically, this means you should (when possible) authenticate users so that limits are well outside the reach of a given user.
Every response is contained by an envelope. That is, each response has a predictable set of keys with which you can expect to interact:
The meta key is used to communicate extra information about the response to the developer. If all goes well, you'll only ever see a code key with value 200. However, sometimes things go wrong, and in that case you might see a response like:
The data key is the meat of the response. It may be a list of results, but either way this is where you'll find the data you requested.
Here is the example for a GET /couriers