Skip to main content
Contributor III
December 5, 2023
Solved

Header with the value of API limits changed format?

  • December 5, 2023
  • 4 replies
  • 166 views

Hi, we are integrating with the new API, and we are managing the headers with the API limits as per https://developers.klaviyo.com/en/docs/rate_limits_and_error_handling#query-param-rate-limits. We have observed and used those limits so far (values in header):

 

'60, 3;w=1, 60;w=60'
'150, 10;w=1, 150;w=60'
'700, 75;w=1, 700;w=60'
'3500, 350;w=1, 3500;w=60'

 

Since yesterday, we are receiving a different value, specifically when importing profiles: https://developers.klaviyo.com/en/reference/get_profiles without adding the predictive analytics:

 

“('0, 150, 10;w=1, 0, 150;w=60, 0;w=0',)”

“('0, 700, 75;w=1, 0, 700;w=60, 0;w=0',)”

"('0, 3500, 350;w=1, 0, 3500;w=60, 0;w=0',)"

 

which we do not know how to interpret. What limit does it represent? Is this a new value or a replacement to an existing one? It changed not only the value but the type as well, this is now a tuple?

Has something changed? This is awkward, as we regard this as a stable API and nothing major should change in a specific version after it’s been released, but this seems like a change that is not insignificant (in fact it’s a breaking change for us).

We are using API version '2023-08-15'.

Thanks

    This topic has been closed for replies.
    Best answer by saulblum

    Hi, thank you for bringing this to our attention: turns out it was a bug, which engineering has fixed. Could you confirm that the value of the RateLimit-Limit header is now as it had been?

     

    (‘w’ is “window” in seconds, with the previous number the rate limit per that time window)

    4 replies

    saulblumAnswer
    Klaviyo Employee
    December 5, 2023

    Hi, thank you for bringing this to our attention: turns out it was a bug, which engineering has fixed. Could you confirm that the value of the RateLimit-Limit header is now as it had been?

     

    (‘w’ is “window” in seconds, with the previous number the rate limit per that time window)

    babisAuthor
    Contributor III
    December 6, 2023

    Yes it seems fixed, I have kept the wrong values just in case it happens again thanks

    babisAuthor
    Contributor III
    February 6, 2024

    This started to happen again today and this time we noticed it because this is a value we do not handle (is this a new value?):

    KeyError: '10, 10;w=1, 150;w=60'

    Is this a bug again or this is a deliberate change?

    Brian Turcotte
    Klaviyo Alum
    February 6, 2024

    Hi @babis!

    My colleague @saulblum actually answered this here:

     

    - Brian