Skip to Content
Grail Network
API reference

List your report lines

What you earned, line by line, sorted by the time when Grail Network recorded each line (`recordedAt`), the oldest first. A line never changes and is never deleted. Two kinds of line: - `sale`: a card of yours was sold. The line comes when the buyer keeps the card: when the Buyback offer ends (`buybackOfferEndsAt` of the card), or when the card leaves the warehouse to its buyer. `amount` is the price of the card when the buyer got it. - `pool_share`: a share of the daily pool for a card of yours that was on sale. The day's pool is made once, usually at 01:00 UTC of the next day; then the webhook `pool.created` names the day (`poolDay`). Only lines older than 60 seconds are listed, so a line never appears behind your cursor. Credit each line once by its `id`, and store `nextCursor` after you credited the whole page. How to read the list to its end: - Start with no `after`, or with `after=` an RFC 3339 time ("at or after this time"). - A full page (`limit` lines, 100 by default, 500 at most): read the next page at once with `after=<nextCursor>`. - A page with fewer lines than `limit`: you have every line to now. Read again later with the same `nextCursor`: at the next webhook, or at your own pace. An empty page gives back the cursor that you sent. - After an outage of any length, read from your last stored cursor: you get every line of that time, once. Nobody runs a command or types a date. The statements (`GET /partner/statements`) sum the same lines by the UTC day of `recordedAt`. Errors: - 400 `VALIDATION_FAILED`: `after` is neither a `nextCursor` nor an RFC 3339 time, or `limit` is not from 1 to 500.

GET
/partner/report-lines

What you earned, line by line, sorted by the time when Grail Network recorded each line (recordedAt), the oldest first. A line never changes and is never deleted. Two kinds of line:

  • sale: a card of yours was sold. The line comes when the buyer keeps the card: when the Buyback offer ends (buybackOfferEndsAt of the card), or when the card leaves the warehouse to its buyer. amount is the price of the card when the buyer got it.
  • pool_share: a share of the daily pool for a card of yours that was on sale. The day's pool is made once, usually at 01:00 UTC of the next day; then the webhook pool.created names the day (poolDay).

Only lines older than 60 seconds are listed, so a line never appears behind your cursor. Credit each line once by its id, and store nextCursor after you credited the whole page.

How to read the list to its end:

  • Start with no after, or with after= an RFC 3339 time ("at or after this time").
  • A full page (limit lines, 100 by default, 500 at most): read the next page at once with after=<nextCursor>.
  • A page with fewer lines than limit: you have every line to now. Read again later with the same nextCursor: at the next webhook, or at your own pace. An empty page gives back the cursor that you sent.
  • After an outage of any length, read from your last stored cursor: you get every line of that time, once. Nobody runs a command or types a date.

The statements (GET /partner/statements) sum the same lines by the UTC day of recordedAt.

Errors:

  • 400 VALIDATION_FAILED: after is neither a nextCursor nor an RFC 3339 time, or limit is not from 1 to 500.

Authorization

partnerApiKey
headerAuthorizationBearer <token>

The partner's API key.

Query Parameters

limit?integer
Range1 <= value <= 500
Default100
after?string

The nextCursor of your last page, or any RFC 3339 time such as 2026-11-20T00:00:00Z ("at or after this time"). Leave it out to read from the first line

Response Body

application/json
  1. response
data*array<>
meta*
Example Request
curl -X GET 'https://api-stg.grailnetwork.com/partner/report-lines'
Example Response
{  "data": [    {      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",      "kind": "sale",      "itemId": "f11b669d-7201-4c21-88af-d85092f0c005",      "reference": "string",      "amount": {        "amountAtomic": "string",        "currency": "string"      },      "recordedAt": "2019-08-24T14:15:22Z",      "soldAt": "2019-08-24T14:15:22Z",      "poolDay": "2019-08-24",      "itemPrice": {        "amountAtomic": "string",        "currency": "string"      }    }  ],  "meta": {    "nextCursor": "string"  }}

List your cards that changed GET

Your cards, sorted by the time of their last change (`changedAt`), the oldest first: all of them, or those that changed after `changedAfter`, of one slip `reference` when you give it. After the webhook `intake.ended`, `GET /partner/items?reference=7K3M9QX2G` gives every card of that intake at once. How to read the list to its end: - The page has `limit` cards, and the `changedAt` of its last card is not later than the time in `nextCursor`: read the next page at once with `changedAfter=<nextCursor>`. - The page has `limit` cards, and its last card is newer than `nextCursor`: the page holds the newest changes, and the cursor waits 60 seconds behind now. Wait 60 seconds before the next read: a read before that gives the same page again. - The page has fewer than `limit` cards: you have every change to now. Read again with `nextCursor` at your own pace, or at the next webhook. You can see a card of the last 60 seconds again at your next read. Keep the answer with the newest `changedAt`: a repeat changes nothing. Errors: - 400 `VALIDATION_FAILED`: `changedAfter` is neither a `nextCursor` nor an RFC 3339 time, `reference` is not a slip reference, or `limit` is not from 1 to 500. - 503 `SERVICE_UNAVAILABLE` with the header `Retry-After: 5`: a system that this request needs gave no answer. Send the same request again after 5 seconds.

List your statements GET

One statement for each closed UTC day from `from` to `to`, both included, the newest first, also the days with no line. A statement sums the lines recorded on its day. A day is closed at 00:01 UTC of the next day. With neither end: the last 30 closed days. With `from` only: from `from` to the last closed day. With `to` only: the 30 days that end on `to`. Errors: - 400 `VALIDATION_FAILED`: `from` is after `to`, or the range has more than 31 days. - 409 `PARTNER_STATEMENT_DAY_NOT_CLOSED`: a day of the range is not closed yet.