Get carrier company details
GET/truckers/trucker_cia/
Retrieves the complete company details of the authenticated carrier.
Functionality:
- Queries the database to find the company associated with the authenticated user
- Retrieves basic information such as name, taxId, email, phone
- Includes complete address with geographic coordinates
- Provides the last 4 digits of the bank account if it exists
Use Cases:
- Display company profile on the dashboard
- Pre-fill edit forms
- Verify bank information
Example of a successful response:
{
_id: 507f1f77bcf86cd799439011,
name: Transportes Ejemplo S.L.,
taxId: B12345678,
email: contacto@transportesejemplo.com,
phone: +34911234567,
address: {
street: Calle Ejemplo 123,
city: Madrid,
state: Madrid,
postalCode: 28001,
country: España,
coordinates: [40.4168, -3.7038]
},
bank: ****1234,
createdAt: 2023-01-01T00:00:00.000Z,
updatedAt: 2023-01-01T00:00:00.000Z
}
Responses
- 200
- 401
Company Details
Unauthorized or company not found.
Possible causes:
- Invalid or expired JWT token
- User has no associated company
- Database error