Dev Docs
  • Disciple.Tools Technical Documentation
  • Theme Core
    • API - Posts
      • List of Endpoints
      • Fields Format
      • Get Post
      • Create Post
      • Update Post
      • Post Comments
      • Post Activity
      • List Query
      • Global Search
      • Posts in Typeaheads
      • Post-Sharing
      • Get Following
      • Settings
    • API - Other
      • Users
      • Locations
      • Settings
    • Hooks
      • Record Page Hooks
      • API-Hooks
      • Public settings
      • Adding menu navigation links
    • Customization
      • Fields
      • Custom Post Types
      • Post Type Modules
      • Adding Fields and Tiles.
    • Authentication
      • JWT-Authentication-for-the-mobile-app
      • Site-to-Site-Link
      • Easy-Example
    • Permissions
    • Roles and Permissions
    • Database Tables
      • Activity Table
    • Disciple.Tools Translation
    • Revisions
      • v1.0.0-dev-changes
      • v1.0
  • Hosting
    • 404 Errors on new install
    • CRON
    • Hosting on WPEngine
    • Backups
    • Single Site or MultiSite
  • Disciple.Tools Development Setup
    • LocalWP
    • Mobile App Setup
    • Unit Tests
    • Cypress Tests
    • D.T on Docker Setup
    • Gulp - CSS and JS
  • Code Contribution
    • Theme Contribution Guidelines
    • How to Correctly Contribute to the Disciple Tools Repository
    • How to Translate Your Plugin
  • Style Guide
  • Disciple.Tools Code of Conduct
Powered by GitBook
On this page
  • Changes
  • Endpoints
  • Search Locations

Was this helpful?

Edit on Git
  1. Theme Core
  2. API - Other

Locations

PreviousUsersNextSettings

Last updated 3 years ago

Was this helpful?

Changes

Locations appear as the location_grid field on contacts and groups. The old locations field has been removed.

location_grid is a field of type 'location'. It is updated the same way connections are. See for more details

Endpoints

Search Locations

GET

Requires permission: access_{post_type}

Parameters

  • s (string): the string to filter the list to.

  • filter (string): Options: [ 'all' | 'focus' | 'used' ]

    • all: return all geoname locations

    • focus: Anly return the locations included in the selected Mapping Focus

    • used: Only return locations currently used by contacts, groups (and other)

Returns

{
  location_grid: [
   {
     ID : 6255147,
     name: 'Asia',
   },
   { ... location_grid_id 2 ... }
  ], 
  total: 339 // the total number of location_grid_ids matching the search
}
Post Types Fields Format
https://example.com/wp-json/dt/v1/mapping_module/search_location_grid_by_name