Skip to main content

Increment Decrement

This endpoint used for incrementing and decrementing product stock.

Path

post

/inventory/v1/fs/:fs_id/stock/incrementdecrement

Request Parameters

ParameterTypeRequiredLocationNotes
fs_id
Integer
Required
path
Fulfillment service id
shop_id
Integer
Required
query
Shop ID, owner of the product
warehouse_id
Integer
Required
query
Warehouse ID, where the increment decrement address to
request_id
String
Required
query
Request ID, unique ID generated by WMS for preventing duplicated request to the API
action
Integer
Required
query
Type of the stock changes.
product_id
Integer
Required
body
Product ID (maximum 20 product_id per request)
sku
String
Optional
body
Code in WMS for identifying the given product
stock_change
Integer
Required
body
numbers of increment/decrement
use_case
Integer
Required
body
Type of use_case this changes applies to
notes
String
Optional
body
Additional notes from WMS
ref_num
String
Required
body
Ref_num for the event in WMS (for_ex: ASN code generated by WMS system). Purpose: during the reconciliation process, this ref_num is vital for identifying if there is not recorded transaction in tokopedia’s increment/decrement process
changes_timestamp
String
Required
body
Timestamp when the changes takes place Purpose: If partner’s retry mechanism takes place, tokopedia should be able to define if the changes should be applied or not (if tokopedia already has the auto adjust mechanism when discrepancy occurs)
wsn_id
Integer
Optional
body
WSN ID for decrement action
is_qty_final
Boolean
Optional
body
A flag that indicates this is the final increment/decrement request for the specified WSN ID Mandatory if WSN/ASN request
asn_id
Integer
Optional
body
ASN ID, for increment only (update ASN status to prepare live(450) and increment putaway_qty if asn_id is specified)

Example Request

curl -X POST \
'https://fs.tokopedia.net/inventory/v1/fs/:fs_id/stock/incrementdecrement?
shop_id=:shop_id&warehouse_id=1&request_id=12345-6789-123&action=1' \
-H 'Authorization: Bearer C-UMqWWXRqaJugr7w5U0zQ' \
-H 'Content-Type: application/json' \
-d '[
{
"product_id": 446082276,
"sku": "VLNP003-007",
"stock_change": 10,
"use_case": 200,
"notes": "Inbound BBW",
"ref_num": "ASNBBW/20200615/JAKARTA/12345678",
"changes_timestamp": "2020-06-18"
}
]'

Response Parameters

Success Response Examples

{
"header": {
"process_time": 1950.2109079999998,
"messages": "Your request has been processed successfully"
},
"data": {
"failed_rows": 1,
"failed_rows_data": [{
"product_id": 446082276,
"sku": "VLNP003-007",
"warehouse_id": 1,
"use_case": 200,
"notes": "Inbound BBW",
"ref_num": "ASNBBW/20200615/JAKARTA/12345678",
"reason": "SYSTEM_ERROR"
}],
"succeed_rows": 0
}
}

Error Response Examples

{
"header": {
"process_time": 102.105345,
"messages": "We had a problem with our server. Try again later.",
"reason": "",
"error_code": 0
},
"data": null
}

Error Codes

Notes

Maximum JSON body length is 20

Action

Action NameCode
Increment
1
Decrement
2

Use Case

Use Case NameCode
Inbound
200
Re-Inbound
210
Inbound Without Activating Product
215
Increment Bundling Adjustment
225
Other Inbound
230
Withdrawal
300
Damaged
310
Inventory Loss
320
After sales
330
Other Outbound
340
Order Bundling
350
Decrement Bundling Adjustment
355
Expired Product
360

Have a feedback?