Back to endpoints

Get locations for an organization

GET api/V3/{language}/org/{orgIdentifier}/locations

?type={type}

&coordinates[0]={coordinates[0]}

&coordinates[1]={coordinates[1]}

&radius={radius}

&keywordId={keywordId}

&showChildrenKeywords={showChildrenKeywords}

&page={page}

&perPage={perPage}

Returns all the locations that have been defined for your organization. You must specify area type and coordinates. You also have the option to specify a radius and an activity keyword id. You can also show children locations that have the given keyword

Request Information

URI Parameters

PARAMETERS
language (string)

Language in which the localizable values should be returned. Part of base url. Value is either 'fr' or 'en'

Required
orgIdentifier (string)

Amilia-specific organization identifier. This identifier can be either the organization number, such as 8008, or the organization URL identifier. You can find that by looking at the URL of your Amilia store. It may look like lower-case words separated by a dash, such as forest-explorers. Note that in v2 and v1 we call that the 'rewrite URL'.

Required
type (string)

Shape of search area: circle (search by Radius), rectangle (search by BoundingBox) or polygon (search by Polygon).

Optional
coordinates (list of doubles)

Pairs of points on a 2D map. Each pair has the format 45.00,73.00. Extra pairs are appended with a comma like so: 45.00,73.00,10.00,10.00. In the search by BoundingBox, the rectangle is defined by its top-left and bottom-right coordinates (so four numbers).In the search by Polygon, the polygon is defined by all its coordinates (an even number of numbers, and more than four numbers). The polygon points must be ordered either clockwise or counterclockwise to prevent the enclosed area from folding over itself and give unexpected results.

Optional
radius (integer)

In the search by Radius, the circle is defined by its radius in km. Default value is null

Optional
keywordId (integer)

Activity keyword id. Default value is null

Optional
showChildrenKeywords (boolean)

Option to also show children locations containing the given keywords

Default value is False

Optional
page (integer)

Result page number that appears first.

Default value is 1

Optional
perPage (integer)

Number of results per page.

Default value is 200

Optional

Body Parameters

None.

Response Information

Resource Description

PARAMETERS
FullName (string)

First and last name with a space in between

Description (string)

Description of the activity that will be visible to your customers in your store

Telephone (string)

Telephone number

TelephoneExtension (string)

Telephone number extension

ParentId (integer)

Id of the location immediately above the location in the hierarchy

TopParentId (integer)

Top parent location id

AncestorIds ()

Ids of all the locations above the location in the hierarchy, at all parent levels

Keywords ()

Object containing the id and name of keywords, which are specific types of activities, such as 'soccer' or 'yoga'

Address (GeoAddressApiModelV3)

Object containing the address (door number, street name, city, state/province, country, zip/postal code, latitude and longitude)

Id (integer)

Resource id

Name (string)

Resource name

Response Formats

CODE SAMPLE JSON
[
  {
    "FullName": "Natatorium de Verdun",
    "Description": "Piscines profonde et moyenne, pataugeoire",
    "Telephone": "514 555 1111",
    "TelephoneExtension": "324",
    "ParentId": 5432,
    "TopParentId": 33,
    "AncestorIds": [
      5432,
      6852,
      33
    ],
    "Keywords": [
      {
        "Id": 34,
        "Name": "Swimming"
      },
      {
        "Id": 41,
        "Name": "Rescue"
      }
    ],
    "Address": {
      "Latitude": 45.72,
      "Longitude": -73.5,
      "Address1": "9000 boul. Lasalle",
      "Address2": "",
      "City": "Montreal",
      "Country": "Canada",
      "StateProvince": "QC",
      "ZipPostalCode": "H4E 1P4"
    },
    "Id": 0,
    "Name": "Natatorium"
  },
  {
    "FullName": "Natatorium de Verdun",
    "Description": "Piscines profonde et moyenne, pataugeoire",
    "Telephone": "514 555 1111",
    "TelephoneExtension": "324",
    "ParentId": 5432,
    "TopParentId": 33,
    "AncestorIds": [
      5432,
      6852,
      33
    ],
    "Keywords": [
      {
        "Id": 34,
        "Name": "Swimming"
      },
      {
        "Id": 41,
        "Name": "Rescue"
      }
    ],
    "Address": {
      "Latitude": 45.72,
      "Longitude": -73.5,
      "Address1": "9000 boul. Lasalle",
      "Address2": "",
      "City": "Montreal",
      "Country": "Canada",
      "StateProvince": "QC",
      "ZipPostalCode": "H4E 1P4"
    },
    "Id": 0,
    "Name": "Natatorium"
  }
]