PUT /api/v202306/collection/{collectionId}

Edits a collection

EditCollectionV202306 Permissions: Collections (Edit)

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
collectionId The identifier for the collection being edited integer (int32) Required

Request Body

CollectionRequest
Property Description Type
collectionCode The collection code Required Must be between 0 and 32 characters string
collectionIcon Icon
Icon properties
Property Description Type
code The icon code Must be between 0 and 64 characters Required when Color is set string
color The icon color Must be between 0 and 32 characters Required when Code is set string
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 application/json
{  "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
Property Description Type
code The icon code Must be between 0 and 64 characters Required when Color is set string
color The icon color Must be between 0 and 32 characters Required when Code is set string
collectionId The collection identifier integer (int32)
collectionInfo The collection info string
collections An array of child collections CollectionChild[]
CollectionChild properties
Property Description Type
collectionCode The collection code string
collectionIcon Icon
Icon properties
Property Description Type
code The icon code Must be between 0 and 64 characters Required when Color is set string
color The icon color Must be between 0 and 32 characters Required when Code is set string
collectionId The collection identifier integer (int32)
collectionInfo The collection info string
emissionSources An array of child emission sources CollectionEmissionSourceChild[]
CollectionEmissionSourceChild properties
Property Description Type
active Whether the emission source is active or not boolean
commodity CommodityChild
CommodityChild properties
Property Description Type
commodityCode The commodity code Required (defined) string
commodityIcon Icon
Icon properties
Property Description Type
code The icon code Must be between 0 and 64 characters Required when Color is set string
color The icon color Must be between 0 and 32 characters Required when Code is set string
commodityId The commodity identifier Required (defined) integer (int32)
commodityInfo The commodity info Required (defined) string
emissionSourceCode The emission source code string
emissionSourceId The emission source identifier integer (int32)
emissionSourceInfo The emission source info string
note The collection description string
parent CollectionChild
CollectionChild properties
Property Description Type
collectionCode The collection code string
collectionIcon Icon
Icon properties
Property Description Type
code The icon code Must be between 0 and 64 characters Required when Color is set string
color The icon color Must be between 0 and 32 characters Required when Code is set string
collectionId The collection identifier integer (int32)
collectionInfo The collection info string
Example Response application/json
{  "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"
  }
}