Invoices
Operations Summary
Core CRUD
List Invoices
| http \
GET \
https://api.example.com/api/invoices/ \
Authorization:"Token YOUR_API_TOKEN"
|
| 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)
|
- API Source:
invoices_list
| 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
| 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)
|
- 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) |
✓ |
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.
Get invoice items
Retrieve a list of invoice items for the specified invoice.
| 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)
|
- 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.
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.
| 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)
|
- Model Source:
PaidRequest
- 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.
Set backend ID for invoice
Set backend ID for invoice.
Set payment URL for invoice
Set payment URL for invoice.
Set reference number for invoice
Set reference number for invoice.