GET v1/Contacts/{contactID}/TextMessages?pageNumber={pageNumber}&pageSize={pageSize}&orderBy={orderBy}&sortDirection={sortDirection}

Get the list of text messages for a contact ID

Request Information

URI Parameters

NameDescriptionTypeAdditional information
contactID

string

Required

pageNumber

integer

Required

pageSize

integer

Required

orderBy

string

Required

sortDirection

string

Required

Body Parameters

None.

Response Information

Resource Description

PageOfOfTextMessageDTO
NameDescriptionTypeAdditional information
Data

Collection of TextMessageDTO

None.

PageNumber

integer

None.

PagesTotal

integer

None.

TotalItems

integer

None.

IsSuccess

boolean

None.

ErrorCode

string

None.

ErrorMessage

string

None.

DisplayMessage

string

None.

Links

Collection of PageLink

None.

Href

string

None.

Response Formats

application/json, text/json

Sample:
{
  "Data": [
    {
      "ID": 1,
      "EntityID": 1,
      "LocationId": 1,
      "LocationString": "sample string 2",
      "EmployeeName": "sample string 3",
      "TwillioAccountSid": "sample string 4",
      "ApiVersion": "sample string 5",
      "Body": "sample string 6",
      "DateCreated": "2017-06-23T10:17:43.1272098+00:00",
      "DateSent": "2017-06-23T10:17:43.1272098+00:00",
      "DateSentToString": "sample string 9",
      "DateUpdated": "2017-06-23T10:17:43.1272098+00:00",
      "Direction": "sample string 11",
      "DirectionString": "sample string 12",
      "ErrorCode": 1,
      "ErrorMessage": "sample string 13",
      "FromNumber": "sample string 14",
      "Price": 15.0,
      "MessageSid": "sample string 16",
      "Status": "sample string 17",
      "ToNumber": "sample string 18",
      "UserSenderID": 1,
      "EntityName": "sample string 19",
      "HasAttachments": true,
      "TextMessageAttachments": [
        {
          "Id": 1,
          "TextMessageId": 2,
          "ContentUrl": "sample string 3",
          "ContentType": "sample string 4",
          "FileName": "sample string 5",
          "DisplayUrl": "/content/images/elements/thumbfile-default.png",
          "FileExtension": ""
        },
        {
          "Id": 1,
          "TextMessageId": 2,
          "ContentUrl": "sample string 3",
          "ContentType": "sample string 4",
          "FileName": "sample string 5",
          "DisplayUrl": "/content/images/elements/thumbfile-default.png",
          "FileExtension": ""
        }
      ],
      "AttachmentsSerialized": "[{\"Id\":1,\"TextMessageId\":2,\"ContentUrl\":\"sample string 3\",\"ContentType\":\"sample string 4\",\"FileName\":\"sample string 5\",\"DisplayUrl\":\"/content/images/elements/thumbfile-default.png\",\"FileExtension\":\"\"},{\"Id\":1,\"TextMessageId\":2,\"ContentUrl\":\"sample string 3\",\"ContentType\":\"sample string 4\",\"FileName\":\"sample string 5\",\"DisplayUrl\":\"/content/images/elements/thumbfile-default.png\",\"FileExtension\":\"\"}]"
    },
    {
      "ID": 1,
      "EntityID": 1,
      "LocationId": 1,
      "LocationString": "sample string 2",
      "EmployeeName": "sample string 3",
      "TwillioAccountSid": "sample string 4",
      "ApiVersion": "sample string 5",
      "Body": "sample string 6",
      "DateCreated": "2017-06-23T10:17:43.1272098+00:00",
      "DateSent": "2017-06-23T10:17:43.1272098+00:00",
      "DateSentToString": "sample string 9",
      "DateUpdated": "2017-06-23T10:17:43.1272098+00:00",
      "Direction": "sample string 11",
      "DirectionString": "sample string 12",
      "ErrorCode": 1,
      "ErrorMessage": "sample string 13",
      "FromNumber": "sample string 14",
      "Price": 15.0,
      "MessageSid": "sample string 16",
      "Status": "sample string 17",
      "ToNumber": "sample string 18",
      "UserSenderID": 1,
      "EntityName": "sample string 19",
      "HasAttachments": true,
      "TextMessageAttachments": [
        {
          "Id": 1,
          "TextMessageId": 2,
          "ContentUrl": "sample string 3",
          "ContentType": "sample string 4",
          "FileName": "sample string 5",
          "DisplayUrl": "/content/images/elements/thumbfile-default.png",
          "FileExtension": ""
        },
        {
          "Id": 1,
          "TextMessageId": 2,
          "ContentUrl": "sample string 3",
          "ContentType": "sample string 4",
          "FileName": "sample string 5",
          "DisplayUrl": "/content/images/elements/thumbfile-default.png",
          "FileExtension": ""
        }
      ],
      "AttachmentsSerialized": "[{\"Id\":1,\"TextMessageId\":2,\"ContentUrl\":\"sample string 3\",\"ContentType\":\"sample string 4\",\"FileName\":\"sample string 5\",\"DisplayUrl\":\"/content/images/elements/thumbfile-default.png\",\"FileExtension\":\"\"},{\"Id\":1,\"TextMessageId\":2,\"ContentUrl\":\"sample string 3\",\"ContentType\":\"sample string 4\",\"FileName\":\"sample string 5\",\"DisplayUrl\":\"/content/images/elements/thumbfile-default.png\",\"FileExtension\":\"\"}]"
    }
  ],
  "PageNumber": 1,
  "PagesTotal": 2,
  "TotalItems": 3,
  "IsSuccess": true,
  "ErrorCode": "sample string 5",
  "ErrorMessage": "sample string 6",
  "DisplayMessage": "sample string 7",
  "Links": [
    {
      "Rel": "sample string 1",
      "Href": "sample string 2"
    },
    {
      "Rel": "sample string 1",
      "Href": "sample string 2"
    }
  ],
  "Href": "sample string 8"
}

application/xml, text/xml

Sample:
<PageOfTextMessageDTO xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/QQSolutions.NextGen.ModelLibrary.DataTransferObjects">
  <Data xmlns:d2p1="http://schemas.datacontract.org/2004/07/QQSolutions.NextGen.ModelLibrary.DataTransferObjects.Contacts">
    <d2p1:TextMessageDTO>
      <d2p1:ApiVersion>sample string 5</d2p1:ApiVersion>
      <d2p1:Body>sample string 6</d2p1:Body>
      <d2p1:DateCreated>2017-06-23T10:17:43.1272098+00:00</d2p1:DateCreated>
      <d2p1:DateSent>2017-06-23T10:17:43.1272098+00:00</d2p1:DateSent>
      <d2p1:DateSentToString>sample string 9</d2p1:DateSentToString>
      <d2p1:DateUpdated>2017-06-23T10:17:43.1272098+00:00</d2p1:DateUpdated>
      <d2p1:Direction>sample string 11</d2p1:Direction>
      <d2p1:DirectionString>sample string 12</d2p1:DirectionString>
      <d2p1:EmployeeName>sample string 3</d2p1:EmployeeName>
      <d2p1:EntityID>1</d2p1:EntityID>
      <d2p1:EntityName>sample string 19</d2p1:EntityName>
      <d2p1:ErrorCode>1</d2p1:ErrorCode>
      <d2p1:ErrorMessage>sample string 13</d2p1:ErrorMessage>
      <d2p1:FromNumber>sample string 14</d2p1:FromNumber>
      <d2p1:HasAttachments>true</d2p1:HasAttachments>
      <d2p1:ID>1</d2p1:ID>
      <d2p1:LocationId>1</d2p1:LocationId>
      <d2p1:LocationString>sample string 2</d2p1:LocationString>
      <d2p1:MessageSid>sample string 16</d2p1:MessageSid>
      <d2p1:Price>15</d2p1:Price>
      <d2p1:Status>sample string 17</d2p1:Status>
      <d2p1:TextMessageAttachments>
        <d2p1:TextMessageAttachmentDTO>
          <d2p1:ContentType>sample string 4</d2p1:ContentType>
          <d2p1:ContentUrl>sample string 3</d2p1:ContentUrl>
          <d2p1:FileName>sample string 5</d2p1:FileName>
          <d2p1:Id>1</d2p1:Id>
          <d2p1:TextMessageId>2</d2p1:TextMessageId>
        </d2p1:TextMessageAttachmentDTO>
        <d2p1:TextMessageAttachmentDTO>
          <d2p1:ContentType>sample string 4</d2p1:ContentType>
          <d2p1:ContentUrl>sample string 3</d2p1:ContentUrl>
          <d2p1:FileName>sample string 5</d2p1:FileName>
          <d2p1:Id>1</d2p1:Id>
          <d2p1:TextMessageId>2</d2p1:TextMessageId>
        </d2p1:TextMessageAttachmentDTO>
      </d2p1:TextMessageAttachments>
      <d2p1:ToNumber>sample string 18</d2p1:ToNumber>
      <d2p1:TwillioAccountSid>sample string 4</d2p1:TwillioAccountSid>
      <d2p1:UserSenderID>1</d2p1:UserSenderID>
    </d2p1:TextMessageDTO>
    <d2p1:TextMessageDTO>
      <d2p1:ApiVersion>sample string 5</d2p1:ApiVersion>
      <d2p1:Body>sample string 6</d2p1:Body>
      <d2p1:DateCreated>2017-06-23T10:17:43.1272098+00:00</d2p1:DateCreated>
      <d2p1:DateSent>2017-06-23T10:17:43.1272098+00:00</d2p1:DateSent>
      <d2p1:DateSentToString>sample string 9</d2p1:DateSentToString>
      <d2p1:DateUpdated>2017-06-23T10:17:43.1272098+00:00</d2p1:DateUpdated>
      <d2p1:Direction>sample string 11</d2p1:Direction>
      <d2p1:DirectionString>sample string 12</d2p1:DirectionString>
      <d2p1:EmployeeName>sample string 3</d2p1:EmployeeName>
      <d2p1:EntityID>1</d2p1:EntityID>
      <d2p1:EntityName>sample string 19</d2p1:EntityName>
      <d2p1:ErrorCode>1</d2p1:ErrorCode>
      <d2p1:ErrorMessage>sample string 13</d2p1:ErrorMessage>
      <d2p1:FromNumber>sample string 14</d2p1:FromNumber>
      <d2p1:HasAttachments>true</d2p1:HasAttachments>
      <d2p1:ID>1</d2p1:ID>
      <d2p1:LocationId>1</d2p1:LocationId>
      <d2p1:LocationString>sample string 2</d2p1:LocationString>
      <d2p1:MessageSid>sample string 16</d2p1:MessageSid>
      <d2p1:Price>15</d2p1:Price>
      <d2p1:Status>sample string 17</d2p1:Status>
      <d2p1:TextMessageAttachments>
        <d2p1:TextMessageAttachmentDTO>
          <d2p1:ContentType>sample string 4</d2p1:ContentType>
          <d2p1:ContentUrl>sample string 3</d2p1:ContentUrl>
          <d2p1:FileName>sample string 5</d2p1:FileName>
          <d2p1:Id>1</d2p1:Id>
          <d2p1:TextMessageId>2</d2p1:TextMessageId>
        </d2p1:TextMessageAttachmentDTO>
        <d2p1:TextMessageAttachmentDTO>
          <d2p1:ContentType>sample string 4</d2p1:ContentType>
          <d2p1:ContentUrl>sample string 3</d2p1:ContentUrl>
          <d2p1:FileName>sample string 5</d2p1:FileName>
          <d2p1:Id>1</d2p1:Id>
          <d2p1:TextMessageId>2</d2p1:TextMessageId>
        </d2p1:TextMessageAttachmentDTO>
      </d2p1:TextMessageAttachments>
      <d2p1:ToNumber>sample string 18</d2p1:ToNumber>
      <d2p1:TwillioAccountSid>sample string 4</d2p1:TwillioAccountSid>
      <d2p1:UserSenderID>1</d2p1:UserSenderID>
    </d2p1:TextMessageDTO>
  </Data>
  <DisplayMessage>sample string 7</DisplayMessage>
  <ErrorCode>sample string 5</ErrorCode>
  <ErrorMessage>sample string 6</ErrorMessage>
  <Href>sample string 8</Href>
  <IsSuccess>true</IsSuccess>
  <Links>
    <PageLink>
      <Href>sample string 2</Href>
      <Rel>sample string 1</Rel>
    </PageLink>
    <PageLink>
      <Href>sample string 2</Href>
      <Rel>sample string 1</Rel>
    </PageLink>
  </Links>
  <PageNumber>1</PageNumber>
  <PagesTotal>2</PagesTotal>
  <TotalItems>3</TotalItems>
</PageOfTextMessageDTO>