Skip to main content

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 TypeExample URL
POST{{url_base}}/PostAddVehicleType
Examplehttp://seuIPePorta/datasnap/rest/RESTWebServiceMethods/"PostAddVehicleType"

Input Parameters​

ParameterTypeRequiredDescription
VehicleTypeNoString(15)YesExternal code of the vehicle type
NameString(40)YesVehicle type description
LoadCapacityFloatNoLoad capacity
DispatchMinToleranceFloatNoMinimum tolerance allowed in shipping
DispatchMaxToleranceFloatNoMaximum tolerance allowed in shipping
DispatchToleranceCheckTypeToleranceCheckTypeNoEnumerator with possible values for shipping tolerance check type: tcWeight (Weight) or tcPercentage (Percentage)
OverwriteIfExistsBooleanNoFlag indicating that data should be overwritten if the record already exists

Return​

ParameterTypeRequiredDescription
WebServiceReturnWebServiceReturnYesStandard WebService response information in method execution
VehicleTypeCodeIntegerYesInternal 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​

CodeMessage
AVT‑001The provided External Vehicle Type Code parameter (VehicleTypeNo) already exists!