Hoiio Open API

Definition

https://secure.hoiio.com/open/voice/query_status

Parameters

app_id* string
Application ID assigned to your application.
access_token* string
Access Token assigned to your application.
txn_ref* string
The unique reference ID for the call you want to hangup.

Result Format

{
    "status":"success_ok",
    "txn_ref":"AA-S-141147",
    "tag":"id_1",
    "dest1":"+6511111111",
    "dest2":"+6522222222",
    "call_status_dest1":"answered",
    "call_status_dest2":"answered",
    "date":"2010-01-01 10:10:00",
    "duration":"7",
    "currency":"SGD",
    "rate":"0.020",
    "debit":"0.140"
}

Documentation

This API allows you to query the current status of a call.

You can use this API to query transactions created by:

  1. voice/call
  2. voice/conference
  3. ivr/start/dial
  4. ivr/start/answer

Response Parameters

status The result of your request. Refer to [Result Status](doc:query-call-status#result-status) for details.
txn_ref The unique reference ID for this transaction.
tag Your own reference ID submitted in the initial API request.
dest1 Refer to [notes](doc:query-call-status#notes)
dest2 Refer to [notes](doc:query-call-status#notes)
number Refer to [notes](doc:query-call-status#notes)
call_status_dest1 Dial status of for the call to dest1. Possible values are:
  • answered
  • unanswered
  • failed
  • busy
call_status_dest2 Dial status of for the call to dest2. Possible values are:
  • answered
  • unanswered
  • failed
  • busy
date Date/time (GMT+8) of the call in "YYYY-MM-DD HH:mm:SS" format.
duration Duration of the call in minutes. If the call is still ongoing, this parameter will not be provided.
currency Currency used for this transaction. Refer to [Currency Code](doc:currency-codes) for the list of currency code.
rate Per-minute charges for this call transaction.
debit Total amount billed for this transaction. If the call is still ongoing, this parameter will not be provided.

Result Status

success_ok The request has been processed successfully.
error_invalid_http_method Invalid HTTP method. Only GET or POST are allowed.
error_malformed_params HTTP POST request parameters contains non-readable bytes.
error_X_param_missing A required parameter is missing. X is the name of the parameter that is missing.
error_invalid_txn_ref txn_ref parameter is invalid or you do not have the permission to access this transaction.
error_invalid_app_id Your Application ID is invalid or has been revoked.
error_rate_limit_exceeded You have exceeded your request limit for this API. Refer to API Limits for details.
error_internal_server_error There is an unexpected error. Please contact Hoiio support for assistance.

Notes

As a call status could be created from 4 different APIs, the following table describes what the response parameters (dest1, dest2 and number) represent for each of the scenario.

API Used dest1 dest2 number
voice/call 1st number called 2nd number called -
voice/conference A participant number called - -
ivr/start/dial Number dialed Number transferred to(if ivr/end/transfer is used) -
ivr/start/answer Number who called into Hoiio number Number transferred to(if ivr/end/transfer is used) Hoiio number that receives the call

Notifications

None.

API Limits

60 request per minute per application

Charges

None.