Home » Vinsight API  »  API Limits

API Limits

There are limits to the number of API calls that your application can make against a particular installation (organisation, account etc):

  • Concurrent Limit: 5 calls in progress at one time
  • Minute Limit: 60 calls per minute
  • Daily Limit: 5000 calls per day

These limits are currently only enforced for new OAuth Applications.
Older style API Keys are not yet subject to these limits, but we plan to introduce limits to all API calls in the coming months.

Exceeding a rate limit

Exceeding a rate limit will result in an HTTP 429 (too many requests) response. It will include an X-Rate-Limit-Problem header telling you which limit you have reached.

If you have exceed the minute or daily limit you will also receive a Retry-After http header that tells you how many seconds to wait before making another request.
Requests are counted within a sliding window. It is important to use the Retry-After header to know when you can start making calls again.

Rate limit FAQ

What if I need more than 5,000 calls a day?

Quite often, applications that you might believe would exceed the Vinsight API rate limits, can in fact work within the limits by analysing the structure of how you intend to use the Vinsight API:

You can do more than one thing in a single request: For example, you can create more than one Sales Order in a single POST to the SalesOrders API endpoint.

While there is no upper limit in the number of nodes that can be sent at one time, a ceiling of about 50 nodes per request is practical - this will ensure a request does not exceed the maximum size of 10MB.

We also recommend caching things from Vinsight in your application. For example if you are writing an importer that creates new items in Vinsight, maintain a list in your application of existing Vinsight items so you do not have to query the API every time to double check if items exist already or not.

You can use $filter, $select and $top expressions in your API requests to ask the Vinsight API for all existing Stock Item Codes for example, in a single, minimal call. For example:

https://app.vinsight.net/StockItems.json?$filter=StockItemCode/StartsWith('sku_')&$select=StockItemCode&$top=9999

What is the best way to handle reaching a limit?

When you reach a rate limit the Retry-After header will tell you how long to wait before making another call. You should pause requests to that organisation until that time.

What if I need to retrieve large amounts of data from Vinsight?

In these situations, it may take some time to extract the required data - it is recommended that an application is structured to schedule or queue this function so there is no user expectation of an immediate response.

Does my application only have 5,000 requests for all my users?

No, the limits are per installation / organisation. For example if two separate Vinsight organisations are connected to your application, each connection would have 5000 API calls available in a given 24 hour period.

Request size Limit

The maximum request size limit for all APIs is 10MB. However, to ensure you receive a timely response from the API (large inserts can take quite a while), we recommend you look to batch elements in bundles of up to 50.