Update company information
PUT/truckers/trucker_cia/
Update the authenticated carrier's company information.
Functionality:
- Validates and updates basic data (name, taxId, email, phone)
- Processes the address using Google Maps if provided
- Manages the bank account (stores only the last 4 digits)
- Integration with Stripe for payment processing
- Updates the data in the database
Validations:
- All fields are optional except the authentication token
- The taxId must be valid according to the country
- The email must have a valid format
- The address must be valid in Google Maps
Request Example:
{
  name: Transportes Actualizados S.L.,
  taxId: B87654321,
  email: nuevo@transportes.com,
  phone: +34987654321,
  addressGoogleMaps: {
    formatted_address: Calle Nueva 456, Madrid, España,
    place_id: ChIJ1234567890,
    geometry: {
      location: {
        lat: 40.4168,
        lng: -3.7038
      }
    }
  },
  bank: ES9121000418450200051332
}
Request
Responses
- 200
- 400
- 401
Company Details
Invalid input data. Possible causes:
- Incorrect email format
- Invalid TaxId
- Incomplete Google Maps address
- Invalid bank account number
Unauthorized or company not found. Possible causes:
- Invalid or expired JWT token
- User has no associated company
- Database error