Creates a collection
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. |
Request Body
CollectionRequest
| Property | Description | Type | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| collectionCode | The collection code Required Must be between 0 and 32 characters | string | |||||||||
| collectionIcon | Icon | ||||||||||
|
Icon properties
|
|||||||||||
| collectionInfo | The collection info Required Must be between 0 and 50 characters | string | |||||||||
| note | The collection note Must be between 0 and 255 characters | string | |||||||||
| parentCollectionId | The identifier for the parent of the collection. The parent is the collection directly above the current collection on the collections and emission sources tree Required | integer (int32) | |||||||||
Example Request Body
{ "collectionCode": "string", "collectionIcon": { "code": "string", "color": "string"
}, "collectionInfo": "string", "note": "string", "parentCollectionId": 1
}
Responses
200
OK
The request succeeded and the response body contains the requested data.
Response Body Parameters
CollectionResponse
| Property | Description | Type | ||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| collectionCode | The collection code | string | ||||||||||||||||||||||||||||||||||||||||||||||||
| collectionIcon | Icon | |||||||||||||||||||||||||||||||||||||||||||||||||
|
Icon properties
|
||||||||||||||||||||||||||||||||||||||||||||||||||
| collectionId | The collection identifier | integer (int32) | ||||||||||||||||||||||||||||||||||||||||||||||||
| collectionInfo | The collection info | string | ||||||||||||||||||||||||||||||||||||||||||||||||
| collections | An array of child collections | CollectionChild[] | ||||||||||||||||||||||||||||||||||||||||||||||||
|
CollectionChild properties
|
||||||||||||||||||||||||||||||||||||||||||||||||||
| emissionSources | An array of child emission sources | CollectionEmissionSourceChild[] | ||||||||||||||||||||||||||||||||||||||||||||||||
|
CollectionEmissionSourceChild properties
|
||||||||||||||||||||||||||||||||||||||||||||||||||
| note | The collection description | string | ||||||||||||||||||||||||||||||||||||||||||||||||
| parent | CollectionChild | |||||||||||||||||||||||||||||||||||||||||||||||||
|
CollectionChild properties
|
||||||||||||||||||||||||||||||||||||||||||||||||||
Example Response
{ "collectionCode": "string", "collectionIcon": { "code": "string", "color": "string"
}, "collectionId": 1, "collectionInfo": "string", "collections": [
{ "collectionCode": "string", "collectionIcon": { "code": "string", "color": "string"
}, "collectionId": 1, "collectionInfo": "string"
}
], "emissionSources": [
{ "active": false, "commodity": { "commodityCode": "string", "commodityIcon": {}, "commodityId": 1, "commodityInfo": "string"
}, "emissionSourceCode": "string", "emissionSourceId": 1, "emissionSourceInfo": "string"
}
], "note": "string", "parent": { "collectionCode": "string", "collectionIcon": { "code": "string", "color": "string"
}, "collectionId": 1, "collectionInfo": "string"
}
}