API Rate Limits |
To maintain optimum performance and ensure that the Accompa API is available to all of our customers, we balance transaction loads by imposing two types of limits: |
- Concurrent API Request Limits
- Daily API Request Limits
|
|
Concurrent API Request Limits |
Accompa API has a concurrent-limit throttle that blocks accounts emitting more than 25 calls during any 10 second window. While we reserve the right to tune this limit, we always set it high enough to allow a well-behaving API client application to do its job.
For batch processes and API developers working on preliminary versions of their code, this throttle may be an inadvertent roadblock. If you hit this limit and are blocked, please wait and make no API calls (as the throttle is reset with each call). The throttle will lift itself in a few minutes and you can resume API calls.
When your account is blocked due to the concurrent limit throttle, Accompa API will send an HTTP 503 status code, along with an XML response as shown below: |
|
RESPONSE |
Status: 503
<error>
<code>Request_Throttled</code>
<message>Concurrent rate limit exceeded. Try again after the following amount of time has elapsed (in seconds):</message>
<try_again_after>600</try_again_after>
</error> |
The XML response will include the amount of time (in seconds) you should wait before resuming your API calls. |
|
You can use the following API request to query your current throttle status, without resetting the throttle: |
|
GET /rate_throttle_status |
Returns status of concurrent-limit throttle. |
|
RESPONSE - Normal Status |
Status: 200
<rate_throttle_status>
<api_available>yes</api_available>
</rate_throttle_status> |
|
RESPONSE - Account Blocked |
Status: 200
<rate_throttle_status>
<api_available>no</api_available>
<try_again_after>45</try_again_after>
</rate_throttle_status> |
If your account is blocked due to the concurrent rate throttle, the XML response will include the amount of time (in seconds) you should wait before resuming your API calls. |
|
Daily API Request Limits |
Accompa API also has a Daily Total API Requests limit. Your account will be assigned this limit when you sign up for the API access - you may request a limit that meets your needs.
This limit is enforced against the aggregate of all API calls made by your organization during a 24-hr period; this is not enforced on a per-user basis. When your organization exceeds this limit, all users in your organization will be temporarily blocked from making additional API calls. This limit will be lifted during the next 24-hr period.
When your account is blocked due to the daily limit, Accompa API will send an HTTP 503 status code. It will also include an XML response that will indicate the amount of time (in seconds) until the next 24-hr period - i.e. when the account will be unblocked. |
|
RESPONSE |
Status: 503
<error>
<code>Daily_Limit_Exceeded</code>
<message>API daily limit exceeded...</message>
<try_again_after>7610</try_again_after>
</error> |