Endpoint: /api/ingress/calls/inbound/billable/{did}/{cid}
Method: POST
API Version Support: v1
This API is meant to be used by Third Party Systems such as Retreaver and Ringba to Ingress in the Cost of a Call.
When setting a call to be billed we also update any leads cost or first contact records related to the latest calls lead.
Please make sure to use Endpoint Protection when giving this access to third party systems as API Keys are unprotected unless specified.
The proper endpoint protection to set for an API using this Endpoint is /api/ingress/calls/inbound/billable*
Make sure to include the *
Data Formats Supported
form-data
, x-www-form-urlencoded
Form Parameters or JSON Body with Content-Type: application/json
set.
JSON Object
{ "cost": "{Cost of the Call}" }
The DID and CID can be passed in the URL but can also be passed in the JSON or POST Body.
Parameter | Required | Format | Description | Aliases |
---|---|---|---|---|
| ✓ | 10 or 11 Digit Phone Number. TLD Will attempt to accept any format of number. | The DID on TLD you sent the Call to. |
|
| ✓ | 10 or 11 Digit Phone Number. TLD Will attempt to accept any format of number. | The CID of the Caller you sent. |
|
| ✓ | integer|decimal. Supports 4 Decimal Places | Cost of the Call when setting to Billable | |
| ✘ | Datetime | Datetime the Call was Billed. Defaults to Now. | |
| ✘ | Datetime | Datetime the Call originally was delivered. This is used to search for the call to connect it to in the Call Log. Defaults to Now. | |
| ✘ | String | Generic Note field that can hold any arbitrary data. |
Return Parameters
Successful JSON Object
{ "cid": "{cid provided}", "did": "{did provided}", "cost": "{cost provided}", "cost_id": "{cost_id created on insertion}", "inserted": { "date_billed": "{date_billed}", "cost": "{cost}", "method": "ingress", "method_id": "{API ID Used}", "ip_address": "{Your IP Address}", "call_date": "{call_date}", "call_from": "{cid}", "call_to": "{did}", "attributable": "1", "attributed": "0", "calculatable": "0", "notes": "{notes}", }, "updated": {Lead Update Result: 0 or 1}, "lead": { "lead_id": "{Lead ID}", "vendor_id": "{Lead Vendor ID}", "account_id": "{Lead Account ID}", "cost": "{Lead Cost}" }, "first_contact": "{First Contact Update Result: 0 or 1} }
Error JSON Object
{ "error": "Error Description" }
Errors Possible
Error | Resolution |
---|---|
No API ID Provided | Check API ID in Header or Parameters. See https://esotech.atlassian.net/wiki/spaces/EXTDOC/pages/186744846/API#Creating-an-API-Key |
No API Key Provided | Check API Key in Headers or Parameters. See https://esotech.atlassian.net/wiki/spaces/EXTDOC/pages/186744846/API#Creating-an-API-Key |
TLDialer Not Enabled | Contact TLD Support to Enable or Investigate. |
Advanced Call Log Not Enabled | Contact TLD Support to Enable or Investigate. |
TLDialer Connection Error | Contact TLD Support to Investigate a Database Issue. |
Missing or Invalid DID | Check DID Parameter |
Missing or Invalid CID | Check CID Parameter |
Invalid DID | Check DID Parameter |
Invalid CID | Check CID Parameter |