AlmondTill/G3N API

On this page

affiliatePayoutReport

query · in the family Reading your records

What it does

The payout report for affiliates — what you owe each partner for the period.

The affiliate payout twin: signed rows per (affiliate × currency).

What happens

Reads only; the numbers to settle with your partners.

Who may call it

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

Arguments

NameTypeRequiredNotes
fromString String!yesNo further notes.
toString String!yesNo further notes.
affiliateIdIDnoNo further notes.
limitIntnoHow many records to answer at most; a page may hold fewer.
nextTokenStringnoThe cursor from the previous page, passed back exactly as received.

Returns

CommissionPayoutRowPage CommissionPayoutRowPage! — One payout-report 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

query ExampleAffiliatePayoutReport($from: String!, $to: String!, $affiliateId: ID) {
  affiliatePayoutReport(from: $from, to: $to, affiliateId: $affiliateId) {
    items {
      subjectId
      currency
      earnedMinor
      clawedBackMinor
      payableMinor
      entryCount
    }
    nextToken
  }
}

Variables:

{
  "from": "<from>",
  "to": "<to>",
  "affiliateId": "01900000-0000-7000-8000-ab1bc9b90000"
}

Example response

{
  "data": {
    "affiliatePayoutReport": {
      "items": [
        {
          "subjectId": "01900000-0000-7000-8000-91fe7ba20000",
          "currency": "USD",
          "earnedMinor": 1,
          "clawedBackMinor": 1,
          "payableMinor": 1,
          "entryCount": 1
        }
      ],
      "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

Used in