Skip to content

Create Contact

corsacca edited this page Feb 19, 2018 · 14 revisions

Contact Creation

In code Create contact funtion

Parameters

create_contact( array $fields = [], $check_permissions = true )

  • fields: an array of fields like name, phone number corresponding to the new contact. More details below.
  • check_permissions: check if the signed in user has the permission to perform this action. By default this should be true, unless this is called by an automated process.

Rest API:

  • url: https://example.com/wp-json/dt/v1/contact/create
  • type: POST
  • data: A JSON string of fields
  • contentType: "application/json; charset=UTF-8",
  • dataType: "json",

Fields

Fields have different types. Each type will need it's own syntax.

  • Text

    • name
  • key_select

    • overall_status
    • seeker_path

The options for each of these can be found in the Contact Post Type page

fields = [
   overall_status => "established"
]

Fields example

$fields = [

]

Developer Documentation

Clone this wiki locally