Skip to Content
Grail Network

Report lines and statements

Read every line after your last one, and check each day's totals.

A report line is one earning of one of your cards: a sale, or a pool share. Your system reads the lines after its last cursor, on its own timer, and credits each line once. Nobody needs to send a date or run a command: after an outage, your system reads from its last cursor and gets every line that it missed.

Read the lines

GET /partner/report-lines?after=<cursor>&limit=100
{
  "data": [
    {
      "id": "019a8d10-0000-7000-8000-000000000001",
      "kind": "pool_share",
      "itemId": "019a8b90-0c1d-7e2f-8a3b-4c5d6e7f8091",
      "reference": "7K3M9QX21",
      "amount": { "amountAtomic": "1887", "currency": "USD" },
      "recordedAt": "2026-11-24T01:00:03.120Z",
      "soldAt": null,
      "poolDay": "2026-11-23",
      "itemPrice": { "amountAtomic": "1000000", "currency": "USD" }
    },
    {
      "id": "019a8d40-0000-7000-8000-000000000002",
      "kind": "sale",
      "itemId": "019a8b91-0000-7000-8000-000000000003",
      "reference": "5H4R3P007",
      "amount": { "amountAtomic": "191500", "currency": "USD" },
      "recordedAt": "2026-11-24T14:02:10.480Z",
      "soldAt": "2026-11-24T14:02:10.000Z",
      "poolDay": null,
      "itemPrice": null
    }
  ],
  "meta": { "nextCursor": "2026-11-24T14:02:10.480Z_019a8d40-0000-7000-8000-000000000002" }
}
FieldMeaning
idThe line's id. Credit each line once by it
kindsale or pool_share
itemId, referenceThe card and your reference
amountWhat you earned
recordedAtWhen Grail Network wrote the line. The cursor and the statements use this time
soldAtA sale: when the card was sold. A pool share: null
poolDayA pool share: the UTC day of the pool. A sale: null
itemPriceA pool share: the card price that the share used. A sale: null
  • after is the nextCursor of your last page, or an RFC 3339 time, such as 2026-11-24T00:00:00Z. Without it, the list starts at your first line. Treat a cursor as text: its form can change.
  • limit is 1 to 500, 100 by default.
  • The lines come oldest first, and a line never comes twice.
  • The list holds only lines older than 60 seconds. A line can take up to 60 seconds to appear, and then it never appears behind your cursor.

What your reader does

  1. Read a page with your last cursor.
  2. Credit each line by its id. Skip an id that you credited already.
  3. Store meta.nextCursor after you credited the whole page.
  4. A full page (limit lines): read the next page at once.
  5. A page with fewer lines: you have every line to now. Read again later, for example each minute, or when a webhook comes.

A line of a card that your system does not know yet: credit it to a place of your own for unknown cards, and move on. Read the card with GET /partner/items/{itemId} later. Never stop the cursor for one line.

Statements

A statement gives the totals of the lines of one closed UTC day.

GET /partner/statements/2026-11-24
{
  "data": {
    "day": "2026-11-24",
    "lineCount": 3,
    "salesCount": 1,
    "salesTotal": { "amountAtomic": "191500", "currency": "USD" },
    "poolSharesCount": 2,
    "poolSharesTotal": { "amountAtomic": "2246", "currency": "USD" },
    "total": { "amountAtomic": "193746", "currency": "USD" }
  }
}
  • A statement holds the lines whose recordedAt is in the day: from 00:00 UTC, included, to 00:00 UTC of the next day, not included.
  • A pool share of day D is recorded on day D + 1, so it is in the statement of D + 1. Its line says poolDay D.
  • A day is closed at 00:01:00 UTC of the next day. A day that is not closed gives 409 PARTNER_STATEMENT_DAY_NOT_CLOSED.
  • A closed day with no line gives zeros. A past day gives the same totals at each read: a line never changes, and is never deleted.

GET /partner/statements?from=2026-11-01&to=2026-11-24 gives one statement for each closed day, newest first, the days with zeros too. Without from and to, it gives the last 30 closed days. A range is at most 31 days. A longer range, or from after to, gives 400 VALIDATION_FAILED.

A worked check

Your system credited three lines with a recordedAt on 2026-11-24:

Linekindamount
The share of 7K3M9QX21 of the pool of 2026-11-23pool_share$18.87
The share of 5H4R3P007 of the pool of 2026-11-23pool_share$3.59
The sale of 5H4R3P007sale$1,915.00

Your sums: 1 sale of $1,915.00, 2 pool shares of $22.46, 3 lines, $1,937.46 in all. The statement of 2026-11-24 above says the same. When a number differs, read the lines of that day again from after=2026-11-24T00:00:00Z, and look for a line that you did not credit.

On this page