Skip to content

Get Status

The status of the whatsapp message can be requested by specifying the request_id that was returned from Send Message endpoint.

Endpoint

GET
/whatsapp/v2/report/{request_id}


POSTMAN

Authentication

AUTHORIZATION: Bearer Token

Request parameters

Parameter Value / Pattern Example(s)
*request_id request_id that was returned from Send Message endpoint ceba9fac-838c-44c7-b67d-03a4a6352058

Response:

200 - Success
    {
    "request_id": "f44e3f43-6d4e-4e46-becd-21993f3dcb8e",
    "messages": [
        {
            "msg_id": "6d29d646-4e09-11ee-84f4-0242ac190006",
            "originator": "9190615xxxx",
            "recipient": "+9190617xxxx",
            "reference": {
                "cust_ref": "customerRef",
                "message_tag1": "...",
                "message_tag2": "...",
                "message_tag3": "...",
                "message_tag4": "...",
                "message_tag5": "...",
                "conversation_id": "..."
            },
            "conversation_type": "marketing",
            "message_type": "TEMPLATE",
            "template_id": "marketing",
            "waConvId": "db311b5709a13ac72c1bd9f293c68625",
            "status": "read",
            "reason": "Read by the user"
        }
    ],
    "request_stage": "processed",
    "schedule_time": null
}
404 - Not Found
{
    "detail": {
        "code": "WHATSAPP_LOG_NOT_EXISTS",
        "message": "Given whatsapp message request id not exists in the system. Please Try Again!"
    }
}

Response Parameters

Parameter Value / Pattern Example(s)
msg_id The message id for each message in the request 5c8d9ed8-590b-11ed-93d2-0242ac140018
originator Sender/Header numbers +971509752655
recipient Destination numbers +971509752655
cust_ref A unique id send by the customer for every message
message_tag1-message_tag5 To Specify the message tag
conversation_id Some Optional Conversation ID
conversation_type Type of your conversation. It includes marketing, service, utility marketing
message_type Type of the message inside the content. Valid values: TEXT, ATTACHMENT, LOCATION, CONTACTS, TEMPLATE. TEMPLATE
template_id ID of your template marketing
waConvId whatsapp conversation id db311b5709a13ac72c1bd9f293c68625
reason Description of your status Read by the user
status This is the status of the message, and we have the following statuses: [delivered - Delivered to destination and confirmed], [sent - Was sent to telecom and is awaiting acknowledgement], [scheduled - Message scheduled], [un_delivered - Failed delivery], [processed - message is processed], [rejected - Rejected the message], [insufficient_credit - User does not have enough credit], [read - Read by the user] read

Programming Examples

curl --location -g --request GET 'https://api.d7networks.com/whatsapp/v1/report/{{request_id}}' \
--header 'Authorization: Bearer {{api_access_token}}'
npm i direct7
1
2
3
4
5
6
7
8
const Client = require('direct7')

const client = new Client(apiToken="Your API token")

# request_id is the id returned in the response of send_message
const response = await client.whatsapp.getStatus({request_id: "987efe2a-c68f-4cfb-8301-662b574d21c0"});

console.log(response);
pip install direct7
1
2
3
4
5
6
from direct7 import Client

client = Client(api_token="Your API token")

# request_id is the id returned in the response of send_message
client.whatsapp.get_status(request_id="0012c7f5-2ba5-49db-8901-4ee9be6dc8d1")

composer require direct7/direct7-php
require_once 'vendor/autoload.php';
1
2
3
4
5
6
7
8
9
require_once __DIR__ . '/vendor/autoload.php';

use direct7\Direct7\Client;

$client = new Client(api_token="Your API token")

$response = $direct7->whatsapp->getStatus('469affd7-0983-4bbc-9d07-ee43e1d1cfef');

var_dump($response);
go get -u github.com/d7networks/direct7-go-sdk
1
2
3
4
5
6
7
8
import (
    "github.com/d7networks/direct7-go-sdk/direct7"
    )   
apiToken := "Your Api Token"
client := direct7.NewClient(apiToken)
whatsapp := direct7.NewWhatsApp(client)
requestID := "001ff613-de30-4f82-81f6-1fe944b8f61b"
statusResponse, err := whatsapp.GetStatus(requestID)
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = RequestBody.create(mediaType, "");
Request request = new Request.Builder()
.url("https://api.d7networks.com/whatsapp/v1/report/{{request_id}}")
.method("GET", body)
.addHeader("Authorization", "Bearer {{api_access_token}}")
.build();
Response response = client.newCall(request).execute();
var headers = {
'Authorization': 'Bearer {{api_access_token}}'
};
var request = http.Request('GET', Uri.parse('https://api.d7networks.com/whatsapp/v1/report/{{request_id}}'));

request.headers.addAll(headers);

http.StreamedResponse response = await request.send();

if (response.statusCode == 200) {
print(await response.stream.bytesToString());
}
else {
print(response.reasonPhrase);
}
1
2
3
4
5
$headers = New-Object "System.Collections.Generic.Dictionary[[String],[String]]"
$headers.Add("Authorization", "Bearer {{api_access_token}}")

$response = Invoke-RestMethod 'https://api.d7networks.com/whatsapp/v1/report/{{request_id}}' -Method 'GET' -Headers $headers
$response | ConvertTo-Json
gem install direct7
1
2
3
4
5
6
require 'direct7'

client = Direct7::Client.new('Your API token')

# request_id is the id returned in the response of send_message
client.whatsapp.get_status(request_id="0012c7f5-2ba5-49db-8901-4ee9be6dc8d1")