Discount Code API?

Hello,

is there any way to retrieve discount codes via the API? Interestingly enough there’s an undocumented endpoint on crm/v3/objects/discounts/. But it always returns an empty list.

Hey, @NSpiess :waving_hand: Thank you for your question! It’s definitely an interesting one. I have a quick answer and then a few thoughts.

You are not missing an option. There is not an endpoint for this. Regarding the endpoint you linked to, I am not sure about its use, but it is not related to what we are looking at.

Here’s what I know:

  • Discount Codes live in the Payments settings. But, it’s always abut…:rofl:, they are specifically related to and used for Payment Links. Create and use payment discount codes

  • Making an educated guess, this is why we don’t see them in the Payments or Line Items API documentation and why we don’t get them when we make a request to the Properties endpoint for the Products object

    curl --request GET \
     --url 'https://api.hubapi.com/crm/v3/properties/products?archived=false' \
     --header 'authorization: Bearer YOUR_ACCESS_TOKEN'​
    

Thank you for the additional information! — Jaycee

Thanks Jaycee

Sad to hear. We’re not based in the US and can therefore not use the provided payment solution. We were hoping to still be able to use the voucher definitions for our own external payment handling. But that’s not feasible then.