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:
| Name | Type | Required | Description |
|---|---|---|---|
id | ID | Yes | The 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:
| Name | Type | Required | Description |
|---|---|---|---|
id | ID | Yes | The 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:
| Name | Type | Required | Description |
|---|---|---|---|
id | ID | Yes | The 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:
| Name | Type | Required | Description |
|---|---|---|---|
id | String | Yes | The 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:
| Name | Type | Required | Description |
|---|---|---|---|
id | String | Yes | The 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:
| Name | Type | Required | Description |
|---|---|---|---|
planId | String | Yes | Target 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:
| Name | Type | Required | Description |
|---|---|---|---|
input.perPage | Int | No | Results per page |
input.startingAfter | String | No | Cursor for pagination |
input.endingBefore | String | No | Cursor for pagination |
limit | Int | No | Maximum 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