Skip to content

Contacts Settings

corsacca edited this page Apr 18, 2019 · 1 revision

Endpoint

GET https://example.com/wp-json/dt/v1/contacts/settings

Returns

{
  'sources': {}, //the list of sources
  'fields': {}, // the list of contact fields
  'address_types': {},
  'channels': {},
  'connection_types': []
}

What each field might look like

Sources Example

sources: {
    "twitter": "Twitter",
    "web": "Web",
}

Fields Example

fields: {
      "assigned_to": {
            "name": "Assigned To",
            "description": "",
            "type": "user_select",
            "default": "",
            "section": "status"
        },
        "overall_status": {
            "name": "Overall Status",
            "description": "",
            "type": "key_select",
            "default": {
                "new": {
                    "label": "New Contact",
                    "color": "#F43636",
                    "description": "The contact is new in the system"
                },
                "unassignable": {
                    "color": "#FF9800",
                    "label": "Not Ready",
                    "description": "There is not enough information to move forward with the contact at this time."
                },
                "unassigned": {
                    "label": "Dispatch Needed",
                    "color": "#F43636",
                    "description": "This contact needs to be assigned to a multiplier."
                },
                ...
            },
            "section": "status",
            "customizable": "add_only"
        },  
        ...
}

Address_types Example

address_types: {
 {
        "home": {
            "label": "Home"
        },
        "work": {
            "label": "Work"
        },
        "other": {
            "label": "Other"
        }
    }
}

Channels Example

channels: {
        "phone": {
            "label": "Phone",
            "types": {
                "primary": {
                    "label": "Primary"
                },
                "mobile": {
                    "label": "Mobile"
                },
                "work": {
                    "label": "Work"
                },
                "home": {
                    "label": "Home"
                },
                "other": {
                    "label": "Other"
                }
            }
        },
        "email": {
            "label": "Email",
            "types": {
                "primary": {
                    "label": "Primary"
                },
                "work": {
                    "label": "Work"
                },
                "other": {
                    "label": "Other"
                }
            }
        },
        ...
}

Connection Types

connection_types: [
        "locations",
        "groups",
        "people_groups",
        "baptized_by",
        "baptized",
        "coached_by",
        "coaching",
        "subassigned",
        "relation"
    ]

Developer Documentation

Clone this wiki locally