Ideavate Developer Hub
  • Guides
    • Getting Started
      • Access Token Issuance
      • Using GraphQL
      • Example GraphQL Queries
    • Open Utilities API
      • Introduction
      • Consent and credential sharing
      • Access levels
      • Data update notifications
      • Using Auth Link
    • Data APIs
      • QR code parser
      • Vehicle lookup
  • API Reference
    • Auth Link API
      • Security
      • GET /link
      • POST /token
      • GET /status
    • GraphQL API
      • Authentication
      • Data Model
      • GET or POST /graphql
      • Error Handling
      • Webhooks
  • GraphQL Explorer
Powered by GitBook
On this page
  • Assets
  • Accounts
  • Provisions
  • Documents
  • User
  1. Guides
  2. Getting Started

Example GraphQL Queries

Some sample GraphQL queries to get you started

PreviousUsing GraphQLNextOpen Utilities API

Last updated 2 years ago

Assets

Get the assets and their associated provisions:

{
  getAssets {
    provisions {
      __typename
      lastUpdatedAt
    }
    __typename
    ... on Property {
      postcode
    }
    ... on Vehicle {
      identifier
    }
  }
}

Accounts

Get the accounts with their logos and deep links to within Onedox:

{
  getAccounts {
    id
    name
    provider {
      name
    }
    logoUrl
    appLink {
      universal
    }
  }
}

Provisions

Get provisions along with their type and some more details for vehicles and media packages:

{
  getProvisions {
    __typename
    lastUpdatedAt
    account {
      name
      provider {
        name
      }
    }
    startsAt
    endsAt
    ... on VehicleMot {
      motStatus: status
      vehicle {
        identifier
      }
    }
    ... on VehicleTax {
      taxStatus: status
      vehicle {
        identifier
      }
    }
    ... on MediaPackage {
      name
      features
      status
    }
  }
}

Documents

Get documents for a particular account along with date and charges (where available):

{
  getAccount(id: "57dfdfc6ebb350890e60e9b1") {
    documents {
      date
      name
      types
      billMeta {
        dueAt
        totalCharges {
          currency
          amount
        }
      }
    }
  }
}

Get all accessible documents along with their iOS deep link and the name of the provider that they came from:

{
  getDocuments {
    date
    name
    types
    appLink {
      ios
    }
    account {
      provider {
        name
      }
    }
  }
}

User

Get the authenticated user and access permissions:

{
  getCaller {
    fullName
    email
  }

  getAuthorisedRoles
}

n.b. you will need to replace the id input with one that is valid for your own Onedox account.

Try in Explorer
Try in Explorer
Try in Explorer
Try in Explorer
Try in Explorer
Try in Explorer