Services API
18 PracBill API endpoints for services. Base URL https://billing.pracbill.com.au/api.
List a customer's non-deleted service sites (the engineering_sites records shown in the UI as "Service Sites"). Constrained to the token's department via the customer.
GET /{api_key}/customer/{cid}/service-sites
Responses
200— Service sites for the customer
Create a new service record
POST /{api_key}/engineering/add
Request body
| Field | Type | Description |
|---|---|---|
cid required | integer | Customer ID |
service_num | string | Service number/identifier |
start_date | string | Service start date |
servicetype required | integer | Service type ID (esid) |
monthlyfee | number | Monthly fee (auto-calculated from price book if not provided) |
date_ended | string | Service end date |
billing_cycle | string | Billing cycle |
contractterm | integer | Contract term in months |
billing_name | string | Billing name |
call_rates_id | integer | Call rates ID |
bundle_id | integer | Service bundle ID |
cost | number | Cost price |
quantity | integer | Quantity |
service_information_data | object | Additional service information (JSON) |
nbn_avc | string | NBN AVC identifier |
full_address | string | The service's primary ("Service") address. Provided as a full-address string which is geocoded against Australian addresses and stored. Omit to leave the address unchanged. |
site_id | integer | Service site to link this service to. Validated to be a live site of the same customer in the token's department; rejected otherwise. Omit to leave unchanged. |
Responses
200— Service created successfully
Get a specific service record by ID
GET /{api_key}/engineering/get/{enid}
Responses
200— Request received successfully
Add a one-time charge item to a service (for additional fees, equipment, installation charges, etc.)
POST /{api_key}/engineering/item/add
Request body
| Field | Type | Description |
|---|---|---|
pid required | integer | Product ID (required) - references inventory table |
enid | integer | Service ID to associate the item with |
charge_date | string | Date the charge should be applied (YYYY-MM-DD) |
inc_tax_amount | number | Amount including tax (if not provided, uses product's default price) |
taxrate | number | Tax rate percentage (if not provided, uses product's tax rate) |
description | string | Charge description (if not provided, uses product's description) |
Responses
200— Service item created successfully
Update a one-time charge item on a service
POST /{api_key}/engineering/item/update/{id}
Request body
| Field | Type | Description |
|---|---|---|
pid | integer | Product ID - if changed, will recalculate pricing and tax |
charge_date | string | Date the charge should be applied (YYYY-MM-DD) |
inc_tax_amount | number | Amount including tax |
taxrate | number | Tax rate percentage |
description | string | Charge description |
Responses
200— Service item updated successfully
Search for services with flexible criteria. The request body is a JSON **array** of criterion objects. Each criterion has a `field`, a `value`, and an optional `operator` (defaults to `like`). Multiple criteria are combined with AND. Results are automatically scoped to the API token's department.
POST /{api_key}/engineering/search
Request body
Array of:
| Field | Type | Description |
|---|---|---|
field required | string (id | cid | service_num | servicetype | start_date | monthlyfee | date_ended | billing_name) | The field to filter on. `active_services` is a special flag that takes no value/operator and limits results to services that have not ended (date_ended unset or in the future). Unrecognised fields are silently ignored. |
value | object | The value to compare against. Required for every field except `active_services`. May be a string or number depending on the field. |
operator | string (= | like | < | > | <= | >= | !=) | Comparison operator. Defaults to `like` (substring match — the value is wrapped in % wildcards) when omitted. Ignored for `active_services`. |
Responses
200— Search completed successfully
Update an existing service record
POST /{api_key}/engineering/update/{enid}
Request body
| Field | Type | Description |
|---|---|---|
cid required | integer | Customer ID |
service_num | string | Service number/identifier |
start_date | string | Service start date |
servicetype required | integer | Service type ID (esid) |
monthlyfee | number | Monthly fee (auto-calculated from price book if not provided) |
date_ended | string | Service end date |
billing_cycle | string | Billing cycle |
contractterm | integer | Contract term in months |
billing_name | string | Billing name |
call_rates_id | integer | Call rates ID |
bundle_id | integer | Service bundle ID |
cost | number | Cost price |
quantity | integer | Quantity |
service_information_data | object | Additional service information (JSON) |
nbn_avc | string | NBN AVC identifier |
full_address | string | The service's primary ("Service") address. Provided as a full-address string which is geocoded against Australian addresses and stored. Omit to leave the address unchanged. |
site_id | integer | Service site to link this service to. Validated to be a live site of the same customer in the token's department; rejected otherwise. Omit to leave unchanged. |
Responses
200— Service updated successfully
Calculate Early Termination Fee (ETF) for a service
GET /{api_key}/engineering/{enid}/calculateETF
Responses
200— ETF calculated successfully
Execute Early Termination Fee (ETF) - creates invoice item for ETF charge
POST /{api_key}/engineering/{enid}/doETF
Responses
200— ETF processed successfully
Create a service site. cid must be a customer in the token's department; name must not be blank.
POST /{api_key}/service-sites/add
Request body
| Field | Type | Description |
|---|---|---|
cid required | integer | Customer ID (must be in the token's department) |
name required | string | Site name (must not be blank) |
sid | string | Site reference (DB field sitesid) |
domain_name | string | Site domain (DB field domainname) |
Responses
200— Service site created
Soft-delete a service site (deleted = 1; never a hard delete). Fails for a nonexistent/deleted/cross-department site.
POST /{api_key}/service-sites/delete/{id}
Responses
200— Service site deleted
Fetch a single service site. Fails when the site does not exist, is deleted, or belongs to a customer outside the token's department.
GET /{api_key}/service-sites/get/{id}
Responses
200— The service site
Update a service site (name/sid/domain_name, and optionally cid to another customer in the same department). Fails for a nonexistent/deleted/cross-department site or a blank name.
POST /{api_key}/service-sites/update/{id}
Request body
| Field | Type | Description |
|---|---|---|
cid required | integer | Customer ID (must be in the token's department) |
name required | string | Site name (must not be blank) |
sid | string | Site reference (DB field sitesid) |
domain_name | string | Site domain (DB field domainname) |
Responses
200— Service site updated
Calculate daily cost for an active service (monthlyfee divided by days in current month)
GET /{api_key}/services/get/monthlyCostByServiceNumber/daily/{service_num}
Responses
200— Daily cost calculated successfully
Calculate pro-rata monthly cost for a service starting on a specific date (calculated from monthlyfee)
GET /{api_key}/services/get/monthlyCostByServiceNumber/proRata/{date}/{service_num}
Responses
200— Pro-rata monthly cost calculated successfully
Get the actual monthly cost charged for a service on a specific date (based on invoice data)
GET /{api_key}/services/get/monthlyCostByServiceNumber/{date}/{service_num}
Responses
200— Monthly cost retrieved successfully
AVC Transfer Qualification Check
POST /{api_key}/services/qualify/avc-check
Verify that an AVC ID matches a given location before submitting a transfer order. Returns the AVC match result, target identifier (CopperPairID or PortID), and the current provider EPID.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
location_id required | query | string | The LOC ID / DirectoryID from a previous address lookup |
avcid required | query | string | The AVC ID to verify against the location |
service_type | query | string | Technology type (e.g. FTTP, HFC, FTTC, FTTN, FTTB, WIRELESS) |
Responses
200— AVC check result
Alias of /{api_key}/customer/{cid}/service-sites — list a customer's non-deleted service sites.
GET /{api_key}/services/sites/customer/{cid}
Responses
200— Service sites for the customer