Orders

Arguments

  • after String
    Cursor to paginate forward from.
  • before String
    Cursor to paginate backward from.
  • customer String
    Filter by customer ID.
  • first Int
    Return the first N results.
  • includePrepaidOrders Boolean
    Include prepaid orders in results. Defaults to true.
  • last Int
    Return the last N results.
  • place Date
    Filter by exact placement date (YYYY-MM-DD).
  • placeEnd Date
    Filter orders placed on or before this date (YYYY-MM-DD).
  • placeStart Date
    Filter orders placed on or after this date (YYYY-MM-DD).
  • status [Int!]
    Filter by order status codes.
  • subscription String
    Filter by subscription public ID.

Return type: OrderConnection

  • edges [OrderEdge!]! Non-null Show fields
    OrderEdge fields
    • cursor String! Non-null
    • node OrderType! Non-null Show fields
      OrderType fields
      • cancelled DateTime
      • created DateTime
      • currencyCode String
      • customer CustomerType Show fields
        CustomerType fields
        • created DateTime! Non-null
        • email String
        • extraData String
        • firstName String
        • lastName String
        • lastUpdated DateTime! Non-null
        • live Boolean! Non-null
        • locale Int
        • merchantUserId String
        • phoneNumber String
        • phoneType Int
        • priceCode String
      • discountTotal Decimal! Non-null
      • extraData String
      • genericErrorCount Int! Non-null
      • hasPlan Boolean! Non-null
      • items ItemsPage! Non-null Show fields
        ItemsPage fields
        • hasMore Boolean! Non-null
        • nodes [ItemType!]! Non-null Show fields
          ItemType fields
          • components [ProductType!]! Non-null Show fields
            ProductType fields
            • autoshipByDefault Boolean! Non-null
            • autoshipEnabled Boolean! Non-null
            • created DateTime
            • detailUrl String
            • discontinued Boolean! Non-null
            • every Int
            • everyPeriod Int
            • externalProductId String! Non-null
            • extraData String
            • groups [ProductGroupType!]! Non-null Show fields
              ProductGroupType fields
              • groupType String! Non-null
              • name String! Non-null
            • imageUrl String
            • lastUpdate DateTime
            • live Boolean! Non-null
            • name String
            • prepaidEligible Boolean! Non-null
            • price Decimal! Non-null
            • productType String! Non-null
            • sku String! Non-null
          • extraCost Decimal! Non-null
          • firstPlaced DateTime
          • frozen Boolean! Non-null
          • offerPublicId String
          • oneTime Boolean! Non-null
          • oneTimeIncentives [OneTimeIncentiveType!]! Non-null Show fields
            OneTimeIncentiveType fields
            • appliedAt DateTime
            • created DateTime! Non-null
            • description String! Non-null
            • expires DateTime
            • externalCode String! Non-null
            • incentive IncentiveType Show fields
              IncentiveType fields Interface
              • name String! Non-null
              • publicId String! Non-null
              Implemented by
              • BaseIncentive
              • DiscountIncentive
                discountType: String!, field: String!, limitPolicy: String, limitValue: Decimal, target: String!, thresholdField: String, thresholdValue: Decimal, value: Decimal!
              • GiftIncentive
                product: ProductType, target: String!
            • lastUpdated DateTime! Non-null
            • onetimeCouponType String! Non-null
            • publicId String! Non-null
            • stackingType Int! Non-null
          • orderPublicId String! Non-null
          • price Decimal! Non-null
          • product ProductType Show fields
            ProductType fields
            • autoshipByDefault Boolean! Non-null
            • autoshipEnabled Boolean! Non-null
            • created DateTime
            • detailUrl String
            • discontinued Boolean! Non-null
            • every Int
            • everyPeriod Int
            • externalProductId String! Non-null
            • extraData String
            • groups [ProductGroupType!]! Non-null Show fields
              ProductGroupType fields
              • groupType String! Non-null
              • name String! Non-null
            • imageUrl String
            • lastUpdate DateTime
            • live Boolean! Non-null
            • name String
            • prepaidEligible Boolean! Non-null
            • price Decimal! Non-null
            • productType String! Non-null
            • sku String! Non-null
          • publicId String
          • quantity Int! Non-null
          • subscription SubscriptionType Show fields
            SubscriptionType fields
            • cancelReason String
            • cancelReasonCode CancelReasonType Show fields
              CancelReasonType fields
              • code Int! Non-null
              • reason String! Non-null
            • cancelled DateTime
            • components [ComponentType!] Show fields
              ComponentType fields
              • product ProductType Show fields
                ProductType fields
                • autoshipByDefault Boolean! Non-null
                • autoshipEnabled Boolean! Non-null
                • created DateTime
                • detailUrl String
                • discontinued Boolean! Non-null
                • every Int
                • everyPeriod Int
                • externalProductId String! Non-null
                • extraData String
                • groups [ProductGroupType!]! Non-null Show fields
                  ProductGroupType fields
                  • groupType String! Non-null
                  • name String! Non-null
                • imageUrl String
                • lastUpdate DateTime
                • live Boolean! Non-null
                • name String
                • prepaidEligible Boolean! Non-null
                • price Decimal! Non-null
                • productType String! Non-null
                • sku String! Non-null
              • publicId String! Non-null
              • quantity Int
            • created DateTime
            • currencyCode String
            • customer CustomerType Show fields
              CustomerType fields
              • created DateTime! Non-null
              • email String
              • extraData String
              • firstName String
              • lastName String
              • lastUpdated DateTime! Non-null
              • live Boolean! Non-null
              • locale Int
              • merchantUserId String
              • phoneNumber String
              • phoneType Int
              • priceCode String
            • every Int
            • everyPeriod Int
            • externalId String
            • extraData String
            • freeTrialSubscriptionContext FreeTrialSubscriptionContextType Show fields
              FreeTrialSubscriptionContextType fields
              • conversionItem String
              • days Int! Non-null
              • expiration DateTime! Non-null
              • isInFreeTrial Boolean! Non-null
              • product ProductType Show fields
                ProductType fields
                • autoshipByDefault Boolean! Non-null
                • autoshipEnabled Boolean! Non-null
                • created DateTime
                • detailUrl String
                • discontinued Boolean! Non-null
                • every Int
                • everyPeriod Int
                • externalProductId String! Non-null
                • extraData String
                • groups [ProductGroupType!]! Non-null Show fields
                  ProductGroupType fields
                  • groupType String! Non-null
                  • name String! Non-null
                • imageUrl String
                • lastUpdate DateTime
                • live Boolean! Non-null
                • name String
                • prepaidEligible Boolean! Non-null
                • price Decimal! Non-null
                • productType String! Non-null
                • sku String! Non-null
            • frequencyDays Int
            • grantees [GranteeType!]! Non-null Show fields
              GranteeType fields
              • externalId String! Non-null
              • name String! Non-null
            • id ID! Non-null
              The Globally Unique ID of this object
            • live Boolean! Non-null
            • merchantOrderId String
            • merchantPublicId String! Non-null
            • offerPublicId String
            • payment PaymentType Show fields
              PaymentType fields
              • billingAddress AddressType Show fields
                AddressType fields
                • address String! Non-null
                • address2 String
                • city String! Non-null
                • companyName String
                • countryCode String! Non-null
                • created DateTime! Non-null
                • fax String
                • firstName String! Non-null
                • label String
                • lastName String! Non-null
                • live Boolean! Non-null
                • phone String
                • priceCode String
                • publicId String
                • stateProvinceCode String! Non-null
                • tokenId String
                • zipPostalCode String! Non-null
              • ccExpDate String
              • ccHolder String
              • ccNumberEnding String
              • ccType Int
              • created DateTime! Non-null
              • cycle Int
              • cycleStatus Int
              • label String
              • lastUpdated DateTime! Non-null
              • live Boolean! Non-null
              • paymentMethod Int
              • publicId String
              • tokenId String
            • prepaidSubscriptionContext PrepaidSubscriptionContextType Show fields
              PrepaidSubscriptionContextType fields
              • lastRenewalRevenue Decimal! Non-null
              • prepaidOrdersPerBilling Int! Non-null
              • prepaidOrdersRemaining Int! Non-null
              • prepaidOriginMerchantOrderId String
              • renewalBehavior String! Non-null
            • price Decimal
            • product ProductType Show fields
              ProductType fields
              • autoshipByDefault Boolean! Non-null
              • autoshipEnabled Boolean! Non-null
              • created DateTime
              • detailUrl String
              • discontinued Boolean! Non-null
              • every Int
              • everyPeriod Int
              • externalProductId String! Non-null
              • extraData String
              • groups [ProductGroupType!]! Non-null Show fields
                ProductGroupType fields
                • groupType String! Non-null
                • name String! Non-null
              • imageUrl String
              • lastUpdate DateTime
              • live Boolean! Non-null
              • name String
              • prepaidEligible Boolean! Non-null
              • price Decimal! Non-null
              • productType String! Non-null
              • sku String! Non-null
            • publicId String
            • quantity Int! Non-null
            • queuedActions [QueuedActionType!] Show fields
              QueuedActionType fields
              • date DateTime
              • index Int! Non-null
              • ordinal Int! Non-null
              • publicId String! Non-null
              • skip Boolean! Non-null
            • reminderDays Int
            • sessionId String! Non-null
            • shippingAddress AddressType Show fields
              AddressType fields
              • address String! Non-null
              • address2 String
              • city String! Non-null
              • companyName String
              • countryCode String! Non-null
              • created DateTime! Non-null
              • fax String
              • firstName String! Non-null
              • label String
              • lastName String! Non-null
              • live Boolean! Non-null
              • phone String
              • priceCode String
              • publicId String
              • stateProvinceCode String! Non-null
              • tokenId String
              • zipPostalCode String! Non-null
            • startDate Date! Non-null
            • subscriptionType String
            • updated DateTime
          • subscriptionComponent ComponentType Show fields
            ComponentType fields
            • product ProductType Show fields
              ProductType fields
              • autoshipByDefault Boolean! Non-null
              • autoshipEnabled Boolean! Non-null
              • created DateTime
              • detailUrl String
              • discontinued Boolean! Non-null
              • every Int
              • everyPeriod Int
              • externalProductId String! Non-null
              • extraData String
              • groups [ProductGroupType!]! Non-null Show fields
                ProductGroupType fields
                • groupType String! Non-null
                • name String! Non-null
              • imageUrl String
              • lastUpdate DateTime
              • live Boolean! Non-null
              • name String
              • prepaidEligible Boolean! Non-null
              • price Decimal! Non-null
              • productType String! Non-null
              • sku String! Non-null
            • publicId String! Non-null
            • quantity Int
          • totalPrice Decimal! Non-null
      • locked Boolean! Non-null
      • merchantPublicId String! Non-null
      • oneTimeIncentives [OneTimeIncentiveType!]! Non-null Show fields
        OneTimeIncentiveType fields
        • appliedAt DateTime
        • created DateTime! Non-null
        • description String! Non-null
        • expires DateTime
        • externalCode String! Non-null
        • incentive IncentiveType Show fields
          IncentiveType fields Interface
          • name String! Non-null
          • publicId String! Non-null
          Implemented by
          • BaseIncentive
          • DiscountIncentive
            discountType: String!, field: String!, limitPolicy: String, limitValue: Decimal, target: String!, thresholdField: String, thresholdValue: Decimal, value: Decimal!
          • GiftIncentive
            product: ProductType, target: String!
        • lastUpdated DateTime! Non-null
        • onetimeCouponType String! Non-null
        • publicId String! Non-null
        • stackingType Int! Non-null
      • oosFreeShipping Boolean! Non-null
      • orderMerchantId String
      • payment PaymentType Show fields
        PaymentType fields
        • billingAddress AddressType Show fields
          AddressType fields
          • address String! Non-null
          • address2 String
          • city String! Non-null
          • companyName String
          • countryCode String! Non-null
          • created DateTime! Non-null
          • fax String
          • firstName String! Non-null
          • label String
          • lastName String! Non-null
          • live Boolean! Non-null
          • phone String
          • priceCode String
          • publicId String
          • stateProvinceCode String! Non-null
          • tokenId String
          • zipPostalCode String! Non-null
        • ccExpDate String
        • ccHolder String
        • ccNumberEnding String
        • ccType Int
        • created DateTime! Non-null
        • cycle Int
        • cycleStatus Int
        • label String
        • lastUpdated DateTime! Non-null
        • live Boolean! Non-null
        • paymentMethod Int
        • publicId String
        • tokenId String
      • place DateTime
      • publicId String
      • rejectedMessage String
      • shippingAddress AddressType Show fields
        AddressType fields
        • address String! Non-null
        • address2 String
        • city String! Non-null
        • companyName String
        • countryCode String! Non-null
        • created DateTime! Non-null
        • fax String
        • firstName String! Non-null
        • label String
        • lastName String! Non-null
        • live Boolean! Non-null
        • phone String
        • priceCode String
        • publicId String
        • stateProvinceCode String! Non-null
        • tokenId String
        • zipPostalCode String! Non-null
      • shippingTotal Decimal! Non-null
      • status Int! Non-null
      • subTotal Decimal! Non-null
      • taxTotal Decimal! Non-null
      • total Decimal! Non-null
      • tries Int! Non-null
      • updated DateTime
  • pageInfo PageInfo! Non-null Show fields
    PageInfo fields
    • endCursor String
      When paginating forwards, the cursor to continue.
    • hasNextPage Boolean! Non-null
      When paginating forwards, are there more items?
    • hasPreviousPage Boolean! Non-null
      When paginating backwards, are there more items?
    • startCursor String
      When paginating backwards, the cursor to continue.

Retrieve a customer's order history with basic info

query {
  orders(customer: "cust123", first: 10) {
    edges {
      node {
        publicId
        status
        subTotal
        total
        place
        created
        items {
          nodes {
            quantity
            product {
              name
              externalProductId
            }
          }
        }
      }
    }
  }
}
curl -X POST https://restapi.ordergroove.com/graphql/2026-01/ \
  -H "X-API-KEY: <your-api-key>" \
  -H "Content-Type: application/json" \
  -d '{"query": "query { orders(customer: \"cust123\", first: 10) { edges { node { publicId status subTotal total place created items { nodes { quantity product { name externalProductId } } } } } } }"}'
const query = `
query {
  orders(customer: "cust123", first: 10) {
    edges {
      node {
        publicId
        status
        subTotal
        total
        place
        created
        items {
          nodes {
            quantity
            product {
              name
              externalProductId
            }
          }
        }
      }
    }
  }
}
`;

const response = await fetch(
  "https://restapi.ordergroove.com/graphql/2026-01/",
  {
    method: "POST",
    headers: {
      "X-API-KEY: <your-api-key>",
      "Content-Type": "application/json",
    },
    body: JSON.stringify({ query }),
  }
);

const data = await response.json();
import requests

query = """
query {
  orders(customer: "cust123", first: 10) {
    edges {
      node {
        publicId
        status
        subTotal
        total
        place
        created
        items {
          nodes {
            quantity
            product {
              name
              externalProductId
            }
          }
        }
      }
    }
  }
}
"""

response = requests.post(
    "https://restapi.ordergroove.com/graphql/2026-01/",
    headers={
        "X-API-KEY: <your-api-key>",
        "Content-Type": "application/json",
    },
    json={"query": query},
)

data = response.json()

Page through a customer's orders using cursor-based pagination

query {
  orders(customer: "cust123", first: 10, after: "cursor123") {
    edges {
      cursor
      node {
        publicId
        status
        subTotal
        total
        place
        created
      }
    }
    pageInfo {
      hasNextPage
      hasPreviousPage
      startCursor
      endCursor
    }
  }
}
curl -X POST https://restapi.ordergroove.com/graphql/2026-01/ \
  -H "X-API-KEY: <your-api-key>" \
  -H "Content-Type: application/json" \
  -d '{"query": "query { orders(customer: \"cust123\", first: 10, after: \"cursor123\") { edges { cursor node { publicId status subTotal total place created } } pageInfo { hasNextPage hasPreviousPage startCursor endCursor } } }"}'
const query = `
query {
  orders(customer: "cust123", first: 10, after: "cursor123") {
    edges {
      cursor
      node {
        publicId
        status
        subTotal
        total
        place
        created
      }
    }
    pageInfo {
      hasNextPage
      hasPreviousPage
      startCursor
      endCursor
    }
  }
}
`;

const response = await fetch(
  "https://restapi.ordergroove.com/graphql/2026-01/",
  {
    method: "POST",
    headers: {
      "X-API-KEY: <your-api-key>",
      "Content-Type": "application/json",
    },
    body: JSON.stringify({ query }),
  }
);

const data = await response.json();
import requests

query = """
query {
  orders(customer: "cust123", first: 10, after: "cursor123") {
    edges {
      cursor
      node {
        publicId
        status
        subTotal
        total
        place
        created
      }
    }
    pageInfo {
      hasNextPage
      hasPreviousPage
      startCursor
      endCursor
    }
  }
}
"""

response = requests.post(
    "https://restapi.ordergroove.com/graphql/2026-01/",
    headers={
        "X-API-KEY: <your-api-key>",
        "Content-Type": "application/json",
    },
    json={"query": query},
)

data = response.json()

Detailed orders by customer

query {
  orders(customer: "cust123", first: 25) {
    edges {
      node {
        publicId
        status
        subTotal
        total
        place
        items {
          nodes {
            publicId
            quantity
            price
            totalPrice
            product {
              name
              externalProductId
              sku
            }
            subscription {
              publicId
              every
              everyPeriod
            }
          }
        }
      }
    }
  }
}
curl -X POST https://restapi.ordergroove.com/graphql/2026-01/ \
  -H "X-API-KEY: <your-api-key>" \
  -H "Content-Type: application/json" \
  -d '{"query": "query { orders(customer: \"cust123\", first: 25) { edges { node { publicId status subTotal total place items { nodes { publicId quantity price totalPrice product { name externalProductId sku } subscription { publicId every everyPeriod } } } } } } }"}'
const query = `
query {
  orders(customer: "cust123", first: 25) {
    edges {
      node {
        publicId
        status
        subTotal
        total
        place
        items {
          nodes {
            publicId
            quantity
            price
            totalPrice
            product {
              name
              externalProductId
              sku
            }
            subscription {
              publicId
              every
              everyPeriod
            }
          }
        }
      }
    }
  }
}
`;

const response = await fetch(
  "https://restapi.ordergroove.com/graphql/2026-01/",
  {
    method: "POST",
    headers: {
      "X-API-KEY: <your-api-key>",
      "Content-Type": "application/json",
    },
    body: JSON.stringify({ query }),
  }
);

const data = await response.json();
import requests

query = """
query {
  orders(customer: "cust123", first: 25) {
    edges {
      node {
        publicId
        status
        subTotal
        total
        place
        items {
          nodes {
            publicId
            quantity
            price
            totalPrice
            product {
              name
              externalProductId
              sku
            }
            subscription {
              publicId
              every
              everyPeriod
            }
          }
        }
      }
    }
  }
}
"""

response = requests.post(
    "https://restapi.ordergroove.com/graphql/2026-01/",
    headers={
        "X-API-KEY: <your-api-key>",
        "Content-Type": "application/json",
    },
    json={"query": query},
)

data = response.json()

Retrieve orders for a specific subscription with line item details

query {
  orders(subscription: "sub123", first: 25) {
    edges {
      node {
        publicId
        status
        subTotal
        total
        place
        created
        items {
          nodes {
            publicId
            quantity
            price
            totalPrice
            product {
              name
              externalProductId
              sku
            }
            subscription {
              publicId
              every
              everyPeriod
            }
          }
        }
      }
    }
  }
}
curl -X POST https://restapi.ordergroove.com/graphql/2026-01/ \
  -H "X-API-KEY: <your-api-key>" \
  -H "Content-Type: application/json" \
  -d '{"query": "query { orders(subscription: \"sub123\", first: 25) { edges { node { publicId status subTotal total place created items { nodes { publicId quantity price totalPrice product { name externalProductId sku } subscription { publicId every everyPeriod } } } } } } }"}'
const query = `
query {
  orders(subscription: "sub123", first: 25) {
    edges {
      node {
        publicId
        status
        subTotal
        total
        place
        created
        items {
          nodes {
            publicId
            quantity
            price
            totalPrice
            product {
              name
              externalProductId
              sku
            }
            subscription {
              publicId
              every
              everyPeriod
            }
          }
        }
      }
    }
  }
}
`;

const response = await fetch(
  "https://restapi.ordergroove.com/graphql/2026-01/",
  {
    method: "POST",
    headers: {
      "X-API-KEY: <your-api-key>",
      "Content-Type": "application/json",
    },
    body: JSON.stringify({ query }),
  }
);

const data = await response.json();
import requests

query = """
query {
  orders(subscription: "sub123", first: 25) {
    edges {
      node {
        publicId
        status
        subTotal
        total
        place
        created
        items {
          nodes {
            publicId
            quantity
            price
            totalPrice
            product {
              name
              externalProductId
              sku
            }
            subscription {
              publicId
              every
              everyPeriod
            }
          }
        }
      }
    }
  }
}
"""

response = requests.post(
    "https://restapi.ordergroove.com/graphql/2026-01/",
    headers={
        "X-API-KEY: <your-api-key>",
        "Content-Type": "application/json",
    },
    json={"query": query},
)

data = response.json()