-
Notifications
You must be signed in to change notification settings - Fork 0
API Function: Get Message Status
Jakob Ø. Rasmussen edited this page May 12, 2025
·
4 revisions
The endpoint is reachable at /api/v1/message-status and takes one required query parameter messageId.
Returns the latest status of a message. It is only possible to see the status of messages sent by the caller and not messages by other clients.
GET https://dpk.test.tcs.trifork.cloud/api/v1/message-status?messageId=6dcbd8f8-cb0e-475a-848b-fe45516b5a22
Returns the following json content:
{
"status": "Success",
"result": {
"messageId": "6dcbd8f8-cb0e-475a-848b-fe45516b5a22",
"status": "DELIVERED",
"date": "2025-05-12 10:45:00"
}
}A message can be in one of the following states:
| Status | Description |
|---|---|
| PENDING | Waiting to be dispatched by the dispatcher service |
| DISPATCHED | Dispatched to Digital Post and waiting for receipt |
| DELIVERED | Delivered to Digital Post or Strålfors |
| FAILED | Failed to deliver and/or dispatch, see the status info field |
| IGNORED | Caller attempted to send to Digital Post but recipient is non-digital and no backup/physical template is specified |
In case of an error, the service responds with a status code 40x or 50x and corresponding JSON value:
{
"status": "Failed",
"error_code": "NOT_FOUND_MESSAGEID"
}The following request error codes may be returned by the system:
| Error Code | Description/Reason | Status |
|---|---|---|
| INTERNAL_ERROR | An internal error occured while processing the request | 500 |
| BAD_CERTIFICATE | The provided TLS certificate contained invalid information | 401 |
| INVALID_MESSAGEID | The messageId query parameter was malformed |
400 |
| NOT_FOUND_MESSAGEID | The specified message ID could not be found or was not sent by calling system | 404 |