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.
Endpoint: /api/ingress/calls/inbound/billable/{did}/{cid}
Method: POST
API Version Support: v1
Info |
---|
Security Notice: Please make sure to use |
...
https://esotech.atlassian.net/wiki/spaces/EXTDOC/pages/186744846/API#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 |
Data Formats Supported
form-data
, x-www-form-urlencoded
Form Parameters or JSON Body with Content-Type: application/json
set.
JSON Request Object
Code Block | ||
---|---|---|
| ||
{ "cost": "{Cost of the Call}" } |
...
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. | |
| ✘ | Datetimedatetime | Datetime the Call was Billed. Defaults to Now. | |
| ✘ | Datetimedatetime | 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. | |
| ✘ | Stringstring | Generic Note field that can hold any arbitrary data. |
Return Parameters
...
JSON Success Object
Code Block | ||
---|---|---|
| ||
{ "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} } |
JSON Error
...
Object
Code Block | ||
---|---|---|
| ||
{ "error": "Error Description" } |
...
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 |
Missing or Invalid CID | Check CID |
Invalid DID | Check DID |
Invalid CID | Check CID |