Create - Addresses
POST/api/address
Request to create an address in the system. This address will automatically be associated with you, and you can use the _id to designate it as the origin/destination of the Auctions when you create them.
Please note that we will need certain data to verify the address, as well as to determine the actual location of the address. In case of doubts or issues, GPS will be used to determine if the address is correct or not.
Request
- application/json
Body
Address latitude
Address longitude
Address phone
Address name
Address company name
Responses
- 200
Example response
- application/json
- Schema
- Example (from schema)
Schema
data object
Shipping / Pickup Addresses. They are necessary for the calculation of costs, routes, and general operation of the platform to be correct. Keep in mind that we will use both GPS coordinates and postal codes to manage and verify that all data is correct; therefore, it is important that they are accurate. In case any data is incorrectly entered, consider that they will be recorded in the contract and all legal documents of the process.
Possible values: non-empty
, Value must match regular expression ^[0-9a-fA-F]{24}$
Internal ID for database usage.
Possible values: non-empty
City of the address
Possible values: non-empty
Name of the destination company. It will be used for data verification.
Possible values: >= 3 characters
and <= 20 characters
https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes
GPS location position
Possible values: non-empty
Name (or nickname) you give to the address for your use
Possible values: non-empty
Complete data
Possible values: non-empty
User's contact phone number
Possible values: non-empty
Province of the address
Possible values: non-empty
Province or Community of the address. In case it's not compatible with the address format, it may remain empty.
Possible values: non-empty
Physical address; street, avenue, etc.
Possible values: non-empty
House number of the address
Possible values: non-empty
Postal code of the address. It will depend on the country for the use of one format or another.
{
"status": 0,
"data": {
"_id": "5d84f846b0f6ba698f544dbf",
"city": "vigo",
"company_name": "ABC Logistics",
"country": "españa",
"location": {
"coordinates": [
-8.7207,
42.2406
],
"type": "Point"
},
"name": "ABC Logistics Vigo",
"name_address": "Aduana, 4, Rúa Concepción Arenal, Santiago de Vigo, Vigo, Pontevedra, Galicia, 36201, España",
"phone": "+34981234567",
"province": "Pontevedra",
"state": "galicia",
"street_address": "Rúa Concepción Arenal",
"street_number": "4",
"zipcode": "36201"
}
}