DialTel
Login Login
DialTel Home Services Pricing Webinars Testimonials FAQs Get Started
  1. Voice Broadcasting
  2. Ringless Voicemail
  3. Call Tracking

Rest API

Rest API

Rest API Overview

The Dialtel API is organized around REST. Our API is designed to have predictable, resource-oriented URLs, to use HTTP response codes to indicate API errors, and to use built-in HTTP features. This allows us to utilize HTTP authentication and HTTP verbs which can be understood by off-the-shelf HTTP clients.

The APIs are hosted on Google AppEngine to provide world-class performance and reliability. XML or JSON will be returned in all responses from the API, including errors.


Security

HTTPS is required by all apis.

HTTP Basic Authentication is used unless it is not applicable to the api. Those apis are either unauthenticated or require an expirable one-time token. The application does not have a concept of sessions. This is the responsibility of the user interface to manage.


RESTful purity

The APIs follow REST conventions when possible. A URL specifies a resource, HTTP verbs indicate the action on that resource, and HTTP response codes indicate the action's result.

Get
Retrieve the resource
Put
Update the resource
Post
Create the resource
Delete
Delete the resource

HTTP Accept Header

The Accept header specifies the mime-type of the request and response body, defaulting to XML if unspecified or not accepted.

application/json
JSON
application/xml
XML

HTTP Response Codes

200
OK
400
Bad Request
401
Not Authorized
404
Not Found
5XX
Internal Error

HTTP Response Body

All responses include a body in a common XML envelope. A payload within the envelope is optional. The response code is included within the envelope for convenience.


XML

Success

<rsp stat="ok" code="200">
/* optional payload */
</rsp>

// A paginated response has the form:
<rsp stat="ok" code="200">
<startIndex>0</startIndex>
<count>10</count>
<total>30</total>
<result>/* entries */</result>
</rsp>


Failure

The contents specify the error(s) for a bad request, such as validation constraints. The error code indicates the constraint violated, the property if a form field, a msg for debugging purposes only (not user-friendly), and optional attributes to clarify the error programmatically.

<rsp stat="fail" code="400">
<err code="pattern" property="id" regexp="\d+" msg="must match \d+"/>
</rsp>

{
"stat": "ok",
"code": 200,
"result":[{
"err":{
"code": "not_null",
"property": "id",
"regexp": "\d+",
"msg": "must match \d+"
}
}]
}


An error may be caused by an expected but undocumented failure:

<err code="not_documented" property="card" details="Stripe api exception" msg="undocumented failure"/>

"err":{"code": "not_documented", "property": "card",
"details": "Stripe api exception", "msg": "undocumented failure"}


An error may be due to a capability being disabled, such as a deactivated account:

<err code="disabled" property="account" msg="capability is not enabled"/>

"err":{"code": "disabled", "property": "account",
"msg": "capability is not enabled"}


An error may be caused by any of the common validation constraints (JSR-303 based):

Blank field:

<err code="not_blank" property="firstName" msg="may not be empty"/>

"err":{"code": "not_blank", "property": "firstName",
"msg": "may not be empty"}


Not Found:

<err code="not_found" property="sourceFile" value="leads.csv"
msg="resource not found"/>

"err":{"code": "not_found", "property": "sourceFile", value: "leads.csv"
"msg": "resource not found"},


Malformed Content:

<err code="malformed" property="request.body" msg="absent or malformed"/>

"err":{"code": "malformed", "property": "request.body",
"msg": "absent or malformed"}


Not Numeric:

<err code="numeric" property="id" value="abc" whole="true" msg="must be a number"/>

"err":{"code": "numeric", "property": "id", "value": "abc", "whole": "true",
"msg": "must be a number"}


Minimum Size:

<err code="min" property="password" value="6" msg="must be greater than or equal to 6"/>

"err":{"code": "min", "property": "password", "value": "6",
"msg": "must be greater than or equal to 6"}


Maximum Size:

<err code="max" property="credits" value="1000"
msg="must be less than or equal to 1000"/>

"err":{"code": "max", "property": "credits", "value": "1000",
"msg": "must be less than or equal to 1000"}


Regular Expression:

<err code="pattern" property="userType" regexp="Downloader|Representative" msg="must match Downloader|Representative"/>

"err":{"code": "pattern", "property": "userType",
"regexp": "Downloader|Representative"
"msg": "must match Downloader|Representative"}


Duplicate:

<err code="duplicate" property="email" value="john.doe@example.com"
msg="already assigned"/>

"err":{"code": "duplicate", "property": "email",
"value": "john.doe@example.com", "msg": "already assigned"}


Email:

<err code="email" property="email" msg="not a well-formed email address"/>

"err":{"code": "email", "property": "email",
"msg": "not a well-formed email address"}


An error may be caused by a failure to bill the customer's card (marshaled Stripe errors):

<err code="{$code}" property="${action}" param="${param}"
details="${details}" msg="Stripe api failure"/>

"err":{"code": "{$code}", "property": "${action}", "param": "${param}",
"details": "${details}" "msg": "Stripe api failure"}


JSON

Success

{
"stat": "ok",
"code": 200,
"result":[{
/* optional payload */
}]
}


A paginated response has the form:

{
"stat": "ok",
"code": 200,
"startIndex": 0,
"count": 10,
"total": 30,
"result":[{ /* entries */ }]
}


Failure

The contents specify the error(s) for a bad request, such as validation constraints. The error code indicates the constraint violated, the property if a form field, a msg for debugging purposes only (not user-friendly), and optional attributes to clarify the error programmatically.

<rsp stat="fail" code="400">
<err code="pattern" property="id" regexp="\d+" msg="must match \d+"/>
</rsp>

{
"stat": "ok",
"code": 200,
"result":[{
"err":{
"code": "not_null",
"property": "id",
"regexp": "\d+",
"msg": "must match \d+"
}
}]
}


An error may be caused by an expected but undocumented failure:

<err code="not_documented" property="card" details="Stripe api exception" msg="undocumented failure"/>

"err":{"code": "not_documented", "property": "card",
"details": "Stripe api exception", "msg": "undocumented failure"}


An error may be due to a capability being disabled, such as a deactivated account:

<err code="disabled" property="account" msg="capability is not enabled"/>

"err":{"code": "disabled", "property": "account",
"msg": "capability is not enabled"}


An error may be caused by any of the common validation constraints (JSR-303 based):

Blank Field:

<err code="not_blank" property="firstName" msg="may not be empty"/>

"err":{"code": "not_blank", "property": "firstName",
"msg": "may not be empty"}


Not Found:

<err code="not_found" property="sourceFile" value="leads.csv"
msg="resource not found"/>

"err":{"code": "not_found", "property": "sourceFile", value: "leads.csv"
"msg": "resource not found"},


Malformed Content:

<err code="malformed" property="request.body" msg="absent or malformed"/>

"err":{"code": "malformed", "property": "request.body",
"msg": "absent or malformed"}


Not Numeric:

<err code="numeric" property="id" value="abc" whole="true" msg="must be a number"/>

"err":{"code": "numeric", "property": "id", "value": "abc", "whole": "true",
"msg": "must be a number"}


Minimum Size:

<err code="min" property="password" value="6" msg="must be greater than or equal to 6"/>

"err":{"code": "min", "property": "password", "value": "6",
"msg": "must be greater than or equal to 6"}


Maximum Size:

<err code="max" property="credits" value="1000"
msg="must be less than or equal to 1000"/>

"err":{"code": "max", "property": "credits", "value": "1000",
"msg": "must be less than or equal to 1000"}


Regular Expression:

<err code="pattern" property="userType" regexp="Downloader|Representative" msg="must match Downloader|Representative"/>

"err":{"code": "pattern", "property": "userType",
"regexp": "Downloader|Representative"
"msg": "must match Downloader|Representative"}


Duplicate:

<err code="duplicate" property="email" value="john.doe@example.com"
msg="already assigned"/>

"err":{"code": "duplicate", "property": "email",
"value": "john.doe@example.com", "msg": "already assigned"}


Email:

<err code="email" property="email" msg="not a well-formed email address"/>

"err":{"code": "email", "property": "email",
"msg": "not a well-formed email address"}


An error may be caused by a failure to bill the customer's card (Marshaled Stripe Errors):

<err code="{$code}" property="${action}" param="${param}"
details="${details}" msg="Stripe api failure"/>

"err":{"code": "{$code}", "property": "${action}", "param": "${param}",
"details": "${details}" "msg": "Stripe api failure"}



Contact Us (Click for web form)

Contact Us

Hosted IVR Services
Voice Broadcasting
Virtual PBX
Virtual Call Center

Voice Broadcasting Products
Polls and Surveys
Live Transfers
Voicemail Leads
Mass Notification

Voice Broadcasting by Industry
Political Voice Broadcasting
International Voice Broadcast
Emergency Notification
Business Insurance Leads
Merchant Account Leads
Debt Consolidation Leads

Learning Center
On Demand Webinars
News Releases

Company Info
About Us
Privacy Policy
Terms Of Service
Get a Quote
Contact Us
Testimonials
FAQ's

Account Management
Voice Broadcasting Registration
Call Tracking User Registration
Log In

Carrier Services
LRN Dipping Service
Dialer Termination
Wholesale SIP Trunking


All Rights Reserved By dialtel.com © 2004- Privacy Policy