Meet Toki Operator

Docs/Manage API

Orders

Orders Toki has received from your stores.

Toki keeps a copy of each order it receives from your stores and links it to the member who placed it. Order IDs are your store platform's IDs, such as Shopify's numeric order ID, and amounts are in your store currency.

orders#

Lists the orders Toki has received, newest first. By default only the current store's; pass allShops: true for all your stores or userId for one member's orders.

Arguments

  • queryString

    Filter with field:value terms such as created_at:>-30d. Operators: :, :!=, :>, :>=, :<, :<=; dates also accept relative values like -30d, -1w or -6m. Terms are combined with AND unless joined by OR. Fields: created_at, order_id, shop_domain, total_price, user_id.

  • reverseBoolean

    Reverse the sort order.

  • allShopsBoolean

    true includes orders from all your stores; by default only the current store's.

  • userIdString

    Only this member's orders.

Returns

TokiOrderConnection!

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

An order Toki received from one of your stores.

  • idID!

    The order's ID in your store platform, such as Shopify's numeric order ID.

  • userIdID

    The member who placed the order; null when the order isn't linked to a member.

  • totalPriceFloat!

    The order's current total in your store currency; 0 for cancelled orders.

  • createdAtString!

    When the order was placed.

  • shopDomainString!

    The domain of the store that received the order, such as example.myshopify.com.

  • dataTokiJSON!

    Toki's copy of the order as JSON, with its name, customer, line items, discounts, prices, statuses and fulfillments.

  • userTokiUser

    The member who placed the order.

  • referredUserTokiUser

    The referrer: the member whose referral discount the buyer used on this order. null when the order used none.

query Orders($first: Int) {
  orders(first: $first) {
    nodes {
      id
      userId
      totalPrice
      createdAt
      user {
        id
        email
        name
        firstName
      }
    }
    pageInfo {
      hasNextPage
      endCursor
    }
  }
}
Variables
{
  "first": 10
}
Response
{
  "data": {
    "orders": {
      "nodes": [
        {
          "id": "d70f7484-d80f-4617-a90f-77aada0f793d",
          "userId": "4c277b4f-4b27-49bc-ae27-7e754d277ce2",
          "totalPrice": 49.99,
          "createdAt": "2026-10-14T09:30:00.000Z",
          "user": {
            "id": "8318d0f5-8218-4f62-a118-cdcf8018cc3c",
            "email": "anna@example.com",
            "name": "Anna Petrova",
            "firstName": "Anna"
          }
        }
      ],
      "pageInfo": {
        "hasNextPage": true,
        "endCursor": "Y3Vyc29yOjE5"
      }
    }
  }
}
query

order#

Returns one order by its ID, or null if there is none. Looks in the current store unless you pass shopId.

Arguments

  • idString!Required

    The order's ID in your store platform, such as Shopify's numeric order ID.

  • shopIdString

    The Toki ID of the store that received the order. Defaults to the current store.

Returns

TokiOrder

An order Toki received from one of your stores.

  • idID!

    The order's ID in your store platform, such as Shopify's numeric order ID.

  • userIdID

    The member who placed the order; null when the order isn't linked to a member.

  • totalPriceFloat!

    The order's current total in your store currency; 0 for cancelled orders.

  • createdAtString!

    When the order was placed.

  • shopDomainString!

    The domain of the store that received the order, such as example.myshopify.com.

  • dataTokiJSON!

    Toki's copy of the order as JSON, with its name, customer, line items, discounts, prices, statuses and fulfillments.

  • userTokiUser

    The member who placed the order.

  • referredUserTokiUser

    The referrer: the member whose referral discount the buyer used on this order. null when the order used none.

query Order($id: String!) {
  order(id: $id) {
    id
    userId
    totalPrice
    createdAt
    shopDomain
    data
    user {
      id
      email
      name
      firstName
      birthday {
        day
        month
        year
      }
    }
  }
}
Variables
{
  "id": "f45cf6fc-f55c-488f-a65c-fa22f75cfbb5"
}
Response
{
  "data": {
    "order": {
      "id": "f45cf6fc-f55c-488f-a65c-fa22f75cfbb5",
      "userId": "2221f5c7-2121-4434-a421-f8ed2321f75a",
      "totalPrice": 49.99,
      "createdAt": "2026-10-14T09:30:00.000Z",
      "shopDomain": "your-store.myshopify.com",
      "data": {},
      "user": {
        "id": "f215758d-f115-43fa-a015-7267ef1570d4",
        "email": "anna@example.com",
        "name": "Anna Petrova",
        "firstName": "Anna",
        "birthday": {
          "day": 14,
          "month": 3,
          "year": 1992
        }
      }
    }
  }
}