Note: The API is limited to Enterprise Customers only. The feature is new and is under active development. We welcome any questions or feedback you may have. Feel free to reach out to us at [email protected].
View more API Endpoints
Summary
Fetches statistical data related to eCards, including counts by type and specific data based on query parameters. The response will include pagination details and totals for each type of share (email, Facebook, Twitter).
Note: To get your API Key, go to the Account Info page in your account. Also, be careful to never expose this key, it gives full access to your account and all data.
Request URL
GET /api/stats/list
Request Parameters
Name | Type | Description | Required |
| string | Filter results by type ( | No |
| integer | The page number for pagination. | No |
| integer | The number of results per page (Max 200). | No |
| integer | Filter results by widget ID. | No |
| integer | Filter results by eCard ID. | No |
| boolean | Include email addresses in the response. | No |
Authorization
Header: Authorization: Bearer YOUR_API_KEY
Request Example
GET https://app.ecardwidget.com/api/stats/list?perPage=1&page=1&includeEmails=true
Header ‘Authorization: Bearer YOUR_API_KEY’
Response
The response will include a meta
object with pagination details and totalsByType
for the number of shares via different methods. The data
array includes the individual records.
Response Object
Field | Type | Description |
| object | Metadata for pagination and totals. |
| array | Array of stat objects. |
| string | Any additional messages. |
| boolean | Indicates the success of the request. |
Meta Object
Field | Type | Description |
| object | Pagination details. |
| object | Totals for each type of share. |
Data Object (Stat)
Field | Type | Description |
| string | Timestamp of the stat. |
| string | Email of the recipient. |
| string | Email of the sender. |
| integer | Widget ID. |
| integer | eCard ID. |
| integer | ID of the stat. |
| string | Type ( |
| string | Name of the sender. |
| string | Name of the recipient. |
Response Example
{ "meta":
{ "pagination":
{ "perPage": 1,
"totalPages": 27,
"currentPage": 1,
"totalRecords": 263 },
"totalsByType": {
"twitter": 554,
"facebook": 859,
"email": 921 }
},
"data": [ {
"createdAt": "April, 12 2021 15:31:03 +0000",
"recipient_email": "[email protected]",
"sender_email":
"[email protected]",
...
}
],
"message": "",
"success": true
}
Status Codes
200 OK
: The request was successful.401 Unauthorized
: Invalid API key.400 Bad Request
: The request was malformed or invalid.