All API URLs listed in this documentation are relative to https://50.17.250.225/. For example, the /api/carriers API call is reachable at https://50.17.250.225/api/carriers
JSON
All API except login api needs you to pass client username and api key value as basic http authorization header.
for.ex sending request using curl
curl --user username:api_key http://50.17.250.225/api/carriers
Here you need to replace username and api_key with actual client username and api key. You can get api_key using login api
Reference for sending basic http authentication request:
Sr. # | API NAME |
1 | Login |
2 | Carriers |
3 | Create Carrier |
4 | Inventory |
5 | Activity Logs |
6 | State |
7 | RateCenter |
8 | Search |
9 | Provider |
10 | Order |
11 | Route Number |
12 | Subaccounts |
13 | Call Forward |
14 | Multi Call Forward |
15 | Show Inventory |
16 | Remove Call Forward |
17 | Multi Remove Call Forward |
18 | List Sub Clients |
19 | Create Sub Clients |
20 | Show Sub Clients |
21 | Update Sub Clients |
22 | Delete Sub Clients |
URL | /api/login |
Http Method | Post |
Description | Allow the registered user to login |
REQUEST PARAMETERS | login:- email or username of user |
password:- password of user | |
Example Request JSON :- {"login"=>"testing", "password"=>"testing123"} | |
Example Successful Response JSON | {"result":{"message":"Sign in Successfully","status":200,"error":0}, "data":[{"id":2,"email":"testing@yopmail.com", "username":"testing", "api_key":"5a9f024ab00d96cc54da4a6e0ec5da8079c9511f", "getstarted_closed":false, "created_at":"2014-01-28T12:12:40.000Z"}]} |
Example ERROR Response JSON | wrong password:- {"result":{"message":"An error occur","status":400,"error":1},"data":{"errors":[{"message":"Password is invalid"}]}} |
No user:- {"result":{"message":"An error occur","status":400,"error":1},"data":{"errors":[{"message":"No user found"}]}} |
Return Values | |||
---|---|---|---|
Hash | result | ||
message | displays message | ||
status | status code | ||
error | error code | ||
data | id | id of user | |
email of user | |||
username | username of user | ||
api_key | api_key of user | ||
getstarted_closed | required in portal | ||
created_at | time when session is created |
URL | /api/carriers |
Http Method | Get |
Description | Fetch Carriers Detail |
REQUEST PARAMETERS | api_key:- api_key for authentication you will get this at the time of login |
username:- username of user | |
Example Successful Response | {"result":{"message":"Carrier Account List","status":200,"error":0}, "data":[{"id":1,"account_name":"Account 3", "username":"xxxx","password":"xxxx", "api_token":"", "provider_id":x,"provider":"xxxxx", "is_enable":true, "primary_account":false,"type_of_authentication":1}, {"id":2,"account_name":"Account 1","username":"xxxx","password":"xxxxx","api_token":"", "provider_id":1,"provider":"xxxx", "is_enable":true, "primary_account":true,"type_of_authentication":1} ]} |
Example ERROR Response JSON | If username or api_key not provided {"result":{"message":"Unauthenticate access","status":400,"error":1},"data":{"errors":[{"message":"you need to login to see this"}]}} |
Return Values | |||
---|---|---|---|
Hash | result | ||
message | displays message | ||
status | status code | ||
error | error code | ||
data | id | id of carrier | |
account_name | name of account | ||
username | username for your account | ||
password | password of your account | ||
api_token | api_token of your account | ||
provider_id | id of your provider | ||
provider | name of your provider | ||
is_enable | whether you want to enable or not(boolean) | ||
primary_account | carrier is primary account or not(boolean) |
URL | /api/carriers |
Http Method | Post |
Description | Create Carrier Account |
REQUEST PARAMETERS | api_key:- api_key for authentication you will get this at the time of login |
username:- username of user | |
provider_id:- id of provider | |
account_name:- name of account | |
username:- username | |
password:- password | |
api_token:- api_token | |
is_enable:- true/false to enable this account | |
primary_account:- true/false to make this account primary | |
Example Request JSON:- {"carrier"=>{"provider_id"=>"2", "account_name"=>"fgdg", "username"=>"telecoio", "password"=>"[FILTERED]", "api_token"=>"", "is_enable"=>"0", "primary_account"=>"0"}} | |
Example ERROR Response JSON | If username or api_key not provided {"result":{"message":"Unauthenticate access","status":400,"error":1},"data":{"errors":[{"message":"you need to login to see this"}]}} |
If password or api key not valid {"result":{"message":"An error occur","status":400,"error":1},"data":{"errors":[{"message":"Provider Account Credentials are not valid - Conexiant says 'No API Key was included.'."}]}} |
URL | /api/inventories |
Http Method | Get |
Description | Fetch Inventory Detail |
REQUEST PARAMETERS | api_key:- api_key for authentication you will get this at the time of login |
username:- username of user | |
Example Successful Response | {"result":{"message":"Inventory List","status":200,"error":0},"data":{"pagination":{"current_page":1,"total_page":27,"first_page":true, "last_page":false, "total_count":668,"per_page":25}, "data_arr":[{"id":1, "provider_id":1,"client_id":1, "client_provider_account_id":2, "provider":"Vitelity", "did":"12345678901","ratecenter":"BIRMINGHAM", "state":"AL","rate_per_minute":"0.007","rate_per_month":"0.65", "subaccount":"173.248.173.142","email":null, "is_fax_did":false,"did_type":"voice","slug":"12345678901", "sipendpoint_id":null, "tier_id":null, "forwarding_number":null, "buyer_ordered_on":null, "voice_mail_id":null, "next_billing_cycle_on":null, "supports_t38":false, "supports_fax_email":false, "fax_to_email_enabled":false,"region_id":null, "city":null,"cname_enabled":false, "forwarding_rate_sheet_id":null,"customer_tag":null, "channel_based":false,"channel_fee":null, "account_id":null, "prev_subaccount":"173.248.173.142","sub_account_id":134,"did_name_list":"test, jfk, av, fg, kl, st, testing","created_at":"2014-01-06T11:09:38.000Z","updated_at":"2014-01-25T09:35:49.000Z"}]}} |
Example ERROR Response JSON | If username or api_key not provided {"result":{"message":"Unauthenticate access","status":400,"error":1},"data":{"errors":[{"message":"you need to login to see this"}]}} |
Return Values | ||||
---|---|---|---|---|
Hash | result | |||
message | displays message | |||
status | status code | |||
error | error code | |||
data | pagination | current_page | First page is current page | |
total_page | total number of pages | |||
first_page | sent page is first page(true/false) | |||
last_page | sent page is last page(true/false) | |||
total_count | total number of inventory | |||
per_page | number of inventory to be displayed on every page | |||
data_arr | id | inventory id | ||
provider_id | provider id | |||
provider | provider name | |||
client_id | client id | |||
client_provider_account_id | it is carrier id | |||
did | did number | |||
ratecenter | name of ratecenter | |||
state | name of state | |||
rate_per_minute | rate per minute | |||
rate_per_month | rate per month | |||
subaccount | name of subaccount | |||
email if present | ||||
is_fax_did | give true/false for fax_did | |||
did_type | type of did | |||
slug | slug field | |||
sipendpoint_id | sipendpoint id | |||
tier_id | tier id | |||
forwarding_number | number to be forwarded | |||
buyer_ordered_on | date on which buyer ordered number(datetime field) | |||
voice_mail_id | voice mail id | |||
next_billing_cycle_on | when is next billing cycle(datetime field) | |||
supports_t38 | supports t38 true/false | |||
supports_fax_email | supports fax email true/false | |||
fax_to_email | fax to email true/false | |||
region_id | region id(integer) | |||
city | city name | |||
cname_enabled | cname enabled true/false | |||
forwarding_rate_sheet_id | forwarding rate sheet id(integer) | |||
customer_tag | customer tag | |||
customer_tag | customer tag | |||
channel_based | channel based true/false | |||
channel_fee | channel fee(decimal) | |||
account_id | account id | |||
prev_subaccount | name of previous subaccount | |||
sub_account_id | subaccount id | |||
did_name_list | list of did name(tag) | |||
created_at | when inventory is created | |||
updated_at | when inventory is last updated |
URL | /api/activities_logs |
Http Method | Get |
Description | Fetch Activity Logs |
REQUEST PARAMETERS | api_key:- api_key for authentication you will get this at the time of login |
username:- username of user | |
Example Successful Response | {"result":{"message":"Activity Log","status":200,"error":0},"data":[{"id":23,"original_number":"1234567890","provider_id":1, "forward_number":"12345678901","provider_name":"xxxx", "remove_forwarding":null,"forwarding_rate_sheet_id":null,"previous_forward_number":"", "prev_subaccount":null,"response":"1234567890 forwaded to 12345678901 successfully", "client_id":1,"client_provider_id":2,"action_type":5,"number":"2054902182","provider":"xxxx", "success":null,"state":null,"ratecenter":null,"rate_per_minute":null, "setup_fee":null,"cost_per_month":null, "carrier_id":null,"subaccounts":null,"order_status":null,"tier_id":null,"tier_type":null,"date":"2014-01-22","subaccount_name":null} ]} If no data then {"result":{"message":"Activity Log", "status":200,"error":0}, "data":[]} |
Example ERROR Response JSON | If username or api_key not provided {"result":{"message":"Unauthenticate access","status":400,"error":1},"data":{"errors":[{"message":"you need to login to see this"}]}} |
Return Values | |||
---|---|---|---|
Hash | result | ||
message | displays message | ||
status | status code | ||
error | error code | ||
data | original number | did number | |
provider_id | id of provider | ||
forward_number | forward number | ||
provider_name | name of provider | ||
remove_forwarding | forward remove | ||
forwarding_rate_sheet_id | forward remove | ||
previous_forward_number | previous forward number if exist | ||
prev_subaccount | previous subaccount | ||
response | give response | ||
response | give response | ||
client_id | id of client | ||
client_provider_id | it is carrier id | ||
action_type | action type | ||
number | did number | ||
provider | provider name | ||
number | did number | ||
state | state name | ||
ratecenter | ratecenter name | ||
rate_per_minute | rate per minute | ||
setup_fee | setup fee | ||
cost_per_month | cost per month | ||
carrier_id | it is carrier id | ||
subaccounts | subaccounts detail | ||
order_status | order status | ||
tier_id | tier id | ||
tier_id | tier id | ||
tier_type | tier type | ||
date | date of activity log | ||
subaccount_name | subaccount name |
URL | /api/states/available |
Http Method | Get |
Description | Get List of States |
REQUEST PARAMETERS | api_key:- api_key for authentication you will get this at the time of login |
username:- username of user | |
Example Successful Response JSON | {"result":{"message":"States List","status":200,"error":0},"data":["AK","AL","AR", "AZ","CA","CO", "CT", "DE", "FL", "GA","HI", "IA","ID","IL","IN","KS","KY", "LA","MA", "MD", "ME", "MI", "MN", "MO", "MS", "MT", "NC", "ND","NE","NF", "NH", "NJ","NM","NS","NV","NY","OH","OK","ON","OR","PA", "PE","PQ","PR","QC", "RI","SC","SD","TN","TX","UT","VA","VT","WA","WI","WV","WY","YK"]} |
Example ERROR Response JSON | If username or api_key not provided {"result":{"message":"Unauthenticate access","status":400,"error":1},"data":{"errors":[{"message":"you need to login to see this"}]}} |
Return Values | |||
---|---|---|---|
Hash | result | ||
message | displays message | ||
status | status code | ||
error | error code | ||
data | list of states |
URL | /api/states/:state_id/rate_centers |
Http Method | Get |
Description | Get List of RateCenters |
REQUEST PARAMETERS | api_key:- api_key for authentication you will get this at the time of login |
username:- username of user | |
state_id:- enter state you can get it from state api | |
Example Request JSON :- {"state"=>"AL"} | |
Example Successful Response JSON | {"result":{"message":"RateCenter List","status":200,"error":0},"data":["ABBEVILLE","ALABASTER","ALBERTVL","ALEXANDRCY","ANDALUSIA","ANNISTON","ARITON","ATHENS", "ATTALLA","AUBURN","BANKS", "BAYMINETTE", "BELLEFONTN", "BESSEMER","BIRMINGHAM", "BOAZ", "BRANTLEY", "BREWTON", "BRIDGEPORT","BRILLIANT","BRUNDIDGE","CALERA", "CARBONHILL","CENTREVL","CHELSEA","CHILDERSBG","CITRONELLE","CLANTON"]} |
Example ERROR Response JSON | If username or api_key not provided {"result":{"message":"Unauthenticate access","status":400,"error":1},"data":{"errors":[{"message":"you need to login to see this"}]}} |
Return Values | |||
---|---|---|---|
Hash | result | ||
message | displays message | ||
status | status code | ||
error | error code | ||
data | list of ratecenters |
URL | /api/providers/:provider_id/search |
Http Method | Get|Post |
Description | Search for DID |
REQUEST PARAMETERS | search_type:- type of DID you want to search(local_did,fax_did,tollfree_did,international_did) |
npanxx: - true (When you want to search by NPA/NPANXX pass this parameter along with local_did in search_type. | |
search_number: - For searching by NPA you need to pass 3 digits [(2-9)XX] where X can be 0 to 9. For NPANXX searches you need to pass 6 digits [(2-9)XXXXX] where X can be 0 to 9. | |
state:- enter state you can get this from state api | |
ratecenter:- enter ratecenter you can get this from ratecenter api | |
cname:- enter cname(boolean) | |
smsonly:- enter smsonly(boolean) | |
provider_id:- id of provider for which you want to search | |
api_key:- api_key for authentication you will get this at the time of login | |
username:- username of user | |
Example Request JSON :- {"search"=>{"search_type"=>"local_did", "state"=>"AL", "ratecenter"=>"ALABASTER", "cname"=>"0", "smsonly"=>"0"},"id"=>"2"} | |
Example Successful Response JSON | {"result":{"message":"Search List","status":200,"error":0},"data":[{"number":"12053781656", "provider":"xxxx", "toll_free":null, "ratecenter":"ALABASTER", "state":"AL", "cost_per_minute":0.0023,"setupfee":0.35,"cost_per_month":0.59, "tier_name":"Tier 0", "supports_t38":false,"provider_id":2,"tier_id":359, "per_channel":"$7.0", "unlimited":null, "tier_types":[{"tier_name":"Per Minute","tier_value":359,"tier_disable":""}, {"tier_name":"Per Channel","tier_value":360,"tier_disable":""}], "supported_tiers":[{"tier_name":"Tier 0","tier_id":359, "setupfee":0.35, "cost_per_month":0.59,"cost_per_minute":0.0023, "is_channel_based":false, "channel_monthly_fee":0.0,"channel_setup_fee":0.0, "is_toll_free":false, "tollfree_ratedeck_id":null}, {"tier_name":"Tier 0 (Per Channel)","tier_id":360,"setupfee":0.35,"cost_per_month":0.59, "cost_per_minute":0.0,"is_channel_based":true, "channel_monthly_fee":7.0,"channel_setup_fee":0.0,"is_toll_free":false, "tollfree_ratedeck_id":null}]}]} |
Example ERROR Response JSON | If username or api_key not provided {"result":{"message":"Unauthenticate access","status":400,"error":1},"data":{"errors":[{"message":"you need to login to see this"}]}} |
If search_type not provided {"result":{"message":"An error occur","status":400,"error":1},"data":{"errors":[{"message":"Search type can't be blank, Search type is not included in the list"}]}} |
Return Values | |||
---|---|---|---|
Hash | result | ||
message | displays message | ||
status | status code | ||
error | error code | ||
data | number | did number | |
provider | name of your provider | ||
toll_free | defines if it is toll free | ||
ratecenter | displays ratecenter for which you have searched | ||
state | displays state for which you have searched | ||
cost_per_minute | display cost per minute | ||
cost_per_minute | display cost per minute | ||
setupfee | display cost setup fee | ||
cost_per_month | display cost per month | ||
tier_name | name of Tier | ||
supports_t38 | display true/false based on your provider | ||
provider_id | displays id of provider | ||
tier_id | display id of tier | ||
per_channel | display cost per channel | ||
unlimited | display unlimited | ||
tier_types | gives an array of tier types | ||
supported_tiers | gives an array of supported tiers |
URL | /api/providers/primary/providers |
Http Method | Get |
Description | Get List of Providers |
REQUEST PARAMETERS | api_key:- api_key for authentication you will get this at the time of login |
username:- username of user | |
Example Successful Response JSON | {"result":{"message":"Provider List","status":200,"error":0},"data":[{"id":1,"name":"xxxx","active":true,"is_primary_provider":true,"is_added":true},{"id":2,"name":"xxxx","active":true,"is_primary_provider":true,"is_added":true},{"id":3,"name":"xxxx","active":true,"is_primary_provider":true,"is_added":true}]} |
Example ERROR Response JSON | If username or api_key not provided {"result":{"message":"Unauthenticate access","status":400,"error":1},"data":{"errors":[{"message":"you need to login to see this"}]}} |
Return Values | |||
---|---|---|---|
Hash | result | ||
message | displays message | ||
status | status code | ||
error | error code | ||
data | id | id of provider | |
name | name of provider | ||
active | gives true/false(boolean) | ||
is_primary_provider | gives true/false(boolean) | ||
is_added | gives true/false(boolean) |
URL | /api/orders |
Http Method | Post |
Description | Order Number |
REQUEST PARAMETERS | api_key:- api_key for authentication you will get this at the time of login |
username:- username of user | |
Example Request JSON :- {"numbers"=>{"0"=>{"did_number"=>"12345678901", "provider_id"=>"2", "setup_fee"=>"0.35", "rate_per_minute"=>"0.0023", "cost_per_month"=>"0.59", "state"=>"AL", ratecenter"=>"ALABASTER", "per_channel"=>"$7.0", "tier_id"=>"Per Minute", "tier_type"=>"359"}}} | |
Example Successful Response JSON | {"result":{"message":"Order Status","status":200,"error":0}, "data":[{"number":"12345678901", "order_status":"Per Minute Voice DID 12345678901 ordered successfully","success":true, "carrier_id":4,"provider_id":"2", "provider":"xxxx","subaccounts":[{"id":229,"name":"PRICA-trix1","provider_id":2,"client_provider_id":4,"provider_name":"xxxx"},{"id":230,"name":"freepxC9","provider_id":2, "client_provider_id":4,"provider_name":"xxxx"}, {"id":231,"name":"freePBX-C9-inter","provider_id":2, "client_provider_id":4,"provider_name":"xxxx"}, {"id":232,"name":"FreePBX Nov 12th", "provider_id":2, "client_provider_id":4,"provider_name":"xxxx"}]}]} |
Example ERROR Response JSON | If username or api_key not provided {"result":{"message":"Unauthenticate access","status":400,"error":1},"data":{"errors":[{"message":"you need to login to see this"}]}} |
Return Values | ||||
---|---|---|---|---|
Hash | result | |||
message | displays message | |||
status | status code | |||
error | error code | |||
data | number | did number you order | ||
order_status | gives status of order | |||
success | gives true/false(boolean) | |||
carrier_id | id of carrier | |||
provider_id | id of provider | |||
provider | name of provider | |||
subaccounts | id | id of sub account | ||
name | subaccount name | |||
provider_id | id of provider | |||
client_provider_id | it is carrier id | |||
provider_name | name of provider |
URL | /api/route_numbers |
Http Method | Post |
Description | Route Number |
REQUEST PARAMETERS | api_key:- api_key for authentication you will get this at the time of login |
username:- username of user | |
Example Request JSON :- {"numbers"=>{"0"=>{"did_number"=>"12345678901", "provider_id"=>"2", "carrier_id"=>"4", "subaccount"=>"229"}}} | |
Example Successful Response JSON | {"result":{"message":"Order Status","status":200,"error":0},"data":[{"number":"12345678901","order_status":"routed to PRICA-trix1 successfully","success":null,"carrier_id":"4","provider_id":"2","provider":"xxxx","subaccounts":[]}]} |
Example ERROR Response JSON | If username or api_key not provided {"result":{"message":"Unauthenticate access","status":400,"error":1},"data":{"errors":[{"message":"you need to login to see this"}]}} |
Return Values | ||||
---|---|---|---|---|
Hash | result | |||
message | displays message | |||
status | status code | |||
error | error code | |||
data | number | did number you order | ||
order_status | gives status of order | |||
success | returns success message | |||
carrier_id | id of carrier | |||
provider_id | id of provider | |||
provider | name of provider | |||
subaccounts | id | id of sub account | ||
name | subaccount name | |||
provider_id | id of provider | |||
client_provider_id | carrier id | |||
provider_name | name of provider |
URL | /api/sub_accounts |
Http Method | Get |
Description | List Of Sub Accounts |
REQUEST PARAMETERS | api_key:- api_key for authentication you will get this at the time of login |
username:- username of user | |
Example Successful Response JSON | {"result":{"message":"Sub Account List","status":200,"error":0},"data":[{"id":1,"name":"54.211.224.160","provider":"xxxx","provider_id":1,"client_id":1,"client_provider_id":1,"account_name":"Account 3","ratedeck_name":null}]} |
Example ERROR Response JSON | If username or api_key not provided {"result":{"message":"Unauthenticate access","status":400,"error":1},"data":{"errors":[{"message":"you need to login to see this"}]}} |
Return Values | ||||
---|---|---|---|---|
Hash | result | |||
message | displays message | |||
status | status code | |||
error | error code | |||
data | id | id of subaccount | ||
name | name of subaccounts | |||
provider | provider name | |||
provider_id | id of provider | |||
client_id | id of client | |||
client_provider_id | it is carrier id | |||
account_name | name of account | |||
ratedeck_name | name of ratedeck |
URL | /api/inventories/:id/call_forward |
Http Method | Post |
Description | Call Forward |
REQUEST PARAMETERS | api_key:- api_key for authentication you will get this at the time of login |
username:- username of user | |
id:- did number | |
Example Request JSON:- {"call_forward"=>{"previous_forward_number"=>"19546071498", "forward_number"=>"19546071497"}, "id"=>"19542561853"} | |
Example Successful Response JSON | {"result":{"message":"19542561853 forwaded to 19546071497 successfully","status":200,"error":0},"data":[{"inventory_number":"19542561853","forward_number":"19546071497","remove_forwarding":null}]} |
Example ERROR Response JSON | If username or api_key not provided {"result":{"message":"Unauthenticate access","status":400,"error":1},"data":{"errors":[{"message":"you need to login to see this"}]}} |
Return Values | |||
---|---|---|---|
Hash | result | ||
message | displays message | ||
status | status code | ||
error | error code | ||
data | inventory_number | did number | |
forward_number | forward number | ||
remove_forwarding | remove forwarding |
URL | /api/inventories/multiple_call_forward |
Http Method | Post |
Description | Call Forward for multiple numbers |
REQUEST PARAMETERS | api_key:- api_key for authentication you will get this at the time of login |
username:- username of user | |
Example Request JSON:- {"call_forward_numbers"=>[{"inventory_id"=>"650", "inventory_number"=>"19542561853", "provider_id"=>"2", "provider_name"=>"Conexiant", "client_provider_id"=>"4", "previous_forward_number"=>"19546071497", "forward_number"=>"19546071498"}, {"inventory_id"=>"651", "inventory_number"=>"19542561856", "provider_id"=>"2", "provider_name"=>"Conexiant", "client_provider_id"=>"4", "previous_forward_number"=>"19546071497", "forward_number"=>"19546071498"}]} | |
Example Successful Response JSON | {"result":{"message":"Call Forward Status","status":200,"error":0},"data":[{"inventory_number":"19542561853","forward_number":"19546071498","status":"19542561853 forwaded to 19546071498 successfully","remove_forwarding":0,"forwarding_rate_sheet_id":null,"forwarding_rate_sheet_name":null},{"inventory_number":"19542561856","forward_number":"19546071498","status":"19542561856 forwaded to 19546071498 successfully","remove_forwarding":0,"forwarding_rate_sheet_id":null,"forwarding_rate_sheet_name":null}]} |
Example ERROR Response JSON | If username or api_key not provided {"result":{"message":"Unauthenticate access","status":400,"error":1},"data":{"errors":[{"message":"you need to login to see this"}]}} |
Return Values | |||
---|---|---|---|
Hash | result | ||
message | displays message | ||
status | status code | ||
error | error code | ||
data | inventory_number | did number | |
forward_number | forward number | ||
status | message | ||
remove_forwarding | remove forwarding | ||
forwarding_rate_sheet_id | forwarding rate sheet id |
URL | /api/inventories/:id |
Http Method | Get |
Description | Show one inventory detail |
REQUEST PARAMETERS | api_key:- api_key for authentication you will get this at the time of login |
username:- username of user | |
id:- did number | |
Example Request JSON:- {"id"=>"19542561853"} | |
Example Successful Response JSON | {"result":{"message":"Inventory Detail","status":200,"error":0}, "data":[{"id":650, "provider_id":2, "client_id":1, "client_provider_account_id":4, "provider":"xxxx", "did":"19542561853", "ratecenter":"FTLAUDERDL", "state":"FL", "rate_per_minute":"0.002", "rate_per_month":"0.59", "subaccount":"freepxC9", "email":null,"is_fax_did":false,"did_type":"voice","slug":"19542561853", "sipendpoint_id":2120,"tier_id":359,"forwarding_number":"19546071498", "buyer_ordered_on":"2014-01-04T20:38:06.000Z","voice_mail_id":null, "next_billing_cycle_on":"2014-02-04T20:38:06.000Z", "supports_t38":false, "supports_fax_email":false,"fax_to_email_enabled":false, "region_id":1,"city":"FTLAUDERDL","cname_enabled":false, "forwarding_rate_sheet_id":1089,"customer_tag":null, "channel_based":false, "channel_fee":"0.0","account_id":965,"prev_subaccount":null, "sub_account_id":230,"did_name_list":"f", "created_at":"2014-01-06T11:09:47.000Z","updated_at":"2014-02-14T11:22:54.000Z"}]} |
Example ERROR Response JSON | If username or api_key not provided {"result":{"message":"Unauthenticate access","status":400,"error":1},"data":{"errors":[{"message":"you need to login to see this"}]}} |
Return Values | |||
---|---|---|---|
Hash | result | ||
message | displays message | ||
status | status code | ||
error | error code | ||
data | |||
id | inventory id | ||
provider_id | provider id | ||
provider | provider name | ||
client_id | client id | ||
client_provider_account_id | it is carrier id | ||
did | did number | ||
ratecenter | name of ratecenter | ||
state | name of state | ||
rate_per_minute | rate per minute | ||
rate_per_month | rate per month | ||
subaccount | name of subaccount | ||
email if present | |||
is_fax_did | give true/false for fax_did | ||
did_type | type of did | ||
slug | slug field | ||
sipendpoint_id | sipendpoint id | ||
tier_id | tier id | ||
forwarding_number | number to be forwarded | ||
buyer_ordered_on | date on which buyer ordered number(datetime field) | ||
voice_mail_id | voice mail id | ||
next_billing_cycle_on | when is next billing cycle(datetime field) | ||
supports_t38 | supports t38 true/false | ||
supports_fax_email | supports fax email true/false | ||
fax_to_email | fax to email true/false | ||
region_id | region id(integer) | ||
city | city name | ||
cname_enabled | cname enabled true/false | ||
forwarding_rate_sheet_id | forwarding rate sheet id(integer) | ||
customer_tag | customer tag | ||
customer_tag | customer tag | ||
channel_based | channel based true/false | ||
channel_fee | channel fee(decimal) | ||
account_id | account id | ||
prev_subaccount | name of previous subaccount | ||
sub_account_id | subaccount id | ||
did_name_list | list of did name(tag) | ||
created_at | when inventory is created | ||
updated_at | when inventory is last updated |
URL | /api/inventories/:id/remove_call_forward |
Http Method | Delete |
Description | Remove Call Forward |
REQUEST PARAMETERS | api_key:- api_key for authentication you will get this at the time of login |
username:- username of user | |
id:- did number | |
Example Request JSON:- {"id"=>"19542561853"} | |
Example Successful Response JSON | {"result":{"message":"remove call forward detail","status":200,"error":0},"data":[{"message":"Call Forwarding removed for 19542561853 successfully"}]} |
Example ERROR Response JSON | If username or api_key not provided {"result":{"message":"Unauthenticate access","status":400,"error":1},"data":{"errors":[{"message":"you need to login to see this"}]}} |
If did number not provider or present {"result":{"message":"Record not found","status":400,"error":1},"data":{"errors":[{"message":"Inventory not found"}]}} |
Return Values | |||
---|---|---|---|
Hash | result | ||
message | displays message | ||
status | status code | ||
error | error code | ||
data | message | message details |
URL | /api/inventories/multiple_call_forward_removal |
Http Method | Post |
Description | Remove Call Forward for multiple numbers |
REQUEST PARAMETERS | api_key:- api_key for authentication you will get this at the time of login |
username:- username of user | |
Example Request JSON:- {"call_forward_numbers"=>[{"inventory_id"=>"386", "inventory_number"=>"1234567890", "provider_id"=>"1", "provider_name"=>"xxx", "client_provider_id"=>"3", "previous_forward_number"=>"1111111111", "forward_number"=>"", "remove_forwarding"=>"1"}, {"inventory_id"=>"387", "inventory_number"=>"2134567890", "provider_id"=>"1", "provider_name"=>"Vitelity", "client_provider_id"=>"3", "previous_forward_number"=>"2222222222", "forward_number"=>"", "remove_forwarding"=>"1"}]} | |
Example Successful Response JSON | {"result":{"message":"Call Forward Removal Status","status":200,"error":0},"data":[{"inventory_number":"1234567890","forward_number":null,"status":"Call Forwarding removed for 1234567890 successfully and number is routed to your main subaccount","remove_forwarding":1,"forwarding_rate_sheet_id":null,"forwarding_rate_sheet_name":null},{"inventory_number":"2134567890","forward_number":null,"status":"Call Forwarding removed for 2134567890 successfully and number is routed to your main subaccount","remove_forwarding":1,"forwarding_rate_sheet_id":null,"forwarding_rate_sheet_name":null}]} |
Example ERROR Response JSON | If username or api_key not provided {"result":{"message":"Unauthenticate access","status":400,"error":1},"data":{"errors":[{"message":"you need to login to see this"}]}} |
Return Values | |||
---|---|---|---|
Hash | result | ||
message | displays message | ||
status | status code | ||
error | error code | ||
data | inventory_number | did number | |
forward_number | forward number | ||
status | message | ||
remove_forwarding | remove forwarding | ||
forwarding_rate_sheet_id | forwarding rate sheet id | ||
forwarding_rate_sheet_name | forwarding rate sheet name |
URL | /api/sub_clients |
Http Method | Get |
Description | List Of Sub Clients |
REQUEST PARAMETERS | api_key:- api_key for authentication you will get this at the time of login |
username:- username of user | |
Example Successful Response JSON | {"result":{"message":"Sub client List","status":200,"error":0},"data":[{"id":3,"email":"test1@yopmail.com", "username":"subclient1", "api_key":"0dd3f251fd6674fc6e6e893eac6860adb19c8828", "created_at":"2014-02-22T08:24:06.000Z"},{"id":4,"email":"test2@yopmail.com", "username":"subclient2", "api_key":"28ed07e474ff56e299af79eda5186d7068aaaa9e", "created_at":"2014-02-22T08:26:40.000Z"}] |
Example ERROR Response JSON | If username or api_key not provided {"result":{"message":"Unauthenticate access","status":400,"error":1},"data":{"errors":[{"message":"you need to login to see this"}]}} |
If user is not business user {"result":{"message":"Unauthorize access","status":400,"error":1},"data":{"errors":[{"message":"You don't have permission to create sub clients."}]}} |
Return Values | ||||
---|---|---|---|---|
Hash | result | |||
message | displays message | |||
status | status code | |||
error | error code | |||
data | id | id of subclient | ||
username | user name of sub client | |||
email of sub client | ||||
api_key | api key of sub client | |||
created_at | date and time when sub client created |
URL | /api/sub_clients |
Http Method | Post |
Description | Create Sub Clients |
REQUEST PARAMETERS | api_key:- api_key for authentication you will get this at the time of login |
username:- username of user | |
email:- email of sub client | |
username:- username of sub client | |
password:- password of sub client | |
Example Successful Response JSON | {"result":{"message":"Sub client created successfully","status":200,"error":0}, "data":[{"id":4, "email":"test2@yopmail.com", "username":"subclient2", "api_key":"28ed07e474ff56e299af79eda5186d7068aaaa9e", "created_at":"2014-02-22T08:26:40.513Z"}]} |
Example ERROR Response JSON | If username or api_key not provided {"result":{"message":"Unauthenticate access","status":400,"error":1},"data":{"errors":[{"message":"you need to login to see this"}]}} |
If email or user name is already present {"result":{"message":"An error occur","status":400,"error":1},"data":{"errors":[{"message":"Email has already been taken"},{"message":"Username has already been taken"}]}} |
Return Values | ||||
---|---|---|---|---|
Hash | result | |||
message | displays message | |||
status | status code | |||
error | error code | |||
data | id | id of subclient | ||
username | user name of sub client | |||
email of sub client | ||||
api_key | api key of sub client | |||
created_at | date and time when sub client created |
URL | /api/sub_clients/:id |
Http Method | Get |
Description | Show Sub Client |
REQUEST PARAMETERS | api_key:- api_key for authentication you will get this at the time of login |
username:- username of user | |
id:- id of sub client | |
Example Successful Response JSON | {"result":{"message":"Sub client","status":200,"error":0}, "data":[{"id":3,"email":"test1@yopmail.com", "username":"subclient1", "api_key":"0dd3f251fd6674fc6e6e893eac6860adb19c8828", "created_at":"2014-02-22T08:24:06.000Z"}]} |
Example ERROR Response JSON | If username or api_key not provided {"result":{"message":"Unauthenticate access","status":400,"error":1},"data":{"errors":[{"message":"you need to login to see this"}]}} |
if try to access other sub user by sending wrong id..{"result":{"message":"Unauthorize access","status":400,"error":1}, "data":{"errors":[{"message":"You don't have permission."}]}} |
Return Values | ||||
---|---|---|---|---|
Hash | result | |||
message | displays message | |||
status | status code | |||
error | error code | |||
data | id | id of subclient | ||
username | user name of sub client | |||
email of sub client | ||||
api_key | api key of sub client | |||
created_at | date and time when sub client created |
URL | /api/sub_clients/:id |
Http Method | Patch|Put |
Description | Update Sub Client |
REQUEST PARAMETERS | api_key:- api_key for authentication you will get this at the time of login |
username:- username of user | |
id:- id of sub client | |
Example Successful Response JSON | {"result":{"message":"Sub client updated successfully","status":200,"error":0}, "data":[{"id":3, "email":"test1@yopmail.com", "username":"newsubclient1", "api_key":"0dd3f251fd6674fc6e6e893eac6860adb19c8828", "created_at":"2014-02-22T08:24:06.000Z"}]} |
Example ERROR Response JSON | If username or api_key not provided {"result":{"message":"Unauthenticate access","status":400,"error":1},"data":{"errors":[{"message":"you need to login to see this"}]}} |
if try to access other sub user by sending wrong id..{"result":{"message":"Unauthorize access","status":400,"error":1}, "data":{"errors":[{"message":"You don't have permission."}]}} |
Return Values | ||||
---|---|---|---|---|
Hash | result | |||
message | displays message | |||
status | status code | |||
error | error code | |||
data | id | id of subclient | ||
username | user name of sub client | |||
email of sub client | ||||
api_key | api key of sub client | |||
created_at | date and time when sub client created |
URL | /api/sub_clients/:id |
Http Method | Delete |
Description | Delete Sub Client |
REQUEST PARAMETERS | api_key:- api_key for authentication you will get this at the time of login |
username:- username of user | |
id:- id of sub client | |
Example Successful Response JSON | {"result":{"message":"Sub client deleted successfully","status":200,"error":0}, "data":{"messages":[{"message":"Sub client deleted successfully"}]}} |
Example ERROR Response JSON | If username or api_key not provided {"result":{"message":"Unauthenticate access","status":400,"error":1},"data":{"errors":[{"message":"you need to login to see this"}]}} |
if try to access other sub user by sending wrong id..{"result":{"message":"Unauthorize access","status":400,"error":1}, "data":{"errors":[{"message":"You don't have permission."}]}} |
Return Values | ||||
---|---|---|---|---|
Hash | result | |||
message | displays message | |||
status | status code | |||
error | error code | |||
data | message | |||
message | display an appropriate message |