GET api/v2/addressbook/groups/{AddressBookGroupID}/contacts?noOfRecordsPerPage={noOfRecordsPerPage}&page={page}&Field={Field}&Direction={Direction}

This method returns a list of all the contacts that are in the group specified in the users account. It will also include the details for each contact.

Request Information

URI Parameters

NameDescriptionTypeAdditional information
AddressBookGroupID

Allows to restrict all contacts that belong to a certain group.

globally unique identifier

None.

EmailAddress

Email address of the person in addressbook

string

None.

FirstName

First name of the person in addressbook

string

None.

LastName

Last name of the person in addressbook

string

None.

MobilePhone

Comma delimited list of mobile numbers to search for in the addressbook

string

None.

PersonNumbers

List all the person numbers to display the contact details.

Collection of integer

None.

noOfRecordsPerPage

Determines how many group contacts to return.(Default : 20)

integer

Default value is -1

page

Determines the index to start outputting the groups from a list returned from the database. (Default : 0)

integer

Default value is -1

Field

The field to be sorted.

TwoSms.CustomerPortalRole.API.AddressBooks.ContactField

None.

Direction

Ascending or Descending order

TwoSms.CustomerPortalRole.API.AddressBooks.Direction

None.

AddressBookGroupID

string

None.

Body Parameters

None.

Response Information

Resource Description

List of contacts assigned to the group

TwoSms.CustomerPortalRole.API.Misc.ResponseOfTwoSms.CustomerPortalRole.API.AddressBooks.AddressBookResponseV2
NameDescriptionTypeAdditional information
Error

TwoSms.CustomerPortalRole.API.Misc.Error

None.

ResponseData

TwoSms.CustomerPortalRole.API.Misc.ResponseDataOfTwoSms.CustomerPortalRole.API.AddressBooks.AddressBookResponseV2

None.

Response Formats

application/json, text/json

Sample:
{
  "Error": {
    "ErrorCode": "sample string 1",
    "ErrorReason": "sample string 2"
  },
  "ResponseData": {
    "Identification": {
      "UserId": "sample string 1"
    },
    "Result": "sample string 1",
    "Detail": {
      "Contacts": [
        {
          "PersonNumber": 3,
          "DateCreated": "2024-04-17T06:15:33.4550405+00:00",
          "DateModified": "2024-04-17T06:15:33.4550405+00:00",
          "EmailAddress": "sample string 9",
          "FirstName": "sample string 6",
          "Groups": "sample string 2",
          "Inherited": true,
          "LastName": "sample string 7",
          "LastModifiedBy": "sample string 4",
          "MobilePhone": "sample string 8",
          "LoginType": 11,
          "OwnerAccountID": "23398020-26f2-4c74-9b81-7f2c50f1e3c0",
          "Password": "sample string 10",
          "PermissionLevel": 0,
          "Validated": true
        },
        {
          "PersonNumber": 3,
          "DateCreated": "2024-04-17T06:15:33.4550405+00:00",
          "DateModified": "2024-04-17T06:15:33.4550405+00:00",
          "EmailAddress": "sample string 9",
          "FirstName": "sample string 6",
          "Groups": "sample string 2",
          "Inherited": true,
          "LastName": "sample string 7",
          "LastModifiedBy": "sample string 4",
          "MobilePhone": "sample string 8",
          "LoginType": 11,
          "OwnerAccountID": "23398020-26f2-4c74-9b81-7f2c50f1e3c0",
          "Password": "sample string 10",
          "PermissionLevel": 0,
          "Validated": true
        }
      ],
      "ContactsCount": 1
    }
  }
}

application/xml, text/xml

Sample:
<ResponseOfAddressBookResponseV2 xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <Error>
    <ErrorCode>sample string 1</ErrorCode>
    <ErrorReason>sample string 2</ErrorReason>
  </Error>
  <ResponseData>
    <Result>sample string 1</Result>
    <Identification>
      <UserId>sample string 1</UserId>
    </Identification>
    <Detail>
      <Contacts>
        <AddressBookResponse>
          <FirstName>sample string 6</FirstName>
          <LastName>sample string 7</LastName>
          <MobilePhone>sample string 8</MobilePhone>
          <EmailAddress>sample string 9</EmailAddress>
          <Password>sample string 10</Password>
          <LoginType>11</LoginType>
          <Validated>true</Validated>
          <PersonNumber>3</PersonNumber>
          <DateCreated>2024-04-17T06:15:33.4550405+00:00</DateCreated>
          <DateModified>2024-04-17T06:15:33.4550405+00:00</DateModified>
          <LastModifiedBy>sample string 4</LastModifiedBy>
          <OwnerAccountID>23398020-26f2-4c74-9b81-7f2c50f1e3c0</OwnerAccountID>
          <Inherited>true</Inherited>
          <PermissionLevel>NONE</PermissionLevel>
          <Groups>sample string 2</Groups>
        </AddressBookResponse>
        <AddressBookResponse>
          <FirstName>sample string 6</FirstName>
          <LastName>sample string 7</LastName>
          <MobilePhone>sample string 8</MobilePhone>
          <EmailAddress>sample string 9</EmailAddress>
          <Password>sample string 10</Password>
          <LoginType>11</LoginType>
          <Validated>true</Validated>
          <PersonNumber>3</PersonNumber>
          <DateCreated>2024-04-17T06:15:33.4550405+00:00</DateCreated>
          <DateModified>2024-04-17T06:15:33.4550405+00:00</DateModified>
          <LastModifiedBy>sample string 4</LastModifiedBy>
          <OwnerAccountID>23398020-26f2-4c74-9b81-7f2c50f1e3c0</OwnerAccountID>
          <Inherited>true</Inherited>
          <PermissionLevel>NONE</PermissionLevel>
          <Groups>sample string 2</Groups>
        </AddressBookResponse>
      </Contacts>
      <ContactsCount>1</ContactsCount>
    </Detail>
  </ResponseData>
</ResponseOfAddressBookResponseV2>