On this page
commissionPayoutReport
query · in the family Reading your records
What it does
The commission payout report — what you owe each seller for the period.
The commission payout report: signed rows per (agent × currency) over entries createdAt ∈ [from, to) — earned/clawedBack/payable/entryCount; late claws land in THEIR OWN period as negative rows (append-only — close periods after the return window); agentUserId narrows to one agent. NO posting state — payroll is external BY DESIGN.
What happens
Reads only.
Who may call it
Capability area: Reading your records — Looking up and listing the records of your organization.
- Owner
- System Administrator
- Manager
- Associate Manager
- Warehouse Associate
- Sales Associate
- An API key whose scope allows
api:commissionPayoutReport
Arguments
| Name | Type | Required | Notes |
|---|---|---|---|
from | String String! | yes | No further notes. |
to | String String! | yes | No further notes. |
agentUserId | ID | no | No further notes. |
limit | Int | no | How many records to answer at most; a page may hold fewer. |
nextToken | String | no | The 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 ExampleCommissionPayoutReport($from: String!, $to: String!, $agentUserId: ID) {
commissionPayoutReport(from: $from, to: $to, agentUserId: $agentUserId) {
items {
subjectId
currency
earnedMinor
clawedBackMinor
payableMinor
entryCount
}
nextToken
}
}
Variables:
{
"from": "<from>",
"to": "<to>",
"agentUserId": "01900000-0000-7000-8000-640b76dc0000"
}
Example response
{
"data": {
"commissionPayoutReport": {
"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
VALIDATION/INVALID— Something in the request is not valid. (VALIDATION)AUTHN/REQUIRED— Sign in to do this. (AUTHN)AUTHZ/FORBIDDEN— Your role does not allow this action. (AUTHZ)RATE_LIMIT/THROTTLED— Too many requests in a short time. (RATE_LIMIT)NOT_FOUND/*— That record could not be found. (NOT_FOUND)