Update Price Only
This endpoint used for update product’s price. You can update up to 100 products or SKUs in a single request to this endpoint.
Path
post
/inventory/v1/fs/:fs_id/price/update?shop_id={{shop_id}}
Request Parameters
Parameter | Type | Required | Location | Description |
---|---|---|---|---|
fs_id | Integer | Required | path | Fulfillment service unique identifier |
shop_id | Integer | Required | query | Shop unique identifier |
warehouse_id | Integer | Optional | query | Warehouse unique identifer |
sku | String | Required if product_id not inputted | body | SKU of products that will be updated. Maximum characters allowed is 50 |
product_id | Integer | Required if sku not inputted | body | Product ID to update |
new_price | Integer | Required | body | New price to be set |
Example Request
- Curl
curl -X POST \
'https://fs.tokopedia.net/inventory/v1/fs/13004/price/update?shop_id=479573' \
-H 'Authorization: Bearer avK2WV5pSda4HlxC5mLrFA' \
-H 'Content-Type: application/json' \
-d '[
{
"sku": "YS1234",
"new_price": 10000
},
{
"sku": "ABC1234",
"new_price": 12000
},
{
"product_id": 15123699,
"new_price": 12000
}
]'
Response Parameters
Name | Type | Demo Value | Description |
---|---|---|---|
Integer | 2 | Failed Row Count | |
failed_rows_data | Object Array | ||
Integer | 0 | Succeed Row Count |
Success Response Examples
{
"header": {
"process_time": 0.045122173,
"messages": "Your request has been processed successfully"
},
"data": {
"failed_rows": 0,
"failed_rows_data": [],
"succeed_rows": 3
}
}
Error Response Examples
{
"header": {
"process_time": 0.045122173,
"messages": "Your request has been processed successfully"
},
"data": {
"failed_rows": 1,
"failed_rows_data": [
{
"product_id": 152460010,
"sku": "SKU-MANDATORY-50CHH",
"product_url": "",
"new_price": 10000,
"message": "Invalid Product ID."
}
],
"succeed_rows": 0
}
}
Error Codes
Error Code | Error Message | Description |
---|---|---|
PRD_GRPC_001 | Failed Send GRPC Request | Failed sending request to upstream |
PRD_GRPC_002 | There Are Error From Ext Service | Failed getting response from upstream |
PRD_API_007 | Failed Marshalling JSON | Error on processing data |
PRD_DB_001 | Failed To Query DB Data | Failed getting data from database |
PRD_DB_002 | Failed To Scan DB Data | Failed getting data from database |
PRD_DB_003 | Data Not Found | Failed getting data from database |
PRD_USC_001 | fs_id Is Not Associated With Shop ID or Warehouse ID | fs_id not assosiated, please check again |
PRD_USC_008 | Mandatory To Fill Warehouse ID | warehouse_id is empty, please check again |
PRD_DLV_001 | fs_id cannot be empty | fs_id field is empty, please check again |
PRD_DLV_002 | invalid fs_id format | fs_id is in the wrong format, please check again |
PRD_DLV_003 | invalid shop_id format | shop_id is in the wrong format, please check again |
PRD_DLV_015 | failed read body request | Failed reading the body request |
PRD_DLV_016 | shop_id cannot be empty | shop_id field is empty, please check agai |
PRD_DLV_018 | Max allowed products per-update are %d products | The request has exceed the max allowed product price edit per request |
PRD_DLV_019 | invalid warehouse_id format | warehouse_id is in the wrong format, please check again |
PRD_DLV_055 | warehouse_id is not eligible to perform this operation | warehouse_id is not eligible, please check again |
SHP_GRPC_001 | Failed Send GRPC Request | Failed sending request to upstream |
SHP_GRPC_003 | Data Not Found | Failed finding data from upstream |