GraphQL Schema V1

⚠️ Deprecated: This version of the GraphQL Schema is deprecated. Please update your code to use the latest version of the schema.

GQL Mutations

type GQLMutations {
    addCustomerPaymentMethod(customerId: String!, paymentMethod: PaymentMethodGQLInputType!, siteId: String!): ResultGQLType_PaymentMethod
    addDiscountToInvoice(amount: Decimal!, invoiceId: String!, siteId: String!): ResultGQLType
    addFreeAddonSubscriptionMutation(addonSubscription: AddAddonSubscriptionGQLInputType!): ResultGQLType
    addNewSubscriptionEvent(event: SubscriptionEventGQLInputType!): ResultGQLType
    assignPlan(addonsQuantity: [KeyValuePairGQLInputType], customerId: String!, futureStart: IntervalGQLInputType, infoFields: [CustomerInfoFieldGQLInputType], invoiceId: String, planCode: String!, planQuantity: Long, siteId: String!, version: String): ResultGQLType_AssignPlanResult
    cancelSubscription(immediateCancellation: Boolean, planSubscriptionId: String!, siteId: String!): ResultGQLType
    changeDefaultPaymentMethod(customerId: String!, paymentMethodId: String!, siteId: String!): ResultGQLType
    copyPlan(planId: String!, siteId: String!): ResultGQLType_Plan
    createCampaign(promoCode: String!, campaign: CampaignGQLInputType!, quantity: Int!, siteId: String!): ResultGQLType_Campaign
    createCustomer(customer: CustomerGQLInputType!, siteId: String!): ResultGQLType_Customer
    createDraftFromInvoice(draftFromInvoice: DraftFromInvoiceGQLInputType!, siteId: String!): ResultGQLType_DraftInvoice
    createDraftInvoice(draftInvoice: DraftInvoiceGQLInputType!, siteId: String!): ResultGQLType_DraftInvoice
    createDunningProfile(dunningProfile: DunningProfileGQLInputType!, siteId: String!): ResultGQLType_DunningProfile
    createInvoiceFromDraft(invoiceFromDraft: InvoiceFromDraftGQLInputType!, siteId: String!): ResultGQLType_Invoice
    createPaymentSchedule(customerId: String!, paymentSchedule: PaymentScheduleGQLInputType!, siteId: String!): ResultGQLType_PaymentSchedule
    createPaymentScheduleFromTemplate(paymentScheduleFromTemplate: PaymentScheduleFromTemplateGQLInputType!, siteId: String!): ResultGQLType_PaymentSchedule
    createPaymentScheduleTemplate(paymentScheduleTemplate: PaymentScheduleTemplateGQLInputType!, siteId: String!): ResultGQLType_PaymentScheduleTemplate
    createPlan(plan: PlanGQLInputType!, siteId: String!): PlanResultGQLType
    createScheduledPayment(paymentScheduleId: String!, scheduledPayment: ScheduledPaymentGQLInputType!, siteId: String!): ResultGQLType
    customizePlanSubscriptionAddons(addonsQuantity: [KeyValuePairGQLInputType], customerId: String!, planSubscriptionId: String!, siteId: String!): ResultGQLType_CustomizePlanSubscriptionAddonsResult
    Campaign(campaignId: String!, siteId: String!): ResultGQLType
    deleteDraftInvoice(draftInvoiceId: String!, siteId: String!): ResultGQLType
    deletePaymentScheduleTemplate(paymentScheduleTemplateId: String!, siteId: String!): ResultGQLType
    deletePlan(planId: String!, siteId: String!): ResultGQLType
    deleteScheduledPayment(paymentScheduleId: String!, scheduledPaymentId: String!, siteId: String!): ResultGQLType
    deleteScheduledPaymentList(ids: [String]!, paymentScheduleId: String!, siteId: String!): ResultGQLType
    deleteSubscriptionEvent(siteId: String!, siteSubscriptionEventId: Guid!): ResultGQLType
    markInvoiceAsPaid(invoiceId: String!, siteId: String!, sitePaymentMethodId: String!): ResultGQLType
    markScheduledPaymentAsPaid(paymentScheduleId: String!, scheduledPaymentId: String!, siteId: String!): ResultGQLType
    markScheduledPaymentListAsPaid(ids: [String]!, paymentScheduleId: String!, siteId: String!): ResultGQLType
    moveSubscription(addonsQuantity: [KeyValuePairGQLInputType], customerId: String!, immediateMoving: Boolean!, infoFields: [KeyValuePairGQLInputType], planCode: String!, planQuantity: Long, planSubscriptionId: String!, siteId: String!, version: String): ResultGQLType_MovePlanSubscriptionResult
    pauseSubscription(planSubscription: PauseSubscriptionGQLInputType!): ResultGQLType
    pauseSubscriptionWithInterval(planSubscription: PauseSubscriptionGQLInputType!): ResultGQLType
    pushInvoice(category: String!, invoiceId: String!, siteId: String!): ResultGQLType
    reactivateSubscription(planSubscriptionId: String!, siteId: String!): ResultGQLType
    removePromoCodes(ids: [String]!, siteId: String!): ResultGQLType
    removeDiscountFromInvoice(amount: Decimal!, invoiceId: String!, siteId: String!): ResultGQLType
    removeFreeAddonSubscriptionMutation(addonSubscription: RemoveAddonSubscriptionGQLInputType!): ResultGQLType
    removePaymentMethod(customerId: String!, paymentMethodId: String!, siteId: String!): ResultGQLType
    removePaymentScheduleDunningProfile(paymentScheduleId: String!, siteId: String!): ResultGQLType
    removePaymentSchedulePaymentMethod(paymentScheduleId: String!, siteId: String!): ResultGQLType
    requestPaymentInvoice(invoiceId: String!, paymentMethodId: String, siteId: String!): ResultGQLType
    resumeSubscription(planSubscriptionId: String!, siteId: String!): ResultGQLType
    sendInvoicePaymentLink(invoiceId: String!, siteId: String!): ResultGQLType
    suspendSubscription(planSubscriptionId: String!, siteId: String!): ResultGQLType
    updateCampaign(campaign: CampaignGQLInputType!, siteId: String!): ResultGQLType
    updateCustomFields(customFields: [KeyValuePairGQLInputType], customerId: String!, siteId: String!): ResultGQLType
    updateCustomerId(customerId: String!, newCustomerId: String!, siteId: String!): ResultGQLType_String
    updateDraftInvoiceInfo(draftInvoice: DraftInvoiceGQLInputType!, draftInvoiceId: String!, siteId: String!): ResultGQLType
    updateDunningProfile(dunningProfile: DunningProfileGQLInputType!, dunningProfileId: String!, siteId: String!): ResultGQLType_DunningProfile
    updateFreeAddonSubscriptions(addonSubscriptions: AddonSubscriptionsGQLInputType!): ResultGQLType
    updateInfoFields(customerId: String!, infoFields: [CustomerInfoFieldGQLInputType]!, siteId: String!): ResultGQLType
    updateIntegration(integration: SiteIntegrationGQLInputType!): ResultGQLType
    updateInvoiceDiscounts(amounts: [Decimal]!, invoiceId: String!, siteId: String!): ResultGQLType
    updateInvoiceNarrative(comments: String, footer: String, header: String, invoiceId: String!, siteId: String!): ResultGQLType
    updatePaymentScheduleDunningProfile(dunningProfileId: String!, paymentScheduleId: String!, siteId: String!): ResultGQLType
    updatePaymentSchedulePaymentMethod(paymentMethod: PaymentMethodGQLInputType!, paymentScheduleId: String!, siteId: String!): ResultGQLType
    updatePaymentScheduleTemplate(paymentScheduleTemplate: PaymentScheduleTemplateGQLInputType!, siteId: String!): ResultGQLType_PaymentScheduleTemplate
    updatePlan(plan: PlanGQLInputType!, siteId: String!): PlanResultGQLType
    updateScheduledPayment(paymentScheduleId: String!, scheduledPayment: ScheduledPaymentGQLInputType!, scheduledPaymentId: String!, siteId: String!): ResultGQLType
    updateSetting(setting: SettingGQLInputType!, siteId: String!): ResultGQLType
    updateSitePaymentProvider(siteId: String!, sitePaymentProvider: SitePaymentProviderGQLInputType!): ResultGQLType
    updateSubscriptionEvent(eventAction: SubscriptionEventGQLInputType!, siteSubscriptionEventId: Guid!): ResultGQLType
    voidInvoice(invoiceId: String!, siteId: String!): ResultGQLType
}

GQL Queries

type GQLQueries {
    addons(filter: FilterGQLInputType, pagination: PaginationGQLInputType, siteId: String!, sorting: [SortingGQLInputType]): PaginationResultGQLType_AddOn
    availableActions(siteId: String!): [String]
    availablePlaceholders(eventId: String!, siteId: String!): [SubscriptionEventPlaceholderGQLType]
    availableSubscriptionEvents(siteId: String!): [AvailableSubscriptionEventGQLType]
    base64ImageFromUrl(url: String!): ResultGQLType_String
    billingCycles(filter: FilterGQLInputType, pagination: PaginationGQLInputType, siteId: String!, sorting: [SortingGQLInputType]): PaginationResultGQLType_BillingCycle
    campaign(campaignId: String!, siteId: String!): CampaignGQLType
    campaigns(filter: FilterGQLInputType, pagination: PaginationGQLInputType, siteId: String!, sorting: [SortingGQLInputType]): PaginationResultGQLType_Campaign
    currencySettings(siteId: String!): SettingGQLType
    customer(customerId: String!, siteId: String!): CustomerGQLType
    customerByEmail(email: String!, siteId: String!): CustomerGQLType
    customerOperationJwt(customerId: String!, operation: String!, siteId: String!, subscriptionId: String): ResultGQLType_String
    customers(filter: FilterGQLInputType, pagination: PaginationGQLInputType, siteId: String!, sorting: [SortingGQLInputType]): PaginationResultGQLType_Customer
    downloadTaxInvoice(invoiceId: String!, siteId: String!): ResultGQLType_TaxInvoiceData
    draftInvoice(draftInvoiceId: String!, siteId: String!): DraftInvoiceGQLType
    draftInvoices(filter: FilterGQLInputType, pagination: PaginationGQLInputType, siteId: String!, sorting: [SortingGQLInputType]): PaginationResultGQLType_DraftInvoice
    dunningProfile(dunningProfileId: String!, siteId: String!): DunningProfileGQLType
    dunningProfiles(filter: FilterGQLInputType, pagination: PaginationGQLInputType, siteId: String!, sorting: [SortingGQLInputType]): PaginationResultGQLType_DunningProfile
    getApiSecret(siteId: String!): ResultGQLType_String
    getSiteManualPaymentMethods(siteId: String!): [SitePaymentMethodGQLType]
    getSitePaymentMethods(siteId: String!): [SitePaymentMethodGQLType]
    globalSettings(ids: [String]): [GlobalSettingGQLType]
    integrationAuthUrl(integrationId: String!, siteId: String!): ResultGQLType_String
    integrationStatus(integrationId: String!, siteId: String!): ResultGQLType_Boolean
    integrations(siteId: String!, type: String): [SiteIntegrationGQLType]
    invoice(invoiceId: String!, siteId: String!): InvoiceGQLType
    invoices(filter: FilterGQLInputType, pagination: PaginationGQLInputType, siteId: String!, sorting: [SortingGQLInputType]): PaginationResultGQLType_Invoice
    invoicesById(ids: [String]!, pagination: PaginationGQLInputType, siteId: String!, sorting: [SortingGQLInputType]): PaginationResultGQLType_Invoice
    paymentSchedule(paymentScheduleId: String!, siteId: String!): PaymentScheduleGQLType
    paymentScheduleTemplate(paymentScheduleTemplateId: String!, siteId: String!): PaymentScheduleTemplateGQLType
    paymentScheduleTemplates(filter: FilterGQLInputType, pagination: PaginationGQLInputType, siteId: String!, sorting: [SortingGQLInputType]): PaginationResultGQLType_PaymentScheduleTemplate
    paymentSchedules(filter: FilterGQLInputType, pagination: PaginationGQLInputType, siteId: String!, sorting: [SortingGQLInputType]): PaginationResultGQLType_PaymentSchedule
    paymentSchedulesById(ids: [String]!, pagination: PaginationGQLInputType, siteId: String!, sorting: [SortingGQLInputType]): PaginationResultGQLType_PaymentSchedule
    plan(planCode: String!, siteId: String!): PlanGQLType
    plans(filter: FilterGQLInputType, pagination: PaginationGQLInputType, siteId: String!, sorting: [SortingGQLInputType]): PaginationResultGQLType_Plan
    portalSettings(url: String!): SettingGQLType
    queryUsage(siteId: String!, subscriptionId: String!, utcEndDate: DateTime!, utcStartDate: DateTime!): ResultGQLType_QueryUsageResult
    settings(settings: [String], siteId: String!): [SettingGQLType]
    siteInfo(siteId: String!): ResultGQLType_Site
    siteIntegration(integrationId: String!, siteId: String!): SiteIntegrationGQLType
    siteIntegrationAvailability(integrationCategory: String!, siteId: String!): ResultGQLType
    sitePaymentProviders(siteId: String!): [SitePaymentProviderGQLType]
    subscriptionEvents(filter: FilterGQLInputType, pagination: PaginationGQLInputType, siteId: String!, sorting: [SortingGQLInputType]): PaginationResultGQLType_SiteSubscriptionEvent
    transaction(siteId: String!, transactionId: String!): TransactionGQLType
    transactions(filter: FilterGQLInputType, pagination: PaginationGQLInputType, siteId: String!, sorting: [SortingGQLInputType]): PaginationResultGQLType_Transaction
}

Customer

type CustomerGQLType {
    activePlan: String
    activities: [ActivityLogGQLType]
    address: AddressGQLType
    comment: String
    company: String
    customFields: [KeyValuePairGQLType]
    customerId: String
    documents: [StorageObjectGQLType]
    emailAddress: String
    emails: [EmailGQLType]
    firstJoined: DateTime
    firstName: String
    fullName: String
    id: ID
    infoFields: [CustomerInfoFieldGQLType]
    invoices: [InvoiceInfoGQLType]
    lastName: String
    lastPaymentDate: DateTime
    lifeTimeRevenue: Decimal!
    lifeTimeRevenueCurrency: String!
    manualPayment: Boolean
    paymentMethods: [PaymentMethodGQLType]
    paymentSchedules: [PaymentScheduleGQLType]
    shippingAddress: AddressGQLType
    siteId: String!
    status: SubscriptionStatusGQLType
    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 {
    editable: Boolean
    label: String!
    name: String!
    required: Boolean
    type: String
    validation: String
    value: String!
}

Invoice

type InvoiceGQLType {
    billedOn: DateTime
    createdOn: DateTime
    customer: CustomerGQLType
    data: String
    details: InvoiceDetailsGQLType
    dueOn: DateTime
    hasPaymentAttempts: Boolean
    id: ID
    number: String
    outstandingBalance: Decimal
    paidOn: DateTime
    paymentAttemptsCount: Int
    paymentInfo: PaymentInfoGQLType
    relatedEntity: RelatedEntityGQLType
    relatedEntityId: String
    siteId: String!
    status: InvoiceStatusGQLType
    subTotal: Decimal
    total: Decimal
    transactions: [TransactionGQLType]
    url: String
}

Invoice Info

type InvoiceInfoGQLType {
    billedOn: DateTime
    createdOn: DateTime
    details: InvoiceDetailsGQLType
    dueOn: DateTime
    id: ID
    number: String
    siteId: String!
    status: InvoiceStatusGQLType
    subTotal: Decimal
    total: Decimal
    url: String
}

Invoice Line Item

type InvoiceLineItemGQLType {
    data: String
    end: DateTime
    item: String!
    order: Int!
    quantity: Decimal!
    start: DateTime!
    total: Decimal
    unitPrice: Decimal!
}

Invoice Subtotal

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

Payment Method

type PaymentMethodGQLType {
    billingInfo: BillingInfoGQLType
    displayText: String!
    id: String!
    identifier: String
    isDefault: Boolean!
    metaData: String
    providerReference: String
    sitePaymentMethodId: String!
    type: String!
}

Plan

type PlanGQLType {
    accountingCode: String
    activeSubscribersCount: Int
    addOns: [AddOnGQLType]
    billingCycle: BillingCycleInfoGQLType
    billingModel: BillingModelGQLType
    billingType: BillingTypeGQLType
    canBeDeleted: Boolean!
    changeLog: [ChangeLogGQLType]
    checkoutNotes: String
    data: String
    defaultCurrency: CurrencyGQLType
    description: String
    discountedFrom: Decimal
    displayCurrency: CurrencyGQLType
    displaySettings: String
    dunningProfile: DunningProfileGQLType
    effectiveEndDate: DateTime
    effectiveStartDate: DateTime
    fixedPricing: FixedPricingGQLType
    hasActiveSubscribers: Boolean
    hostedPageUrl: String
    id: ID
    imageUrl: String
    infoFields: [InfoFieldGQLType]
    invoiceName: String
    name: String!
    perUnitPricing: PerUnitPricingGQLType
    planCode: String!
    planFutureStarts: [PlanFutureStartGQLType]
    planPausingDurations: [PlanPausingDurationGQLType]
    planRules: PlanRulesGQLType
    pricingModel: PricingModelGQLType
    productName: String
    setupFee: Decimal
    siteId: String!
    status: ActiveStatusGQLType
    trialPeriod: TrialPeriodSettingsGQLType
    variablePricing: VariablePricingGQLType
}

Addon

type AddOnGQLType {
    accountingCode: String
    activeSubscribersCount: Int!
    billingCycle: BillingCycleInfoGQLType
    billingModel: BillingModelGQLType
    billingType: BillingTypeGQLType
    canBeDeleted: Boolean!
    planCode: String
    currency: CurrencyGQLType
    data: String
    description: String
    displaySettings: String
    fixedPricing: FixedPricingGQLType
    hasActiveSubscribers: Boolean!
    id: ID
    imageUrl: String
    invoiceName: String
    name: String!
    perUnitPricing: PerUnitPricingGQLType
    pricingModel: PricingModelGQLType
    siteId: String!
    status: ActiveStatusGQLType
    variablePricing: VariablePricingGQLType
}

Active Status

enum ActiveStatus {
  Active
  Inactive
}

Billing Cycle

type BillingCycleGQLType {
    data: BillingCycleDataGQLType
    end: DateTime
    id: ID
    index: Int
    invoiceId: String
    nextBillingCycleId: ID
    planSubscription: SubscriptionGQLType
    planSubscriptionId: String
    siteId: String!
    start: DateTime
}

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 {
    displayCurrencyConversion: Decimal
    extraFees: [SummaryItemDefinitionGQLType]
    price: Decimal!
    required: Boolean
    taxes: [SummaryItemDefinitionGQLType]
}

PerUnit Pricing

type PerUnitPricingGQLType {
    displayCurrencyConversion: Decimal
    extraFees: [SummaryItemDefinitionGQLType]
    freeQuantity: Long!
    pricePerUnit: Decimal!
    rules: PricingRulesGQLType
    taxes: [SummaryItemDefinitionGQLType]
    unit: String!
}

Variable Pricing

type VariablePricingGQLType {
    displayCurrencyConversion: Decimal
    extraFees: [SummaryItemDefinitionGQLType]
    rules: PricingRulesGQLType
    taxes: [SummaryItemDefinitionGQLType]
    tiers: [PricingTierGQLType]
    type: VariablePricingTypeGQLType
    unit: String
}

Pricing Tier

type PricingTierGQLType {
    from: Long!
    price: Decimal!
    to: Long
}

Variable Pricing Type

enum VariablePricingType {
  Tiered
  Volume
  StairStep
}

Trial Period

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

Interval Unit

enum IntervalUnit {
  Day
  Week
  Month
  Quarter
  Year
}

Term Limit

type TermLimitGQLType {
    actionOnEnd: ActionOnTermEndGQLType
    cycles: Int
}

Action On Term End

enum ActionOnTermEnd {
  Renew
  Cancel
}

Subscription

type SubscriptionGQLType {
    addOns: [AddOnSubscriptionGQLType]
    currency: String!
    currentBillingCycleEnd: DateTime
    currentBillingCycleIndex: Int
    currentBillingCycleStart: DateTime
    endedOn: DateTime
    futureStart: DateTime
    id: String!
    pausingInfo: PausingDataGQLType
    plan: PlanGQLType
    quantity: Long
    siteId: String!
    startedOn: DateTime
    status: SubscriptionStatusGQLType
}

Addon Subscription

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

Subscription Status

enum SubscriptionStatus {
  InTrial
  Active
  FutureStart
  Paused
  NonRenewing
  Canceled
  Moved
  Activating
  Pausing
  Canceling
}

Transaction

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

Payment Info

type PaymentInfoGQLType {
  paymentAttempts: [PaymentAttemptsGQLType]
}

Payment Attempts

type PaymentAttemptGQLType {
    succeeded: Boolean
    transactionId: String
    utcTimestamp: DateTime
}

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
}