Skip to main content

Create Bundle

This endpoint is used to create a bundle.

Path​

post

/v1/products/bundle/fs/:fs_id/create

Request Parameters​

ParameterTypeRequiredLocationDescription
fs_id
Integer
Required
path
Fulfillment service unique identifier
shop_id
Integer
Required
query
Shop unique identifier
bundle
Object
Required
body
Bundle object to create

Where bundle object contain:

ParameterTypeRequiredLocationDescription
bundle_name
String
Required
body
Name of the bundle with length less than or equals 15 characters and greater than or equals 3 characters
bundle_type
Integer
Required
body
Type of the bundle where 1 is PAKET DISKON and 2 is BUNDLING , refers to Seller Education
bundle_status
Integer
Required
body
Status of the bundle where `1 is ACTIVE
start_time_unix
Integer
Required
body
Start time of bundle in UNIX format must be greater than the current time
warehouse_id
Integer
Required
body
Warehouse unique identifier
bundle_items
Object Array
Required
body
List of products in this bundle
max_order
Integer
Optional
body
Maximum bundle package in one order
stop_time_unix
Integer
Optional
body
Stop time of bundle in UNIX format must be greater than start time. Set to 0 for making a bundle with no time limit / until product stock is 0
original_quota
Integer
Optional
body
Original quota for bundle

Where bunlde_items object contains:

ParameterTypeRequiredLocationDescription
product_id
Integer
Required
body
Product unique identifier to include in the bundle
status
Integer
Required
body
Status of the product where 1 is SHOWN and 2 is UNSHOWN
bundle_price
Integer
Required
body
The product’s price in this bundle
children
Object Array
Optional
body
The variant of the product. It has product_id and bundle_price
min_order
Integer
Optional
body
Minimum order for this product. Used for PAKET DISKON type bundle.

Example Request​

Creating PAKET DISKON

curl -X POST \
'https://fs.tokopedia.net/v1/products/bundle/fs/99999/create?shop_id=99999' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer c:BwjKmt0MTCyCto2pNz7NFQ' \
--data-raw '{
"bundle": {
"bundle_name": "Paket Murah",
"bundle_type": 1,
"bundle_status": 1,
"max_order": 0,
"start_time_unix": 1633938410,
"stop_time_unix": 0,
"warehouse_id": [
342578
],
"bundle_items": [
{
"product_id": 2147981541,
"status": 1,
"min_order": 3,
"bundle_price": 14000,
"children": []
},
{
"product_id": 2147981541,
"status": 1,
"min_order": 4,
"bundle_price": 13000,
"children": []
}
]
}
}'

Creating PAKET DISKON that has variant

curl -X POST \
'https://fs.tokopedia.net/v1/products/bundle/fs/99999/create?shop_id=99999' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer c:BwjKmt0MTCyCto2pNz7NFQ' \
--data-raw '{
"bundle": {
"bundle_name": "Paket Murah",
"bundle_type": 1,
"bundle_status": 1,
"max_order": 0,
"start_time_unix": 1633938410,
"stop_time_unix": 0,
"warehouse_id": [
342578
],
"bundle_items": [
{
"product_id": 2147981541,
"status": 1,
"min_order": 3,
"bundle_price": 0,
"children": [
{
"variant_id": 2147981542,
"variant_price": 8600
},
{
"variant_id": 2147981543,
"variant_price": 8700
},
]
}
]
}
}'

Response Parameters​

NameTypeDemo ValueDescription
bundle_ids
Integer Array
[5698,5699 ]
List of Bundle Unique Identifier

Success Response Examples​

{
"header": {
"process_time": 0,
"messages": "Your request has been processed successfully"
},
"data": {
"bundle_ids": [
5698,
5699
]
}
}

Error Response Examples​

{
"header": {
"process_time": 0,
"messages": "We could not process your request due to malformed request, please check again",
"reason": "Bundle name is too long or too short, number of allowed characters are minimum [3] and maximum [18]",
"error_code": "BDL_DLV_003"
},
"data": null
}

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_029
Warehouse ID Information Not Found
Failed to get warehouse information
BDL_USC_001
FS ID is not associated with Shop ID or Warehouse ID
fs_id is not associated, please check again
BDL_USC_002
Shop Info not found
Shop information cannot be found
BDL_USC_003
Too many or too few bundle items given for this type of bundle
The number of bundle item is not right for this type of bundle
BDL_USC_004
2 or more same products in bundle
Multiple bundle must consist of minimum two different products
BDL_USC_005
Different products in single bundle
Single bundle only accept same products
BDL_USC_006
Please use different min order for each bundleitem
Please use different min order
BDL_USC_007
Min Order of single type bundle must be greater than 1
Please set the minimum order more than 1
BDL_USC_009
Bundle item price must be lower than its original price
Please set the bundle item price lower than the original price
BDL_USC_010
Bundle item stock cannot be empty
Please add the bundle item stock
BDL_USC_012
One of the product variant is invalid
There is invalid product variant on the bundle
BDL_DLV_001
Invalid request body, please check again
Invalid request body, please check again
BDL_DLV_002
Invalid field %s format, value %v should be %s
Invalid params, please check again
SHP_GRPC_001
Failed Send GRPC Request
Failed sending request to upstream
SHP_GRPC_003
Data Not Found
Failed finding data from upstream

Notes​

If the bundle type is PAKET DISKON, you must provide the same product_id with the different min_order. If the bundle type is MULTIPLE, you must provide other products with a minimum of 2 products and a maximum of 3 products.

When creating PAKET DISKON type bundle, you need to input min_order of the item, with the minimum of 2 for the min_order, and every item needs to have a different min_order.

Paket Diskon

For example the product with ID 2147981541 has price of Rp.15.000. When creating PAKET DISKON if the buyer buy 3 product the price of each item become Rp. 14.000 and if the buyer buy 4 product the price of each item become Rp. 13.000.

Paket Diskon that has variant

For each product variant, the variant_id and variant_price inside children field must be filled with the corresponding variant ID and variant, while the product_id outside children filled with the corresponding product ID.

Have a feedback?