get
https://api.dengage.com/rest/transactional/whatsapp
The GetTransactionalWhatsappReport function returns the send and event report of transactional WhatsApp messages. Both template messages sent with SendTransactionalWhatsapp (POST /transactional/whatsapp) and chat messages sent with SendChatMessage (POST /transactional/whatsapp/sendChatMessage) are included.
Required permission: transactionalWhatsapp.read
Query Modes
1. Single send lookup (transactionId)
transactionIdis the value returned by the send endpoints.- When
transactionIdis provided,beginTime,endTime,gsm,tag,messageTypeandeventTypeare ignored and not validated. Date range rules do not apply. - At most one record is returned. If no send exists with this
transactionId,resultis empty. limitandoffsetare still validated. Keepoffsetas0, otherwise the result is empty.
2. List query (without transactionId)
beginTimeandendTimeare required.endTimecannot be earlier thanbeginTime, and the range cannot be longer than 7 days.- Sends are filtered by their send time (
createdAt). BothbeginTimeandendTimeare inclusive. beginTimeandendTimeare evaluated in your account's time zone, the same time zone ascreatedAtin the response.gsm,tag,messageTypeandeventTypeare optional and can be combined. All provided filters are applied together (AND).
Filter Rules
| Parameter | Rule |
|---|---|
gsm | Exact match with the recipient number used in the send request. The number is stored as it was sent, so +905xxxxxxxxx and 905xxxxxxxxx are different values. Use the same format you used while sending. |
tag | Exact match (case-sensitive) with one of the tags given in the send request. A send with several tags is returned when any of its tags matches. |
messageType | TEMPLATE or CHAT (case-insensitive). TEMPLATE returns template sends, CHAT returns chat message sends. |
eventType | DL, OP, BO or ER (case-insensitive). Returns sends that have at least one event of this type, even if it is not the latest event. The events array of a returned send still contains all of its events. |
Event Types
| Code | Meaning |
|---|---|
DL | Delivered to the recipient |
OP | Read by the recipient |
BO | Bounced, the message could not be delivered |
ER | Error |
Click and unsubscribe events are not reported for transactional WhatsApp messages.
Response Details
- Each item in
resultis one send. Sends are ordered bycreatedAt, newest first. eventType,eventDateandeventReasonshow the latest event of the send, which is its current status. They arenullwhen no event has been received for the send yet.eventscontains all events of the send, ordered from oldest to newest. It is an empty array when no event has been received yet.eventReasoncontains the error detail when there is one, otherwise it isnull.messageTypeisTEMPLATEfor template sends andCHATfor chat message sends.templateNameandtemplateIdarenullfor chat message sends.partnerIdis the encrypted partner ID, in the same format as thepartnerIdused in the send request.- WhatsApp auto reply messages are not included in the report.
Paging
limitis the page size: between 100 and 1000, default 100.offsetis the number of sends to skip: 0 or greater, default 0.queryForNextPageistruewhen there are more sends after this page. To get the next page, send the same request withoffsetincreased bylimit.affectedRowCountis the number of sends in this page.- The total number of matching sends is not returned.
Errors
Only the first failing rule is returned. Validation errors return HTTP 400 with code 11:
| Parameter | Rule | Error message |
|---|---|---|
beginTime | Required when transactionId is not provided | beginTime is required when transactionId is not provided |
endTime | Required when transactionId is not provided | endTime is required when transactionId is not provided |
endTime | Cannot be earlier than beginTime | endTime cannot be earlier than beginTime |
beginTime / endTime | Range cannot be longer than 7 days | Time range cannot be greater than 7 days |
limit | Between 100 and 1000 | limit value must be between 100 and 1000 |
offset | 0 or greater | offset value cannot be less than 0 |
messageType | TEMPLATE or CHAT | messageType must be one of: TEMPLATE, CHAT |
eventType | DL, OP, BO or ER | eventType must be one of: DL, OP, BO, ER |
| Any parameter | Value cannot be converted to its type (invalid uuid, date or number) | Invalid parameter. Could not convert {Parameter}:{value} to {Type}. |
Other errors:
- Too many concurrent requests: HTTP 400 with code
429. - Missing
transactionalWhatsapp.readpermission: HTTP 403 with code10. - Unexpected server error: HTTP 500 with code
999.
Recent Requests
Log in to see full request history
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
Loading…
401Not authenticated. Please re-login.