Check Upload Status
This endpoint is used for checking whether product creation/edit is successful, to use this endpoint would have to obtain upload_id
from create product endpoint or edit product endpoint.
Path
get
/v2/products/fs/:fs_id/status/:upload_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 |
upload_id | Integer | Required | query | Upload id of the product to check |
Example Request
- Curl
- Go
- Java
- Node.js
curl -X GET \
'https://fs.tokopedia.net/v2/products/fs/13245/status/12345?shop_id=479573' \
-H 'Authorization: Bearer HB8GNgfdRXS9c_sksTdTBw'
package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://fs.tokopedia.net/v2/products/fs/13245/status/12345?shop_id=479573"
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/v2/products/fs/13245/status/12345?shop_id=479573")
.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': 'v2/products/fs/13245/status/12345?shop_id=479573',
'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 |
---|---|---|---|
upload_data | Object Array |
Success Response Examples
{
"header": {
"process_time": 0.045122173,
"messages": "Your request has been processed successfully"
},
"data": {
"upload_data": [
{
"upload_id": 0,
"status": "DONE",
"total_data": 1,
"unprocessed_rows": 0,
"success_rows": 1,
"failed_rows": 0,
"processed": 1
}
]
}
}
Error Response Examples
{
"header": {
"process_time": 9.7e-8,
"messages": "We could not process your request due to malformed request, please check again",
"reason": "Invalid field [upload_id] format, value [283a] should be int",
"error_code": "PRD_DLV_042"
},
"data": null
}
Error Codes
Error Code | Error Message | Description |
---|---|---|
PRD_USC_001 | fs_id Is Not Associated With Shop ID or Warehouse ID | fs_id not assosiated, please check again |
PRD_USC_025 | Shop ID is not associated with upload id | Shop ID not assosiated, please check again |
PRD_CACHE_005 | Data Not Found | Error on processing data |
PRD_CACHE_006 | Failed to retrieve cache data | Error on processing data |
PRD_CACHE_007 | Failed Unrmashall cache response | Error on processing data |
PRD_DLV_045 | Field %s should not be empty, please fill the empty field | Please check the request params again |