Kakaclo Api Docs
  • Welcome!
  • Quick Start
  • Release Notes
    • 2023-08 Add API token refresh function, logistics channel to add Express
    • 2023-07 product api increase supplierLevel info
    • 2023-06 Order Automatic Split interface changes
    • 2023-04 Product CountryAndWarehouse interface changes
    • 2023-04 Order V1 Version And Order V2 Version
    • 2022-12 Order V2 Version
  • API Usage
    • API Endpoint
    • Rate Limits
  • Admin API
    • Product
      • Category
      • Products
      • CountryAndWarehouse
      • Stock
      • Product API pull suggestion
    • Order V1(Outdated)
      • Logistics Channel
      • Order
      • Query Order
        • Orders Status Json Response
      • Refund Order
      • Query ReFund
    • Order V2
      • Logistics Channel
      • Order
      • Query Order
        • Orders Status Json Response
      • Refund Order
      • Query ReFund
      • Automatic Split Logistics Channel
    • Custom Product
      • Get Design Category Name List
      • Get Design Model List
      • Get Design Model Detail
      • Get Custom Designed List
      • Get Custom Designed Detail
      • Create designed product orders and get order list
      • Get KakaClo pod-designer address
      • Save POD Designed Product
    • Payment
      • Query Balance
Powered by GitBook
On this page
  • KakaClo API rate limits
  • Compare rate limits by API
  • The leaky bucket algorithm
  • Rate limiting methods
  • REST Admin API rate limits
  1. API Usage

Rate Limits

KakaClo API rate limits

To ensure our platform remains stable and fair for everyone, all KakaClo APIs are rate-limited. We use a variety of strategies to enforce rate limits. We ask developers to use industry standard techniques for limiting calls, caching results, and re-trying requests responsibly.


Compare rate limits by API

API
Rate-limiting method
Standard limit

Admin API (REST)

Request-based limit

2 requests/second


The leaky bucket algorithm

All kakaclo APIs use a leaky bucket algorithm to manage requests. This algorithm lets your app make an unlimited amount of requests in infrequent bursts over time. The main points to understand about the leaky bucket metaphor are as follows:

  • Each app has access to a bucket. It can hold, say, 120 “marbles”.

  • Each second, a marble is removed from the bucket (if there are any). That way there’s always more room.

  • Each API request requires you to toss a marble in the bucket.

  • If the bucket gets full, you get an error and have to wait for room to become available in the bucket.


Rate limiting methods

Request-based limits Apps can make a maximum number of requests per minute. For example: 120 API requests within 60 seconds. Each request counts equally, regardless of how much or how little data is returned.

This method is used by the REST Admin API.


REST Admin API rate limits

REST Admin API rate limits are based on the combination of the app and store. This means that calls from one app don't affect the rate limits of another app, even on the same store. Similarly, calls to one store don't affect the rate limits of another store, even from the same app.

Limits are calculated using the leaky bucket algorithm. All requests that are made after rate limits have been exceeded are throttled and an HTTP 429 Too Many Requests error is returned. Requests succeed again after enough requests have emptied out of the bucket.

The bucket size and leak rate properties determine the API’s burst behavior and request rate.

The default settings are as follows:

  • Bucket size: 120 requests

  • Leak rate: 2/second

PreviousAPI EndpointNextProduct

Last updated 2 years ago