The Services API lets integrators list, search, create and update customer services, add one-off charges, calculate and apply early termination fees, and work with service types, service bundles and recurring monthly charges. All requests go to https://billing.pracbill.com.au/api/:tokenid/....
In the examples below
tokenidis your API access token andid(orenid) is the service ID. A service'sservice_statuscontrols whether it bills:active(default),pending,suspended,pending_disconnection,disconnected,churned. Apendingservice is completely skipped by the bill run.
GET /:tokenid/services/get/page/:pageRetrieve a paginated list of services.
| Parameter | Type | Required | Description |
|---|---|---|---|
tokenid |
string | Yes | Your API access token. |
page |
integer | Yes | Page number to retrieve. |
Request
$.ajax({
url: '/api/892f86d5-da86-4e98-9343-1976a375/services/get/page/1',
type: 'GET',
contentType: 'application/json',
success: function( response ) {
console.log(response);
}
});
Response
{
"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
}
POST /:tokenid/services/searchSearch for services matching one or more criteria. POST a JSON array of search conditions.
| Parameter | Type | Required | Description |
|---|---|---|---|
tokenid |
string | Yes | Your API access token. |
field |
string | Yes | Field to search (see allowed searchable fields). |
operator |
string | No | Comparison operator (see allowed operators). Defaults to like. |
value |
string | Yes | Value to compare against. |
Request
$.ajax({
url: '/api/892f86d5-da86-4e98-9343-1976a375/services/search',
type: 'POST',
data: [
{
"field": "service_num",
"operator": "=",
"value": "1300555777"
}
],
contentType: 'application/json',
success: function( response ) {
console.log(response);
}
});
| Field | Notes |
|---|---|
id |
|
cid |
|
username |
|
service_num |
|
start_date |
|
ip_ipadd |
|
monthlyfee |
|
date_ended |
|
call_rates_id |
|
billing_name |
|
date_created |
|
date_modified |
|
service_status |
|
active_services |
This is a magic searchable field that will return active services in the search. The value and operator don't matter as long as the field is set. |
| Operator | Description |
|---|---|
= |
Value must = |
like |
This expands the search to allow for anything before or after the value passed in. e.g. { 'field': 'billing_name', 'operator': 'like', 'value': 'fax' } = search anything with fax in the billing_name field. Some example matches would be: fax, home fax, fax office, faxmachine. This is also the default operator if it is not passed in. |
< |
Less than |
> |
Greater than |
<= |
Less than or equal to |
>= |
Greater than or equal to |
!= |
Does not equal |
Response (success)
{
"success": true,
"records": [
{
"id": 5558888,
"cid": 555333,
"username": null,
"service_num": 1300555777,
"servicetype": "",
"start_date": "2011-07-01",
"ip_ipadd": "",
"monthlyfee": 50,
"date_ended": null,
"call_rates_id": null,
"billing_name": "My Number",
"date_created": null,
"date_modified": "2020-09-11 11:50:44",
"service_status": "active"
},
]
}
Response (error)
{"success":false,"description":"Invalid or no search criteria"}
GET /:tokenid/services/get/:idReturn further details about a service.
| Parameter | Type | Required | Description |
|---|---|---|---|
tokenid |
string | Yes | Your API access token. |
id |
integer | Yes | Service ID. |
Request
$.ajax({
url: '/api/892f86d5-da86-4e98-9343-1976a375/services/get/123',
type: 'GET',
contentType: 'application/json',
success: function( response ) {
console.log(response);
}
});
Response (success)
{
"success": true,
"serviceType": {
"id": "123",
"cid": "45646",
"service_num": "1300111222",
"start_date": "2020-05-01",
"servicetype": "1",
"monthlyfee": "100.00",
"date_ended": "2020-07-01",
"billing_cycle": "",
"contracterm": "24 Months",
"billing_name": "Cool Service",
"call_rates_id": 0,
"bundle_id": 0,
"cost": "",
"quantity": 1,
"service_status": "active"
}
}
| Field | Type | Notes |
|---|---|---|
id |
integer | ID of service |
cid |
integer | Customer ID |
service_num |
string | The phone number or ID of the service |
start_date |
date | Date service started |
servicetype |
integer | ID of service type |
monthlyfee |
decimal | Ex tax monthly recurring fee |
date_ended |
date | Date service ended |
billing_cycle |
string | If there is a custom billing cycle for this service - rarely used |
contractterm |
string | Term of contract for service |
billing_name |
string | Human readable/customer name for service |
call_rates_id |
integer (nullable) | ID of call rates if service specific |
bundle_id |
integer (nullable) | ID of service bundle if applicable |
cost |
decimal | The cost price of the service |
quantity |
decimal | The count of "hidden" services, users or channels that are associated with this service |
parent_id |
integer (nullable) | The ID of a parent or related service |
service_status |
string | Lifecycle status of the service. Controls billing behaviour. Allowed values: active (default), pending, suspended, pending_disconnection, disconnected, churned. A service with status pending is completely skipped by the bill run: no recurring fee, usage charges, or misc items are generated. All other statuses bill normally. |
Response (error)
{"success":false,"description":"service not found"}
POST /:tokenid/services/addCreate a new service record.
| Parameter | Type | Required | Description |
|---|---|---|---|
tokenid |
string | Yes | Your API access token. |
cid |
integer | Yes | Customer ID. |
servicetype |
integer | Yes | Service type ID. |
service_num |
string | Yes | The phone number or ID of the service. |
start_date |
date | Yes | Date the service starts. |
monthlyfee |
decimal | No | Ex tax monthly recurring fee. If not passed in, the price is calculated for that customer and populated (it will either be the default (list price) of the service type or the price from the customer's price book). |
service_status |
string | No | Defaults to active. Pass pending to create a service that is provisioned but not yet billed. |
Request
$.ajax({
url: '/api/892f86d5-da86-4e98-9343-1976a375/services/add',
type: 'POST',
data: {
cid: 123,
servicetype: 1,
service_num: 1300111222,
start_date: '2020-10-01',
monthlyfee: "10.00",
service_status: "pending"
},
contentType: 'application/json',
success: function( response ) {
console.log(response);
}
});
Response
{
"success": true,
"id": 204334,
}
POST /:tokenid/services/update/:idUpdate details about a service.
| Parameter | Type | Required | Description |
|---|---|---|---|
tokenid |
string | Yes | Your API access token. |
id |
integer | Yes | Service ID. |
cid |
integer | Customer ID. | |
servicetype |
integer | Service type ID. | |
service_num |
string | The phone number or ID of the service. | |
start_date |
date | Date the service starts. | |
monthlyfee |
decimal or boolean | If monthlyfee is passed in as a boolean false then the system will calculate the current monthlyfee for this customer, utilising price books or default list price for the servicetype. This is most useful if you are changing servicetype for whatever reason, or you want to update the customer to the current pricing from a grandfathered pricing. | |
service_status |
string | Set the lifecycle status of the service. Allowed values: active, pending, suspended, pending_disconnection, disconnected, churned. The server rejects any other value. Setting to pending will suppress all billing for this service until the status is changed. |
Request
$.ajax({
url: '/api/892f86d5-da86-4e98-9343-1976a375/services/update/204334',
type: 'POST',
data: {
cid: 123,
servicetype: 1,
service_num: 1300111222,
start_date: '2020-10-01',
monthlyfee: "10.00",
service_status: "active"
},
contentType: 'application/json',
success: function( response ) {
console.log(response);
}
});
Response
{
"success": true,
"id": 204334,
}
POST /:tokenid/services/item/addCreate a misc item/charge for a service.
| Parameter | Type | Required | Description |
|---|---|---|---|
tokenid |
string | Yes | Your API access token. |
enid |
integer | Yes | Service ID |
pid |
integer | Yes | Product ID |
charge_date |
date | Yes | Date to set the charge at. If set in the future, it will not be generated on an invoice until after this date |
taxrate |
decimal | No | Override the taxrate (may be used for export billing) |
description |
string | No | Override the product description with a custom description that will be placed on the invoice when it's created |
inc_tax_amount |
decimal | No | Override the product tax inclusive price |
Request
$.ajax({
url: '/api/892f86d5-da86-4e98-9343-1976a375/services/item/add',
type: 'POST',
data: {
enid: 321,
pid: 123,
charge_date: '2018-05-06,
taxrate: 10,
description: 'Custom Charge Description i.e. Special Service Activation for 321',
inc_tax_amount: "10.00"
},
contentType: 'application/json',
success: function( response ) {
console.log(response);
}
});
Response
{
"success": true,
"id": 23389,
}
GET /:tokenid/services/getRelatedServices/:idReturn the services related to (children of) a service.
| Parameter | Type | Required | Description |
|---|---|---|---|
tokenid |
string | Yes | Your API access token. |
id |
integer | Yes | Parent service ID. |
Request
$.ajax({
url: '/api/892f86d5-da86-4e98-9343-1976a375/services/getRelatedServices/123',
type: 'GET',
contentType: 'application/json',
success: function( response ) {
console.log(response);
}
});
Response
{
"success": true,
"records": [
{
"id": "231",
"cid": "45646",
"service_num": "1300111222",
"start_date": "2020-05-01",
"servicetype": "1",
"monthlyfee": "100.00",
"date_ended": "2020-07-01",
"billing_cycle": "",
"contracterm": "24 Months",
"billing_name": "Cool Service",
"call_rates_id": 0,
"bundle_id": 0,
"cost": "",
"quantity": 1,
"parent_id": 123,
"service_status": "active"
},
{
"id": "213",
"cid": "45646",
"service_num": "1300222111",
"start_date": "2020-01-01",
"servicetype": "1",
"monthlyfee": "100.00",
"date_ended": "2020-09-01",
"billing_cycle": "",
"contracterm": "24 Months",
"billing_name": "Other Cool Service",
"call_rates_id": 0,
"bundle_id": 0,
"cost": "",
"quantity": 1,
"parent_id": 123,
"service_status": "suspended"
},
]
}
GET /:tokenid/services/:id/calculateETF/:dateReturn the early termination details for a service. The date is optional (/:tokenid/services/:id/calculateETF); if not passed in, the current date is used.
| Parameter | Type | Required | Description |
|---|---|---|---|
tokenid |
string | Yes | Your API access token. |
id |
integer | Yes | Service ID. |
date |
date | No | Termination date. Defaults to the current date. |
Request
$.ajax({
url: '/api/892f86d5-da86-4e98-9343-1976a375/services/123/caculateETF/2021-01-01',
type: 'GET',
contentType: 'application/json',
success: function( response ) {
console.log(response);
}
});
Response
{
"in_contract": true,
"billed_until": "2020-05-31",
"etf_date": "2021-01-01",
"contract_end_date": "2021-12-31",
"amount_remaining": 60,
"etf": 110,
}
| Field | Type | Notes |
|---|---|---|
in_contract |
boolean | Is the service in contract |
billed_until |
date | The date the service has been billed until |
etf_date |
date | Date the ETF will start to take effect |
contract_end_date |
date | End date of service |
amount_remaining |
decimal | The amount remaining on the contract, if paid in full |
etf |
decimal | The calculated ETF based on the service type |
GET /:tokenid/services/:id/doETF/:dateApply the early termination fee to a service. The date is optional (/:tokenid/services/:id/doETF); if not passed in, the current date is used.
| Parameter | Type | Required | Description |
|---|---|---|---|
tokenid |
string | Yes | Your API access token. |
id |
integer | Yes | Service ID. |
date |
date | No | Termination date. Defaults to the current date. |
Request
$.ajax({
url: '/api/892f86d5-da86-4e98-9343-1976a375/services/123/doETF/2021-01-01',
type: 'GET',
contentType: 'application/json',
success: function( response ) {
console.log(response);
}
});
Response
{
"success": true,
}
POST /:tokenid/services/calculateMultipleETF/:dateReturn the early termination details for multiple services. POST a JSON array of service IDs. The date is optional (/:tokenid/services/calculateMultipleETF); if not passed in, the current date is used.
| Parameter | Type | Required | Description |
|---|---|---|---|
tokenid |
string | Yes | Your API access token. |
date |
date | No | Termination date. Defaults to the current date. |
| (body) | array of integer | Yes | Service IDs, e.g. [ 123, 234 ]. |
Request
$.ajax({
url: '/api/892f86d5-da86-4e98-9343-1976a375/services/caculateMultipleETF/2021-01-01',
type: 'POST',
data: [ 123, 234 ],
contentType: 'application/json',
success: function( response ) {
console.log(response);
}
});
Response
[
{
"in_contract": true,
"billed_until": "2021-01-31",
"etf_date": "2021-02-01",
"contract_end_date": "2021-10-31",
"amount_remaining": 30,
"etf": 30,
"enid": 234
},
{
"in_contract": true,
"billed_until": "2020-05-31",
"etf_date": "2021-01-01",
"contract_end_date": "2021-12-31",
"amount_remaining": 60,
"etf": 110,
"enid": 123
}
]
POST /:tokenid/services/doMultipleETF/:dateApply the early termination fee to multiple services. POST a JSON array of service IDs. The date is optional (/:tokenid/services/doMultipleETF); if not passed in, the current date is used.
| Parameter | Type | Required | Description |
|---|---|---|---|
tokenid |
string | Yes | Your API access token. |
date |
date | No | Termination date. Defaults to the current date. |
| (body) | array of integer | Yes | Service IDs, e.g. [123,234]. |
Request
$.ajax({
url: '/api/892f86d5-da86-4e98-9343-1976a375/services/doMultipleETF/2021-01-01',
type: 'POST',
data: [123,234]
contentType: 'application/json',
success: function( response ) {
console.log(response);
}
});
Response
[
{
"success": true,
"enid": 123
},
{
"success": true,
"enid": 234
}
]
GET /:tokenid/serviceType/get/page/:pageNumberRetrieve a paginated list of service types and basic information.
| Parameter | Type | Required | Description |
|---|---|---|---|
tokenid |
string | Yes | Your API access token. |
pageNumber |
integer | Yes | Page number to retrieve. |
Request
$.ajax({
url: '/api/892f86d5-da86-4e98-9343-1976a375/serviceType/get/page/1',
type: 'GET',
contentType: 'application/json',
success: function( response ) {
console.log(response);
}
});
Response
{
"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
}
GET /:tokenid/serviceType/searchSearch and filter service types based on specific criteria. Filters are passed as query parameters.
| Parameter | Type | Required | Description |
|---|---|---|---|
tokenid |
string | Yes | Your API access token. |
typeofservice |
string | No | Filter by service type name (partial match) |
calls_service |
integer (0/1) | No | Filter by whether service includes call charges |
data_service |
integer (0/1) | No | Filter by whether this is a data service |
helpdesk_display |
integer (0/1) | No | Filter by helpdesk display status |
reporting_category |
string | No | Filter by reporting category (partial match) |
invoice_type |
string | No | Filter by invoice type |
page |
integer | No | Page number for pagination (default: 1) |
limit |
integer | No | Number of results per page (default: 25, max: 100) |
Request
$.ajax({
url: '/api/892f86d5-da86-4e98-9343-1976a375/serviceType/search?typeofservice=Cool&calls_service=1&page=1',
type: 'GET',
contentType: 'application/json',
success: function( response ) {
console.log(response);
}
});
curl -X GET "https://yourdomain.com/api/892f86d5-da86-4e98-9343-1976a375/serviceType/search?typeofservice=Cool&calls_service=1" \
-H "Content-Type: application/json"
Response (success)
{
"success": true,
"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,
"invoice_type": "Phone",
"helpdesk_display": "1"
},
{
"esid": "124",
"typeofservice": "Cool Data Service",
"calls_service": "1",
"list_price": "20.0000",
"wholesale_price": "15.0000",
"reseller_price": "17.5000",
"reporting_category": "Cool Customers Services",
"ratecode": "COOLDATA",
"invoice_type": "Phone",
"helpdesk_display": "1"
}
],
"page": 1,
"limit": 25,
"total_results": 2,
"total_pages": 1
}
Response (no results)
{
"success": true,
"results": [],
"page": 1,
"limit": 25,
"total_results": 0,
"total_pages": 0
}
Response (error)
{
"success": false,
"description": "Invalid search parameters"
}
Notes:
GET /:tokenid/serviceType/get/:idReturn further details about a service type.
| Parameter | Type | Required | Description |
|---|---|---|---|
tokenid |
string | Yes | Your API access token. |
id |
integer | Yes | Service type ID (esid). |
Request
$.ajax({
url: '/api/892f86d5-da86-4e98-9343-1976a375/serviceType/get/123',
type: 'GET',
contentType: 'application/json',
success: function( response ) {
console.log(response);
}
});
Response (success)
{
"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"
}
}
Response (error)
{"success":false,"description":"serviceType not found"}
GET /:tokenid/serviceBundles/getByCustomer/:cidRetrieve the service bundles for a customer.
| Parameter | Type | Required | Description |
|---|---|---|---|
tokenid |
string | Yes | Your API access token. |
cid |
integer | Yes | Customer ID. |
Request
$.ajax({
url: '/api/892f86d5-da86-4e98-9343-1976a375/serviceBundles/getByCustomer/10101',
type: 'GET',
contentType: 'application/json',
success: function( response ) {
console.log(response);
}
});
Response
{
"success": true,
"serviceBundles": [
{
"id": "123",
"name": "Service Bundle",
"active": "1",
"date_started": "2020-05-01",
"date_ended": null,
"included_usage_type": "",
"included_value": 500,
"monthly_cost": 200,
"call_types": []
},
],
}
GET /:tokenid/serviceBundles/get/:idReturn further details about a service bundle.
| Parameter | Type | Required | Description |
|---|---|---|---|
tokenid |
string | Yes | Your API access token. |
id |
integer | Yes | Service bundle ID. |
Request
$.ajax({
url: '/api/892f86d5-da86-4e98-9343-1976a375/serviceBundles/get/123',
type: 'GET',
contentType: 'application/json',
success: function( response ) {
console.log(response);
}
});
Response (success)
{
"success": true,
"serviceBundle": {
"id": "123",
"name": "Service Bundle",
"cid": 5533,
"active": "1",
"date_started": "2020-05-01",
"date_ended": null,
"included_usage_type": "",
"included_value": 500,
"monthly_cost": 200,
"call_types": [],
"charges": [
{
"id": 22,
"name": "monthly add on charge",
"cid": 5533,
"active": 1,
"date_started": "2020-05-01",
"date_ended": null,
"monthly_cost": 10,
"description": "Add on Charge"
}
],
"services": [
{
"enid": 87932,
"service_num": 611800111222,
"servicetype": 11,
"date_ended": null,
"billing_name": "Primary Made Up 1800",
"date_started": "2020-06-01"
}
]
}
}
| Field | Type | Notes |
|---|---|---|
id |
integer | ID of service bundle |
name |
string | Name of service bundle |
cid |
integer | The customer ID |
active |
integer/boolean 0/1 | Is this active |
date_started |
date | The start date of the bundle charges |
date_ended |
date | The end date of the bundle (optional) |
included_usage_type |
integer | 0 = None, 1 = Included dollars, 2 = Included minutes |
included_value |
float (nullable) | Included value dependent on above |
monthly_cost |
float (nullable) | The cost to charge the customer each month. NOTE, this is in addition to the monthly service charges of each individual service associated with the bundle. |
call_types |
array | An array of call_types for the included usage |
charges |
array (of bundle charges) | List of bundle charges |
services |
array (of services) | List of associated services |
Response (error)
{"success":false,"description":"serviceBundles not found"}
POST /:tokenid/serviceBundles/postCreate or update a service bundle. If you pass in an id value, the request acts as an update (see the second example).
| Parameter | Type | Required | Description |
|---|---|---|---|
tokenid |
string | Yes | Your API access token. |
id |
integer | No | Bundle ID. When present the bundle is updated instead of created. |
cid |
integer | Yes | Customer ID. |
name |
string | Yes | Name of service bundle. |
active |
integer 0/1 | Is this active. | |
date_started |
date | Start date of the bundle charges. | |
date_ended |
date | End date of the bundle (optional). | |
included_usage_type |
integer | 0 = None, 1 = Included dollars, 2 = Included minutes. | |
included_value |
float | Included value dependent on above. | |
monthly_cost |
float | Monthly cost to charge the customer. | |
call_types |
array | Call type IDs for the included usage. |
Request (create)
curl --location --request POST 'https://billing.pracbill.com.au/api/892f86d5-da86-4e98-9343-1976a375/serviceBundles/post' \
--header 'Content-Type: application/json' \
--data-raw '{
"cid": 555,
"name": "Test Bundle - All Options",
"active": 1,
"date_started": "2021-01-01",
"date_ended": "2021-12-01",
"included_usage_type": 2,
"included_value": 1000,
"monthly_cost": 50,
"call_types": [
66,
67,
68
]
}'
Request (update)
curl --location --request POST 'https://billing.pracbill.com.au/api/892f86d5-da86-4e98-9343-1976a375/serviceBundles/post' \
--header 'Content-Type: application/json' \
--data-raw {
"cid": 555,
"name": "Test Bundle - All Options Updated",
"id": 701,
"active": 1,
"date_started": "2021-02-01",
"date_ended": "2021-11-01",
"included_value": 10,
"monthly_cost": 5,
"call_types": [
66,
68
]
}'
Response (success)
{
"success": true,
"id": 130
}
Response (error)
{
"success": false,
"description": "name is required"
}
This error occurs when there are empty or missing required fields (name, cid).
GET /:tokenid/services/get/monthlyCostByServiceNumber/:date/:service_numRetrieve the recurring monthly charge ex tax for a service number as at a date.
| Parameter | Type | Required | Description |
|---|---|---|---|
tokenid |
string | Yes | Your API access token. |
date |
date | Yes | Date to look up the charge at (YYYY-MM-DD). |
service_num |
string | Yes | Service number. |
Request
$.ajax({
url: '/api/892f86d5-da86-4e98-9343-1976a375/services/get/monthlyCostByServiceNumber/2020-01-01/61877776666',
type: 'GET',
contentType: 'application/json',
success: function( response ) {
console.log(response);
}
});
Response (success)
{
"success":true,
"data":
{
"enid":"874376",
"service_num":"6187777666",
"monthlyfee":"8.64",
"ratecode":"LocalZ",
"service_type":"AU Local Number"
}
}
Response (error)
{"success":false,"description":"61877776666 not found"}
GET /:tokenid/services/get/monthlyCostByServiceNumber/proRata/:date/:service_numRetrieve the recurring charge ex tax that is to be charged as pro rata for the current period on a set date. NOTE, the number MUST start on the date passed in or it will return an error.
| Parameter | Type | Required | Description |
|---|---|---|---|
tokenid |
string | Yes | Your API access token. |
date |
date | Yes | The service start date (YYYY-MM-DD). |
service_num |
string | Yes | Service number. |
Request
$.ajax({
url: '/api/892f86d5-da86-4e98-9343-1976a375/services/get/monthlyCostByServiceNumber/proRata/2020-01-01/61877776666',
type: 'GET',
contentType: 'application/json',
success: function( response ) {
console.log(response);
}
});
Response (success)
{
"success":true,
"data":
{
"enid":"874376",
"service_num":"6187777666",
"monthly_prorata_fee":"8.64",
"ratecode":"LocalZ",
"service_type":"AU Local Number"
}
}
Response (error)
{"success":false,"description":"61877776666 not found as starting on 2020-01-01"}
GET /:tokenid/services/get/monthlyCostByServiceNumber/daily/:service_numRetrieve the recurring charge ex tax on a daily basis for the monthly number.
| Parameter | Type | Required | Description |
|---|---|---|---|
tokenid |
string | Yes | Your API access token. |
service_num |
string | Yes | Service number. |
Request
$.ajax({
url: '/api/892f86d5-da86-4e98-9343-1976a375/services/get/monthlyCostByServiceNumber/daily/61877776666',
type: 'GET',
contentType: 'application/json',
success: function( response ) {
console.log(response);
}
});
Response (success)
{
"success":true,
"data":
{
"enid":"874376",
"service_num":"6187777666",
"dailyfee":"0.1724",
"ratecode":"LocalZ",
"service_type":"AU Local Number"
}
}
Response (error)
{"success":false,"description":"61877776666 not found"}
Related: Getting started with the API, API overview, Customers API, Invoices API, Pricing API.