Request to join/leave group
PUT/truckers/trucker-group/:code
Allows a carrier company to request to join or leave a group (toggle).
Functionality:
- If the company is not in the group and has no pending request, adds a request
- If it already has a pending request, cancels it
- If it is already a member of the group, leaves it
- Returns the updated group details
Authentication required: Carrier company JWT
Usage example:
PUT /truckers/trucker-group/ABC123
Request
Responses
- 200
- 401
- 500
Updated group details after the operation.
Includes the company's new status (member, pending, or unassociated).
Unauthorized or group not found. Possible causes:
- Invalid or expired JWT token
- User is not associated with any carrier company
- No group exists with the provided code
Internal Server Error