POST api/v2/Users/{id}/Vehicles
Add single Vehicle value to Person
Request Information
URI Parameters
| Name | Description | Type | Additional information |
|---|---|---|---|
| id |
User Id |
globally unique identifier |
Required |
Body Parameters
PersonAddVehicleViewModel| Name | Description | Type | Additional information |
|---|---|---|---|
| PersonId |
Required: Represents Person Id of the Vehicle |
globally unique identifier |
None. |
| sRegionId |
Required: Represents sRegionId of the Vehicle |
globally unique identifier |
None. |
| Description |
Required: Represents Description of the Vehicle |
string |
None. |
| Year |
Optional: Represents Year of manufacturing of the Vehicle |
string |
None. |
| Make |
Optional: Represents Make of the Vehicle |
string |
None. |
| Model |
Optional: Represents Model of the Vehicle |
string |
None. |
| Color |
Optional: Represents color of the Vehicle |
string |
None. |
| PlateNumber |
Required: Represents Plate Number of the Vehicle |
string |
None. |
| sVehicleTypeId |
Required: Represents sVehicleTypeId of the Vehicle |
globally unique identifier |
None. |
Request Formats
application/json, text/json
Sample:
{
"PersonId": "51005d5b-a446-478f-8f1e-d41ddef9e97f",
"sRegionId": "29940bbd-70bf-4f1e-bf55-7f6ab81df217",
"Description": "sample string 3",
"Year": "sample string 4",
"Make": "sample string 5",
"Model": "sample string 6",
"Color": "sample string 7",
"PlateNumber": "sample string 8",
"sVehicleTypeId": "13d963dd-a9fd-486c-8e2d-e34bb827edf5"
}
application/xml, text/xml
Sample:
<PersonAddVehicleViewModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/APIWebRole.Controllers"> <Color>sample string 7</Color> <Description>sample string 3</Description> <Make>sample string 5</Make> <Model>sample string 6</Model> <PersonId>51005d5b-a446-478f-8f1e-d41ddef9e97f</PersonId> <PlateNumber>sample string 8</PlateNumber> <Year>sample string 4</Year> <sRegionId>29940bbd-70bf-4f1e-bf55-7f6ab81df217</sRegionId> <sVehicleTypeId>13d963dd-a9fd-486c-8e2d-e34bb827edf5</sVehicleTypeId> </PersonAddVehicleViewModel>
application/x-www-form-urlencoded
Sample:
Sample not available.
Response Information
Resource Description
ResultWithGuid| Name | Description | Type | Additional information |
|---|---|---|---|
| Value |
Represents the PK value that was created as a result of an add |
globally unique identifier |
None. |
| ResultCode |
Represents the result code |
integer |
None. |
| Description |
Represents a description of the result code |
string |
None. |
Response Formats
application/json, text/json
Sample:
{
"Value": "88677e95-f1c0-42a7-bcc6-30a39bcde5a2",
"ResultCode": 2,
"Description": "sample string 3"
}
application/xml, text/xml
Sample:
<ResultWithGuid xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/APIWebRole.Controllers"> <Description>sample string 3</Description> <HttpStatusCode>Continue</HttpStatusCode> <ResultCode>2</ResultCode> <Value>88677e95-f1c0-42a7-bcc6-30a39bcde5a2</Value> </ResultWithGuid>