Skip to content

Invoices

Operations Summary

Method Endpoint Description
Core CRUD
GET /api/invoices/ List Invoices
GET /api/invoices/{uuid}/ Retrieve
Other Actions
GET /api/invoices/growth/ Growth
GET /api/invoices/{uuid}/items/ Get invoice items
GET /api/invoices/{uuid}/stats/ Spendings grouped by offerings and filtered by provider
POST /api/invoices/{uuid}/paid/ Mark invoice as paid and optionally create payment record with proof of payment
POST /api/invoices/{uuid}/send_notification/ Send invoice notification
POST /api/invoices/{uuid}/set_backend_id/ Set backend ID for invoice
POST /api/invoices/{uuid}/set_payment_url/ Set payment URL for invoice
POST /api/invoices/{uuid}/set_reference_number/ Set reference number for invoice

Core CRUD

List Invoices

1
2
3
4
http \
  GET \
  https://api.example.com/api/invoices/ \
  Authorization:"Token YOUR_API_TOKEN"
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
from waldur_api_client.client import AuthenticatedClient
from waldur_api_client.api.invoices import invoices_list # (1)

client = AuthenticatedClient(
    base_url="https://api.example.com", token="YOUR_API_TOKEN"
)
response = invoices_list.sync(client=client)

for item in response:
    print(item)
  1. API Source: invoices_list
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
import { invoicesList } from 'waldur-js-client';

try {
  const response = await invoicesList({
  auth: "Token YOUR_API_TOKEN"
});
  console.log('Success:', response);
} catch (error) {
  console.error('Error:', error);
}
Name Type Description
created string (date)
customer string
customer_uuid string (uuid)
end_date string (date)
field array
month integer
o array Ordering

page integer A page number within the paginated result set.
page_size integer Number of results to return per page.
start_date string (date)
state array
year integer

200 -

The response body is an array of objects, where each object has the following structure:

Field Type Description
url string (uri)
uuid string (uuid)
number integer
customer string (uri)
price string (decimal)
tax string (decimal)
total string (decimal)
state string
Enum: pending, created, paid, canceled
year integer
month integer
issuer_details any
invoice_date string (date) Date then invoice moved from state pending to created.
due_date string (date)
customer_details object
customer_details.name string
customer_details.address string
customer_details.country string
customer_details.country_name string
customer_details.email string (email)
customer_details.postal string
customer_details.phone_number string
customer_details.bank_name string
customer_details.bank_account string
customer_details.vat_code string VAT number
items array of objects
items.uuid string (uuid)
items.url string (uri)
items.name string
items.price number (double)
items.tax string (decimal)
items.total string (decimal)
items.unit_price string (decimal)
items.unit string
Enum: month, quarter, half_month, day, hour, quantity
items.factor integer
items.measured_unit string
items.start string (date-time) Date and time when item usage has started.
items.end string (date-time) Date and time when item usage has ended.
items.article_code string
items.project_name string
items.project_uuid string (uuid)
items.quantity string (decimal)
items.details object
items.details.resource_name string
items.details.resource_uuid string (uuid)
items.details.plan_name string
items.details.plan_uuid string (uuid)
items.details.offering_type string
items.details.offering_name string
items.details.offering_uuid string (uuid)
items.details.service_provider_name string
items.details.service_provider_uuid string (uuid)
items.details.plan_component_id integer
items.details.offering_component_type string
items.details.offering_component_name string
items.details.resource_limit_periods array of objects
items.details.resource_limit_periods.start string
items.details.resource_limit_periods.end string
items.details.resource_limit_periods.quantity integer
items.details.resource_limit_periods.billing_periods integer
items.details.resource_limit_periods.total string
items.resource string (uri)
items.resource_uuid string (uuid)
items.resource_name string
items.billing_type string
items.backend_uuid string (uuid)
items.credit boolean
backend_id string
payment_url string (uri) URL for initiating payment via payment gateway.
reference_number string Reference number associated with the invoice.
compensations number (double)
incurred_costs number (double)

Retrieve

1
2
3
4
http \
  GET \
  https://api.example.com/api/invoices/a1b2c3d4-e5f6-7890-abcd-ef1234567890/ \
  Authorization:"Token YOUR_API_TOKEN"
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
from waldur_api_client.client import AuthenticatedClient
from waldur_api_client.api.invoices import invoices_retrieve # (1)

client = AuthenticatedClient(
    base_url="https://api.example.com", token="YOUR_API_TOKEN"
)
response = invoices_retrieve.sync(
    uuid="a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    client=client
)

print(response)
  1. API Source: invoices_retrieve
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
import { invoicesRetrieve } from 'waldur-js-client';

try {
  const response = await invoicesRetrieve({
  auth: "Token YOUR_API_TOKEN",
  path: {
    "uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
  }
});
  console.log('Success:', response);
} catch (error) {
  console.error('Error:', error);
}
Name Type Required
uuid string (uuid)
Name Type
field array

200 -

Field Type Description
url string (uri)
uuid string (uuid)
number integer
customer string (uri)
price string (decimal)
tax string (decimal)
total string (decimal)
state string
Enum: pending, created, paid, canceled
year integer
month integer
issuer_details any
invoice_date string (date) Date then invoice moved from state pending to created.
due_date string (date)
customer_details object
customer_details.name string
customer_details.address string
customer_details.country string
customer_details.country_name string
customer_details.email string (email)
customer_details.postal string
customer_details.phone_number string
customer_details.bank_name string
customer_details.bank_account string
customer_details.vat_code string VAT number
items array of objects
items.uuid string (uuid)
items.url string (uri)
items.name string
items.price number (double)
items.tax string (decimal)
items.total string (decimal)
items.unit_price string (decimal)
items.unit string
Enum: month, quarter, half_month, day, hour, quantity
items.factor integer
items.measured_unit string
items.start string (date-time) Date and time when item usage has started.
items.end string (date-time) Date and time when item usage has ended.
items.article_code string
items.project_name string
items.project_uuid string (uuid)
items.quantity string (decimal)
items.details object
items.details.resource_name string
items.details.resource_uuid string (uuid)
items.details.plan_name string
items.details.plan_uuid string (uuid)
items.details.offering_type string
items.details.offering_name string
items.details.offering_uuid string (uuid)
items.details.service_provider_name string
items.details.service_provider_uuid string (uuid)
items.details.plan_component_id integer
items.details.offering_component_type string
items.details.offering_component_name string
items.details.resource_limit_periods array of objects
items.details.resource_limit_periods.start string
items.details.resource_limit_periods.end string
items.details.resource_limit_periods.quantity integer
items.details.resource_limit_periods.billing_periods integer
items.details.resource_limit_periods.total string
items.resource string (uri)
items.resource_uuid string (uuid)
items.resource_name string
items.billing_type string
items.backend_uuid string (uuid)
items.credit boolean
backend_id string
payment_url string (uri) URL for initiating payment via payment gateway.
reference_number string Reference number associated with the invoice.
compensations number (double)
incurred_costs number (double)

Other Actions

Growth

Analyze invoice trends over time by comparing monthly totals for major customers versus others over the past year.

1
2
3
4
http \
  GET \
  https://api.example.com/api/invoices/growth/ \
  Authorization:"Token YOUR_API_TOKEN"
1
2
3
4
5
6
7
8
9
from waldur_api_client.client import AuthenticatedClient
from waldur_api_client.api.invoices import invoices_growth_retrieve # (1)

client = AuthenticatedClient(
    base_url="https://api.example.com", token="YOUR_API_TOKEN"
)
response = invoices_growth_retrieve.sync(client=client)

print(response)
  1. API Source: invoices_growth_retrieve
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
import { invoicesGrowthRetrieve } from 'waldur-js-client';

try {
  const response = await invoicesGrowthRetrieve({
  auth: "Token YOUR_API_TOKEN"
});
  console.log('Success:', response);
} catch (error) {
  console.error('Error:', error);
}
Name Type
accounting_is_running boolean
accounting_mode string
customers_count integer

200 -

Field Type
periods array of strings
total_periods array of number (double)s
other_periods array of number (double)s
customer_periods array of objects
customer_periods.name string
customer_periods.periods array of number (double)s

Get invoice items

Retrieve a list of invoice items for the specified invoice.

1
2
3
4
http \
  GET \
  https://api.example.com/api/invoices/a1b2c3d4-e5f6-7890-abcd-ef1234567890/items/ \
  Authorization:"Token YOUR_API_TOKEN"
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
from waldur_api_client.client import AuthenticatedClient
from waldur_api_client.api.invoices import invoices_items_retrieve # (1)

client = AuthenticatedClient(
    base_url="https://api.example.com", token="YOUR_API_TOKEN"
)
response = invoices_items_retrieve.sync(
    uuid="a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    client=client
)

print(response)
  1. API Source: invoices_items_retrieve
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
import { invoicesItemsRetrieve } from 'waldur-js-client';

try {
  const response = await invoicesItemsRetrieve({
  auth: "Token YOUR_API_TOKEN",
  path: {
    "uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
  }
});
  console.log('Success:', response);
} catch (error) {
  console.error('Error:', error);
}
Name Type Required
uuid string (uuid)
Name Type Description
conceal_compensation_items boolean Conceal compensation items
o string Order results by field
Enum: project_name, -project_name, resource_name, -resource_name, provider_name, -provider_name, name, -name
offering_uuid string
project_uuid string
provider_uuid string
query string

200 -

Field Type Description
uuid string (uuid)
url string (uri)
name string
price number (double)
tax string (decimal)
total string (decimal)
unit_price string (decimal)
unit string
Enum: month, quarter, half_month, day, hour, quantity
factor integer
measured_unit string
start string (date-time) Date and time when item usage has started.
end string (date-time) Date and time when item usage has ended.
article_code string
project_name string
project_uuid string (uuid)
quantity string (decimal)
details object
details.resource_name string
details.resource_uuid string (uuid)
details.plan_name string
details.plan_uuid string (uuid)
details.offering_type string
details.offering_name string
details.offering_uuid string (uuid)
details.service_provider_name string
details.service_provider_uuid string (uuid)
details.plan_component_id integer
details.offering_component_type string
details.offering_component_name string
details.resource_limit_periods array of objects
details.resource_limit_periods.start string
details.resource_limit_periods.end string
details.resource_limit_periods.quantity integer
details.resource_limit_periods.billing_periods integer
details.resource_limit_periods.total string
resource string (uri)
resource_uuid string (uuid)
resource_name string
billing_type string
backend_uuid string (uuid)
credit boolean

Spendings grouped by offerings and filtered by provider

Spendings grouped by offerings and filtered by provider.

1
2
3
4
http \
  GET \
  https://api.example.com/api/invoices/a1b2c3d4-e5f6-7890-abcd-ef1234567890/stats/ \
  Authorization:"Token YOUR_API_TOKEN"
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
from waldur_api_client.client import AuthenticatedClient
from waldur_api_client.api.invoices import invoices_stats_list # (1)

client = AuthenticatedClient(
    base_url="https://api.example.com", token="YOUR_API_TOKEN"
)
response = invoices_stats_list.sync(
    uuid="a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    client=client
)

for item in response:
    print(item)
  1. API Source: invoices_stats_list
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
import { invoicesStatsList } from 'waldur-js-client';

try {
  const response = await invoicesStatsList({
  auth: "Token YOUR_API_TOKEN",
  path: {
    "uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
  }
});
  console.log('Success:', response);
} catch (error) {
  console.error('Error:', error);
}
Name Type Required
uuid string (uuid)
Name Type Description
created string (date)
customer string
customer_uuid string (uuid)
end_date string (date)
month integer
o array Ordering

page integer A page number within the paginated result set.
page_size integer Number of results to return per page.
provider_uuid string
start_date string (date)
state array
year integer

200 -

The response body is an array of objects, where each object has the following structure:

Field Type
offering_name string
aggregated_price number (double)
aggregated_tax number (double)
aggregated_total number (double)
service_category_title string
service_provider_name string
service_provider_uuid string (uuid)

Mark invoice as paid and optionally create payment record with proof of payment

Mark invoice as paid and optionally create payment record with proof of payment.

1
2
3
4
5
http \
  POST \
  https://api.example.com/api/invoices/a1b2c3d4-e5f6-7890-abcd-ef1234567890/paid/ \
  Authorization:"Token YOUR_API_TOKEN" \
  date="2023-10-01"
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
from waldur_api_client.client import AuthenticatedClient
from waldur_api_client.models.paid_request import PaidRequest # (1)
from waldur_api_client.api.invoices import invoices_paid # (2)

client = AuthenticatedClient(
    base_url="https://api.example.com", token="YOUR_API_TOKEN"
)

body_data = PaidRequest(
    date="2023-10-01"
)
response = invoices_paid.sync(
    uuid="a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    client=client,
    body=body_data
)

print(response)
  1. Model Source: PaidRequest
  2. API Source: invoices_paid
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
import { invoicesPaid } from 'waldur-js-client';

try {
  const response = await invoicesPaid({
  auth: "Token YOUR_API_TOKEN",
  path: {
    "uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
  },
  body: {
    "date": "2023-10-01"
  }
});
  console.log('Success:', response);
} catch (error) {
  console.error('Error:', error);
}
Name Type Required
uuid string (uuid)
Field Type Required
date string (date)
proof string (binary)

200 -

Field Type Description
url string (uri)
uuid string (uuid)
number integer
customer string (uri)
price string (decimal)
tax string (decimal)
total string (decimal)
state string
Enum: pending, created, paid, canceled
year integer
month integer
issuer_details any
invoice_date string (date) Date then invoice moved from state pending to created.
due_date string (date)
customer_details object
customer_details.name string
customer_details.address string
customer_details.country string
customer_details.country_name string
customer_details.email string (email)
customer_details.postal string
customer_details.phone_number string
customer_details.bank_name string
customer_details.bank_account string
customer_details.vat_code string VAT number
items array of objects
items.uuid string (uuid)
items.url string (uri)
items.name string
items.price number (double)
items.tax string (decimal)
items.total string (decimal)
items.unit_price string (decimal)
items.unit string
Enum: month, quarter, half_month, day, hour, quantity
items.factor integer
items.measured_unit string
items.start string (date-time) Date and time when item usage has started.
items.end string (date-time) Date and time when item usage has ended.
items.article_code string
items.project_name string
items.project_uuid string (uuid)
items.quantity string (decimal)
items.details object
items.details.resource_name string
items.details.resource_uuid string (uuid)
items.details.plan_name string
items.details.plan_uuid string (uuid)
items.details.offering_type string
items.details.offering_name string
items.details.offering_uuid string (uuid)
items.details.service_provider_name string
items.details.service_provider_uuid string (uuid)
items.details.plan_component_id integer
items.details.offering_component_type string
items.details.offering_component_name string
items.details.resource_limit_periods array of objects
items.details.resource_limit_periods.start string
items.details.resource_limit_periods.end string
items.details.resource_limit_periods.quantity integer
items.details.resource_limit_periods.billing_periods integer
items.details.resource_limit_periods.total string
items.resource string (uri)
items.resource_uuid string (uuid)
items.resource_name string
items.billing_type string
items.backend_uuid string (uuid)
items.credit boolean
backend_id string
payment_url string (uri) URL for initiating payment via payment gateway.
reference_number string Reference number associated with the invoice.
compensations number (double)
incurred_costs number (double)

Send invoice notification

Schedule sending of a notification for the specified invoice.

1
2
3
4
http \
  POST \
  https://api.example.com/api/invoices/a1b2c3d4-e5f6-7890-abcd-ef1234567890/send_notification/ \
  Authorization:"Token YOUR_API_TOKEN"
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
from waldur_api_client.client import AuthenticatedClient
from waldur_api_client.api.invoices import invoices_send_notification # (1)

client = AuthenticatedClient(
    base_url="https://api.example.com", token="YOUR_API_TOKEN"
)
response = invoices_send_notification.sync(
    uuid="a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    client=client
)

print(response)
  1. API Source: invoices_send_notification
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
import { invoicesSendNotification } from 'waldur-js-client';

try {
  const response = await invoicesSendNotification({
  auth: "Token YOUR_API_TOKEN",
  path: {
    "uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
  }
});
  console.log('Success:', response);
} catch (error) {
  console.error('Error:', error);
}
Name Type Required
uuid string (uuid)

200 - No response body


Set backend ID for invoice

Set backend ID for invoice.

1
2
3
4
http \
  POST \
  https://api.example.com/api/invoices/a1b2c3d4-e5f6-7890-abcd-ef1234567890/set_backend_id/ \
  Authorization:"Token YOUR_API_TOKEN"
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
from waldur_api_client.client import AuthenticatedClient
from waldur_api_client.models.backend_id_request import BackendIdRequest # (1)
from waldur_api_client.api.invoices import invoices_set_backend_id # (2)

client = AuthenticatedClient(
    base_url="https://api.example.com", token="YOUR_API_TOKEN"
)

body_data = BackendIdRequest()
response = invoices_set_backend_id.sync(
    uuid="a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    client=client,
    body=body_data
)

print(response)
  1. Model Source: BackendIdRequest
  2. API Source: invoices_set_backend_id
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
import { invoicesSetBackendId } from 'waldur-js-client';

try {
  const response = await invoicesSetBackendId({
  auth: "Token YOUR_API_TOKEN",
  path: {
    "uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
  }
});
  console.log('Success:', response);
} catch (error) {
  console.error('Error:', error);
}
Name Type Required
uuid string (uuid)
Field Type Required
backend_id string

200 - No response body


Set payment URL for invoice

Set payment URL for invoice.

1
2
3
4
http \
  POST \
  https://api.example.com/api/invoices/a1b2c3d4-e5f6-7890-abcd-ef1234567890/set_payment_url/ \
  Authorization:"Token YOUR_API_TOKEN"
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
from waldur_api_client.client import AuthenticatedClient
from waldur_api_client.models.payment_url_request import PaymentURLRequest # (1)
from waldur_api_client.api.invoices import invoices_set_payment_url # (2)

client = AuthenticatedClient(
    base_url="https://api.example.com", token="YOUR_API_TOKEN"
)

body_data = PaymentURLRequest()
response = invoices_set_payment_url.sync(
    uuid="a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    client=client,
    body=body_data
)

print(response)
  1. Model Source: PaymentURLRequest
  2. API Source: invoices_set_payment_url
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
import { invoicesSetPaymentUrl } from 'waldur-js-client';

try {
  const response = await invoicesSetPaymentUrl({
  auth: "Token YOUR_API_TOKEN",
  path: {
    "uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
  }
});
  console.log('Success:', response);
} catch (error) {
  console.error('Error:', error);
}
Name Type Required
uuid string (uuid)
Field Type Required Description
payment_url string (uri) URL for initiating payment via payment gateway.

200 - No response body


Set reference number for invoice

Set reference number for invoice.

1
2
3
4
http \
  POST \
  https://api.example.com/api/invoices/a1b2c3d4-e5f6-7890-abcd-ef1234567890/set_reference_number/ \
  Authorization:"Token YOUR_API_TOKEN"
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
from waldur_api_client.client import AuthenticatedClient
from waldur_api_client.models.reference_number_request import ReferenceNumberRequest # (1)
from waldur_api_client.api.invoices import invoices_set_reference_number # (2)

client = AuthenticatedClient(
    base_url="https://api.example.com", token="YOUR_API_TOKEN"
)

body_data = ReferenceNumberRequest()
response = invoices_set_reference_number.sync(
    uuid="a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    client=client,
    body=body_data
)

print(response)
  1. Model Source: ReferenceNumberRequest
  2. API Source: invoices_set_reference_number
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
import { invoicesSetReferenceNumber } from 'waldur-js-client';

try {
  const response = await invoicesSetReferenceNumber({
  auth: "Token YOUR_API_TOKEN",
  path: {
    "uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
  }
});
  console.log('Success:', response);
} catch (error) {
  console.error('Error:', error);
}
Name Type Required
uuid string (uuid)
Field Type Required Description
reference_number string Reference number associated with the invoice.

200 - No response body