Leads API
8 PracBill API endpoints for leads. Base URL https://billing.pracbill.com.au/api.
Create a lead
POST /{api_key}/leads/add
Request body
| Field | Type | Description |
|---|---|---|
Status | string | Lead status (lookup) |
status | string | Alias of `Status` (database field name) |
Company | string | Company |
company | string | Alias of `Company` (database field name) |
Title | string | Title |
title | string | Alias of `Title` (database field name) |
Name | string | First name |
name | string | Alias of `Name` (database field name) |
Middle Name | string | Middle Name |
middlename | string | Alias of `Middle Name` (database field name) |
Surname | string | Surname |
surname | string | Alias of `Surname` (database field name) |
Sex | string | Sex |
sex | string | Alias of `Sex` (database field name) |
Date Of Birth | string | Date Of Birth |
dob | string | Alias of `Date Of Birth` (database field name) |
Logo | string | Logo URL |
logo | string | Alias of `Logo` (database field name) |
Phone | string | Phone |
phone | string | Alias of `Phone` (database field name) |
Mobile | string | Mobile |
mobile | string | Alias of `Mobile` (database field name) |
Fax | string | Fax |
fax | string | Alias of `Fax` (database field name) |
Email | string | |
email | string | Alias of `Email` (database field name) |
Website | string | Website |
web | string | Alias of `Website` (database field name) |
Billing Address | string | Written to the `address` column AND saved as the lead's billing address (saveAddress) |
address | string | Alias of `Billing Address` (database field name) |
City | string | City |
city | string | Alias of `City` (database field name) |
State | string | State |
state | string | Alias of `State` (database field name) |
Country | string | Country |
country | string | Alias of `Country` (database field name) |
Comments | string | Comments |
comments | string | Alias of `Comments` (database field name) |
Lead Type | string | Lookup 'Lead Types' |
type | string | Alias of `Lead Type` (database field name) |
Lead Source | string | Lookup 'Lead Sources' |
source | string | Alias of `Lead Source` (database field name) |
Assigned User | string | User ID |
uid | string | Alias of `Assigned User` (database field name) |
Security Question | string | Security Question |
secquestion | string | Alias of `Security Question` (database field name) |
Security Answer | string | Security Answer |
secanswer | string | Alias of `Security Answer` (database field name) |
Security | string | Security |
security | string | Alias of `Security` (database field name) |
Primary Address | string | Full address string, geocoded and saved as the lead's primary address (saveAddress) |
Responses
200— Request received successfully
Filtered, paginated leads (20 per page, exact-match filters, ordered by company).
POST /{api_key}/leads/filter/get
Request body
| Field | Type | Description |
|---|---|---|
company | string | company name |
email | string | email address |
phone | string | Phone number |
type | string | The type of lead |
source | string | lead source, where did this lead come from? |
notes | string | any internal notes about the lead |
status | string | Current status the lead is in |
Responses
200— Request received successfully
Filtered, paginated leads (20 per page, exact-match filters, ordered by company).
POST /{api_key}/leads/filter/get/page
Request body
| Field | Type | Description |
|---|---|---|
company | string | company name |
email | string | email address |
phone | string | Phone number |
type | string | The type of lead |
source | string | lead source, where did this lead come from? |
notes | string | any internal notes about the lead |
status | string | Current status the lead is in |
Responses
200— Request received successfully
Filtered, paginated leads (20 per page, exact-match filters, ordered by company).
POST /{api_key}/leads/filter/get/page/{page_number}
Request body
| Field | Type | Description |
|---|---|---|
company | string | company name |
email | string | email address |
phone | string | Phone number |
type | string | The type of lead |
source | string | lead source, where did this lead come from? |
notes | string | any internal notes about the lead |
status | string | Current status the lead is in |
Responses
200— Request received successfully
Paginated list of leads (20 per page) not yet converted to customers (`customers_id = 0`), newest first. KNOWN BEHAVIOUR: the page_number segment is currently ignored; page 1 is always returned.
GET /{api_key}/leads/get/page
Responses
200— Request received successfully
Paginated list of leads (20 per page) not yet converted to customers (`customers_id = 0`), newest first. KNOWN BEHAVIOUR: the page_number segment is currently ignored; page 1 is always returned.
GET /{api_key}/leads/get/page/{page_number}
Responses
200— Request received successfully
Get a lead
GET /{api_key}/leads/get/{lid}
Responses
200— Request received successfully
Update a lead (only supplied recognised fields change). Failures: 'invalid lead id X' for a non-numeric id, 'lead not found X'.
POST /{api_key}/leads/{lid}
Request body
| Field | Type | Description |
|---|---|---|
Status | string | Lead status (lookup) |
status | string | Alias of `Status` (database field name) |
Company | string | Company |
company | string | Alias of `Company` (database field name) |
Title | string | Title |
title | string | Alias of `Title` (database field name) |
Name | string | First name |
name | string | Alias of `Name` (database field name) |
Middle Name | string | Middle Name |
middlename | string | Alias of `Middle Name` (database field name) |
Surname | string | Surname |
surname | string | Alias of `Surname` (database field name) |
Sex | string | Sex |
sex | string | Alias of `Sex` (database field name) |
Date Of Birth | string | Date Of Birth |
dob | string | Alias of `Date Of Birth` (database field name) |
Logo | string | Logo URL |
logo | string | Alias of `Logo` (database field name) |
Phone | string | Phone |
phone | string | Alias of `Phone` (database field name) |
Mobile | string | Mobile |
mobile | string | Alias of `Mobile` (database field name) |
Fax | string | Fax |
fax | string | Alias of `Fax` (database field name) |
Email | string | |
email | string | Alias of `Email` (database field name) |
Website | string | Website |
web | string | Alias of `Website` (database field name) |
Billing Address | string | Written to the `address` column AND saved as the lead's billing address (saveAddress) |
address | string | Alias of `Billing Address` (database field name) |
City | string | City |
city | string | Alias of `City` (database field name) |
State | string | State |
state | string | Alias of `State` (database field name) |
Country | string | Country |
country | string | Alias of `Country` (database field name) |
Comments | string | Comments |
comments | string | Alias of `Comments` (database field name) |
Lead Type | string | Lookup 'Lead Types' |
type | string | Alias of `Lead Type` (database field name) |
Lead Source | string | Lookup 'Lead Sources' |
source | string | Alias of `Lead Source` (database field name) |
Assigned User | string | User ID |
uid | string | Alias of `Assigned User` (database field name) |
Security Question | string | Security Question |
secquestion | string | Alias of `Security Question` (database field name) |
Security Answer | string | Security Answer |
secanswer | string | Alias of `Security Answer` (database field name) |
Security | string | Security |
security | string | Alias of `Security` (database field name) |
Primary Address | string | Full address string, geocoded and saved as the lead's primary address (saveAddress) |
Responses
200— Request received successfully