Create Vehicle
POST {{base_url}}/vehicles
Description
This API endpoint is used to create a new entry for a vehicle in the system.
Request
Request Headers:
| Name | Description |
|---|---|
| tenantId | (required, header) The tenant ID associated with the request. |
| countryCode | (required, header) The country code associated with the request. |
Request Body Schema (JSON):
{
"driverUserId": "string",
"carrierPhoneNumber": "string",
"licensePlate": "string",
"model": "string",
"manufacturer": "string",
"capacity": "string",
"colour": "string",
"year": "string",
"type": "string",
"imageUrl": "string"
}
Example:
xmlCopy code<vehicleCreationRequest>
<driverUserId>string</driverUserId>
<carrierPhoneNumber>string</carrierPhoneNumber>
<licensePlate>string</licensePlate>
<model>string</model>
<manufacturer>string</manufacturer>
<capacity>string</capacity>
<colour>string</colour>
<year>string</year>
<type>string</type>
<imageUrl>string</imageUrl>
</vehicleCreationRequest>
Responses
Status: 200 OK Description: Vehicle created successfully.
Response Body Schema (JSON):
{
"status": "boolean",
"statusCode": "integer",
"message": "string",
"data": {},
"errors": [
{
"message": "string",
"descriptiveMessage": "string"
}
]
}
Example:
<vehicleCreationResponse>
<status>true</status>
<statusCode>0</statusCode>
<message>string</message>
<data></data>
<errors>
<error>
<message>string</message>
<descriptiveMessage>string</descriptiveMessage>
</error>
</errors>
</vehicleCreationResponse>
400 Bad Request Description: Invalid request.
LANGUAGE
CURL REQUEST
curl --request POST \
--url /vehicles \
--header 'accept: application/json' \
--header 'content-type: application/json'
RESPONSE
Click Try It! to start a request and see the response here!