FORMAT: 1B HOST: https://tapi-sandbox.avanser.com/v1/ VERSION: 20211030 # AVANSER Telco API AVANSER Telco API is designed to provide an easy way to order and manage client services. AVANSER Telco API is Agency friendly. Users can be configured to have access to multiple AVANSER accounts, facilitating service automation. ## Authentication + AVANSER Telco API requires HTTP Basic Authentication over HTTPS. + Contact AVANSER Support to obtain your credentials. + AVANSER fluid requires HTTP Basic Authentication to access the services as described [here](https://en.wikipedia.org/wiki/Basic_access_authentication) All Requests require authentication ``` Authorization: Basic {Authentication} ``` + HTTP_BASIC + username: {AVANSER_username} + password: {AVANSER_password} ## API Model To make the AVANSER Telco API easy, all responses are in JSON format, along with the HTTP Basic authentication. This API has been developed to be friendly with NodeJs, Javascript, Java or PHP. The `@transaction` object returned in any reply provide constant feedback on the selected account and the API details. This API is designed to ease configuration & provisioning of AVANSER transfer and voicemail services. Future releases will include other call features. The complete call feature is however available through the AVANSER support. ### Synchronous Model All Resource gathering Requests are Synchronous (GET Requests). ![Synchronous Model](http://mailimg.avanser.com/apiary/TelcoAPI_sync_model.png) ### Asynchronous Model All Provisioning requests provide a status update (Callback-URI). If enabled, AVANSER Telco API returns all request status updates, such as: + Service Creation + Service Update + Service Decommission An acknowledgment message is returned with any asynchronous request. The acknowledgment message confirms if the request was submitted successfully. Request status can be always monitored through the [List Requests](http://docs.avansertapi.apiary.io/#reference/0/requests/list-requests) API call. ![Asynchronous Model](http://mailimg.avanser.com/apiary/TelcoAPI_async_model.png) ## Call Tags Call tags can be used in Templates and Call notification email subject. | TAG | Example | Description | |:-------------------|---------------------------------------------------------------|-----------------------------------------------------------------------------| | `__location__` | Sydney, NSW, Australia | detected call location | | `__outnum__` | +61-0290080000 | Answer Point number | | `__dateTime__` | 2016-04-15 10:23:20 | call date, according to Answer Point timezone | | `__bnum__` | +61-0290080000 | Call Tracking service number | | `__ani__` | +61-0420000000 | Caller Party number if not available a private reference is returned | | `__adsource__` | Tracking Service 1 | Friendly name associated with the service number | | `__callDuration__` | 36 | Call duration, expressed in seconds | | `__callstatus__` | `Answered` | Call status: `Abandoned`, `Unanswered`, `Busy`, `Answered` | | `__URL__` | http://path/to/audio/file.mp3 | Audio recording download url | | `__link__` | ```audio file``` | Audio recording url, HTML Anchor link format | ## Callback-URI functionality When a service is successfully provisioned, a Callback is set to the configured `call_callback_uri`. Request are sent to the desired `call_callback_uri` as POST. + Headers ``` Content-Type: application/json ``` ### Request completed ``` { "account_id" : 6999, "request_id" : "c9220015e2f48bc7cf4b38186a7b2025", "custom_id" : "client desired unique id", "status" : "completed", "message": "Request completed successfully" "service_number" : "611300123123", "answer_point": "614201010100" } ``` ### Request failed ``` { "account_id" : 6999, "request_id" : "c9220015e2f48bc7cf4b38186a7b2025", "custom_id" : "client desired unique id", "status" : "failed", "message" : "Selected service number is not available", "service_number" : "611300123123", "answer_point": "614201010100" } ``` ## Call-URI functionality If enabled, calls are reported to the desired url as GET Requests. | Description | Parameter | Example |:----------------------|--------------|------------- | AVANSER's ClientID | clientid | 6999 | AVANSER's CallID | callid | 324213111 | AVANSER's UniqueId | uniqueid | ECS1-1923211.11 | Tracking Service # | bnum | +61-0290081596 | Tracking Service Name | adname | Tracking Service 1 | AnswerPoint # | target | +61-0401020304 | AnswerPoint Name | targetname | Sydney Office | Caller Party # | ani | +61-0410203045 | Call Date (ISO 8601) | tzdate | 2019-11-14T12:11:21+10:00 | Call Duration (sec.) | duration | 30 | Call Status | callstatus | tags, available values are: ***avanser_abandoned_call, avanser_answered_call, avanser_busy_call, avanser_unanswered_call, avanser_fax_call, avanser_missed_call*** | Call status code | callcode | 1 | Call location | clocation | Sydney | Call state | cstate | MOB | Call country | ccountry | AU ## SMS-Forward functionality If enabled, for services supporting SMS messages, all inbound SMS messages are reported to the desired url as GET Requests. | Description | Parameter | Example |:----------------------|--------------|---------------- | AVANSER's ClientID | clientId | 6999 | SMS Recipient | to | +61-0401020304 | SMS Sender | from | +61-0401020305 | SMS Text | txt | `this is a test message` | SMS Date | date | 2016-04-12 10:10:10 # Accounts [/accounts] ## List Accounts [GET /accounts?type={type}] List all available accounts associated with the user. + Request + Headers Authorization: Basic {Authentication} + Parameters + type: `configuration` (enum[string], optional) - Indicates whether the caller intends to use the account for configuration-related endpoints or billing-related endpoints. + Default: `configuration` + Members + `configuration` + `billing` + Response 200 (application/json) + Attributes (Accounts) + Response 400 (application/json) + Attributes (Error Detail) + error + message : Bad Request + code : 400 + errors (object) + `account-id`: invalid account (string) - error reason + Response 401 (application/json) + Attributes (Error Response) + error + message : Unauthorized + code : 401 + Response 500 (application/json) + Attributes (Error Response) + error + message : Unexpected Error + code : 500 ## Switch Account [POST /accounts?account-id={account-id}] Switch between available accounts associated with the user. + Parameters + `account-id` (number, required) - desired account id. + Request (application/x-www-form-urlencoded) + Headers Authorization: Basic {Authentication} + Parameters + `account-id` : 6999 (number, required) - Desired account + Response 200 (application/json) + Attributes (Generic Success) + Response 400 (application/json) + Attributes (Error Detail) + error + message : Bad Request + code : 400 + Response 401 (application/json) + Attributes (Error Response) + error + message : Unauthorized + code : 401 + Response 500 (application/json) + Attributes (Error Response) + error + message : Unexpected Error + code : 500 ## List Account Details [GET /accounts/details] List details of selected account. + Request + Headers Authorization: Basic {Authentication} + Response 200 (application/json) + Attributes (accountDetails) ## List Account Packages [GET /accounts/packages] Lists all of the packages for the currently selected client. + Request + Headers Authorization: Basic {Authentication} + Response 200 (application/json) + Attributes (accountPackages) ## List Number Rates [GET /accounts/number_rates] Lists all of the number rates for the currently selected client. + Request + Headers Authorization: Basic {Authentication} + Response 200 (application/json) + Attributes (accountNumberRates) ## List Call Rates [GET /accounts/call_rates] Lists all of the call rates for the currently selected client. + Request + Headers Authorization: Basic {Authentication} + Response 200 (application/json) + Attributes (accountCallRates) ## List Transcription Rates [GET /accounts/transcription_rates] Lists all of the transcription rates for the currently selected client. + Request + Headers Authorization: Basic {Authentication} + Response 200 (application/json) + Attributes (accountTranscriptionRates) ## List Account Features [GET /accounts/features] Lists all of the features for the currently selected client. + Request + Headers Authorization: Basic {Authentication} + Response 200 (application/json) + Attributes (accountFeatures) # Search Numbers [/numbers] Search into the AVANSER inventory. Search for AVAILABLE Numbers to be ACTIVATED. ## by Location [GET /numbers?country={country}&location={location}&radius={radius}] Search for available numbers by location will return all available numbers within a provided radius from the search location. + Parameters + country (string, required) - Search country. + location (string, required) - Search into AVANSER inventory by Address eg. "Level 2 150-152 Elizabeth St, 2000 NSW, Australia". + radius (number, optional) - Search radius in kilometers. + Default: 20 + Request + Headers Authorization: Basic {Authentication} + Parameters + country (string, required) - Search country. + location (string, required) - Search into AVANSER inventory by Address eg. "Level 2 150-152 Elizabeth St, 2000 NSW, Australia". + radius (number, optional) - Search radius in kilometers. + Default: 20 + Response 200 (application/json) + Attributes (Search Element) + Response 300 (application/json) + Attributes (Multiple Addresses) + Response 400 (application/json) + Attributes (Error Detail) + Response 401 (application/json) + Attributes (Error Response) + error + message : Unauthorized + code : 401 + Response 500 (application/json) + Attributes (Error Response) + error + message : Unexpected Error + code : 500 ## by Coordinates [GET /numbers?country={country}&lat={lat}&lng={lng}&radius={radius}] Search for available numbers by latitude and longitude, will return all available number within the provided radius from the search coordinates. + Parameters + country (string, required) - Search country + lat (number, required) - Latitude + lng (number, required) - Longitude + radius (number, optional) - Search radius in kilometers + Default: 20 + Request + Headers Authorization: Basic {Authentication} + Parameters + country (string, required) - Search country + lat (number, required) - Latitude + lng (number, required) - Longitude + radius (number, optional) - Search radius in kilometers + Default: 20 + Response 200 (application/json) + Attributes (Search Element) + Response 400 (application/json) + Attributes (Error Detail) + Response 401 (application/json) + Attributes (Error Response) + error + message : Unauthorized + code : 401 + Response 500 (application/json) + Attributes (Error Response) + error + message : Unexpected Error + code : 500 ## by Matching prefix [GET /numbers?country={country}&number={number}] Search for available numbers matching provided number as close as possible. Checks are performed trying first to get a perfect match, than reducing the matching length by 1 up to 6 digits. ### Example: matching 61290081596 1. Attempt: matching 61290081596 2. Attempt: matching 6129008159X 3. Attempt: matching 612900815XX 4. Attempt: matching 61290081XXX 5. Attempt: matching 6129008XXXX 6. Attempt: matching 612900XXXXX 7. Attempt: matching 61290XXXXXX + Parameters + country (string, required) - Search country + number (string, required) - Valid phone number (E164 format) + Request + Headers Authorization: Basic {Authentication} + Response 200 (application/json) + Attributes (Search Element) + Response 400 (application/json) + Attributes (Error Detail) + Response 401 (application/json) + Attributes (Error Response) + error + message : Unauthorized + code : 401 + Response 500 (application/json) + Attributes (Error Response) + error + message : Unexpected Error + code : 500 ## by Number Type [GET /numbers?country={country}&number_type={number_type}] Search for available numbers matching provided number as close as possible. ### Number Types | Type | Description |:---------|------------- | GEO | Local Numbers, more efficient search using other options | TOLLFREE | TOLLFREE numbers, same rate for the calling party independently from the area. | FREECALL | For the calling party, a call to a toll-free number from a landline is free of charge. | MOBILE | Mobile numbers + Parameters + country (string, required) - Search country + number_type (enum[string], required) + Members + GEO - Local Numbers + TOLLFREE - TOLLFREE numbers, same rate for the calling party independently from the area. + FREECALL - For the calling party, a call to a toll-free number from a landline is free of charge. + MOBILE - Mobile numbers + Request + Headers Authorization: Basic {Authentication} + Parameters + country (string, required) - Search country + number_type (enum[string], required) + Members + GEO - Local Numbers + TOLLFREE - TOLLFREE numbers, same rate for the calling party independently from the area. + FREECALL - For the calling party, a call to a toll-free number from a landline is free of charge. + MOBILE - Mobile numbers + Response 200 (application/json) + Attributes (Search Element) + Response 400 (application/json) + Attributes (Error Detail) + Response 401 (application/json) + Attributes (Error Response) + error + message : Unauthorized + code : 401 + Response 500 (application/json) + Attributes (Error Response) + error + message : Unexpected Error + code : 500 ## by SZU Australia [GET /numbers?szu={szu}] Search for available numbers matching the numbers by Standard Zone Unit (SZU), this option is available for Australia only. Most updated list of available Standard Zone Unit for Australia can be found [here](http://acma.gov.au/Industry/Telco/Numbering/Managing-numbers/numbering-charging-districts-zones-and-precincts) + Parameters + szu (string, required) - Valid Australian SZU + Request + Headers Authorization: Basic {Authentication} + Parameters + szu (string, required) - Valid Australian SZU + Response 200 (application/json) + Attributes (Search Element) + Response 400 (application/json) + Attributes (Error Detail) + Response 401 (application/json) + Attributes (Error Response) + error + message : Unauthorized + code : 401 + Response 500 (application/json) + Attributes (Error Response) + error + message : Unexpected Error + code : 500 # Requests [/requests] ## List Requests [GET] Returns all requests, requests are returned in batches of 100. + Response 200 (application/json) + Attributes (List Requests) ## Request new Service [POST] Submit a new service request. When the request is accepted a number is reserved for this service. ### Automatic number allocation Along with the service details each new request requires to specify `service_number` The `service_number` object allow our customer to specify the "search rules" for the new service number easing the number selection process. What follow is a series of examples on how tok use the automatic number allocation feature: #### by location ``` { "service_number": { "country": "AU", "search_type": "location", "location": "LEVEL 2 150-152 Elizabeth St, 2000 NSW Australia", "radius": 20 } } ``` #### by coordinates ``` { "service_number": { "country": "AU", "search_type": "location", "lat": -33.865143, "lng": 151.209900, "radius": 20 } } ``` #### by "matching prefix" or "service number" ``` { "service_number": { "country": "AU", "search_type": "number", "number": "61290081596" } } ``` `number` can be either the number to match as close as possible or one of AVANSER's available service number chosen through Search Numbers service available for this API. #### by number type ``` { "service_number": { "country": "AU", "search_type": "number_type", "number_type": "MOBILE" } } ``` #### by szu ``` { "service_number": { "country": "AU", "search_type": "szu", "szu": "sydney" } } ``` ### Example: new transfer service Transfer service allows our customer to transfer the Caller Party to the desired Answer Point ``` { "name": "TAPI Transfer EXAMPLE", "custom_id": "tapi-transfer-example-1", "service_number": { "country": "AU", "search_type": "number_type", "number_type": "MOBILE" }, "service": { "type": "transfer", "answer_point_name": "TAPI answer point EXAMPLE #1", "answer_point": "61420123123", "call_whisper": "https://example.tld/audio/call_whisper.wav", "voicemail": "https://example.tld/audio/voicemail.wav", "record_call": false, "call_reporting": { "report": "none" } }, "call_uri": "http://example.tld/debug.php?call-uri", "sms_forward_uri": "http://example.tld/debug.php?sms_forward_uri", "callback_uri": "http://example.tld/debug.php?callback_uri" } ``` ### Example: new voicemail service Voicemail service allows our customers to play a message to the Caller Party and record a message. Message is stored along with the CDR data and is always available either in the Portal or using our WebAPI service. ``` { "name": "TAPI Voicemail EXAMPLE", "custom_id": "tapi-voicemail-example-1", "service_number": { "country": "AU", "search_type": "number_type", "number_type": "MOBILE" }, "service": { "type": "voicemail", "answer_point_name": "TAPI answer point EXAMPLE #2", "voicemail": "https://example.tld/audio/voicemail.mp3", "call_reporting": { "report": "missed", "email": { "subject": "call for Voicemail", "email_to": [ "no-reply@avanser.com.au" ], "template": "html_email_template" }, "sms": { "mobile": "61420123123", "template": "text_sms_template" } } }, "call_uri": "http://example.tld/debug.php?call-uri", "sms_forward_uri": "http://example.tld/debug.php?sms_forward_uri", "callback_uri": "http://example.tld/debug.php?callback_uri" } ``` ### Example: new prompt service Prompt service allows our customers to play a message to the Caller Party. ``` { "name": "TAPI Prompt EXAMPLE", "custom_id": "tapi-prompt-example-1", "service_number": { "country": "AU", "search_type": "number_type", "number_type": "MOBILE" }, "service": { "type": "prompt", "answer_point_name": "TAPI answer point EXAMPLE #3", "call_greeting" : "https://example.tld/audio/call_greeting.wav" }, "call_reporting": { "report": "missed", "email": { "subject": "call for Prompt", "email_to": [ "no-reply@avanser.com.au" ], "template": "html_email_template" }, "sms": { "mobile": "61420123123", "template": "text_sms_template" } }, "call_uri": "http://example.tld/debug.php?call-uri", "sms_forward_uri": "http://example.tld/debug.php?sms_forward_uri", "callback_uri": "http://example.tld/debug.php?callback_uri" } ``` + Request (application/json) + Headers Authorization: Basic {Authentication} + Attributes (Inbound Request) + Response 200 (application/json) + Attributes (Acknowledgment Reply) + response (object) + `service_number`: 6129008596 (string) - reserved number + request_id : c9220015e2f48bc7cf4b38186a7b2025 (string) - Unique Request id + message : Success (string) - Confirmation message + code : 200 (number) - Confirmation code + Response 400 (application/json) + Attributes (Error Detail) + Response 401 (application/json) + Attributes (Error Response) + error + message : Unauthorized + code : 401 + Response 500 (application/json) + Attributes (Error Response) + error + message : Unexpected Error + code : 500 # Request Details [/requests/{request_id}] + Parameters + `request_id`: c9220015e2f48bc7cf4b38186a7b2025 (string) - Valid request id ## Request Body [GET /requests/{request_id}/request_body] Returns the submitted user body, this is the request as received + Request + Headers Authorization: Basic {Authentication} + Response 200 (application/json) + Attributes (Service Detail) ## Acknowledgment Body [GET /requests/{request_id}/acknowledgment_body] Returns the acknowledgment request response + Request + Headers Authorization: Basic {Authentication} + Response 200 (application/json) + Attributes (Acknowledgment Reply) ## Callback Body [GET /requests/{request_id}/callback_body] Returns the callback body set to client's Callback URL + Request + Headers Authorization: Basic {Authentication} + Response 200 (application/json) + Attributes (Callback Body) ## Manage Services [/services/{service_number}/] + Parameters + service_number (string, required) - valid service number (E164 format) ### List Services [GET /services] List all active services, services are returned in batches of 100, sorted by name + Request + Headers Authorization: Basic {Authentication} + Response 200 (application/json) + Attributes (Service List) ### Request service update [POST] Update the selected service. #### Examples When updating a service, only the required changes can be submitted. ##### Disable `call_reporting` service ``` { "call_reporting" : { "report" : "none" } } ``` ##### Update `answer_point_name` ``` { "service" : { "answer_point_name" : "Sidney Office New" } } ``` + Request (application/json) + Headers Authorization: Basic {Authentication} + Attributes (Service Detail) + Response 200 (application/json) + Attributes (Acknowledgment Reply) + Response 400 (application/json) + Attributes (Error Detail) + Response 401 (application/json) + Attributes (Error Response) + error + message : Unauthorized + code : 401 + Response 500 (application/json) + Attributes (Error Response) + error + message : Unexpected Error + code : 500 ### Request service decommission [DELETE] Decommission (cease) the selected service. + Request (application/json) + Headers Authorization: Basic {Authentication} + Response 200 (application/json) + Attributes (Acknowledgment Reply) + Response 400 (application/json) + Attributes (Error Detail) + Response 401 (application/json) + Attributes (Error Response) + error + message : Unauthorized + code : 401 + Response 500 (application/json) + Attributes (Error Response) + error + message : Unexpected Error + code : 500 # Manage Templates [/templates?name={name}] Allows the customer to configure a template for Email and SMS Call Reporting + Parameters + name: desired template to preview (string, optional) - selected template name ## List [GET /templates] List all available Templates + Request + Headers Authorization: Basic {Authentication} + Response 200 (application/json) + Attributes (Transaction) + response (array[Template]) + Response 400 (application/json) + Attributes (Error Detail) + error + message : Bad Request + code : 400 + Response 401 (application/json) + Attributes (Error Response) + error + message : Unauthorized + code : 401 + Response 500 (application/json) + Attributes (Error Response) + error + message : Unexpected Error + code : 500 ## Preview Template [GET /templates?name={name}&country={country}] Preview the selected template + Parameters + name: desired template name (string, required) + country: country this template is for (string, required) + Request + Headers Authorization: Basic {Authentication} + Attributes + name: desired template name (string, required) + country: country this template is for (string, required) + Response 200 (application/json) + Attributes (Generic Success) + Response 400 (application/json) + Attributes (Error Detail) + error + message : Bad Request + code : 400 + Response 401 (application/json) + Attributes (Error Response) + error + message : Unauthorized + code : 401 + Response 500 (application/json) + Attributes (Error Response) + error + message : Unexpected Error + code : 500 ## Create or Update [POST /templates?type={type}&name={name}&country={country}] Templates support Call Tags + Parameters + name: desired template name (string, required) + country: country this template is for (string, required) + type: email (enum[string], optional) - Type of template + Default: email + Members + email - Template is to be used for Email Call Reporting + sms - Template is to be used for SMS Call Reporting + Request (text/html) + Headers Authorization: Basic {Authentication} + Body New Call for your service `__adname__` (`__bnum__`) at `__dateTime__`. We tried to forward the call to `__outnum__`. Download the voicemail at `__LINK__` + Parameters + name: desired template name (string, required) + country: country this template is for (string, required) + type: email (enum[string], optional) - Type of template + Default: email + Members + email - Template is to be used for Email Call Reporting + sms - Template is to be used for SMS Call Reporting + Response 200 (application/json) + Attributes (Generic Success) + Response 400 (application/json) + Attributes (Error Detail) + error + message : Bad Request + code : 400 + Response 401 (application/json) + Attributes (Error Response) + error + message : Unauthorized + code : 401 + Response 500 (application/json) + Attributes (Error Response) + error + message : Unexpected Error + code : 500 ## Delete Template [DELETE /templates?type={type}&name={name}&country={country}] Delete the selected template + Parameters + name: desired template to preview (string, required) + country: country this template is for (string, required) + type: email (enum[string], optional) - Type of template + Default: email + Members + email - Template is to be used for Email Call Reporting + sms - Template is to be used for SMS Call Reporting + Request (text/html) + Headers Authorization: Basic {Authentication} + Parameters + name: desired template to preview (string, required) + country: country this template is for (string, required) + type: email (enum[string], optional) - Type of template + Default: email + Members + email - Template is to be used for Email Call Reporting + sms - Template is to be used for SMS Call Reporting + Response 200 (application/json) + Attributes (Generic Success) + Response 400 (application/json) + Attributes (Error Detail) + error + message : Template is in use + code : 400 + Response 401 (application/json) + Attributes (Error Response) + error + message : Unauthorized + code : 401 + Response 500 (application/json) + Attributes (Error Response) + error + message : Unexpected Error + code : 500 # Data Structures ## Generic Success (Transaction) + response (object) + message : Success (string) - Confirmation message + code : 200 (number) - Confirmation code ## Accounts (Generic Success) + response (array) + (object) + `account-id`: 6999 (number) - Currently selected account + account : Test Account (string) - Friendly name assigned to the account ## accountDetails (Generic Success) + response (array) + (object) + client_name : # AVANSER test EDB (string) + `client_id`: 5995 (string) + abn : 11 223 491 505 (string) + primary_contact + name : AVANSER (string) + email : test@email.com (string) + phone : 0412345678 (string) + billing_contact + name : AVANSER (string) + email : test@email.com (string) + invoice_address + client_name : AVANSER test EDB (string) + address_line_1 : Level 2, 152 Elizabeth St (string) + address_line_2 : '' (string) + suburb : Sydney (string) + state : NSW (string) + post_code : 2000 (string) ## accountPackages (Generic Success) + response (array) + (object) + package_code : corporate (string) + start_date: `2016-12-07` (string) + end_date : `2017-01-07` (string) + setup_charge : 250.00 (string) + monthly_charge : 1.00 (string) + email : test@email.com (string) + fixed_call_rate + included : 0 (string) + perMinute :1.50 (string) + rates (array) + (object) + callType : default (string) + price : 0.25(string) + usage : 100 (string) ## accountNumberRates (Generic Success) + response (array) + (object) + rate_code : 61 (string) + description: Test MMT (string) + setup_date : `2017-01-07` (string) + setup_charge : 0.00 (string) + rental_charge : 0.00 (string) ## accountCallRates (Generic Success) + response (array) + (object) + rate_code : 61 (string) + call_type: L (string) + cost_per_minute : 0.39 (string) + free_seconds : 0.00 (string) + minimum_seconds : 0.00 (string) ## accountTranscriptionRates (Generic Success) + response (array) + (object) + setup_date : `2020-09-08` (string) + rate: 0.1 (string) ## accountFeatures (Generic Success) + response (array) + (object) + feature_code : TBR (string) + description: Time Based Routing (string) + start_date : `2017-08-01` (string) + end_date : `2017-10-01` (string) + setup_charge : 350.00 (string) + monthly_charge : 250.00 (string) + change_charge : 0.00 (string) + charging_method : usage (string) + charge_term : advance (string) ## Transaction (object) + @transaction + id: c9220015e2f48bc7cf4b38186a7b2025 (string) - Unique transaction ID + `account-id`: 6999 (number) - Currently selected account + request + `api-version`: v1 (string) - API Version + method: POST - HTTP Request Method + path: /{resource}/?{parameters} (string) - Current resource url + time: `2016-09-06T16:13:38+10:00` (string) - Response date/time + ms: 0.039 (number) - Request process time ## Search Element (Transaction) + response (object) + `E164 Number` (object) + country: AU (string) - Service Country + region: NSW: Sydney (string) - Number Region + type: GEO (string) - Number Type + `national`: 0290081596 (string) - Number in national format + `calling_code`: +61 (string) - International calling code ## Error Detail (Transaction) + errors (object) + answer_point: invalid number (string) - object is returned with reason of failure ## Error Response (Error Detail) + errors (object) + description: error message (string) - Error description + code: error code (string) - Error code ## List Requests (Transaction) + `@next`: /requests/2 (string) - link to next 100 requests + response (array) + (object) + id: 8bc7cf4015e2f4b38186c9220a7b2025 (string) - Request unique id + `request_type`: create (enum[string]) - Request Type + Members + create - New service request + update - Service update request + delete - Service decommission request + `custom_id`: `desired id` (string) - Desired unique id (50 chars max) + `custom_group`: `desired group` (string) - Desired unique id (50 chars max) + `request_date`: `2016-09-06T16:13:38+10:00` (string) - Date and time request was received (ISO 8601 Date format) + `callback_date` : `2016-09-06T16:13:38+10:00` (string) - Date and time reply was sent to client's callback url (ISO 8601 Date format) + `request_status`: completed (enum[string]) - Request Status + Members + pending - Request is pending completion + completed - Request completed successfully + `pending_confirmation` - Request is completed, waiting to send confirmation + failed - Request could not be completed + reported - Request could not be completed, and has been reported to AVANSER support + `message`: Request completed successfully (string) - Request status notes + `service_number`: 6129008596 (string) - Provisioned service number + `answer_point`: 61401010000 (string) - Answer Point specified at request submission + `callback_url`: http://preferred/host/ (string) - Callback-URL specified at request submission + @links (object) - Links to request raw data, returned as plain text + `request_body`: /requests/{request_id}/request_body (string) - submitted request body + `acknowledgment_body`: /requests/{request_id}/acknowledgment_body (string) - request acknowledgment reply body + `callback_body`: /requests/{request_id}/callback_body (string) - request callback body sent to client's endpoint + @callback (object) - Callback information + `last_update`: `2016-09-06T16:13:38+10:00` (string) - date of last attempt to contact client's callback-URL + `status` : pending (enum) - callback status + Members + pending - request is pending + success - request was successfully sent (HTTP Statuses 2xx) + retry - first attempt failed, no HTTP Status 2xx was received + failed - second attempt failed, no HTTP Status 2xx was received + `http_reply` : 0 (number) - Received HTTP Status code + (object) + id: 8bc7cf4015e2f4b38186c9220a7b2025 + `custom_id` + `request_type`: create + `request_date`: `2016-09-06T16:13:38+10:00` + `callback_date` + `request_status`: pending + `message`: Request is pending completion + `service_number`: 6129008596 + `answer_point`: 61401010000 + `callback_url`: http://preferred/host/ + @links + `request_body`: /requests/{request_id}/request_body + `acknowledgment_body`: /requests/{request_id}/acknowledgment_body + `callback_body` + @callback (object) + `last_update` + `status` : pending + `http_reply`: 0 (number) + (object) + id: c9220015e2f48bc7cf4b38186a7b2025 + `custom_id` + `request_type`: create + `request_date`: `2016-09-06T16:13:38+10:00` + `callback_date`: `2016-09-06T16:13:58+10:00` + `request_status`: `pending_confirmation` + `message`: `Request is completed, waiting to send confirmation` + `service_number`: 6129008596 + `answer_point`: 61401010000 + `callback_url`: http://preferred/host/ + @links + `request_body`: /requests/{request_id}/request_body + `acknowledgment_body`: /requests/{request_id}/acknowledgment_body + `callback_body`: /requests/{request_id}/callback_body + @callback (object) + `last_update`: `2016-09-06T16:13:48+10:00` + `status` : retry + `http_reply`: 500 (number) + (object) + id: c9220015e2f48bc7cf4b38186a7b2025 + `custom_id` + `request_type`: create + `request_date`: `2016-09-06T16:13:38+10:00` + `callback_date`: `2016-09-06T16:13:58+10:00` + `request_status`: failed + `message`: `Request is completed, waiting to send confirmation` + `service_number`: 6129008596 + `answer_point`: 61401010000 + `callback_url`: http://preferred/host/ + @links + `request_body`: /requests/{request_id}/request_body + `acknowledgment_body`: /requests/{request_id}/acknowledgment_body + `callback_body`: /requests/{request_id}/callback_body + @callback (object) + `last_update`: `2016-09-06T16:13:48+10:00` + `status` : success + `http_reply`: 200 (number) # Inbound Request (object) + name: Tracking Service 1 - Friendly name + `custom_id`: {any custom unique id} - `custom_id` is returned in the confirmation callback + service_number (object) - Provide information about the requested service + country: AU - country (ISO 3166-1 alpha-2 format) + `search_type`: szu (enum[string]) - lookup type, only one search type supported + Members + coordinates - search by latitude, longitude and km radius + location - search by geographical address and km radius + prefix - search by prefix matching + number_type - search by number type + number - specify a desired service number, this should be found using the Search functionalities + szu: sydney (string, optional) - specify the SZU, required if `search_type` = szu + radius: 20 (number, optional) - area search radius, required if `search_type` = coordinates or `search_type` = location + lat: 55 (number, optional) - specify latitude, required if `search_type` = coordinates + long: 88.1 (number, optional) - specify longitude, required if `search_type` = coordinates + location: `Sydney, 2000 NSW, Australia` (string, optional) - location address, required if `search_type` = location + `number_type`: tollfree (enum[string], optional) - search by number type, required if `search_type` = number_type + Members + tollfree - toll free numbers (eg. 1300xxxxxxxx) + freecall - free call numbers (eg. 1800xxxxxxxx) + mobile - mobile phone numbers, this numbers support inbound sms functionalities + number: 61290081596 - Number found through the Search functionalities + service (object) - Service configuration details + `type` : transfer (enum[string], required) - requested service type + Members + transfer - Transfer service + voicemail - Voicemail service + prompt - Prompt service + `answer_point`: 61401010023 (string, optional) - desired Answer Point (E164 format), required if type = transfer + `answer_point_name`: Sydney Office - friendly Name for Answer Point + `record_call`: true (boolean, optional) - enable or disable call recording service, required if type = transfer + `call_greeting`: http://path/to/greeting.wav (string, optional) - this message is played to the calling party, type = transfer only, if empty uses client's default greeting + `call_whisper`: http://path/to/greeting.wav (string, optional) - this message is played to the answer point when a call is forwarded, type = transfer only, if empty uses client's default greeting + voicemail: http://path/to/voicemail.wav (string, optional) - this message is played to the calling party if the call is not forwarded before recording a voicemail message, type = transfer only, if empty uses client's default greeting + call_reporting (object) - Email & SMS Call Reporting configuration + report: missed (enum[string], optional) - configure Call Reporting + Default: none + Members + missed (string) - All missed calls + `missed-voicemail` (string) - All missed calls with voicemail + `all-calls` (string) - All calls + none (string) - Do not report calls + email (object) - configure email specific settings, settings are required if this object is defined + subject: email subject (string, required) - supports call_tags + `email_to`: email@email.com,another@email.com (array[string], required) - email TO recipient list + `email_cc`: email@email.com,another@email.com (array[string], required) - email CC recipient list + `email_bcc`: email@email.com,another@email.com (array[string], required) - email BCC recipient list + template: `html_email_template` (string, optional) - if defined must be a valid template previously saved, if empty a standard template is used + sms (object) - configure sms specific settings, settings are required if this object is defined + `sms_id` : call report (string, optional) - desired sms id + Default: AVANSER + `mobile`: 614200220001 (string, required) - sms recipient + template: `text_sms_template` (string, optional) - if defined must be a valid template previously saved, if empty a standard AVANSER template is used + `call_uri`: http://path/to/call_reporting_uri (string, optional) - if defined sets the url for the Call-URI functionality, each call is reported to this url if configured. + `sms_forward_uri`: http://path/to/sms_forward_uri (string, optional) - if defined sets the url for the SMS-Forward functionality, each inbound sms is reported to this url if configured. + `callback_uri` : http://path/to/callback_uri (string, optional) - if defined sets the url for the Callback-URI functionality, if defined callback is sent when request status is updated. # Acknowledgment Reply (Generic Success) + response (object) + request_id : c9220015e2f48bc7cf4b38186a7b2025 (string) - Unique Request id + message : Success (string) - Confirmation message + code : 200 (number) - Confirmation code # Service Detail (object) + name : Tracking Service 1 (string) - desired service friendly name + `service_number`: 61290081596 (string, optional) - configured service number (E164 format) + service (object) - Service configuration details + type : transfer (enum[string], optional) - requested service type + Members + transfer - Transfer service + voicemail - Voicemail service + `answer_point`: 61401010023 (string, optional) - desired Answer Point (E164 format), required if type = transfer + `answer_point_name`: Sydney Office (string, optional) - friendly Name for Answer Point + `record_call`: true (boolean, optional) - enable or disable call recording service, required if type = transfer + `call_greeting`: http://path/to/greeting.wav (string, optional) - this message is played to the calling party, type = transfer only, if empty uses client's default greeting + `call_whisper`: http://path/to/greeting.wav (string, optional) - this message is played to the answer point when a call is forwarded, type = transfer only, if empty uses client's default greeting + voicemail: http://path/to/voicemail.wav (string, optional) - this message is played to the calling party if the call is not forwarded before recording a voicemail message, type = transfer only, if empty uses client's default greeting + call_reporting (object) - Email & SMS Call Reporting configuration + report: missed (enum[string], optional) - configure Call Reporting + Default: none + Members + missed (string) - All missed calls + `missed-voicemail` (string) - All missed calls with voicemail + `all-calls` (string) - All calls + none (string) - Do not report calls + email (object) - configure email specific settings, settings are required if this object is defined + subject: email subject (string, required) - supports call_tags + `email_to`: email@email.com,another@email.com (array[string], required) - email TO recipient list + `email_cc`: email@email.com,another@email.com (array[string], required) - email CC recipient list + `email_bcc`: email@email.com,another@email.com (array[string], required) - email BCC recipient list + template: `html_email_template` (string, optional) - if defined must be a valid template previously saved, if empty a standard template is used + sms (object) - configure sms specific settings, settings are required if this object is defined + `sms_id` : call report (string, optional) - desired sms id + Default: AVANSER + `mobile`: 614200220001 (string, required) - sms recipient + template: `text_sms_template` (string, optional) - if defined must be a valid template previously saved, if empty a standard AVANSER template is used + `call_uri`: http://path/to/call_reporting_uri (string, optional) - if defined sets the url for the Call-URI functionality, each call is reported to this url if configured. + `sms_forward_uri`: http://path/to/sms_forward_uri (string, optional) - if defined sets the url for the SMS-Forward functionality, each inbound sms is reported to this url if configured. + `@links` (object) + `service_uri` : /services/61290081596 (string) - service update link # Service List (Transaction) + `@next`: /services/2 (string) - link to next 100 services + response (array[Service Detail] # Callback Body (object) + `request_id`: c9220015e2f48bc7cf4b38186a7b2025 (string) - Request Unique Id + `custom_id`: custom client id (string) - Custom Id submitted during service creation + `status`: completed (enum[string]) - Request status + Members + completed - Request was completed successfully + failed - Request failed + message: Request completed successfully (string) - Request status explained or error reason + `service_number`: 61290081596 (string) - Provisioned service number, if any (E164 format) + `answer_point`: 614201010100 (string) - AnswerPoint submitted during service creation (E164 format) # Template (object) + name: template name (string) - unique template name + type: email (enum[string]) - template type + Members + email - Template is an email template + sms - Template is an sms template + country: AU (string) - country the template is available for # Multiple Addresses (Error Response) + errors + location (array) + (object) + `name`: Sydney, NSW, AU (string) - Location address + `state`: NSW (string) - Location state + `country`: AU (string) - Location country + `lat_lng`: `-33.8688197`,`151.2092955` (array[number]) - Geo Location