Pagination / Throttling

Pagination

There are variables for limit and page available on some Queries. This is because, in theory, this query could return multiple results. You would use these variables to loop through the pages of returned results.

{
  Orders(
    page: 1
    limit: 10
    created_at: "2025-02-03 00:00:00"
  ) {
    data {
      LineItems {
        id
        created_at
        Transaction {
            merchant_transaction_reference
        }
        Card {
            card_reference
            balance
            expiry_time
        }
      }
    }
  }
}

Throttling

In order to protect our infrastructure, we throttle incoming API requests to prevent overloading. Every request made by your API user has a 'cost' which replenishes, and this threshold should be fairly high and is rarely hit for most use cases, although if you were looking to generate 10,000 cards via the API in bulk - you might hit the limit and it would be best to engage with our technical team.

These limits can be configured on Toggles side, and can be increased or decreased. However, at the time of writing;

  • 8000 maximum threshold

  • 5000 replenish rate every 10mins

With the response on every request, you will get an updated amount of credits returned. If you notice that you are approaching 0 (currentlyAvailable) then we would suggest you back off for a short period - otherwise all requests will get rejected until more credits become available.

    "extensions": {
        "cost": {
            "actualQueryCost": 16,
            "throttleStatus": {
                "maximumAvailable": 8000,
                "currentlyAvailable": 7986
            }
        }
    }

Last updated