Meet Toki Operator

Docs/Manage API

Loyalty groups

Shared wallets for clubs and teams: groups, members, invitations and Shopify B2B companies.

A loyalty group is a shared wallet for a club, team or Shopify B2B company. Its balance sits on a master account; admins send points from it to members, who can also donate points or ask for them in the wallet. Segments can use a loyalty group condition, so Toki rechecks them when someone joins or leaves a group.

Operations6 queries · 11 mutations
query

loyaltyGroups#

Lists all your loyalty groups, active and archived, newest first. Their invitations and integration are null here; get them with loyaltyGroup.

Returns

[TokiLoyaltyGroup!]!

A shared wallet for a club, team or Shopify B2B company, whose admins send points from the group balance to its members.

  • idID!

    Pass it as groupId to the other loyalty group operations.

  • nameString!
  • statusTokiLoyaltyGroupStatus!

    ARCHIVED once you archive the group. An archived group keeps its balance and members, but its membership, roles and invitations can no longer change, and transfers, donations and point requests stop.

    ACTIVEARCHIVED
  • masterUserIdID!

    The ID of the group's master account, the member record that holds the group balance. users leaves it out unless you pass includeHidden.

  • tokenIdID!

    The ID of the balance the group wallet holds, such as your points (TokiUserBalance.id).

  • tokenNameString

    The name of the tokenId balance.

  • tokenSymbolString

    The symbol of the tokenId balance, if it has one.

  • settingsTokiLoyaltyGroupSettings!

    Who can find and join the group, and whether members can ask it for points (allowPointRequests). With visibility PUBLIC, the group is listed in the wallet for customers to find; joinPolicy decides whether they join right away (OPEN), once an admin accepts their request (APPROVAL_REQUIRED) or only by invitation (INVITE_ONLY).

  • masterBalanceFloat!

    The group balance in points: what the master account holds of tokenId.

  • masterBalanceDisplayString!

    masterBalance formatted for display, such as 1,000 Points or $10.00, following the balance's display settings.

  • createdAtString!
  • updatedAtString!
  • invitations[TokiLoyaltyGroupInvitations!]

    Every invitation to the group, newest first, whatever its status. null in loyaltyGroups.

  • integrationTokiLoyaltyGroupIntegration

    The group's link to a Shopify B2B company in the current store, or null if there is none. Always null in loyaltyGroups.

query LoyaltyGroups {
  loyaltyGroups {
    id
    name
    status
    masterUserId
    tokenId
    tokenName
    createdAt
    settings {
      allowPointRequests
      visibility
      joinPolicy
    }
  }
}
Response
{
  "data": {
    "loyaltyGroups": [
      {
        "id": "a9b3e59e-aab3-4731-a7b3-e278a8b3e40b",
        "name": "Gold",
        "status": "ACTIVE",
        "masterUserId": "5191de5b-5091-4cc8-a391-e1815291dfee",
        "tokenId": "09616e19-0861-4c86-a761-6af306616960",
        "tokenName": "Token name",
        "createdAt": "2026-10-14T09:30:00.000Z",
        "settings": {
          "allowPointRequests": true,
          "visibility": "PUBLIC",
          "joinPolicy": "OPEN"
        }
      }
    ]
  }
}
query

loyaltyGroup#

Returns a group with its invitations and its Shopify company link in the current store. List its members with loyaltyGroupMembers.

Arguments

  • groupIdID!Required

    The loyalty group (TokiLoyaltyGroup.id).

Returns

TokiLoyaltyGroup!

A shared wallet for a club, team or Shopify B2B company, whose admins send points from the group balance to its members.

  • idID!

    Pass it as groupId to the other loyalty group operations.

  • nameString!
  • statusTokiLoyaltyGroupStatus!

    ARCHIVED once you archive the group. An archived group keeps its balance and members, but its membership, roles and invitations can no longer change, and transfers, donations and point requests stop.

    ACTIVEARCHIVED
  • masterUserIdID!

    The ID of the group's master account, the member record that holds the group balance. users leaves it out unless you pass includeHidden.

  • tokenIdID!

    The ID of the balance the group wallet holds, such as your points (TokiUserBalance.id).

  • tokenNameString

    The name of the tokenId balance.

  • tokenSymbolString

    The symbol of the tokenId balance, if it has one.

  • settingsTokiLoyaltyGroupSettings!

    Who can find and join the group, and whether members can ask it for points (allowPointRequests). With visibility PUBLIC, the group is listed in the wallet for customers to find; joinPolicy decides whether they join right away (OPEN), once an admin accepts their request (APPROVAL_REQUIRED) or only by invitation (INVITE_ONLY).

  • masterBalanceFloat!

    The group balance in points: what the master account holds of tokenId.

  • masterBalanceDisplayString!

    masterBalance formatted for display, such as 1,000 Points or $10.00, following the balance's display settings.

  • createdAtString!
  • updatedAtString!
  • invitations[TokiLoyaltyGroupInvitations!]

    Every invitation to the group, newest first, whatever its status. null in loyaltyGroups.

  • integrationTokiLoyaltyGroupIntegration

    The group's link to a Shopify B2B company in the current store, or null if there is none. Always null in loyaltyGroups.

query LoyaltyGroup($groupId: ID!) {
  loyaltyGroup(groupId: $groupId) {
    id
    name
    status
    masterUserId
    tokenId
    tokenName
    createdAt
    settings {
      allowPointRequests
      visibility
      joinPolicy
    }
  }
}
Variables
{
  "groupId": "fb71737a-fc71-450d-a971-7054fa7171e7"
}
Response
{
  "data": {
    "loyaltyGroup": {
      "id": "c6dde89d-c5dd-470a-a4dd-e577c3dde3e4",
      "name": "Gold",
      "status": "ACTIVE",
      "masterUserId": "3945d774-3a45-4907-ab45-da9a3c45dc2d",
      "tokenId": "fc3fc1a0-fd3f-4333-ae3f-c4c6ff3fc659",
      "tokenName": "Token name",
      "createdAt": "2026-10-14T09:30:00.000Z",
      "settings": {
        "allowPointRequests": true,
        "visibility": "PUBLIC",
        "joinPolicy": "OPEN"
      }
    }
  }
}

loyaltyGroupMembers#

Lists a group's current members: admins first, then members, each in the order they joined. Removed members aren't included.

Arguments

  • groupIdID!Required

    The loyalty group (TokiLoyaltyGroup.id).

  • searchString

    Text in the member's email, name, first name or last name; up to 200 characters.

  • roleTokiLoyaltyGroupRole

    Only members with this role.

    ADMINMEMBER

Returns

TokiLoyaltyGroupMemberConnection!

A page of TokiLoyaltyGroupMember in nodes, with pageInfo for the next page. Each item:

A member of a loyalty group.

  • idID!

    The ID of this membership in the group. Operations on members take userId instead.

  • userIdID!

    The member's TokiUser.id.

  • emailString
  • nameString
  • roleTokiLoyaltyGroupRole!

    A member's role in a loyalty group. Admins (ADMIN) manage the group in the wallet, such as sending points from the group balance; only members with the MEMBER role can ask the group for points.

    ADMINMEMBER
  • statusTokiLoyaltyGroupMemberStatus!

    Always ACTIVE: loyaltyGroupMembers leaves out members who were removed.

    ACTIVEREMOVED
  • balanceFloat!

    The member's own balance of the group's tokenId, in points, including points from outside the group.

  • balanceDisplayString!

    balance formatted for display, such as 1,000 Points or $10.00.

  • joinedAtString!
  • removedAtString

    Always null: loyaltyGroupMembers leaves out members who were removed.

query LoyaltyGroupMembers($groupId: ID!, $first: Int) {
  loyaltyGroupMembers(groupId: $groupId, first: $first) {
    nodes {
      id
      email
      name
      status
    }
    pageInfo {
      hasNextPage
      endCursor
    }
  }
}
Variables
{
  "groupId": "758b0b39-748b-49a6-a38b-0813728b0680",
  "first": 10
}
Response
{
  "data": {
    "loyaltyGroupMembers": {
      "nodes": [
        {
          "id": "38d5492f-37d5-479c-aad5-4c5539d54ac2",
          "email": "anna@example.com",
          "name": "Anna Petrova",
          "status": "ACTIVE"
        }
      ],
      "pageInfo": {
        "hasNextPage": true,
        "endCursor": "Y3Vyc29yOjE5"
      }
    }
  }
}

loyaltyGroupTransfers#

Lists the points that moved through a group's wallet, newest first: points admins sent to members, approved point requests and donations to the group. Pending and declined point requests aren't included.

Arguments

  • groupIdID!Required

    The loyalty group (TokiLoyaltyGroup.id).

Returns

TokiLoyaltyGroupTransferConnection!

A page of TokiLoyaltyGroupTransfer in nodes, with pageInfo for the next page. Each item:

Points that moved between a loyalty group's wallet and one of its members.

  • idID!
  • recipientUserIdID!

    Who received the points: the member, or the group's master account for a donation.

  • recipientEmailString

    The recipient's email; null for a donation.

  • recipientNameString

    The member's name, or the group's name for a donation.

  • actorUserIdID

    Who moved the points: the admin who sent them or approved the request, or the member who donated them.

  • actorEmailString

    The email of actorUserId.

  • actorNameString

    The name of actorUserId.

  • tokenIdID!

    The balance the points moved in.

  • amountFloat!

    The points moved; always positive.

  • amountDisplayString!

    amount formatted for display, such as 1,000 Points or $10.00.

  • createdAtString!

    When the points moved; for a point request, when an admin approved it.

query LoyaltyGroupTransfers($groupId: ID!, $first: Int) {
  loyaltyGroupTransfers(groupId: $groupId, first: $first) {
    nodes {
      id
      recipientUserId
      amount
      createdAt
    }
    pageInfo {
      hasNextPage
      endCursor
    }
  }
}
Variables
{
  "groupId": "accdbcaa-adcd-4e3d-aacd-b984abcdbb17",
  "first": 10
}
Response
{
  "data": {
    "loyaltyGroupTransfers": {
      "nodes": [
        {
          "id": "86948540-8794-46d3-a894-8866899489f9",
          "recipientUserId": "ba7852d2-bb78-4465-a878-4facb978513f",
          "amount": 49.99,
          "createdAt": "2026-10-14T09:30:00.000Z"
        }
      ],
      "pageInfo": {
        "hasNextPage": true,
        "endCursor": "Y3Vyc29yOjE5"
      }
    }
  }
}
query

shopifyCompanies#

Lists up to 100 B2B companies in the current Shopify store, to link one to a group with loyaltyGroupIntegrationConnect. Returns an empty list if the current store isn't on Shopify.

Arguments

  • queryString

    Filters companies by name. Each word you enter matches as a prefix.

Returns

[TokiShopifyCompaniesPayload!]!

A B2B company in your Shopify store.

  • idString!

    The company's Shopify GID, such as gid://shopify/Company/123. Pass it as companyId.

  • nameString!
  • externalIdString

    The company's external ID in Shopify, or null if it has none.

query ShopifyCompanies {
  shopifyCompanies {
    id
    name
    externalId
  }
}
Response
{
  "data": {
    "shopifyCompanies": [
      {
        "id": "ea1cbe37-e91c-4ca4-ac1c-c15deb1cbfca",
        "name": "Gold",
        "externalId": "99514758-9a51-48eb-ab51-4a7e9c514c11"
      }
    ]
  }
}
query

loyaltyGroupIntegrationIssues#

Lists members Toki couldn't add to the group's Shopify company in the current store, with the error. Returns at most the 6 most recent.

Arguments

  • groupIdID!Required

    The loyalty group (TokiLoyaltyGroup.id).

Returns

[TokiLoyaltyGroupIntegrationIssuesPayload!]!

A member Toki couldn't add to a group's Shopify company.

  • idID!
  • userIdID!

    The member.

  • emailString
  • nameString
  • messageString

    Why the sync failed, for example a missing email.

  • updatedAtString!

    When the sync failed.

query LoyaltyGroupIntegrationIssues($groupId: ID!) {
  loyaltyGroupIntegrationIssues(groupId: $groupId) {
    id
    userId
    email
    name
    message
    updatedAt
  }
}
Variables
{
  "groupId": "fe22edc4-ff22-4f57-a022-f0ea0122f27d"
}
Response
{
  "data": {
    "loyaltyGroupIntegrationIssues": [
      {
        "id": "6c034185-6b03-4ff2-aa03-3e5f69033ccc",
        "userId": "36ede512-37ed-46a5-a4ed-e1ec35ede37f",
        "email": "anna@example.com",
        "name": "Gold",
        "message": "Message",
        "updatedAt": "2026-10-14T09:30:00.000Z"
      }
    ]
  }
}
mutation

loyaltyGroupCreate#

Creates a group, with a master account that holds its balance, and invites initialAdminEmail to be its first admin as loyaltyGroupInvite does. Settings you leave out default to PRIVATE, INVITE_ONLY and no point requests.

Input

TokiLoyaltyGroupCreateInput!
  • nameString!Required

    The group's name, up to 120 characters.

  • tokenIdString!Required

    The store credit the group wallet holds (TokiUserBalance.id): one of your store credits.

  • initialAdminEmailString!Required

    The email address Toki invites as the group's first admin. They join the group once they accept in the wallet.

  • settingsTokiLoyaltyGroupSettingsInput

    Who can find and join a loyalty group, and whether its members can ask it for points. Settings you leave out default to PRIVATE, INVITE_ONLY and no point requests.

Returns

TokiLoyaltyGroup!

A shared wallet for a club, team or Shopify B2B company, whose admins send points from the group balance to its members.

  • idID!

    Pass it as groupId to the other loyalty group operations.

  • nameString!
  • statusTokiLoyaltyGroupStatus!

    ARCHIVED once you archive the group. An archived group keeps its balance and members, but its membership, roles and invitations can no longer change, and transfers, donations and point requests stop.

    ACTIVEARCHIVED
  • masterUserIdID!

    The ID of the group's master account, the member record that holds the group balance. users leaves it out unless you pass includeHidden.

  • tokenIdID!

    The ID of the balance the group wallet holds, such as your points (TokiUserBalance.id).

  • tokenNameString

    The name of the tokenId balance.

  • tokenSymbolString

    The symbol of the tokenId balance, if it has one.

  • settingsTokiLoyaltyGroupSettings!

    Who can find and join the group, and whether members can ask it for points (allowPointRequests). With visibility PUBLIC, the group is listed in the wallet for customers to find; joinPolicy decides whether they join right away (OPEN), once an admin accepts their request (APPROVAL_REQUIRED) or only by invitation (INVITE_ONLY).

  • masterBalanceFloat!

    The group balance in points: what the master account holds of tokenId.

  • masterBalanceDisplayString!

    masterBalance formatted for display, such as 1,000 Points or $10.00, following the balance's display settings.

  • createdAtString!
  • updatedAtString!
  • invitations[TokiLoyaltyGroupInvitations!]

    Every invitation to the group, newest first, whatever its status. null in loyaltyGroups.

  • integrationTokiLoyaltyGroupIntegration

    The group's link to a Shopify B2B company in the current store, or null if there is none. Always null in loyaltyGroups.

mutation LoyaltyGroupCreate($input: TokiLoyaltyGroupCreateInput!) {
  loyaltyGroupCreate(input: $input) {
    id
    name
    status
    masterUserId
    tokenId
    tokenName
    createdAt
    settings {
      allowPointRequests
      visibility
      joinPolicy
    }
  }
}
Variables
{
  "input": {
    "name": "Gold",
    "tokenId": "1b199606-1c19-4799-a919-92e01a199473",
    "initialAdminEmail": "anna@example.com"
  }
}
Response
{
  "data": {
    "loyaltyGroupCreate": {
      "id": "310f1539-300f-43a6-af0f-12132e0f1080",
      "name": "Gold",
      "status": "ACTIVE",
      "masterUserId": "4feb0a88-50eb-4c1b-a1eb-0dae52eb0f41",
      "tokenId": "cc384374-cd38-4507-ae38-469acf38482d",
      "tokenName": "Token name",
      "createdAt": "2026-10-14T09:30:00.000Z",
      "settings": {
        "allowPointRequests": true,
        "visibility": "PUBLIC",
        "joinPolicy": "OPEN"
      }
    }
  }
}
mutation

loyaltyGroupUpdate#

Updates a group's name, settings or the balance its wallet holds (tokenId). Anything you leave out stays as it is, including individual settings. You can change tokenId only while the group balance is zero. Archived groups are read-only; updating one returns CONFLICT.

Input

TokiLoyaltyGroupUpdateInput!
  • groupIdString!Required

    The loyalty group (TokiLoyaltyGroup.id).

  • nameString

    The group's new name, up to 120 characters.

  • tokenIdString

    The store credit the group wallet holds (TokiUserBalance.id). Changing it needs a group balance of zero.

  • settingsTokiLoyaltyGroupUpdateSettingsInput

    Only the settings you send change.

Returns

TokiLoyaltyGroup!

A shared wallet for a club, team or Shopify B2B company, whose admins send points from the group balance to its members.

  • idID!

    Pass it as groupId to the other loyalty group operations.

  • nameString!
  • statusTokiLoyaltyGroupStatus!

    ARCHIVED once you archive the group. An archived group keeps its balance and members, but its membership, roles and invitations can no longer change, and transfers, donations and point requests stop.

    ACTIVEARCHIVED
  • masterUserIdID!

    The ID of the group's master account, the member record that holds the group balance. users leaves it out unless you pass includeHidden.

  • tokenIdID!

    The ID of the balance the group wallet holds, such as your points (TokiUserBalance.id).

  • tokenNameString

    The name of the tokenId balance.

  • tokenSymbolString

    The symbol of the tokenId balance, if it has one.

  • settingsTokiLoyaltyGroupSettings!

    Who can find and join the group, and whether members can ask it for points (allowPointRequests). With visibility PUBLIC, the group is listed in the wallet for customers to find; joinPolicy decides whether they join right away (OPEN), once an admin accepts their request (APPROVAL_REQUIRED) or only by invitation (INVITE_ONLY).

  • masterBalanceFloat!

    The group balance in points: what the master account holds of tokenId.

  • masterBalanceDisplayString!

    masterBalance formatted for display, such as 1,000 Points or $10.00, following the balance's display settings.

  • createdAtString!
  • updatedAtString!
  • invitations[TokiLoyaltyGroupInvitations!]

    Every invitation to the group, newest first, whatever its status. null in loyaltyGroups.

  • integrationTokiLoyaltyGroupIntegration

    The group's link to a Shopify B2B company in the current store, or null if there is none. Always null in loyaltyGroups.

mutation LoyaltyGroupUpdate($input: TokiLoyaltyGroupUpdateInput!) {
  loyaltyGroupUpdate(input: $input) {
    id
    name
    status
    masterUserId
    tokenId
    tokenName
    createdAt
    settings {
      allowPointRequests
      visibility
      joinPolicy
    }
  }
}
Variables
{
  "input": {
    "groupId": "f8d29309-f7d2-4176-a6d2-8fe3f5d28e50",
    "name": "Gold",
    "tokenId": "c0c5513b-bfc5-4fa8-a2c5-5461c1c552ce"
  }
}
Response
{
  "data": {
    "loyaltyGroupUpdate": {
      "id": "35f94b3a-36f9-4ccd-a3f9-481434f949a7",
      "name": "Gold",
      "status": "ACTIVE",
      "masterUserId": "6db3727f-6cb3-40ec-afb3-75a56eb37412",
      "tokenId": "ee4e679d-ed4e-460a-ac4e-6477eb4e62e4",
      "tokenName": "Token name",
      "createdAt": "2026-10-14T09:30:00.000Z",
      "settings": {
        "allowPointRequests": true,
        "visibility": "PUBLIC",
        "joinPolicy": "OPEN"
      }
    }
  }
}
mutation

loyaltyGroupArchive#

Archives a group. It keeps its balance and members, but its membership, roles and invitations can no longer change, and transfers, donations and point requests stop. Archiving can't be undone through the API. Archiving an already archived group returns CONFLICT.

Input

TokiLoyaltyGroupArchiveInput!
  • groupIdID!Required

    The loyalty group (TokiLoyaltyGroup.id).

Returns

TokiLoyaltyGroup!

A shared wallet for a club, team or Shopify B2B company, whose admins send points from the group balance to its members.

  • idID!

    Pass it as groupId to the other loyalty group operations.

  • nameString!
  • statusTokiLoyaltyGroupStatus!

    ARCHIVED once you archive the group. An archived group keeps its balance and members, but its membership, roles and invitations can no longer change, and transfers, donations and point requests stop.

    ACTIVEARCHIVED
  • masterUserIdID!

    The ID of the group's master account, the member record that holds the group balance. users leaves it out unless you pass includeHidden.

  • tokenIdID!

    The ID of the balance the group wallet holds, such as your points (TokiUserBalance.id).

  • tokenNameString

    The name of the tokenId balance.

  • tokenSymbolString

    The symbol of the tokenId balance, if it has one.

  • settingsTokiLoyaltyGroupSettings!

    Who can find and join the group, and whether members can ask it for points (allowPointRequests). With visibility PUBLIC, the group is listed in the wallet for customers to find; joinPolicy decides whether they join right away (OPEN), once an admin accepts their request (APPROVAL_REQUIRED) or only by invitation (INVITE_ONLY).

  • masterBalanceFloat!

    The group balance in points: what the master account holds of tokenId.

  • masterBalanceDisplayString!

    masterBalance formatted for display, such as 1,000 Points or $10.00, following the balance's display settings.

  • createdAtString!
  • updatedAtString!
  • invitations[TokiLoyaltyGroupInvitations!]

    Every invitation to the group, newest first, whatever its status. null in loyaltyGroups.

  • integrationTokiLoyaltyGroupIntegration

    The group's link to a Shopify B2B company in the current store, or null if there is none. Always null in loyaltyGroups.

mutation LoyaltyGroupArchive($input: TokiLoyaltyGroupArchiveInput!) {
  loyaltyGroupArchive(input: $input) {
    id
    name
    status
    masterUserId
    tokenId
    tokenName
    createdAt
    settings {
      allowPointRequests
      visibility
      joinPolicy
    }
  }
}
Variables
{
  "input": {
    "groupId": "ea007aa6-eb00-4c39-a800-7780e9007913"
  }
}
Response
{
  "data": {
    "loyaltyGroupArchive": {
      "id": "f9259f47-f825-4db4-ab25-a26dfa25a0da",
      "name": "Gold",
      "status": "ACTIVE",
      "masterUserId": "145aa90e-155a-4aa1-a25a-a5e8135aa77b",
      "tokenId": "427c61e2-437c-4375-a07c-5ebc417c604f",
      "tokenName": "Token name",
      "createdAt": "2026-10-14T09:30:00.000Z",
      "settings": {
        "allowPointRequests": true,
        "visibility": "PUBLIC",
        "joinPolicy": "OPEN"
      }
    }
  }
}
mutation

loyaltyGroupInvite#

Invites an email address to the group as MEMBER or ADMIN, creating a member in the current store if there isn't one. The invitation is valid for 7 days; inviting the same email again updates its pending invitation and restarts the 7 days. The customer accepts or declines it in the wallet, and Toki sends a Toki Loyalty Group Invitation Sent event to your connected integrations, such as Klaviyo.

Input

TokiLoyaltyGroupInviteInput!
  • groupIdString!Required

    The loyalty group (TokiLoyaltyGroup.id).

  • emailString!Required
  • roleTokiLoyaltyGroupRole!Required

    The role the customer gets when they accept.

    ADMINMEMBER

Returns

TokiLoyaltyGroup!

A shared wallet for a club, team or Shopify B2B company, whose admins send points from the group balance to its members.

  • idID!

    Pass it as groupId to the other loyalty group operations.

  • nameString!
  • statusTokiLoyaltyGroupStatus!

    ARCHIVED once you archive the group. An archived group keeps its balance and members, but its membership, roles and invitations can no longer change, and transfers, donations and point requests stop.

    ACTIVEARCHIVED
  • masterUserIdID!

    The ID of the group's master account, the member record that holds the group balance. users leaves it out unless you pass includeHidden.

  • tokenIdID!

    The ID of the balance the group wallet holds, such as your points (TokiUserBalance.id).

  • tokenNameString

    The name of the tokenId balance.

  • tokenSymbolString

    The symbol of the tokenId balance, if it has one.

  • settingsTokiLoyaltyGroupSettings!

    Who can find and join the group, and whether members can ask it for points (allowPointRequests). With visibility PUBLIC, the group is listed in the wallet for customers to find; joinPolicy decides whether they join right away (OPEN), once an admin accepts their request (APPROVAL_REQUIRED) or only by invitation (INVITE_ONLY).

  • masterBalanceFloat!

    The group balance in points: what the master account holds of tokenId.

  • masterBalanceDisplayString!

    masterBalance formatted for display, such as 1,000 Points or $10.00, following the balance's display settings.

  • createdAtString!
  • updatedAtString!
  • invitations[TokiLoyaltyGroupInvitations!]

    Every invitation to the group, newest first, whatever its status. null in loyaltyGroups.

  • integrationTokiLoyaltyGroupIntegration

    The group's link to a Shopify B2B company in the current store, or null if there is none. Always null in loyaltyGroups.

mutation LoyaltyGroupInvite($input: TokiLoyaltyGroupInviteInput!) {
  loyaltyGroupInvite(input: $input) {
    id
    name
    status
    masterUserId
    tokenId
    tokenName
    createdAt
    settings {
      allowPointRequests
      visibility
      joinPolicy
    }
  }
}
Variables
{
  "input": {
    "groupId": "73cc5811-72cc-467e-a1cc-54eb70cc5358",
    "email": "anna@example.com",
    "role": "ADMIN"
  }
}
Response
{
  "data": {
    "loyaltyGroupInvite": {
      "id": "a7ee07f2-a8ee-4985-a5ee-04cca6ee065f",
      "name": "Gold",
      "status": "ACTIVE",
      "masterUserId": "3b71fbc7-3a71-4a34-ad71-feed3c71fd5a",
      "tokenId": "374f8d15-364f-4b82-a54f-89ef344f885c",
      "tokenName": "Token name",
      "createdAt": "2026-10-14T09:30:00.000Z",
      "settings": {
        "allowPointRequests": true,
        "visibility": "PUBLIC",
        "joinPolicy": "OPEN"
      }
    }
  }
}
mutation

loyaltyGroupInvitationRevoke#

Revokes a pending invitation, so the customer can no longer accept it.

Input

TokiLoyaltyGroupInvitationRevokeInput!
  • invitationIdString!Required

    The invitation's ID, from TokiLoyaltyGroup.invitations.

Returns

TokiLoyaltyGroup!

A shared wallet for a club, team or Shopify B2B company, whose admins send points from the group balance to its members.

  • idID!

    Pass it as groupId to the other loyalty group operations.

  • nameString!
  • statusTokiLoyaltyGroupStatus!

    ARCHIVED once you archive the group. An archived group keeps its balance and members, but its membership, roles and invitations can no longer change, and transfers, donations and point requests stop.

    ACTIVEARCHIVED
  • masterUserIdID!

    The ID of the group's master account, the member record that holds the group balance. users leaves it out unless you pass includeHidden.

  • tokenIdID!

    The ID of the balance the group wallet holds, such as your points (TokiUserBalance.id).

  • tokenNameString

    The name of the tokenId balance.

  • tokenSymbolString

    The symbol of the tokenId balance, if it has one.

  • settingsTokiLoyaltyGroupSettings!

    Who can find and join the group, and whether members can ask it for points (allowPointRequests). With visibility PUBLIC, the group is listed in the wallet for customers to find; joinPolicy decides whether they join right away (OPEN), once an admin accepts their request (APPROVAL_REQUIRED) or only by invitation (INVITE_ONLY).

  • masterBalanceFloat!

    The group balance in points: what the master account holds of tokenId.

  • masterBalanceDisplayString!

    masterBalance formatted for display, such as 1,000 Points or $10.00, following the balance's display settings.

  • createdAtString!
  • updatedAtString!
  • invitations[TokiLoyaltyGroupInvitations!]

    Every invitation to the group, newest first, whatever its status. null in loyaltyGroups.

  • integrationTokiLoyaltyGroupIntegration

    The group's link to a Shopify B2B company in the current store, or null if there is none. Always null in loyaltyGroups.

mutation LoyaltyGroupInvitationRevoke($input: TokiLoyaltyGroupInvitationRevokeInput!) {
  loyaltyGroupInvitationRevoke(input: $input) {
    id
    name
    status
    masterUserId
    tokenId
    tokenName
    createdAt
    settings {
      allowPointRequests
      visibility
      joinPolicy
    }
  }
}
Variables
{
  "input": {
    "invitationId": "d927ac03-d827-4a70-ab27-af29da27ad96"
  }
}
Response
{
  "data": {
    "loyaltyGroupInvitationRevoke": {
      "id": "9b44b68e-9c44-4821-a944-b3689a44b4fb",
      "name": "Gold",
      "status": "ACTIVE",
      "masterUserId": "86f4d84b-85f4-46b8-a8f4-db7187f4d9de",
      "tokenId": "86588e89-8558-4cf6-a458-8b63835889d0",
      "tokenName": "Token name",
      "createdAt": "2026-10-14T09:30:00.000Z",
      "settings": {
        "allowPointRequests": true,
        "visibility": "PUBLIC",
        "joinPolicy": "OPEN"
      }
    }
  }
}
mutation

loyaltyGroupInvitationResend#

Sends an invitation again: it's valid for another 7 days, and Toki sends the Toki Loyalty Group Invitation Sent event again. If the invitation is no longer pending, Toki creates a new one for the same email and role.

Input

TokiLoyaltyGroupInvitationResendInput!
  • invitationIdString!Required

    The invitation's ID, from TokiLoyaltyGroup.invitations.

Returns

TokiLoyaltyGroup!

A shared wallet for a club, team or Shopify B2B company, whose admins send points from the group balance to its members.

  • idID!

    Pass it as groupId to the other loyalty group operations.

  • nameString!
  • statusTokiLoyaltyGroupStatus!

    ARCHIVED once you archive the group. An archived group keeps its balance and members, but its membership, roles and invitations can no longer change, and transfers, donations and point requests stop.

    ACTIVEARCHIVED
  • masterUserIdID!

    The ID of the group's master account, the member record that holds the group balance. users leaves it out unless you pass includeHidden.

  • tokenIdID!

    The ID of the balance the group wallet holds, such as your points (TokiUserBalance.id).

  • tokenNameString

    The name of the tokenId balance.

  • tokenSymbolString

    The symbol of the tokenId balance, if it has one.

  • settingsTokiLoyaltyGroupSettings!

    Who can find and join the group, and whether members can ask it for points (allowPointRequests). With visibility PUBLIC, the group is listed in the wallet for customers to find; joinPolicy decides whether they join right away (OPEN), once an admin accepts their request (APPROVAL_REQUIRED) or only by invitation (INVITE_ONLY).

  • masterBalanceFloat!

    The group balance in points: what the master account holds of tokenId.

  • masterBalanceDisplayString!

    masterBalance formatted for display, such as 1,000 Points or $10.00, following the balance's display settings.

  • createdAtString!
  • updatedAtString!
  • invitations[TokiLoyaltyGroupInvitations!]

    Every invitation to the group, newest first, whatever its status. null in loyaltyGroups.

  • integrationTokiLoyaltyGroupIntegration

    The group's link to a Shopify B2B company in the current store, or null if there is none. Always null in loyaltyGroups.

mutation LoyaltyGroupInvitationResend($input: TokiLoyaltyGroupInvitationResendInput!) {
  loyaltyGroupInvitationResend(input: $input) {
    id
    name
    status
    masterUserId
    tokenId
    tokenName
    createdAt
    settings {
      allowPointRequests
      visibility
      joinPolicy
    }
  }
}
Variables
{
  "input": {
    "invitationId": "ec7b5264-ed7b-43f7-ae7b-558aef7b571d"
  }
}
Response
{
  "data": {
    "loyaltyGroupInvitationResend": {
      "id": "73d6d429-72d6-4296-a1d6-d10370d6cf70",
      "name": "Gold",
      "status": "ACTIVE",
      "masterUserId": "5dc7e978-5ec7-4b0b-afc7-ec9e60c7ee31",
      "tokenId": "71eb5164-72eb-42f7-a3eb-548a74eb561d",
      "tokenName": "Token name",
      "createdAt": "2026-10-14T09:30:00.000Z",
      "settings": {
        "allowPointRequests": true,
        "visibility": "PUBLIC",
        "joinPolicy": "OPEN"
      }
    }
  }
}
mutation

loyaltyGroupMemberRole#

Changes a member's role. Admins manage the group from their wallet: they send points from the group balance, review point and join requests, and invite and remove members. A group keeps at least one admin, and roles don't sync to a linked Shopify company.

Input

TokiLoyaltyGroupMemberRoleInput!
  • groupIdString!Required

    The loyalty group (TokiLoyaltyGroup.id).

  • userIdString!Required

    The member's ID (TokiLoyaltyGroupMember.userId), not the membership id.

  • roleTokiLoyaltyGroupRole!Required

    A member's role in a loyalty group. Admins (ADMIN) manage the group in the wallet, such as sending points from the group balance; only members with the MEMBER role can ask the group for points.

    ADMINMEMBER

Returns

TokiLoyaltyGroup!

A shared wallet for a club, team or Shopify B2B company, whose admins send points from the group balance to its members.

  • idID!

    Pass it as groupId to the other loyalty group operations.

  • nameString!
  • statusTokiLoyaltyGroupStatus!

    ARCHIVED once you archive the group. An archived group keeps its balance and members, but its membership, roles and invitations can no longer change, and transfers, donations and point requests stop.

    ACTIVEARCHIVED
  • masterUserIdID!

    The ID of the group's master account, the member record that holds the group balance. users leaves it out unless you pass includeHidden.

  • tokenIdID!

    The ID of the balance the group wallet holds, such as your points (TokiUserBalance.id).

  • tokenNameString

    The name of the tokenId balance.

  • tokenSymbolString

    The symbol of the tokenId balance, if it has one.

  • settingsTokiLoyaltyGroupSettings!

    Who can find and join the group, and whether members can ask it for points (allowPointRequests). With visibility PUBLIC, the group is listed in the wallet for customers to find; joinPolicy decides whether they join right away (OPEN), once an admin accepts their request (APPROVAL_REQUIRED) or only by invitation (INVITE_ONLY).

  • masterBalanceFloat!

    The group balance in points: what the master account holds of tokenId.

  • masterBalanceDisplayString!

    masterBalance formatted for display, such as 1,000 Points or $10.00, following the balance's display settings.

  • createdAtString!
  • updatedAtString!
  • invitations[TokiLoyaltyGroupInvitations!]

    Every invitation to the group, newest first, whatever its status. null in loyaltyGroups.

  • integrationTokiLoyaltyGroupIntegration

    The group's link to a Shopify B2B company in the current store, or null if there is none. Always null in loyaltyGroups.

mutation LoyaltyGroupMemberRole($input: TokiLoyaltyGroupMemberRoleInput!) {
  loyaltyGroupMemberRole(input: $input) {
    id
    name
    status
    masterUserId
    tokenId
    tokenName
    createdAt
    settings {
      allowPointRequests
      visibility
      joinPolicy
    }
  }
}
Variables
{
  "input": {
    "groupId": "c80843c2-c908-4555-a608-409cc708422f",
    "userId": "5d9c0712-5e9c-48a5-ab9c-03ec5c9c057f",
    "role": "ADMIN"
  }
}
Response
{
  "data": {
    "loyaltyGroupMemberRole": {
      "id": "4e83a7b3-4d83-4620-a083-aad94f83a946",
      "name": "Gold",
      "status": "ACTIVE",
      "masterUserId": "d2d10f72-d3d1-4105-a0d1-0c4cd1d10ddf",
      "tokenId": "3e3a1646-3f3a-47d9-ac3a-13203d3a14b3",
      "tokenName": "Token name",
      "createdAt": "2026-10-14T09:30:00.000Z",
      "settings": {
        "allowPointRequests": true,
        "visibility": "PUBLIC",
        "joinPolicy": "OPEN"
      }
    }
  }
}
mutation

loyaltyGroupMemberRemove#

Removes a member from the group; points they already received stay in their balance. If the group is linked to a Shopify company, Toki also removes them from its contacts. You can't remove the group's last admin.

Input

TokiLoyaltyGroupMemberRemoveInput!
  • groupIdString!Required

    The loyalty group (TokiLoyaltyGroup.id).

  • userIdString!Required

    The member's ID (TokiLoyaltyGroupMember.userId), not the membership id.

Returns

TokiLoyaltyGroup!

A shared wallet for a club, team or Shopify B2B company, whose admins send points from the group balance to its members.

  • idID!

    Pass it as groupId to the other loyalty group operations.

  • nameString!
  • statusTokiLoyaltyGroupStatus!

    ARCHIVED once you archive the group. An archived group keeps its balance and members, but its membership, roles and invitations can no longer change, and transfers, donations and point requests stop.

    ACTIVEARCHIVED
  • masterUserIdID!

    The ID of the group's master account, the member record that holds the group balance. users leaves it out unless you pass includeHidden.

  • tokenIdID!

    The ID of the balance the group wallet holds, such as your points (TokiUserBalance.id).

  • tokenNameString

    The name of the tokenId balance.

  • tokenSymbolString

    The symbol of the tokenId balance, if it has one.

  • settingsTokiLoyaltyGroupSettings!

    Who can find and join the group, and whether members can ask it for points (allowPointRequests). With visibility PUBLIC, the group is listed in the wallet for customers to find; joinPolicy decides whether they join right away (OPEN), once an admin accepts their request (APPROVAL_REQUIRED) or only by invitation (INVITE_ONLY).

  • masterBalanceFloat!

    The group balance in points: what the master account holds of tokenId.

  • masterBalanceDisplayString!

    masterBalance formatted for display, such as 1,000 Points or $10.00, following the balance's display settings.

  • createdAtString!
  • updatedAtString!
  • invitations[TokiLoyaltyGroupInvitations!]

    Every invitation to the group, newest first, whatever its status. null in loyaltyGroups.

  • integrationTokiLoyaltyGroupIntegration

    The group's link to a Shopify B2B company in the current store, or null if there is none. Always null in loyaltyGroups.

mutation LoyaltyGroupMemberRemove($input: TokiLoyaltyGroupMemberRemoveInput!) {
  loyaltyGroupMemberRemove(input: $input) {
    id
    name
    status
    masterUserId
    tokenId
    tokenName
    createdAt
    settings {
      allowPointRequests
      visibility
      joinPolicy
    }
  }
}
Variables
{
  "input": {
    "groupId": "b3a174ae-b4a1-4641-a1a1-7188b2a1731b",
    "userId": "6c3f088e-6d3f-4a21-aa3f-05686b3f06fb"
  }
}
Response
{
  "data": {
    "loyaltyGroupMemberRemove": {
      "id": "f89b0f3f-f79b-4dac-aa9b-1265f99b10d2",
      "name": "Gold",
      "status": "ACTIVE",
      "masterUserId": "3cc0fad6-3dc0-4c69-aac0-f7b03bc0f943",
      "tokenId": "207a9bba-217a-4d4d-ae7a-98941f7a9a27",
      "tokenName": "Token name",
      "createdAt": "2026-10-14T09:30:00.000Z",
      "settings": {
        "allowPointRequests": true,
        "visibility": "PUBLIC",
        "joinPolicy": "OPEN"
      }
    }
  }
}
mutation

loyaltyGroupIntegrationConnect#

Links the group to a B2B company in the current Shopify store, replacing any company it was linked to there. In the background, Toki then keeps both in step: group members become company contacts, and company contacts, including existing ones, join the group as MEMBER or with the role of their pending invitation. Each customer can belong to groups linked to only one company per store.

Input

TokiLoyaltyGroupIntegrationConnectInput!
  • groupIdID!Required

    The loyalty group (TokiLoyaltyGroup.id).

  • companyIdString!Required

    The company's Shopify GID, as returned by shopifyCompanies.

  • companyNameString!Required

    The company's name, stored as externalName. Toki doesn't check it against Shopify.

Returns

TokiLoyaltyGroup!

A shared wallet for a club, team or Shopify B2B company, whose admins send points from the group balance to its members.

  • idID!

    Pass it as groupId to the other loyalty group operations.

  • nameString!
  • statusTokiLoyaltyGroupStatus!

    ARCHIVED once you archive the group. An archived group keeps its balance and members, but its membership, roles and invitations can no longer change, and transfers, donations and point requests stop.

    ACTIVEARCHIVED
  • masterUserIdID!

    The ID of the group's master account, the member record that holds the group balance. users leaves it out unless you pass includeHidden.

  • tokenIdID!

    The ID of the balance the group wallet holds, such as your points (TokiUserBalance.id).

  • tokenNameString

    The name of the tokenId balance.

  • tokenSymbolString

    The symbol of the tokenId balance, if it has one.

  • settingsTokiLoyaltyGroupSettings!

    Who can find and join the group, and whether members can ask it for points (allowPointRequests). With visibility PUBLIC, the group is listed in the wallet for customers to find; joinPolicy decides whether they join right away (OPEN), once an admin accepts their request (APPROVAL_REQUIRED) or only by invitation (INVITE_ONLY).

  • masterBalanceFloat!

    The group balance in points: what the master account holds of tokenId.

  • masterBalanceDisplayString!

    masterBalance formatted for display, such as 1,000 Points or $10.00, following the balance's display settings.

  • createdAtString!
  • updatedAtString!
  • invitations[TokiLoyaltyGroupInvitations!]

    Every invitation to the group, newest first, whatever its status. null in loyaltyGroups.

  • integrationTokiLoyaltyGroupIntegration

    The group's link to a Shopify B2B company in the current store, or null if there is none. Always null in loyaltyGroups.

mutation LoyaltyGroupIntegrationConnect($input: TokiLoyaltyGroupIntegrationConnectInput!) {
  loyaltyGroupIntegrationConnect(input: $input) {
    id
    name
    status
    masterUserId
    tokenId
    tokenName
    createdAt
    settings {
      allowPointRequests
      visibility
      joinPolicy
    }
  }
}
Variables
{
  "input": {
    "groupId": "2b42cd9c-2c42-4f2f-ad42-d0c22e42d255",
    "companyId": "cc6cd208-cd6c-439b-ae6c-d52ecf6cd6c1",
    "companyName": "Company name"
  }
}
Response
{
  "data": {
    "loyaltyGroupIntegrationConnect": {
      "id": "4ec1f28d-4dc1-40fa-acc1-ef674bc1edd4",
      "name": "Gold",
      "status": "ACTIVE",
      "masterUserId": "497f65a4-4a7f-4737-ab7f-68ca4c7f6a5d",
      "tokenId": "4a391850-4b39-49e3-ac39-1b764d391d09",
      "tokenName": "Token name",
      "createdAt": "2026-10-14T09:30:00.000Z",
      "settings": {
        "allowPointRequests": true,
        "visibility": "PUBLIC",
        "joinPolicy": "OPEN"
      }
    }
  }
}
mutation

loyaltyGroupIntegrationDisconnect#

Unlinks the group from its Shopify company in the current store. Toki stops syncing; the company, its contacts and the group's members stay as they are.

Input

TokiLoyaltyGroupIntegrationDisconnectInput!
  • groupIdID!Required

    The loyalty group (TokiLoyaltyGroup.id).

Returns

TokiLoyaltyGroup!

A shared wallet for a club, team or Shopify B2B company, whose admins send points from the group balance to its members.

  • idID!

    Pass it as groupId to the other loyalty group operations.

  • nameString!
  • statusTokiLoyaltyGroupStatus!

    ARCHIVED once you archive the group. An archived group keeps its balance and members, but its membership, roles and invitations can no longer change, and transfers, donations and point requests stop.

    ACTIVEARCHIVED
  • masterUserIdID!

    The ID of the group's master account, the member record that holds the group balance. users leaves it out unless you pass includeHidden.

  • tokenIdID!

    The ID of the balance the group wallet holds, such as your points (TokiUserBalance.id).

  • tokenNameString

    The name of the tokenId balance.

  • tokenSymbolString

    The symbol of the tokenId balance, if it has one.

  • settingsTokiLoyaltyGroupSettings!

    Who can find and join the group, and whether members can ask it for points (allowPointRequests). With visibility PUBLIC, the group is listed in the wallet for customers to find; joinPolicy decides whether they join right away (OPEN), once an admin accepts their request (APPROVAL_REQUIRED) or only by invitation (INVITE_ONLY).

  • masterBalanceFloat!

    The group balance in points: what the master account holds of tokenId.

  • masterBalanceDisplayString!

    masterBalance formatted for display, such as 1,000 Points or $10.00, following the balance's display settings.

  • createdAtString!
  • updatedAtString!
  • invitations[TokiLoyaltyGroupInvitations!]

    Every invitation to the group, newest first, whatever its status. null in loyaltyGroups.

  • integrationTokiLoyaltyGroupIntegration

    The group's link to a Shopify B2B company in the current store, or null if there is none. Always null in loyaltyGroups.

mutation LoyaltyGroupIntegrationDisconnect($input: TokiLoyaltyGroupIntegrationDisconnectInput!) {
  loyaltyGroupIntegrationDisconnect(input: $input) {
    id
    name
    status
    masterUserId
    tokenId
    tokenName
    createdAt
    settings {
      allowPointRequests
      visibility
      joinPolicy
    }
  }
}
Variables
{
  "input": {
    "groupId": "0ce6e1b8-0de6-434b-aee6-e4de0fe6e671"
  }
}
Response
{
  "data": {
    "loyaltyGroupIntegrationDisconnect": {
      "id": "bc260e29-bb26-4c96-aa26-0b03b9260970",
      "name": "Gold",
      "status": "ACTIVE",
      "masterUserId": "7339f378-7439-450b-a539-f69e7639f831",
      "tokenId": "555a7f64-565a-40f7-a75a-828a585a841d",
      "tokenName": "Token name",
      "createdAt": "2026-10-14T09:30:00.000Z",
      "settings": {
        "allowPointRequests": true,
        "visibility": "PUBLIC",
        "joinPolicy": "OPEN"
      }
    }
  }
}
mutation

loyaltyGroupIntegrationSync#

Syncs the group with its linked Shopify company again, in the background: Toki adds the group's members as company contacts and brings in the company's contacts. The group must be active and linked in the current store.

Input

TokiLoyaltyGroupIntegrationSyncInput!
  • groupIdID!Required

    The loyalty group (TokiLoyaltyGroup.id).

Returns

TokiLoyaltyGroup!

A shared wallet for a club, team or Shopify B2B company, whose admins send points from the group balance to its members.

  • idID!

    Pass it as groupId to the other loyalty group operations.

  • nameString!
  • statusTokiLoyaltyGroupStatus!

    ARCHIVED once you archive the group. An archived group keeps its balance and members, but its membership, roles and invitations can no longer change, and transfers, donations and point requests stop.

    ACTIVEARCHIVED
  • masterUserIdID!

    The ID of the group's master account, the member record that holds the group balance. users leaves it out unless you pass includeHidden.

  • tokenIdID!

    The ID of the balance the group wallet holds, such as your points (TokiUserBalance.id).

  • tokenNameString

    The name of the tokenId balance.

  • tokenSymbolString

    The symbol of the tokenId balance, if it has one.

  • settingsTokiLoyaltyGroupSettings!

    Who can find and join the group, and whether members can ask it for points (allowPointRequests). With visibility PUBLIC, the group is listed in the wallet for customers to find; joinPolicy decides whether they join right away (OPEN), once an admin accepts their request (APPROVAL_REQUIRED) or only by invitation (INVITE_ONLY).

  • masterBalanceFloat!

    The group balance in points: what the master account holds of tokenId.

  • masterBalanceDisplayString!

    masterBalance formatted for display, such as 1,000 Points or $10.00, following the balance's display settings.

  • createdAtString!
  • updatedAtString!
  • invitations[TokiLoyaltyGroupInvitations!]

    Every invitation to the group, newest first, whatever its status. null in loyaltyGroups.

  • integrationTokiLoyaltyGroupIntegration

    The group's link to a Shopify B2B company in the current store, or null if there is none. Always null in loyaltyGroups.

mutation LoyaltyGroupIntegrationSync($input: TokiLoyaltyGroupIntegrationSyncInput!) {
  loyaltyGroupIntegrationSync(input: $input) {
    id
    name
    status
    masterUserId
    tokenId
    tokenName
    createdAt
    settings {
      allowPointRequests
      visibility
      joinPolicy
    }
  }
}
Variables
{
  "input": {
    "groupId": "f4e6bec1-f3e6-4d2e-a2e6-bb9bf1e6ba08"
  }
}
Response
{
  "data": {
    "loyaltyGroupIntegrationSync": {
      "id": "c41718c2-c517-4a55-a217-159cc317172f",
      "name": "Gold",
      "status": "ACTIVE",
      "masterUserId": "0a6241d7-0962-4044-ac62-44fd0b62436a",
      "tokenId": "1f3da265-1e3d-40d2-ad3d-9f3f1c3d9dac",
      "tokenName": "Token name",
      "createdAt": "2026-10-14T09:30:00.000Z",
      "settings": {
        "allowPointRequests": true,
        "visibility": "PUBLIC",
        "joinPolicy": "OPEN"
      }
    }
  }
}