API Reference
GetProfitCalc exposes a REST API for Pro plan users. Use it to pull your profit data into custom dashboards, data warehouses, or automation workflows.
Authentication
All API requests must include a valid API key in the Authorization header using the Bearer scheme.
curl https://getprofitcalc.com/api/v1/summary?from=2025-01-01&to=2025-01-31 \ -H "Authorization: Bearer pc_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
Keep your API key secret
Never expose keys in client-side code or public repositories. Keys can be revoked and regenerated from the API Keys settings page.
Base URL & Rate Limits
Base URL
https://getprofitcalc.comRate limit
100 requests per 60 seconds per API key
Response format
JSON, UTF-8. Always returns Content-Type: application/json.
Rate limit headers
X-RateLimit-Remaining, Retry-After
Availability
Pro plan only. All responses include HTTP status codes.
Endpoints
/api/v1/ordersread:ordersList paginated orders for your team. Returns revenue, COGS, net profit, and status for each order.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| page | query | integer | no | Page number (default: 1) |
| limit | query | integer | no | Items per page, max 100 (default: 50) |
| from | query | string | no | Start date ISO-8601 (e.g. 2025-01-01) |
| to | query | string | no | End date ISO-8601 (e.g. 2025-01-31) |
| status | query | string | no | Filter by status: fulfilled | refunded | cancelled |
Response Example (200 OK)
{
"orders": [
{
"id": "6624a1b2c3d4e5f6a7b8c9d0",
"orderNumber": "#1001",
"orderDate": "2025-01-15T10:30:00Z",
"status": "fulfilled",
"grossRevenue": 99.00,
"netRevenue": 89.10,
"totalCogs": 35.00,
"netProfit": 41.77,
"profitMargin": 46.88,
"currency": "USD"
}
],
"total": 243,
"page": 1,
"pages": 5
}/api/v1/summaryread:ordersAggregate profit summary for a date range — revenue, COGS, margins, ad spend, and refunds.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| from | query | string | yes | Start date ISO-8601 |
| to | query | string | yes | End date ISO-8601 |
Response Example (200 OK)
{
"from": "2025-01-01",
"to": "2025-01-31",
"summary": {
"totalRevenue": 12450.00,
"totalCogs": 4230.00,
"grossProfit": 8220.00,
"grossMargin": 66.1,
"totalAdSpend": 1800.00,
"netProfit": 5940.00,
"netMargin": 47.7,
"orderCount": 87,
"avgOrderValue": 143.1,
"totalRefunds": 350.00
}
}Error Codes
| Status | Meaning |
|---|---|
| 401 Unauthorized | API key missing or invalid. |
| 403 Forbidden | Valid key but insufficient scope, or plan does not include API access. |
| 404 Not Found | Resource does not exist or belongs to another team. |
| 422 Unprocessable | Invalid query parameters. Check the error message for details. |
| 429 Too Many Requests | Rate limit exceeded. Check Retry-After header. |
| 500 Internal Server Error | Server error. If persistent, contact support. |
Ready to get started?
Generate an API key from your settings page.
