Returns a list of units for a specific commodity and value type
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. |
Path Parameters
| Name | Description | Type | Required |
|---|---|---|---|
| commodityId | The specific commodity ID | integer (int32) | Required |
Query Parameters
| Name | Description | Type | Required |
|---|---|---|---|
| valueType | The unit type to search for. Not required. Valid values are ‘use’, ‘demand’, and ‘cost’. | string | Optional |
Responses
200
OK
The request succeeded and the response body contains the requested data.
Response Body Parameters
Array of:
Unit
| Property | Description | Type | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| unitCode | Must be between 0 and 16 characters | string | ||||||||||||
| unitDisplayName | Must be between 0 and 64 characters | string | ||||||||||||
| unitId | integer (int32) | |||||||||||||
| unitInfo | Must be between 0 and 32 characters | string | ||||||||||||
| unitType | UnitType | |||||||||||||
|
UnitType properties
|
||||||||||||||
Example Response
[
{ "unitCode": "string", "unitDisplayName": "string", "unitId": 1, "unitInfo": "string", "unitType": { "unitTypeCode": "string", "unitTypeId": 1, "unitTypeInfo": "string"
}
}
]