Request
Use the result
role field distinguishes Students from Administrators.Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
{
studentById(studentId: "33333333-3333-4333-8333-333333333333") {
id fullName email role
orders { id status createdOn closedOn amountNetCharge amountNetRevenue offerSnapshot { name } }
freeClaims { id acquiredOn offerSnapshot { name } }
}
}
{
"data": {
"studentById": {
"id": "33333333-3333-4333-8333-333333333333",
"fullName": "Jamie Smith",
"email": "student@example.com",
"role": "student",
"orders": [
{
"id": "55555555-5555-4555-8555-555555555555",
"status": "succeeded",
"createdOn": 1788220800000,
"closedOn": 1788224400000,
"amountNetCharge": 80.0,
"amountNetRevenue": 80.0,
"offerSnapshot": {
"name": "Drawing Essentials"
}
}
],
"freeClaims": [
{
"id": "44444444-4444-4444-8444-444444444444",
"acquiredOn": 1788220800000,
"offerSnapshot": {
"name": "Drawing Essentials"
}
}
]
}
}
}
Read paid Orders and free Offer acquisitions for one Student.
{
studentById(studentId: "33333333-3333-4333-8333-333333333333") {
id fullName email role
orders { id status createdOn closedOn amountNetCharge amountNetRevenue offerSnapshot { name } }
freeClaims { id acquiredOn offerSnapshot { name } }
}
}
{
"data": {
"studentById": {
"id": "33333333-3333-4333-8333-333333333333",
"fullName": "Jamie Smith",
"email": "student@example.com",
"role": "student",
"orders": [
{
"id": "55555555-5555-4555-8555-555555555555",
"status": "succeeded",
"createdOn": 1788220800000,
"closedOn": 1788224400000,
"amountNetCharge": 80.0,
"amountNetRevenue": 80.0,
"offerSnapshot": {
"name": "Drawing Essentials"
}
}
],
"freeClaims": [
{
"id": "44444444-4444-4444-8444-444444444444",
"acquiredOn": 1788220800000,
"offerSnapshot": {
"name": "Drawing Essentials"
}
}
]
}
}
}
{
studentById(studentId: "33333333-3333-4333-8333-333333333333") {
id fullName email role
orders { id status createdOn closedOn amountNetCharge amountNetRevenue offerSnapshot { name } }
freeClaims { id acquiredOn offerSnapshot { name } }
}
}
{
"data": {
"studentById": {
"id": "33333333-3333-4333-8333-333333333333",
"fullName": "Jamie Smith",
"email": "student@example.com",
"role": "student",
"orders": [
{
"id": "55555555-5555-4555-8555-555555555555",
"status": "succeeded",
"createdOn": 1788220800000,
"closedOn": 1788224400000,
"amountNetCharge": 80.0,
"amountNetRevenue": 80.0,
"offerSnapshot": {
"name": "Drawing Essentials"
}
}
],
"freeClaims": [
{
"id": "44444444-4444-4444-8444-444444444444",
"acquiredOn": 1788220800000,
"offerSnapshot": {
"name": "Drawing Essentials"
}
}
]
}
}
}
const student = response.data.studentById;
const rows = [
...student.orders
.filter(order => ["succeeded", "refunded", "disputed"].includes(order.status))
.map(order => ({
kind: "order", id: order.id, date: order.closedOn, status: order.status,
offer: order.offerSnapshot.name, amountCharged: order.amountNetCharge,
retainedRevenue: order.amountNetRevenue
})),
...student.freeClaims.map(claim => ({
kind: "freeClaim", id: claim.id, date: claim.acquiredOn,
offer: claim.offerSnapshot.name, amountCharged: 0, retainedRevenue: 0
}))
].sort((a, b) => (b.date ?? 0) - (a.date ?? 0));
role field distinguishes Students from Administrators.Was this page helpful?
