GET
/dashboard/invoices/{id} Retrieve a specific invoice
Returns detailed information about a specific invoice for the authenticated user.
Parameters
| Name | Type | In | Description |
|---|---|---|---|
id* | integer | path | The ID of the invoice to retrieve |
Response
200
400
403
404
successbooleandataobjectcredit_balancenumberinvoiceobjectidintegerduedatestringdate_paidstringnullabledate_refundedstringnullablepricenumbertax_ratenumbertax_countrystringtax_exemptbooleanstatusstringunpaidpaidrefundedcancelledpaid_with_creditbooleancreated_atstringuser_idintegerinvoiceitemsarrayRequest
curl -X GET "https://api.royalehosting.net/dashboard/invoices/{id}" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "x-organization-id: YOUR_ORG_ID"Request
const response = await fetch("https://api.royalehosting.net/dashboard/invoices/{id}", {
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/{id}",
headers={
"Authorization": "Bearer YOUR_API_KEY",
"x-organization-id": "YOUR_ORG_ID",
}
)
print(response.json())Response
{
"success": true,
"data": {
"credit_balance": 0,
"invoice": {
"id": 0,
"duedate": "2024-01-15T10:30:00Z",
"date_paid": "2024-01-15T10:30:00Z",
"date_refunded": "2024-01-15T10:30:00Z",
"price": 0,
"tax_rate": 0,
"tax_country": "string",
"tax_exempt": true,
"status": "unpaid",
"paid_with_credit": true,
"created_at": "2024-01-15T10:30:00Z",
"user_id": 0,
"invoiceitems": [
{
"id": 0,
"productid": 0,
"serviceid": 0,
"type": "string",
"description": "string",
"price": 0,
"domain": "string",
"period": "string",
"services": [
{
"id": 0,
"domain": "string",
"product": {
"name": "string"
}
}
]
}
]
}
}
}