Skip to main content

Update Slash Price

This endpoint update slash price campaign into product to specific shop.

Path

post

/v1/slash-price/fs/:fs_id/update

Request Parameters

ParameterTypeRequiredLocationDescription
fs_id
Integer
Required
path
Fulfillment service unique identifier
shop_id
Integer
Required
query
Shop unique identifier
product_id
Integer
Required
body
Product unique identifier
discounted_price
Integer
Required
body
Price that will be set into slash price campaign (please use either discounted_price or discount_percentage)
discount_percentage
Integer
Required
body
Total discount percentage that will be set into slash price campaign (please use either discounted_price or discount_percentage)
start_time_unix
Integer
Required
body
Start time campaign in UNIX format(use GMT +7)
end_time_unix
Integer
Required
body
End time campaign in UNIX format (use GMT +7)
max_order
Integer
Required
body
Maximun order per one transaction

Example Request

curl -X POST \
'https://fs.tokopedia.net/v1/slash-price/fs/13004/add?shop_id=479573 ' \
-H 'Authorization: Bearer EUqcir9oRCqNr_9OuvZgkg'\
-d '[
{
"product_id":15331520,
"discounted_price":2000,
"discount_percentage":0,
"start_time_unix":1592290500,
"end_time_unix":1592808840,
"max_order":2
}
]'

Response Parameters

NameTypeDemo ValueDescription
total_data
Integer
0
Total Data Count
succeed_rows
Integer
1
Success Data Count
failed_rows
Integer
0
Failed Data Count
failed_rows_data
String Array
[Error Product ID [15331520] : Failed Update Slash Price : Waktu mulai minimal 5 menit dari jam sekarang pid:15331520]
Totel Failed Data Count

Success Response Examples

{
"header": {
"process_time": 2.495287703,
"messages": "Your request has been processed successfully"
},
"data": {
"total_data": 1,
"succeed_rows": 1,
"failed_rows": 0,
"failed_rows_data": null
}
}

Error Response Examples

{
"header": {
"process_time": 2.495287703,
"messages": "Your request has been processed successfully"
},
"data": {
"total_data": 1,
"succeed_rows": 0,
"failed_rows": 1,
"failed_rows_data": [
"Error Product ID [15331520] : Failed Update Slash Price : Waktu mulai minimal 5 menit dari jam sekarang pid:15331520"
]
}
}

Error Codes

Error CodeError MessageDescription
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
SHP_GRPC_001
Failed Send GRPC Request
Failed sending request to upstream
SHP_GRPC_003
Data Not Found
Failed finding data from upstream
SPE_USC_001
fs_id Is Not Associated With Shop ID or Warehouse ID
FS ID is not associated, please kindly check
SPE_DLV_001
fs_id cannot be empty
FS ID is empty
SPE_DLV_005
Invalid field %s format, value %v should be %s
Invalid field format, please kindly check
SPE_DLV_006
Invalid request body, please check again
Invalid reequest body, please kindly check
SPE_DLV_007
Value of field %s exceed limit %s=%d
Invalid field value, please kindly check
SPE_GRPC_001
Failed Send GRPC Request
Failed sending request to upstream
SPE_GRPC_004
Failed Marshalling JSON
Failed processing request to upstream
SPE_GRPC_005
Failed Unmarshal JSON
Failed prorcessing response from upstream

Have a feedback?