Skip to main content

Customer type

type Customer {
  id: ID!
  name: String!
  email: String!
  organization: Organization!
  tier: Tier!
  apiKeys: [ApiKey!]!
  webhookUrl: String
  products: ProductConnection!
  orders: OrderConnection!
  impactProfile: CustomerImpactProfile
  createdAt: DateTime!
  updatedAt: DateTime!
}

type Organization {
  id: ID!
  name: String!
  tier: Tier!
  apiQuota: ApiQuota!
  members: [Customer!]!
}

type ApiQuota {
  requestsPerMinute: Int!
  calculationsPerDay: Int!
  assetRendersPerDay: Int!
  used: ApiQuotaUsage!
}

type ApiQuotaUsage {
  requests: Int!
  calculations: Int!
  assetRenders: Int!
  resetAt: DateTime!
}

type ApiKey {
  id: ID!
  prefix: String!
  label: String
  permissions: [String!]!
  createdAt: DateTime!
  lastUsedAt: DateTime
}

enum Tier {
  FREE
  GROWTH
  ENTERPRISE
}

Fields

FieldTypeDescription
idID!Unique customer identifier
nameString!Customer display name
emailString!Primary email address
organizationOrganization!Parent organization
tierTier!Subscription tier (FREE, GROWTH, ENTERPRISE)
apiKeys[ApiKey!]!API keys associated with this customer
webhookUrlStringDefault webhook delivery URL
productsProductConnection!Products owned by this customer
ordersOrderConnection!Orders placed by this customer
impactProfileCustomerImpactProfileGamification profile with badges and milestones
createdAtDateTime!Account creation timestamp
updatedAtDateTime!Last update timestamp

Example query

query {
  me {
    id
    name
    organization {
      name
      tier
      apiQuota {
        requestsPerMinute
        calculationsPerDay
        used { requests calculations }
      }
    }
    products(first: 5) {
      totalCount
      edges { node { id name } }
    }
  }
}