Solved

Header with the value of API limits changed format?

  • 5 December 2023
  • 4 replies
  • 69 views

Userlevel 1
Badge +1

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

icon

Best answer by saulblum 6 December 2023, 00:15

View original

4 replies

Userlevel 4
Badge +7

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)

Userlevel 1
Badge +1

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

Userlevel 1
Badge +1

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?

Userlevel 7
Badge +36

Hi @babis!

My colleague @saulblum actually answered this here:

 

- Brian

Reply