Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SHOPIFY ADMIN REST API DOES NOT HAVE ALL DISCOUNT FIELDS AS AVAILABLE AT ORIGINAL DISCOUNT #1340

Closed
Ahmed-mean3 opened this issue Sep 24, 2024 · 4 comments

Comments

@Ahmed-mean3
Copy link

FROM BELOW JSON I CANNOT SEE HOW TO ADD DISCOUNT COMBINATION Fields or Exclude shipping rates over certain amount as available in original discount i wanted to add both in my custom made discount. im at shopify + node template. (mern project).

Typical JSON OF REST ADMIN API : {
"allocation_method": "each",
"created_at": "2017-03-13T16:09:54-04:00",
"updated_at": "2017-03-14T16:09:54-04:00",
"customer_selection": "prerequisite",
"ends_at": "2017-04-19T17:59:10Z",
"entitled_collection_ids": [
4564654869,
8979761006
],
"entitled_country_ids": {
" entitled_country_ids": [
7897987023,
3569053679
]
},
"entitled_product_ids": [
7897397755,
42382368242
],
"entitled_variant_ids": [
6798798798,
5675765905
],
"id": 9808080986,
"once_per_customer": true,
"prerequisite_customer_ids": [
384028349005,
3492039843
],
"prerequisite_quantity_range": {
"greater_than_or_equal_to": 2
},
"customer_segment_prerequisite_ids": [
1122345432,
43535360314
],
"prerequisite_shipping_price_range": {
"less_than_or_equal_to": "10.0"
},
"prerequisite_subtotal_range": {
"greater_than_or_equal_to": "40.0"
},
"prerequisite_to_entitlement_purchase": {
"prerequisite_amount": "80.00"
},
"starts_at": "2017-01-19T17:59:10Z",
"target_selection": "entitled",
"target_type": "line_item",
"title": "SUMMERSALE10OFF",
"usage_limit": 10,
"prerequisite_product_ids": [
7897397755,
42382368242
],
"prerequisite_variant_ids": [
6798798798,
5675765905
],
"prerequisite_collection_ids": [
4564654869,
8979761006
],
"value": -35,
"value_type": "fixed_amount",
"prerequisite_to_entitlement_quantity_ratio": {
"prerequisite_quantity": 2,
"entitled_quantity": 1
},
"allocation_limit": 3
}

//FEILDS THAT CANNOT BE SAVED INTO DISCOUNT AS ORIGNIAL DISCOUNT DOES.

combinesWithProductDiscounts:
price_rule.combinesWithProductDiscounts || false,
combinesWithOrderDiscounts: {
value: price_rule.combinesWithOrderDiscounts || false,
},
combinesWithShippingDiscounts:
price_rule.combinesWithShippingDiscounts || false,
},
hasExcludeShippingRatesOver: {
value: true,
},
excludeShippingRatesOver: {
value: "21.00",
},

@matteodepalo
Copy link

matteodepalo commented Sep 25, 2024

Hi @Ahmed-mean3 thank you for opening this issue. Could you please reorganize it so that it's clear what is the current behavior and what do you think instead should happen?

@Ahmed-mean3
Copy link
Author

Ahmed-mean3 commented Sep 25, 2024 via email

@matteodepalo
Copy link

@Ahmed-mean3 this doesn't seem to be an issue with the client library, but rather with the API. Would you mind opening a discussion on the relevant community for partners? Thank you.

@Ahmed-mean3
Copy link
Author

Ahmed-mean3 commented Sep 25, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants