Skip to main content

Stores

List All Stores

query {
  stores {
    id
    name
    status
    slug
    supportEmail
    website
    prodEnabled
    createdAt
    updatedAt
  }
}

Single Store with Nested Products

query($storeId: ID!) {
  store(id: $storeId) {
    id
    name
    status
    onetimeProducts {
      id
      name
      prices
      status
    }
    subscriptionProducts {
      id
      name
      billingPeriod
      prices
      status
    }
  }
}
Variables:
{ "storeId": "STO_3bVzrkD0FJjFdZNLk8Ualx" }

One-Time Products

List Products with Filtering

query($storeId: String!) {
  onetimeProducts(
    filter: {
      storeId: { eq: $storeId }
      status: { eq: "active" }
    }
    limit: 20
    offset: 0
  ) {
    id
    name
    description
    prices
    status
    version
    media
    successUrl
    metadata
    createdAt
    updatedAt
  }
  onetimeProductsCount(
    filter: { storeId: { eq: $storeId } }
  )
}
Variables:
{ "storeId": "STO_3bVzrkD0FJjFdZNLk8Ualx" }

SDK Example

const result = await client.graphql.query<{
  onetimeProducts: Array<{
    id: string;
    name: string;
    prices: Record<string, { amount: number; taxCategory: string }>;
    status: string;
  }>;
  onetimeProductsCount: number;
}>({
  query: `query($storeId: String!) {
    onetimeProducts(filter: { storeId: { eq: $storeId }, status: { eq: "active" } }, limit: 20) {
      id name prices status
    }
    onetimeProductsCount(filter: { storeId: { eq: $storeId } })
  }`,
  variables: { storeId: "STO_3bVzrkD0FJjFdZNLk8Ualx" },
});

Subscription Products

List Subscription Products

query($storeId: String!) {
  subscriptionProducts(filter: { storeId: { eq: $storeId } }) {
    id
    name
    description
    billingPeriod
    prices
    status
    version
    media
    metadata
    createdAt
    updatedAt
  }
  subscriptionProductsCount(filter: { storeId: { eq: $storeId } })
}

Product Versions

Query Version History

Each product update creates an immutable version. Query version history to see all past configurations:
query($productId: String!) {
  onetimeProductVersions(filter: { productId: { eq: $productId } }) {
    id
    versionNumber
    name
    description
    prices
    media
    createdAt
  }
}

Subscription Product Versions

query($productId: String!) {
  subscriptionProductVersions(filter: { productId: { eq: $productId } }) {
    id
    versionNumber
    name
    billingPeriod
    prices
    metadata
    createdAt
  }
}
Variables:
{ "productId": "PROD_4cWAslE1GKkGeaOMl9Vbmy" }

Merchants

List Merchants

query {
  merchants {
    id
    email
    status
    createdAt
  }
  merchantsCount
}

Single Merchant

query($id: ID!) {
  merchant(id: $id) {
    id
    email
    status
    createdAt
    updatedAt
  }
}