On this page
Associate a person with an organization
People API concepts and usage
This API can be used to retrieve, create, update, and delete records in the People master file.
If looking to import People into Movidesk, tools such as Postman can be used to create or update records in bulk via the API.
You can also use the API to integrate Movidesk to third party systems when a standard integration is not available for that system. For example, you can integrate Movidesk to your CRM to maintain customer records synced.
API Base URL
All API endpoint URLs in this article use the following base URL:
https://api.movidesk.com/public/v1
Object properties
The People API interacts with a large number of objects, all of which link back to a specific record in the People master file. These objects range from addresses, to SLA policies linked to a customer.
While all of these objects and their properties can be retrieved by this API, objects that are not part of the People master file cannot be modified through this API. For example, you can retrieve and update which SLA policy is linked to a customer, but cannot modify the SLA policy itself.
|
|
Note We apologize for the typos and inconsistent naming on a few properties (there is quite a bit of history behind this!). We are working to fix these along with developing some new and improved APIs. We are also looking to minimize any impact to users of the current API versions. |
Objects
Person
The primary object for this API. The Person object is the root for all JSON paths to other objects.
JSON Paths
person
|
Property |
Type |
Max length |
Required? |
Description |
|
id |
String |
64 |
|
Reference code of the person. If left blank, a random alphanumeric value will be assigned as the reference code. |
|
codeReferenceAdditional |
String |
64 |
|
Customer ID of the person. |
|
isActive |
Boolean |
|
Yes |
The person will not be visible and cannot be selected if set to People can be reactivated in People, through third party integrations, or through this API. |
|
personType |
Int |
1 |
Yes |
Person type: 1=User, 2=Company, 4=Department. |
|
profileType |
Int |
1 |
Yes |
Profile type: 1=Agent, 2=Customer, 3=Agent and Customer. |
|
accessProfile |
String |
128 |
Yes* |
Name of the access profile applied to the person. Must be an existing access profile configured in Configurations > Access profiles. The access profile’s type must match the person’s profileType. If left blank and profileType is 2 (company), the default customer access profile will be used. |
|
corporateName |
String |
128 |
Yes* |
Corporate name of the company. Only applicable when personType is 2 (company). Only required when businessName is blank. |
|
businessName |
String |
128 |
Yes* |
Trade name of the company, or Name of the user or department. Only required when personType is 1 (user) or 4 (department). |
|
cpfCnpj |
String |
14 |
N/A |
Do not use. Only applicable for localized use of the system in Latin America |
|
userName |
String |
64 |
Yes |
Username of the user, stored in User. |
|
password |
String |
32 |
Yes |
Password of the user. Must be at least 8 characters long. Write-only. Cannot be retrieved by the API. |
|
role |
String |
128 |
|
Role of the person. If set to a nonexistent role, a new record will be created in the Roles master file. |
|
bossId |
String |
64 |
|
Reference code of the person’s Supervisor. |
|
bossName |
String |
128 |
Name of the person’s Supervisor. Read-only. |
|
|
classification |
String |
128 |
Classification of the person. If set to a nonexistent classification, a new record will be created in the Classifications master file. |
|
|
cultureId |
String |
|
|
Culture code indicating the primary language of the person: English = en-US If left blank, the default system language will be used. |
|
timeZoneId |
String |
64 |
|
TZ database name of the person’s primary time zone. If left blank, the default system time zone will be used. |
|
authenticateOn |
String |
Server and domain used to authenticate the user, in the following format:
Only required if using authentication through an external directory. Note that the JSON format requires escaping the backslash by prepending another backslash. Your string should look like this within the JSON data packet:
|
||
|
createdDate |
UTC datetime |
Date and time when the person was created. Must be lesser than the current date and time. If left blank, the current date and time will be used. Read-only after the person is created. |
||
|
createdBy |
String |
128 |
Reference code of the user that created the person. Read-only. |
|
|
changedDate |
UTC datetime |
|
Date and time when the person was last updated. Read-only. |
|
|
changedBy |
String |
128 |
Reference code of the user that last updated the person. Read-only. |
|
|
observations |
String |
|
Remarks about the person. |
|
|
addresses |
Address array |
|
Array of addresses for the person. |
|
|
contacts |
Contact method array |
|
|
Array of contact methods for the person. Corresponds to the Other contacts section of the record. |
|
emails |
Email array |
|
|
Array of email addresses for the person. |
|
teams |
Array |
|
Yes* |
List of teams the agent is a part of. Each item on the list is the Name of the team. Only required when profileType is 1 (agent). |
|
relationships |
Organization array |
|
Yes* |
Array of all organizations this person is associated with. Can be configured to be required for customer users (personType=1 and profileType=2) in Configurations > Parameters. |
|
customFieldValues |
Custom field array |
|
|
Array of all custom fields on the person, and their values. Will not return custom fields with blank values. |
|
atAssets |
Asset array |
|
|
List of all assets linked to the person. |
Address
Object containing information about one of the person’s addresses. Each object corresponds to one address in the Address section in the People registration form.
|
|
Note The following properties were omitted from the table below, as they are only applicable for localized use of the system in Latin America: country, countryId, postalCode, state, city, district, number |
JSON Paths
person.addresses
|
Property |
Type |
Max length |
Required? |
Description |
|
addressType |
String |
128 |
Yes |
Type of the address, for example “Mailing.” If set to a nonexistent type, a new address type will be created. |
|
Street |
String |
128 |
|
Address line 1 of the address. |
|
Complement |
String |
128 |
|
Address line 2 of the address. |
|
Reference |
String |
128 |
|
Address line 3 of the address. |
|
isDefault |
Boolean |
|
Yes |
Set to |
Contact method
Object containing information about a method to contact the person. Each object corresponds to a contact method in the Other contacts section of the record.
JSON Paths
person.contacts
|
Property |
Type |
Max length |
Required? |
Description |
|
contactType |
String |
128 |
Yes |
Type of the contact method, for example “Mobile phone.” If set to a nonexistent type, a new contact type will be created. |
|
contact |
String |
128 |
Yes |
Contact information, such as the phone number or website URL. |
|
isDefault |
Boolean |
|
Yes |
Set to |
Object containing information about one of the person’s email addresses. Each object corresponds to one email address in the Emails section of the People registration form.
JSON Paths
person.emails
|
Property |
Type |
Max length |
Required? |
Description |
|
emailType |
String |
128 |
Yes |
Type of the email address, for example “Business.” If set to a nonexistent type, a new email type will be created. |
|
|
String |
128 |
Yes |
Email address. |
|
isDefault |
Boolean |
|
Yes |
Set to |
Organization
Object containing information about an organization the person is associated with. It also includes information about which SLA policies should be applied to the person, and which services they are allowed to select for tickets.
This object points to other records in the People master file—with personType of 2 (company) or 4 (department). You cannot modify those records through this object, but they can still be updated as Person objects using this API.
|
|
Warning After setting includeInParents or loadChildOrganizations to |
The allowAllServices and services properties are only applicable if the system is configured to control allowed services at the user level. This setting is controlled in Configurations > Parameters by the parameter Select the services available to each user when registering people.
|
|
Note You can configure allowed services and link the person to an SLA policy without associating the person with an organization. Just leave id blank and set your desired values for slaAgreement, allowAllServices, and services. |
JSON Paths
person.relationships
|
Property |
Type |
Max length |
Required? |
Description |
|
id |
String |
64 |
|
Reference code of the organization the person is associated with. |
|
name |
String |
128 |
|
Name of the organization. Read-only. |
|
slaAgreement |
String |
128 |
|
Name of the SLA policy applied to this person. There can only be one SLA policy applied to the person for each associated organization. |
|
forceChildrenToHaveSomeAgreement |
Boolean |
|
|
Set to For example, if you are associating a department with a company, this will force all users associated with the department to inherit the SLA policy. Only applicable when personType is 2 (company) or 4 (department). |
|
allowAllServices |
Boolean |
|
|
Set to If left blank, the value will be set to |
|
includeInParents |
Boolean |
|
|
Set to For example, you may have users associated to a department. If you then associate the department to a company and set this property to Only applicable when personType is 2 (company) or 4 (department). |
|
loadChildOrganizations |
Boolean |
|
|
Set to For example, you may have a department associated to a parent company. If you then associate a user to the company and set this property to |
|
services |
Service array |
|
Yes* |
List of services the person is allowed to select. Only required when allowAllServices is set to |
Service
Object containing information about a service in the Service catalog.
You cannot modify records in the Services master file using the People API—instead, you can use the Services API to update the Service catalog.
|
|
Warning After setting copyToChildren to |
JSON Paths
person.relationships.services
|
Property |
Type |
Max length |
Required? |
Description |
|
Id |
Int |
|
Yes |
Code of the service. Read-only. |
|
Name |
String |
128 |
|
Name of the service. Read-only. |
|
copyToChildren |
Boolean |
|
|
Set to For example, you may have users associated to a company. If you set this property to If left blank, the value will be set to Only applicable when personType is 2 (company) or 4 (department). |
Custom field
Object containing custom field data on a People record. The object also includes identifying information on which custom field—and which display rule—are storing the data.
There will be a separate object for each individual field on the person’s registration. This includes display rules that allow multiple entries for the field group. For example, a display rule with two custom fields and three separate entries on a person’s registration will constitute a total of six Custom field objects.
|
|
Note Date and time data in the value property must be in UTC datetime: Date: |
JSON Paths
person.customfieldvalues
|
Property |
Type |
Max length |
Required? |
Description |
|
customFieldId |
Int |
64 |
Yes |
ID of the custom field where the data is stored. |
|
customFieldRuleId |
Int |
64 |
Yes |
ID of the display rule that contains the custom field. |
|
line |
Int |
64 |
Yes |
Line number where the data is stored. Only applicable for display rules that allow multiple entries. If the display rule does not allow for multiple entries, this value should always be 1. |
|
value |
String |
|
Yes* |
Value in the custom field. Only required for the following custom field types: Single-line text |
|
items |
Custom field item array |
|
Yes* |
List of items selected in the custom field. The array should only contain a single value if the custom field is configured with the Allow multiple selection parameter disabled. Only required for the following custom field types: Custom dropdown |
Custom field item
Object containing data for custom field types that allow the selection of discrete values. Always relates back to a Custom field object.
JSON Paths
person.customfieldvalues.items
|
Property |
Type |
Max length |
Required? |
Description |
|
personId |
Int |
64 |
Yes* |
Reference code of a person. Only required for custom fields of the type People search. |
|
clientId |
Int |
64 |
Yes* |
Reference code of a customer. Only required for custom fields of the type Customer search. |
|
team |
String |
128 |
Yes* |
Name of the agent’s team. Must be an existing team configured in Configurations > Teams. Only required for custom fields of the type Agent search. The specific agent should be identified in the personId property. |
|
customFieldItem |
String |
256 |
Yes* |
Name of the item selected on the custom field. Must be one of the options or items configured on the custom field in Configuration > Custom fields. Only required for custom fields of the type Custom dropdown, Multiple selection, or Single selection. |
Asset
Object containing information about an asset linked to the person. All properties on this object are read-only.
|
|
Note To update the assets property on the Person object, you must change the id property of the Asset object. This will not modify the record in the Assets master file—instead it will swap the previous Asset record with the record corresponding to the new id value. |
JSON Paths
person.atAssets
|
Property |
Type |
Max length |
Required? |
Description |
|
id |
String |
64 |
Yes |
Reference code of the asset. Read-only. |
|
name |
String |
128 |
|
Name of the asset. Read-only. |
|
label |
String |
128 |
|
Label of the asset. Read-only. |
Retrieve a person
Retrieve all properties—and expand all objects—of a specific People record.
GET: /persons
|
Parameters |
Location |
Type |
Required? |
Description |
|
token |
Query string |
String |
Yes |
Movidesk API token found in Configurations > Account > Parameters |
|
id |
Query string |
Int |
Yes |
id of the person that will be retrieved |
This example is a request to retrieve the person with id 1076070063, which returns all properties of that person.
Sample request
GET: https://api.movidesk.com/public/v1/persons?token=XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX&id=1076070063
Sample response
{
"id": "1076070063",
"codeReferenceAdditional": null,
"isActive": true,
"personType": 1,
"profileType": 2,
"accessProfile": "Customers",
"businessName": "Sally Anderson",
"corporateName": null,
"cpfCnpj": null,
"userName": "sally",
"password": null,
"role": "Manager",
"bossId": null,
"bossName": null,
"classification": null,
"cultureId": "en-US",
"timeZoneId": "America/Aruba",
"createdDate": "2019-07-23T02:57:54.2357418",
"createdBy": "1489377958",
"changedDate": "2019-10-15T21:31:56.2866572",
"changedBy": "1031565475",
"observations": null,
"authenticateOn": null,
"addresses": [],
"contacts": [],
"emails": [
{
"emailType": "Business",
"email": "sally.anderson@westernmanufacturing.com",
"isDefault": true
}
],
"teams": [],
"relationships": [
{
"id": "350002",
"name": "Western Manufacturing",
"slaAgreement": "Standard SLA ",
"forceChildrenToHaveSomeAgreement": false,
"allowAllServices": true,
"includeInParents": null,
"loadChildOrganizations": null,
"services": [],
"idToDelete": null,
"isGetMethod": true
}
],
"customFieldValues": [],
"atAssets": []
}
Retrieve multiple people
Retrieve specific properties from multiple People records.
GET: /persons
|
Parameters |
Location |
Type |
Required? |
Description |
|
token |
Query string |
String |
Yes |
Movidesk API token found in Configurations > Account > Parameters |
|
$select |
Query string |
OData |
Yes |
Comma delimited list of which object properties should be retrieved |
|
$expand |
Query string |
OData |
|
Comma delimited list of which properties should be expanded. For example, expand the relationships property to retrieve the nested Organization objects and their properties. |
|
$filter |
Query string |
OData |
|
Expressions to specify which People records should be retrieved. |
|
$orderby |
Query string |
OData |
|
Determines whether objects will be retrieved in ascending ( Has |
|
$top |
Query string |
OData |
|
Determines how many records should be retrieved. Used for paging results. |
|
$skip |
Query string |
OData |
|
Determines how many records should be skipped before retrieving records. Used for paging results. |
|
|
Tip See the official OData guide on query options for details on how to sort, filter, and page the results. |
This example is a request to retrieve the id, businessName, corporateName, and relationships properties of all People records with a personType of 1, a profileType of 2, and a role of “Manager.”
The request is also specifying that it only wants the id and name properties for the Organization objects.
The response shows two records that fit the filter criteria.
Notice that on the second Organization object returned for “John Stewart”, we can see that name and id are returned in the following format: ParentOrganization/Organization. This indicates that “Sundance” is the parent organization of “Sundance customer service.”
|
|
Note The $filter parameter uses single quotation marks on strings, instead of double quotation marks. |
Sample request
GET: https://api.movidesk.com/public/v1/persons?token=XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX&$select=id,businessName,corporateName,relationships&$filter=personType
eq 1 and profileType eq 2 and role eq 'Manager'&$expand=relationships($select=id,name)
Sample response
[
{
"corporateName": "",
"businessName": "Sally Anderson",
"id": "1076070063",
"relationships": [
{
"name": "Western Manufacturing",
"id": "350002"
}
]
},
{
"corporateName": "",
"businessName": "John Stewart",
"id": "1031565475",
"relationships": [
{
"name": "Sundance",
"id": "350003"
},
{
"name": "Sundance/Sundance customer service",
"id": "350003/350003-1"
}
]
}
]
Create a person
Create a new record in the People master file.
POST: /persons
|
Parameters |
Location |
Type |
Required? |
Description |
|
Content-Type |
Header |
Content type |
Yes |
Should always be |
|
token |
Query string |
String |
Yes |
Movidesk API token found in Configurations > Account > Parameters |
|
returnAllProperties |
Query string |
Boolean |
Yes |
Determines whether all properties of the new person will be returned, or only the id of the new person. Has |
|
Person properties |
Body |
JSON |
|
Properties of the new person. |
This example is a request to create a new person with the businessName “Logan Jensen.” This is a customer user, so personType will be set to 1 and a profileType will be set to 2.
We will also assign them a userName of “ljensen” and a temporary password of “HYCj9bgT”
Since we did not include id in the JSON data packet, the Reference code for this person will be generated by the system.
The API returns a Status 200 (OK) and the id of the new person.
Sample request
POST: https://api.movidesk.com/public/v1/persons?token=XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
Headers: Content-Type: application/json
{
"isActive": true,
"personType": 1,
"profileType": 2,
"businessName": "Logan Jensen",
"userName": "ljensen",
"password": "HYCj9bgT"
}
Sample response
{
"id": "183866c6-baa3-45a4-"
}
Update a person
Make changes to a person by sending JSON key/value pairs for the properties you want to change.
|
|
Warning Updating array properties such as teams or relationships will replace all values in the array with the values in your request. |
PATCH: /persons
|
Parameters |
Location |
Type |
Required? |
Description |
|
Content-Type |
Header |
Content type |
Yes |
Should always be |
|
token |
Query string |
String |
Yes |
Movidesk API token found in Configurations > Account > Parameters |
|
id |
Query string |
Int |
Yes |
id of the person that will be updated |
|
Person properties |
Body |
JSON |
|
Properties to be updated. |
This example is a request to update the person with id "183866c6-baa3-45a4-", which was created in the previous example.
The request is adding two new email address for the person—one business email address, and one private email address. The business email address will be set as the Main email address.
The API returns a status, but no JSON data.
Sample request
PATCH: https://api.movidesk.com/public/v1/persons?token=XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX&id=183866c6-baa3-45a4-
Headers: Content-Type: application/json
{
"emails": [
{
"emailType": "Business",
"email": "ljensen@westernmanufacturing.com",
"isDefault": true
},
{
"emailType": "Private",
"email": "logan.jensen68@gmail.com",
"isDefault": false
}
]
}
Associate a person with an organization
Add an Organization object to the relationships property of a person.
|
|
Note You cannot use this resource to remove associated organizations from a person. In order to remove an associated organization, you must use the |
POST: /persons/relationships
|
Parameters |
Location |
Type |
Required? |
Description |
|
Content-Type |
Header |
Content type |
Yes |
Should always be |
|
token |
Query string |
String |
Yes |
Movidesk API token found in Configurations > Account > Parameters |
|
id |
Query string |
Int |
Yes |
id of the person that will be updated |
|
Person properties |
Body |
JSON |
|
Properties to be updated. |
This example is a request to associate the person with id "183866c6-baa3-45a4-" to the organization with id 350002.
The request is also setting loadChildOrganizations to true, which will associate the person to any child organizations from the organization with id 350002.
The API returns a status, but no JSON data.
Sample request
POST: https://api.movidesk.com/public/v1/persons/relationships?token=XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX&id=183866c6-baa3-45a4-Headers:
Content-Type: application/json
{
"relationships": [
{
"id": "350002"
"name": "Western Manufacturing",
"loadChildOrganizations": true
}
]
}
Delete a person
Delete a record in the People master file.
DELETE: /persons
|
Parameters |
Location |
Type |
Required? |
Description |
|
token |
Query string |
String |
Yes |
Movidesk API token found in Configurations > Account > Parameters |
|
id |
Query string |
Int |
Yes |
id of the person that will be deleted |
This example is a request to delete the person with id "183866c6-baa3-45a4-"
The API returns a status, but no JSON data.
Sample request
DELETE: https://api.movidesk.com/public/v1/persons?token=XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX&id=183866c6-baa3-45a4-