Quick start guide to begin integrating with RackNap APIs.
curl -X GET "https://api.racknap.com/v1/invoices?limit=10" \ -H "Authorization: Bearer your_api_key_here" \ -H "Content-Type: application/json"
import requests
headers = {
"Authorization": "Bearer your_api_key_here",
"Content-Type": "application/json"
}
response = requests.get(
"https://api.racknap.com/v1/invoices",
params={"limit": 10},
headers=headers
)
print(response.json())
const apiKey = "your_api_key_here";
fetch("https://api.racknap.com/v1/invoices?limit=10", {
method: "GET",
headers: {
"Authorization": `Bearer ${apiKey}`,
"Content-Type": "application/json"
}
})
.then(res => res.json())
.then(data => console.log(data));
All API responses follow a consistent format:
{
"success": true,
"code": 200,
"data": [
{
"id": "inv_8392ae4c",
"customerId": "cust_3d8f4a2b",
"amount": 1250.00,
"status": "PAID"
}
],
"pagination": {
"total": 250,
"offset": 0,
"limit": 10,
"hasMore": true
},
"meta": {
"timestamp": "2026-06-02T14:32:10Z",
"requestId": "req_xyz789"
}
}
success — Request succeeded (boolean)code — HTTP status codedata — Actual response payloadpagination — Present on list endpointsmeta — Metadata including request ID (use for support tickets)curl -X GET "https://api.racknap.com/v1/invoices?customerId=cust_3d8f4a2b" \ -H "Authorization: Bearer your_api_key_here"
curl -X POST "https://api.racknap.com/v1/invoices" \
-H "Authorization: Bearer your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"customerId": "cust_3d8f4a2b",
"items": [
{
"description": "Microsoft 365 (5 seats)",
"quantity": 5,
"unitPrice": 250.00
}
],
"dueDate": "2026-06-15"
}'
Always check the success field and handle errors:
response = requests.get(
"https://api.racknap.com/v1/invoices/inv_invalid",
headers=headers
)
data = response.json()
if not data["success"]:
error = data["error"]
print(f"Error: {error['message']}")
print(f"Type: {error['type']}")
print(f"Request ID: {data['meta']['requestId']}")
else:
print(data["data"])
RackNap API allows 1000 requests per minute per account.
Check these headers in responses:
X-RateLimit-Limit: 1000 X-RateLimit-Remaining: 998 X-RateLimit-Reset: 1654256400
If rate-limited (429), wait until the X-RateLimit-Reset timestamp.
Use the API Playground to:
Include your requestId (from API responses) when reporting issues for faster resolution.