- Introduction
- Getting Started
- Authentication
- Error Handling
- Contact Support
- Modaltrans API
- Get Auth Token
- Accounting
- Customs
- Logistics
- Depot
- Fleet Management
- Drivers
- Vehicles
- Gps Service Controller
- Service Logs
- Periodic Documents
- CRM
- Timelines
- S3 Files
- Notifications
- User Details
Create a Service Log
Developing
Testing Env
https://demo.modaltrans.com
Testing Env
https://demo.modaltrans.com
POST
/api/v1/servicelogs
Request
Authorization
Provide your bearer token in the
Authorization
header when making requests to protected resources.Example:
Authorization: Bearer ********************
Body Params application/json
servicelog
object
required
service_date
string <date>
required
vehicle_code
string
required
damage_type
enum<string>
optional
Allowed values:
Tire BreakdownEngine FailureElectronic FailureOther Failure
notes
string
optional
base64_image
string
optional
Example
{
"servicelog": {
"service_date": "2024-08-14",
"vehicle_code": "L23EXM07",
"damage_type": "Electronic Failure",
"notes": "ApiExample"
},
"base64_image": "Base64EncodedFileExample"
}
Request samples
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://demo.modaltrans.com/api/v1/servicelogs' \
--header 'Content-Type: application/json' \
--data-raw '{
"servicelog": {
"service_date": "2024-08-14",
"vehicle_code": "L23EXM07",
"damage_type": "Electronic Failure",
"notes": "ApiExample"
},
"base64_image": "Base64EncodedFileExample"
}'
Responses
🟢201Created
application/json
Body
Service logs for vehicles
array of:
uuid
string <uuid>
required
notes
string
required
damage_type
enum<string>
required
Allowed values:
Tire BreakdownEngine FailureElectronic FailureOther Failure
vehicle_code
string
required
service_date
string <date>
required
Example
[
{
"uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
"notes": "string",
"damage_type": "Tire Breakdown",
"vehicle_code": "string",
"service_date": "2019-08-24"
}
]
🟠400Bad Request
🟠403Forbidden
🟠404Record Not Found
Modified at 2024-08-29 12:08:34