Authorizations
Query Parameters
Allows to filter the billing usage for specific products. It accepts an array of product ids.
Accepts a plan name and allows to filter the usage for that plan.
Response
200 - application/vnd.api+json
Success
from latitudesh_python_sdk import Latitudesh
import os
with Latitudesh(
bearer=os.getenv("LATITUDESH_BEARER", ""),
) as latitudesh:
res = latitudesh.billing.list_usage(filter_project="proj_6059EqYkOQj8p", filter_products=[
"si_pttmsx3d",
"si_nmru52ev",
], filter_plan="plan.name")
# Handle response
print(res)
{
"data": {
"id": "",
"type": "billing_usage",
"attributes": {
"project": {
"id": "proj_6059EqYkOQj8p",
"slug": "ergonomic-marble-shoes",
"name": "Ergonomic Marble Shoes"
},
"period": {
"start": "2025-06-25T18:36:28+00:00",
"end": "2025-07-26T18:36:28+00:00"
},
"available_credit_balance": 123,
"amount": 0,
"price": 0,
"products": [],
"threshold": 10000
}
},
"meta": {}
}
Returns the billing usage of a project
from latitudesh_python_sdk import Latitudesh
import os
with Latitudesh(
bearer=os.getenv("LATITUDESH_BEARER", ""),
) as latitudesh:
res = latitudesh.billing.list_usage(filter_project="proj_6059EqYkOQj8p", filter_products=[
"si_pttmsx3d",
"si_nmru52ev",
], filter_plan="plan.name")
# Handle response
print(res)
{
"data": {
"id": "",
"type": "billing_usage",
"attributes": {
"project": {
"id": "proj_6059EqYkOQj8p",
"slug": "ergonomic-marble-shoes",
"name": "Ergonomic Marble Shoes"
},
"period": {
"start": "2025-06-25T18:36:28+00:00",
"end": "2025-07-26T18:36:28+00:00"
},
"available_credit_balance": 123,
"amount": 0,
"price": 0,
"products": [],
"threshold": 10000
}
},
"meta": {}
}
Allows to filter the billing usage for specific products. It accepts an array of product ids.
Accepts a plan name and allows to filter the usage for that plan.
Success
Show child attributes
Was this page helpful?