import plivo

client = plivo.RestClient(auth_id="<auth_id>", auth_token="auth_token")

# Get MDR
response = client.messages.get(message_uuid='d6d17dd2-b9fe-4cf8-acfd-c6a8b959ea38')
print(response)
{
    "api_id": "85a704c8-e47a-11eb-9a69-0242ac110004",
    "carrier_fees": "0.04",
    "carrier_fees_rate": "0.04",
    "error_code": "000",
    "from_number": "17087654321",
    "is_domestic": "false",
    "mcc": "312",
    "message_direction": "outbound",
    "message_state": "delivered",
    "message_time": "2021-07-13 13:04:06.799021+05:30",
    "message_type": "sms",
    "message_uuid": "b48d95dc-e3ac-11eb-a9c2-0242ac110005",
    "mnc": "650",
    "powerpack_id": "1d5f3dd8-b207-4738-b59f-3c2ac7d3461c",
    "resource_uri": "/v1/Account/{auth_id}/Message/b48d95dc-e3ac-11eb-a9c2-0242ac110005/",
    "to_number": "12401234567",
    "total_amount": "0.00140",
    "total_rate": "0.00140",
    "tendlc_campaign_id": "CD4WJJD",
    "tendlc_registration_status": "registered",
    "destination_country_iso2": "US",
    "units": 1,
    "replaced_sender": "17087654321",
    "is_domestic": false,
    "dlt_entity_id": "",
    "dlt_template_id": "",
    "dlt_template_category": "",
    "requester_ip": "192.168.0.1",
    "destination_network": "verizon", 
    "conversation_id": "2b89d38b573b5ca0a1e85ba3b8d159fc",
    "conversation_origin": "authentication",
    "conversation_expiration_timestamp": "2024-02-13 01:21:00-08:00", 
    "log": "number_only"

}

Retrieves a Message Detail Record (MDR).

API Endpoint

GET
https://api.plivo.com/v1/Account/{auth_id}/Message/{message_uuid}/

Arguments

No arguments need to be passed.

Returns

This API call returns the Message Detail Record for the message identified by the message_uuid specified in the request URL.

import plivo

client = plivo.RestClient(auth_id="<auth_id>", auth_token="auth_token")

# Get MDR
response = client.messages.get(message_uuid='d6d17dd2-b9fe-4cf8-acfd-c6a8b959ea38')
print(response)
{
    "api_id": "85a704c8-e47a-11eb-9a69-0242ac110004",
    "carrier_fees": "0.04",
    "carrier_fees_rate": "0.04",
    "error_code": "000",
    "from_number": "17087654321",
    "is_domestic": "false",
    "mcc": "312",
    "message_direction": "outbound",
    "message_state": "delivered",
    "message_time": "2021-07-13 13:04:06.799021+05:30",
    "message_type": "sms",
    "message_uuid": "b48d95dc-e3ac-11eb-a9c2-0242ac110005",
    "mnc": "650",
    "powerpack_id": "1d5f3dd8-b207-4738-b59f-3c2ac7d3461c",
    "resource_uri": "/v1/Account/{auth_id}/Message/b48d95dc-e3ac-11eb-a9c2-0242ac110005/",
    "to_number": "12401234567",
    "total_amount": "0.00140",
    "total_rate": "0.00140",
    "tendlc_campaign_id": "CD4WJJD",
    "tendlc_registration_status": "registered",
    "destination_country_iso2": "US",
    "units": 1,
    "replaced_sender": "17087654321",
    "is_domestic": false,
    "dlt_entity_id": "",
    "dlt_template_id": "",
    "dlt_template_category": "",
    "requester_ip": "192.168.0.1",
    "destination_network": "verizon", 
    "conversation_id": "2b89d38b573b5ca0a1e85ba3b8d159fc",
    "conversation_origin": "authentication",
    "conversation_expiration_timestamp": "2024-02-13 01:21:00-08:00", 
    "log": "number_only"

}