Back to API Keys

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.com

Rate 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

GET/api/v1/ordersread:orders

List paginated orders for your team. Returns revenue, COGS, net profit, and status for each order.

Parameters

NameInTypeRequiredDescription
pagequeryintegernoPage number (default: 1)
limitqueryintegernoItems per page, max 100 (default: 50)
fromquerystringnoStart date ISO-8601 (e.g. 2025-01-01)
toquerystringnoEnd date ISO-8601 (e.g. 2025-01-31)
statusquerystringnoFilter 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
}
GET/api/v1/summaryread:orders

Aggregate profit summary for a date range — revenue, COGS, margins, ad spend, and refunds.

Parameters

NameInTypeRequiredDescription
fromquerystringyesStart date ISO-8601
toquerystringyesEnd 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

StatusMeaning
401 UnauthorizedAPI key missing or invalid.
403 ForbiddenValid key but insufficient scope, or plan does not include API access.
404 Not FoundResource does not exist or belongs to another team.
422 UnprocessableInvalid query parameters. Check the error message for details.
429 Too Many RequestsRate limit exceeded. Check Retry-After header.
500 Internal Server ErrorServer error. If persistent, contact support.

Ready to get started?

Generate an API key from your settings page.

Manage API Keys