A space to discuss GraphQL queries, mutations, troubleshooting, throttling, and best practices.
Hi all,
Orders REST API returns the discount codes applied on the order.
But it seems there is no way to get the discount code ID?
Which doesn't make sense because there is no way to get the discount code ID from the DiscountCode API as well using the discount code it self.
Is there something I am missing to get the discount code ID used in orders?
Thank you
UPDATE: Found out we can lookup a discount by the discount code
/discount_codes/lookup.json?code=
But the part that doesn't make sense is why there is a discount_code ID in there
While in the price_rules listing it only has a price_rule ID and no discount_code ID
And there is no way to list all discount codes, only all price rules, which has a discount code... but no discount code ID lol
Discount codes vs price rules is messy in the API