Create Release Stock

This API is used to release stock to a bundle.

Authorizations : X-API-Key_Header

Request Body Schema : application/json

MethodEndpoint
POST/v3/fulfillment/bundle/{bundle_code}/stock/release

Request Parameters

ParameterTypeMandatory/OptionalNote
merchant_idintegerMandatoryThe ID of the merchant
warehouse_codestringMandatoryThe code of the warehouse
qtyintegerMandatoryThe quantity of the products to release
operatorstringOptionalthe operator for this action

Sample Request

curl --location 'https://fulfillmentapisvc.staging-0.shipper.id/v3/fulfillment/bundle/KEVINDAIPOSTMANBUNDLE01/stock/release' \
--header 'Content-Type: application/json' \
--data '{
    "merchant_id":1089649,
    "warehouse_code":"WH-CGK09",
    "bundle":"KEVINDAIPOSTMANBUNDLE01",
    "qty":3
}'

Response Parameters

ParameterTypeNote
metadataobjectThe metadata information

Sample Response

{
    "metadata": {
        "path": "/v3/fulfillment/bundle/KEVINDAIPOSTMANBUNDLE01/stock/release",
        "status": "OK",
        "message": "POST /v3/fulfillment/bundle/KEVINDAIPOSTMANBUNDLE01/stock/release [200] OK",
        "timestamp": 1682566755,
        "http_status_code": 200
    }
}
{
    "metadata": {
        "path": "/oms/v1/openapi/bundle/KEVINDAIPOSTMANBUNDLE01/stock/release",
        "errors": [
            {
                "code": 603,
                "message": "Bundle [KEVINDAIPOSTMANBUNDLE01] assinged stock is not enough to be released"
            }
        ],
        "timestamp": 1685409955,
        "http_status_code": 400,
        "http_status": "Bad Request"
    }
}
{
    "metadata": {
        "path": "/oms/v1/openapi/bundle/KEVINDAIPOSTMANBUNDLE01/stock/assign",
        "errors": [
            {
                "code": 400,
                "message": "warehouse_code can't be blank"
            }
        ],
        "timestamp": 1685409916,
        "http_status_code": 400,
        "http_status": "Bad Request"
    }
}