LCSC API Instruction is mainly for LCSC partners who wish to use our API service to integrate our system with yours. If you have any questions, please send email to support@LCSC.COM.
LCSC provides eight API services that allow customers and partners to automate some of the tasks that can be performed on LCSC.COM
Before using the API service, you will need to complete the following steps:
All requests must involve three parameters to verify whether the request is valid or not:
Parameter | Description |
---|---|
key | Apply an user ID at LCSC.COM |
nonce | Random |
timestamp | The timestamp of the request |
signature | Signature |
Note: Secret cannot be placed in request parameters
LCSC API will verify the request to ensure the security of data.
key
, the API secret name secret
, the request timestamp name timestamp
and a 16-bit random string name nonce
.signature =sha1(key=xxx&nonce=xxx&secret=xxxx×tamp=xxx)
The API key:
key=7dc6035da7874b5b9bc245bd28017290
The API secret:
xxxxxxxxxx
secret=eiru73y343r36fdi
The request timestamp:
xxxxxxxxxx
timestamp=1524662065
The 16-bit random string:
xxxxxxxxxx
nonce=63yeike7dy6c2kjd
Therefore, the string used for the signature is:
xxxxxxxxxx
key=7dc6035da7874b5b9bc245bd28017290&nonce=63yeike7dy6c2kjd&secret=eiru73y343r36fdi×tamp=1524662065
The result obtained using sha1 is:
xxxxxxxxxx
5960caf5c9675e9b4cad58ef46bf722b5413e9fa
Code | Description |
---|---|
412 | Date Is Required. |
413 | Not Found This Category. |
414 | Email can't find user information. |
415 | User address error. |
416 | order failed, pros params error: Not json Or malformed |
417 | order failed, product params error: Pro or Qty is empty |
418 | order failed, Optional express type is empty. |
419 | order failed, The configured express type is invalid. |
420 | order failed, The Qty must be between 1 and 1 billion. |
421 | No support pay method. |
422 | Auto pay error. |
423 | Dealer does not exist. |
424 | Key Is Required . |
425 | nonce Is Required . |
426 | timestamp Is Required . |
427 | signature Is Required . |
428 | Timestamp expired. |
429 | Not Found This Product. |
430 | Appsecret failed verification. |
431 | No access to information. |
432 | No permission. |
433 | Incorrect currency. |
434 | check orders exceed the limit, 10 at most and 1 at least. |
435 | Please check your participation. |
436 | Outside Chinese Mainland address is not support paid by RMB. |
437 | API request rate limit exceeded.Retry after 1 minute. |
438 | API request rate limit exceeded.Retry after 1 day. |
All of the API services response as the following format. No repetitive description in specific API.
xxxxxxxxxx
{
"success": true,
"code": 200,
"message": "",
"result": {}
}
JSON Element | Description |
---|---|
success | Successful call value is "true" and unsuccessful one is "false" |
code | Status code |
message | Error message |
key | The user ID applied at LCSC.COM |
result | Result of response |
By using the LCSC APIs, you agree the Return Policy (https://support.lcsc.com/article/20-return), and Terms of Use as follows:
Failure to comply may result in revocation of access and any other remedy available at law or in equity.