POST /contacts Deprecated

Get or Create a Contact

(Deprecated - Use Get Contact (to check if it exists) and Post Contacts Create (to create it) instead) This endpoint allows you retrieve an existing contact or create it if does not exist. It will try to find the contact and return it, otherwise it will create the contact and then return it.

Operation ID: checkContact
lock This endpoint requires a Bearer token in the Authorization header.

Request Body

Content-Type: application/json

name string

The name of the Contact

Example: John Doe

email string

The email of the Contact

Example: foo@bar.com

phone string

The phone number of the Contact

Example: 123456789

cellphone string

The cellphone number of the Contact

Example: 123456789

language string

The language of the Contact

Example: pt_br

direct_permissions object

Permissions for the contact in Direct (If has_access is set to true)

default_permissions boolean

Indicate if the contact has the default permissions on Direct

Example: 1

preventive boolean

Indicate if the contact has the permissions to view Preventive Maintenance (Planned Job Orders) on Direct

Example: 1

failure boolean

Indicate if the contact has the permissions to view Corrective Maintenance (Work Orders) on Direct

Example: 1

failure_type string

Indicate which type of Corrective Maintenance (Work Orders) the contact has access to (can be all or only the work orders assigned to him)

all assigned

Example: all

quotes boolean

Indicate if the contact has the permissions to view Quotes on Direct

Example: 1

work_scheduled_reports boolean

Indicate if the contact has the permissions to view reports for Preventive Maintenance (Planned Job Orders) on Direct

Example: 1

work_scheduled_reports_states string

Indicate which state of Planned Job Orders can be included in the Planned Job Orders Reports for this contact (can be all, only the completed ones, or only the confirmed ones)

all completed confirmed

Example: all

failure_reports boolean

Indicate if the contact has the permissions to view reports for Corrective Maintenance (Work Orders) on Direct

Example: 1

failure_reports_states string

Indicate which state of Work Orders can be included in the Work Orders Reports for this contact (can be all, only the completed ones, or only the confirmed ones)

all completed confirmed

Example: all

show_user_info boolean

Indicate if the contact has the permissions to view the information of users

Example: 1

show_failure_priority boolean

Indicate if the contact has the permissions to view the priority of Work Orders

Example: 1

report_all_problem_areas boolean

Indicate if the contact has the permissions to report Work Orders in all problem areas

Example: 1

reportable_problem_areas array<integer>

Indicate which problem areas this Contact can report Work Orders in

allow_share_dashboards boolean

Indicate if the contact has the permissions to share dashboards

Example: 1

Responses

data object

Contact model structure details

id string required read-only

ID of the Contact

Example: 123

type string required read-only

Model type

contact

Example: contact

attributes object required
contact_id integer read-only

ID of the Contact

Example: 123

entity_id integer read-only

ID of the Entity

Example: 123

cellphone string

The cellphone number of the Contact

Example: 123456789

language string

The language of the Contact

Example: pt_br

email string | null

The email of the Contact

Example: foo@bar.com

full_name string

The full name of the Contact

Example: Jose Pinhal

phone string

The phone number of the Contact

Example: 123456789

is_direct_user boolean

Indicates whether the contact is a Direct user

Example:

has_access union

Indicates whether the contact has access to Direct

Example:

relationships object

The relationships of the Contact

suppliers object

The Suppliers associated to the Contact

clients object

The Clients associated to the Contact

extensionsPermissions object

The Extensions Permissions associated to the Contact

locals object

The Locations associated to the Contact

profilePicture object

The profile picture of the Contact

user object

The user associated to the Contact

meta object
custom_fields object | null
status string
error
error object
properties object

Only present when related to property validation error

dev_message string

Example: Property validation error. Check the "properties" section in the response.

http_code integer
400
message string

Example: Property validation error.

more_info string
status string
error
error object
http_code integer
401
message string

Example: Authentication token invalid.

more_info string
status string
error
error object
http_code integer
429
message string

Example: Too Many Requests.

more_info string
status string
error
error object
http_code integer
500
message string

Example: An error has occurred during the request.

more_info string