https://shopify.dev/docs/admin-api/graphql/reference/object/pricerule?api[version]=2020-07
Also see Draft Orders API https://shopify.dev/docs/admin-api/graphql/reference/object/draftorder
Thanks. I don't think I was able to find those API's via Google. Odd.
The other thing I noticed, as I tried to work though this, is that using this:
https://help.shopify.com/en/manual/discounts/managing-discount-codes#promote-a-discount-using-a-shar...
I was not able to retreive that status via the site - and again - do some magic. But it would show up once I got to the checkout page. If the client / customer uses a discount via link. Where is that stored code having been applied store? It wasn't on the order object.
I'm not in a postion to dive into GraphQL ATM. We've gotta stick to standard Ajax. Maybe it's not possible?
This seems fairly routine to me. That is, discount on the cart prior to checkout. Maybe there's a tutorial? Or perhaps it's not so routine?
The
@mfs-mindsize wrote:Thanks. I don't think I was able to find those API's via Google. Odd.
The API docs are poorly worded for newcomers , how are they supposed to know they need to translate Discount into PriceRule /shrug
I was not able to retreive that status via the site
What status? there is no status data customers would get when adding a discount to their order.
That is a front end url api why would it expose that type of information publicly the discount is either accepted or rejected.
There are liquid objects for displaying discount information to customers https://shopify.dev/tutorials/develop-theme-discounts
I'm not in a position to dive into GraphQL ATM. We've gotta stick to standard Ajax. Maybe it's not possible?
This seems fairly routine to me. That is, discount on the cart prior to checkout. Maybe there's a tutorial? Or perhaps it's not so routine?
Maybe what's not possible? You have to describe what the goal is to get there.
REST backend API https://shopify.dev/docs/admin-api/rest/reference/discounts/pricerule?api[version]=2020-07
To apply a discount use the parameter ?discount=
To have dynamic generated discounts means backend apis.
User | Count |
---|---|
25 | |
23 | |
22 | |
19 | |
11 |