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

FieldTypeDescription
StatusstringLead status (lookup)
statusstringAlias of `Status` (database field name)
CompanystringCompany
companystringAlias of `Company` (database field name)
TitlestringTitle
titlestringAlias of `Title` (database field name)
NamestringFirst name
namestringAlias of `Name` (database field name)
Middle NamestringMiddle Name
middlenamestringAlias of `Middle Name` (database field name)
SurnamestringSurname
surnamestringAlias of `Surname` (database field name)
SexstringSex
sexstringAlias of `Sex` (database field name)
Date Of BirthstringDate Of Birth
dobstringAlias of `Date Of Birth` (database field name)
LogostringLogo URL
logostringAlias of `Logo` (database field name)
PhonestringPhone
phonestringAlias of `Phone` (database field name)
MobilestringMobile
mobilestringAlias of `Mobile` (database field name)
FaxstringFax
faxstringAlias of `Fax` (database field name)
EmailstringEmail
emailstringAlias of `Email` (database field name)
WebsitestringWebsite
webstringAlias of `Website` (database field name)
Billing AddressstringWritten to the `address` column AND saved as the lead's billing address (saveAddress)
addressstringAlias of `Billing Address` (database field name)
CitystringCity
citystringAlias of `City` (database field name)
StatestringState
statestringAlias of `State` (database field name)
CountrystringCountry
countrystringAlias of `Country` (database field name)
CommentsstringComments
commentsstringAlias of `Comments` (database field name)
Lead TypestringLookup 'Lead Types'
typestringAlias of `Lead Type` (database field name)
Lead SourcestringLookup 'Lead Sources'
sourcestringAlias of `Lead Source` (database field name)
Assigned UserstringUser ID
uidstringAlias of `Assigned User` (database field name)
Security QuestionstringSecurity Question
secquestionstringAlias of `Security Question` (database field name)
Security AnswerstringSecurity Answer
secanswerstringAlias of `Security Answer` (database field name)
SecuritystringSecurity
securitystringAlias of `Security` (database field name)
Primary AddressstringFull 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

FieldTypeDescription
companystringcompany name
emailstringemail address
phonestringPhone number
typestringThe type of lead
sourcestringlead source, where did this lead come from?
notesstringany internal notes about the lead
statusstringCurrent 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

FieldTypeDescription
companystringcompany name
emailstringemail address
phonestringPhone number
typestringThe type of lead
sourcestringlead source, where did this lead come from?
notesstringany internal notes about the lead
statusstringCurrent 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

FieldTypeDescription
companystringcompany name
emailstringemail address
phonestringPhone number
typestringThe type of lead
sourcestringlead source, where did this lead come from?
notesstringany internal notes about the lead
statusstringCurrent 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

FieldTypeDescription
StatusstringLead status (lookup)
statusstringAlias of `Status` (database field name)
CompanystringCompany
companystringAlias of `Company` (database field name)
TitlestringTitle
titlestringAlias of `Title` (database field name)
NamestringFirst name
namestringAlias of `Name` (database field name)
Middle NamestringMiddle Name
middlenamestringAlias of `Middle Name` (database field name)
SurnamestringSurname
surnamestringAlias of `Surname` (database field name)
SexstringSex
sexstringAlias of `Sex` (database field name)
Date Of BirthstringDate Of Birth
dobstringAlias of `Date Of Birth` (database field name)
LogostringLogo URL
logostringAlias of `Logo` (database field name)
PhonestringPhone
phonestringAlias of `Phone` (database field name)
MobilestringMobile
mobilestringAlias of `Mobile` (database field name)
FaxstringFax
faxstringAlias of `Fax` (database field name)
EmailstringEmail
emailstringAlias of `Email` (database field name)
WebsitestringWebsite
webstringAlias of `Website` (database field name)
Billing AddressstringWritten to the `address` column AND saved as the lead's billing address (saveAddress)
addressstringAlias of `Billing Address` (database field name)
CitystringCity
citystringAlias of `City` (database field name)
StatestringState
statestringAlias of `State` (database field name)
CountrystringCountry
countrystringAlias of `Country` (database field name)
CommentsstringComments
commentsstringAlias of `Comments` (database field name)
Lead TypestringLookup 'Lead Types'
typestringAlias of `Lead Type` (database field name)
Lead SourcestringLookup 'Lead Sources'
sourcestringAlias of `Lead Source` (database field name)
Assigned UserstringUser ID
uidstringAlias of `Assigned User` (database field name)
Security QuestionstringSecurity Question
secquestionstringAlias of `Security Question` (database field name)
Security AnswerstringSecurity Answer
secanswerstringAlias of `Security Answer` (database field name)
SecuritystringSecurity
securitystringAlias of `Security` (database field name)
Primary AddressstringFull address string, geocoded and saved as the lead's primary address (saveAddress)

Responses

  • 200 — Request received successfully

← All API groups