Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 6 Next »


Pull API - Using Phonon UUID

Use the Pull API to get the details for one or more Phonon UUIDs after the call is over.

Before sending the request, make sure to whitelist your IP through which you are sending API request in the whitelist section.

Request Parameters:

Method

POST

Body

JSON

Headers

Content-Type: application/json

Auth

None

URL

Please contact your Customer Success Manager for the URL

Request Payload:

{
  "phonon-uuids": [
    {"<36 character alphanumeric Phonon UUID>"},
    {"<36 character alphanumeric Phonon UUID>"},
    ...
  ],
  "fetch-attempt": "ALL" // ALL = Fetch all attempts; LAST = Fetch only last attempt
}

Sample Request:

{
	"phonon-uuids": [
		"b2f9909e-9ac4-4e5c-9ac8-183f24ea9436"
	],
	"fetch-attempt": "ALL"
}

The Pull API has now been updated to take additional parameters in the Request Payload in the new version of the Pull API URL. This is done to ensure an additional layer of authentication or security step.

Please contact your Customer Success Manager for the updated URL.

Pull API Version 2.0

Request Payload:

{
    "security-id": "<64 character alphanumeric Security ID>",
    "flow-id": "<8 character alphanumeric Flow ID>",
     "phonon-uuids": [
         {"<36 character alphanumeric Phonon UUID>"},
         {"<36 character alphanumeric Phonon UUID>"},
          ...
  ],
  "fetch-attempt": "ALL" // ALL = Fetch all attempts; LAST = Fetch only last attempt
}

Sample Request:

{
    "phonon-uuids": [
        "019060e2-2788-4b5a-a87f-c1508ee29999",
        "1591df5e-d434-4921-923e-32e04b8b9999"
    ],
    "fetch-attempt": "ALL",
    "flow-id": "iH5Gzxxx",
    "security-id": "437457061e066a3f5c6520cba6fc920965a3d84386d863610dcad56d39699999"
}

Notes:

  1. Ensure valid JSON format

  2. Ensure IP is Whitelisted in your account

  3. Ensure your account validity is not expired

  4. Ensure number of Phonon UUIDs is less than Max data size (500 UUIDs is current max limit) - Response will contain api-response-message as ‘Max Data List Size Exceeded’ and no result will be fetched.


Response Parameters:

If there’s no data available:

{
  "api-response-code": 213,
  "api-response-message": "No Data Available",
  "data": []
}

Data Response Schema:

{
  "api-response-code": 200,
  "api-response-message": "Success",
  "data": [
    {
      "request-id": "<36 character alphanumeric Request ID>",
      "phonon-uuid": "<36 character alphanumeric Phonon UUID>",
      "status": "<Status of the call>",
      "attempt-details": [
        {
          "attempt-id": "<39 character alphanumeric Attempt UUID>",
          "callDetails": [
            {
              "startTime": "<Start time of the call in ISO-8601 Date Time, Eg. 2021-09-01T12:47:06.059+05:30>",
              "connectTime": "<Connect time of the call in ISO-8601 Date Time>",
              "hangupTime": "<Hangup time of the call in ISO-8601 Date Time>,
              "calleeNumber": "<Number of the callee>",
              "calleeType": "<Type of the callee; Eg: VISITOR>",
              "originateType": "<Product used, Eg. OUTBOUND_CALL>",
              "didNumber": "DID Number, Eg. 912268701914",
              "hangupCause": <ISDN Cause Code, Eg. 16>,
              "hangupCauseMessage": "<Hangup Cause Code Message, Eg. Connected>",
              "durationInSeconds": 57.717,
              "dtmfPressesd": [],
              "incoming": false
            }
          ],
           "smsDetails": [
            {
              "id": "<36 characters alphanumeric SMS ID>",
              "text": "<SMS Text>",
              "to": "<Customer Number, 918000374228>",
              "from": "<Sender ID, MIALOCC>",
              "sendTime": "<Sent Time, Eg. 2021-06-06T16:22:25.767+05:30>",
              "deliveryStatus": "<Current SMS Status, Eg. DELIVERED>"
            }
          ],
          "emailDetails": [
            {
              "id": "<36 characters alphanumeric Email ID>",
              "subject": "<Email Alert; Eg. MMR Alert>",
              "content": "<Email Body Content>",
              "from": "<Email ID>",
              "size": <Email Size, 1.54>,
              "addresses": [
                {
                  "id": "<Email ID>",
                  "type": "TO",
                  "deliveryStatus": "DELIVERED",
                  "deliveryTime": "2021-06-06T16:23:23.676+05:30"
                }
              ],
              "sendTime": "<Email Sent time, Eg: 2021-06-06T16:23:16.444+05:30>"
            }
          ],
          "keys": [
            {
              "name": "$flow.key.variable1",
              "value": "<Flow Variable Value>"
            },
            {
              "name": "$flow.key.Language",
              "value": "English"
            }
          ]
        }
      ]
    }
  ]
}

  • No labels