POST api/Relations/PostRelation/{companyId}
Request Information
URI Parameters
| Name | Description | Type | Additional information |
|---|---|---|---|
| companyId | integer |
Required |
Body Parameters
Relation| Name | Description | Type | Additional information |
|---|---|---|---|
| RelationId | integer |
None. |
|
| RelationDescription | string |
Required String length: inclusive between 0 and 50 |
|
| RelationIsInUse | boolean |
None. |
|
| CompanyId | integer |
None. |
|
| ObjectState | ObjectState |
None. |
Request Formats
application/json, text/json
Sample:
{
"relationId": 1,
"relationDescription": "sample string 2",
"relationIsInUse": true,
"companyId": 4,
"objectState": 0
}
application/xml, text/xml
Sample:
<Relation xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Gruo.Core.Models"> <ObjectState xmlns="http://schemas.datacontract.org/2004/07/Gruo.Core.Repository">Unchanged</ObjectState> <CompanyId>4</CompanyId> <RelationDescription>sample string 2</RelationDescription> <RelationId>1</RelationId> <RelationIsInUse>true</RelationIsInUse> </Relation>
application/x-www-form-urlencoded
Sample:
Sample not available.
Response Information
Resource Description
Relation| Name | Description | Type | Additional information |
|---|---|---|---|
| RelationId | integer |
None. |
|
| RelationDescription | string |
Required String length: inclusive between 0 and 50 |
|
| RelationIsInUse | boolean |
None. |
|
| CompanyId | integer |
None. |
|
| ObjectState | ObjectState |
None. |
Response Formats
application/json, text/json
Sample:
{
"relationId": 1,
"relationDescription": "sample string 2",
"relationIsInUse": true,
"companyId": 4,
"objectState": 0
}
application/xml, text/xml
Sample:
<Relation xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Gruo.Core.Models"> <ObjectState xmlns="http://schemas.datacontract.org/2004/07/Gruo.Core.Repository">Unchanged</ObjectState> <CompanyId>4</CompanyId> <RelationDescription>sample string 2</RelationDescription> <RelationId>1</RelationId> <RelationIsInUse>true</RelationIsInUse> </Relation>