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
  • Returns
  • Return Example

Was this helpful?

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

Get Post

PreviousFields FormatNextCreate Post

Last updated 1 month ago

Was this helpful?

GET

Requires permission: access_{post_type}

Returns

(json object): the contact. Each field type will show in a different way:

  • "ID"

  • "name":"John Doe",

  • "created_date":"2018-06-05 16:07:16",

  • "last_modified":"1552987784", //date the contact has last been modified

  • text fields

"field_key": "text"
  • multi_select fields

    "field_key": [ 
      "option_key", 
      "option_key",
      ... 
    ]
  • key_select fields

    "field_key": {
     "key":"option_key",
     "label":"option_label"
    },
  • connection fields

    "field_key": [ 
     { 
         "ID":{post_id},
         "post_type":"{post_type}",
         "post_date_gmt":"2018-05-29 13:12:01",
         "post_date":"2018-05-29 13:12:01",
         "post_title":"{post_title}"
     },
     ...
    ]
  • date fields

    "field_key": {
      timestamp: "1552953600",  //unix timestamp and the date
      formatted: "March 19, 2019" // date formatted base on selected date format in WP settings
    }

Return Example

{
"ID":72,
"title":"Mojiz Chra\u00efbi",
"created_date":"2018-06-05 16:07:16",
"last_modified":"1552987784",
"geonames":[
    {"id":123456,"label":"World"}
],
"groups":[
    {"ID":83,"post_type":"groups","post_date_gmt":"2018-07-02 15:05:53","post_date":"2018-07-02 15:05:53","post_title":"Local Christian Church"}
],
"people_groups":[],
"baptized":[
    {"ID":105,"post_type":"contacts","post_date_gmt":"2018-07-17 14:54:35","post_date":"2018-07-17 14:54:35","post_title":"Jessica Blue"}
],
"baptized_by":[],
"coaching":[],
"coached_by":[],
"subassigned":[],
"relation":[],
"seeker_path":{"key":"none","label":"Contact Attempt Needed"},

"type":{"key":"media","label":"Media"},
"assigned_to":{"id":"8","type":"user","display":"Anthony Palacio (multiplier)","assigned-to":"user-8"},
"overall_status":{"key":"assigned","label":"Waiting to be accepted"},
"contact_phone":[
    {"verified":false,"value":"555-5555","key":"contact_phone_ca2"}
],
"contact_email":[
    {"verified":false,"value":"","key":"contact_email_313"}
],
"sources":["facebook"],
"accepted":false,
"gender":{"key":"male","label":"Male"},
"age":{"key":"<19","label":"Under 18 years old"},
"milestones":[
    "milestone_has_bible",
    "milestone_can_share",
    "milestone_reading_bible"
],
"baptism_generation":"0",
"baptism_date": {"timestamp": "1552953600", "formatted": "March 19, 2019"}
}
https://example.com/wp-json/dt-posts/v2/{post_type}/{post_id}/