Vehicle Type
The PostAddVehicleType endpoint is responsible for registering a new vehicle type that can be viewed on screen CAD048.
How to register a vehicle type
HTTP POST Request
| Request Type | Example URL |
|---|---|
| POST | {{url_base}}/PostAddVehicleType |
| Example | http://seuIPePorta/datasnap/rest/RESTWebServiceMethods/"PostAddVehicleType" |
Input Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| VehicleTypeNo | String(15) | Yes | External code of the vehicle type |
| Name | String(40) | Yes | Vehicle type description |
| LoadCapacity | Float | No | Load capacity |
| DispatchMinTolerance | Float | No | Minimum tolerance allowed in shipping |
| DispatchMaxTolerance | Float | No | Maximum tolerance allowed in shipping |
| DispatchToleranceCheckType | ToleranceCheckType | No | Enumerator with possible values for shipping tolerance check type: tcWeight (Weight) or tcPercentage (Percentage) |
| OverwriteIfExists | Boolean | No | Flag indicating that data should be overwritten if the record already exists |
Return
| Parameter | Type | Required | Description |
|---|---|---|---|
| WebServiceReturn | WebServiceReturn | Yes | Standard WebService response information in method execution |
| VehicleTypeCode | Integer | Yes | Internal vehicle type code generated in the MIMS system |
Request Example
curl --location 'http://seuIPePorta/datasnap/rest/RESTWebServiceMethods/"PostAddVehicleType"' \
--header 'Content-Type: application/json' \
--data '{
"VehicleTypeNo": "TRK123",
"Name": "Caminhão Teste",
"LoadCapacity": 12000.5,
"DispatchMinTolerance": 5.0,
"DispatchMaxTolerance": 10.0,
"DispatchToleranceCheckType": "tcWeight",
"OverwriteIfExists": true
}'
Response Example
{
"WebServiceReturn": {
"Status": "wrsSuccess",
"ErrorCode": "",
"Message": "",
"Actor": "",
"ReturnQuestion": null
},
"VehicleTypeCode": 101
}
🐞 Possible Errors
| Code | Message |
|---|---|
| AVT‑001 | The provided External Vehicle Type Code parameter (VehicleTypeNo) already exists! |