getbroadcastmesssagestatus
POST v1/application/getbroadcastmesssagestatus#
With this API, you can query the per-customer sending status of a broadcast message you sent earlier. To do this, you need the broadcastId returned by the broadcastmesssage API.
Since sending is asynchronous, customers that have not been processed yet may not appear in the list for queries made right after the broadcast request.
API requests
- Must be authenticated with HMAC Authentication. For HMAC Authentication, see the Authentication document.
- API URI : https://DIYALOG-SERVER-API-ENDPOINT/v1/application/getbroadcastmesssagestatus
- HTTP Request Type POST
- HTTP Content-Type application/json
Request Body#
| Schema |
|---|
| json object |
| broadcastId (String) The unique id returned in the response of the broadcastmesssage API. |
Example Json Request Body :#
Responses#
| HTTP 200 Response |
|---|
| json object array The API returns a json array containing one object per customer. If the broadcastId is not found or no customer has been processed yet, an empty array is returned. |
| id (String) Id of the broadcast message (broadcastId). |
| customerId (String) Customer number. |
| customerUserId (integer) Optional. Diyalog user id of the customer. Not returned when sending fails. |
| isSuccess (boolean) Indicates whether the message was sent to the customer. |
| errorCode (String) Optional. Indicates the reason for the error when isSuccess is false. It can take the following values. Customer not found in system. : No customer registered in the Diyalog system was found for the customer number. Müşterinin SMS ileti izni yok. : The customer does not have marketing SMS consent. Müşterinin ileti izni kaydı bulunamadı. : No record for the customer was found in the communication consent service. Servis timeout'u nedeniyle ileti izni okunamadı. : The communication consent service did not respond in time. İleti izni servisi hata verdiği için ileti izni okunamadı. : The communication consent service returned an error. For other unexpected errors during sending, the error message (up to 512 characters) is returned. |
| createdAt (Unix epoch timestamps (miliseconds)) Creation time of the broadcast request. |
| sendAt (Unix epoch timestamps (miliseconds)) Optional. Time at which the message was processed for the customer. |
| customerReply (String) Optional. Reserved for the customer's reply. Currently not populated. |
Example Response Body :#
| HTTP 400 Response |
|---|
| string If the request body is not valid JSON, a required field is missing, or a field has the wrong type, the API returns a response with the HTTP 400 status code. The error message is returned as text. |
| HTTP 500 Response |
|---|
| string When the API encounters a general error, it will return a response with the HTTP 500 status code. The API's error message is returned as text. |
If the request fails HMAC validation, the following errors are returned as plain text. See Authentication.
| HTTP status | Message | Description |
|---|---|---|
| 400 | Required headers not found | One or more of the x-dlg-date, x-dlg-requester-userid or x-dlg-authorization headers are missing. |
| 400 | Authorization failed due to data format not valid | The x-dlg-authorization value after DLGA is not in the AccessKeyId:Signature form. |
| 400 | Date format is invalid. EEE, dd MMM yyyy HH:mm:ss Z is requied | The x-dlg-date value cannot be parsed in this format. The message text is returned as shown, including its spelling. |
| 401 | Authorization failed | The x-dlg-authorization header does not contain DLGA , the AccessKeyId is unknown, or the signature is not correct. |
| 401 | You have no permission on this operation. Contact your admin. | The signature is correct, but your access key has no application permission. |
| 403 | Request time may not be correct. | The x-dlg-date value differs from the server time by more than 15 minutes. |