Shopify API Discount code generation is slow

Highlighted
Excursionist
38 0 4

Hello,

I have been testing discount code API and pricerule API to generate discount code. I am using shopify-api-node to generate like 

 

shopify.priceRule.create({..}).then(docs => {
    shopify.discountCode.create({...}).then(discount => {
     // discount code generated successfully
    })
})
But the problem is this process takes up to 5s to complete. I did different trials and the least time I've got is 4s.
 
Is there any workaround to reduce the discount generation time?
The interesting part is I have analysed some of the upsell apps (discount api request to their server) in shopify app store (discounted upsells, smart7 etc)
 
All these apps generating discount code in 1.5s, how can these apps achieve this?
 
Thanks
 
0 Likes
Shopify Staff
Shopify Staff
297 32 61

Hey there,

 

I can take a look to see why you might be experiencing some delayed responses.

 

Can you please provide me with the Request Id response header for one of these calls?

0 Likes