1. Create New
Supplier can use this API to create one or more products.
It is used when registering a new product.
2. API Spec
Request
Endpoint |
|
---|---|
Method |
|
Description | Register new product. |
Content-Type |
|
Body Parameter
Name | Required | Type | Description |
---|---|---|---|
supplier_access_key | O | String |
|
depth_combination | O | File |
|
contents | O | File |
|
images | O | List[File] |
|
Response
Name | Type | Description | |
---|---|---|---|
status_code | Number | Server response code | |
message | String | Server response message | |
data | Object | ||
not_processed_company_code | Array | Among the company codes in the depth combination file, company codes that could not be processed because of that company code not matching the supplier access key you entered |
Error Spec
Status Code | Message | Solution |
---|---|---|
403 |
| The valid supplier access key must be entered |
400 |
| The valid files composed of depth combination, contents, images must be entered |
400 |
| Check the guide sheet of the depth combination and enter a valid value for each column |
Response Example
{ "message": "Success", "status_code": 201, "data": { "not_processed_company_code": [] } }
{ "status_code": 403, "message": "Need valid supplier access key." }
3. Request Example
CURL
curl -X 'POST' \ 'http://localhost:8000/v1/wholeness-upload' \ -H 'accept: */*' \ -H 'Content-Type: multipart/form-data' \ -H 'X-CSRFTOKEN: cGWHP4rWn2tZ2ZBJMB2G36eSphzLwYOo8rK2wbaQuG8MHFTiqRq0KZ7thAPE8yFE' \ -F 'supplier_access_key=098b34d1-5764-48e1-b062-94b287f9049c' \ -F 'depth_combination=@Depth Combination.xlsx;type=application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' \ -F 'contents=@contents.xlsx;type=application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' \ -F 'images=@5172422803_A.jpg;type=image/jpeg' \ -F 'images=@5172422803_B.jpg;type=image/jpeg' \ -F 'images=@5172422803_C.jpg;type=image/jpeg'
4. Limitation
supplier_access_key
It must be the same as the company code of the depth combination file
File
The depth combination is xlsx file no larger than 2MB
The contents is an xlsx file no larger than 2MB
Each image must be a jpg(jpeg) or png file no larger than 1MB
Total size limit for all files
The total size limit is 100 MB