Skip to main content

The conventions of the Public API

  • Except for the "Exchange access key" API, all APIs must include an "Authentication" header. The value of this "Authentication" header is the access key obtained through the "Exchange access key" API。
  • If an API call is successful, the status in the response will be 200. Any other value indicates an API error.
Notice

If the status returned is 0, it also indicates an API error.

The sample

curl -X GET "https://api-test.thinla.com/api/affiliate/promotion/products" 
-H "accept: */*"
-H "Authentication: eyJhbGciOiJIUzI1NiJ9.eyJqdGkiOiI2NmU4MDU0NC1kZTUxLTQ0OTMtOGVjOC1iMDFiNjAzYmIxMTIiLCJpYXQiOjE3MTQ1Mjk0MzUsImlzcyI6IlRoaW5sYSIsInN1YiI6IntcImFjY291bnRUeXBlTWFwXCI6e1wiYWZmaWxpYXRldXNlclwiOlwiMTc3OTc4Mzg0OTQ2NjU4MDk5NFwiLFwiaW5mbHVlbmNlclwiOlwiMTc3OTc4Mzg0OTAyNjE3OTA3NFwifSxcInVzZXJJZFwiOlwiMTc3OTc4Mzg0ODU4NTc3NzE1NFwiLFwicGxhdGZvcm1cIjpcImFmZmlsaWF0ZS1hcGlcIn0iLCJleHAiOjE3MTUxMzQyMzV9.EadlrHPEleAKKxsFLjmvHA2YLx3E2Cyi31iW06q3l08"
{
"status": 200,
"message": "Success",
"params": null,
"requestId": "76b96ddf8617481f9086d8af5d9e79b9",
"data": null
}
  • If an API error occurs, the status will not be 200, and the message will contain the error information.
{
"status": 0,
"message": "Signature incorrect",
"params": null,
"requestId": "80213e24d5744a2ba1a32776aaddb62b",
"data": null
}