RevGlanceDocs

REST API

Read your RevGlance figures from your own code. Read-only, JSON, part of the paid plan. No AI is called and nothing counts against your Ask questions.

Base URLhttps://revglance.com/api/v1

Try it reads the demo’s sample data. Sign in on a paid plan to try it on your own.

Authentication

Make a key in Settings › API keys. It is shown once. Send it as a bearer token.

curl "https://revglance.com/api/v1/businesses" \
  -H "Authorization: Bearer $REVGLANCE_KEY" \
  -H "Accept: application/json"

A key reads every business you belong to that a paid plan covers, with your role’s access. It stops working when you revoke it, after a year, or when the account leaves the paid plan. Every call is listed on the keys page. Keys cannot connect an AI assistant; Settings › AI assistants does that.

Choosing a business

Every endpoint except /businesses and /metrics takes business: an id, or all for every business together in your reporting currency. source narrows a business to one source.

Pages

Lists return data, next_cursor and next. Follow next until it is null.

Limits and errors

120 requests a minute per key, with X-RateLimit-Remaining on every answer and Retry-After on a 429. Errors are JSON with a message, and errors per field for a 422.

401
No key, or an unknown, revoked or expired one.
403
The account is not on a paid plan.
404
Something the key cannot read.
422
A parameter that does not fit.
429
Over the rate limit.

List businesses

GET/api/v1/businesses

Your businesses with their currency, your role, whether privacy mode is on, and their sources.

No parameters.

curl "https://revglance.com/api/v1/businesses" \
  -H "Authorization: Bearer $REVGLANCE_KEY" \
  -H "Accept: application/json"
Runs on the demo’s sample data

Send the request to see the response.

List metrics

GET/api/v1/metrics

Every metric: its key, label, group, unit (money, count, percent, ratio) and what it means.

No parameters.

curl "https://revglance.com/api/v1/metrics" \
  -H "Authorization: Bearer $REVGLANCE_KEY" \
  -H "Accept: application/json"
Runs on the demo’s sample data

Send the request to see the response.

Read a metric

GET/api/v1/metrics/{metric}

One metric month by month, counted exactly like its page in RevGlance.

Each point has value (money in major units of currency), display, and trace: the link that shows the math behind that figure.

A name that is not in your data is left out and said in adjustments, never guessed.

Parameters

  • metricpathrequired

    A key from /metrics, such as mrr.

  • businessquery

    A business id from /businesses, or all for every business together in your reporting currency. Can be left out when you have one.

  • sourcequery

    Narrow a business to one of its sources.

  • fromquery

    First month, YYYY-MM. Default: 12 months ago, with to.

  • toquery

    Last month, YYYY-MM. Default: this month to date.

  • planquery

    Only one plan, by its name in your data.

  • intervalquery

    Monthly or yearly billing only.

  • countryquery

    An ISO country code.

  • group_byquery

    Split into the 5 largest slices. business needs business=all.

curl "https://revglance.com/api/v1/metrics/mrr?business=1" \
  -H "Authorization: Bearer $REVGLANCE_KEY" \
  -H "Accept: application/json"
Runs on the demo’s sample data

Send the request to see the response.

Explain a change

GET/api/v1/metrics/{metric}/explain

Why a metric changed in a month: before and after, by customer for MRR and ARR, and by business, source, plan, billing and country, each part with its own trace.

Parameters

  • metricpathrequired

    A key from /metrics.

  • businessquery

    A business id from /businesses, or all for every business together in your reporting currency. Can be left out when you have one.

  • sourcequery

    Narrow a business to one of its sources.

  • monthquery

    YYYY-MM. Default: last month.

  • planquery

    Only one plan, by its name in your data.

  • intervalquery

    Monthly or yearly billing only.

  • countryquery

    An ISO country code.

curl "https://revglance.com/api/v1/metrics/mrr/explain?business=1" \
  -H "Authorization: Bearer $REVGLANCE_KEY" \
  -H "Accept: application/json"
Runs on the demo’s sample data

Send the request to see the response.

List customers

GET/api/v1/customers

Customers, oldest first. In privacy mode a customer is a short label, with no name, email or personal attributes, as on screen.

Parameters

  • businessquery

    A business id from /businesses, or all for every business together in your reporting currency. Can be left out when you have one.

  • sourcequery

    Narrow a business to one of its sources.

  • countryquery

    An ISO country code.

  • per_pagequery

    Up to 100. Default 50.

  • cursorquery

    From next_cursor, for the next page.

curl "https://revglance.com/api/v1/customers?business=1&per_page=5" \
  -H "Authorization: Bearer $REVGLANCE_KEY" \
  -H "Accept: application/json"
Runs on the demo’s sample data

Send the request to see the response.

Read a customer

GET/api/v1/customers/{id}

One customer with status, plan, MRR, total paid, subscriptions and MRR history.

Parameters

  • idpathrequired

    A customer id from /customers.

  • businessquery

    A business id from /businesses, or all for every business together in your reporting currency. Can be left out when you have one.

curl "https://revglance.com/api/v1/customers/4213?business=1" \
  -H "Authorization: Bearer $REVGLANCE_KEY" \
  -H "Accept: application/json"
Runs on the demo’s sample data

Send the request to see the response.

List charges

GET/api/v1/charges

Charges and refunds, newest first. Amounts are in minor units of currency.

Parameters

  • businessquery

    A business id from /businesses, or all for every business together in your reporting currency. Can be left out when you have one.

  • sourcequery

    Narrow a business to one of its sources.

  • fromquery

    First day, YYYY-MM-DD.

  • toquery

    Last day, YYYY-MM-DD.

  • per_pagequery

    Up to 100. Default 50.

  • cursorquery

    From next_cursor, for the next page.

curl "https://revglance.com/api/v1/charges?business=1&per_page=5" \
  -H "Authorization: Bearer $REVGLANCE_KEY" \
  -H "Accept: application/json"
Runs on the demo’s sample data

Send the request to see the response.