Support

Home Forums Event Espresso Premium How do I get the Promotion Code that a registrant used when paying for a ticket?

How do I get the Promotion Code that a registrant used when paying for a ticket?

Posted: August 8, 2018 at 7:53 pm


gncares

August 8, 2018 at 7:53 pm

I need to know what code someone used when they paid via the REST API.

I can get the list of registrant’s easy enough, and the associated attendee, I just don’t see where the Promotion code is? I can see it used in the UI, but I don’t see it via the API.


gncares

August 8, 2018 at 7:53 pm

To clarify, they paid using the normal interface, I just need to use the API to get that information.


Josh

  • Support Staff

August 9, 2018 at 8:54 am

Hi,

If you have the transaction ID, you can send an auth’d request to the /transactions/ endpoint’s line_items link.

e.g. if the transaction ID is 1234, the request will look like:
/wp-json/ee/v4.8.36/transactions/1234/line_items

This will return an array of line items, and the promo code line item’s LIN_code will start with promotion-. The LIN_desc entity will have the promo code that was entered at checkout.

The support post ‘How do I get the Promotion Code that a registrant used when paying for a ticket?’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso