Skip to main content
Solved

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


Forum|alt.badge.img+1

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.

Best answer by Brian Turcotte

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

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

4 replies

Brian Turcotte
Forum|alt.badge.img+37

Hi @kendall-s!

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

Best,

Brian


Forum|alt.badge.img+1
  • Author
  • Contributor I
  • 2 replies
  • March 12, 2024

@Brian Turcotte any luck with this? Cheers, Kendall


Forum|alt.badge.img+1
  • Author
  • Contributor I
  • 2 replies
  • March 13, 2024

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? 


Brian Turcotte
Forum|alt.badge.img+37
  • Klaviyo Alum
  • 1393 replies
  • Answer
  • April 25, 2024

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