Skip to content Skip to main navigation Skip to footer

Get Last Notification For Plan API

Request URL

GET https://api.phonenumbermonitoring.com/GetJobStatus/lastbyID?apiuid=XXXXXXXXXX&id=XX

Returns the last notification within the last 24 hours for the plan with the specified ID. 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:

  • incorrectresponse – incorrect response code
  • noanydigit – no any key pressed
  • sysphoneerror – phone system error
  • noanswer – no answer received
  • busy – line is busy
  • fails – connection failed
  • success – successful call attempt
  • answer – call answered
  • anydigit – any key pressed
  • anyword – any word from specified answered
  • rtmtimeout – RTM timeout reached

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 the last notification 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": "15442625186",
        "planName": "test",
        "notification": {
            "notificationID": 3846806,
            "phoneNumber": "15644625186",
            "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"
                }
            ]
        }
    }
}

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:

  • Disabled – postponed plan
  • Enabled – active plan
  • Incomplete – no schedule set for the plan
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.