Service Types

Service Types

Service Types - List

Retrieve a paginated list of service types and basic information

GET json object

URI

/:tokenid/serviceType/get/page/:pageNumber

Example

Request

Example Javascript/Jquery

$.ajax({     url: '/api/892f86d5-da86-4e98-9343-1976a375/serviceType/get/page/1',     type: 'GET',     contentType: 'application/json',     success: function( response ) {         console.log(response);         }     });

Response

Success Result

{ "results": [ { "esid": "123", "typeofservice": "Cool Service", "calls_service": "1", "list_price": "15.0000", "wholesale_price": "10.0000", "reseller_price": "12.5000", "reporting_category": "Cool Customers Services", "ratecode": null }, ], "page_number": "1", "total_pages": 1 }

Service Type - GET

Return further details about a service type

GET json object

URI

/:tokenid/serviceType/get/:id

Example

Request

Example Javascript/Jquery

$.ajax({     url: '/api/892f86d5-da86-4e98-9343-1976a375/serviceType/get/123',     type: 'GET',     contentType: 'application/json',     success: function( response ) {         console.log(response);         }     });

Response

Success Result

 

{ "success": true, "serviceType": { "esid": "123", "typeofservice": "Cool Service", "accounting_account": "0", "calls_service": "1", "usage_script": "0", "data_service": "0", "sms_postpaid": "0", "invoice_type": "Phone", "helpdesk_display": "1", "list_price": "150.0000", "wholesale_price": "10.0000", "reseller_price": "12.5000", "config_generator_script": "none", "call_types": "", "source_locations": "", "invoice_generation_script": "", "additional_fields": "[]", "additional_fields_type": "structuredjson", "date_created": "2020-01-08 01:22:00", "date_modified": "2020-09-07 03:38:57", "user_created": "99", "user_modified": "99", "reporting_category": "", "ctgid": "0", "ratecode": null, "default_call_types": [], "cost_price": "5.0000" } }
Field Defition

Field

Type

Notes

Field

Type

Notes

esid

integer

ID of service type

typeofservice

string

Name of service type

calls_service

integer/boolean 0/1

Whether to include call charges

usage_script

integer

Whether to use an inbuilt usage script to define monthly charges

data_service

integer/boolean 0/1

Is this a data service

sms_postpaid

integer/boolean 0/1

Is this a sms postpaid service

invoice_type

string

The invoice type that this is to be billed on

helpdesk_display

integer/boolean 0/1

does this record display in the helpdesk module

list_price

float (nullable)

default ex tax price

wholesale_price

float (nullable)

default wholesale price for this service

reseller_price

float (nullable)

default reseller price

config_generator_script

string

location of a config generation script for integration with devices and third party solutions

call_types

array ( of call type ids [int] )

this is a list of potential call types that this service can bill

source_locations

string

only rate calls from these cdr sources

date_created

datetime

Date Created

date_modified

datetime

Date Modified

reporting_category

string

Type of services to group this with for reporting purposes

ctgid

int (nullable) or 0 for no match

default call rate to use for this service

ratecode

string

an internal rate code to use

cost_price

float

what this service’s default cost price is

default_call_types

array ( of call type ids [int] )

this is a list of common call types that this service can bill

Error/Fail

{"success":false,"description":"serviceType not found"}