API response format
All BILL API responses follow a set of rules. In this section, we explain the response format details and then showcase an example.
Response format details
A BILL API response can be broken down into different components.
Component | Description |
---|---|
response_status | - 0 : Success- 1 : Error |
response_message | - Success - Error |
response_data | response_data provides details for an operation-specific response if the request is successful.For invalid or incomplete requests, response_data provides an error code and error message. See Common API error codes for more information. |
Example response: Sign in to your sandbox developer account
When you sign in with the Login API, your API session is created in response and a sessionId
is generated. Use the sessionId
value in all subsequent calls to confirm that you are in a signed in session.
{
"response_status": 0,
"response_message": "Success",
"response_data": {
"sessionId": "{session_id}",
"orgId": "{organization_id}",
"apiEndPoint": "https://api-sandbox.bill.com/api/v2",
"usersId": "{user_id}"
}
}
NOTE
createdTime
andupdatedTime
in API responses are in the ISO 8601 format with time offset from UTC. The format isYYYY-MM-DDThh:mm:ss.sss±hhmm
.For example,
2024-12-30T07:00:00.000+0000
is 12 AM Pacific Time (7 AM UTC) on December 30, 2024. If your API testing tool does not support URL encoding, replace±
with%2B
.
Updated 9 months ago