POST api/Chat

Make a Chat API Request

Request Information

URI Parameters

None.

Body Parameters

The ChatRequest. When making a chat request use the MessageUID or use the MessageID. If both are supplied then MessageID will be leading and MessageUID will be ignored

ChatRequest
NameDescriptionTypeAdditional information
MessageUID

Unique ID that is used in the link thats shared with client (customer)

string

None.

MessageID

Unique ID of the message

integer

None.

NewMessage

If the client (customer) posted a new message, then it should be put here

string

None.

NewAttachment

If the client (customer) attached a file at the new message, then it should be put here

UploadAttachment

None.

SenderName

If the client (customer) posted a new message, then his name should be entered here

string

None.

ChatRequestType

The response should be filled with these messages

ChatRequestType

None.

OffSet

Number of messages skipped from the beginning of the result Messages.MessageList

For example if a request would normaly return a list of 20 messages, but the OffSet = 5, then it would skip the first 5 messages and return Message 6 till 20

integer

None.

ListSize

The max number of messages in this list.
If ListSize is 0 (zero) then it's ignored and returns the complete list of messages

For example if a request would normaly return a list of 113 messages, you could apply paging just by setting the ListSize here combined with OffSet.
An OffSet of 60 with a ListSize of 20 would result in page 4 with 20 messages on it
An OffSet of 100 with a ListSize of 20 would result in page 6 with 13 messages on it (the last 13 messages of the 113 messages)

integer

None.

Lang2

The default language of this chat request,
This is a 2 letter code, defaults to Dutch(NL) if the letter code is unknown.

string

None.

Request Formats

application/json, text/json

Sample:
{
  "MessageUID": "sample string 1",
  "MessageID": 2,
  "NewMessage": "sample string 3",
  "NewAttachment": {
    "AttachmentFileName": "sample string 1",
    "AttachmentMimeType": "sample string 2",
    "AttachmentFile": "QEA="
  },
  "SenderName": "sample string 4",
  "ChatRequestType": 0,
  "OffSet": 5,
  "ListSize": 6,
  "Lang2": "sample string 7"
}

application/xml, text/xml

Sample:
<ChatRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/ATRonicLayer.BO">
  <ChatRequestType>chatRequestNoMessages</ChatRequestType>
  <Lang2>sample string 7</Lang2>
  <ListSize>6</ListSize>
  <MessageID>2</MessageID>
  <MessageUID>sample string 1</MessageUID>
  <NewAttachment>
    <AttachmentFile>QEA=</AttachmentFile>
    <AttachmentFileName>sample string 1</AttachmentFileName>
    <AttachmentMimeType>sample string 2</AttachmentMimeType>
  </NewAttachment>
  <NewMessage>sample string 3</NewMessage>
  <OffSet>5</OffSet>
  <SenderName>sample string 4</SenderName>
</ChatRequest>

Response Information

Resource Description

The response of a Chat API Request

ChatResponse
NameDescriptionTypeAdditional information
NewMessageID

If there was a ChatRequest.NewMessage then that new message got this MessageID, zero is no new message

integer

None.

Messages

The requested messages

Messages

None.

ReloadCompleteChat

If there are older messages that were deleted/changed/etc, then the advise will be given to reload the chat completely (you should make a new request for this)

boolean

None.

Response Formats

application/json, text/json

Sample:
{
  "NewMessageID": 1,
  "Messages": {
    "Count": 1,
    "Size": 2,
    "MessageList": [
      {
        "MessageID": 1,
        "DateTime": "2025-12-06T05:44:15.0449546+01:00",
        "SenderName": "sample string 3",
        "FromATR": true,
        "Text": "sample string 5",
        "AttachmentList": [
          {
            "AttachmentID": 1,
            "AttachmentFileName": "sample string 2",
            "AttachmentMimeType": "sample string 3"
          },
          {
            "AttachmentID": 1,
            "AttachmentFileName": "sample string 2",
            "AttachmentMimeType": "sample string 3"
          }
        ]
      },
      {
        "MessageID": 1,
        "DateTime": "2025-12-06T05:44:15.0449546+01:00",
        "SenderName": "sample string 3",
        "FromATR": true,
        "Text": "sample string 5",
        "AttachmentList": [
          {
            "AttachmentID": 1,
            "AttachmentFileName": "sample string 2",
            "AttachmentMimeType": "sample string 3"
          },
          {
            "AttachmentID": 1,
            "AttachmentFileName": "sample string 2",
            "AttachmentMimeType": "sample string 3"
          }
        ]
      }
    ]
  },
  "ReloadCompleteChat": true
}

application/xml, text/xml

Sample:
<ChatResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/ATRonicLayer.BO">
  <Messages>
    <Count>1</Count>
    <MessageList>
      <Message>
        <AttachmentList>
          <Attachment>
            <AttachmentFileName>sample string 2</AttachmentFileName>
            <AttachmentID>1</AttachmentID>
            <AttachmentMimeType>sample string 3</AttachmentMimeType>
          </Attachment>
          <Attachment>
            <AttachmentFileName>sample string 2</AttachmentFileName>
            <AttachmentID>1</AttachmentID>
            <AttachmentMimeType>sample string 3</AttachmentMimeType>
          </Attachment>
        </AttachmentList>
        <DateTime>2025-12-06T05:44:15.0449546+01:00</DateTime>
        <FromATR>true</FromATR>
        <MessageID>1</MessageID>
        <SenderName>sample string 3</SenderName>
        <Text>sample string 5</Text>
      </Message>
      <Message>
        <AttachmentList>
          <Attachment>
            <AttachmentFileName>sample string 2</AttachmentFileName>
            <AttachmentID>1</AttachmentID>
            <AttachmentMimeType>sample string 3</AttachmentMimeType>
          </Attachment>
          <Attachment>
            <AttachmentFileName>sample string 2</AttachmentFileName>
            <AttachmentID>1</AttachmentID>
            <AttachmentMimeType>sample string 3</AttachmentMimeType>
          </Attachment>
        </AttachmentList>
        <DateTime>2025-12-06T05:44:15.0449546+01:00</DateTime>
        <FromATR>true</FromATR>
        <MessageID>1</MessageID>
        <SenderName>sample string 3</SenderName>
        <Text>sample string 5</Text>
      </Message>
    </MessageList>
    <Size>2</Size>
  </Messages>
  <NewMessageID>1</NewMessageID>
  <ReloadCompleteChat>true</ReloadCompleteChat>
</ChatResponse>