Create new address
POST/truckers/address/
Create a new address associated with the authenticated carrier.
Validations:
- The address name must be unique for the carrier
- All required fields must be present
- The JWT must correspond to a valid carrier
Required fields:
- name: Descriptive name for the address
- street: Street and number
- city: City
- state: State/province
- country: Country
- postalCode: Postal code
Request example:
{
name: Head Office,
street: Calle Mayor 10,
city: Madrid,
state: Madrid,
country: Spain,
postalCode: 28013,
location: {
lat: 40.4168,
lng: -3.7038
}
}
Request
Responses
- 200
- 403
Successful response containing the complete data of an address. Includes all fields from the Address schema.
Response Headers
Authorization or validation error. Occurs when the user lacks permissions or the data is invalid.