Edits a commodity category
Request Headers
| Header | Value | Required | Description |
|---|---|---|---|
| ECI-ApiKey | string | Yes | Your API key. See Authentication. |
| Content-Type | application/json | Yes | All requests must specify JSON content type, including the request body. |
Path Parameters
| Name | Description | Type | Required |
|---|---|---|---|
| commodityCategoryId | The commodity category identifier | integer (int32) | Required |
Request Body
CommodityCategoryRequest
| Property | Description | Type |
|---|---|---|
| commodityCategoryInfo | The commodity category info Required Must be between 0 and 32 characters | string |
| commonDemandUnitId | The default demand unit for this category | integer (int32) |
| commonUseUnitId | The default use unit for this category | integer (int32) |
Example Request Body
{ "commodityCategoryInfo": "string", "commonDemandUnitId": 1, "commonUseUnitId": 1
}
Responses
200
OK
The request succeeded and the response body contains the requested data.
Response Body Parameters
CommodityCategoryResponse
| Property | Description | Type | |||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| commodities | List of commodities under the category | CommodityChild[] | |||||||||||||||||||||||||||
|
CommodityChild properties
|
|||||||||||||||||||||||||||||
| commodityCategoryId | The commodity category id | integer (int32) | |||||||||||||||||||||||||||
| commodityCategoryInfo | The commodity category info | string | |||||||||||||||||||||||||||
| commonDemandUnit | UnitChild | ||||||||||||||||||||||||||||
|
UnitChild properties
|
|||||||||||||||||||||||||||||
| commonUseUnit | UnitChild | ||||||||||||||||||||||||||||
|
UnitChild properties
|
|||||||||||||||||||||||||||||
Example Response
{ "commodities": [
{ "commodityCode": "string", "commodityIcon": { "code": "string", "color": "string"
}, "commodityId": 1, "commodityInfo": "string"
}
], "commodityCategoryId": 1, "commodityCategoryInfo": "string", "commonDemandUnit": { "unitCode": "string", "unitId": 1, "unitInfo": "string"
}, "commonUseUnit": { "unitCode": "string", "unitId": 1, "unitInfo": "string"
}
}