Fields Format

Fields have different types. Each type will need it's own syntax. The list of fields will changed based on your D.T instance. For a list of available fields have a look at: the field explorer tool under Utilities in your wp-admin.

Note: For creation and update endpoints, the do_not_overwrite_existing_fields parameter prevents overwriting existing field values. See the Create Post and Update Post documentation for details.

text

Field examples:

  • title

fields = [
  "title" => "John Doe"
]

boolean

Field examples:

  • update_required

fields = [
   "update_required" => true
]

key_select

Field examples:

  • overall_status

  • seeker_path

The key is used to set save the field instead of the value.

multi_select

Field examples:

  • sources

  • milestones

Field examples:

  • none as yet

tags

Field examples:

  • tags

Functions just like multi_select, but without requiring a pre-defined list of values.

communication_channel

  • contact_phone

  • contact_email

  • contact_address

  • contact_facebook

  • etc

Note: The field name must start with contact_

There are three actions you can take:

  • Create, if you don't include a key, a new field will be created

  • Update, include the key and value to update

  • Delete, including the key and the delete flag will remove the Phone number

To change a detail on a contact method:

If either Mapbox or Google Geocode APIs are available, the contact_address field can also be instructed to support the auto-geolocating of manually entered addresses, with the use of a geolocate boolean flag.

date

  • baptism_date

Can be either a date string or a numeric timestamp.

datetime

  • meeting_time

Can be either a date string or a numeric timestamp.

If sent as a date string, care must be taken with timezones etc.

If a timezone isn't sent in the time string, the timezone will be assumed, so it is recommended to include the timezone information in the date string to get a precise timestamp.

Use the time formats on here PHP DateTime Formats for the timestring format

user_select

  • assigned_to //int, a user id

number

  • quick_button_no_answer

  • quick_button_contact_established

  • quick_button_meeting_scheduled

  • quick_button_meeting_complete

  • quick_button_no_show

If the number is greater than the max_option or less than the min_option for this field, an error will be returned

location_grid

  • location_grid

location_grid_meta (Mapbox)

  • location_grid_meta

You can submit geolocation information to the API using the Mapbox service in three ways.

(1) Submit using a known grid_id

(2) Submit using longitude, latitude, location label, and location level information

(3) Submit using just longitude and latitude

Submitting location_grid_meta will trigger the mapping service to geocode the information to the location grid and install records in the correct tables. This allows for more advanced location storage and mapping.

connection

  • groups

  • people_groups

  • baptized_by

  • baptized

  • coaching

  • coached_by

  • subassigned

  • relation

Let's say our contact is connected to groups with IDs 1, 3 and 43. This example will add the group with ID 1 and will remove the group with ID 43. The contact will then be connected to group 1 and 3

This example will remove groups 1 and 3 and leave the contact connected to group 5:

connection meta

Add meta data when creating or updating a connection value. Here we add the role and date meta to the group member.

Use the same syntax for creating or updating a connection. To delete a connection meta send an empty string:

Creating a post from a connection field

Example: Cantact A baptized someone (not yet a contact in the system). We can use the additional_meta parameter to create the new contact and set the baptized_by field by passing in the baptized connection field key. When creating the new contact, the API with translate baptized to baptized_by and set the new contact to be baptized by Contact A.

post_user_meta

Meta for a post for a specific user. This meta is only accessible by the user who created it and is stored in its own table.

  • reminders

Fields example together

Last updated

Was this helpful?