Question

What does status mean for a coupon-code in the API?

  • 1 March 2024
  • 4 replies
  • 55 views

Badge

Hi
The docs are quite sparse on what this “status” means in the backend for Klaviyo in relation to a coupon-code. 

From page updated 6 months ag: https://developers.klaviyo.com/en/docs/use_klaviyos_coupons_api 

  • status

    The current coupon code status, one of ASSIGNED_TO_PROFILE,DELETING,PROCESSING,UNASSIGNED,VERSION_NOT_ACTIVE

 

As well as coupon code API ref https://developers.klaviyo.com/en/reference/update_coupon_code 

status

string

The API status of our coupon codes.

 

What is the relevance, purpose and implementation behind the scenes for these statuses? What effect will this have on bulk uploaded coupons if I switch one of the coupon-codes to a different status?

 

The ultimate goal is removing unused but assigned coupon codes to profiles. 

 

Cheers.


4 replies

Userlevel 7
Badge +36

Hi @kendall-s!

I’m going to check on this with our API team and I’ll update the thread soon!

Best,

Brian

Badge

@Brian Turcotte any luck with this? Cheers, Kendall

Badge

Just wanted to add a bit more information after our Klaviyo specialist and I did some messing about. 

 

To us, it looks like setting a coupon code to a status of “DELETING” makes it so a profile can receive another coupon code from the same coupon set. That’s good, that’s the functionality we need. 

 

This coupon code set to a status of “DELETING” also means it disappears from the coupons section in a profile. However in the Klaviyo API doing a get request on the coupon-code endpoint (for that specific coupon code), it shows the related profile still attached to the code. This then prevents doing a delete request for the coupon-code, returning a 409 stating the coupon code is already assigned to a profile. This is slightly expected, as that’s what the docs say - but then the question still remains what does status mean? and can you even delete a coupon code after being assigned to a profile? 

Userlevel 7
Badge +36

Hi @kendall-s!

My apologies for the delay here - the status field is an internal marker that represents the latest action, so it can be ignored!

- Brian

Reply