What does the account performance query return?

The accountPerformance query returns daily Amazon account performance across advertising and sales. Your agent can read account totals and inspect the daily rows through the read-only API. [cs]

Before an agent drills into a single product, campaign, or keyword, it usually needs to answer a simpler question first: how is the account doing overall? Amazon account performance at that level is what accountPerformance is for. It is one of the entities in Commerce Spine's GraphQL API, documented as returning "consolidated daily account performance across advertising, revenue, orders, and total sales." It gives the daily view at account level. [cs]

This is not a dashboard and there is nothing to click. An agent that has the API wired up sends the query, or a script sends it on a schedule. The quickstart lists the setup: set the URL, the token and an allowed account, then run your first query. [cs]

One account-level query, step by step1amazonAccounts: get the account IDs youmay query2dataFreshness: check the latest reportdate3accountPerformance: ask for 90 days orless4Read rows, totals and totals.derived(ACOS, ROAS)

Scoping a query to accounts

accountPerformance does not run against "Amazon" in the abstract. It runs against specific accounts the caller is allowed to see. The documented pattern is to call amazonAccounts first, which "lists the Amazon accounts within the organization and user permission scope," and use the id values it returns as the accountIds passed into accountPerformance. Skip that step and use an account you are not scoped to, and the API returns a FORBIDDEN_ACCOUNT_SCOPE error rather than silently returning nothing. [cs]

The documentation also notes that accountIds can be omitted entirely, in which case the query automatically uses "the complete set of authorized accounts" instead of a hand-picked list. That is useful for a script that just wants everything it is entitled to see, without maintaining its own list of account IDs. [cs]

The query window

accountPerformance takes a dateRange input with a from and to date, and that range is bounded. The documentation states a maximum demonstrated range of 90 days, and lists DATE_RANGE_TOO_LARGE as an expected error code for "date range longer than 90 days," with the documented fix being to split the period into smaller windows and query them separately. [cs]

That is a query-time constraint on how much history a single request can span, not a claim about how fresh the underlying data is. The API separately exposes a dataFreshness query that returns the latest available report date for an asset, which is the documented way to check how current the numbers are before deciding what date range to ask for. [cs]

What comes back

A response follows the same shape as the other entities in the API: a rows array of daily records, a totals object with aggregates, pageInfo for cursor-based pagination, and queryInfo with metadata like the request ID and which account IDs actually applied to the result. For accountPerformance, the documented fields are accountId, accountName, reportDate, countryCode, currencyCode, advertising metrics (adImpressions, adClicks, adOrders, adSpend, adRevenue) and sales metrics (orderedRevenue, shippedRevenue, shippedUnits, totalOrderedUnits, totalProductSales): fifteen metric and dimension fields, plus a derived object, sixteen in the collection. [cs]

The totals object can include a nested derived object, and the documented example shows acos and roas being read from totals.derived rather than computed by the caller. That means an agent asking "what's our blended ACOS this month" against this entity is reading a value the API already calculated, not one it has to derive itself from spend and revenue. [cs]

Why normalized fields matter

Raw Amazon reports are a moving target. Amazon's documentation for its Reports API, part of the Amazon SP-API, cautions that it "periodically adds new fields and field values to reports, and the format and structure of document identifiers may change." Commerce Spine's documentation describes the data an agent queries as normalized. It does not say which Amazon report feeds each accountPerformance field, so treat the documented field list as the contract, not the format of the raw report pulls underneath. [amazon] [cs]

Who runs this query

accountPerformance is reached the same way as every other entity in the API: a single POST to /graphql, authenticated with a Bearer agent token in the Authorization header. The documentation is explicit that this is separate from any console session token, and that protected operations without a valid token return UNAUTHENTICATED. In practice that means an agent or script with a token can ask for account-level performance directly, in the same request pattern used for the other eight entities in the API. [cs]

If you already have a Commerce Spine account and a token, accountPerformance is a query away rather than a feature to wait for. If you don't yet, that is the starting point. [cs]

What does the Free plan allow?

The Free plan connects 1 Amazon account. It allows 20 requests per hour and 40 requests per day. These limits apply per organization. [product]

Every plan backfills 30 days at first sync. The Free plan has a 30-day query window; paid plans allow 90 days per query. See the published plan limits. Inventory and listing queries still use their latest snapshots. [product] [cs]

Frequently asked questions

What does accountPerformance return?

Daily account-level records built from fifteen documented metric and dimension fields, such as adSpend, adRevenue, orderedRevenue and totalProductSales, plus a derived object; the response also carries totals, pageInfo and queryInfo.

How long a date range can one query cover?

The documentation shows a maximum of 90 days. A longer range returns DATE_RANGE_TOO_LARGE, and the fix is to split the period into smaller windows.

What happens if I ask for an account I am not scoped to?

The API returns a FORBIDDEN_ACCOUNT_SCOPE error instead of silently returning nothing. Leave accountIds out to use every account you are authorized for.

Sources

  1. Commerce Spine official reference
  2. Amazon Reports API documentation
  3. Commerce Spine product and plan limits

Want more of this in your Google results? Add Commerce Spine as a preferred source.