Skip to content

Queries

Queries are read operations that retrieve data from the Stations API. This page documents all available queries.

Stations

listStations

List all stations in your account.

query ListStations {
listStations {
id
tenantId
name
description
remotePortalId
}
}

Access: Free, Owner, Admin, User


getStation

Get a specific station by ID.

query GetStation($id: ID!) {
getStation(id: $id) {
id
tenantId
name
description
remotePortalId
}
}

Parameters:

NameTypeRequiredDescription
idIDYesThe station ID

Access: Free, Owner, Admin, User


Routes

listRoutes

List all routes in your account.

query ListRoutes {
listRoutes {
id
tenantId
name
description
status
totalStops
stops {
id
name
status
type
}
track
actionLog {
action
timestamp
userId
stopId
stopName
}
}
}

Access: Free, Owner, Admin, User


getRoute

Get a specific route with full details.

query GetRoute($id: ID!) {
getRoute(id: $id) {
id
tenantId
name
description
status
totalStops
stops {
id
type
stationId
name
status
asynchronousChildren
station {
id
name
description
remotePortalId
}
}
track
actionLog {
action
timestamp
userId
stopId
stopName
}
}
}

Parameters:

NameTypeRequiredDescription
idIDYesThe route ID

Access: Free, Owner, Admin, User


Route Templates

listRouteTemplates

List all route templates.

query ListRouteTemplates {
listRouteTemplates {
id
tenantId
name
description
stops {
id
name
type
}
track
}
}

Access: Free, Owner, Admin, User


getRouteTemplate

Get a specific route template.

query GetRouteTemplate($id: ID!) {
getRouteTemplate(id: $id) {
id
tenantId
name
description
stops {
id
type
stationId
name
status
asynchronousChildren
station {
id
name
description
}
}
track
}
}

Parameters:

NameTypeRequiredDescription
idIDYesThe template ID

Access: Free, Owner, Admin, User


Users

listUsers

List all users in your account.

query ListUsers {
listUsers {
id
email
enabled
group
groupModfified
created
modified
status
tenantId
}
}

Access: Owner, Admin, User


getUser

Get a specific user’s details.

query GetUser($id: String!) {
getUser(id: $id) {
id
email
enabled
group
groupModfified
created
modified
status
tenantId
tenant {
id
planId
plan {
title
}
}
}
}

Parameters:

NameTypeRequiredDescription
idStringYesThe user ID

Access: Owner, Admin, User


Tenant & Plans

getTenant

Get tenant information and associated plan.

query GetTenant {
getTenant {
id
planId
trialPeriodDays
trialPeriodTimestamp
cancelPlanAt
deleteAccountFlag
plan {
id
title
price
priceSet
featureList
totalUsers
totalActiveRoutes
totalTemplates
}
users {
id
email
group
}
trialPeriod {
trialPeriodTimestamp
trialPeriodStatus
}
}
}

Access: Free, Owner, Admin, User


getTenantTrialPeriod

Get trial period status and calculated eligibility.

query GetTenantTrialPeriod {
getTenantTrialPeriod {
trialPeriodTimestamp
trialPeriodStatus
}
}

Access: Free, Owner, Admin, User


listPlans

List all available subscription plans.

query ListPlans {
listPlans {
id
title
price
priceSet
statementDescriptor
featureList
totalUsers
totalActiveRoutes
totalTemplates
cancelAtPeriodEnd
}
}

Access: Public (IAM) + Free, Owner, Admin, User


getPlan

Get details of a specific plan.

query GetPlan($id: String!) {
getPlan(id: $id) {
id
title
price
priceSet
statementDescriptor
featureList
totalUsers
totalActiveRoutes
totalTemplates
}
}

Parameters:

NameTypeRequiredDescription
idStringYesThe plan ID

Access: Free, Owner, Admin, User


Billing

checkout

Get payment and proration preview for changing plans.

query Checkout($planId: String!) {
checkout(planId: $planId) {
nextInviceSubTotal
newPlanTotal
oldPlanTotal
newPlanTotalRemaining
oldPlanTotalUnused
nextInvoiceTimestamp
previousInvoiceTimestamp
}
}

Parameters:

NameTypeRequiredDescription
planIdStringYesTarget plan ID

Access: Owner


getUpcomingInvoice

Get upcoming invoice details.

query GetUpcomingInvoice {
getUpcomingInvoice {
nextInviceSubTotal
newPlanTotal
oldPlanTotal
newPlanTotalRemaining
oldPlanTotalUnused
nextInvoiceTimestamp
previousInvoiceTimestamp
}
}

Access: Owner


listCharges

Get payment history.

query ListCharges($input: ListChargesInput, $limit: Int) {
listCharges(input: $input, limit: $limit) {
id
amount
created
paid
paymentType
last4
refunded
refundedAmount
failureMessage
}
}

Parameters:

NameTypeRequiredDescription
input.perPageIntNoResults per page
input.startingAfterStringNoCursor for pagination
input.endingBeforeStringNoCursor for pagination
limitIntNoMaximum results

Access: Owner, Admin


listPaymentMethods

List saved payment methods.

query ListPaymentMethods {
listPaymentMethods {
id
paymentType
expirationDate
last4
cardType
default
}
}

Access: Free, Owner


listInvoices

List all invoices.

query ListInvoices {
listInvoices {
id
planId
amountPaid
amountDue
amountRemaining
description
periodStart
periodEnd
pdfUrl
number
startingBalance
planAmount
}
}

Access: Free, Owner


Processing

processInstructions

Process and validate route instructions.

query ProcessInstructions($input: ProcessInstructionsInput!) {
processInstructions(input: $input) {
id
name
stops {
id
name
type
}
track
}
}

Input:

input ProcessInstructionsInput {
id: ID
name: String!
instructions: [RouteInstructionInput]!
allStations: [AllStationsProcessInstructionsInput]!
allRouteTemplates: [AllRouteTemplatesProcessInstructionsInput]
allRoutes: [AllRoutesProcessInstructionsInput]
}

Access: Free, Owner, Admin