Universal data synchronization FTP solution
A unified FTP solution for partners to synchronize data to Lenovo. Please understand the FTP access process before connecting.
File Directory
- After determining the integration solution, Lenovo will allocate the corresponding file directory
| Environment | Service Address | Partner Send File Directory | Lenovo Send File Directory | File Name |
|---|---|---|---|---|
| Test | ***.lenovo.com | /Planning/SCC/{appName}/{data_category}/{biz_key}/ | /Planning/SCC/{appName}/{data_category}/{biz_key}/feedback / | {biz_key}_{crud}_{yyyyMMddHHmmss}_ |
| Official | ***.lenovo.com | /Planning/SCC/{appName}/{data_category}/{biz_key}/ | /Planning/SCC/{appName}/{data_category}/{biz_key}/feedback / | {biz_key}_{crud}_{yyyyMMddHHmmss}_ |
Public directory parameters
| Parameter location | Parameter name | Description | Example |
|---|---|---|---|
| Path | appName | Partner Short Name | Fixed Assignment |
| Path | data_category | Data classification | ODM, T1, TN, etc., specific business interfaces are fixedly allocated |
| File name | biz_key | Business data name | Fixed allocation of specific business interfaces |
| File name | crud | Synchronization type | Full coverage: all (clear historical data, then write current data), add: insert, modify: update, delete: delete |
| File name | yyyyMMddHHmmss | Time | 20221001003000 |
| file name | serial | daily flow | mainly to avoid duplication |
Public request parameters
| Position | Name | Required | Type | Length | Description |
|---|---|---|---|---|---|
| Body | appName | String | 10 | Partner short name, optional | |
| Body | batch_id | Y | String | 16 | Batch ID, generated by partners to ensure batch uniqueness |
| Body | batch_size | Y | Number | --- | Total amount of data in the batch |
| Body | seq_id | Y | String | Within the batch, each sequence number | |
| Body | seq_size | Y | Number | --- | Each time, the amount of data to be pushed 5000 >= size >= 1 |
Public response parameters
| Location | Name | Required | Type | Format | Description | Example |
|---|---|---|---|---|---|---|
| Body | code | Y | String | --- | Status code | "0" represents success, other failures can refer to the return code |
| Body | msg | N | String | --- | Prompt message | If it is not "0", an error message will be prompted |
| Body | result | N | object/array | --- | data body | |
| Body | row | N | object | --- | original data row | |
| Body | verify | N | object | --- | Specific error fields and error reasons |
- Request example
json
{
"batch_id": "2022****0001",
"batch_size": "100",
"seq_id": "1",
"seq_size": "2",
"data": [
{
"LENOVO_PN": "pn1",
"PLANT": "plant1",
"QTY": "1000"
},
{
"LENOVO_PN": "pn2",
"PLANT": "plant1",
"QTY": "1000"
}
]
}- Response example
json
{
"code": "0",
"msg": "request success"
}- Exception examples
json
{
"code": "E00V00",
"msg": "data verification failed!",
"result": [
{
"row": {
"odm": "ABCD",
"odm_pn": "****",
"location": "1234",
"version": "20220915080100123456"
},
"verify": [
{
"type": "value length exceed",
"fields": "version"
}
]
}
]
}