This article describes the mechanics of Bill.com API - the end points, request and response formats
Login API requests for production must use URL - for example:
- For other environments (see Environment for Sandbox Accounts), a separate API End Point URL exists.
- Subsequent calls are made to the
apiEndPoint(referred as <API End Point URL> throughout this document) returned on the Login call.
- All entities (exceptions noted) can be created, updated and read with the same set of CRUD (Create, Read, Update & Delete) operations.
- The API end point follows the format :
<API End Point URL>/Crud/<Operation>/<Entity>.jsonwhere Operation is one of the following: Create, Update, Read, Delete, Undelete.
The response from the Bill.com API is JSON, which is described in the rest of this document.
Request parameters specific to the operation are contained within the data variable, as string-value pairs.
NOTE: All names and values in name/value pairs of JSON objects are case sensitive. All names must be identical to their object definition in the API Reference Guide.
All API parameters are passed as
Content-Type is set to
Bill.com API responses always have three name/value pairs:
response_status: 0 = success, or 1 = error.
response_message:"Success" or "Error".
response_data:returned information (i.e., list of records or any errors, etc.). Operation specific response data is described in the API reference section.
The following table defines various data types that the Bill.com API works with in request and response objects.
|String (n)||Character input with max length indicated. IMPORTANT: if the Bill.com account syncs with other accounting applications (QuickBooks for Windows, QuickBooks Online, Intacct or Xero), the max length can be defined by the external systems.|
|datetime||YYYY-MM-DDThh:mm:ss.sss±hhmm (ISO 8601 format with time offset from UTC)|
|money||NNNN.NN format. Bill.com currently supports only USD for all transactions.|
|NumberName||Number input - up to 5 decimal points.|
|number||Number input - up to 5 decimal points.|
|addressZip||1-20 characters, letters, numbers and symbols.|