We are using Shopify API to get a list of price_rules and discounts_codes into our local database
The sync works well and we are able to get most of the data except some missing discount codes.
API calls reruns 404 error "Not found" for all discount codes where "Customer spends" option set to "Minimum purchase amount"
API calls we use:
If "Minimum quantity or items" option selected - all works.
if "Minimum purchase amount" - API returns 404 error.
See an example bellow: Discount code BFPJN7TTZ42 (where "Customer spends" set originally to "Minimum purchase amount")
If I change "Customer spends" option to "Minimum quantity or items" :
I checked a few more discount codes we are missing from the sync and all of them "Customer spends" set to "Minimum purchase amount".
This looks like a bug.
This is actually expected. When buy X get Y discounts were launched, the functionality was only implemented on the GraphQL endpoints.
However, we've since implemented the REST functionality on the
unstable version, and will be adding it to a numbered version soon. In the meantime, you can get this data call the unstable version using REST.