GraphQL Schema V1

Customer

type CustomerGQLType {
  activePlan: String
  activities: [ActivityLogGQLType]
  address: AddressGQLType
  comment: String
  company: String
  customerId: String
  customFields: [KeyValuePairGQLType]
  emailAddress: String!
  firstJoined: DateTime
  firstName: String!
  fullName: String!
  id: ID
  infoFields: [CustomerInfoFieldGQLType]
  invoices: [InvoiceGQLType]
  lastName: String!
  lifeTimeRevenue: Decimal!
  lifeTimeRevenueCurrency: String!
  nextInvoiceOn: DateTime
  paymentMethods: [PaymentMethodGQLType]
  shippingAddress: AddressGQLType
  siteId: String!
  status: String!
  subscriptions: [SubscriptionGQLType]
  transactions: [TransactionGQLType]
}

Activity Log

type ActivityLogGQLType {
  displayText: String
  doneBy: ID
  id: String!
  timestamp: DateTime
}

Address

type AddressGQLType {
  city: String!
  countryCode: String!
  line1: String!
  line2: String!
  postalCode: String!
  province: String!
}

Key Value Pair

type KeyValuePairGQLType {
  key: String!
  value: String!
}

Customer Infofield

type CustomerInfoFieldGQLType {
  label: String!
  name: String!
  value: String!
}

Invoice

type InvoiceGQLType {
  billedOn: DateTime
  createdOn: DateTime
  dueOn: DateTime
  id: ID
  info: InvoiceInfoGQLType
  number: String
  siteId: String!
  status: String
}

Invoice Info

type InvoiceInfoGQLType {
  billingInfo: BillingInfoGQLType
  currency: String!
  discounts: [InvoiceSubtotalGQLType]
  extraFees: [InvoiceSubtotalGQLType]
  lineItems: [InvoiceLineItemGQLType]
  paymentDetails: String
  taxes: [InvoiceSubtotalGQLType]
  terms: String
}

Invoice Line Item

type InvoiceLineItemGQLType {
  end: Date
  item: String!
  order: Int!
  quantity: Decimal!
  start: Date!
  unitPrice: Decimal!
}

Invoice Subtotal

type InvoiceSubtotalGQLType {
  amount: Decimal!
  description: String!
  order: Int!
}

Payment Method

type PaymentMethodGQLType {
  billingInfo: BillingInfoGQLType
  displayText: String!
  isDefault: Boolean!
  type: String!
}

Plan

type PlanGQLType {
  accountingCode: String
  addOns: [AddOnGQLType]
  billingCycle: BillingCycleGQLType
  billingType: BillingType
  billingModel: BillingModel
  defaultCurrency: CurrencyGQLType
  description: String
  discountedFrom: Decimal
  displaySettings: String
  effectiveEndDate: DateTime
  effectiveStartDate: DateTime
  fixedPricing: FixedPricingGQLType
  hasActiveSubscribers: Boolean!
  hostedPageUrl: String!
  id: ID
  imageUrl: String
  invoiceName: String
  name: String!
  perUnitPricing: PerUnitPricingGQLType
  planCode: String!
  pricingModel: PricingModel
  productName: String
  setupFee: Decimal
  siteId: String!
  status: ActiveStatus
  trialPeriod: TrialPeriodSettingsGQLType
  variablePricing: VariablePricingGQLType
}

Addon

type AddOn {
  accountingCode: String
  billingCycle: BillingCycleGQLType
  billingType: BillingType
  billingModel: BillingModel
  currency: CurrencyGQLType
  description: String
  displaySettings: String
  fixedPricing: FixedPricingGQLType
  hasActiveSubscribers: Boolean!
  id: ID
  imageUrl: String
  invoiceName: String
  name: String!
  perUnitPricing: PerUnitPricingGQLType
  pricingModel: PricingModel
  siteId: String!
  status: ActiveStatus
  variablePricing: VariablePricingGQLType
}

Active Status

enum ActiveStatus {
  Active
  Inactive
}

Billing Cycle

type BillingCycleGQLType {
  duration: Int!
  termLimit: TermLimitGQLType
  unit: IntervalUnit
}

Billing Type

enum BillingType {
  OneTime
  Recurring
}

Currency

type CurrencyGQLType {
  code: String!
  displayText: String!
  symbol: String!
}

Pricing Model

enum PricingModel {
  Fixed
  PerUnit
  Variable
}

Fixed Pricing

type FixedPricingGQLType {
  price: Decimal!
  required: Boolean
}

PerUnit Pricing

type PerUnitPricingGQLType {
  freeQuantity: Int!
  pricePerUnit: Decimal!
  unit: String!
  unitsPerIncrement: Int!
}

Variable Pricing

type VariablePricingGQLType {
  tiers: [PricingTierGQLType]
  type: VariablePricingType
  unit: String
}

Pricing Tier

type PricingTierGQLType {
  from: Int!
  price: Decimal!
  to: Int
  unitsPerIncrement: Int!
}

Variable Pricing Type

enum VariablePricingType {
  Tiered
  Volume
  StairStep
}

Trial Period

type TrialPeriodSettingsGQLType {
  duration: Int!
  requiresCreditCard: Boolean!
  unit: IntervalUnit
}

Interval Unit

enum IntervalUnit {
  Day
  Week
  Month
  Quarter
  Year
}

Term Limit

type TermLimitGQLType {
  actionOnEnd: ActionOnTermEnd
  cycles: Int
}

Action On Term End

enum ActionOnTermEnd {
  Renew
  Cancel
}

Subscription

type SubscriptionGQLType {
  addOns: [AddOnSubscriptionGQLType]
  currency: String
  endedOn: DateTime
  id: String!
  plan: PlanGQLType
  quantity: Int
  siteId: String!
  startedOn: DateTime
  status: SubscriptionStatus
}

Addon Subscription

type AddOnSubscriptionGQLType {
  addOn: AddOnGQLType
  endedOn: DateTime
  id: String!
  movedTo: String
  quantity: Int
  startedOn: DateTime
  status: SubscriptionStatus
}

Subscription Status

enum SubscriptionStatus {
  InTrial
  Active
  FutureStartDate
  Paused
  NonRenewing
  Cancelled
  Moved
  Activating
  Pausing
  Cancelling
}

Transaction

type TransactionGQLType {
  amount: Decimal
  currency: String
  customer: CustomerGQLType
  gatewayResponse: String
  id: ID
  paymentMethod: PaymentMethodGQLType
  referenceNumber: String
  siteId: String!
  status: String
  timestamp: DateTime
  type: String
}

Payment Info

type PaymentInfoGQLType{
  paymentAttempts: [PaymentAttemptsGQLType]
}

Payment Attempts

type PaymentAttemptsGQLType {
    succeeded: Boolean!
    transactionId: String!
    utcTimestamp: DateTime!
    sitePaymentMethodId: String!

Pagination

type PaginationGQLType {
  page: Int
  perPage: Int
  totalRecords: Int
}

type PaginationGQLInputType {
  page: Int
  perPage: Int
}

Sorting

type SortingGQLInputType {
  field: String
  direction: String
}

Direction

enum Direction {
  Ascending
  Descending
}

Filtering

type FilterGQLInputType {
  field: String
  operator: String
  value: String
}

Operator

enum Operator {
  Equal,
  GreaterThan,
  GreaterThanOrEqual,
  LessThan,
  LessThanOrEqual,
  Contains,
  StartsWith,
  EndsWith
}
Edit this page on GitHub Updated at Mon, Mar 13, 2023