Custom Invoice API Example

A complete, runnable script that creates a custom‑invoice integration and uploads a sample CSV file.

Custom Invoices let you import cost data from vendors or services that Pelanor’s built‑in connectors don’t cover.

Once ingested, these costs appear in every dashboard, report, and alert—​alongside your cloud‑provider data. See the feature documentation

for more information.

When to use the Custom Invoice API

  • Third‑party SaaS or marketplace charges that aren’t available from native Pelanor integrations.
  • On‑prem or colocation costs you need to view in the same place as cloud spend.
  • Ad‑hoc internal chargebacks or any spend tracked only in spreadsheets.

This API is not suitable for uploading very large datasets, such as entire cloud platform billing exports. Consult your Pelanor Solution Engineer if in doubt.

Typical Flow

1

Create an Integration

Call Create Custom Invoice Integration once per billing account or org ID.

2

Prepare a CSV

Build a CSV with the required columns usage_date and cost.
Add optional columns—such as service_name, region, or tag:{key}—to improve filtering.

3

Upload the CSV

Use Upload Custom Invoice File to push the file.

4

Verify Ingestion

The file is validated server‑side; format errors are returned immediately.
Once accepted, data appears in Pelanor within ~12 hours.