Skip to content
This repository was archived by the owner on May 27, 2020. It is now read-only.

Commit 37a8c20

Browse files
author
Sanjeev Mandalapu
committed
Added notes on how to retrieve callback failures based on status
1 parent 0854b38 commit 37a8c20

File tree

2 files changed

+50
-5
lines changed

2 files changed

+50
-5
lines changed

source/includes/_callbacks.md

Lines changed: 45 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -694,6 +694,7 @@ Accept: application/vnd.whispir.api-callback-v1+json
694694
"id": "B3EDFE83DF389DFE",
695695
"messageId": "ABC4857BCCF484575FCA",
696696
"messageLocation": "https://api.whispir.com/messages/ABC4857BCCF484575FCA",
697+
"status": "FAILED",
697698
"from": {
698699
"name": "Fred Waters",
699700
@@ -729,8 +730,6 @@ Accept: application/vnd.whispir.api-callback-v1+json
729730
}
730731
```
731732

732-
To retrieve a list of attempted API calls from the Whispir API you can execute an **HTTP GET** using the `/calls` endpoint on a specific `callback`.
733-
734733
You will need to supply one of the following headers (for retrieving JSON or XML):
735734

736735
- Accept: application/vnd.whispir.api-call-v1+xml
@@ -832,6 +831,49 @@ Each of these calls will provide the following information:
832831
</tbody>
833832
</table>
834833

834+
**Retrieving the list of calls based on their Status**
835+
836+
> Retrieve based on Status
837+
838+
> > Failed Calls
839+
840+
```
841+
HTTP 1.1 GET https://api.whispir.com/callbacks/BCD374DABC73649B/calls?apikey=[your_api_key]&status=FAILED
842+
Authorization: Basic am9obi5zbWl0aDpteXBhc3N3b3Jk
843+
```
844+
845+
> > Success Calls
846+
847+
```
848+
HTTP 1.1 GET https://api.whispir.com/callbacks/BCD374DABC73649B/calls?apikey=[your_api_key]&status=SUCCESS
849+
Authorization: Basic am9obi5zbWl0aDpteXBhc3N3b3Jk
850+
```
851+
852+
To retrieve a list of attempted API calls from the Whispir API you can execute an **HTTP GET** using the `/calls` endpoint on a specific `callback`.
853+
854+
To specifically retrieve the FAILED/SUCCESS calls, one can pass a **status** query param in the URL.
855+
856+
<table>
857+
<thead>
858+
<tr>
859+
<th style="width: 50%" colspan="2">Query params</th>
860+
</tr>
861+
</thead>
862+
<tbody>
863+
<tr>
864+
<td style="text-align: right; font-weight: bold;">status:</td>
865+
<td><strong>String</strong><br/>
866+
The status value can be one of:
867+
<ul>
868+
<li>&status=SUCCESS</li>
869+
<li>&status=FAILED</li>
870+
</ul>
871+
Only calls with requested STATUS will be present in the response.
872+
</td>
873+
</tr>
874+
</tbody>
875+
</table>
876+
835877
**Updating the status of calls to a callback**
836878

837879
As every call to a callback endpoint is now stored within the `calls` endpoint, it's possible that when failed calls are successfully processed through a manual exercise, that these calls will then need to be updated to reflect the current status.
@@ -852,7 +894,7 @@ This process can be facilitated with the use of a `PUT` request to the `/calls`
852894
> > The following API Methods allow you to update callback attempts via the API
853895
854896
```
855-
HTTP 1.1 PUT https://api.whispir.com/callbacks/BCD374DABC73649B/calls?apikey=[YOUR_API_KEY]&id[]=YOUR_CALL_ID
897+
HTTP 1.1 PUT https://api.whispir.com/callbacks/BCD374DABC73649B/calls?apikey=[YOUR_API_KEY]&id=YOUR_CALL_ID
856898
Authorization: Basic am9obi5zbWl0aDpteXBhc3N3b3Jk
857899
```
858900

source/includes/_messages.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1408,7 +1408,7 @@ The same message could be saved into a Whispir Message Template (see code exampl
14081408

14091409
Using this Message Template ID and now using the Message Attribute @@event_expiry@@, the updated is far simpler to implement and is more efficient.
14101410

1411-
> Using Template (with attributes)
1411+
> Using Template (with attributes)
14121412
> > to send the Message
14131413
14141414
```
@@ -1431,7 +1431,10 @@ Content-Type: application/vnd.whispir.message-v1+json
14311431
}
14321432
```
14331433

1434-
*Note:* Message Attributes are not enabled by default for Whispir Customers. These can be configured in your account with some cost - by contacting your Whispir Representative or <a href="mailto:[email protected]">[email protected]</a>
1434+
*Note:*
1435+
1436+
* User-defined attributes available through the API are configured at the account level and require Whispir administrative assistance to enable.
1437+
* You can start using user-defined attributes through the api by contacting your Whispir Customer Success Representative or <a href="mailto:[email protected]">[email protected]</a>
14351438

14361439

14371440

0 commit comments

Comments
 (0)