Service Types API
7 PracBill API endpoints for service types. Base URL https://billing.pracbill.com.au/api.
Create a new service type
POST /{api_key}/serviceType/add
Request body
| Field | Type | Description |
|---|---|---|
typeofservice required | string | Name of the service type (required) |
active | boolean | Whether the service type is active and offered in lists/selectors (defaults to true) |
ratecode | string | Internal rate code |
list_price | number | Default ex-tax list price |
cost_price | number | Ex-tax cost price |
wholesale_price | number | Wholesale price for resellers |
reseller_price | number | Reseller price |
invoice_type | string | Invoice type this service belongs to |
calls_service | integer (0 | 1) | Whether this is a call-based service (0 or 1) |
data_service | integer (0 | 1) | Whether this is a data service (0 or 1) |
data_unlimited | integer (0 | 1) | Whether data is unlimited (0 or 1) |
data_included_mb | integer | Included data in MB |
helpdesk_display | integer (0 | 1) | Display in helpdesk module (0 or 1) |
reporting_category | string | Category for reporting purposes |
vid | integer | Vendor/Supplier ID |
vendor_product_id | string | Vendor's product identifier |
allow_order | integer (0 | 1) | Allow ordering through Orders module (0 or 1) |
call_types | array of integer | Array of call type IDs allowed for this service |
default_call_types | array of integer | Array of default call type IDs for billing |
Responses
200— Service type created successfully400— Bad request - missing required fields or invalid data
Delete a service type. Will fail if there are active services associated with this service type.
DELETE /{api_key}/serviceType/delete/{esid}
Responses
200— Service type deleted successfully400— Cannot delete - active services exist404— Service type not found
Retrieve filtered service types without pagination
POST /{api_key}/serviceType/filter/get
Request body
| Field | Type | Description |
|---|---|---|
helpdesk_display | boolean | whether this service type displays in the helpdesk module |
invoice_type | string | The invoice type that the service type is displaye don |
calls_service | boolean | If this is a call based service |
sms_postpaid | boolean | If this is a sms postpaid service |
data_service | boolean | If this is a data service |
data_unlimited | boolean | Unlimited Data included? |
data_included_mb | integer | Number of MB included in the service, for the filter, this is an exact match and has no ability for > or < or any wilcards |
vid | integer | Vendor or Supplier ID |
vendor_product_id | string | Vendor's Product ID |
ratecode | string | The rate code for types |
data_service_technology | string | What type of data technologies |
data_service_type | string | what data service types are available |
allow_order | boolean | If the service is allowed to be ordered through the orders module |
active | boolean | Filter by active state. Defaults to true (active only) when neither this nor include_inactive is supplied |
include_inactive | boolean | Set to true to return both active and inactive service types (ignored when `active` is supplied) |
typeofservice | string | A wildcard search for type of service |
Responses
200— Request received successfully
POST /{api_key}/serviceType/filter/get/page/{page_number}
POST /{api_key}/serviceType/filter/get/page/{page_number}
Request body
| Field | Type | Description |
|---|---|---|
helpdesk_display | boolean | whether this service type displays in the helpdesk module |
invoice_type | string | The invoice type that the service type is displaye don |
calls_service | boolean | If this is a call based service |
sms_postpaid | boolean | If this is a sms postpaid service |
data_service | boolean | If this is a data service |
data_unlimited | boolean | Unlimited Data included? |
data_included_mb | integer | Number of MB included in the service, for the filter, this is an exact match and has no ability for > or < or any wilcards |
vid | integer | Vendor or Supplier ID |
vendor_product_id | string | Vendor's Product ID |
ratecode | string | The rate code for types |
data_service_technology | string | What type of data technologies |
data_service_type | string | what data service types are available |
allow_order | boolean | If the service is allowed to be ordered through the orders module |
active | boolean | Filter by active state. Defaults to true (active only) when neither this nor include_inactive is supplied |
include_inactive | boolean | Set to true to return both active and inactive service types (ignored when `active` is supplied) |
typeofservice | string | A wildcard search for type of service |
Responses
200— Request received successfully
Retrieve a paginated list of service types and basic information. Only active service types are returned unless include_inactive is set.
GET /{api_key}/serviceType/get/page/{page_number}
Responses
200— Request received successfully
Get detailed information about a specific service type
GET /{api_key}/serviceType/get/{esid}
Responses
200— Request received successfully404— Service type not found
Update an existing service type
POST /{api_key}/serviceType/update/{esid}
Request body
| Field | Type | Description |
|---|---|---|
typeofservice | string | Name of the service type |
active | boolean | Whether the service type is active and offered in lists/selectors |
ratecode | string | Internal rate code |
list_price | number | Default ex-tax list price |
cost_price | number | Ex-tax cost price |
wholesale_price | number | Wholesale price for resellers |
reseller_price | number | Reseller price |
invoice_type | string | Invoice type this service belongs to |
calls_service | integer (0 | 1) | Whether this is a call-based service (0 or 1) |
data_service | integer (0 | 1) | Whether this is a data service (0 or 1) |
data_unlimited | integer (0 | 1) | Whether data is unlimited (0 or 1) |
data_included_mb | integer | Included data in MB |
helpdesk_display | integer (0 | 1) | Display in helpdesk module (0 or 1) |
reporting_category | string | Category for reporting purposes |
vid | integer | Vendor/Supplier ID |
vendor_product_id | string | Vendor's product identifier |
allow_order | integer (0 | 1) | Allow ordering through Orders module (0 or 1) |
call_types | array of integer | Array of call type IDs allowed for this service |
default_call_types | array of integer | Array of default call type IDs for billing |
Responses
200— Service type updated successfully404— Service type not found