OpenMeter Billing Settings

List billing invoices

Changed on

List billing invoices.

Returns a page of invoices. Gathering invoices are never included. Use filter to narrow by status, customer, dates, or service period start. Use sort to control ordering.

get/v3/openmeter/billing/invoices

Request

  • Base URL
    https://global.api.konghq.com
  • Auth
    • HTTP bearer
    • or HTTP bearer
    • or HTTP bearer
    • or HTTP bearer

Query parameters

page, object
size, integer

The number of items to include per page.

number, integer

The page number.

Determines which page of the collection to retrieve.

sort, string

The asc suffix is optional as the default sort order is ascending. The desc suffix is used to specify a descending order. Multiple sort attributes may be provided via a comma separated list. JSONPath notation may be used to specify a sub-attribute (eg: 'foo.bar desc').

Example:created_at desc

Sort invoices returned in the response. Supported sort attributes:

  • issued_at
  • created_at (default)
  • service_period_start

The asc suffix is optional as the default sort order is ascending. The desc suffix is used to specify a descending order.

filter, ListInvoicesParamsFilter

Filter options for listing invoices.

status, object

Filter by invoice status.

customer_id, union

Filter by customer ID.

issued_at, union

Filter by the time the invoice was issued.

service_period_start, union

Filter by service period start.

created_at, union

Filter by invoice creation time.

Filter invoices returned in the response.

Examples:

  • filter[status][oeq]=draft,issued
  • filter[customer_id]=01KPDB8K...
  • filter[issued_at][gte]=2024-01-01T00:00:00Z
{
  "customer_id": "01G65Z755AFWAKHE12NY0CQ9FH",
  "issued_at": {
    "eq": "2022-03-30T07:20:50Z"
  },
  "service_period_start": {
    "eq": "2022-03-30T07:20:50Z"
  },
  "created_at": {
    "eq": "2022-03-30T07:20:50Z"
  }
}

Response

Page paginated response.

InvoicePagePaginatedResponse required

Page paginated response.

data, BillingInvoice[] required
meta, PaginatedMeta required

returns the pagination information

Example response

{
  "data": [
    {
      "id": "01G65Z755AFWAKHE12NY0CQ9FH",
      "labels": {
        "env": "test"
      },
      "created_at": "2023-01-01T01:01:01.001Z",
      "updated_at": "2023-01-01T01:01:01.001Z",
      "deleted_at": "2023-01-01T01:01:01.001Z",
      "number": "INV-2024-01-01-01",
      "currency": "USD",
      "supplier": {
        "addresses": {
          "billing_address": {
            "country": "US"
          }
        }
      },
      "customer": {
        "billing_address": {
          "country": "US"
        },
        "id": "01G65Z755AFWAKHE12NY0CQ9FH",
        "key": "019ae40f-4258-7f15-9491-842f42a7d6ac"
      },
      "service_period": {
        "from": "2023-01-01T01:01:01.001Z",
        "to": "2023-01-01T01:01:01.001Z"
      },
      "issued_at": "2023-01-01T01:01:01.001Z",
      "draft_until": "2023-01-01T01:01:01.001Z",
      "quantity_snapshotted_at": "2023-01-01T01:01:01.001Z",
      "collection_at": "2023-01-01T01:01:01.001Z",
      "due_at": "2023-01-01T01:01:01.001Z",
      "sent_to_customer_at": "2023-01-01T01:01:01.001Z",
      "workflow": {
        "apps": {
          "tax": {
            "id": "01G65Z755AFWAKHE12NY0CQ9FH"
          },
          "invoicing": {
            "id": "01G65Z755AFWAKHE12NY0CQ9FH"
          },
          "payment": {
            "id": "01G65Z755AFWAKHE12NY0CQ9FH"
          }
        },
        "source_billing_profile": {
          "id": "01G65Z755AFWAKHE12NY0CQ9FH"
        },
        "workflow": {
          "invoicing": {
            "draft_period": "P1D",
            "due_after": "P30D"
          },
          "payment": {
            "due_after": "P30D"
          }
        }
      },
      "lines": [
        {
          "labels": {
            "env": "test"
          },
          "created_at": "2023-01-01T01:01:01.001Z",
          "updated_at": "2023-01-01T01:01:01.001Z",
          "deleted_at": "2023-01-01T01:01:01.001Z",
          "id": "01G65Z755AFWAKHE12NY0CQ9FH",
          "service_period": {
            "from": "2023-01-01T01:01:01.001Z",
            "to": "2023-01-01T01:01:01.001Z"
          },
          "discounts": {
            "amount": [
              {
                "id": "01G65Z755AFWAKHE12NY0CQ9FH"
              }
            ],
            "usage": [
              {
                "id": "01G65Z755AFWAKHE12NY0CQ9FH"
              }
            ]
          },
          "subscription": {
            "id": "01G65Z755AFWAKHE12NY0CQ9FH",
            "phase": {
              "id": "01G65Z755AFWAKHE12NY0CQ9FH",
              "item": {
                "id": "01G65Z755AFWAKHE12NY0CQ9FH"
              }
            }
          },
          "rate_card": {
            "tax_config": {
              "code": {
                "id": "01G65Z755AFWAKHE12NY0CQ9FH"
              }
            },
            "feature_key": "resource_key"
          },
          "detailed_lines": [
            {
              "id": "01G65Z755AFWAKHE12NY0CQ9FH",
              "labels": {
                "env": "test"
              },
              "created_at": "2023-01-01T01:01:01.001Z",
              "updated_at": "2023-01-01T01:01:01.001Z",
              "deleted_at": "2023-01-01T01:01:01.001Z",
              "service_period": {
                "from": "2023-01-01T01:01:01.001Z",
                "to": "2023-01-01T01:01:01.001Z"
              },
              "discounts": {
                "amount": [
                  {
                    "id": "01G65Z755AFWAKHE12NY0CQ9FH"
                  }
                ],
                "usage": [
                  {
                    "id": "01G65Z755AFWAKHE12NY0CQ9FH"
                  }
                ]
              }
            }
          ],
          "charge": {
            "id": "01G65Z755AFWAKHE12NY0CQ9FH"
          }
        }
      ]
    }
  ],
  "meta": {
    "page": {
      "number": 1,
      "size": 10,
      "total": 100
    }
  }
}

Changes

    • breaking

      added to the invalid_parameters/items response property oneOf list for the response status

    • warning

      added the new key_invalid enum value to the invalid_parameters/items/oneOf[#/components/schemas/InvalidParameterStandard]/rule response property for the response status

    • warning

      added the new unique enum value to the invalid_parameters/items/oneOf[#/components/schemas/InvalidParameterStandard]/rule response property for the response status