Update company by ID (explicit route /edit)
POST/truckers/trucker_cia/edit/:id
Alternative version of the PUT /{id} endpoint for updating companies. Combines the functionality of POST /edit with PUT /{id}.
Features:
- Uses POST method instead of PUT
- Explicit /edit/{id} route for greater clarity
- Allows updating specific companies by ID
- Requires admin permissions for companies owned by others
Use cases:
- When POST is preferred over PUT due to API conventions
- To maintain consistency with /edit
- In administrative workflows requiring clear routes
Request Example:
{
name: Transportes Edit ID S.L.,
taxId: B66778899,
email: editid@transportes.com,
phone: +3466778899,
addressGoogleMaps: {
formatted_address: Calle Edit 202, Sevilla, España,
place_id: ChIJ6666666666,
geometry: {
location: {
lat: 37.3891,
lng: -5.9845
}
}
},
bank: ES9121000418450200056677
}
Request
Responses
- 200
- 400
- 401
- 404
Company Details
Invalid input data. Possible causes:
- Incorrect email format
- Invalid TaxId
- Incomplete Google Maps address
- Invalid bank account number
Unauthorized. Possible causes:
- Invalid or expired JWT token
- User does not have permission to modify this company
Company not found. Possible causes:
- ID does not exist in the database
- Company was deleted