Invoices
Operations Summary
Core CRUD
List Invoices
HTTPie Python TypeScript Query Parameters Responses
http \
GET \
https://api.example.com/api/invoices/ \
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.models.invoice_field_enum import InvoiceFieldEnum # (1)
from waldur_api_client.models.invoice_o_enum import InvoiceOEnum # (2)
from waldur_api_client.models.invoice_state_enum import InvoiceStateEnum # (3)
from waldur_api_client.api.invoices import invoices_list # (4)
client = AuthenticatedClient (
base_url = "https://api.example.com" , token = "YOUR_API_TOKEN"
)
response = invoices_list . sync ( client = client )
for item in response :
print ( item )
Model Source: InvoiceFieldEnum
Model Source: InvoiceOEnum
Model Source: InvoiceStateEnum
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
accounting_is_running
boolean
Filter by whether accounting is running.
created
string (date)
customer
string (uri)
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, pending_finalization, 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
Name of the marketplace resource
items.details.resource_uuid
string (uuid)
UUID of the marketplace resource
items.details.plan_name
string
Name of the pricing plan
items.details.plan_uuid
string (uuid)
UUID of the pricing plan
items.details.offering_type
string
Type of the offering
items.details.offering_name
string
Name of the offering
items.details.offering_uuid
string (uuid)
UUID of the offering
items.details.service_provider_name
string
Name of the service provider
items.details.service_provider_uuid
string (uuid)
UUID of the service provider
items.details.plan_component_id
integer
ID of the plan component
items.details.offering_component_type
string
Type of the offering component
items.details.offering_component_name
string
Name of the offering component
items.details.resource_limit_periods
array of objects
List of resource limit periods for this invoice item
items.details.resource_limit_periods.start
string
Start date of the resource limit period
items.details.resource_limit_periods.end
string
End date of the resource limit period
items.details.resource_limit_periods.quantity
integer
Quantity of resources consumed during this period
items.details.resource_limit_periods.billing_periods
integer
Number of billing periods
items.details.resource_limit_periods.total
string
Total amount for this period
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
HTTPie Python TypeScript Path Parameters Query Parameters Responses
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
13 from waldur_api_client.client import AuthenticatedClient
from waldur_api_client.models.invoice_field_enum import InvoiceFieldEnum # (1)
from waldur_api_client.api.invoices import invoices_retrieve # (2)
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 )
Model Source: InvoiceFieldEnum
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, pending_finalization, 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
Name of the marketplace resource
items.details.resource_uuid
string (uuid)
UUID of the marketplace resource
items.details.plan_name
string
Name of the pricing plan
items.details.plan_uuid
string (uuid)
UUID of the pricing plan
items.details.offering_type
string
Type of the offering
items.details.offering_name
string
Name of the offering
items.details.offering_uuid
string (uuid)
UUID of the offering
items.details.service_provider_name
string
Name of the service provider
items.details.service_provider_uuid
string (uuid)
UUID of the service provider
items.details.plan_component_id
integer
ID of the plan component
items.details.offering_component_type
string
Type of the offering component
items.details.offering_component_name
string
Name of the offering component
items.details.resource_limit_periods
array of objects
List of resource limit periods for this invoice item
items.details.resource_limit_periods.start
string
Start date of the resource limit period
items.details.resource_limit_periods.end
string
End date of the resource limit period
items.details.resource_limit_periods.quantity
integer
Quantity of resources consumed during this period
items.details.resource_limit_periods.billing_periods
integer
Number of billing periods
items.details.resource_limit_periods.total
string
Total amount for this period
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
List Invoices Growth
Analyze invoice trends over time by comparing monthly totals for major customers versus others over the past year.
Get object state at a specific timestamp
Returns the state of the object as it was at the specified timestamp. Only accessible by staff and support users.
Get version history
Returns the version history for this object. Only accessible by staff and support users.
Get invoice items
Retrieve a list of invoice items for the specified invoice.
HTTPie Python TypeScript Path Parameters Query Parameters Responses
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
13 from waldur_api_client.client import AuthenticatedClient
from waldur_api_client.models.invoice_item_o_enum import InvoiceItemOEnum # (1)
from waldur_api_client.api.invoices import invoices_items_retrieve # (2)
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 )
Model Source: InvoiceItemOEnum
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 fieldEnum: project_name, -project_name, resource_name, -resource_name, provider_name, -provider_name, name, -name
offering_uuid
string (uuid)
project_uuid
string (uuid)
provider_uuid
string (uuid)
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
Name of the marketplace resource
details.resource_uuid
string (uuid)
UUID of the marketplace resource
details.plan_name
string
Name of the pricing plan
details.plan_uuid
string (uuid)
UUID of the pricing plan
details.offering_type
string
Type of the offering
details.offering_name
string
Name of the offering
details.offering_uuid
string (uuid)
UUID of the offering
details.service_provider_name
string
Name of the service provider
details.service_provider_uuid
string (uuid)
UUID of the service provider
details.plan_component_id
integer
ID of the plan component
details.offering_component_type
string
Type of the offering component
details.offering_component_name
string
Name of the offering component
details.resource_limit_periods
array of objects
List of resource limit periods for this invoice item
details.resource_limit_periods.start
string
Start date of the resource limit period
details.resource_limit_periods.end
string
End date of the resource limit period
details.resource_limit_periods.quantity
integer
Quantity of resources consumed during this period
details.resource_limit_periods.billing_periods
integer
Number of billing periods
details.resource_limit_periods.total
string
Total amount for this period
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.
Import usage data
Import component usage items as JSON data for multiple customers. Creates invoice items for the specified billing period. Items are deduplicated by name, customer, and billing period to prevent duplicates.
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.
HTTPie Python TypeScript Path Parameters Request Body (required) Responses
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, pending_finalization, 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
Name of the marketplace resource
items.details.resource_uuid
string (uuid)
UUID of the marketplace resource
items.details.plan_name
string
Name of the pricing plan
items.details.plan_uuid
string (uuid)
UUID of the pricing plan
items.details.offering_type
string
Type of the offering
items.details.offering_name
string
Name of the offering
items.details.offering_uuid
string (uuid)
UUID of the offering
items.details.service_provider_name
string
Name of the service provider
items.details.service_provider_uuid
string (uuid)
UUID of the service provider
items.details.plan_component_id
integer
ID of the plan component
items.details.offering_component_type
string
Type of the offering component
items.details.offering_component_name
string
Name of the offering component
items.details.resource_limit_periods
array of objects
List of resource limit periods for this invoice item
items.details.resource_limit_periods.start
string
Start date of the resource limit period
items.details.resource_limit_periods.end
string
End date of the resource limit period
items.details.resource_limit_periods.quantity
integer
Quantity of resources consumed during this period
items.details.resource_limit_periods.billing_periods
integer
Number of billing periods
items.details.resource_limit_periods.total
string
Total amount for this period
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.