Overview
This guide is a complete reference for the Cornerstone Database API — a REST-based service that allows direct interaction with the Cornerstone data tables. It is intended for developers and integration partners who need to import or retrieve customer, billing, and recurring revenue data, add correspondence and support entries, or read the validated lookup lists that imports depend on. For a full PDF copy of the API Reference please scroll to the bottom of the article.
The service (service name database) offers 38 methods across the following functional groups:
- Getting Started — base URL, authentication, test mode, account matching, response conventions, and the full method index
- Data Import — customers, recurring charges, contracts, contacts, invoices, and credits
- Customers and Contacts — list and retrieve customer records, contacts, zones, and AlarmPayments sessions
- Recurring Charges and Contracts — list, discontinue, and update recurring charges and contracts
- Invoices, Correspondence and Support — list invoices, CorrLog, and support records; add new entries
- Validated Lists — lookup lists that supply accepted values for import fields
- Utilities — encryption/decryption, GUID generation, and Clarion date/time conversion
- Data Objects — complete field lists for Customer, InvoiceList, and RechargeList records
All requests go to https://devapi.cfibilling.com and require a signed-in session unless otherwise noted. A Postman collection with working examples is available at https://devapi.cfibilling.com/docs/CornerstoneAPI.postman_collection.json. A formal WSDL definition is available at https://devapi.cfibilling.com/database?WSDL.
Base URL and Endpoints
| Item | Value |
|---|---|
| Service | database |
| Base URL | https://devapi.cfibilling.com |
| Endpoint pattern | https://devapi.cfibilling.com/{MethodName} |
| Example | https://devapi.cfibilling.com/dbCustomerList |
Authentication
Start a session with the login method, which uses Basic Authentication and returns a token and status. Every other method requires you to be signed in. The examples send credentials with each request as an HTTP Basic Authorization header (the Base64 encoding of username:password); with cURL, use --user Username:Password.
⚠️ IMPORTANT
Always call the API over HTTPS and keep credentials on your server, never in code that end users can view.
login — Signs in and returns a session token
Accepts POST or GET. No sign-in required.
| Method | Endpoint |
|---|---|
| POST | https://devapi.cfibilling.com/login |
| GET | https://devapi.cfibilling.com/login?parameters |
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| cc | String (2) | Required | Company Code |
| user | String (255) | Required | User ID |
| password | String (255) | Required | Password |
Response
The response is wrapped in a login_response object. Every response can include the standard ErrorQueue list; most also include ServiceResults.
| Element | Type |
|---|---|
| token | String (255) |
| status | Integer |
Example request (JSON POST)
POST https://devapi.cfibilling.com/login
Content-Type: application/json
Accept: application/json
{
"cc" : "value",
"user" : "value",
"password" : "value"
}Example request (HTTP GET)
GET https://devapi.cfibilling.com/login?cc=value&user=value&password=value Accept: application/json
Example response
{
"login_response" : {
"token" : "value",
"status" : "value"
}
}Replace each value placeholder with real data.
Request Formats
Each method accepts a JSON POST (parameters in the JSON body, with Content-Type: application/json) or an HTTP GET (parameters in the query string). Both return JSON. Import methods send lists of records, so they must use JSON POST.
JSON POST example
POST https://devapi.cfibilling.com/dbCustomerList
Content-Type: application/json
Accept: application/json
Authorization: Basic {base64 of username:password}
{
"FilterAccount" : "value",
"FilterAccountExternal" : "value",
"ModifiedSinceDate" : "value"
}Test Mode
The import methods and dbRechargeDiscontinue accept a TestMode parameter. With TestMode = T the request is fully processed and validated, but the data is not written. Use it to check a batch before you import it for real with TestMode = F.
Identifying Customers
| Parameter | Use |
|---|---|
| FilterAccount | The Cornerstone customer account number. |
| FilterAccountExternal | Your own (external) account number for the customer. FilterAccount and FilterAccountExternal are mutually exclusive; send one or the other. |
| AutoAssignAccount | On dbCustomerImport: T lets Cornerstone assign account numbers, F uses the account numbers you send. |
| ModifiedSinceDate | On dbCustomerList and dbRechargeList: return only records modified on or after this date (mm/dd/yyyy). |
Validated Lists
Several import fields only accept values that already exist in Cornerstone. Read the matching list method first; new values must be added in Cornerstone before they can be used in an import.
| Import field | Accepted values from |
|---|---|
| county | dbTaxTableList |
| salesrep | dbTechsList |
| servicecomp | dbCentralList |
| multicomp_id | dbMultiComList |
| servicetype (recurring charges) | dbServiceList |
| type / category (contracts) | dbConTypeList / dbContCatList |
| userfield17 to userfield20 | dbUser17List to dbUser20List |
Recommended Import Workflow
- Sign in with
login. - Read the validated lists you need and map your values to them.
- Import customers with
dbCustomerImportusingTestMode= T. Fix any errors reported inErrorQueue. - Repeat with
TestMode= F to write the customers. - Import related records (recurring charges, contracts, contacts, invoices, credits) the same way: test first, then write.
- Confirm results using
dbCustomerList,dbRechargeList, anddbRechargeRMR.
Response Structure and Errors
Every response is a JSON object with a single wrapper named after the method plus _response. Responses include skippedrecords and resultcomplete, any requested data, and the standard lists below.
ErrorQueue — validation and processing errors
Check ErrorQueue on every response; for imports it identifies the record and the problem.
| Field | Type |
|---|---|
| ErrorNumber | Integer |
| ErrorPosition | String (255) |
| ErrorRecordId | String (255) |
| ErrorDescription | String (255) |
| ErrorRecommendation | String (255) |
ServiceResults — the actions performed
| Field | Type |
|---|---|
| ResultAction | String (255) |
| ResultTable | String (255) |
| ResultRecordId | String (255) |
| ResultDescription | String (255) |
Data Types, Dates, and Yes/No Values
| Type shown | Meaning |
|---|---|
| String (n) | Text up to n characters. |
| Integer / Byte integer | Whole number. |
| Decimal | Number with decimals, for example amounts. |
| Object | A nested JSON object containing fields. |
| List of objects | A JSON array of objects (one per record). |
- Dates in filters and invoice imports use
mm/dd/yyyy. - Parameters marked T/F take T (true) or F (false). Flags marked 0/1 take 1 (yes) or 0 (no).
- Some Cornerstone fields store dates and times in Clarion internal format. Use
utDateTimeto convert them.
Method Index
Large records returned by several methods are documented in the Data Objects section of this article. All 38 methods are listed below.
| Method | Description | Section |
|---|---|---|
| login | Signs in with a company code, user ID and password (Basic Authentication) and returns a session token. | Getting Started |
| dbCustomerImport | Customer - Import | Data Import |
| dbRechargeImport | Customer - Recurring Charges Import | Data Import |
| dbContractImport | Customer - Contracts Import | Data Import |
| dbContactsImport | Customer - Contacts Import | Data Import |
| dbInvoiceImport | Customer - Invoice Import | Data Import |
| dbCredHeadImport | Customer - Credit Import | Data Import |
| dbCustomerList | Customer - List customers Changed Since Date | Customers and Contacts |
| dbCustomerFetch | Customer - Record Access | Customers and Contacts |
| dbContactsList | List of Contacts | Customers and Contacts |
| dbRelationContactsList | Contact Relationships | Customers and Contacts |
| dbZonesList | List of Zones | Customers and Contacts |
| dbAlarmPayments | AlarmPayments Access | Customers and Contacts |
| dbRechargeList | List of Recharge | Recurring Charges and Contracts |
| dbRechargeRMR | Customer - Return RMRs | Recurring Charges and Contracts |
| dbRechargeDiscontinue | Set Recurring EndDate and stop any Autopays | Recurring Charges and Contracts |
| dbContractList | List of Contracts by Date Range | Recurring Charges andContracts |
| dbContractUpdate | Contract Update | Recurring Charges and Contracts |
| dbInvoiceList | List of Invoices by Date Range | Invoices, Correspondence and Support |
| dbCorrLogList | List of CorrLogs by Date Range | Invoices, Correspondence and Support |
| dbCorrLogUpdate | CorrLog Update | Invoices, Correspondence and Support |
| dbSupportList | List of Support by Date Range | Invoices, Correspondence and Support |
| dbSupportUpdate | Support Update | Invoices, Correspondence and Support |
| dbTaxTableList | Customer - Tax County List | Validated Lists |
| dbTechsList | Techs / Sales Rep List | Validated Lists |
| dbCentralList | Customer - Central List | Validated Lists |
| dbServiceList | Recurring - Service List | Validated Lists |
| dbMultiComList | MultiCom List | Validated Lists |
| dbConTypeList | Contract - Type List | Validated Lists |
| dbContCatList | Contract - Category List | Validated Lists |
| dbPhoneTypesList | Phone Types List | Validated Lists |
| dbUser17List | Customer - User17 List | Validated Lists |
| dbUser18List | Customer - User18 List | Validated Lists |
| dbUser19List | Customer - User19 List | Validated Lists |
| dbUser20List | Customer - User20 List | Validated Lists |
| utEncryptDecrypt | Allows you to use our version of encryption and decryption | Utilities |
| utCreateGUID | Returns a 32 character GUID | Utilities |
| utDateTime | Convert Date and Time values To and From Clarion internal format | Utilities |
Data Import
The import methods accept lists of records as JSON POST. Each method supports a TestMode parameter — always run with TestMode = T first to validate without writing data.
⚠️ IMPORTANT
Send each import with TestMode = T first. Test mode validates the data without writing it. When the response has no errors, send the same request with TestMode = F.
dbCustomerImport — Customer Import
Accepts POST or GET. Sign-in required. Endpoint: https://devapi.cfibilling.com/dbCustomerImport
Top-level parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| TestMode | String (1) | Optional | T/F - Test Mode Data Not Written |
| AutoAssignAccount | String (1) | Required | T/F - Automatically Assign Account Numbers |
| customer | List of objects | Required | List of Customers. Contains 60 fields. |
Key rules
- AutoAssignAccount = T: Cornerstone assigns the next available account number and stores the account number you sent as the previous account number, so related imports can still link to it.
- AutoAssignAccount = F: Cornerstone uses the account number you send. If it already exists, the customer is updated; otherwise a new customer is added.
- Required fields:
lastname,address1,town,state,zip,county,equipment,rescomm,activesince,chargelate,account_status,monitored. multicomp_idis required only if your company uses multi-company.rescomm: RES, COMM or OTHR.account_status: Client, Prospect or In Progress.chargelate: Y or N.monitored: 1 for a monitored account.- Yes/No fields accept Y, Yes, YES or 1 for true and N, No, NO or 0 for false.
- Phone numbers: 10 digits without symbols is preferred.
townmust be the primary town for the ZIP code, with no hyphens or abbreviations. Do not use double quotes or ampersands in address fields. email_addressis strongly recommended and is required for credit card autopay.billtouseshould be 1 when bill-to address data is sent, andbilltoworksitemust match it.allowapayshould be imported as 1.- Validated fields:
county→dbTaxTableList;salesrep→dbTechsList;servicecomp→dbCentralList;multicomp_id→dbMultiComList;userfield17–userfield20→dbUser17List–dbUser20List.
Example request (JSON POST)
POST https://devapi.cfibilling.com/dbCustomerImport
Content-Type: application/json
Accept: application/json
Authorization: Basic {base64 of username:password}
{
"TestMode" : "value",
"AutoAssignAccount" : "value",
"customer" : [
{
"account" : "value",
"externalaccount" : "value",
"lastname" : "value",
"firstname" : "value",
"address1" : "value",
"address2" : "value",
"town" : "value",
"state" : "value",
... 52 more fields (see the field list)
}
]
}dbRechargeImport — Recurring Charges Import
Accepts POST or GET. Sign-in required. Endpoint: https://devapi.cfibilling.com/dbRechargeImport
Key rules
- Each recurring charge links to a customer by account number. A customer can have more than one recurring charge.
servicetypemust be a recurring charge code that already exists in Cornerstone (seedbServiceList). New codes must be added in Cornerstone first.- Required fields:
account(orexternalaccount),servicetype,billperiod,nextdate(leave blank when pending),charge,chargetax,prorate_startdate,paymethod,autopay. billperiod: for example M, Q, A or S.chargetaxandprorate: Y or N.chargeis the pre-tax amount.paymethod: Printer, Visa, Master Card, Amex, Discover, Checking, Savings or Email.autopay: YES for any pay method.emailcopy: 0 = None, 1 = Primary, 2 = Secondary, 3 = Both, 4 = Mail hard copy.poston15th: 1 to process on the 15th of the month.pending: 1 marks the charge as pending.note: leave blank unless overriding the service code description.- Credit cards:
cardbankaccountis the card number (15 or 16 digits, no spaces or hyphens);cardexpirebankabais the expiration date. - Checking/Savings:
cardbankaccountis the bank account number andcardexpirebankabais the 9-digit ABA routing number. Cornerstone encrypts card and bank account numbers on import.
dbContractImport — Contracts Import
Accepts POST or GET. Sign-in required. Endpoint: https://devapi.cfibilling.com/dbContractImport
Key rules
- Each contract links to a customer by account number. A customer can have more than one contract.
- Required:
account,typeandcategory. typemust match a value fromdbConTypeListandcategorymust match a value fromdbContCatList.
dbInvoiceImport — Invoice Import
Accepts POST or GET. Sign-in required. Endpoint: https://devapi.cfibilling.com/dbInvoiceImport. Send Invoices and their Details in the same request. Detail lines link to their invoice through externalinvoiceid.
- Invoice required fields:
externalaccountoraccount,externalinvoiceid,invoicedate,duedate,service_desc,printed,categoryof,county. - Detail required fields:
externalinvoiceid,partid,part,quantity,unit_charge,taxable,gl_code,printinvoice,printtextoninvoice. - Dates use mm/dd/yyyy.
printed,printinvoiceandprinttextoninvoice: 1 = Yes, 0 = No.taxable: Y or N. quantitymust be positive. For a deduction, send a negativeunit_charge(andextended).- If sent,
taxratemust match the rate for the county andtaxamount,totaldueandtax_amountmust match Cornerstone's calculated values. - When payments are sent,
amountpaidmust equal the total ofamtpaid1toamtpaid4. - If omitted,
billto_accountandmulticomp_iddefault to the values on the customer record.
dbCredHeadImport — Credit Import
Accepts POST or GET. Sign-in required. Endpoint: https://devapi.cfibilling.com/dbCredHeadImport
- Required:
CreditDate,CreditAmountandCreditType. CreditType: PREPAID, *PREPAID or DISCOUNT.DiscountCategoryis validated against your credit codes whenCreditTypeis DISCOUNT.OkForRecurringandOkForProductdefault to 1.DescriptionInvoiceprints on the invoice.
Validated Lists — Reference
Call these methods before importing to retrieve the accepted values for validated import fields. All accept POST or GET and require a signed-in session. New values must be added in Cornerstone first — they cannot be created through the API.
⚠️ IMPORTANT
Many import fields only accept values that already exist in Cornerstone. Call these methods to get the accepted values before you import. New values must be added in Cornerstone first.
dbTaxTableList — Customer - Tax County List
Endpoint: https://devapi.cfibilling.com/dbTaxTableList — takes no parameters. Returns the counties (taxing authorities) accepted in the county field of customer and invoice imports. The county attaches the correct sales tax rate. Response list: TaxTable_List with fields county (String 20), multicomp_id (String 5), taxrate (Decimal), gl_code (String 20).
dbTechsList — Techs / Sales Rep List
Endpoint: https://devapi.cfibilling.com/dbTechsList — takes no parameters. Response list: Techs_List with fields tech (String 15), lastname (String 40), firstname (String 20), issalesrep (Byte integer), istechnician (Byte integer).
dbCentralList — Customer - Central List
Endpoint: https://devapi.cfibilling.com/dbCentralList — takes no parameters. Response list: Central_List with fields central_name (String 25), multicomp_id (String 5).
dbServiceList — Recurring - Service List
Endpoint: https://devapi.cfibilling.com/dbServiceList — takes no parameters. Returns the recurring charge codes accepted by dbRechargeImport. The invoice description for a code is limited to 26 characters. Response list: Service_List with fields servicetype (String 8), servicedesc (String 65), multicomp_id (String 5), default_cycle (String 1), default_monthly (Decimal), default_tax (String 1).
dbMultiComList — MultiCom List
Endpoint: https://devapi.cfibilling.com/dbMultiComList — takes no parameters. Response list: MultiCom_List with 15 fields including multicomp_id, companyname, companyadd1, companyadd2, companytown, companystate, companyzip, companyzip2, companytele1, companytele2, contact, title, email_address, license_number, license_number2.
dbConTypeList — Contract - Type List
Endpoint: https://devapi.cfibilling.com/dbConTypeList — takes no parameters. Response list: ConType_List with field type (String 15).
dbContCatList — Contract - Category List
Endpoint: https://devapi.cfibilling.com/dbContCatList — takes no parameters. Response list: ContCat_List with field category (String 15).
dbPhoneTypesList — Phone Types List
Endpoint: https://devapi.cfibilling.com/dbPhoneTypesList — takes no parameters. Response list: PhoneTypes_List with fields codeinternal (String 25), codeexternal (String 25), codedisplay (String 25).
dbUser17List through dbUser20List — Customer User Field Lists
These four methods follow the same pattern and each take no parameters.
| Method | Description | Response list |
|---|---|---|
| dbUser17List | Customer - User17 List | User17_List |
| dbUser18List | Customer - User18 List | User18_List |
| dbUser19List | Customer - User19 List | User19_List |
| dbUser20List | Customer - User20 List | User20_List |
Each response list contains three fields: codeinternal (String 25), codeexternal (String 25), and codedisplay (String 25).
Utilities
These methods provide encryption/decryption, GUID generation, and Clarion date and time conversion. All accept POST or GET and require a signed-in session.
utEncryptDecrypt — Encrypt or Decrypt a value
Allows you to use Cornerstone's version of encryption and decryption. Endpoint: https://devapi.cfibilling.com/utEncryptDecrypt
| Parameter | Type | Required |
|---|---|---|
| Request | String (1) | Optional |
| Input | Integer | Required |
Response is wrapped in a utEncryptDecrypt_response object and includes skippedrecords, resultcomplete, and Output (Integer).
utCreateGUID — Generate a GUID
Returns a 32 character GUID. Endpoint: https://devapi.cfibilling.com/utCreateGUID — takes no parameters. Response is wrapped in a utCreateGUID_response object and includes skippedrecords, resultcomplete, and Output (String 32).
utDateTime — Convert Clarion Date and Time
Converts date and time values to and from Clarion internal format. Endpoint: https://devapi.cfibilling.com/utDateTime
| Parameter | Type | Required | Description |
|---|---|---|---|
| Request | String (1) | Required | F = From Clarion format; T = To Clarion format |
| InputDate | String (15) | Optional | |
| InputTime | String (15) | Optional |
Response is wrapped in a utDateTime_response object and includes skippedrecords, resultcomplete, OutputDate (String 15), and OutputTime (String 15).
Data Objects
The following large records are returned by multiple methods. Each contains a complete set of fields with data types and, where applicable, date formats.
Customer — 245 fields
Returned by: dbCustomerFetch. Contains the full customer record including identity, address, billing, contact, recurring billing settings, user-defined fields (userfield01–userfield25), API fields (apifield01–apifield10), bill-to address, at-risk tracking, GPS coordinates, and long-text fields such as site_directions (String 1501), service_instructions (String 1501), and comments (String 5001). Date fields such as activesince and closed are Integer · mm/dd/yyyy. The dbCustomerFetch response also returns balanceduecnt (Integer), balancedueamt (Decimal), and totalmonthlyrmr (Decimal) alongside the Customer object.
InvoiceList — 115 fields
Returned by: dbInvoiceList. Contains invoice header and payment data including guid, account, invoicetype, inv_number, invoicedate, duedate, totaldue, taxrate, taxamount, up to four payment slots (amtpaid1–amtpaid4 with associated datepaid and datepost fields), surcharge fields, worksite address fields, and reserved unused fields.
RechargeList — 80 fields
Returned by: dbRechargeList. Contains the full recurring charge record including guid, account, servicetype, billperiod, nextdate, end_date, charge, monthly, autopay and payment card/bank fields, rate increase tracking fields (nextincrease, lastincrease, lastincrease2–5, prevmonthly–prevmonthly5), invoice pause fields, and audit fields such as datecreated, usercreated, changedate, changetime (Integer · hh:mm am), and changeuserid.
Need Additional Help?
Our Customer Success team is here to assist you.
Phone: 847-405-9517
Email: customer.success@alarmbills.com
Copyright © 1999–2026 Cornerstone Billing Solutions. All rights reserved.
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article