Skip to content

Graphql API Reference

Mutations

addAdminUser

Adds an Admin user to the system.

Arguments

  • username (AWSEmail!): The email address of the user.

Returns:

  • A User object representing the newly added Admin.

addStandardUser

Adds a Standard user to the system.

Arguments

  • username (AWSEmail!): The email address of the user.

Returns:

  • A User object representing the newly added Standard user.

deleteAdminUser

Deletes an Admin user from the system.

Arguments

  • id (String!): The unique ID of the user to delete.

Returns

  • A User object representing the deleted Admin user.

deleteStandardUser

Deletes a Standard user from the system.

Arguments

  • id (String!): The unique ID of the user to delete.

Returns

  • A User object representing the deleted Standard user.

changeStandardUserToAdmin

Upgrades a Standard user to an Admin.

Arguments

  • id (String!): The unique ID of the user to upgrade.

Returns

  • A User object representing the upgraded Admin user.

changeAdminToStandardUser

Downgrades an Admin user to a Standard user.

Arguments

  • id (String!): The unique ID of the user to downgrade.

Returns

  • A User object representing the downgraded Standard user.

activateUser

Activates a user in the system.

Arguments

  • id (String!): The unique ID of the user to activate.

Returns

  • A User object representing the activated user.

Queries

getUser

Description:Retrieves details about a specific user.

Arguments

  • id (String!): The unique ID of the user to retrieve.

Returns:User object.

listUsers

Description:Lists all users with optional filters.

Arguments

  • filter (UserFilter): Filters for querying users (optional).

Returns:[User] (List of User objects).

getTenant

Description:Retrieves details about a specific tenant.

Arguments

  • id (String!): The unique ID of the tenant to retrieve.

Returns:Tenant object.

getPlan

Description:Retrieves details about a specific plan.

Arguments

  • id (String!): The unique ID of the plan to retrieve.

Returns:Plan object.

listPlans

Description:Lists all plans available.

Returns:[Plan] (List of Plan objects).

getTenantTrialPeriod

Description:Retrieves the specific details of the Tenant’s Trial Period, including calculated status and timestamp.

Arguments

  • None required.

Returns:TenantTrialPeriod object.

checkout

Description:Initiates a checkout process for a plan.

Arguments

  • planId (String!): The ID of the plan to checkout.

Returns:Checkout information (not specified in the extract, assumed to be a custom object).

listPaymentMethods

Description:Lists all payment methods associated with a user or tenant. Arguments

  • None required, may depend on user session or context. Returns:[PaymentMethod] (List of PaymentMethod objects).

getUpcomingInvoice

Description:Retrieves a preview of the upcoming invoice, usually after a plan change or an anticipated charge.

Returns:PreviewPlanChange object detailing the anticipated changes and charges.

listInvoices

Description:Retrieves a list of all invoices associated with the user’s account.

Returns:[Invoice] array of Invoice objects detailing each invoice’s information.

listCharges

Description:Retrieves a list of all charges made to the account, optionally filtered and limited.

Arguments

  • input (ListChargesInput): Input structure containing filter criteria for the charges.
  • limit (Int): Optional limit on the number of charges returned.

Returns:[Charge] array of Charge objects detailing each charge.

Subscriptions

planModified

Description:Subscription that triggers when a user’s Payment Plan has been modified, typically requiring a token claim refresh.

Arguments

  • id (String!): The unique ID of the tenant whose plan was modified.

Returns:Tenant object reflecting the updated plan details.

Related Mutations:changePlan, confirmAddPlan

paymentMethodAdded

Description:Subscription that triggers when a new payment method has been added to a tenant’s account.

Arguments

  • tenantId (String!): The unique ID of the tenant to whom the payment method was added.

Returns:PaymentMethod object with details of the newly added method.

Related Mutations:confirmAddPaymentMethod

userAdded

Description:Subscription that triggers when a new user has been added to the system.

Arguments

  • tenantId (String!): The unique ID of the tenant under which the user was added.

Returns:User object detailing the added user’s information.

Related Mutations:addAdminUser, addStandardUser

userDeleted

Description:Subscription that triggers when a user has been deleted from the system.

Arguments

  • tenantId (String!): The unique ID of the tenant under which the user was deleted.

Returns:User object that was deleted.

Related Mutations:deleteAdminUser, deleteStandardUser

planCanceled

Description:Subscription that triggers when a Payment Plan has been canceled.

Arguments

  • id (String!): The unique ID of the tenant whose plan was canceled.

Returns:Tenant object reflecting the cancellation of the plan.

Related Mutations:cancelPlanPeriodEndedWebhook

accountDeleted

Description:Subscription that triggers when an account has been deleted, typically logging out users and redirecting to the login page.

Arguments

  • id (String!): The unique ID of the tenant whose account was deleted.

Returns:Tenant object that was deleted.

Related Mutations:deleteAccount

Types

User

Fields

- `id` (`String`): Unique identifier of the user.
- `email` (`AWSEmail`): Email address of the user.
- `enabled` (`Boolean`): Status indicating if the user's

account is active.

  • group (String): Group or role the user belongs to.
  • groupModified (AWSDateTime): Timestamp of the last modification to the user’s group.
  • created (AWSDateTime): Creation timestamp of the user account.
  • modified (AWSDateTime): Timestamp of the last update to the user account.
  • status (String): Current status of the user’s account.
  • tenant (Tenant): Tenant to which the user belongs.
  • tenantId (String): ID of the tenant to which the user belongs.

Tenant

Fields

  • id (ID): Unique identifier of the tenant.
  • planId (ID): Identifier of the plan the tenant is subscribed to.
  • trialPeriodDays (Int): Number of trial period days.
  • trialPeriodTimestamp (Int): Timestamp marking the start of the trial period.
  • plan (Plan): Details of the plan subscribed by the tenant.
  • users ([User]): List of users associated with the tenant.
  • trialPeriod (TenantTrialPeriod): Details of the tenant’s trial period.
  • cancelPlanAt (Int): Timestamp when the plan is scheduled for cancellation.
  • deleteAccountFlag (Boolean): Flag indicating if the tenant’s account is marked for deletion.

Plan

Fields

  • id (ID): Unique identifier of the plan.
  • title (String): Title or name of the plan.
  • price (Int): Price of the plan.
  • priceSet (String): Description or set to which the price belongs.
  • statementDescriptor (String): Descriptor of the plan used in statements.
  • featureList (String): List of features included in the plan.
  • totalUsers (Int): Maximum number of users allowed under this plan.
  • cancelAtPeriodEnd (Boolean): Whether the plan is set to cancel at the period’s end.

TenantTrialPeriod

Fields

  • trialPeriodTimestamp (Int): Timestamp when the trial period started.
  • trialPeriodStatus (String): Status of the trial period.

PaymentMethod

Description:Payment Processor Payment Method Details.

Fields

  • id (String): Identifier of the payment method.
  • paymentType (String): Type of payment method.
  • expirationDate (String): Expiration date of the payment method.
  • last4 (Int): Last four digits of the card number.
  • cardType (String): Type of card, e.g., Visa, MasterCard.
  • default (Boolean): Indicates if this is the default payment method.

Charge

Description:Data object returned from the listCharges query.

Fields

  • id (String): Unique identifier of the charge.
  • amount (Int): Amount charged.
  • created (Int): Timestamp when the charge was created.
  • paid (Boolean): Indicates if the charge has been paid.
  • paymentType (String): Type of payment method used.
  • last4 (String): Last four digits of the card used.
  • refunded (Boolean): Indicates if the charge has been refunded.
  • refundedAmount (Int): Amount that has been refunded.
  • failureMessage (String): Message describing why a charge failed, if applicable.

Invoice

Description:Represents an invoice generated for a transaction or billing cycle.

Fields

  • id (String): Unique identifier of the invoice.
  • planId (String): Associated plan ID for which the invoice was generated.
  • amountPaid (Int): Total amount paid.
  • amountDue (Int): Amount due.
  • amountRemaining (Int): Remaining amount that has not yet been paid.
  • description (String): Description of the invoice.
  • periodStart (Int): Start of the billing period.
  • periodEnd (Int): End of the billing period.
  • pdfUrl (String): URL to download the invoice PDF.
  • number (String): Invoice number.
  • startingBalance (Int): Starting balance at the beginning of the billing period.
  • planAmount (Int): Amount related to the plan.

SetupIntent

Description:Data object used with the stripe.js frontend for direct requests related to setting up plans.

Fields

  • planId (String): Plan ID associated with the setup intent.
  • clientSecret (String!): Secret key used for processing the setup intent.

MessageResult

Description:Generic response object for use with mutations that require conveying additional information.

Fields

  • messageType (String!): Type of message being conveyed.
  • message (String!): Content of the message.

Inputs

ListChargesInput

Fields

  • startDate (AWSDateTime): Start date for filtering charges.
  • endDate (AWSDateTime): End date for filtering charges.

PaymentMethodInput

Description:Input type for providing payment method details.

Fields

  • paymentType (String): Type of the payment method, e.g., credit card, PayPal.
  • expirationDate (String): Expiration date of the payment method.
  • last4 (Int): Last four digits of the card number.
  • cardType (String): Type of card, e.g., Visa, MasterCard.
  • default (Boolean): Indicates if this payment method should be set as the default.

WebhookValidationInput

Description:Required inputs for validating webhook requests, particularly for subscription cancellation via webhook.

Fields

  • tenantId (String!): The tenant ID to which the webhook pertains.
  • headers (String!): Headers from the webhook request, used for validating the request origin and integrity.
  • body (String!): Body of the webhook request, used for further validation and processing.

ContactUsInput

Description:Input type for the contactUs mutation, used for sending messages via the contact form.

Fields

  • subject (String!): Subject of the contact message.
  • message (String!): Content of the message.
  • captchaToken (String!): Captcha token to validate that the submission is made by a human.
  • email (AWSEmail!): Email address of the sender, for response or verification purposes.