Skip to main content

Edit Products

This is the new version of edit products endpoint. This endpoint just need to pass field that needed to edit into payload request. This endpoint can’t edit/update name for the product that already has a transaction.

Path​

patch

/v3/products/fs/:fs_id/edit

Request Parameters​

ParameterTypeRequiredLocationDescription
fs_id
Integer
Required
path
Fulfillment service unique identifier
shop_id
Integer
Required
path
Shop unique identifier
products
Object Array
Required
body
Product object array

Where products object contain

ParameterTypeRequiredLocationDescription
id
Integer
Required
body
Product Identifier
sku
String
Optional
body
The stock keeping unit for the product. Maximum characters allowed is 50
name
String
Optional
body
Name of the product with length less than or equals 70 characters
category_id
Integer
Optional
body
Unique identifier for the product’s category. To get available categories, please check Get All Categories Please input the deepest category child ID
price_currency
String
Optional
body
Currency code for stated price (IDR or USD)
price
Integer
Optional
body
The possible value between 100 to 100.000.000. If the product variant is added, the price parameter is automatically set to the lowest price among the variant products
status
String
Required
body
Status for the product with the following available values UNLIMITED, LIMITED, and EMPTY
min_order
Integer
Optional
body
Minimum order required to purchase the product. Can only be a positive integer
weight
Float
Optional
body
Weight of the product
weight_unit
String
Optional
body
The unit of the weight with the following available values GR (gram) and KG (kilogram)
condition
String
Optional
body
The condition of the product with the following available values NEW and USED
dimension
Object
Optional
body
Dimension of the product. The object contains height, width, and length. If want to use dimensions then three of this object must be filled
custom_product_logistics
Integer Array
Optional
body
Custom product logistics of the product. To get the id, please check Get Active Courier. Required field to input just ShippingProductID value responses from Get Active Courier. Remove custom_product_logistics from related product by passing empty array ([]) in this request
annotations
String Array
Optional
body
Product Specification (anotations) By Category ID. The value is array of annotations id that can be retrieve by hit endpoint Get Product Annotation by Category ID. The location of id is at values.id. Remove annotations from related product by passing empty array (β€œβ€) in this request
etalase
Object
Optional
body
Etalase or Showcase of the product. The object contains id and name. To get available Showcase, please check Get Showcase. Required field to input just id with etalase_id responses from Get Showcase
description
String
Optional
body
Description of the product. Maximum characters allowed is 2000
is_must_insurance
Boolean
Optional
body
Determine if the product must be insured (true) or not (false)
is_free_return
Boolean
Optional
body
Determine if the product can be returned (true) by buyers or not (false)
stock
Integer
Optional
body
The stock of the product. 0 indicates always available. Other than that, the possible values are from 1 to 1000. Stock should be 1 if want to add variant product
wholesale
Object Array
Optional
body
Wholesale price and quantity of the product. The object keys includes: min_qty and price. Remove wholesale from related product by passing empty array ([]) in this request
preorder
Object
Optional
body
Preorder information. The object keys includes: is_active, duration, and time_unit. Remove preorder from related product by passing empty object ({}) in this request
pictures
Object Array
Optional
body
Images information of the product. The object keys includes: file_path. Remove pictures from related product by passing empty array ([]) in this request
videos
Object Array
Optional
body
Video link of the product. The object keys includes: url and source. url should only contain the YouTube video id e.g. dQw4w9WgXcQ. Where the type type should be youtube. Remove videos from related product by passing empty array ([]) in this request
variant
Required*
Optional
body
Variant of the product. The object keys includes: variant and product_variant. There are some field in variant entity that mandatory. For more detail please refer to this link

Example Request​

curl -X PATCH \
'https://fs.tokopedia.net/v3/products/fs/13004/edit?shop_id=479573' \
-H 'Authorization: Bearer C-UMqWWXRqaJugr7w5U0zQ' \
-H 'Content-Type: application/json' \
-d '{
"products":[
{
"id":1,
"Name":"Product Testing V3 1.40",
"condition":"NEW",
"Description":"Product Testing Descr V2",
"sku":"TST21",
"price":10000,
"status":"LIMITED",
"stock":900,
"min_order":1,
"category_id":562,
"dimension":{
"height":2,
"width":3,
"length":4
},
"custom_product_logistics":[24,4,64],
"annotations":["1"],
"price_currency":"IDR",
"weight":200,
"weight_unit":"GR",
"is_free_return":false,
"is_must_insurance":false,
"menu":{
"id":1402922
},
"pictures":[
{
"file_path":"https://ecs7.tokopedia.net/img/cache/700/product-1/2017/9/27/5510391/5510391_9968635e-a6f4-446a-84d0-ff3a98a5d4a2.jpg"
}
],
"wholesale":[
{
"min_qty":2,
"price":9500
},
{
"min_qty":3,
"price":9000
}
],
"variant":{
"products":[
{
"is_primary":true,
"status":"LIMITED",
"price":10000,
"stock":500,
"sku":"TST21",
"combination":[
0
],
"pictures":[
{
"file_path":"https://ecs7.tokopedia.net/img/cache/700/product-1/2017/9/27/5510391/5510391_9968635e-a6f4-446a-84d0-ff3a98a5d4a2.jpg"
}
]
},
{
"status":"LIMITED",
"price":10000,
"stock":400,
"sku":"TST21",
"combination":[
1
],
"pictures":[
{
"file_path":"https://ecs7.tokopedia.net/img/cache/700/product-1/2017/9/27/5510391/5510391_9968635e-a6f4-446a-84d0-ff3a98a5d4a2.jpg"
}
]
}
],
"selection":[
{
"id":6,
"unit_id":7,
"options":[
{
"hex_code":"",
"unit_value_id":23,
"value":"XS"
},
{
"hex_code":"",
"unit_value_id":24,
"value":"S"
}
]
}
],
"sizecharts":[
{
"file_path":"https://ecs7.tokopedia.net/img/cache/700/product-1/2017/9/27/5510391/5510391_9968635e-a6f4-446a-84d0-ff3a98a5d4a2.jpg"
}
]
}
}
]
}'

Response Parameters​

NameTypeDemo ValueDescription
total_data
Integer
1
Total Data Count
success_data
Integer
1
Success Data Count
fail_data
Integer
0
Fail Data Count
success_rows_data
Object Array
failed_rows_data
Object Array

Success Response Examples​

{
"header": {
"process_time": 0,
"messages": "Your request has been processed successfully"
},
"data": {
"total_data": 1,
"success_data": 1,
"fail_data": 0,
"success_rows_data": [
{
"product_id": 1,
"product_sku": "TST21"
}
]
}
}

Error Response Examples​

{
"header": {
"process_time": 0,
"messages": "Your request has been processed successfully"
},
"data": {
"total_data": 1,
"success_data": 0,
"fail_data": 1,
"failed_rows_data": [
{
"product_id": 1,
"product_name": "Product Testing V3 1.40",
"product_price": 10000,
"sku": "TST21",
"error": [
"Field [dimension.height] must be filled between 1-2000"
]
}
]
}
}

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
PRD_USC_001
fs_id Is Not Associated With Shop ID or Warehouse ID
fs_id not assosiated, please check again
PRD_USC_028
Product Status Not In Active or Warehouse. Edit Process Canceled
Unable to edit product because the status is not active or warehouse
SHP_GRPC_001
Failed Send GRPC Request
Failed sending request to upstream
SHP_GRPC_003
Data Not Found
Failed finding data from upstream

Notes​

Edit Products V2 and V3 Comparison​

DescriptionV2V3
Execution Flow
Asynchronous. Need to hit endpoint Check Upload Status to get result
Synchronous. Create product result will show at this endpoint, no need to hit additional endpoint Check Upload Status
Payload Request
Just need to pass field that needed to edit into payload request
Same as V2 but user can create product with additional information for product dimension, specification (annotations), and custom product logistics
Maximun Bulk Payload
25
1
JSON Response
Provide upload_id information.
Provide information total data, total success, and total fail. It also provide detail information of success data if succeeded or fail data if failed

Mandatory Fields at Varaint Entity​

User can exclude variant field that no need to edit but there are some field that need to pass into parameter whether the information of this field are not changes. If want to see detail explanation of how to use variant, please refer this link.

Below are the detail of required or optional field at variant entity :

Products​

ParameterTypeRequired
is_primary
Integer
Required for variant that need to be primary product
price
Integer
Required
stock
Integer
Required
sku
String
Required
combination
Integer Array
Required
pictures
Object Array
Required

Selection​

ParameterTypeRequired
id*
Integer
Required
unit_id *
Integer
Required
hex_code*
String
Required
unit_value_id*
Integer
Required
value
String
Required

*The parameter such as id, unit_id and unit_value_id will not required when partners create a custom variant.

Sizecharts​

ParameterTypeRequired
sizecharts
Object Array
Optional
  • Path
  • Request Parameters
  • Example Request
  • Response Parameters
  • Success Response Examples
  • Error Response Examples
  • Error Codes
  • Notes
  • Have a feedback?