Skip to main content
Solved

Header with the value of API limits changed format?


Forum|alt.badge.img+2
  • Contributor III
  • 6 replies

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

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)

View original
Did this topic or the replies in the thread help you find an answer to your question?

4 replies

Forum|alt.badge.img+7
  • Klaviyo Employee
  • 169 replies
  • Answer
  • 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)


Forum|alt.badge.img+2
  • Author
  • Contributor III
  • 6 replies
  • December 6, 2023

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


Forum|alt.badge.img+2
  • Author
  • Contributor III
  • 6 replies
  • 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
Forum|alt.badge.img+37

Hi @babis!

My colleague @saulblum actually answered this here:

 

- Brian