Skip to content
Console
Menu

Generated Assets

Getting Started

Authentication

KV Store

List revenue facts

Lists the org's revenue facts, newest day first, for audit and export.

Lists the org's revenue facts, newest day first, for audit and export.

  • Path GET https://api.sylphx.com/v1/orgs/acme/revenue_facts
  • Scope revenue:read
  • Effect read — nothing is written.
  • Collection revenue_facts
  • Query page_size, page_token, filter
  • Pagination the answer carries revenue_facts and, when there is more, next_page_token

#Request

FieldTypeWhat it is
parentstringThe org: orgs/{org}. Required.
page_sizeint32At most this many; default 50, clamped to 1000.
page_tokenstringnext_page_token of the previous page.
filterstringAIP-160 filter, comparisons joined with AND: source = "…" (a source id or name), basis, store_kind, product_ref (each =), and day >= "YYYY-MM-DD", day <= "YYYY-MM-DD". The days default to the 31 days to today (UTC), and span at most 400 days.

#Response

FieldTypeWhat it is
revenue_factsRevenueFact[]The page, newest day first.
next_page_tokenstringThe token of the next page; empty on the last page.

#RevenueFact

FieldTypeWhat it is
namestringorgs/{org}/revenue_facts/{revenue_fact}.
uidstringThe fact's id: a hash of its source and external key. Output only.
metaResourceMetaResource metadata.
sourcestringThe source that reported it: orgs/{org}/revenue_sources/{id}. Output only.
external_keystringThe source's own identity for the line. Output only.
basisstringbooked, estimated or final. Output only.
granularitystringtransaction, day or month. Output only.
daystringThe source's reporting day; the first of the month for a month row. Output only.
store_kindstringstripe, app_store, google_play, ad_network or other. Output only.
account_refstringThe account the source reports for. Output only.
product_refstringThe product reference the source uses. Output only.
skustringThe store's item id. Output only.
region_codestringBuyer country (ISO 3166-1 alpha-2), where the source reports it. Output only.
currency_codestringISO 4217 code of the amounts. Output only.
grossstringWhat the buyer paid. Output only.
feestringThe store's or processor's fee. Output only.
taxstringTax. Output only.
netstringWhat the org earns. Output only.
unitsint64Items or orders, where reported. Output only.
settled_onstringThe day the money reached the bank; empty until the source says so. Output only.

#ResourceMeta

FieldTypeWhat it is
generationint64Increases by one on every change to spec. Output only.
etagstringStrong 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_timetimestampWhen the Resource was created. Output only.
update_timetimestampWhen the Resource last changed. Output only.
delete_timetimestampSet while the Resource is being deleted. Output only.
labelsmap<string, string>Caller-writable, indexed labels (AIP-122 label rules).
annotationsmap<string, string>Caller-writable, unindexed annotations.
display_namestringCaller-writable human-readable name.
creatorstringThe principal that created the Resource. Output only.

#Errors

  • UNAUTHENTICATED — No valid key or token was presented.
  • PERMISSION_DENIED — The key lacks the method's permission.
  • INVALID_FIELD — A field failed validation.
  • PAGE_TOKEN_MISMATCH — A page token was reused with different parameters.
  • 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_facts" \
  -H "Authorization: Bearer $SYLPHX_API_KEY"