POST vehicle/create?Token={Token}
Create vehicle in the system. Application privilege "New" for licensed agenda "Vehicles" required. Application privilege "Edit" for agenda item "Identifiers" of licensed agenda "Vehicles" required.
Request Information
Authorization
- Authorization by token required
Availability
- Method can be used
URI Parameters
| Name | Description | Type | Additional information |
|---|---|---|---|
| Token |
The action is authorized by this token. Token should generated by calling action "POST login". Expiration time of each token is 20 seconds |
globally unique identifier |
Required |
Body Parameters
VehicleCreateReq| Name | Description | Type | Additional information |
|---|---|---|---|
| VehicleLP |
License plate of the vehicle |
string |
Required String length: inclusive between 0 and 100 |
| Type |
Type of the vehicle. {Default value is 0 and the meaning is: 0 - personal; 1 - truck; 2 - motorcycle, 3 - trailer, 4 - other } |
integer |
Matching regular expression pattern: [0,1,2,3,4] |
| Model |
Model name of the vehicle |
string |
Required String length: inclusive between 0 and 100 |
| OrganizationStructure |
The involvement of the vehicle in the organization structure. This is mandatory parameter for non-cloud solution. Do not use for cloud solution. |
string |
None. |
| IdentifierEntryCode |
Entry code of the vehicle |
string |
Matching regular expression pattern: [0-9]+ String length: inclusive between 6 and 6 |
| IdentifierCard1 |
First card identifier of the vehicle |
string |
Matching regular expression pattern: [0-9a-fA-F]+ String length: inclusive between 0 and 20 |
| IdentifierCard2 |
Another card identifier of the vehicle |
string |
Matching regular expression pattern: [0-9a-fA-F]+ String length: inclusive between 0 and 20 |
| Desc |
The description of the vehicle |
string |
String length: inclusive between 0 and 4000 |
| PIN |
PIN code of the vehicle |
string |
Matching regular expression pattern: [0-9]+ String length: inclusive between 4 and 4 |
| UdsCollection |
The collection of available user defined columns of the agenda in the system:
|
Collection of UdsIn |
None. |
Request Formats
application/json
{"VehicleLP":"1AB2345","Type":0,"Model":"Škoda Superb","OrganizationStructure":"Structure - Company - Office 1","IdentifierEntryCode":"693723","IdentifierCard1":"A1B2C3D4E5","IdentifierCard2":"B1C2D3E4F5","Desc":null,"PIN":"1234","UdsCollection":[{"SystemName":"a3s1","Value":"text in column"},{"SystemName":"a3s2","Value":"2022-01-26T05:55:22"},{"SystemName":"a3s3","Value":"1"}]}
application/xml
<Request>
<VehicleLP>1AB2345</VehicleLP>
<Type>0</Type>
<Model>Škoda Superb</Model>
<OrganizationStructure>Structure - Company - Office 1</OrganizationStructure>
<IdentifierEntryCode>693723</IdentifierEntryCode>
<IdentifierCard1>A1B2C3D4E5</IdentifierCard1>
<IdentifierCard2>B1C2D3E4F5</IdentifierCard2>
<PIN>1234</PIN>
<UdsCollection>
<UdsIn>
<SystemName>a3s1</SystemName>
<Value>text in column</Value>
</UdsIn>
<UdsIn>
<SystemName>a3s2</SystemName>
<Value>2022-01-26T05:55:22</Value>
</UdsIn>
<UdsIn>
<SystemName>a3s3</SystemName>
<Value>1</Value>
</UdsIn>
</UdsCollection>
</Request>
Response Information
Response Codes
| Http Code | Error Number | Description |
|---|---|---|
| 200 request succesfully done | 0 | Processed with result: ExecOK |
| 201 request accepted | 1107 | Vehicle created without identifier. Entry code constraint found |
| 201 request accepted | 1108 | Vehicle created without identifier. Card 1 constraint found |
| 201 request accepted | 1109 | Vehicle created without identifier. Card 2 constraint found |
| 400 bad request | 1002 | Entry parameter missing or parameter bindigs failed |
| 401 unauthorized | 1000 | Token {0} not found |
| 401 unauthorized | 1001 | Token {0} already expired |
| 401 unauthorized | 1006 | Ip filter violated for ip client address [{0}] |
| 401 unauthorized | 1007 | Ip filter [{0}] parsing failed |
| 401 unauthorized | 1008 | Request rate policy violated for [{0}] |
| 403 server refuses fo fulfill the request | 1105 | Application privilege New for licensed agenda Vehicles violated for vehicle [{0}] |
| 403 server refuses fo fulfill the request | 2123 | Application privilege Edit for of agenda item Identifiers of licensed agenda Vehicles violated for vehicle [{0}] |
| 403 server refuses fo fulfill the request | 1014 | Uds column saving failed. Issue: [{0}] |
| 403 server refuses fo fulfill the request | 1 | Db operation failed, agenda missing priviliges |
| 403 server refuses fo fulfill the request | 2 | Db operation failed, record missing priviliges |
| 403 server refuses fo fulfill the request | 3 | Db operation failed, Record duplicity |
| 403 server refuses fo fulfill the request | 4 | Db operation failed, already changed by another user |
| 403 server refuses fo fulfill the request | 5 | Db operation failed, already deleted by another user |
| 403 server refuses fo fulfill the request | 6 | Db operation failed, database data consistence violation |
| 403 server refuses fo fulfill the request | 7 | Db operation failed, operation can not be executed because another problems occured |
| 403 server refuses fo fulfill the request | 8 | Db operation failed, licence violation |
| 403 server refuses fo fulfill the request | 1115 | Unique key VehicleLP {0} is not unique |
| 404 required resource does not exist on the server | 1106 | Create Vehicle [{0}] failed |
| 415 unsupported Media Type | The request entity has a media type which the server or resource does not support. Only application/json and application/xml are supported | |
| 500 internal error | Server exception description |
Resource Description
BaseRespOfVehicleCreateReq| Name | Description | Type | Additional information |
|---|---|---|---|
| Result | RequestResult |
None. |
|
| Request | VehicleCreateReq |
None. |
Response Formats
application/json
{"Result":{"Message":"Processed with result: ExecOK","Code":0,"ModelStateErr":null},"Request":{"VehicleLP":"1AB2345","Type":0,"Model":"Škoda Superb","OrganizationStructure":"Structure - Company - Office 1","IdentifierEntryCode":"693723","IdentifierCard1":"A1B2C3D4E5","IdentifierCard2":"B1C2D3E4F5","Desc":null,"PIN":"1234","UdsCollection":[{"SystemName":"a3s1","Value":"text in column"},{"SystemName":"a3s2","Value":"2022-01-26T05:55:22"},{"SystemName":"a3s3","Value":"1"}]}}
application/xml
<Response>
<Result>
<Message>Processed with result: ExecOK</Message>
<Code>0</Code>
</Result>
<Request>
<VehicleLP>1AB2345</VehicleLP>
<Type>0</Type>
<Model>Škoda Superb</Model>
<OrganizationStructure>Structure - Company - Office 1</OrganizationStructure>
<IdentifierEntryCode>693723</IdentifierEntryCode>
<IdentifierCard1>A1B2C3D4E5</IdentifierCard1>
<IdentifierCard2>B1C2D3E4F5</IdentifierCard2>
<PIN>1234</PIN>
<UdsCollection>
<UdsIn>
<SystemName>a3s1</SystemName>
<Value>text in column</Value>
</UdsIn>
<UdsIn>
<SystemName>a3s2</SystemName>
<Value>2022-01-26T05:55:22</Value>
</UdsIn>
<UdsIn>
<SystemName>a3s3</SystemName>
<Value>1</Value>
</UdsIn>
</UdsCollection>
</Request>
</Response>