Quick Summary
Limits are set per shipping account and per endpoint. If you go over a limit, you get HTTP 429. Wait the number of seconds in the Retry-After header, then try again.
We'll Cover:
- How limits work
- The main limits
- Read the headers
- When a limit is reached
- Good habits
How limits work
- Limits are per shipping account and per endpoint. Every app and API key on the same account shares them.
- Shipment quotations are counted by shipment. One request with 10 shipments uses 10.
- Every other endpoint is counted by request. One request uses 1, however many items it carries.
- Your allowance refills little by little. It does not wait for the next minute.
- All versions of an endpoint share one allowance.
The main limits
Quotation and coupon endpoints (these depend on your account type):
| Endpoint | Live | Not topped up | Sandbox |
|---|---|---|---|
| Shipment quotations | 120 shipments a minute, up to 50 shipments per request | 10 a minute and 100 a day | 60 a minute |
| On-Demand quotation | 20 requests a minute | 10 a minute and 100 a day | 20 a minute |
| Insurance quotation | 60 requests a minute, up to 50 items | 10 a minute and 100 a day | 60 a minute |
| Shipment coupon list | 60 requests a minute | 10 a minute and 100 a day | 60 a minute |
| On-Demand coupon list | 30 requests a minute | 10 a minute and 100 a day | 30 a minute |
All other endpoints (same for every account type, no daily limit):
| Endpoint | Requests a minute |
|---|---|
| Submit orders | 2,000 (up to 200 shipments per request) |
| On-Demand order | 100 |
| Shipment cancel | 60 (up to 50 shipments) |
| On-Demand cancel | 60 |
| Tracking status | 120 (up to 50 AWBs) |
| Shipment list | 60 |
| Shipment details | 300 |
| On-Demand list | 60 |
| On-Demand details | 300 |
| Courier list, drop-off points, pickup points, parcel categories, HS codes, wallet, account information | 120 each |
- A Not topped up account has never topped up its wallet. Your first top-up moves you to Live limits within about 30 seconds.
- Daily limits start again at 00:00 Malaysia time, which is the same as Singapore time.
- Need a higher limit? Contact EasyParcel support with your account ID and the endpoint name.
Read the headers
Every reply from a limited endpoint shows where you stand:
| Header | What it tells you |
|---|---|
| RateLimit-Policy | Each limit that applies to you |
| RateLimit | How many you can still send now, and in how many seconds the allowance is full again |
| X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset | The same for the limit closest to running out |
| Retry-After (on a 429) | How many seconds to wait |
When a limit is reached
- You get HTTP 429. The reply has the code RATE_LIMITED, and a rate_limit section with the limit, what is left and retry_after in seconds.
- Nothing in a refused request is processed, and it uses none of your allowance.
- The code ENDPOINT_BLOCKED means EasyParcel has blocked that endpoint for your account. Do not retry. Contact support.
- HTTP 400 with BATCH_TOO_LARGE means you sent too many items in one request. Split the list into several requests.
Good habits
- Wait Retry-After seconds on a 429. Do not retry straight away.
- Watch the Remaining header and slow down before it reaches 0.
- Send at a steady pace instead of all at once.
- For quotations, count shipments, not requests. Fewer, bigger requests only save round trips.
- If there is no Retry-After (for example a network error), retry after 1, 2, 4 and 8 seconds, then stop.
- Keep reference data such as couriers, parcel categories and HS codes. Fetch them once a day.
- Quote when a customer checks out. Do not quote every route in advance.
- Let each merchant connect their own EasyParcel account.
What's next?
Still need help?
Our team is happy to help. ? Live Chat | ✉️ Contact Us