POST api/dynamicclients/preview/count?searchTerm={searchTerm}

Gets the clients that match the conditions of a given ruleset that has not been persisted to the database.

Request Information

URI Parameters

NameDescriptionTypeAdditional information
searchTerm

A search term to use to filter the results

string

None.

Body Parameters

The ruleset that determines how to find clients.

DelegateGroupDynamicClientRuleset
NameDescriptionTypeAdditional information
DelegateGroupId

The delegate group the rules apply to

integer

None.

Rules

The rules used to determine the clients associated with the delegate group

Collection of DelegateGroupDynamicClientRule

None.

Request Formats

application/json, text/json

Sample:
{
  "delegateGroupId": 1,
  "rules": [
    {
      "conditions": [
        {
          "ruleType": 1,
          "value": "sample string 1"
        },
        {
          "ruleType": 1,
          "value": "sample string 1"
        }
      ]
    },
    {
      "conditions": [
        {
          "ruleType": 1,
          "value": "sample string 1"
        },
        {
          "ruleType": 1,
          "value": "sample string 1"
        }
      ]
    }
  ]
}

application/xml, text/xml

Sample:
<DelegateGroupDynamicClientRuleset xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/TS.DR.Resources.Delegates">
  <DelegateGroupId>1</DelegateGroupId>
  <Rules>
    <DelegateGroupDynamicClientRule>
      <Conditions>
        <DelegateGroupDynamicClientRuleCondition>
          <RuleType>FundingSource</RuleType>
          <Value>sample string 1</Value>
        </DelegateGroupDynamicClientRuleCondition>
        <DelegateGroupDynamicClientRuleCondition>
          <RuleType>FundingSource</RuleType>
          <Value>sample string 1</Value>
        </DelegateGroupDynamicClientRuleCondition>
      </Conditions>
    </DelegateGroupDynamicClientRule>
    <DelegateGroupDynamicClientRule>
      <Conditions>
        <DelegateGroupDynamicClientRuleCondition>
          <RuleType>FundingSource</RuleType>
          <Value>sample string 1</Value>
        </DelegateGroupDynamicClientRuleCondition>
        <DelegateGroupDynamicClientRuleCondition>
          <RuleType>FundingSource</RuleType>
          <Value>sample string 1</Value>
        </DelegateGroupDynamicClientRuleCondition>
      </Conditions>
    </DelegateGroupDynamicClientRule>
  </Rules>
</DelegateGroupDynamicClientRuleset>

application/x-www-form-urlencoded

Sample:

Sample not available.

Response Information

Resource Description

Returns basic information about the clients that match the provided rules.

Collection of DelegateClientInfo
NameDescriptionTypeAdditional information
ClientId

The ID of the client (matches Pass/Novus client id)

integer

None.

ClientCode

The client's code

string

None.

FirstName

The client's first name

string

None.

LastName

The client's last name

string

None.

BirthDate

The client's birth date (if known)

date

None.

StartDate

The date that the client began as a member of the delegate group Delegates will not be able to see the client's history before this time

date

None.

ExpiryDate

The date that the client is no longer valid in the group

date

None.

DynamicallyAdded

Gets whether this client was associated with its delegate group using a dynamic rule rather than being added individually.

boolean

None.

PhoneNumber

Gets or sets clients phone number

string

None.

UserDefinedFields

Gets user defined fields for this client

Dictionary of string [key] and Object [value]

None.

Response Formats

application/json, text/json

Sample:
[
  {
    "clientId": 1,
    "clientCode": "sample string 2",
    "firstName": "sample string 3",
    "lastName": "sample string 4",
    "birthDate": "2024-12-23",
    "startDate": "2024-12-23T12:24:59.2851031-07:00",
    "expiryDate": "2024-12-23T12:24:59.2851031-07:00",
    "dynamicallyAdded": true,
    "phoneNumber": "sample string 6",
    "userDefinedFields": {
      "sample string 1": {},
      "sample string 3": {}
    }
  },
  {
    "clientId": 1,
    "clientCode": "sample string 2",
    "firstName": "sample string 3",
    "lastName": "sample string 4",
    "birthDate": "2024-12-23",
    "startDate": "2024-12-23T12:24:59.2851031-07:00",
    "expiryDate": "2024-12-23T12:24:59.2851031-07:00",
    "dynamicallyAdded": true,
    "phoneNumber": "sample string 6",
    "userDefinedFields": {
      "sample string 1": {},
      "sample string 3": {}
    }
  }
]

application/xml, text/xml

Sample:
<ArrayOfDelegateClientInfo xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/TS.DR.Resources.Delegates">
  <DelegateClientInfo>
    <BirthDate>2024-12-23T12:24:59.2851031-07:00</BirthDate>
    <ClientCode>sample string 2</ClientCode>
    <ClientId>1</ClientId>
    <DynamicallyAdded>true</DynamicallyAdded>
    <ExpiryDate>2024-12-23T12:24:59.2851031-07:00</ExpiryDate>
    <FirstName>sample string 3</FirstName>
    <LastName>sample string 4</LastName>
    <PhoneNumber>sample string 6</PhoneNumber>
    <StartDate>2024-12-23T12:24:59.2851031-07:00</StartDate>
    <UserDefinedFields xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
      <d3p1:KeyValueOfstringanyType>
        <d3p1:Key>sample string 1</d3p1:Key>
        <d3p1:Value />
      </d3p1:KeyValueOfstringanyType>
      <d3p1:KeyValueOfstringanyType>
        <d3p1:Key>sample string 3</d3p1:Key>
        <d3p1:Value />
      </d3p1:KeyValueOfstringanyType>
    </UserDefinedFields>
  </DelegateClientInfo>
  <DelegateClientInfo>
    <BirthDate>2024-12-23T12:24:59.2851031-07:00</BirthDate>
    <ClientCode>sample string 2</ClientCode>
    <ClientId>1</ClientId>
    <DynamicallyAdded>true</DynamicallyAdded>
    <ExpiryDate>2024-12-23T12:24:59.2851031-07:00</ExpiryDate>
    <FirstName>sample string 3</FirstName>
    <LastName>sample string 4</LastName>
    <PhoneNumber>sample string 6</PhoneNumber>
    <StartDate>2024-12-23T12:24:59.2851031-07:00</StartDate>
    <UserDefinedFields xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
      <d3p1:KeyValueOfstringanyType>
        <d3p1:Key>sample string 1</d3p1:Key>
        <d3p1:Value />
      </d3p1:KeyValueOfstringanyType>
      <d3p1:KeyValueOfstringanyType>
        <d3p1:Key>sample string 3</d3p1:Key>
        <d3p1:Value />
      </d3p1:KeyValueOfstringanyType>
    </UserDefinedFields>
  </DelegateClientInfo>
</ArrayOfDelegateClientInfo>