openapi: 3.0.1 info: contact: email: support@aiven.io name: Aiven support team url: https://aiven.io/support-services title: Aiven API Documentation Account Billing API version: v1 x-logo: altText: Aiven logo backgroundColor: '#fafafa' href: https://api.aiven.io/doc url: https://aiven.io/assets/img/aiven-logo.png description: "# Introduction\n\n[Direct link to openapi.json](https://api.aiven.io/doc/openapi.json) for use with external tools\n\n[Aiven](https://aiven.io) is a modern fully-managed open source data platform for streaming, storing, and analyzing data on any public cloud. On Aiven Platform, you can operate your data infrastructure with a few devops tools: [Aiven Console](https://console.aiven.io/), [Aiven Terraform Provider](https://aiven.io/docs/tools/terraform), [Aiven CLI](https://github.com/aiven/aiven-client), and [Aiven Operator for Kubernetes](https://github.com/aiven/aiven-operator). All of them are built on an open secure powerful REST API for integration with custom tooling.\n\nThe Aiven [REST](http://en.wikipedia.org/wiki/Representational_State_Transfer) API\nprovides programmatic access to Aiven.io services. To call the Aiven API, you can use either CLI tools (for example, `cURL` or [Aiven CLI client](https://aiven.io/docs/tools/cli)) or GUI tools, such as the [Aiven public API Postman collection](https://www.postman.com/aiven-apis).\n\nThis Aiven API documentation will help you operate your Aiven organization, projects, or services programmatically by integrating your applications and processes with Aiven.\n\n# Description\n\nAiven's APIs ([Application Programming Interfaces](https://en.wikipedia.org/wiki/API)) power its platform for data management. Aiven has a number of REST APIs that can help you build strong and robust data infrastructure for your applications.\n\nThe Aiven API is organized around core resources. Each core resource has multiple endpoints, which can be interacted with using different HTTP methods.\n\n## Core resources\n\n### Platform APIs\n\n
This endpoint may be changed or removed at any time. Don't use it in production environments.
parameters:
- $ref: '#/components/parameters/credit_memo_id'
- $ref: '#/components/parameters/download_cookie'
responses:
'200':
description: Returns a PDF report
content:
application/pdf:
schema:
type: string
format: binary
'403':
description: Invoice link expired
content:
application/json:
schema:
type: object
properties:
message:
type: string
title: Human readable error message
errors:
type: array
title: List of error details. Typically there is only one element
items:
type: object
properties:
message:
type: string
title: Human readable error message
error_code:
type: string
enum:
- request_forbidden
title: Machine processable error code. Clients must be prepared to handle new codes.
description: 'request_forbidden: Not authorized to view the request'
'404':
description: Invoice not found
content:
application/json:
schema:
type: object
properties:
message:
type: string
title: Human readable error message
errors:
type: array
title: List of error details. Typically there is only one element
items:
type: object
properties:
message:
type: string
title: Human readable error message
error_code:
type: string
enum:
- invoice_not_found
title: Machine processable error code. Clients must be prepared to handle new codes.
description: 'invoice_not_found: Invoice not found'
/invoices/{invoice_number}:
get:
summary: Get a single invoice
tags:
- Billing
operationId: InvoiceGet
parameters:
- $ref: '#/components/parameters/invoice_number'
responses:
'200':
description: Response
content:
application/json:
schema:
$ref: '#/components/schemas/InvoiceGetResponse'
security:
- tokenAuth: []
oauth2:
- billing:read
/organization/{organization_id}/addresses:
post:
summary: Create new address for an organization
tags:
- Billing
operationId: OrganizationAddressCreate
parameters:
- $ref: '#/components/parameters/organization_id'
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/OrganizationAddressCreateRequestBody'
example:
address_lines:
- Street 1
- Street 2
city: Helsinki
country_code: FI
name: Aiven Oy
state: ''
zip_code: '01234'
responses:
'200':
description: Response
content:
application/json:
schema:
$ref: '#/components/schemas/OrganizationAddressCreateResponse'
'404':
description: Resource not found
content:
application/json:
schema:
type: object
properties:
message:
type: string
title: Human readable error message
errors:
type: array
title: List of error details. Typically there is only one element
items:
type: object
properties:
message:
type: string
title: Human readable error message
error_code:
type: string
enum:
- organization_not_found
title: Machine processable error code. Clients must be prepared to handle new codes.
description: 'organization_not_found: Organization not found.'
'403':
description: Operation not allowed
content:
application/json:
schema:
type: object
properties:
message:
type: string
title: Human readable error message
errors:
type: array
title: List of error details. Typically there is only one element
items:
type: object
properties:
message:
type: string
title: Human readable error message
error_code:
type: string
enum:
- user_not_organization_admin
title: Machine processable error code. Clients must be prepared to handle new codes.
description: 'user_not_organization_admin: User is not organization administrator.'
security:
- tokenAuth: []
oauth2:
- accounts:write
- billing:write
get:
summary: List addresses of an organization
tags:
- Billing
operationId: OrganizationAddressList
parameters:
- $ref: '#/components/parameters/organization_id'
responses:
'200':
description: Response
content:
application/json:
schema:
$ref: '#/components/schemas/OrganizationAddressListResponse'
'404':
description: Resource not found
content:
application/json:
schema:
type: object
properties:
message:
type: string
title: Human readable error message
errors:
type: array
title: List of error details. Typically there is only one element
items:
type: object
properties:
message:
type: string
title: Human readable error message
error_code:
type: string
enum:
- organization_not_found
title: Machine processable error code. Clients must be prepared to handle new codes.
description: 'organization_not_found: Organization not found.'
security:
- tokenAuth: []
oauth2:
- accounts:read
- billing:read
/organization/{organization_id}/address/{address_id}:
delete:
summary: Delete an address of an organization
tags:
- Billing
operationId: OrganizationAddressDelete
parameters:
- $ref: '#/components/parameters/organization_id'
- $ref: '#/components/parameters/address_id'
responses:
'200':
description: Response
content:
application/json:
schema:
$ref: '#/components/schemas/OrganizationAddressDeleteResponse'
'403':
description: Operation not allowed
content:
application/json:
schema:
type: object
properties:
message:
type: string
title: Human readable error message
errors:
type: array
title: List of error details. Typically there is only one element
items:
type: object
properties:
message:
type: string
title: Human readable error message
error_code:
type: string
enum:
- user_not_organization_admin
title: Machine processable error code. Clients must be prepared to handle new codes.
description: 'user_not_organization_admin: User is not organization administrator.'
'404':
description: Resource not found
content:
application/json:
schema:
type: object
properties:
message:
type: string
title: Human readable error message
errors:
type: array
title: List of error details. Typically there is only one element
items:
type: object
properties:
message:
type: string
title: Human readable error message
error_code:
type: string
enum:
- organization_not_found
title: Machine processable error code. Clients must be prepared to handle new codes.
description: 'organization_not_found: Organization not found.'
security:
- tokenAuth: []
oauth2:
- accounts:write
- billing:write
get:
summary: Get organization address info
tags:
- Billing
operationId: OrganizationAddressGet
parameters:
- $ref: '#/components/parameters/organization_id'
- $ref: '#/components/parameters/address_id'
responses:
'200':
description: Response
content:
application/json:
schema:
$ref: '#/components/schemas/OrganizationAddressGetResponse'
'404':
description: Resource not found
content:
application/json:
schema:
type: object
properties:
message:
type: string
title: Human readable error message
errors:
type: array
title: List of error details. Typically there is only one element
items:
type: object
properties:
message:
type: string
title: Human readable error message
error_code:
type: string
enum:
- organization_not_found
title: Machine processable error code. Clients must be prepared to handle new codes.
description: 'organization_not_found: Organization not found.'
security:
- tokenAuth: []
oauth2:
- accounts:read
- billing:read
patch:
summary: Update an address of an organization
tags:
- Billing
operationId: OrganizationAddressUpdate
parameters:
- $ref: '#/components/parameters/organization_id'
- $ref: '#/components/parameters/address_id'
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/OrganizationAddressUpdateRequestBody'
example:
address_lines:
- Street 1
- Street 2
city: Helsinki
country_code: FI
name: Aiven Oy
state: ''
zip_code: '01234'
responses:
'200':
description: Response
content:
application/json:
schema:
$ref: '#/components/schemas/OrganizationAddressUpdateResponse'
'403':
description: Operation not allowed
content:
application/json:
schema:
type: object
properties:
message:
type: string
title: Human readable error message
errors:
type: array
title: List of error details. Typically there is only one element
items:
type: object
properties:
message:
type: string
title: Human readable error message
error_code:
type: string
enum:
- user_not_organization_admin
title: Machine processable error code. Clients must be prepared to handle new codes.
description: 'user_not_organization_admin: User is not organization administrator.'
'404':
description: Resource not found
content:
application/json:
schema:
type: object
properties:
message:
type: string
title: Human readable error message
errors:
type: array
title: List of error details. Typically there is only one element
items:
type: object
properties:
message:
type: string
title: Human readable error message
error_code:
type: string
enum:
- organization_not_found
title: Machine processable error code. Clients must be prepared to handle new codes.
description: 'organization_not_found: Organization not found.'
security:
- tokenAuth: []
oauth2:
- accounts:write
- billing:write
components:
schemas:
OrganizationAddressListResponse:
type: object
description: OrganizationAddressListResponse
properties:
addresses:
type: array
description: Addresses
items:
type: object
properties:
address_id:
type: string
maxLength: 36
description: Address ID
address_lines:
type: array
minItems: 1
maxItems: 3
description: Address lines
items:
type: string
city:
type: string
maxLength: 50
description: City
country_code:
type: string
maxLength: 2
description: Country Code
create_time:
type: string
maxLength: 36
description: Create Time
name:
type: string
minLength: 0
maxLength: 83
description: Name
organization_id:
type: string
maxLength: 36
description: Organization ID
state:
type: string
maxLength: 30
description: State
update_time:
type: string
maxLength: 36
description: Update Time
zip_code:
type: string
maxLength: 36
description: Zip Code
required:
- address_id
- country_code
- create_time
- name
- organization_id
- update_time
required:
- addresses
OrganizationAddressUpdateResponse:
type: object
description: OrganizationAddressUpdateResponse
properties:
address_id:
type: string
maxLength: 36
description: Address ID
address_lines:
type: array
minItems: 1
maxItems: 3
description: Address lines
items:
type: string
city:
type: string
maxLength: 50
description: City
country_code:
type: string
maxLength: 2
description: Country Code
create_time:
type: string
maxLength: 36
description: Create Time
name:
type: string
minLength: 0
maxLength: 83
description: Name
organization_id:
type: string
maxLength: 36
description: Organization ID
state:
type: string
maxLength: 30
description: State
update_time:
type: string
maxLength: 36
description: Update Time
zip_code:
type: string
maxLength: 36
description: Zip Code
required:
- address_id
- country_code
- create_time
- name
- organization_id
- update_time
OrganizationAddressUpdateRequestBody:
type: object
description: OrganizationAddressUpdateRequestBody
properties:
address_lines:
type: array
minItems: 1
maxItems: 3
description: Address lines
items:
type: string
city:
type: string
maxLength: 50
description: City
country_code:
type: string
maxLength: 2
description: Country Code
name:
type: string
minLength: 1
maxLength: 83
description: Name
state:
type: string
maxLength: 30
description: State
zip_code:
type: string
maxLength: 36
description: Zip Code
OrganizationAddressGetResponse:
type: object
description: OrganizationAddressGetResponse
properties:
address_id:
type: string
maxLength: 36
description: Address ID
address_lines:
type: array
minItems: 1
maxItems: 3
description: Address lines
items:
type: string
city:
type: string
maxLength: 50
description: City
country_code:
type: string
maxLength: 2
description: Country Code
create_time:
type: string
maxLength: 36
description: Create Time
name:
type: string
minLength: 0
maxLength: 83
description: Name
organization_id:
type: string
maxLength: 36
description: Organization ID
state:
type: string
maxLength: 30
description: State
update_time:
type: string
maxLength: 36
description: Update Time
zip_code:
type: string
maxLength: 36
description: Zip Code
required:
- address_id
- country_code
- create_time
- name
- organization_id
- update_time
OrganizationAddressCreateResponse:
type: object
description: OrganizationAddressCreateResponse
properties:
address_id:
type: string
maxLength: 36
description: Address ID
address_lines:
type: array
minItems: 1
maxItems: 3
description: Address lines
items:
type: string
city:
type: string
maxLength: 50
description: City
country_code:
type: string
maxLength: 2
description: Country Code
create_time:
type: string
maxLength: 36
description: Create Time
name:
type: string
minLength: 0
maxLength: 83
description: Name
organization_id:
type: string
maxLength: 36
description: Organization ID
state:
type: string
maxLength: 30
description: State
update_time:
type: string
maxLength: 36
description: Update Time
zip_code:
type: string
maxLength: 36
description: Zip Code
required:
- address_id
- country_code
- create_time
- name
- organization_id
- update_time
OrganizationAddressCreateRequestBody:
type: object
description: OrganizationAddressCreateRequestBody
properties:
address_lines:
type: array
minItems: 1
maxItems: 3
description: Address lines
items:
type: string
city:
type: string
maxLength: 50
description: City
country_code:
type: string
maxLength: 2
description: Country Code
name:
type: string
minLength: 1
maxLength: 83
description: Name
state:
type: string
maxLength: 30
description: State
zip_code:
type: string
maxLength: 36
description: Zip Code
required:
- address_lines
- city
- country_code
- name
OrganizationAddressDeleteResponse:
type: object
description: OrganizationAddressDeleteResponse
properties:
errors:
type: array
description: List of errors occurred during request processing
items:
type: object
properties:
message:
type: string
description: Printable error message
more_info:
type: string
description: URL to the documentation of the error
status:
type: integer
description: HTTP error status code
required:
- message
- status
message:
type: string
description: Printable result of the request
InvoiceGetResponse:
type: object
description: InvoiceGetResponse
properties:
invoice:
type: object
description: InvoiceModel
properties:
billing_group_id:
type: string
minLength: 36
maxLength: 36
description: Billing Group ID
billing_group_name:
type: string
minLength: 1
maxLength: 128
description: Billing Group Name
billing_group_state:
type: string
description: Billing group state
currency:
type: string
maxLength: 16
description: Currency
download_cookie:
type: string
description: Download Cookie
due_date:
type: string
maxLength: 36
description: Due Date
generated_at:
type: string
maxLength: 36
description: Generated At
invoice_number:
type: string
minLength: 1
description: Invoice Number
issue_date:
type: string
maxLength: 36
description: Issue Date
period_begin:
type: string
maxLength: 36
description: Period Begin
period_end:
type: string
maxLength: 36
description: Period End
state:
type: string
maxLength: 36
description: State
total_inc_vat:
type: string
maxLength: 16
description: Total Inc Vat
total_vat_zero:
type: string
maxLength: 16
description: Total Vat Zero
required:
- billing_group_id
- billing_group_name
- billing_group_state
- currency
- generated_at
- invoice_number
- period_begin
- period_end
- state
- total_inc_vat
- total_vat_zero
required:
- invoice
parameters:
address_id:
in: path
name: address_id
description: Address id
schema:
type: string
required: true
credit_memo_id:
in: path
name: credit_memo_id
description: Credit Memo ID
schema:
type: string
required: true
download_cookie:
in: path
name: download_cookie
description: Authentication cookie for file download
schema:
type: string
required: true
organization_id:
in: path
name: organization_id
description: ID of an organization
schema:
type: string
required: true
invoice_number:
in: path
name: invoice_number
description: Invoice number
schema:
type: string
required: true
securitySchemes:
tokenAuth:
description: 'Header should be of the format `authorization: aivenv1