Examples

GET /api/locations
200
{
  "total": 28,
  "subtotal": 28,
  "page": 1,
  "per_page": 20,
  "search": null,
  "sort": {
    "by": "title",
    "order": "DESC"
  },
  "results": [
    {
      "ancestry": null,
      "parent_id": null,
      "parent_name": null,
      "created_at": "2019-11-07 09:01:48 UTC",
      "updated_at": "2019-11-07 09:01:48 UTC",
      "id": 447626470,
      "name": "z",
      "title": "z",
      "description": null
    },
    {
      "ancestry": null,
      "parent_id": null,
      "parent_name": null,
      "created_at": "2019-11-07 09:01:48 UTC",
      "updated_at": "2019-11-07 09:01:48 UTC",
      "id": 447626469,
      "name": "y",
      "title": "y",
      "description": null
    },
    {
      "ancestry": null,
      "parent_id": null,
      "parent_name": null,
      "created_at": "2019-11-07 09:01:48 UTC",
      "updated_at": "2019-11-07 09:01:48 UTC",
      "id": 447626468,
      "name": "x",
      "title": "x",
      "description": null
    },
    {
      "ancestry": null,
      "parent_id": null,
      "parent_name": null,
      "created_at": "2019-11-07 09:01:48 UTC",
      "updated_at": "2019-11-07 09:01:48 UTC",
      "id": 447626467,
      "name": "w",
      "title": "w",
      "description": null
    },
    {
      "ancestry": null,
      "parent_id": null,
      "parent_name": null,
      "created_at": "2019-11-07 09:01:48 UTC",
      "updated_at": "2019-11-07 09:01:48 UTC",
      "id": 447626466,
      "name": "v",
      "title": "v",
      "description": null
    },
    {
      "ancestry": null,
      "parent_id": null,
      "parent_name": null,
      "created_at": "2019-11-07 09:01:48 UTC",
      "updated_at": "2019-11-07 09:01:48 UTC",
      "id": 447626465,
      "name": "u",
      "title": "u",
      "description": null
    },
    {
      "ancestry": null,
      "parent_id": null,
      "parent_name": null,
      "created_at": "2019-11-07 09:01:48 UTC",
      "updated_at": "2019-11-07 09:01:48 UTC",
      "id": 447626464,
      "name": "t",
      "title": "t",
      "description": null
    },
    {
      "ancestry": null,
      "parent_id": null,
      "parent_name": null,
      "created_at": "2019-11-07 09:01:48 UTC",
      "updated_at": "2019-11-07 09:01:48 UTC",
      "id": 447626463,
      "name": "s",
      "title": "s",
      "description": null
    },
    {
      "ancestry": null,
      "parent_id": null,
      "parent_name": null,
      "created_at": "2019-11-07 09:01:48 UTC",
      "updated_at": "2019-11-07 09:01:48 UTC",
      "id": 447626462,
      "name": "r",
      "title": "r",
      "description": null
    },
    {
      "ancestry": null,
      "parent_id": null,
      "parent_name": null,
      "created_at": "2019-11-07 09:01:48 UTC",
      "updated_at": "2019-11-07 09:01:48 UTC",
      "id": 447626461,
      "name": "q",
      "title": "q",
      "description": null
    },
    {
      "ancestry": null,
      "parent_id": null,
      "parent_name": null,
      "created_at": "2019-11-07 09:01:48 UTC",
      "updated_at": "2019-11-07 09:01:48 UTC",
      "id": 447626460,
      "name": "p",
      "title": "p",
      "description": null
    },
    {
      "ancestry": null,
      "parent_id": null,
      "parent_name": null,
      "created_at": "2019-11-07 09:01:48 UTC",
      "updated_at": "2019-11-07 09:01:48 UTC",
      "id": 447626459,
      "name": "o",
      "title": "o",
      "description": null
    },
    {
      "ancestry": null,
      "parent_id": null,
      "parent_name": null,
      "created_at": "2019-11-07 09:01:48 UTC",
      "updated_at": "2019-11-07 09:01:48 UTC",
      "id": 447626458,
      "name": "n",
      "title": "n",
      "description": null
    },
    {
      "ancestry": null,
      "parent_id": null,
      "parent_name": null,
      "created_at": "2019-11-07 09:01:48 UTC",
      "updated_at": "2019-11-07 09:01:48 UTC",
      "id": 447626457,
      "name": "m",
      "title": "m",
      "description": null
    },
    {
      "ancestry": null,
      "parent_id": null,
      "parent_name": null,
      "created_at": "2019-11-07 09:01:45 UTC",
      "updated_at": "2019-11-07 09:01:45 UTC",
      "id": 373111740,
      "name": "Location 2",
      "title": "Location 2",
      "description": null
    },
    {
      "ancestry": null,
      "parent_id": null,
      "parent_name": null,
      "created_at": "2019-11-07 09:01:45 UTC",
      "updated_at": "2019-11-07 09:01:45 UTC",
      "id": 255093256,
      "name": "Location 1",
      "title": "Location 1",
      "description": null
    },
    {
      "ancestry": null,
      "parent_id": null,
      "parent_name": null,
      "created_at": "2019-11-07 09:01:48 UTC",
      "updated_at": "2019-11-07 09:01:48 UTC",
      "id": 447626456,
      "name": "l",
      "title": "l",
      "description": null
    },
    {
      "ancestry": null,
      "parent_id": null,
      "parent_name": null,
      "created_at": "2019-11-07 09:01:48 UTC",
      "updated_at": "2019-11-07 09:01:48 UTC",
      "id": 447626455,
      "name": "k",
      "title": "k",
      "description": null
    },
    {
      "ancestry": null,
      "parent_id": null,
      "parent_name": null,
      "created_at": "2019-11-07 09:01:48 UTC",
      "updated_at": "2019-11-07 09:01:48 UTC",
      "id": 447626454,
      "name": "j",
      "title": "j",
      "description": null
    },
    {
      "ancestry": null,
      "parent_id": null,
      "parent_name": null,
      "created_at": "2019-11-07 09:01:48 UTC",
      "updated_at": "2019-11-07 09:01:48 UTC",
      "id": 447626453,
      "name": "i",
      "title": "i",
      "description": null
    }
  ]
}

Params

Param name Description
location_id
optional

Set the current location context for the request

Validations:

  • Must be a Integer

organization_id
optional

Set the current organization context for the request

Validations:

  • Must be a Integer

search
optional

filter results

Validations:

  • Must be a String

order
optional

Sort field and order, eg. ‘id DESC’

Validations:

  • Must be a String

page
optional

Page number, starting at 1

Validations:

  • Must be a number.

per_page
optional

Number of results per page to return

Validations:

  • Must be a number.