Send a message about a delivery
POST/truckers/deliveries/msg/:id
This endpoint allows sending messages related to a specific delivery.
Features:
- Supports text and attachments (up to 6 images)
- Automatically records author (name and ID) and timestamp
- Permanently stores messages associated with the delivery
- Validates that the delivery allows messaging (can_message=true)
Use cases:
- Reporting incidents during transport (breakdowns, delays)
- Sending updates about the delivery status
- Sharing photos as proof of loading/unloading
- Communicating changes in schedules or routes
Notes:
- Requires valid JWT authentication
- Only works for deliveries assigned to the carrier
- The authenticated user is automatically recorded as the author
- Images are uploaded via multipart/form-data
- The timestamp is automatically generated on the server (UTC)
Request
Responses
- 200
- 400
- 401
- 404
Message sent successfully
Invalid request
Unauthorized
Not found