General
Contact Centre General API Calls
Report
This API returns a report on activity over a time period.
Date filtering is applied independently for transactions and workflow people.
People Approved are all people that were created, within the given timeframe, that have been approved; when these people were approved does not matter for this block of data. If people were not created by the given API token the results won’t appear in the report.
Transactions Successful are all transactions (accepted/paid), within the given timeframe, for people that have been created using the given API token; when these people were created does not matter for this block of data.
Path |
---|
/report |
Request (GET)
All of the following query parameters must be provided.
Query Parameter | Data type | Description |
---|---|---|
start_date | date | Only records created after or equal to this date will be considered |
end_date | date | Only records before or equal to this date will be considered |
Response (JSON)
Note: status code 400 will be returned if the date is not in an acceptable format; multiple formats are accepted but ‘YYYY-MM-DD’ is the recommended date format.
Data is returned as a JSON object in the following format:
{
"info": {
"people": {
"approved": 1234,
"rejected": 0
},
"companies":{
"approved": 1234,
...
},
"updates": {
"approved": 1234,
...
},
"company_updates": {
"approved": 1234,
...
},
"increases": {
"approved": 1234,
...
},
"transactions": {
"approved": 1234,
...
},
"products": {
"approved": 1234,
...
},
"subscriptions": {
"approved": 1234,
...
},
"pending": 1
},
"people_approved": [{
"id_number": "2001014800086",
...
}],
"companies_approved": [{
"company_name": "Test Inc.",
...
}],
"people_declined": [{
"id_number": "2001024800084",
...
}],
"companies_declined": [{
"company_name": "Test Inc.",
...
}],
"people_updates_approved": [{
...
}],
"company_updates_approved": [{
...
}],
"people_updates_declined": [{
...
}],
"company_updates_declined": [{
...
}],
"increases_approved": [{
"product_name": "ProductX",
...
}],
"increases_declined": [{
"product_name": "ProductY",
...
}],
"products_add_approved": [{
...
}],
"products_add_declined": [{
...
}],
"subscriptions_add_approved": [{
...
}],
"subscriptions_add_declined": [{
...
}],
"pending": [{...}],
"workflows": [{
...
}]
}
Some records may be null depending on the type of workflow item.
Transactions
This API returns all transactions for a specific agent over a time period.
Path |
---|
/transactions |
Request (GET)
All of the following query parameters must be provided.
Query Parameter | Data type | Description |
---|---|---|
start_date | date | Only records created after or equal to this date will be considered |
end_date | date | Only records before or equal to this date will be considered |
Response (JSON)
Note: status code 400 will be returned if the date is not in an acceptable format; multiple formats are accepted but ‘YYYY-MM-DD’ is the recommended date format.
Data is returned as a JSON object in the following format:
{
"status": true,
"total": 5435,
"records": [{
"transaction_number": "de9f732d-17b7-4673-bcd4-97f9500c7852",
"amount": "400.00",
"status": "Paid",
"transaction_date": "2023-07-31",
"id_number": "4654665466",
"company_name": null,
"response_reason": "",
"reference_number": "10767",
"member_number": "445454",
"workflow_reference": null
}]
}
Decline
This API call will provide for declining pending workflow items for the agent associated with the API key.
Path |
---|
/report/decline/:unique_workflow_id |
Request (POST)
Empty body, the unique_workflow_id in the path is the ID provided in the response when submitting a workflow item
Response (JSON)
Data is returned as a JSON object in the following format with multiple sections:
{
"status": true,
"error": null
}
Parameter | Type | Description |
---|---|---|
status | boolean | True: decline successfully processed, False: an error occurred |
error | string | Description as to why item could not be declined (if rejected) |