latestOpenAPI 3.0.12026-08-192092911.2 MB

916e669fc527

Contacts

Get a list of contacts

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

get/v1/contacts

Query parameters

sortBy'name' | 'createdAt'

Shows the possible values for sorting contacts<p>Possible values:</p><ul><li><b>name</b>: Sort contacts by name</li><li><b>createdAt</b>: Sort contacts by created at</li></ul>

Example:name

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

status'normal' | 'contactOnStop' | 'creditLimitOnStop'

The status of the contact (if they are on stop)<p>Possible values:</p><ul><li><b>normal</b>: Normal</li><li><b>contactOnStop</b>: Contact is on stop</li><li><b>creditLimitOnStop</b>: Credit limit is on stop</li></ul>

Example:normal

Only return contacts where status matches the value provided

namestring

Only return contacts where name matches or starts with the value provided

referencestring[]

Only return contacts where reference matches the value(s) provided (Max items: 50)

idinteger[]

Only return contacts where id matches the value(s) provided (Max items: 50)

parentIdinteger[]

Only return contacts where parentId matches the value(s) provided (Max items: 50)

groupIdinteger[]

Only return contacts where groupId matches the value(s) provided (Max items: 50)

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",
      "modifiedAt": "2023-09-12T11:24:23.0000000+00:00",
      "reference": "5514123",
      "name": "Example Company",
      "groupId": 5514123,
      "parentId": 5514123,
      "extraInformation": "Loyal customer for many years",
      "street": "3150 Century Way",
      "town": "Leeds",
      "postalCode": "LS15 6HU",
      "country": "England",
      "location": {
        "latitude": 51.31349,
        "longitude": -0.7464233
      },
      "accountStatus": "normal",
      "stopReason": "This customer has not paid for our services and won't return calls",
      "stoppedAt": "2023-09-12",
      "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
}