Get Notifications By Plan API
Request URL
GET https://api.phonenumbermonitoring.com/GetJobStatus/byID?apiuid=XXXXXXXXXX&id=XX
Returns information about notifications for the plan with the specified ID within the last 24 hours. You can specify a custom date range with the query parameters.
Query Parameters
Field | Required | Description |
---|---|---|
apiuid |
required |
API UID for your PNM account. |
status |
optional |
The status of the calls which notifications you want to receive.
Possible values:
|
start |
optional |
The start date of the period for which the notifications need to be retrieved from the system.
Date format: YYYY-MM-DD |
end |
optional |
The end date of the period for which the notifications need to be retrieved from the system.
Date format: YYYY-MM-DD |
id |
required |
The plan ID. To get available plan IDs use the /plans method. |
Response
If the request succeeds, the server responds with the 200 HTTP status code and notifications for the specified plan as defined by the query parameters. The default report period is the last 24 hours.
{ "plan": { "id": 714, "nextActive": "null", "status": "Disabled", "phoneNumber": "15672445186", "planName": "test new", "notification": [ { "notificationID": 3846806, "phoneNumber": "156724425186", "Created": "12/7/2021 10:09:21 AM", "cost": 0, "result": "Failed", "calls": [ { "callID": 3924857, "callTime": "12/7/2021 10:09:21 AM", "duration": 0, "captured": "", "result": "NoAnswer" } ] }, { "notificationID": 3420910, "phoneNumber": "15672445186", "Created": "5/12/2021 10:55:33 AM", "cost": 1, "result": "Failed", "calls": [ { "callID": 3494301, "callTime": "5/12/2021 10:55:33 AM", "duration": 21, "captured": "", "result": "IncorrectResponse" } ] } ] } }
Response Description
Field | Description |
planID | The ID of the monitoring plan in the PNM account. Use to request notification information by a plan id. |
nextAcitve | The date and time of the next call. |
status | The status of the monitoring plan.
Possible value:
|
phoneNumber | The monitored phone number. |
planName | The name of the plan as specified in the PNM service. |
notifications | An array of notifications generated for the related plan for the specified period. |
notificationID | The notification ID. |
Created | The date and time when the notification was created. |
cost | The cost of the call. “Null” is set for the unanswered calls. |
result | The call status. The possible values: incorrectresponse, noanydigit, sysphoneerror, noanswer , busy, fails, success, answer, anydigit, anyword, rtmtimeout |
calls | An array of calls. |
callID | The call ID. |
callTime | The time when the call happened. |
duration | The duration time of the call. |
captured | The response that was captured if the call was answered. |