GET
/dashboard/invoices Retrieve invoices
Returns a list of invoices for the authenticated user.
Response
200
successbooleandataobjectcredit_balancenumberinvoicesarraylast_credit_transactionobjectidintegeramountnumbersubtractbooleanIf true credit has been removed
created_atstringnotestringRequest
curl -X GET "https://api.royalehosting.net/dashboard/invoices" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "x-organization-id: YOUR_ORG_ID"Request
const response = await fetch("https://api.royalehosting.net/dashboard/invoices", {
method: "GET",
headers: {
"Authorization": "Bearer YOUR_API_KEY",
"x-organization-id": "YOUR_ORG_ID",
},
});
const data = await response.json();Request
import requests
response = requests.get(
"https://api.royalehosting.net/dashboard/invoices",
headers={
"Authorization": "Bearer YOUR_API_KEY",
"x-organization-id": "YOUR_ORG_ID",
}
)
print(response.json())Response
{
"success": true,
"data": {
"credit_balance": 0,
"invoices": [
{
"id": 0,
"duedate": "2024-01-15T10:30:00Z",
"date_paid": "2024-01-15T10:30:00Z",
"date_refunded": "2024-01-15T10:30:00Z",
"price": "1.5",
"tax_rate": "0.21",
"tax_country": "NL",
"tax_exempt": false,
"status": "unpaid",
"paid_with_credit": false,
"created_at": "2024-01-15T10:30:00Z",
"user_id": 0
}
],
"last_credit_transaction": {
"id": 0,
"amount": 15,
"subtract": true,
"created_at": "2024-01-15T10:30:00Z",
"note": "string"
}
}
}