Menu
Platform
AI
Alerts and status pages
App store purchases
Credits
Generated Assets
Knowledge
KV
Localization
Notifications
Organizations
Payments
Queues
Realtime
Sandboxes
Storage
Workflows
API reference
- Overview
- Access API keys
- Agent sessions API
- Agent versions API
- Agents API
- AI models API
- Artifact references API
- Artifacts API
- Assets API
- Auth configs API
- Bank receipts API
- Bank transfer accounts API
- Buckets API
- Builds API
- Catalogs API
- Chat profiles API
- Chat reports API
- Chat sticker packs API
- Checkout policies API
- Checkout sessions API
- Config changes API
- Config flags API
- Config segments API
- Connection providers API
- Connections API
- Connectors API
- Credit grants API
- Customer organizations API
- Customer subscriptions API
- Databases API
- Documents API
- Email domains API
- End users API
- Entities API
- Entitlement grants API
- Entries API
- Environments API
- Episodes API
- Error events API
- Error groups API
- Events API
- Exchange rates API
- Generations API
- Glossaries API
- Goals API
- Identities API
- Inbound emails API
- Inbound endpoints API
- Inbound messages API
- Inbound sms API
- Invitations API
- Job runs API
- Jobs API
- Knowledge schemas API
- KV API
- KV namespaces API
- Lease events API
- Leases API
- Licence keys API
- Licence tokens API
- Mail domains API
- Mail routes API
- Mailbox connect links API
- Mailbox OAUTH apps API
- Mailboxes API
- Memberships API
- Memories API
- Memory stores API
- Merchant accounts API
- Message topics API
- Messages API
- OAUTH clients API
- Objects API
- Organization roles API
- Orgs API
- Owner pools API
- Phone numbers API
- Portal sessions API
- Preferences API
- Price catalogs API
- Processor events API
- Projects API
- Queued executions API
- Queues API
- Realtime channels API
- Realtime members API
- Realtime messages API
- Recipients API
- Relations API
- Releases API
- Revenue API
- Revenue facts API
- Revenue sources API
- Runs API
- Sandbox shapes API
- Schedules API
- Scrubbing policies API
- Search API
- Search indexes API
- Secret versions API
- Secrets API
- Service enablements API
- Service observations API
- Services API
- Serving routes API
- Session events API
- Sessions API
- Signing key versions
- Signing keys
- Sms numbers API
- Source maps API
- Spaces API
- Store connections API
- Store purchases API
- Subscriptions API
- Suppressions API
- Tax threshold statuses API
- Templates API
- Test clocks API
- Token exchanges API
- Transfers API
- Trust policies API
- Trusted issuers API
- Uptime checks API
- Uptime manifests API
- Uptime sources API
- Usage events API
- Usage invoices API
- Usage meter prices API
- Usage meters API
- Usage reservations API
- Usage settings API
- Usage tiers API
- Volumes API
- Waits API
- Webhook deliveries API
- Webhook endpoints API
- Workflows API
Getting Started
Authentication
KV Store
Deploy & Infrastructure
Reference
Get a revenue
Gets the org's revenue over a period: totals by day or month, split by source or product, gross or net, in one reporting currency, with the…
Gets the org's revenue over a period: totals by day or month, split by source or product, gross or net, in one reporting currency, with the basis of each bucket, the sources that report late, and what has no rate yet. Reads only the daily roll-up, bounded by a 5 second statement timeout. For example sylphx money revenue summary --period mtd --split source.
- Path
GET https://api.sylphx.com/v1/orgs/acme/revenue - Scope
revenue:read - Effect
read— nothing is written. - Collection revenue
- Query
period,month,start_day,end_day,group_by,split,amount,currency_code
#Request
| Field | Type | What it is |
|---|---|---|
name | string | orgs/{org}/revenue. Required. |
period | string | today, mtd (month to date, the default), month (with month), or range (with start_day and end_day). Days are UTC. |
month | string | The month of a month period, YYYY-MM. |
start_day | string | The first day of a range, YYYY-MM-DD. |
end_day | string | The last day of a range, inclusive; at most 400 days after the first. |
group_by | string | day (the default) or month. |
split | string | none (the default), source or product. |
amount | string | net (the default) or gross. |
currency_code | string | The reporting currency, ISO 4217; default USD. |
#Response
| Field | Type | What it is |
|---|---|---|
name | string | orgs/{org}/revenue. |
uid | string | The org's id. Output only. |
meta | ResourceMeta | Resource metadata. Output only. |
start_day | string | The first day of the period, YYYY-MM-DD. Output only. |
end_day | string | The last day of the period, inclusive. Output only. |
currency_code | string | The reporting currency every converted amount is in. Output only. |
amount | string | net or gross. Output only. |
group_by | string | day or month. Output only. |
split | string | none, source or product. Output only. |
total | string | The period's total, in minor units of the reporting currency. Output only. |
buckets | RevenueBucket[] | One bucket per day or month that holds revenue, oldest first. Output only. |
lines | RevenueLine[] | The period's total per source or product, largest first; empty when split is none. Output only. |
stale_sources | StaleRevenueSource[] | Sources that report late: their missing days make the period incomplete. Output only. |
unconverted | UnconvertedAmount[] | Amounts with no exchange rate for their day yet, in their own currency: counted here, never in total. Output only. |
unconverted_count | int64 | Daily rows that had no rate and are in unconverted. Output only. |
incomplete | bool | A stale source has not reported some day of the period. Output only. |
booked_volume | BookedVolumeLine[] | Ledger-backed booked volume for this exact period, by app/environment, channel and original currency. Never FX converted or replaced by imported estimates/final reports; independent of amount, split and group_by. Output only. |
#ResourceMeta
| Field | Type | What it is |
|---|---|---|
generation | int64 | Increases by one on every change to spec. Output only. |
etag | string | Strong ETag (AIP-154): changes on any change to spec, status, or metadata. Send it back as If-Match or etag to make Update and Delete conditional; a mismatch fails with ABORTED / 409 ETAG_MISMATCH. Output only. |
create_time | timestamp | When the Resource was created. Output only. |
update_time | timestamp | When the Resource last changed. Output only. |
delete_time | timestamp | Set while the Resource is being deleted. Output only. |
labels | map<string, string> | Caller-writable, indexed labels (AIP-122 label rules). |
annotations | map<string, string> | Caller-writable, unindexed annotations. |
display_name | string | Caller-writable human-readable name. |
creator | string | The principal that created the Resource. Output only. |
#RevenueBucket
| Field | Type | What it is |
|---|---|---|
start_day | string | The day, or the first day of the month. |
total | string | The bucket's total in minor units of the reporting currency. |
basis | string | The weakest basis that counted in the bucket: final when every row is a source's final statement, estimated or booked otherwise. |
incomplete | bool | A stale source has not reported this bucket yet. |
unconverted_count | int64 | Daily rows of this bucket with no rate yet. |
lines | RevenueLine[] | The bucket per source or product; empty when split is none. |
#RevenueLine
| Field | Type | What it is |
|---|---|---|
key | string | The source's name (orgs/{org}/revenue_sources/{id}), or the product as {store_kind}/{product_ref}. |
label | string | The source's display name, or the product's label; the reference itself when the product has no label. |
total | string | In minor units of the reporting currency. |
#StaleRevenueSource
| Field | Type | What it is |
|---|---|---|
source | string | orgs/{org}/revenue_sources/{id}. |
display_name | string | The source's display name. |
newest_day | string | The newest day it holds; empty when it holds none. |
#UnconvertedAmount
| Field | Type | What it is |
|---|---|---|
currency_code | string | ISO 4217 code. |
amount | string | In minor units of that currency. |
#BookedVolumeLine
| Field | Type | What it is |
|---|---|---|
project | string | The app's project resource name. |
environment | string | The environment resource name. |
product_ref | string | The app/package, bundle or Stripe product reference; empty stays empty. |
channel | string | stripe, app_store, google_play or bank_transfer. |
currency_code | string | ISO 4217 currency; never sum amounts across currencies. |
gross | string | Signed integer minor units in currency_code; refunds subtract. |
fee | string | Recorded processor fees, not an estimate of eventual settlement fees. |
tax | string | Recorded tax in native minor units. |
net | string | Recorded net in native minor units. |
units | string | Signed units: full reversals subtract units, partial refunds may not. |
posting_count | string | Number of booked ledger postings, including refund postings. |
#Errors
UNAUTHENTICATED— No valid key or token was presented.PERMISSION_DENIED— The key lacks the method's permission.RESOURCE_NOT_FOUND— The named Resource does not exist or is not visible.INVALID_FIELD— A field failed validation.UNAVAILABLE— The Resource store, the owning service's backend, or the key verifier's snapshot is unavailable; retry after Retry-After.
Every error arrives in the body Errors describes.
#Examples
curl "https://api.sylphx.com/v1/orgs/acme/revenue" \
-H "Authorization: Bearer $SYLPHX_API_KEY"