Create Assign Stock (⛔ DEPRECATED)

This endpoint is deprecated and no longer supported.

This API is used to assign stock to a bundle.

Authorizations : X-API-Key_Header

Request Body Schema : application/json

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

Request Parameters

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

Request Example

curl --location 'https://omsproductsvc.staging-0.shipper.id/oms/v1/openapi/bundle/KEVINDAIPOSTMANBUNDLE01/stock/assign' \
--header 'Content-Type: application/json' \
--data '{
    "merchant_id":1089649,
    "warehouse_code":"WH-CGK09",
    "bundle":"KEVINDAIPOSTMANBUNDLE01",
    "qty":4
}'

Response Parameters

ParameterTypeDescription
metadataobjectmetadata information

Sample Response

{
  "metadata": {
    "path": "/v3/fulfillment/bundle/:bundle/stock/assign?%3Abundle=%3Abundle&",
    "http_status_code": 503,
    "http_status": "Service Unavailable",
    "errors": [
      {
        "code": 811,
        "message": "Service is unavailable."
      }
    ],
    "timestamp": 1753933454
  }
}
{
    "metadata": {
        "path": "/v3/fulfillment/bundle/KEVINDAIPOSTMANBUNDLE01/stock/assign",
        "status": "OK",
        "message": "POST /v3/fulfillment/bundle/KEVINDAIPOSTMANBUNDLE01/stock/assign [200] OK",
        "timestamp": 1682566755,
        "http_status_code": 200
    }
}
{
    "metadata": {
        "path": "/v3/fulfillment/bundle/KEVINDAIAPIPOSTMANBUNDLE101/stock/assign?%3Abundle=KEVINDAIAPIPOSTMANBUNDLE101&",
        "http_status_code": 400,
        "http_status": "Bad Request",
        "errors": [
            {
                "code": 810,
                "message": "Bundle [KEVINDAIAPIPOSTMANBUNDLE101] not found"
            }
        ],
        "timestamp": 1685409391
    }
}
{
    "metadata": {
        "path": "/oms/v1/openapi/bundle/KEVINDAIPOSTMANBUNDLE01/stock/assign",
        "errors": [
            {
                "code": 603,
                "message": "Individual SKU stock is not enough to be assigned to bundle"
            }
        ],
        "timestamp": 1685409899,
        "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"
    }
}