2

The question is about API and independent from programming language.

I want to get a commission from products on Aliexpress.

API documentation (press "API Documents")

But I can't understand how to generate a link and then how to check if it is correct.

As I understand I need to use 1.1 listPromotionProduct request, get all the links from the result and apply 1.3 getPromotionLinks to them. Is it correct?

Mogsdad
  • 44,709
  • 21
  • 151
  • 275
Vyachaslav Gerchicov
  • 2,317
  • 3
  • 23
  • 49

1 Answers1

4

Yes you're right this is the way to do it, so you need to do two API calls, one to api.listPromotionProduct, collect up the URLs and then make a call to api.getPromotionLinks.

This URL works:

http://gw.api.alibaba.com/openapi/param2/2/portals.open/api.getPromotionLinks/YOURAPIKEY?fields=totalResults,trackingId,publisherId,url,promotionUrl&trackingId=YOURTRACKINGIDHERE&urls=https://www.aliexpress.com/item/Rotary-Cheese-Tools-Cheese-Grater-Stainless-Steel-Slicer-Shreds-Drum-Hand-Held-Ginger-Graters-Cutter-Kitchen/32706493641.html

Append more URLs to this URL using a comma (up to 50 URL's).

Likely Issue

The thing I was doing wrong was using the wrong trackingID, it's not your digital signature but the affiliate ID you specified in https://portals.aliexpress.com/publisher_manage.htm (I think you can have multiple affiliate ID's).

BrettB
  • 104
  • 4