Get All Discussion Product
This endpoint retrieves a list of all Discussion owned by a product_id, shop_id needed for validate that product is owned by shop.
Path
get
/v1/discussion/fs/:fs_id/list?shop_id=:shop_id&product_id=:product_id&page=:page&per_page=:per_page
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 | List of Product ID |
page | Integer | Required | query | Determine which page the order list should start. The minimal value is 1 |
per_page | Integer | Required | query | Determine how many orders will be shown per page. The maximal value is 10 |
Example Request
- Curl
- Go
- Java
- Node.js
curl -X GET \
'https://fs.tokopedia.net/v1/discussion/fs/13215/list?shop_id=481154&product_id=15425363&page=1&per_page=5' \
-H 'Authorization: Bearer HB8GNgfdRXS9c_sksTdTBw'
package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://fs.tokopedia.net/v1/discussion/fs/13215/list?shop_id=481154&product_id=15425363&page=1&per_page=5"
client := &http.Client {}
req, err := http.NewRequest(http.MethodGet, url, nil)
if err != nil {
// handle err
}
req.Header.Add("Authorization", "Bearer HB8GNgfdRXS9c_sksTdTBw")
res, err := client.Do(req)
if err != nil {
// handle err
}
defer res.Body.Close()
body, err := ioutil.ReadAll(res.Body)
if err != nil {
// handle err
}
fmt.Println(string(body))
}
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
Request request = new Request.Builder()
.url("https://fs.tokopedia.net/v1/discussion/fs/13215/list?shop_id=481154&product_id=15425363&page=1&per_page=5")
.method("GET", null)
.addHeader("Authorization", "Bearer HB8GNgfdRXS9c_sksTdTBw")
.build();
Response response = client.newCall(request).execute();
var https = require('follow-redirects').https;
var fs = require('fs');
var options = {
'method': 'GET',
'hostname': 'https://fs.tokopedia.net',
'path': 'v1/discussion/fs/13215/list?shop_id=481154&product_id=15425363&page=1&per_page=5',
'headers': {
'Authorization': 'Bearer HB8GNgfdRXS9c_sksTdTBw'
},
'maxRedirects': 20
};
var req = https.request(options, function (res) {
var chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function (chunk) {
var body = Buffer.concat(chunks);
console.log(body.toString());
});
res.on("error", function (error) {
console.error(error);
});
});
req.end();
Response Parameters
Name | Type | Demo Value | Description |
---|---|---|---|
Boolean | false | ||
Integer | 4 | Total Question Count | |
Question | Array Object | ||
Integer | 15425363 | Product Unique Identifier | |
Integer | 481154 | Shop Unique Identifier | |
String | https://staging.tokopedia.com/jualskillcuy | Shop URL |
Success Response Examples
{
"header": {
"process_time": 2.18e-7,
"messages": "Your request has been processed successfully"
},
"data": {
"HasNext": false,
"TotalQuestion": 4,
"Question": [
{
"Content": "Terima kasih!",
"MaskedContent": "",
"UserName": "Mohamad",
"UserID": 9068784,
"CreateTime": "2020-12-04T13:40:19Z",
"CreateTimeFormatted": "4 Des",
"TotalAnswer": 2,
"Answer": [
{
"Content": "sama sama kkak",
"MaskedContent": "",
"UserName": "Jualskillcuy",
"UserThumbnail": "https://ecs7.tokopedia.net/img/cache/215-square/shops-1/2019/10/24/481154/481154_f7355c1f-a110-4bc9-a827-6ce21974116f.png",
"UserID": 8970523,
"CreateTime": "2020-12-04T14:14:44Z",
"CreateTimeFormatted": "4 Des",
"AttachedProduct": null,
"LikeCount": 0,
"AnswerID": 214897552,
"IsSeller": true
},
{
"Content": "Yang ini gimana\n?",
"MaskedContent": "",
"UserName": "Jualskillcuy",
"UserThumbnail": "https://ecs7.tokopedia.net/img/cache/215-square/shops-1/2019/10/24/481154/481154_f7355c1f-a110-4bc9-a827-6ce21974116f.png",
"UserID": 8970523,
"CreateTime": "2020-12-04T16:16:47Z",
"CreateTimeFormatted": "4 Des",
"AttachedProduct": [
{
"ProductID": 15372491,
"Name": "Health Master - merah",
"PriceFormatted": "Rp 10.000",
"URL": "https://staging.tokopedia.com/jualskillcuy/health-master-merah",
"Thumbnail": "https://ecs7.tokopedia.net/img/cache/100-square/product-1/2020/4/30/481154/481154_05db8ad1-00ca-48b1-a1aa-b69fc0a10b99.jpg"
}
],
"LikeCount": 0,
"AnswerID": 214897555,
"IsSeller": true
}
],
"QuestionID": 100830289,
"AnswererThumbnail": null,
"UserThumbnail": "https://accounts-staging.tokopedia.com/image/v1/u/9068784/user_thumbnail/desktop"
},
{
"Content": "Bisa dikirim hari ini ga?",
"MaskedContent": "",
"UserName": "Mohamad",
"UserID": 9068784,
"CreateTime": "2020-12-04T13:40:15Z",
"CreateTimeFormatted": "4 Des",
"TotalAnswer": 0,
"Answer": [],
"QuestionID": 100830288,
"AnswererThumbnail": null,
"UserThumbnail": "https://accounts-staging.tokopedia.com/image/v1/u/9068784/user_thumbnail/desktop"
},
{
"Content": "Hai, barang ini ready ga?",
"MaskedContent": "",
"UserName": "Mohamad",
"UserID": 9068784,
"CreateTime": "2020-12-04T13:40:11Z",
"CreateTimeFormatted": "4 Des",
"TotalAnswer": 1,
"Answer": [
{
"Content": "Habis kak",
"MaskedContent": "",
"UserName": "Jualskillcuy",
"UserThumbnail": "https://ecs7.tokopedia.net/img/cache/215-square/shops-1/2019/10/24/481154/481154_f7355c1f-a110-4bc9-a827-6ce21974116f.png",
"UserID": 8970523,
"CreateTime": "2020-12-08T11:15:10Z",
"CreateTimeFormatted": "8 Des",
"AttachedProduct": null,
"LikeCount": 0,
"AnswerID": 214897634,
"IsSeller": true
}
],
"QuestionID": 100830287,
"AnswererThumbnail": null,
"UserThumbnail": "https://accounts-staging.tokopedia.com/image/v1/u/9068784/user_thumbnail/desktop"
},
{
"Content": "Bisa dikirim hari ini ga?",
"MaskedContent": "",
"UserName": "Mohamad",
"UserID": 9068784,
"CreateTime": "2020-12-04T13:39:20Z",
"CreateTimeFormatted": "4 Des",
"TotalAnswer": 2,
"Answer": [
{
"Content": "ini yang bisa pak",
"MaskedContent": "",
"UserName": "Jualskillcuy",
"UserThumbnail": "https://ecs7.tokopedia.net/img/cache/215-square/shops-1/2019/10/24/481154/481154_f7355c1f-a110-4bc9-a827-6ce21974116f.png",
"UserID": 8970523,
"CreateTime": "2020-12-04T16:45:31Z",
"CreateTimeFormatted": "4 Des",
"AttachedProduct": [
{
"ProductID": 15373326,
"Name": "Beauty Master v3 - merah",
"PriceFormatted": "Rp 10.000",
"URL": "https://staging.tokopedia.com/jualskillcuy/beauty-master-v3-merah",
"Thumbnail": "https://ecs7.tokopedia.net/img/cache/100-square/product-1/2020/5/6/481154/481154_4469e224-7653-458b-b40e-39274a1b499c.jpg"
}
],
"LikeCount": 0,
"AnswerID": 214897557,
"IsSeller": true
},
{
"Content": "yang ini juga bisa sih",
"MaskedContent": "",
"UserName": "Jualskillcuy",
"UserThumbnail": "https://ecs7.tokopedia.net/img/cache/215-square/shops-1/2019/10/24/481154/481154_f7355c1f-a110-4bc9-a827-6ce21974116f.png",
"UserID": 8970523,
"CreateTime": "2020-12-08T09:09:10Z",
"CreateTimeFormatted": "8 Des",
"AttachedProduct": [
{
"ProductID": 15373326,
"Name": "Beauty Master v3 - merah",
"PriceFormatted": "Rp 10.000",
"URL": "https://staging.tokopedia.com/jualskillcuy/beauty-master-v3-merah",
"Thumbnail": "https://ecs7.tokopedia.net/img/cache/100-square/product-1/2020/5/6/481154/481154_4469e224-7653-458b-b40e-39274a1b499c.jpg"
},
{
"ProductID": 15373331,
"Name": "Beauty Master v4 - biru muda, 2",
"PriceFormatted": "Rp 10.000",
"URL": "https://staging.tokopedia.com/jualskillcuy/beauty-master-v4-biru-muda-2",
"Thumbnail": "https://ecs7.tokopedia.net/img/cache/100-square/product-1/2020/5/6/481154/481154_b9fb2d6c-eb3e-4ea7-93f2-9767149ae314.jpg"
},
{
"ProductID": 15372491,
"Name": "Health Master - merah",
"PriceFormatted": "Rp 10.000",
"URL": "https://staging.tokopedia.com/jualskillcuy/health-master-merah",
"Thumbnail": "https://ecs7.tokopedia.net/img/cache/100-square/product-1/2020/4/30/481154/481154_05db8ad1-00ca-48b1-a1aa-b69fc0a10b99.jpg"
}
],
"LikeCount": 0,
"AnswerID": 214897631,
"IsSeller": true
}
],
"QuestionID": 100830286,
"AnswererThumbnail": null,
"UserThumbnail": "https://accounts-staging.tokopedia.com/image/v1/u/9068784/user_thumbnail/desktop"
}
],
"ProductID": 15425363,
"ShopID": 481154,
"ShopURL": "https://staging.tokopedia.com/jualskillcuy"
}
}
Error Response Examples
{
"header": {
"process_time": 9.2e-8,
"messages": "We could not process your request due to malformed request, please check again",
"reason": "%!(EXTRA string=maximum value for perpage is 10)",
"error_code": "DISC_DLV_001"
},
"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 |
SHP_GRPC_001 | Failed Send GRPC Request | Failed sending request to upstream |
SHP_GRPC_003 | Data Not Found | Failed finding data from upstream |
ETS_USC_001 | fs_id Is Not Associated With Shop ID or Warehouse ID | FS ID is not associated, please kindly check |