Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

URL: https://www.commcarehq.org/a/[domain]/api/[version]/location/

Locations can be created using a POST to list the endpoint (as per the link above).

Locations can be filtered by the following attributes as request parameters:

...

The Location API is read-only. Only the GET request method is supported. Following v0.6, both GET and PUT is supported. For applications using v0.5 and below, only GET is supported.

Updating the location is done via a PUT to a “detail” endpoint.

Sample output:

    {
      "created_at": "2023-05-09T16:10:47.225938",
      "domain": "[domain]",
      "external_id": null,
      "id": 1,
      "last_modified": "2023-05-09T16:10:47.225947",
      "latitude": null,
      "location_data": {},
      "location_id": "f373a6837c1243938abfc56618cce88b",
      "location_type": "https://www.commcarehq.org/a/[domain]/api/v0.5/location_type/1/",
      "longitude": null,
      "name": "Namibia",
      "parent": null,
      "resource_uri": "https://www.commcarehq.org/a/[domain]/api/v0.5/location/f373a6837c1243938abfc56618cce88b/",
      "site_code": "namibia"
    }

...