Skip to main content
This workflow shows developers how to build automation around accounts payable. For example, you can build a scheduled job that checks for new posted bills and sends a notification to Slack, or a pipeline that reconciles bill data against another system.

Prerequisites

Before you start, complete the steps in the CLI Quickstart:
  • The CLI is installed.
  • You have read access to bills.

Steps

Step 1 - Set up authentication for your pipeline: In your CI/CD environment (GitHub Actions, Jenkins, etc.), add X_API_KEY as a secret. The CLI uses this automatically when the environment variable is set; no browser-based login required.
Step 2 - Pull posted bills as JSON:
The --status and --format flags are confirmed on bills. JSON output makes it straightforward to parse programmatically. Step 3 - Pipe into jq or another tool: A list command returns an object, not a bare array. The shape is {items: [...], count: N}, where count is the total available rather than the number returned on this page. Reach into .items[] to iterate the records:
Inspect the raw output once to confirm the exact field names available on your version, then build your filter against those keys. Piping to jq '.[]' instead of .items[] iterates the object’s values rather than the records, which yields the array and the count as two results rather than one record per line. Step 4 - Add to a scheduled job: Wire the same commands into a scheduled CI workflow. The example below runs each weekday morning in GitHub Actions:
The install script method shown here requires Python 3.11+ on the CI runner. Add a setup step (e.g., actions/setup-python with python-version: '3.11') if your runner image doesn’t include it.
Result: A scheduled CI/CD job runs on the cadence you choose, pulls posted bills as JSON, and hands them to your notification or reconciliation logic. Note that jq '.count' reports the total matching the filter, which can exceed the records in the file. Add --all to the list command if the job needs every record rather than the first page.

Tips

  • Use --format json for anything automated: table output is great for humans but brittle for scripts.
  • The CLI is read-heavy today: while create and update exist, the highest-value use cases right now tend to be listing, filtering, and exporting data.
Last modified on September 24, 2026