Billing APIv2alpha1

Download OpenAPI

Introduction

Manage the billing of your Scaleway Cloud projects.

Technical Limitations

  • Before calling this API, you must have activated IAM on your account. See our documentation on how to activate IAM.
  • You must also have appropriate IAM permissions to manage billing. If you are the Owner of the Organization, you will have these permissions automatically, otherwise you need a policy giving you the BillingManager permission set. If you were previously a Billing Administrator, you will automatically have been migrated to the BillingAdministrator group when you activated IAM, which gives you the appropriate permissions.
  • To query consumption you need only BillingReadOnly permissions.

The consumption represents the amount of money you have spent for the products you have consumed. The value is not computed in real time. The value of the consumption is a monetary value.

Consumption over the current month

The consumption represents the amount of money you have spent for the products you have consumed. The value is not computed in real time. The value of the consumption is a monetary value.

GET
/billing/v2alpha1/consumption
Query Parameters

organization_id
string
Filter by organization ID (UUID format).
200 Response

consumptions
array
Detailled consumptions list.

updated_at
nullable string
Last consumption update date (RFC 3339 format).
Response Example

List all your invoices filtering by start_date and invoice_type

GET
/billing/v2alpha1/invoices
Query Parameters

organization_id
nullable string
Filter invoices by organization ID (UUID format).

started_after
nullable string
Filter invoices where invoice's start_date is greater or equal to started_after (RFC 3339 format).

started_before
nullable string
Filter invoices where invoice's start_date is before started_before (RFC 3339 format).

invoice_type
string
Type of the invoice, it can be 'periodic' or 'purchase'. Possible values are unknown_type, periodic and purchase. The default value is unknown_type.

page
integer
A positive integer to choose the page to return. The default value is 1.

page_size
integer
A positive integer lower or equal to 100 to select the number of items to return. The default value is 20.

order_by
string
How invoices are ordered in the response. Possible values are invoice_number_desc, invoice_number_asc, start_date_desc, start_date_asc, issued_date_desc, issued_date_asc, due_date_desc, due_date_asc, total_untaxed_desc, total_untaxed_asc, total_taxed_desc, total_taxed_asc, invoice_type_desc and invoice_type_asc. The default value is invoice_number_desc.
200 Response

total_count
integer
The total number of invoices.

invoices
array
The paginated returned invoices.
Response Example
GET
/billing/v2alpha1/invoices/{invoice_id}/download
Path Parameters

invoice_id
required string
Invoice ID (UUID format).
Query Parameters

file_type
string
Wanted file type. Possible value is pdf. The default value is pdf.
200 Response

name
string

content_type
string

content
string
Response Example