Address
List Addresses
GET https://api.stretch.com/api/v1/nav/addreses
Gets all the addresses set by the user and returns it in the same format as represented in the 'create' function.
Response
AddressOut
[{
"lng": 55.296249,
"lat": 25.276,
"zoom": 14,
"isDefault": False,
"name": "Name of address",
"address": "548, floor 5, Cluster G, Tower Al mas, JLT, Dubai, UAE",
"country": "United Arab Emirates",
"state": "Dubai",
"city": "Dubai",
"line1": "Jumeirah Lake Towers",
"line2": "1068, Tower Meadows 2",
"zip": "string",
"details": "string",
"id": "40239aee-d935-419f-85f3-e250ff6f19ab"
},{
"lng": 55.296249,
"lat": 25.276,
"zoom": 14,
"isDefault": False,
"name": "Name of address",
"address": "548, floor 5, Cluster G, Tower Al mas, JLT, Dubai, UAE",
"country": "United Arab Emirates",
"state": "Dubai",
"city": "Dubai",
"line1": "Jumeirah Lake Towers",
"line2": "1068, Tower Meadows 2",
"zip": "string",
"details": "string",
"id": "d3c1ec07-6087-4298-b35a-466a0832bed6"
}]
AddressOut:
lng number
lat number
zoom number
isDefault boolean
name string
name
address string
Address
country string
Country
state string
state
city string
city
line1 string
line1
line2 string
line2
zip string
zip (po box)
details string
notes for address
id string (uuid)
position **
Code sample
Create
POST https://api.stretch.com/api/v1/nav/addreses
Creates an address corresponding to the current user and saves it as the default location if user haven't set any default location.
This function returns:
- The unique id of the location set.
- The position as well as the zoom factor.
- And the default location status.
Response
AddressOut
[{
"lng": 55.296249,
"lat": 25.276,
"zoom": 14,
"isDefault": False,
"name": "Name of address",
"address": "548, floor 5, Cluster G, Tower Al mas, JLT, Dubai, UAE",
"country": "United Arab Emirates",
"state": "Dubai",
"city": "Dubai",
"line1": "Jumeirah Lake Towers",
"line2": "1068, Tower Meadows 2",
"zip": "string",
"details": "string",
"id": "d40b21de-e246-488a-a895-5ef77664e235"
},{
"lng": 55.296249,
"lat": 25.276,
"zoom": 14,
"isDefault": False,
"name": "Name of address",
"address": "548, floor 5, Cluster G, Tower Al mas, JLT, Dubai, UAE",
"country": "United Arab Emirates",
"state": "Dubai",
"city": "Dubai",
"line1": "Jumeirah Lake Towers",
"line2": "1068, Tower Meadows 2",
"zip": "string",
"details": "string",
"id": "640b3be1-bf41-42ea-8e44-773d70851f14"
}]
AddressOut:
lng number
lat number
zoom number
isDefault boolean
name string
name
address string
Address
country string
Country
state string
state
city string
city
line1 string
line1
line2 string
line2
zip string
zip (po box)
details string
notes for address
id string (uuid)
position **
Code sample