Skip to content
Developer

SupportChat

Open data4 EndpointsPublic / SupportChat

Get existing support chat

GET/api/public/chat/support

Headers

x-public-session-tokenrequiredstringPublic session token identifying the visitor (may alternatively be passed as the 'x-public-session-token' / 'ps_token' query parameter or, on secure connections, the 'X-PUBLIC-SESSION-TOKEN' cookie)

Responses

default

Request
curl --request GET \
  --url https://your-instance.iw-erp.de/api/public/chat/support

Start or get existing support chat

POST/api/public/chat/support

Headers

x-public-session-tokenrequiredstringPublic session token identifying the visitor (may alternatively be passed as the 'x-public-session-token' / 'ps_token' query parameter or, on secure connections, the 'X-PUBLIC-SESSION-TOKEN' cookie)

Request body application/json

  • messagestring

    First message text

Responses

200Support chatroom created or retrievedobject

Show fields (4)
  • chatroomobject
  • participantobject
  • messageobject
  • office_hoursobject

    enabled, open, text (chatroom_support_office_hours_enabled)

Request
curl --request POST \
  --url https://your-instance.iw-erp.de/api/public/chat/support \
  --header 'content-type: application/json' \
  --data '{"message":"string"}'
Response 200 application/json
{}

Get messages for support chat

GET/api/public/chat/message

Query parameters

chatroomrequiredstringChatroom notification token
afterIdintegerLoad messages after this ID
searchStringstringtext to search for in the list
orderFieldNamestringname of the order field
orderFieldSortstringsorting modeAllowed: DESCASC
pageintegerpage of the list
pageSizeintegernumber of entries for each page
withMaxPageNumberstringreturns the number of pages available as a header if this is set

Headers

x-public-session-tokenrequiredstringPublic session token identifying the visitor (may alternatively be passed as the 'x-public-session-token' / 'ps_token' query parameter or, on secure connections, the 'X-PUBLIC-SESSION-TOKEN' cookie)

Responses

default

Request
curl --request GET \
  --url 'https://your-instance.iw-erp.de/api/public/chat/message?chatroom=string'

Send a message in existing support chat

POST/api/public/chat/message

Headers

x-public-session-tokenrequiredstringPublic session token identifying the visitor (may alternatively be passed as the 'x-public-session-token' / 'ps_token' query parameter or, on secure connections, the 'X-PUBLIC-SESSION-TOKEN' cookie)

Request body application/json

  • chatroomstring

    Chatroom notification token

  • messagestring

    Message text

Responses

default

Request
curl --request POST \
  --url https://your-instance.iw-erp.de/api/public/chat/message \
  --header 'content-type: application/json' \
  --data '
{
  "chatroom": "string",
  "message": "string"
}
'