FROM CACHE - en_header

discount api problems

greg12
Shopify Partner
38 1 12

I try to use shopify discount api. According to documentation  i run discountCodeBasicCreate mutation. 

 

mutation discountCodeBasicCreate($basicCodeDiscount: DiscountCodeBasicInput!) {
  discountCodeBasicCreate(basicCodeDiscount: $basicCodeDiscount) {
    codeDiscountNode {
        id,
        codeDiscount
     }
     userErrors {
        code
        extraInfo
        field 
        message
      }
   }
}
 
 
I run it with all needed variables so it returns without errors
 
So far i used priceRules API, i had to switch to discounts as priceRules ( this is another problem ) do not support subscriptions. On storefront i apply the discount by making GET request on `/discount/${code}`, this was working with price rule with discount code API it doesnt. How then i can apply the discount? 
 
One more problem is that discount created by API is not visible in Shopify dashboard. 
 
G.P. 
Replies 0 (0)