View Campaign Products
This endpoint view all active campaigns from certain products.
Path
get
/v1/campaign/fs/:fs_id/view
Request Parameters
Parameter | Type | Required | Location | Description |
---|---|---|---|---|
fs_id | Integer | Required | path | Fulfillment service unique identifier |
shop_id | Integer | Required | query | Shop unique identifier |
product_id | Integer | Required | query | Product unique identifier |
Example Request
- Curl
curl -X GET \
'https://fs.tokopedia.net/v1/campaign/fs/13004/view?product_id=15331520&shop_id=479573' \
-H 'Authorization: Bearer EUqcir9oRCqNr_9OuvZgkg'
Response Parameters
Name | Type | Demo Value | Description |
---|---|---|---|
products | Object Array | ||
Integer | 1 | Total Product Count |
Success Response Examples
{
"header": {
"process_time": 1.6026919670000002,
"messages": "Your request has been processed successfully"
},
"data": {
"products": [
{
"ID": 15331520,
"price": "1000",
"shop": {},
"campaign": {
"campaignID": -10000,
"slash_price_product_id": 18460,
"discount_percentage": 98,
"discounted_price": "Rp 1.000",
"original_price": "Rp 40.000",
"custom_stock": 6,
"campaign_status": 2,
"start_date": "2020-06-16 13:55:00",
"end_date": "2020-06-22 13:54:00",
"campaign_type_name": "SlashPrice",
"campaign_short_name": "Sale",
"max_order": 2,
"discounted_price_fmt": "1000",
"original_price_fmt": "40000",
"original_stock": 6,
"min_order": 1,
"additional_cart_info": {
"timer_detail": {}
},
"stock_wording": {}
},
"max_order": 2,
"price_unfmt": "Rp 1.000",
"min_order": 1
}
],
"total_product": 1
}
}
Error Response Examples
{
"header": {
"process_time": 0.397859625,
"messages": "Our server encounters an error, please try again later",
"reason": "Invalid Product ID Format",
"error_code": "CMP_USC_003"
},
"data": null
}
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 |
CMP_GRPC_001 | Failed Send GRPC Request | Failed sending request to upstream |
CMP_GRPC_003 | Data Not Found | Data not found from upstream |
CMP_GRPC_004 | Failed Marshalling JSON | Failed processing request to upstream |
CMP_GRPC_005 | Failed Unmarshal JSON | Failed prorcessing response from upstream |
CMP_USC_001 | fs_id Is Not Associated With Shop ID or Warehouse ID | FS ID is not associated |
CMP_USC_002 | Some Product ID Is Not Own By Current Shop ID | Some Product ID is not owned by current Shop ID |
CMP_USC_003 | Invalid Product ID Format | Invalid Product ID format, please kindly check |
CMP_DLV_001 | Invalid field %s format, value %v should be %s | There is invalid request format |
CMP_DLV_002 | Product IDs must be numeric and comma separated | Invalid Product IDs format, please kindly check |
CMP_DLV_003 | Value of field %s exceed limit %s=%d | There is invalid request format |
CMP_DLV_004 | product_id cannot be empty | Product ID is empty, please kindly check |