latestOpenAPI 3.0.12026-08-192092911.2 MB

916e669fc527

Persons

Get a list of persons

Retrieve a paged collection of persons (required scope contacts:persons:read)

get/v1/persons

Query parameters

sortBy'surname' | 'createdAt'

Represents the sort options for a persons<p>Possible values:</p><ul><li><b>surname</b>: Sorts the persons by surname</li><li><b>createdAt</b>: Sorts the persons by creation date</li></ul>

Example:surname

The field to sort items in the page by

direction'ascending' | 'descending'

Represents the direction in which sorting should be applied<p>Possible values:</p><ul><li><b>ascending</b>: Indicates ascending sorting order</li><li><b>descending</b>: Indicates descending sorting order</li></ul>

Example:ascending

The direction to apply the sort

contactIdinteger[]

Only return persons where contactId matches the value(s) provided (Max items: 50)

surnamestring

Only return persons where surname matches or starts with the value provided

emailstring

Only return persons where email matches the value provided

mobilestring

Only return persons where mobile matches the value provided

landlinestring

Only return persons where landline matches the value provided

isOptedOutboolean

Only return persons where isOptedOut matches the value provided

isMainboolean

Only return persons where isMain matches the value provided

pageNumberinteger

The page number being requested (minimum: 1, maximum: 2147483)

pageSizeinteger

The page size being requested (minimum: 1, maximum: 1000)

Headers

Customer-Idinteger required

The customer identifier

Response

OK

pageNumberinteger

The page number of the response where 1 is the first page

pageSizeinteger

The number of items requested for the current page

pageItemCountinteger

The number of items returned in the current page

Example response

{
  "items": [
    {
      "id": "5514123",
      "createdAt": "2022-11-29T16:50:16.0000000+00:00",
      "contactId": 12345,
      "title": "Mr",
      "forename": "David",
      "surname": "Smith",
      "email": "dave.brown@example.com",
      "mobile": "+447812 123112",
      "landline": "+441312 112441",
      "extension": "12",
      "position": "Manager",
      "department": "Customer service",
      "customFields": [
        {
          "definitionId": 5514123,
          "value": "Purple",
          "definition": {
            "caption": "Favourite colour",
            "type": "boolean",
            "listOptions": [
              "Red",
              "Blue",
              "Green",
              "Purple"
            ],
            "isRequired": true,
            "isEditable": true,
            "default": "10"
          },
          "systemListValueMetadata": {
            "label": "John Doe",
            "entityType": "resource"
          }
        }
      ]
    }
  ],
  "pageNumber": 2,
  "pageSize": 100,
  "pageItemCount": 55
}