Skip to main content

Uploading Bills

After you have created a CBI Bill Connect, you can start uploading bills via the Bill Upload API. A typical sequence to upload a bill made of three files: bill-part1.csv, bill-part2.csv, and bill-part3.csv would be as follows:

  1. Create a bill upload. To do so, you pass the bill connect ID (for example, cbi-oi-optima-test-1), and the billing period, which currently means the billing month in YYYY-MM format (for example, 2020-09).
  2. The bill upload id (for example, 0ae0f4c1-7c3a-4172-bcce-e96b9927fa07) is returned to you in the response from the API; you can now upload the three files (in sequence, or in parallel).
  3. When you upload a file, the response (if successful) will give you a MD5 hash so that you can check whether the uploaded file matches your original one.
  4. After all the files have been successfully uploaded, you can commit this bill upload, via the commit operation; this will trigger the processing of this bill.

If after uploading the files, or at any stage after the creation of the bill upload, you want to discard without committing, use the abort operation instead.

note

For a given bill connect, and a given billing period, you can only have one bill upload in progress (that is, created, but not yet committed nor aborted).