Create new group
POST/truckers/trucker-group/
Create a new carrier group or return the existing one if there is already one with the same name.
Functionality:
- Automatically generates a unique code for the group
- Automatically associates the creating company as the first member
- Allows uploading an image for the group (optional)
- If a group with the same name already exists, it is returned instead of creating a new one
Authentication required: Carrier company JWT
Usage example:
POST /truckers/trucker-group
Content-Type: multipart/form-data
name=Transportistas+Logística&description=Grupo+para+transportistas+especializados+en+logística
Request
Responses
- 200
- 400
- 401
- 500
Group successfully created or existing group with the same name.
Includes complete group details.
Invalid request.
Possible causes:
- Missing required 'name' field
Unauthorized or company not found.
Possible causes:
- Invalid or expired JWT token
- The user is not associated with any carrier company
Internal Server Error