Model

The address model has the following endpoints:

ActionMethodResourceDescription
Get allGET/users/:user_id/addressesGet all user addresses with user_id.
GetGET/users/user_id/addresses/address_idGet user address with id user_id and address_id.
Create POST/users:user_id/addressesCreate a user address with user_id.
Update PUT/users/user_id/addresses/address_idUpdate user address with id user_id and address_id.
Delete DELETE/users/user_id/addresses/address_idDelete user address with id user_id and address_id.

The address model is composed of the following attributes:

AttributeTypeRequiredDescription
name stringno, required to create.The user's first and/or middle name.
lastname stringno, required to create.The user's last name.
phone stringnoThe user's phone, minimum 7 characteres.
cellphone stringnoThe user's cellphone, minimum 10 characteres.
address stringnoThe user's address.
address_notes stringnoThe user's address notes. (e.g "Second floor")
zipcode stringnoThe user's zip code/postal code.
location stringnoString with json format with the user's position. (e.g. "{"lat": 10.1234, "lng": 20.5678}").
defaultbooleannoIf the address is default or not.
internal_numberstringnoThis number is used to identify more specifically the address, such as house / apartment / room number.
tagstringnois a name identifier of the address

📘

About Name and Phone

This is used to add addresses that are sent to another person and the business or driver can have direct contact with them.