#akii

1 messages · Page 1 of 1 (latest)

vagrant streamBOT
candid kraken
neat drum
#

I have the promo code here promo_1MPmr0ELLM3Jv5QRqJx6NtyT

candid kraken
#

No, I mean the ID of the GET request you made that return empty result

neat drum
#

req_if3vJBewrVRCKH

candid kraken
#

OK, so you are trying to list the promo codes, not products. Is this the correct understanding?

neat drum
#

I was trying to get the applicable products from the response im getting

#

coupon.getAppliesTo()

candid kraken
neat drum
#

Yes i mean this

candid kraken
#

As explained in the API reference, This field is not included by default. To include it in the response, expand the applies_to field.

neat drum
#

Oh okY

#

gOT IT

#

Trying this out

#

Hi Can u check this one?

#

Im getting error in this req_NZFEcPu6zh3Ux7

candid kraken
#

"This property cannot be expanded (applies_to). You may want to try expanding 'data.applies_to' instead.",

#

Have you tried the suggestion in the error message

neat drum
#

Yes i tried it but it still gives an error

#

req_TIcSoBwJniBrDi

candid kraken
#

You are making a request to /v1/promotion_codes

#

for coupons, the request should be sent to /v1/coupons

neat drum
#

I didnt get it

candid kraken
#

Show me your code

neat drum
#

Map<String, Object> params = new HashMap<>();
params.put("code", code);
PromotionCodeCollection promotionCodes = PromotionCode.list(params);

candid kraken
#

You should use Coupon.list, not PromotionCode.list

neat drum
#

okay trying