POST public-api/contracts/addAssets
This method is used to add assets to a contract that already exists. It provides the contract number and the assets that need to be added. This method takes in a Dictionary of string Lists where the Dictionary key is the Contract Number and the List contas the Asset Tags to add to the contract. Requires Edit Contract permission, enforces Role Site and Asset Type security on the assets being associated. Accepts a maximum of 500 records at a time.
Request Information
URI Parameters
None.
Body Parameters
Dictionary of string [key] and Collection of string [value]Request Formats
application/json
Sample:
{
"sample string 1": [
"sample string 1",
"sample string 2"
],
"sample string 2": [
"sample string 1",
"sample string 2"
]
}
Response Information
Resource Description
WaspResultOfResults| Name | Description | Type | Additional information |
|---|---|---|---|
| Data | Results |
None. |
|
| Messages | Collection of WtResult |
None. |
|
| BatchNumber | integer |
None. |
|
| HasError | boolean |
None. |
|
| HasHttpError | boolean |
None. |
|
| HasMessage | boolean |
None. |
|
| HasSuccessWithMoreDataRemaining | boolean |
None. |
|
| TotalRecordsLongCount | integer |
None. |
Response Formats
application/json
Sample:
{
"Data": {
"ResultList": [
{
"ResultCode": 0,
"Message": "sample string 1",
"HttpStatusCode": 200,
"FieldName": "sample string 2"
},
{
"ResultCode": 0,
"Message": "sample string 1",
"HttpStatusCode": 200,
"FieldName": "sample string 2"
}
],
"SuccessfullResults": 1,
"TotalResults": 2,
"ErrorCount": 0
},
"Messages": [
{
"ResultCode": 0,
"Message": "sample string 1",
"HttpStatusCode": 200,
"FieldName": "sample string 2"
},
{
"ResultCode": 0,
"Message": "sample string 1",
"HttpStatusCode": 200,
"FieldName": "sample string 2"
}
],
"BatchNumber": 1,
"HasError": false,
"HasHttpError": false,
"HasMessage": true,
"HasSuccessWithMoreDataRemaining": false,
"TotalRecordsLongCount": 1
}