List revenue record details by partner

GET https://api.suger.cloud/ai/org/{orgId}/revenue/partner/{partner}/record-detail

Returns the raw billing rows a marketplace partner reported for this organization, as a page with the total count. `partner` picks the table: AWS returns AWS billing events, AZURE returns Azure earnings, GCP returns charge usage, SNOWFLAKE returns invoices and ORACLE returns disbursements. Each row carries every column of its table. `startDate` and `endDate` bound the table's own date (insert date for AWS, term start for Azure, report date for GCP, invoice date for Snowflake, creation date for Oracle); the range defaults to the last 30 days, may span up to 4030 days, and does not include the end date itself. `entitlementId`, `buyerId` and `productId` narrow the rows, and when more than one is set only the first of them, in that order, applies. For AWS, `invoiceId` returns the events of one invoice across all dates unless a range is given. `limit` defaults to 1000, which is also the maximum; `offset` skips rows.

Parameters

NameInTypeRequiredDescription
orgId path string yes Organization ID
partner path string yes Marketplace partner whose table to read: AWS, AZURE, GCP, SNOWFLAKE or ORACLE.
productId query string no Only rows for this product id.
entitlementId query string no Only rows for this entitlement id.
buyerId query string no Only rows for this buyer id.
invoiceId query string no AWS only: the events AWS reported against this invoice id.
startDate query string no First date to include, as YYYY-MM-DD. The default is 30 days before the end date.
endDate query string no Date the range stops before, as YYYY-MM-DD. That day is not included. The default is now.
limit query string no Rows per page. The default and the maximum are 1000.
offset query string no Number of rows to skip. The default is 0.

Responses

200 — Legacy raw Revenue records

Content-Type: application/json

400 — Invalid legacy Revenue request

Content-Type: application/json

Response fields:

FieldTypeRequiredDescription
error string yes
detail string no

403 — Missing Revenue permission

Content-Type: application/json

Response fields:

FieldTypeRequiredDescription
error string yes
detail string no

413 — Request body too large

Content-Type: application/json · Schema: RevenuePayloadTooLargeResponse

RevenuePayloadTooLargeResponse fields:

FieldTypeRequiredDescription
error object yes

500 — Failed to query Revenue records

Content-Type: application/json

Response fields:

FieldTypeRequiredDescription
error string yes
detail string no

Example

Generated from this operation's schema. Values are placeholders — substitute your own ids, and set SUGER_TOKEN to a bearer token from the OAuth client-credentials exchange.

Request

curl -X GET 'https://api.suger.cloud/ai/org/{orgId}/revenue/partner/{partner}/record-detail' \
  -H "Authorization: Bearer $SUGER_TOKEN"

Response — 200

{}

Error — 400

{
  "error": "string",
  "detail": "string"
}

View as Markdown · API reference overview

Spotted something wrong or out of date on this page? Tell us and we'll correct it.