BILL v3 API in Postman
In the API reference section, you can test with the BILL v3 API endpoints and get a server response. For example, fill in the required fields for creating a customer (name
, email
, sessionId
, and devKey
) and click Try It! to see the server response.
The BILL v3 API documentation is auto-generated with OpenAPI. You can import the OpenAPI specification in Postman and test with the API endpoints on Postman.
Create a free Postman account
This section assumes that you have a Postman account and access to the Postman app (or web app). See postman.com for more information.
Import the OpenAPI spec in Postman
Use the published BILL v3 API OpenAPI specification to import all the BILL v3 API endpoints in Postman.
- Copy the contents of the OpenAPI specification.
- In Postman, click File > Import.
- In the import modal, paste the contents of the OpenAPI specification.
- Under Choose how to import your Specification, select Postman Collection and click Import.
Under Collections in your Postman Workspace, the BILL v3 API is imported as Connect API.
Set up your sandbox environment
When you save your sandbox API credentials as environment variables in Postman, you can simply refer to the variables when you are testing with the BILL v3 API.
Ensure that your sandbox API sign-up is complete
When your sandbox API sign-up is complete, you have all the credentials you need for signing in performing other BILL v3 API operations -
username
,password
,devKey
, andorgId
. See Sandbox API sign up for more information.
For example, if you save the base URL as a baseUrl
variable, you can then use the variable for any API operation, such as creating a customer. In this case, the endpoint path in Postman is POST {{baseUrl}}/v3/customers
.
- In your Postman Workspace, click New > Environment. Set up the environment variables for your sandbox environment.
Variable | Current value |
---|---|
baseUrl | https://gateway.stage.bill.com/connect |
username | Your username |
password | Your password |
devKey | Your developer key |
orgId | Your organization ID |
- Click Save to save this sandbox environment information.
The environment is available under Environments in your Postman Workspace. You can set this environment from the list at the top-right in Postman.
Sign in with POST /v3/login
in Postman
POST /v3/login
in PostmanWhen you are ready to test with the BILL v3 API in Postman, sign in with POST /v3/login
. In the response, a generated sessionId
is available. Use the sessionId
in all subsequent API calls to confirm that you are in a signed-in API session.
- Under Collections, click Connect API > v3 > login > API login. The
POST /v3/login
endpoint appears on the right. - Under Body, set the type as raw, and update the required information. In this example, we update the variable names that we saved as environment variables in the previous section.

- Under Scripts, select Post-res and paste the following code to save the generated
sessionId
value as an environment variable in Postman for all your subsequent API calls.
let jsonData = pm.response.json();
let sessionId = jsonData.sessionId;
pm.globals.set("sessionId", sessionId);
- Click Save, and then click Send. The success 200 OK response is available. The response includes the
sessionId
, which is required for all subsequent API calls along with your developer key.
For example, for creating a customer (Connect API > v3 > customers > Create a customer), when you set sessionId
as {{sessionId}}
and devKey
as {{devKey}}
under Headers, these values are set by the sandbox environment variables.
Updated 20 days ago