Create Restock Configuration

This API is used to set bundle restock config.

Authorizations : X-API-Key_Header

Request Body Schema Header : application/json

MethodEndpoint
PATCH/v3/fulfillment/bundle/{bundle}/restock

Request Parameters

Parameter

Type

Mandatory/Optional

Note

min_qty

integer

Mandatory

the min qty for restock

target_qty

integer

Mandatory

the target qty for restock

auto_restock

boolean

Mandatory

Yes: will restock to target_qty if the stock is less than min_qty

No: do nothing if the stock is less than min_qty

merchant_id

integer

Mandatory

The ID of the merchant

Request Example

curl --location --request PUT '<https://fulfillmentapisvc.staging-0.shipper.id/v3/fulfillment/bundle/KEVINDAIAPIPOSTMANBUNDLE10/restock'> \
--header 'Content-Type: application/json' \
--data '{
    "status":"Active",
    "merchant_id":1089649
}'

Response Example

{
    "metadata": {
        "path": "/v3/fulfillment/bundle/KEVINDAIAPIPOSTMANBUNDLE10/restock",
        "status": "OK",
        "message": "PUT /v3/fulfillment/bundle/KEVINDAIAPIPOSTMANBUNDLE10/restock [200] OK",
        "timestamp": 1682567030,
        "http_status_code": 200
    }
}
{
    "metadata": {
        "path": "/oms/v1/openapi/bundle/ASSIGN_0409_1920OK11/restock",
        "errors": [
            {
                "code": 603,
                "message": "bundle_code not exits"
            }
        ],
        "timestamp": 1685410125,
        "http_status_code": 400,
        "http_status": "Bad Request"
    }
}
{
    "metadata": {
        "path": "/oms/v1/openapi/bundle/ASSIGN_0409_1920OK/restock",
        "errors": [
            {
                "code": 400,
                "message": "target_qty cannot be null"
            }
        ],
        "timestamp": 1685410145,
        "http_status_code": 400,
        "http_status": "Bad Request"
    }
}
{
    "metadata": {
        "path": "/oms/v1/openapi/bundle/ASSIGN_0409_1920OK/restock",
        "errors": [
            {
                "code": 400,
                "message": "min_qty cannot be null"
            }
        ],
        "timestamp": 1685410158,
        "http_status_code": 400,
        "http_status": "Bad Request"
    }
}
{
    "metadata": {
        "path": "/oms/v1/openapi/bundle/ASSIGN_0409_1920OK/restock",
        "errors": [
            {
                "code": 603,
                "message": "assigned stock do not exit, so can not do restock operation."
            }
        ],
        "timestamp": 1685410175,
        "http_status_code": 400,
        "http_status": "Bad Request"
    }
}