AlmondTill/G3N API

affiliateEntryList

query · in the family Reading your records

What it does

The ledger of what an affiliate has earned, entry by entry.

The AffiliateEntry ledger read.

Before you call

A bearer session from an API key (see Authentication and key hygiene) or a signed-in user.

Capability area: Reading your records — Looking up and listing the records of your organization.

Roles that may call it:

What happens

Reads only — the maths behind an affiliate’s payout.

Arguments

NameTypeRequiredNotes
affiliateIdIDno
fromStringno
toStringno
limitIntnoHow many records to answer at most; a page may hold fewer.
nextTokenStringnoThe cursor from the previous page, passed back exactly as received.

Returns

AffiliateEntryPage AffiliateEntryPage! — One affiliateEntryList page.

This is a page: items holds the records and nextToken the cursor for the next page — pass it back verbatim until it is null. See paging.

Example request

graphql
query ExampleAffiliateEntryList($affiliateId: ID) {
  affiliateEntryList(affiliateId: $affiliateId) {
    items {
      id
      parentId
      entryType
      amountMinor
      currency
      basisMinor
      ratePpm
      orderId
      returnId
      caption
      createdAt
    }
    nextToken
  }
}

Variables:

json
{
  "affiliateId": "01900000-0000-7000-8000-c6e63db40000"
}

Example response

json
{
  "data": {
    "affiliateEntryList": {
      "items": [
        {
          "id": "01900000-0000-7000-8000-37386ae00000",
          "parentId": "01900000-0000-7000-8000-eacdfcfd0000",
          "entryType": "earn",
          "amountMinor": 1250,
          "currency": "USD",
          "basisMinor": 1250,
          "ratePpm": 1,
          "orderId": "01900000-0000-7000-8000-18e782370000",
          "returnId": "01900000-0000-7000-8000-cc01b1df0000",
          "caption": "Blue jeans",
          "createdAt": "2027-01-31T00:00:00.000Z"
        }
      ],
      "nextToken": "<the cursor from the previous page>"
    }
  },
  "extensions": {
    "at": {
      "callId": "01EXAMPLE-CALL-ID",
      "version": {
        "requested": null,
        "serviced": {
          "name": "genesis",
          "number": 0
        }
      }
    }
  }
}

Errors this call can answer