Add a Vehicle
POST/vehicles/:plate
Adds a single vehicle to the user.
Request
Path Parameters
Number plate of the vehicle
Header Parameters
Authentication header obtained from POST /authenticate
that identifies the user making this call.
Authentication header obtained from POST /authenticate
that identifies the client making this call.
Authentication header obtained from POST /authenticate
that identifies the user making this call.
- application/json
Body
required
The new vehicle for the user.
Number plate for the vehicle. Uppercase, without spaces (ie 0388VCP
)
The brand of the vehicle (ie Seat
)
The model of the vehicle (ie Ibiza
)
Possible values: [0
, C
, B
, ECO
]
The environmental tag for the vehicle (ie C
)
Default value: ``
List of suppliers with automatic access to register the vehicle. Those that were previously on the list and are not sent will be cancelled.
Responses
- 200
- 400
- 401
- 409
- 500
OK
- application/json
- Schema
- Example (from schema)
Schema
Number plate for the vehicle. Uppercase, without spaces (ie 0388VCP
)
The brand of the vehicle (ie Seat
)
The model of the vehicle (ie Ibiza
)
Possible values: [0
, C
, B
, ECO
]
The environmental tag for the vehicle (ie C
)
Default value: ``
List of suppliers with automatic access to register the vehicle. Those that were previously on the list and are not sent will be cancelled.
{
"plate": "0388VCP",
"brand": "Seat",
"model": "Ibiza",
"tag": "C",
"listProviders": [
"parkia",
"moviltik"
]
}
Bad request (ie. Invalid plate
for vehicle index [0])
Unauthorized (ie. Incorrect or missing x-access-token
)
Conflict (ie. Vehicle belongs to another user)
Internal server Error (ie. Database down)