Divvy GraphQL API Documentation

Welcome

Welcome

Welcome to the Divvy API! You can use our API to extend and enhance Divvy into your internal systems and workflows. This API is made using GraphQL. The sections below will help you get up and running with GraphQL and our API.

Divvy's API can also be explored interactively using the Apollo Studio Explorer where you can build queries and mutations, and see the responses from the API.

Endpoint & Authentication

Endpoint & Authentication

The Divvy GraphQL API endpoint can be found at:

# Production GraphQL Endpoint
https://api.divvy.co/graphql

All requests require a valid access token. Tokens can be generated by visiting your user settings page in the main Divvy application.

Include your token as a x-divvy-api-token header on all API requests. In addition, the x-api-version header must be passed with the value of 2 :

# Required Headers
x-api-version: 2
x-divvy-api-token: <YOUR API TOKEN>

Below is an example of making a GraphQL query request using curl:

curl --request POST \
    --url https://api.divvy.co/graphql \
  --header 'Content-Type: application/json' \
  --header 'x-api-version: 2' \
  --header 'x-divvy-api-token: <YOUR API TOKEN HERE>' \
  --url https://api.divvy.co/graphql \
  --data '{"query":"{ currentUser { company { budgets(first: 2) { edges { node { name } } } } } }"}'

GraphQL Basics

GraphQL Basics

In GraphQL, all CRUD (Create, Read, Update, Delete) operations are performed by sending POST HTTP requests to a single endpoint. The endpoint for the Divvy API is https://api.divvy.co/graphql. This is different from a REST API where you would have many endpoints using various HTTP methods to retrieve and update data from a server.

There are two types of operations in GraphQL: queries and mutations. Both are performed by sending a POST request along with a query string using the JSON content type. We will discuss each below.

Queries

Queries are used for accessing data and are most equivalent to the GET request used in REST APIs. It is a read-only operation; you cannot create, update, or delete data using queries. (To perform these actions, see the Mutations section below).

Here is an example of what a typical query for fetching budget data looks like:

query OptionalQueryName {
  currentUser {
    company {
      budgets(first: 2) {
        edges {
          node {
            id
            name
          }
        }
      }
    }
  }

Let’s walk through the query above:

  1. Queries begin with the query keyword. An optional name can be provided and in this case we use OptionalQueryName as our name.
  2. We first begin by selecting the currentUser root query type. This fetches data about the API user making the request (based on the API key in the request header). This is the primary way to fetch data about your user and all data related to your user in the system.
  3. We then select the company field off of the user. The company field contains all data pertaining to the company to which you belong, and is the best way to get company-wide data such as budgets, transactions, and other company users.
  4. Within the company field we select budgets, which will select a list of all budgets within the company. The parenthesis with first: 2 after the budgets field is a query argument that is asking for the first two budgets from the list.
  5. Because we are querying for a list of items (budgets), we then specify the edges field, which is how we will select for the list of budgets in the company.
  6. The actual data for each budget will be contained in an object under the node field, so that field must be added next.
  7. Finally, we select the id and name fields within each budget object so that we get only those two back in our response.

While there are many more fields that could have been added to the query (for instance, each budget node contains more fields about the budget) we only asked for name and id. This makes GraphQL more flexible and efficient in that you only get data back that the query asks for, preventing under-fetching or over-fetching data.

This query results in the JSON response below:

{
  "data": {
    "currentUser": {
      "company": {
        "budgets": {
          "edges": [
            {
              "node": {
                "id": "QnVkZ2V0OjI2NjQ1MA==",
                "name": "Accounting"
              }
            },
            {
              "node": {
                "id": "QnVkZ2V0OjMyNjM1MQ==",
                "name": "Administration"
              }
            }
          ]
        }
      }
    }
  }
}

Mutations

Mutations allow you to create, update, and delete data. They are structured similar to queries:

mutation {
    createVirtualCardForBudget(input: {
        amount: 1000,
        budgetId: "QnVkZ2V0OjI2NjQ1MA==",
        ownerId: "VXNlcjoxMzQ1NQ==",
        name: "New Card",
        type: "RECURRING"
    }) {
        newCardEdge {
            expirationDate
            id
            name
            lastFour
            type
            user {
                id
            }
        }
    }
}
  1. Similar to the query keyword, we must specify the mutation keyword.
  2. The name of the mutation being performed is specified next. In this case, the mutation name is createVirtualCardForBudget.
  3. This mutation takes an argument called input, which in this case is an object containing a number of properties (some are required, some are not). Here we pass in the IDs and other data needed to create a new virtual card.
  4. Mutations also contain a query block after the arguments, in which fields can be queried for in response to the mutation succeeding. For this mutation, we want to retrieve relevant data about the newly created card back, which is in the newCardEdge field.

This mutation results in the response below:

{
  "data": {
    "createVirtualCardForBudget": {
      "newCardEdge": {
        "node": {
          "expirationDate": "09/25",
          "id": "Q2FyZDo3NTcyMTI0",
          "lastFour": "0123",
          "name": "New Card",
          "type": "RECURRING",
          "user": {
            "id": "VXNlcjoxMzQ1NQ=="
          }
        }
      }
    }
  }
}

The currentUser Query

The currentUser Query

The main root query type of the Divvy API is currentUser. This query returns the User type, which contains all the data related to your user account in the Divvy system. This includes personal information (e.g. your name, email, phone number, etc) as well as your company data (e.g. budgets, transactions, other users, etc).

The company data you can access is determined by your user permission levels and is a subset of what you are able to see and do in the web application. For example, if you are a company admin who can see all budgets in your organization using the web application, you can also query for all the same budgets using the API.

The best way of accessing your company data is by querying for the company field on currentUser. This field returns the Company type, which contains all company-level fields described above. Below is an example query that queries for the budgets, transactions, and users fields, with placeholder fragments indicating subsequent fields on those objects can be selected.

query {
  currentUser {
    company {
      budgets {
        ...BudgetConnectionFragment
      }
      transactions {
        ...TransactionConnectionFragment
      }
      users {
        ...UserConnectionFragment
      }
    }
  }
}

Pagination & Sorting

Pagination & Sorting

In order to paginate through a list of results, we need to use the cursor field available on any Edge type and provide that as a query argument to a query. Let’s take the same example of querying for budgets that we looked at above and see how to paginate the results.

First, we will start off by querying for our list of budgets, limiting to two results and this time adding the cursor field to our query:

query {
  currentUser {
    company {
     budgets(first: 2) {
       pageInfo {
         startCursor
         endCursor
         hasNextPage
         hasPreviousPage
       }
       edges {
         cursor
         node {
           id
           name
         }
       }
     }
    }
  }
}

Note how we also query for the pageInfo field on budgets . This provides data related to the page results specific to our query.

We will then receive the following response, which includes the cursor data we queried for:

{
  "data": {
    "currentUser": {
      "company": {
        "budgets": {
          "edges": [
            {
              "cursor": "YXJyYXljb25uZWN0aW9uOjA=",
              "node": {
                "id": "QnVkZ2V0OjI2NjQ1MA==",
                "name": "Accounting"
              }
            },
            {
              "cursor": "YXJyYXljb25uZWN0aW9uOjE=",
              "node": {
                "id": "QnVkZ2V0OjMyNjM1MQ==",
                "name": "Administration"
              }
            }
          ],
          "pageInfo": {
            "endCursor": "YXJyYXljb25uZWN0aW9uOjE=",
            "hasNextPage": true,
            "hasPreviousPage": false,
            "startCursor": "YXJyYXljb25uZWN0aW9uOjA="
          }
        }
      }
    }
  }
}

Within each budget object, we now have a cursor ID that indicates where in the list that budget object resides. We also receive our pageInfo data, which tells us the start and end cursors for this particular query result. Because we only queried for 2 budgets, the start and end cursor IDs represent the two budgets in our list.

Now we can take the cursor ID from the second result (YXJyYXljb25uZWN0aW9uOjE=) and pass that in as the after argument to our budgets field to get to the next page of budgets, keeping our page length to two items:

query {
  currentUser {
    company {
     budgets(first: 2, after: "YXJyYXljb25uZWN0aW9uOjE=") {
       pageInfo {
         startCursor
         endCursor
         hasNextPage
         hasPreviousPage
       }
       edges {
         cursor
         node {
           id
           name
         }
       }
     }
    }
  }
}

In response, we receive the next two budgets in the list:

{
  "data": {
    "currentUser": {
      "company": {
        "budgets": {
          "edges": [
            {
              "cursor": "YXJyYXljb25uZWN0aW9uOjI=",
              "node": {
                "id": "QnVkZ2V0OjEyOTMzMg==",
                "name": "Finance"
              }
            },
            {
              "cursor": "YXJyYXljb25uZWN0aW9uOjM=",
              "node": {
                "id": "QnVkZ2V0OjMyOTgyNg==",
                "name": "Communications"
              }
            }
          ],
          "pageInfo": {
            "endCursor": "YXJyYXljb25uZWN0aW9uOjM=",
            "hasNextPage": true,
            "hasPreviousPage": true,
            "startCursor": "YXJyYXljb25uZWN0aW9uOjI="
          }
        }
      }
    }
  }
}

We can also pass in arguments of sortColumn and sortDirection to indicate the order of our paginated results. See more in the types section about the values for those arguments and their defaults for specific fields. Below is a simple example of how we would sort our budgets by name in descending order:

query {
  currentUser {
    company {
     budgets(first: 2, after: "YXJyYXljb25uZWN0aW9uOjE=", sortColumn: "name", sortDirection: "desc") {
       edges {
         cursor
         node {
           id
           name
         }
       }
     }
    }
  }
}

Guides

Guides

How to Create Virtual Cards

Step 1: Use currentUser query to fetch available Budget IDs and User IDs

In order to create virtual cards and have them assigned to a specific user and budget, we will first fetch the relevant user IDs and budget IDs.

The best way to do this is to query for them using the currentUser query:

query {
  currentUser {
    company {
      budgets(first: 1) {
        edges {
          node {
            id
            name
            users(first: 1) {
              edges {
                node {
                  id
                }
              }
            }
          }
        }
      }
    }
  }
}

This will return the requested list of budget IDs and user IDs we will need for the next step:

{
  "data": {
    "currentUser": {
      "company": {
        "budgets": {
          "edges": [
            {
              "node": {
                "id": "QnVkZ2V0OjI2NjQ1MA==",
                "name": "Accounting",
                "users": {
                  "edges": [
                    {
                      "node": {
                        "id": "VXNlcjoxMzQ1NQ=="
                      }
                    }
                  ]
                }
              }
            }
          ]
        }
      }
    }
  }
}

Step 2: Use createVirtualCardForBudget mutation to create the virtual cards

Using the budget and user IDs acquired in the above query, pass them in as the mutation input and select for the newCardEdge field in the mutation body. We also pass in an amount, name and type for the card. In the mutation body we select the id, expirationDate, lastFour, and user for this card.

mutation {
    createVirtualCardForBudget(input: {
        amount: 1000,
        budgetId: "QnVkZ2V0OjI2NjQ1MA==",
        ownerId: "VXNlcjoxMzQ1NQ==",
        name: "New Card",
        type: "RECURRING"
    }) {
        newCardEdge {
            expirationDate
            id
            name
            lastFour
            type
            user {
                id
            }
        }
    }
}

This will return the following response with the new card data that was selected for in the mutation body:

{
  "data": {
    "createVirtualCardForBudget": {
      "newCardEdge": {
        "node": {
          "expirationDate": "09/25",
          "id": "Q2FyZDo3NTcyMTI0",
          "lastFour": "0123",
          "name": "New Card",
          "type": "RECURRING",
          "user": {
            "id": "VXNlcjoxMzQ1NQ=="
          }
        }
      }
    }
  }
}

How to query for transaction data

Use the currentUser query to select the company and then transactions fields. Here we pass in the first argument to select the first two transactions. We also select for some user and card data about the transaction.

query {
  currentUser {
    company {
      transactions(first: 2) {
        edges {
          node {
            id
            amount
            user {
              id
              lastName
            }
            card {
              id
              lastFour
            }
          }
        }
      }
    }
  }
}

This results in the following JSON response:

{
  "data": {
    "currentUser": {
      "company": {
        "transactions": {
          "edges": [
            {
              "node": {
                "amount": 17682,
                "card": {
                  "id": "Q2FyZDo1MTA0MTU4",
                  "lastFour": "3384"
                },
                "id": "VHJhbnNhY3Rpb246MTZmNjQ5Y2YtYjJkMi00YTllLWE2ODQtZDViN2FkNjRiOTZj",
                "user": {
                  "id": "VXNlcjozNjExNzc=",
                  "lastName": "Nez"
                }
              }
            },
            {
              "node": {
                "amount": 22225,
                "card": {
                  "id": "Q2FyZDo3MTIzMjc=",
                  "lastFour": "0842"
                },
                "id": "VHJhbnNhY3Rpb246MGU2NGRkZGItOWIwMS00NGEzLWE4Y2QtZjMzZTFhZjk2MWU3",
                "user": {
                  "id": "VXNlcjoxMDM3NDg=",
                  "lastName": "Doe"
                }
              }
            }
          ]
        }
      }
    }
  }
}

How to retrieve virtual credit card numbers

Primary Account Numbers for virtual cards are secured behind a separate API endpoint, at api.divvy.co/de/rest/pan. In order to use it, a temporary access token is needed. Each card has a token field which is a permanent identifier for the card. Since this token does not change, it is unsafe to use it for access control.

Step 1: Create a virtual card, and request the token field in the return data

mutation {
  createVirtualCardForBudget(input: {
    amount: 1000,
    budgetId: "QnVkZ2V0OjI2NjQ1MA==",
    ownerId: "VXNlcjoxMzQ1NQ==",
    name: "New Card",
    type: "RECURRING"
  }) {
    newCardEdge {
      expirationDate
      token
      id
      name
      lastFour
      type
      user {
        id
      }
    }
  }
}
{
  "data": {
    "createVirtualCardForBudget": {
      "newCardEdge": {
        "node": {
          "expirationDate": "09/25",
          "token": "002.R.c05c9fb4-fake-fake-fake-963a49553cec",
          "id": "Q2FyZDo3NTcyMTI0",
          "lastFour": "0123",
          "name": "New Card",
          "type": "RECURRING",
          "user": {
            "id": "VXNlcjoxMzQ1NQ=="
          }
        }
      }
    }
  }
}

Step 2: Use the getPanToken mutation to retrieve a PAN token for the de/rest/pan endpoint

This mutation generates a JWT token which contains all the necessary information to retrieve the virtual card's Primary Account Number. The token has a lifespan of five minutes.

mutation {
  getPanToken(input: {
    cardToken: "002.R.c05c9fb4-fake-fake-fake-963a49553cec"
  }) {
    token
  }
}
{
  "data": {
    "getPanToken": {
      "token":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c"
    }
  }
}

Step 3: Submit the PAN token to the de/rest/pan endpoint

No additional arguments or authentication is required for this endpoint; all the necessary information is encoded in the JWT token we received in the last step.

curl --location --request POST 'https://api.divvy.co/de/rest/pan' \
--header 'Content-Type: application/json' \
--data-raw '
{"token":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c"}'

The endpoint returns the expiration date, CVV, and card number for the requested card.

{"expirationDate":"010101","cvv":"999","cardNumber":"4482123456781234"}

Queries

currentUser

Description

Look up the logged-in User.

Eventually this will be changed to be of type UserAPIUser, and User properties of the current user will be provided through the UserAPIUser.profile field.

Response

Returns a User

Arguments
Name Description
actingOnCompany - ID The company ID of the company this query is being requested on. If no ID is provided, the X-Acting-On-Company Header is used instead. If no header is provided, the company of the defaultCurrentUser or first company available is chosen.

Example

Query
query CurrentUser($actingOnCompany: ID) {
  currentUser(actingOnCompany: $actingOnCompany) {
    firstName
    displayName
    middleInitial
    lastName
    email
    receiptEmail
    roleAttributes
    primaryRole
    cellPhone
    smsOptIn
    workPhone
    companyAdmin
    useCompanyMailingAddress
    insertedAt
    retired
    address {
      ...AddressFragment
    }
    totalCards
    allCards {
      ...CardConnectionFragment
    }
    cardsActiveThisPeriod {
      ...CardConnectionFragment
    }
    budgets {
      ...UserToBudgetsConnectionFragment
    }
    budgetCount
    company {
      ...CompanyFragment
    }
    initials
    dateOfBirth
    manager {
      ...UserFragment
    }
    id
  }
}
Variables
{"actingOnCompany": "4"}
Response
{
  "data": {
    "currentUser": {
      "firstName": "abc123",
      "displayName": "xyz789",
      "middleInitial": "xyz789",
      "lastName": "abc123",
      "email": "abc123",
      "receiptEmail": "abc123",
      "roleAttributes": ["BOOKKEEPER_MAKE_PAYMENT"],
      "primaryRole": "ADMIN",
      "cellPhone": "abc123",
      "smsOptIn": true,
      "workPhone": "xyz789",
      "companyAdmin": false,
      "useCompanyMailingAddress": false,
      "insertedAt": UnixTime,
      "retired": true,
      "address": Address,
      "totalCards": 987,
      "allCards": CardConnection,
      "cardsActiveThisPeriod": CardConnection,
      "budgets": UserToBudgetsConnection,
      "budgetCount": 123,
      "company": Company,
      "initials": "abc123",
      "dateOfBirth": "2007-12-03",
      "manager": User,
      "id": 4
    }
  }
}

mccGroups

Description

Get all MCC Groups

Response

Returns [MccGroup]

Example

Query
query MccGroups {
  mccGroups {
    id
    uid
    name
    mccs {
      ...MccFragment
    }
  }
}
Response
{
  "data": {
    "mccGroups": [
      {
        "id": 4,
        "uid": "abc123",
        "name": "xyz789",
        "mccs": [Mcc]
      }
    ]
  }
}

node

Response

Returns a Node

Arguments
Name Description
id - ID! The ID of an object.
actingOnCompany - ID The company ID of the company this query is being requested on. If no ID is provided, the X-Acting-On-Company Header is used instead. If no header is provided, the company of the defaultCurrentUser or first company available is chosen.

Example

Query
query Node(
  $id: ID!,
  $actingOnCompany: ID
) {
  node(
    id: $id,
    actingOnCompany: $actingOnCompany
  ) {
    id
  }
}
Variables
{"id": "4", "actingOnCompany": 4}
Response
{"data": {"node": {"id": "4"}}}

Mutations

addReceiptObjects

Description

Add multiple receipts to a specific Authorization with file_type

Response

Returns an AddReceiptObjectsPayload

Arguments
Name Description
input - AddReceiptObjectsInput!

Example

Query
mutation AddReceiptObjects($input: AddReceiptObjectsInput!) {
  addReceiptObjects(input: $input) {
    transaction {
      ...TransactionFragment
    }
    receipts {
      ...ReceiptFragment
    }
    failed
  }
}
Variables
{"input": AddReceiptObjectsInput}
Response
{
  "data": {
    "addReceiptObjects": {
      "transaction": Transaction,
      "receipts": [Receipt],
      "failed": ["xyz789"]
    }
  }
}

addReceiptUrl

Description

Add a receipt to a specific Authorization

Response

Returns an AddReceiptUrlPayload

Arguments
Name Description
input - AddReceiptUrlInput!

Example

Query
mutation AddReceiptUrl($input: AddReceiptUrlInput!) {
  addReceiptUrl(input: $input) {
    transaction {
      ...TransactionFragment
    }
    receipt {
      ...ReceiptFragment
    }
  }
}
Variables
{"input": AddReceiptUrlInput}
Response
{
  "data": {
    "addReceiptUrl": {
      "transaction": Transaction,
      "receipt": Receipt
    }
  }
}

addReceiptUrls

Description

Add multiple receipts to a specific Authorization

Response

Returns an AddReceiptUrlsPayload

Arguments
Name Description
input - AddReceiptUrlsInput!

Example

Query
mutation AddReceiptUrls($input: AddReceiptUrlsInput!) {
  addReceiptUrls(input: $input) {
    transaction {
      ...TransactionFragment
    }
    receipts {
      ...ReceiptFragment
    }
    failed
  }
}
Variables
{"input": AddReceiptUrlsInput}
Response
{
  "data": {
    "addReceiptUrls": {
      "transaction": Transaction,
      "receipts": [Receipt],
      "failed": ["xyz789"]
    }
  }
}

addTagValueToTransaction

Description

Add a tag value to a transaction

Response

Returns an AddTagValueToTransactionPayload

Arguments
Name Description
input - AddTagValueToTransactionInput!

Example

Query
mutation AddTagValueToTransaction($input: AddTagValueToTransactionInput!) {
  addTagValueToTransaction(input: $input) {
    transaction {
      ...TransactionFragment
    }
  }
}
Variables
{"input": AddTagValueToTransactionInput}
Response
{
  "data": {
    "addTagValueToTransaction": {
      "transaction": Transaction
    }
  }
}

addTransactionNote

Description

Add a note to a transaction

Response

Returns an AddTransactionNotePayload

Arguments
Name Description
input - AddTransactionNoteInput!

Example

Query
mutation AddTransactionNote($input: AddTransactionNoteInput!) {
  addTransactionNote(input: $input) {
    transaction {
      ...TransactionFragment
    }
  }
}
Variables
{"input": AddTransactionNoteInput}
Response
{
  "data": {
    "addTransactionNote": {"transaction": Transaction}
  }
}

archiveTagType

Description

Archive a tag type and its values

Response

Returns an ArchiveTagTypePayload

Arguments
Name Description
input - ArchiveTagTypeInput!

Example

Query
mutation ArchiveTagType($input: ArchiveTagTypeInput!) {
  archiveTagType(input: $input) {
    archivedTagTypeId
    company {
      ...CompanyFragment
    }
  }
}
Variables
{"input": ArchiveTagTypeInput}
Response
{
  "data": {
    "archiveTagType": {
      "archivedTagTypeId": 4,
      "company": Company
    }
  }
}

assignUserAllocationToTransaction

Description

Assign a user allocation to a transaction

Arguments
Name Description
input - AssignUserAllocationToTransactionInput!

Example

Query
mutation AssignUserAllocationToTransaction($input: AssignUserAllocationToTransactionInput!) {
  assignUserAllocationToTransaction(input: $input) {
    transaction {
      ...TransactionFragment
    }
  }
}
Variables
{"input": AssignUserAllocationToTransactionInput}
Response
{
  "data": {
    "assignUserAllocationToTransaction": {
      "transaction": Transaction
    }
  }
}

attachReceiptToTransaction

Description

Attach an existing receipt to a transaction

Response

Returns an AttachReceiptToTransactionPayload

Arguments
Name Description
input - AttachReceiptToTransactionInput!

Example

Query
mutation AttachReceiptToTransaction($input: AttachReceiptToTransactionInput!) {
  attachReceiptToTransaction(input: $input) {
    transaction {
      ...TransactionFragment
    }
    receipt {
      ...ReceiptFragment
    }
  }
}
Variables
{"input": AttachReceiptToTransactionInput}
Response
{
  "data": {
    "attachReceiptToTransaction": {
      "transaction": Transaction,
      "receipt": Receipt
    }
  }
}

createBudget

Description

Create a budget

Response

Returns a CreateBudgetPayload

Arguments
Name Description
input - CreateBudgetInput!

Example

Query
mutation CreateBudget($input: CreateBudgetInput!) {
  createBudget(input: $input) {
    company {
      ...CompanyFragment
    }
    newBudgetEdge {
      ...BudgetEdgeFragment
    }
  }
}
Variables
{"input": CreateBudgetInput}
Response
{
  "data": {
    "createBudget": {
      "company": Company,
      "newBudgetEdge": BudgetEdge
    }
  }
}

createBudgetMccControls

Description

Create a budget mcc control(s)

Response

Returns a CreateBudgetMccControlsPayload

Arguments
Name Description
input - CreateBudgetMccControlsInput!

Example

Query
mutation CreateBudgetMccControls($input: CreateBudgetMccControlsInput!) {
  createBudgetMccControls(input: $input) {
    budgetMccControls {
      ...BudgetMccControlFragment
    }
  }
}
Variables
{"input": CreateBudgetMccControlsInput}
Response
{
  "data": {
    "createBudgetMccControls": {
      "budgetMccControls": [BudgetMccControl]
    }
  }
}

createTagType

Description

Create a new tag type

Response

Returns a CreateTagTypePayload

Arguments
Name Description
input - CreateTagTypeInput!

Example

Query
mutation CreateTagType($input: CreateTagTypeInput!) {
  createTagType(input: $input) {
    company {
      ...CompanyFragment
    }
    newTagTypeEdge {
      ...TagTypeEdgeFragment
    }
  }
}
Variables
{"input": CreateTagTypeInput}
Response
{
  "data": {
    "createTagType": {
      "company": Company,
      "newTagTypeEdge": TagTypeEdge
    }
  }
}

createTagValue

Description

Create a new tag value

Response

Returns a CreateTagValuePayload

Arguments
Name Description
input - CreateTagValueInput!

Example

Query
mutation CreateTagValue($input: CreateTagValueInput!) {
  createTagValue(input: $input) {
    tagType {
      ...TagTypeFragment
    }
    newTagValueEdge {
      ...TagValueEdgeFragment
    }
  }
}
Variables
{"input": CreateTagValueInput}
Response
{
  "data": {
    "createTagValue": {
      "tagType": TagType,
      "newTagValueEdge": TagValueEdge
    }
  }
}

createTagValues

Description

Create multiple and update tag values

Response

Returns a CreateTagValuesPayload

Arguments
Name Description
input - CreateTagValuesInput!

Example

Query
mutation CreateTagValues($input: CreateTagValuesInput!) {
  createTagValues(input: $input) {
    tagType {
      ...TagTypeFragment
    }
    tagValues {
      ...TagValueFragment
    }
  }
}
Variables
{"input": CreateTagValuesInput}
Response
{
  "data": {
    "createTagValues": {
      "tagType": TagType,
      "tagValues": [TagValue]
    }
  }
}

createTransactionExport

Description

Create a transaction export

Response

Returns a CreateTransactionExportPayload

Arguments
Name Description
input - CreateTransactionExportInput!

Example

Query
mutation CreateTransactionExport($input: CreateTransactionExportInput!) {
  createTransactionExport(input: $input) {
    export {
      ...ExportFragment
    }
  }
}
Variables
{"input": CreateTransactionExportInput}
Response
{"data": {"createTransactionExport": {"export": Export}}}

createUser

Description

Create a user

Response

Returns a CreateUserPayload

Arguments
Name Description
input - CreateUserInput!

Example

Query
mutation CreateUser($input: CreateUserInput!) {
  createUser(input: $input) {
    user {
      ...UserFragment
    }
    company {
      ...CompanyFragment
    }
    newUserEdge {
      ...UserEdgeFragment
    }
  }
}
Variables
{"input": CreateUserInput}
Response
{
  "data": {
    "createUser": {
      "user": User,
      "company": Company,
      "newUserEdge": UserEdge
    }
  }
}

createUsers

Description

Bulk create users

Response

Returns a CreateUsersPayload

Arguments
Name Description
input - CreateUsersInput!

Example

Query
mutation CreateUsers($input: CreateUsersInput!) {
  createUsers(input: $input) {
    incompleteUsers {
      ...BulkCreateUserFragment
    }
  }
}
Variables
{"input": CreateUsersInput}
Response
{
  "data": {
    "createUsers": {"incompleteUsers": [BulkCreateUser]}
  }
}

createVirtualCardForBudget

Description

Create a virtual (subscription or one-time) card and associated items for a budget and user

Arguments
Name Description
input - CreateVirtualCardForBudgetInput!

Example

Query
mutation CreateVirtualCardForBudget($input: CreateVirtualCardForBudgetInput!) {
  createVirtualCardForBudget(input: $input) {
    newCardEdge {
      ...CardEdgeFragment
    }
    budget {
      ...BudgetFragment
    }
    company {
      ...CompanyFragment
    }
  }
}
Variables
{"input": CreateVirtualCardForBudgetInput}
Response
{
  "data": {
    "createVirtualCardForBudget": {
      "newCardEdge": CardEdge,
      "budget": Budget,
      "company": Company
    }
  }
}

deleteBudget

Description

Delete/retire a budget. Note that a deleted budget can be un-deleted/un-retired.

Response

Returns a DeleteBudgetPayload

Arguments
Name Description
input - DeleteBudgetInput!

Example

Query
mutation DeleteBudget($input: DeleteBudgetInput!) {
  deleteBudget(input: $input) {
    id
    retired
    company {
      ...CompanyFragment
    }
  }
}
Variables
{"input": DeleteBudgetInput}
Response
{
  "data": {
    "deleteBudget": {
      "id": 4,
      "retired": true,
      "company": Company
    }
  }
}

deleteBudgetMccControl

Description

Delete a budget mcc control

Response

Returns a DeleteBudgetMccControlPayload

Arguments
Name Description
input - DeleteBudgetMccControlInput!

Example

Query
mutation DeleteBudgetMccControl($input: DeleteBudgetMccControlInput!) {
  deleteBudgetMccControl(input: $input) {
    budgetMccControl {
      ...BudgetMccControlFragment
    }
  }
}
Variables
{"input": DeleteBudgetMccControlInput}
Response
{
  "data": {
    "deleteBudgetMccControl": {
      "budgetMccControl": BudgetMccControl
    }
  }
}

deleteCard

Description

Delete a card for a user

Response

Returns a DeleteCardPayload

Arguments
Name Description
input - DeleteCardInput!

Example

Query
mutation DeleteCard($input: DeleteCardInput!) {
  deleteCard(input: $input) {
    user {
      ...UserFragment
    }
    deletedCardId
    company {
      ...CompanyFragment
    }
    budget {
      ...BudgetFragment
    }
  }
}
Variables
{"input": DeleteCardInput}
Response
{
  "data": {
    "deleteCard": {
      "user": User,
      "deletedCardId": "4",
      "company": Company,
      "budget": Budget
    }
  }
}

deleteReceipt

Description

Delete a receipt

Response

Returns a DeleteReceiptPayload

Arguments
Name Description
input - DeleteReceiptInput!

Example

Query
mutation DeleteReceipt($input: DeleteReceiptInput!) {
  deleteReceipt(input: $input) {
    transaction {
      ...TransactionFragment
    }
    receiptId
  }
}
Variables
{"input": DeleteReceiptInput}
Response
{
  "data": {
    "deleteReceipt": {
      "transaction": Transaction,
      "receiptId": 4
    }
  }
}

deleteTagValue

Description

Delete a tag value

Response

Returns a DeleteTagValuePayload

Arguments
Name Description
input - DeleteTagValueInput!

Example

Query
mutation DeleteTagValue($input: DeleteTagValueInput!) {
  deleteTagValue(input: $input) {
    deletedTagValueId
    tagType {
      ...TagTypeFragment
    }
  }
}
Variables
{"input": DeleteTagValueInput}
Response
{
  "data": {
    "deleteTagValue": {
      "deletedTagValueId": 4,
      "tagType": TagType
    }
  }
}

deleteUser

Description

Delete a user

Response

Returns a DeleteUserPayload

Arguments
Name Description
input - DeleteUserInput!

Example

Query
mutation DeleteUser($input: DeleteUserInput!) {
  deleteUser(input: $input) {
    id
    company {
      ...CompanyFragment
    }
  }
}
Variables
{"input": DeleteUserInput}
Response
{"data": {"deleteUser": {"id": 4, "company": Company}}}

deleteUserDefaultTag

Description

Delete a user default tag

Response

Returns a DeleteUserDefaultTagPayload

Arguments
Name Description
input - DeleteUserDefaultTagInput!

Example

Query
mutation DeleteUserDefaultTag($input: DeleteUserDefaultTagInput!) {
  deleteUserDefaultTag(input: $input) {
    ok
  }
}
Variables
{"input": DeleteUserDefaultTagInput}
Response
{"data": {"deleteUserDefaultTag": {"ok": true}}}

detachReceiptFromTransaction

Description

Detach an existing receipt from a transaction

Arguments
Name Description
input - DetachReceiptFromTransactionInput!

Example

Query
mutation DetachReceiptFromTransaction($input: DetachReceiptFromTransactionInput!) {
  detachReceiptFromTransaction(input: $input) {
    transaction {
      ...TransactionFragment
    }
    receipt {
      ...ReceiptFragment
    }
  }
}
Variables
{"input": DetachReceiptFromTransactionInput}
Response
{
  "data": {
    "detachReceiptFromTransaction": {
      "transaction": Transaction,
      "receipt": Receipt
    }
  }
}

detailedUpdateUsers

Description

Update user membership and/or role within a budget, as well as update their budget amount and send funds

Response

Returns a DetailedUpdateUsersPayload

Arguments
Name Description
input - DetailedUpdateUsersInput!

Example

Query
mutation DetailedUpdateUsers($input: DetailedUpdateUsersInput!) {
  detailedUpdateUsers(input: $input) {
    budget {
      ...BudgetFragment
    }
    status
  }
}
Variables
{"input": DetailedUpdateUsersInput}
Response
{
  "data": {
    "detailedUpdateUsers": {
      "budget": Budget,
      "status": "abc123"
    }
  }
}

editTagType

Description

Edit a tag type

Response

Returns an EditTagTypePayload

Arguments
Name Description
input - EditTagTypeInput!

Example

Query
mutation EditTagType($input: EditTagTypeInput!) {
  editTagType(input: $input) {
    tagType {
      ...TagTypeFragment
    }
  }
}
Variables
{"input": EditTagTypeInput}
Response
{"data": {"editTagType": {"tagType": TagType}}}

freezeCard

Description

Freeze a card

Response

Returns a FreezeCardPayload

Arguments
Name Description
input - FreezeCardInput!

Example

Query
mutation FreezeCard($input: FreezeCardInput!) {
  freezeCard(input: $input) {
    card {
      ...CardFragment
    }
  }
}
Variables
{"input": FreezeCardInput}
Response
{"data": {"freezeCard": {"card": Card}}}

generateReceiptUploadUrl

Description

Generate a pre-signed AWS S3 URL for uploading a receipt

Response

Returns a GenerateReceiptUploadUrlPayload

Arguments
Name Description
input - GenerateReceiptUploadUrlInput!

Example

Query
mutation GenerateReceiptUploadUrl($input: GenerateReceiptUploadUrlInput!) {
  generateReceiptUploadUrl(input: $input) {
    url
  }
}
Variables
{"input": GenerateReceiptUploadUrlInput}
Response
{
  "data": {
    "generateReceiptUploadUrl": {
      "url": "xyz789"
    }
  }
}

getPanToken

Description

Generates a retrieval token for accessing the full PAN of a card

Response

Returns a GetPanTokenPayload

Arguments
Name Description
input - GetPanTokenInput!

Example

Query
mutation GetPanToken($input: GetPanTokenInput!) {
  getPanToken(input: $input) {
    token
  }
}
Variables
{"input": GetPanTokenInput}
Response
{
  "data": {
    "getPanToken": {"token": "xyz789"}
  }
}

panTokenByCardId

Description

Generates a retrieval token for accessing the full PAN of a card, by card ID rather than card token

Response

Returns a PanTokenByCardIdPayload

Arguments
Name Description
input - PanTokenByCardIdInput!

Example

Query
mutation PanTokenByCardId($input: PanTokenByCardIdInput!) {
  panTokenByCardId(input: $input) {
    token
  }
}
Variables
{"input": PanTokenByCardIdInput}
Response
{
  "data": {
    "panTokenByCardId": {"token": "abc123"}
  }
}

removeTagValueFromTransaction

Description

Remove a tag value from a transaction

Arguments
Name Description
input - RemoveTagValueFromTransactionInput!

Example

Query
mutation RemoveTagValueFromTransaction($input: RemoveTagValueFromTransactionInput!) {
  removeTagValueFromTransaction(input: $input) {
    transaction {
      ...TransactionFragment
    }
  }
}
Variables
{"input": RemoveTagValueFromTransactionInput}
Response
{
  "data": {
    "removeTagValueFromTransaction": {
      "transaction": Transaction
    }
  }
}

resetTagType

Description

Reset all values for a tag type

Response

Returns a ResetTagTypePayload

Arguments
Name Description
input - ResetTagTypeInput!

Example

Query
mutation ResetTagType($input: ResetTagTypeInput!) {
  resetTagType(input: $input) {
    resetTagTypeId
    company {
      ...CompanyFragment
    }
  }
}
Variables
{"input": ResetTagTypeInput}
Response
{
  "data": {
    "resetTagType": {
      "resetTagTypeId": "4",
      "company": Company
    }
  }
}

setUserDefaultTagPrompt

Description

Set the prompt flag for a user's default tag

Response

Returns a SetUserDefaultTagPromptPayload

Arguments
Name Description
input - SetUserDefaultTagPromptInput!

Example

Query
mutation SetUserDefaultTagPrompt($input: SetUserDefaultTagPromptInput!) {
  setUserDefaultTagPrompt(input: $input) {
    userDefaultTag {
      ...UserDefaultTagFragment
    }
  }
}
Variables
{"input": SetUserDefaultTagPromptInput}
Response
{
  "data": {
    "setUserDefaultTagPrompt": {
      "userDefaultTag": UserDefaultTag
    }
  }
}

setUserDefaultTagValue

Description

Set the user default for a tag type

Response

Returns a SetUserDefaultTagValuePayload

Arguments
Name Description
input - SetUserDefaultTagValueInput!

Example

Query
mutation SetUserDefaultTagValue($input: SetUserDefaultTagValueInput!) {
  setUserDefaultTagValue(input: $input) {
    userDefaultTag {
      ...UserDefaultTagFragment
    }
  }
}
Variables
{"input": SetUserDefaultTagValueInput}
Response
{
  "data": {
    "setUserDefaultTagValue": {
      "userDefaultTag": UserDefaultTag
    }
  }
}

setValuesForTransaction

Description

Set the values for a Transactions custom fields

Response

Returns a SetValuesForTransactionPayload

Arguments
Name Description
input - SetValuesForTransactionInput!

Example

Query
mutation SetValuesForTransaction($input: SetValuesForTransactionInput!) {
  setValuesForTransaction(input: $input) {
    transaction {
      ...TransactionFragment
    }
  }
}
Variables
{"input": SetValuesForTransactionInput}
Response
{
  "data": {
    "setValuesForTransaction": {
      "transaction": Transaction
    }
  }
}

unfreezeCard

Description

Unfreeze a card

Response

Returns an UnfreezeCardPayload

Arguments
Name Description
input - UnfreezeCardInput!

Example

Query
mutation UnfreezeCard($input: UnfreezeCardInput!) {
  unfreezeCard(input: $input) {
    card {
      ...CardFragment
    }
  }
}
Variables
{"input": UnfreezeCardInput}
Response
{"data": {"unfreezeCard": {"card": Card}}}

updateBudget

Description

Update a budget

Response

Returns an UpdateBudgetPayload

Arguments
Name Description
input - UpdateBudgetInput!

Example

Query
mutation UpdateBudget($input: UpdateBudgetInput!) {
  updateBudget(input: $input) {
    budget {
      ...BudgetFragment
    }
  }
}
Variables
{"input": UpdateBudgetInput}
Response
{"data": {"updateBudget": {"budget": Budget}}}

updateBudgetMccControl

Description

Update a budget mcc control

Response

Returns an UpdateBudgetMccControlPayload

Arguments
Name Description
input - UpdateBudgetMccControlInput!

Example

Query
mutation UpdateBudgetMccControl($input: UpdateBudgetMccControlInput!) {
  updateBudgetMccControl(input: $input) {
    budgetMccControl {
      ...BudgetMccControlFragment
    }
  }
}
Variables
{"input": UpdateBudgetMccControlInput}
Response
{
  "data": {
    "updateBudgetMccControl": {
      "budgetMccControl": BudgetMccControl
    }
  }
}

updateCard

Description

Update a virtual card

Response

Returns an UpdateCardPayload

Arguments
Name Description
input - UpdateCardInput!

Example

Query
mutation UpdateCard($input: UpdateCardInput!) {
  updateCard(input: $input) {
    card {
      ...CardFragment
    }
    oldBudget {
      ...BudgetFragment
    }
  }
}
Variables
{"input": UpdateCardInput}
Response
{
  "data": {
    "updateCard": {
      "card": Card,
      "oldBudget": Budget
    }
  }
}

updateUser

Description

Update a user

Response

Returns an UpdateUserPayload

Arguments
Name Description
input - UpdateUserInput!

Example

Query
mutation UpdateUser($input: UpdateUserInput!) {
  updateUser(input: $input) {
    user {
      ...UserFragment
    }
  }
}
Variables
{"input": UpdateUserInput}
Response
{"data": {"updateUser": {"user": User}}}

updateUserAllocation

Description

Update a user allocation

New user allocations are automatically created when budget is created and/or users are added to an existing budget. For existing budgets with recurring allocations, new allocations are created at the end of each budget period.

Response

Returns an UpdateUserAllocationPayload

Arguments
Name Description
input - UpdateUserAllocationInput!

Example

Query
mutation UpdateUserAllocation($input: UpdateUserAllocationInput!) {
  updateUserAllocation(input: $input) {
    userAllocation {
      ...UserAllocationFragment
    }
    budget {
      ...BudgetFragment
    }
  }
}
Variables
{"input": UpdateUserAllocationInput}
Response
{
  "data": {
    "updateUserAllocation": {
      "userAllocation": UserAllocation,
      "budget": Budget
    }
  }
}

upsertUserAllocations

Response

Returns an UpsertUserAllocationsPayload

Arguments
Name Description
input - UpsertUserAllocationsInput!

Example

Query
mutation UpsertUserAllocations($input: UpsertUserAllocationsInput!) {
  upsertUserAllocations(input: $input) {
    budget {
      ...BudgetFragment
    }
    budgetPeriod {
      ...BudgetPeriodFragment
    }
  }
}
Variables
{"input": UpsertUserAllocationsInput}
Response
{
  "data": {
    "upsertUserAllocations": {
      "budget": Budget,
      "budgetPeriod": BudgetPeriod
    }
  }
}

validateReceipt

Description

validate existing receipt

Response

Returns a ValidateReceiptPayload

Arguments
Name Description
input - ValidateReceiptInput!

Example

Query
mutation ValidateReceipt($input: ValidateReceiptInput!) {
  validateReceipt(input: $input) {
    receipt {
      ...ReceiptFragment
    }
  }
}
Variables
{"input": ValidateReceiptInput}
Response
{"data": {"validateReceipt": {"receipt": Receipt}}}

Types

AccountingIntegrationTransaction

Fields
Field Name Description
id - ID! The ID of an object
billable - Boolean
integrationTxId - String
syncMessage - String
integrationType - String
integrationId - ID
transactionRecordId - ID
syncRequestId - String
updatedAt - UnixTime
syncStatus - String
Example
{
  "id": "4",
  "billable": true,
  "integrationTxId": "abc123",
  "syncMessage": "xyz789",
  "integrationType": "xyz789",
  "integrationId": 4,
  "transactionRecordId": "4",
  "syncRequestId": "abc123",
  "updatedAt": UnixTime,
  "syncStatus": "abc123"
}

ActivationStatus

Values
Enum Value Description

NOT_ACTIVATED

ACTIVATING

ACTIVATED

Example
"NOT_ACTIVATED"

AddReceiptObjectsInput

Fields
Input Field Description
transactionId - ID

Must provide null for this value if not attaching receipt to a transaction

urls - [ReceiptUrlInput]
Example
{
  "transactionId": "4",
  "urls": [ReceiptUrlInput]
}

AddReceiptObjectsPayload

Fields
Field Name Description
transaction - Transaction
receipts - [Receipt]
failed - [String]
Example
{
  "transaction": Transaction,
  "receipts": [Receipt],
  "failed": ["xyz789"]
}

AddReceiptUrlInput

Fields
Input Field Description
transactionId - ID

Must provide null for this value if not attaching receipt to a transaction

url - String
validated - Boolean
Example
{
  "transactionId": 4,
  "url": "abc123",
  "validated": false
}

AddReceiptUrlPayload

Fields
Field Name Description
transaction - Transaction
receipt - Receipt
Example
{
  "transaction": Transaction,
  "receipt": Receipt
}

AddReceiptUrlsInput

Fields
Input Field Description
transactionId - ID

Must provide null for this value if not attaching receipt to a transaction

urls - [String]
Example
{
  "transactionId": "4",
  "urls": ["xyz789"]
}

AddReceiptUrlsPayload

Fields
Field Name Description
transaction - Transaction
receipts - [Receipt]
failed - [String]
Example
{
  "transaction": Transaction,
  "receipts": [Receipt],
  "failed": ["abc123"]
}

AddTagValueToTransactionInput

Fields
Input Field Description
transactionId - ID!

ID of the transaction to add the tag value to

tagValueIds - [ID]

List of tag value IDs to add

Example
{"transactionId": "4", "tagValueIds": [4]}

AddTagValueToTransactionPayload

Fields
Field Name Description
transaction - Transaction
Example
{"transaction": Transaction}

AddTransactionNoteInput

Fields
Input Field Description
id - ID
note - String
Example
{"id": 4, "note": "xyz789"}

AddTransactionNotePayload

Fields
Field Name Description
transaction - Transaction
Example
{"transaction": Transaction}

Address

Fields
Field Name Description
id - ID! The ID of an object
street1 - String
street2 - String
city - String
state - String
zipCode - String
country - String
isUserDefault - Boolean
googlePlaceId - String
addressValidationStatus - String
verified - Boolean
Example
{
  "id": "4",
  "street1": "xyz789",
  "street2": "xyz789",
  "city": "abc123",
  "state": "abc123",
  "zipCode": "abc123",
  "country": "abc123",
  "isUserDefault": true,
  "googlePlaceId": "abc123",
  "addressValidationStatus": "xyz789",
  "verified": true
}

AddressInput

Fields
Input Field Description
addressId - ID
street1 - String
street2 - String
city - String
state - String
zipCode - String
country - String
verified - Boolean
Example
{
  "addressId": "4",
  "street1": "xyz789",
  "street2": "xyz789",
  "city": "abc123",
  "state": "xyz789",
  "zipCode": "abc123",
  "country": "abc123",
  "verified": true
}

AllocationInterval

Values
Enum Value Description

DAILY

WEEKDAILY

WEEKLY

MONTHLY

QUARTERLY

YEARLY

Example
"DAILY"

ApproverType

Values
Enum Value Description

ADMIN

MANAGER

NEXT_MANAGER

BUDGET_OWNER

BOOKKEEPER

SPECIFIC_PERSON

Example
"ADMIN"

ArchiveTagTypeInput

Fields
Input Field Description
tagTypeId - ID

The id of the tag type to archive

Example
{"tagTypeId": "4"}

ArchiveTagTypePayload

Fields
Field Name Description
archivedTagTypeId - ID
company - Company
Example
{
  "archivedTagTypeId": "4",
  "company": Company
}

AssignUserAllocationToTransactionInput

Fields
Input Field Description
transactionId - ID
userAllocationId - ID
budgetId - ID
Example
{
  "transactionId": 4,
  "userAllocationId": "4",
  "budgetId": "4"
}

AssignUserAllocationToTransactionPayload

Fields
Field Name Description
transaction - Transaction
Example
{"transaction": Transaction}

AttachReceiptToTransactionInput

Fields
Input Field Description
transactionId - ID!
receiptId - String!
Example
{
  "transactionId": "4",
  "receiptId": "xyz789"
}

AttachReceiptToTransactionPayload

Fields
Field Name Description
transaction - Transaction
receipt - Receipt
Example
{
  "transaction": Transaction,
  "receipt": Receipt
}

BillingInfo

Fields
Field Name Description
id - ID! The ID of an object
balanceDue - Int Total balance currently due (including balancePastDue). It is the end-of-day balance from the last day of the previous billing cycle, less any pending and cleared payments.
balancePastDue - Int Portion of balanceDue that is PAST due.
Example
{
  "id": "4",
  "balanceDue": 123,
  "balancePastDue": 123
}

Boolean

Description

The Boolean scalar type represents true or false.

Example
true

Budget

Fields
Field Name Description
id - ID! The ID of an object
name - String The name of the budget
description - String The description of the budget will be used to describe it's purpose
type - BudgetType The type assigned to the budget
softGoal - Int Soft goal for the budget. Does not affect spend limit. Only used for reporting.
hardLimit - Int Hard limit for the budget. Cannot spend beyond this.
bufferForBudgetPeriod - Int How much buffer room there is for this period. How much can be spent past the goal.
bufferForNextBudgetPeriod - Int How much buffer room there is for next period. How much can be spent past next period's goal.
recurringLimit - Int
recurringGoal - Int
startsAt - UnixTime The timestamp set for the start of the budget
expiresAt - UnixTime The timestamp set for the expiration of the budget
timezone - String The timezone set for the budget
isBudgetPeriodMigrated - Boolean
funderAmount - Int
parentBudgetId - ID The id of the direct parent budget group.
isBudgetGroup - Boolean
isCarryOver - Boolean
limitless - Boolean
limitlessGoal - Int
isDefault - Boolean Whether this is the default budget for the company.
periodInterval - PeriodInterval The period interval set for the budget
balance - Int
retired - Boolean Will return true if the budget is currently retired
shareFunds - BudgetShareFundsOptions share budget funds settings
receiptRequired - Boolean Use this field when acquiring budget level information. Return a boolean indicating if the budget's receipt is required without company receipt required logic.
maxTxSize - Int The maximum amount allowed to be spent in a single transaction for any card in the budget
users - BudgetToUsersConnection The users currently in the budget
Arguments
Name Description
after - String
first - Int
before - String
last - Int
search - String
role - RoleType

role in budget

physicalCardStatus - String

activated, not_activated, or frozen

membershipStatus - String

active, pending, expired, or not_invited

includeRetired - Boolean
excludeImplied - Boolean

A boolean value that says if the user details should exclude implied users. Defaults not exclude implied users.

sortColumn - String

displayName (default), physicalCardStatus, membershipStatus, role, or retired

sortDirection - String

asc or desc. Defaults to asc.

searchVirtualCards - Boolean

Whether to search user's virtual card names as well. Default is false

allCards - CardConnection Return all cards for the budget
Arguments
Name Description
after - String
first - Int
before - String
last - Int
owners - [ID]

Filter cards whose owners are in the given list

merchants - [String]

Filter cards to those which are used by the given merchants

search - String

Searches on card name, budget name, and owner name

types - [UserCardType]

Filter by the given card types

sortColumn - String

name (default), owner, merchant, lastCharged, type

sortDirection - String

asc or desc. Defaults to asc.

intervalTypes - [CardIntervalType]

one_time or recurring

materialTypes - [CardMaterialType]

physical or virtual. Soon to be deprecated. Use card_types

cardTypes - [CardType]

physical or virtual

fundTypes - [CardFundType]

budget or member

simplifiedStatus - SimplifiedCardStatus

Filter cards by the given status

deleted - Boolean

if true, will only return deleted cards

totalDivviedForBudgetPeriod - Int Return the total of what's been allocated, including what's been spent within the period (current month for recurring, life of budget for one_time)
totalFunderAmount - Int Return the total sum of active allocations assigned funder amount for a budget period
userDivviedForBudgetPeriod - Int Return the total of what's been allocated to the current user (if no user_id is passed in), including what's been spent within the period (current month for recurring, life of budget for one_time)
Arguments
Name Description
userId - ID
totalAllocatedForNextMonth - Int Return the total allocated for the budget for the next month
userRole - String Return the current user's role for the budget.
selectedTagValues - [BudgetAssignedTagValue] The tag values that have been assigned to a tag type
budgetUsersCount - Int Number of budget users currently in the budget. This only returns the current number of users associated to the budget. If you want to see past budget periods, use the same value in BudgetPeriod.
Arguments
Name Description
excludeImplied - Boolean

A boolean value that says if the user details should exclude implied users. Defaults not exclude implied users.

budgetMembersCount - Int number of budget members in the budget, does not include owners.
Arguments
Name Description
excludeImplied - Boolean

A boolean value that says if the user details should exclude implied users. Defaults not exclude implied users.

budgetOwnersCount - Int number of budget owners in the budget
Arguments
Name Description
excludeImplied - Boolean

A boolean value that says if the user details should exclude implied users. Defaults not exclude implied users.

budgetCardsCount - Int Number of budget cards currently in the budget. This only returns the current number of cards associated to the budget. If you want to see past budget periods, use the same value in BudgetPeriod.
allTimeSpend - Int How much has ever been spent in the budget.
activeBudgetPeriod - BudgetPeriod
budgetPeriod - BudgetPeriod
Arguments
Name Description
date - UnixTime
spendLimitsList - SpendLimitsList
Arguments
Name Description
search - String
spendLimitType - SpendLimitType
sortColumn - SpendLimitSortColumn
sortDirection - SortDirection
budgetPeriodId - ID

the budget period to look at. Defaults to active budget period id

role - RoleType

filter by user's role in budget

retired - Boolean

filter by retired allocations

userId - ID

filter by user's id

userIds - [ID]

filter by a list of user IDs

forSubscriptionCard - Boolean
merchants - [String] Get list of all merchants/vendors associated to a budget's activity
Arguments
Name Description
search - String
autoAddUsers - Boolean
budgetMccControl - BudgetMccControl
Example
{
  "id": "4",
  "name": "abc123",
  "description": "xyz789",
  "type": "ONE_TIME",
  "softGoal": 987,
  "hardLimit": 987,
  "bufferForBudgetPeriod": 987,
  "bufferForNextBudgetPeriod": 123,
  "recurringLimit": 987,
  "recurringGoal": 987,
  "startsAt": UnixTime,
  "expiresAt": UnixTime,
  "timezone": "abc123",
  "isBudgetPeriodMigrated": true,
  "funderAmount": 123,
  "parentBudgetId": "4",
  "isBudgetGroup": false,
  "isCarryOver": false,
  "limitless": false,
  "limitlessGoal": 987,
  "isDefault": false,
  "periodInterval": "NONE",
  "balance": 123,
  "retired": true,
  "shareFunds": "DO_NOT_SHARE",
  "receiptRequired": false,
  "maxTxSize": 987,
  "users": BudgetToUsersConnection,
  "allCards": CardConnection,
  "totalDivviedForBudgetPeriod": 123,
  "totalFunderAmount": 987,
  "userDivviedForBudgetPeriod": 123,
  "totalAllocatedForNextMonth": 987,
  "userRole": "xyz789",
  "selectedTagValues": [BudgetAssignedTagValue],
  "budgetUsersCount": 123,
  "budgetMembersCount": 123,
  "budgetOwnersCount": 987,
  "budgetCardsCount": 987,
  "allTimeSpend": 987,
  "activeBudgetPeriod": BudgetPeriod,
  "budgetPeriod": BudgetPeriod,
  "spendLimitsList": SpendLimitsList,
  "merchants": ["xyz789"],
  "autoAddUsers": false,
  "budgetMccControl": BudgetMccControl
}

BudgetAssignedTagValue

Fields
Field Name Description
tagTypeId - ID The tag type id that has assigned tag values
tagValueIds - [ID] The assigned tag values
Example
{"tagTypeId": 4, "tagValueIds": ["4"]}

BudgetAssignedTagValues

Fields
Input Field Description
tagTypeId - ID

The tag type id that has assigned tag values

tagValueIds - [ID]

The assigned tag values

Example
{"tagTypeId": 4, "tagValueIds": [4]}

BudgetConnection

Fields
Field Name Description
pageInfo - PageInfo!
edges - [BudgetEdge]
Example
{
  "pageInfo": PageInfo,
  "edges": [BudgetEdge]
}

BudgetEdge

Fields
Field Name Description
node - Budget
cursor - String
Example
{
  "node": Budget,
  "cursor": "abc123"
}

BudgetFilterOptions

Values
Enum Value Description

TRANSACTIONS

BILL_PAY

REIMBURSEMENTS

Example
"TRANSACTIONS"

BudgetForTagType

Fields
Input Field Description
budgetId - ID

The id of the budget

isRequired - Boolean

The is_required flag the budget_tag_type should be

Example
{"budgetId": "4", "isRequired": false}

BudgetMccControl

Fields
Field Name Description
id - ID! The ID of an object
budget - Budget
contactUser - User
controlType - ControlType
insertedAt - UnixTime
mccGroups - [MccGroup]
updatedAt - UnixTime
Example
{
  "id": 4,
  "budget": Budget,
  "contactUser": User,
  "controlType": ControlType,
  "insertedAt": UnixTime,
  "mccGroups": [MccGroup],
  "updatedAt": UnixTime
}

BudgetPeriod

Fields
Field Name Description
id - ID! The ID of an object
goal - Int The goal amount of the budget period, used to calculate buffer in the UI
limit - Int The set limit for the budget period
totalCleared - Int Total amount cleared within the budget period
totalPending - Int Total pending amount within the budget period
totalAssigned - Int Total assigned within the budget period
totalUnassigned - Int Total unassigned amount within the budget period
name - String The name of the budget period
activationState - BudgetPeriodActivationOptions The activation options available for a budgt period
retired - Boolean Will return true if the budget period has been retired
startDate - UnixTime The start date of the budget period
endDate - UnixTime The end data of the budget period
userAllocations - UserAllocationConnection The user allocations associated with the budget period
Arguments
Name Description
after - String
first - Int
before - String
last - Int
budget - Budget The budget associated with the budget period
previousPeriod - BudgetPeriod The pervious budget period
nextPeriod - BudgetPeriod The next upcoming budget period
totalAvailableToSpend - Int Return the assigned/allocated amount for a budget period
buffer - Int How much buffer room there is for this period. How much can be spent past the goal
availableGoalAmount - Int Return the total of what's available for a budget based on goal within the period
availableLimitAmount - Int Return the total of what's available for a budget based on the limit within the period
totalSpent - Int Return the total of what's been spent for a budget within the period
Arguments
Name Description
filters - [BudgetFilterOptions]
Example
{
  "id": 4,
  "goal": 123,
  "limit": 123,
  "totalCleared": 123,
  "totalPending": 987,
  "totalAssigned": 123,
  "totalUnassigned": 987,
  "name": "abc123",
  "activationState": "budget_activation_future",
  "retired": true,
  "startDate": UnixTime,
  "endDate": UnixTime,
  "userAllocations": UserAllocationConnection,
  "budget": Budget,
  "previousPeriod": BudgetPeriod,
  "nextPeriod": BudgetPeriod,
  "totalAvailableToSpend": 123,
  "buffer": 987,
  "availableGoalAmount": 123,
  "availableLimitAmount": 123,
  "totalSpent": 987
}

BudgetPeriodActivationOptions

Values
Enum Value Description

budget_activation_future

budget_activation_current

budget_activation_past

editable

Example
"budget_activation_future"

BudgetReturnFundsOptions

Values
Enum Value Description

RETURN_OWNER_FUNDS

RETURN_MEMBER_FUNDS

RETURN_ALL_FUNDS

Example
"RETURN_OWNER_FUNDS"

BudgetShareFundsOptions

Values
Enum Value Description

DO_NOT_SHARE

SHARE_MANUALLY

SHARE_WITH_ALL_OWNERS

SHARE_WITH_ALL_MEMBERS

SHARE_ALL_OWNERS_BUT_MEMBERS_MANUALLY

Example
"DO_NOT_SHARE"

BudgetToUsersConnection

Fields
Field Name Description
pageInfo - PageInfo!
edges - [BudgetToUsersEdge]
Example
{
  "pageInfo": PageInfo,
  "edges": [BudgetToUsersEdge]
}

BudgetToUsersEdge

Fields
Field Name Description
node - User
cursor - String
role - RoleType
Example
{
  "node": User,
  "cursor": "xyz789",
  "role": "MANAGER"
}

BudgetTransferFundsOptions

Values
Enum Value Description

DO_NOT_TRANSFER

SAME_BUDGET

Example
"DO_NOT_TRANSFER"

BudgetType

Values
Enum Value Description

ONE_TIME

RECURRING

Example
"ONE_TIME"

BulkCreateUser

Fields
Field Name Description
firstName - String!
lastName - String!
email - String!
sendInvite - Boolean!
addresses - [Address]
exists - Boolean
externalUserId - String
cardParams - CardOutput
requestPhysicalCard - Boolean
dateOfBirth - Date
externalRole - String
role - String
roleAttributes - [UserRoleAttribute]
errors - [String!]
Example
{
  "firstName": "xyz789",
  "lastName": "xyz789",
  "email": "abc123",
  "sendInvite": false,
  "addresses": [Address],
  "exists": true,
  "externalUserId": "abc123",
  "cardParams": CardOutput,
  "requestPhysicalCard": true,
  "dateOfBirth": "2007-12-03",
  "externalRole": "abc123",
  "role": "xyz789",
  "roleAttributes": ["BOOKKEEPER_MAKE_PAYMENT"],
  "errors": ["xyz789"]
}

BulkCreateUserInput

Fields
Input Field Description
firstName - String!
lastName - String!
email - String!
sendInvite - Boolean!
addresses - [AddressInput]
exists - Boolean
externalUserId - String
cardParams - CardInput
requestPhysicalCard - Boolean
dateOfBirth - Date
role - String
roleAttributes - [UserRoleAttribute]
Example
{
  "firstName": "xyz789",
  "lastName": "xyz789",
  "email": "abc123",
  "sendInvite": false,
  "addresses": [AddressInput],
  "exists": false,
  "externalUserId": "abc123",
  "cardParams": CardInput,
  "requestPhysicalCard": false,
  "dateOfBirth": "2007-12-03",
  "role": "abc123",
  "roleAttributes": ["BOOKKEEPER_MAKE_PAYMENT"]
}

Card

Fields
Field Name Description
lastFour - String The last four of the card number
expirationDate - String Expiration date of the card, formatted as month/year (e.g., "01/19")
name - String The name of the card
insertedAt - UnixTime The created timestamp for a virtual or physical card
updatedAt - UnixTime When the card profile was last updated
deleted - Boolean True if the card has been deleted
deletedReason - DeleteCardReasonEnum Reason why the card was deleted
frozen - Boolean Will be true if the card is currently frozen
activationStatus - ActivationStatus The current activation status of the card
token - String The token value for the card being used
type - CardType The card type, physical or recurring (virtual)
intervalType - CardIntervalType The card's interval
cardSubtype - CardSubtype Determining the subtype of a card is dependant on a few different fields. cardSubtype makes this evaluation and returns the appropriate displable card subtype to simplify client-side evaluation.
materialType - CardMaterialType The material type of the card
fundType - CardFundType The fund type
user - User The user object
simplifiedStatus - SimplifiedCardStatus The simplified card status
budget - Budget This is the budget currently assigned to the card
userAllocation - UserAllocation The user allocation tied to the card, if set
displayType - CardDisplayType The display type of the card (physical, virtual member, virtual vendor)
id - ID! The ID of an object
Example
{
  "lastFour": "xyz789",
  "expirationDate": "abc123",
  "name": "xyz789",
  "insertedAt": UnixTime,
  "updatedAt": UnixTime,
  "deleted": false,
  "deletedReason": "CANCELLED",
  "frozen": false,
  "activationStatus": "NOT_ACTIVATED",
  "token": "abc123",
  "type": "ONE_TIME",
  "intervalType": "ONE_TIME",
  "cardSubtype": "BURNER",
  "materialType": "PHYSICAL",
  "fundType": "BUDGET",
  "user": User,
  "simplifiedStatus": "ACTIVATED",
  "budget": Budget,
  "userAllocation": UserAllocation,
  "displayType": "PHYSICAL",
  "id": "4"
}

CardConnection

Fields
Field Name Description
pageInfo - PageInfo!
edges - [CardEdge]
totalCount - Int The total number of edges in this connection
name - String
Example
{
  "pageInfo": PageInfo,
  "edges": [CardEdge],
  "totalCount": 987,
  "name": "xyz789"
}

CardDisplayType

Values
Enum Value Description

PHYSICAL

VIRTUAL_VENDOR

VIRTUAL_MEMBER

ONE_TIME

Example
"PHYSICAL"

CardEdge

Fields
Field Name Description
node - Card
cursor - String
Example
{
  "node": Card,
  "cursor": "xyz789"
}

CardFundType

Values
Enum Value Description

BUDGET

MEMBER

Example
"BUDGET"

CardInput

Fields
Input Field Description
orderCode - ShippingOrderCode

Sets what delivery method to use

contactName - String

Sets the recipient name on the delivery

city - String

Sets city of custom delivery address. Only needed when doing a custom address. Default is company billing address

state - String

Sets state of custom delivery address. Only needed when doing a custom address. Default is company billing address

country - String

Sets country of custom delivery address. Only needed when doing a custom address. Default is company billing address

addressLine - String

Sets street of custom delivery address. Only needed when doing a custom address. Default is company billing address

addressSecondary - String

Sets street of custom delivery address. Only needed when doing a custom address. Default is company billing address

zipCode - String

Sets zip code of custom delivery address. Only needed when doing a custom address. Default is company billing address

googlePlaceId - String

Third party id, the end result of an autocompleted address

deliverability - String

Optional: Used for Reporting: Value based off interaction with LOB

suggestedAddress - String

Optional: Used for Reporting: Value based off interaction with LOB

cardMaterial - CardOrderMaterialType

Defaults to :plastic. Determines the physical cards material.

shippingCredit - ShippingCreditType

Explains why a card received free shipping.

origin - CardOrderOriginType

Explains where the card order originated from.

shippingAlertPhoneNumber - String

Optional: Used if user opts-in for text updates on card_order. Phone number is given by user.

Example
{
  "orderCode": "MQ_USPS_STANDARD",
  "contactName": "xyz789",
  "city": "abc123",
  "state": "abc123",
  "country": "abc123",
  "addressLine": "abc123",
  "addressSecondary": "abc123",
  "zipCode": "xyz789",
  "googlePlaceId": "abc123",
  "deliverability": "abc123",
  "suggestedAddress": "abc123",
  "cardMaterial": "METAL",
  "shippingCredit": "EXPEDITE_PROMO",
  "origin": "MOBILE",
  "shippingAlertPhoneNumber": "xyz789"
}

CardIntervalType

Values
Enum Value Description

ONE_TIME

RECURRING

Example
"ONE_TIME"

CardMaterialType

Values
Enum Value Description

PHYSICAL

VIRTUAL

Example
"PHYSICAL"

CardOrderMaterialType

Values
Enum Value Description

METAL

PLASTIC

Example
"METAL"

CardOrderOriginType

Values
Enum Value Description

MOBILE

WEB_ADD_PERSON

WEB_CANCEL_CARD_MODAL

WEB_CARD_ORDERS_PAGE

WEB_COMPANY_CREATION

WEB_CSV_PEOPLE_IMPORT

WEB_DISPUTE_WIZARD_FOOTER

WEB_PEOPLES_PAGE

WEB_TRANSACTION_DISPUTE

WEB_USER_PROFILE

WEB_VISA_MIGRATION

Example
"MOBILE"

CardOutput

Fields
Field Name Description
orderCode - ShippingOrderCode Sets what delivery method to use
contactName - String Sets the recipient name on the delivery
city - String Sets city of custom delivery address. Only needed when doing a custom address. Default is company billing address
state - String Sets state of custom delivery address. Only needed when doing a custom address. Default is company billing address
country - String Sets country of custom delivery address. Only needed when doing a custom address. Default is company billing address
addressLine - String Sets street of custom delivery address. Only needed when doing a custom address. Default is company billing address
addressSecondary - String Sets street of custom delivery address. Only needed when doing a custom address. Default is company billing address
zipCode - String Sets zip code of custom delivery address. Only needed when doing a custom address. Default is company billing address
googlePlaceId - String Third party id, the end result of an autocompleted address
deliverability - String Optional: Used for Reporting: Value based off interaction with LOB
suggestedAddress - String Optional: Used for Reporting: Value based off interaction with LOB
cardMaterial - CardOrderMaterialType Defaults to :plastic. Determines the physical cards material.
shippingCredit - ShippingCreditType Explains why a card received free shipping.
origin - CardOrderOriginType Explains where the card order originated from.
shippingAlertPhoneNumber - String Optional: Used if user opts-in for text updates on card_order. Phone number is given by user.
Example
{
  "orderCode": "MQ_USPS_STANDARD",
  "contactName": "xyz789",
  "city": "abc123",
  "state": "abc123",
  "country": "xyz789",
  "addressLine": "xyz789",
  "addressSecondary": "xyz789",
  "zipCode": "xyz789",
  "googlePlaceId": "xyz789",
  "deliverability": "abc123",
  "suggestedAddress": "abc123",
  "cardMaterial": "METAL",
  "shippingCredit": "EXPEDITE_PROMO",
  "origin": "MOBILE",
  "shippingAlertPhoneNumber": "abc123"
}

CardSubtype

Values
Enum Value Description

BURNER

MEMBER

PHYSICAL

SUBSCRIPTION

Example
"BURNER"

CardType

Values
Enum Value Description

ONE_TIME

PHYSICAL

RECURRING

VIRTUAL

Use recurring instead.
Example
"ONE_TIME"

Company

Fields
Field Name Description
name - String The company name
insertedAt - UnixTime The time the company was added
termsAcceptedAt - UnixTime The time the terms were accepted
receiptRequiredSetting - ReceiptRequiredSetting The current setting for receipts required
receiptRequiredMinimumAmount - Int The minimum amount required to provide a receipt
timezone - String The current timezone set
creditLimit - Int Credit limit for a company. This is the total amount underwritten for the company regardless of which programs they belong to.
nextPaymentDate - Date Due date of the next payment.
defaultTimezone - String Timezone determined from the company billing zip code
transactionsTotalCount - Int Since getting a totalCount the standard way is expensive, this query does it efficiently. TotalCount off transactions will always give only the total number of transactions on your current page.
Arguments
Name Description
filters - TransactionFilters

Optional transaction filters

amountMax - Int
amountMin - Int
budgetId - [ID]
cardId - [ID]
categoryId - ID
cleanedMerchantName - [String]
clearedDateEnd - UnixTime
clearedDateStart - UnixTime
companyProgramUuid - String
dateEnd - UnixTime
dateStart - UnixTime
excludeIds - [ID!]
excludeUsers - [String]
feesMax - Int
feesMin - Int
filterTagTypes - [ID]
filterTagValues - [ID]
hasAllRequiredFieldsCompleted - Boolean
insertedDateEnd - UnixTime
insertedDateStart - UnixTime
isLocked - Boolean
isReviewed - Boolean
merchantName - String
nullTagValues - Boolean
receiptStatuses - [ReceiptStatusEnum]
reconciled - Boolean
reviewStatuses - [TransactionReviewStatus]
search - String
sortColumn - String
sortDirection - String
sortTagType - ID
status - [TransactionStatus]
syncStatus - [SyncStatus]
types - [TransactionType]
useReviewStatusOnly - Boolean
userId - [ID]
visibleTagTypeIds - [ID]
budgets - BudgetConnection Budgets that are visible to the current user. For a budget to be visible, the current user must be a company admin or a member of the budget.
Arguments
Name Description
after - String
first - Int
before - String
last - Int
budgetIds - [ID]
type - BudgetType
search - String
parentBudgetId - ID

filters to budgets that are direct children to the budget group of the given parent_budget_id

isBudgetGroup - Boolean

filters between budget groups (true) or budgets (false)

isSingleCardBudget - Boolean

filters between single card budgets (true) or normal budgets (false)

isAdvent - Boolean

filters between is_advent (true) or is_advent (false)

role - RoleType

filter to budgets for which the current user has the given role

sortColumn - String

name (default), total_divvied_for_period, or budget_limit

sortDirection - String

asc or desc. Defaults to asc

includeRetired - Boolean

include_retired, if true will return all budgets

retired - Boolean

retired, if true will only return retired budgets, false will return only active budgets

receiptRequired - Boolean

if true will only return budgets where receipts are required

includeIndirectlyOwned - Boolean

if true, the response will include both directly owned and indirectly owned budgets and groups

includeGroups - Boolean

if true, the response will include budget groups

topLevelOwned - Boolean

If true, the response will only include the highest level of budget that the user directly owns.

policyId - ID

filters to budgets that have a policy (template) associated with them

eligibleForImportUnderParentId - ID

filters to budgets that are eligible for import under a given parent budget id

users - UserConnection The users of the company
Arguments
Name Description
after - String
first - Int
before - String
last - Int
search - String
role - String

administrator, member, or bookkeeper

physicalCardStatus - String

activated, not_activated, or frozen

membershipStatus - String

active, pending, expired, or not_invited

includeRetired - Boolean
sortColumn - String

displayName (default), physicalCardStatus, membershipStatus, email, or role

sortDirection - String

asc or desc. Defaults to asc.

dateEnd - UnixTime

Limit to users inserted before this datetime

dateStart - UnixTime

Limit to users inserted after this datetime

budgetCountMin - Int

Limit to users belonging to at least budget_count_min

budgetCountMax - Int

Limit to users belonging to at most budget_count_max

hasCreatedBillPayPayment - Boolean

returns a list of all users who have created a billpay payment for this company

userIds - [ID]

list of specific user ids

missingDob - Boolean

filter users by those missing a date of birth (DOB)

subordinateUsers - Boolean

If current user is manager, should be shown only his direct subordinates

usersInManagedBudget - Boolean

If current user is budget manager, should be shown only users in the managed budget

totalPoints - Int The total points
Arguments
Name Description
startAt - DateTime
endBefore - DateTime
isRedeemable - Boolean
totalSpend - Int Return the sum of transaction amounts for the company
Arguments
Name Description
search - String
amountMax - Int
amountMin - Int
budgetId - ID
categoryId - ID
companyProgramUuid - String
dateEnd - UnixTime

Limit to transactions before this datetime

dateStart - UnixTime

Limit to transactions after this datetime

clearedDateEnd - UnixTime

Limit to transactions cleared before this datetime

clearedDateStart - UnixTime

Limit to transactions cleared after this datetime

merchantName - String
userId - ID
types - [TransactionType]

Defaults to [APPROVED, REVERSAL]

status - [TransactionStatus]

Defaults to all

reconciled - Boolean

If true, totals reconciled transactions only. If false, totals unreconciled (pending) transactions only. If not provided, totals both reconciled and unreconciled transactions.

excludeIds - [ID!]

Excludes transactions by their ids

transactions - TransactionConnection The transactions of the company
Arguments
Name Description
after - String
first - Int
before - String
last - Int
filters - TransactionFilters

Optional transaction filters

amountMax - Int
amountMin - Int
budgetId - [ID]
cardId - [ID]
categoryId - ID
cleanedMerchantName - [String]
clearedDateEnd - UnixTime
clearedDateStart - UnixTime
companyProgramUuid - String
dateEnd - UnixTime
dateStart - UnixTime
excludeIds - [ID!]
excludeUsers - [String]
feesMax - Int
feesMin - Int
filterTagTypes - [ID]
filterTagValues - [ID]
hasAllRequiredFieldsCompleted - Boolean
insertedDateEnd - UnixTime
insertedDateStart - UnixTime
isLocked - Boolean
isReviewed - Boolean
merchantName - String
nullTagValues - Boolean
receiptStatuses - [ReceiptStatusEnum]
reconciled - Boolean
reviewStatuses - [TransactionReviewStatus]
search - String
sortColumn - String
sortDirection - String
sortTagType - ID
status - [TransactionStatus]
syncStatus - [SyncStatus]
types - [TransactionType]
useReviewStatusOnly - Boolean
userId - [ID]
visibleTagTypeIds - [ID]
allCards - CardConnection Return all cards for the company
Arguments
Name Description
after - String
first - Int
before - String
last - Int
owners - [ID]

Filter cards whose owners are in the given list

excludeUsers - [ID]

Excludes cards of the users listed

budgets - [ID]

Filter cards to those which are in the given budgets

cardIds - [ID]

Filter cards to those which have the given ids

merchants - [String]

Filter cards to those which are used by the given merchants

includeDeleted - Boolean

Includes deleted cards in the results if true

search - String

Searches on card name, budget name, and owner name

types - [UserCardType]

Filter by the given card types

simplifiedStatus - SimplifiedCardStatus

Filter cards by the given status

deleted - Boolean

if true, will only return deleted cards

sortColumn - String

name (default), owner, merchant, budgetName, lastCharged, type, deleted

sortDirection - String

asc or desc. Defaults to asc.

tagTypes - TagTypeConnection Return tag types associated with the company
Arguments
Name Description
after - String
first - Int
before - String
last - Int
search - String
deleted - Boolean
sortColumn - String

name, inserted_at(default)

sortOrder - String

asc or desc. Defaults to asc.

isSystemGenerated - Boolean
isGlobal - Boolean
points - Int Total points for the company
redeemablePoints - Int Total redeemable points for the company
unredeemablePoints - Int Total unredeemable points for the company
companyPrograms - CompanyProgramConnection
Arguments
Name Description
after - String
first - Int
before - String
last - Int
hideInactivePrograms - Boolean
budgetCount - Int The number of budgets in the company. Budget owners/members will only get the ones they can see.
Arguments
Name Description
includeRetired - Boolean

if true, count retired budgets

includeReimbursements - Boolean

if true, count reimbursement budgets

transactionsSumAmount - Int Get sum of all transactions that match filters
Arguments
Name Description
filters - TransactionFilters

Optional transaction filters

amountMax - Int
amountMin - Int
budgetId - [ID]
cardId - [ID]
categoryId - ID
cleanedMerchantName - [String]
clearedDateEnd - UnixTime
clearedDateStart - UnixTime
companyProgramUuid - String
dateEnd - UnixTime
dateStart - UnixTime
excludeIds - [ID!]
excludeUsers - [String]
feesMax - Int
feesMin - Int
filterTagTypes - [ID]
filterTagValues - [ID]
hasAllRequiredFieldsCompleted - Boolean
insertedDateEnd - UnixTime
insertedDateStart - UnixTime
isLocked - Boolean
isReviewed - Boolean
merchantName - String
nullTagValues - Boolean
receiptStatuses - [ReceiptStatusEnum]
reconciled - Boolean
reviewStatuses - [TransactionReviewStatus]
search - String
sortColumn - String
sortDirection - String
sortTagType - ID
status - [TransactionStatus]
syncStatus - [SyncStatus]
types - [TransactionType]
useReviewStatusOnly - Boolean
userId - [ID]
visibleTagTypeIds - [ID]
merchantNames - StringConnection Search for and get a list of the merchants a company has used
Arguments
Name Description
after - String
first - Int
before - String
last - Int
merchantTypes - [MerchantOriginationType]

The types of merchant (where the merchant originated) to fetch

startsWith - String

Filter to only merchants that start with the specified string

sortDirection - SortDirection

The order to sort the names

budgetId - [ID]

Filter to merchants that have been used for the specified budgets

userId - [ID]

Filter to merchants that have been used by the specified users

filterToSelfOrManaged - Boolean

Filter to merchants of transactions managed by current user or created by user

exports - [Export] Fetch a list of unexpired exports for the current user
creditBalanceDelayPeriod - Int Get the delay period in which payments may not be reflected in the credit balance
id - ID! The ID of an object
Example
{
  "name": "xyz789",
  "insertedAt": UnixTime,
  "termsAcceptedAt": UnixTime,
  "receiptRequiredSetting": "REQUIRED_GLOBALLY",
  "receiptRequiredMinimumAmount": 987,
  "timezone": "abc123",
  "creditLimit": 987,
  "nextPaymentDate": "2007-12-03",
  "defaultTimezone": "xyz789",
  "transactionsTotalCount": 987,
  "budgets": BudgetConnection,
  "users": UserConnection,
  "totalPoints": 987,
  "totalSpend": 987,
  "transactions": TransactionConnection,
  "allCards": CardConnection,
  "tagTypes": TagTypeConnection,
  "points": 123,
  "redeemablePoints": 987,
  "unredeemablePoints": 987,
  "companyPrograms": CompanyProgramConnection,
  "budgetCount": 987,
  "transactionsSumAmount": 987,
  "merchantNames": StringConnection,
  "exports": [Export],
  "creditBalanceDelayPeriod": 987,
  "id": "4"
}

CompanyProgram

Fields
Field Name Description
id - ID! The ID of an object
uuid - String Identifier used to identify a particular company_program.
networkName - ProgramNetwork The name of the network this company_program belongs to.
readableNetworkName - String The name of the network this company_program belongs to.
creditInfo - CreditInfo The credit information for this company on this program.
billingInfo - BillingInfo The billing information for this company on this program.
status - CompanyProgramStatusEnum The current status of the program for this company.
totalSpend - Int Return the sum of transaction amounts for the company program
Arguments
Name Description
search - String
amountMax - Int
amountMin - Int
budgetId - ID
categoryId - ID
dateEnd - UnixTime

Limit to transactions before this datetime

dateStart - UnixTime

Limit to transactions after this datetime

merchantName - String
userId - ID
types - [TransactionType]

Defaults to [APPROVED, REVERSAL]

status - [TransactionStatus]

Defaults to all

reconciled - Boolean

If true, totals reconciled transactions only. If false, totals unreconciled (pending) transactions only. If not provided, totals both reconciled and unreconciled transactions.

excludeIds - [ID!]

Excludes transactions by their ids

programCode - String The name of the program code this company_program belongs to.
Example
{
  "id": 4,
  "uuid": "xyz789",
  "networkName": "MASTERCARD",
  "readableNetworkName": "xyz789",
  "creditInfo": CreditInfo,
  "billingInfo": BillingInfo,
  "status": "ACTIVE",
  "totalSpend": 123,
  "programCode": "xyz789"
}

CompanyProgramConnection

Fields
Field Name Description
pageInfo - PageInfo!
edges - [CompanyProgramEdge]
Example
{
  "pageInfo": PageInfo,
  "edges": [CompanyProgramEdge]
}

CompanyProgramEdge

Fields
Field Name Description
node - CompanyProgram
cursor - String
Example
{
  "node": CompanyProgram,
  "cursor": "xyz789"
}

CompanyProgramStatusEnum

Values
Enum Value Description

ACTIVE

INACTIVE

Example
"ACTIVE"

ControlType

Description

BLACKLIST or WHITELIST

Example
ControlType

CreateBudgetInput

Fields
Input Field Description
name - String!

The name of the budget

description - String

The description of the budget

timezone - String

The timezone of the budget

type - BudgetType!

The budget type

softGoal - Int

The soft goal for the budget

hardLimit - Int

The hard limit for the budget

recurringLimit - Int

The recurring limit for the budget

recurringGoal - Int

The recurring goal for the budget

startsAt - UnixTime

When the budget starts, defaults to now

expiresAt - UnixTime

When the budget ends, removes all funds from people and cards from the budget

owners - [ID]

The IDs of owners in the budget

observers - [ID]

The IDS of observers in the budget

members - [ID]

The IDs of members in the budget

companyId - ID

The company to create the budget under

receiptRequired - Boolean

Whether or not receipts should be required for transactions in this budget

shareFunds - BudgetShareFundsOptions

Options to control how funds are shared amongst owners and/or members of this budget or if members must be assigned funds manually

rollover - Boolean

Whether or not remaining funds at the end of a period should rollover into the next period

periodInterval - PeriodInterval

How often the budget limit should be reset

nextPeriodStartMonth - Int

Calendar month to start the first budget period

funderAmount - Int
isBudgetGroup - Boolean

If true, then in budget group

parentBudgetId - ID

The parent budget id

blockFailover - Boolean

Should budget block auto moving transactions to highest allocation if budget doesn't have funds

isCarryOver - Boolean

If true, then budget in group with zero recurrig will carry over funds

assignedTagValues - [BudgetAssignedTagValues]

tag_type id with a list of assigned tag_values.

allowBudgetOwnerToEditGoal - Boolean

Whether or not the budget owner can edit the goal

tagTypes - [ID]

List of Tag Type IDs which will be added to the new Budget

transferFundsOptions - BudgetTransferFundsOptions

Settings to allow transfering budget funds.

autoAddUsers - Boolean

Whether or not new Divvy users should be automatically added to this budget

maxTxSize - Int

The maximum amount allowed to be spent in a single transaction for any card within the budget

limitless - Boolean

true to create a budget with no hard limit

limitlessGoal - Int

On limitless budgets, limitless_goal is a static amount that is displayed to the UI

policyId - ID

The policy id that should be applied to the budget. If no policy id is supplied,the budget will be created with no controls in place.

Example
{
  "name": "abc123",
  "description": "abc123",
  "timezone": "abc123",
  "type": "ONE_TIME",
  "softGoal": 987,
  "hardLimit": 123,
  "recurringLimit": 987,
  "recurringGoal": 123,
  "startsAt": UnixTime,
  "expiresAt": UnixTime,
  "owners": ["4"],
  "observers": [4],
  "members": [4],
  "companyId": "4",
  "receiptRequired": false,
  "shareFunds": "DO_NOT_SHARE",
  "rollover": true,
  "periodInterval": "NONE",
  "nextPeriodStartMonth": 123,
  "funderAmount": 123,
  "isBudgetGroup": true,
  "parentBudgetId": "4",
  "blockFailover": false,
  "isCarryOver": false,
  "assignedTagValues": [BudgetAssignedTagValues],
  "allowBudgetOwnerToEditGoal": true,
  "tagTypes": ["4"],
  "transferFundsOptions": "DO_NOT_TRANSFER",
  "autoAddUsers": false,
  "maxTxSize": 987,
  "limitless": false,
  "limitlessGoal": 123,
  "policyId": 4
}

CreateBudgetMccControlsInput

Fields
Input Field Description
budgetIds - [ID]!
contactUserIds - [ID]
controlType - ControlType!
mccGroupUids - [ID]!
Example
{
  "budgetIds": [4],
  "contactUserIds": [4],
  "controlType": ControlType,
  "mccGroupUids": [4]
}

CreateBudgetMccControlsPayload

Fields
Field Name Description
budgetMccControls - [BudgetMccControl]
Example
{"budgetMccControls": [BudgetMccControl]}

CreateBudgetPayload

Fields
Field Name Description
company - Company The company the budget was created under
newBudgetEdge - BudgetEdge The edge containing the newly created budget
Example
{
  "company": Company,
  "newBudgetEdge": BudgetEdge
}

CreateTagTypeInput

Fields
Input Field Description
fieldType - FieldType

Field type

name - String!

The name of the tag type

allowCustomValues - Boolean!

Should the tag type allow users to enter custom values?

description - String

Description of the field that will appear alongside it when displayed

minimumAmountForRequirement - Int

The minimum amount of the transaction that will cause this field to be required

companyId - ID

The id of the company the tag type belongs to

multiSelect - Boolean

Should the tag type allow multiselect

kind - TagTypeKind

What class (type) of custom field is it?

budgets - [BudgetForTagType]

The list of budgets that will attach this tag type to. Can be required

values - [String]

Values to add to the tag type now

isGlobal - Boolean

Should the tag type be globally (company based) associated

isRequired - Boolean

Should the tag type be globally (company based) required

defaultScopes - [String]

Default scopes to create

Example
{
  "fieldType": "CATEGORY",
  "name": "xyz789",
  "allowCustomValues": false,
  "description": "xyz789",
  "minimumAmountForRequirement": 123,
  "companyId": 4,
  "multiSelect": false,
  "kind": "CUSTOM_SELECTOR",
  "budgets": [BudgetForTagType],
  "values": ["xyz789"],
  "isGlobal": true,
  "isRequired": true,
  "defaultScopes": ["abc123"]
}

CreateTagTypePayload

Fields
Field Name Description
company - Company
newTagTypeEdge - TagTypeEdge
Example
{
  "company": Company,
  "newTagTypeEdge": TagTypeEdge
}

CreateTagValueInput

Fields
Input Field Description
value - String!

The value for the tag value

tagTypeId - ID!

The tag type that this is a value for

Example
{
  "value": "xyz789",
  "tagTypeId": "4"
}

CreateTagValuePayload

Fields
Field Name Description
tagType - TagType
newTagValueEdge - TagValueEdge
Example
{
  "tagType": TagType,
  "newTagValueEdge": TagValueEdge
}

CreateTagValuesInput

Fields
Input Field Description
values - [String]

The list of tag values

tagTypeId - ID!

The tag type that these are values for

Example
{
  "values": ["xyz789"],
  "tagTypeId": "4"
}

CreateTagValuesPayload

Fields
Field Name Description
tagType - TagType
tagValues - [TagValue]
Example
{
  "tagType": TagType,
  "tagValues": [TagValue]
}

CreateTransactionExportInput

Fields
Input Field Description
filters - TransactionFilters

Transaction filters

format - String

Format of export

columns - [String]

Additional columns to export

Example
{
  "filters": TransactionFilters,
  "format": "xyz789",
  "columns": ["xyz789"]
}

CreateTransactionExportPayload

Fields
Field Name Description
export - Export Information about the requested export
Example
{"export": Export}

CreateUserInput

Fields
Input Field Description
displayName - String
firstName - String!
middleInitial - String
lastName - String!
email - String!
cellPhone - String
workPhone - String
avatarUrl - String
companyId - ID
companyAdmin - Boolean!
cardParams - CardInput
requestPhysicalCard - Boolean
dateOfBirth - Date
socialSecurityNumber - String
passportNumber - String
role - String
roleAttributes - [UserRoleAttribute]
managerId - ID
departmentId - ID
locationId - ID
canOrderOwnFirstPhysicalCard - Boolean
passportCountry - String
Example
{
  "displayName": "abc123",
  "firstName": "abc123",
  "middleInitial": "abc123",
  "lastName": "xyz789",
  "email": "xyz789",
  "cellPhone": "abc123",
  "workPhone": "xyz789",
  "avatarUrl": "abc123",
  "companyId": "4",
  "companyAdmin": false,
  "cardParams": CardInput,
  "requestPhysicalCard": false,
  "dateOfBirth": "2007-12-03",
  "socialSecurityNumber": "xyz789",
  "passportNumber": "abc123",
  "role": "abc123",
  "roleAttributes": ["BOOKKEEPER_MAKE_PAYMENT"],
  "managerId": "4",
  "departmentId": 4,
  "locationId": "4",
  "canOrderOwnFirstPhysicalCard": true,
  "passportCountry": "abc123"
}

CreateUserPayload

Fields
Field Name Description
user - User
company - Company
newUserEdge - UserEdge
Example
{
  "user": User,
  "company": Company,
  "newUserEdge": UserEdge
}

CreateUsersInput

Fields
Input Field Description
companyId - ID
users - [BulkCreateUserInput!]!
Example
{"companyId": 4, "users": [BulkCreateUserInput]}

CreateUsersPayload

Fields
Field Name Description
incompleteUsers - [BulkCreateUser!]!
Example
{"incompleteUsers": [BulkCreateUser]}

CreateVirtualCardForBudgetInput

Fields
Input Field Description
ownerId - ID

The owner of the card (current user if not provided)

name - String!

The name of the card

type - CardType!

The type of card to be created

intervalType - CardIntervalType

The card interval type (ONE_TIME, RECURRING)

amount - Int

The amount of the card

recurringAmount - Int

The recurring amount of the card

allocationInterval - AllocationInterval

the allocation interval

nextAllocation - UnixTime

the time of the next allocation

budgetId - ID

The budget this card belongs to

expiresAt - UnixTime

The expiration date of the card

selectedTags - [SelectedTag]

The list of custom field selected tags and values

tagValueAssignments - [TagValueAssignment]

A list of value assignments for card's default tag type values

receiptOverride - Boolean

Override receipt requirements for txs on a card

shareBudgetFunds - Boolean

True if the card should use shared funds

Example
{
  "ownerId": "4",
  "name": "xyz789",
  "type": "ONE_TIME",
  "intervalType": "ONE_TIME",
  "amount": 987,
  "recurringAmount": 123,
  "allocationInterval": "DAILY",
  "nextAllocation": UnixTime,
  "budgetId": 4,
  "expiresAt": UnixTime,
  "selectedTags": [SelectedTag],
  "tagValueAssignments": [TagValueAssignment],
  "receiptOverride": false,
  "shareBudgetFunds": false
}

CreateVirtualCardForBudgetPayload

Fields
Field Name Description
newCardEdge - CardEdge The edge for the new card
budget - Budget The budget the card belongs to
company - Company The company the card belongs to
Example
{
  "newCardEdge": CardEdge,
  "budget": Budget,
  "company": Company
}

CreditInfo

Description

Current credit status

Fields
Field Name Description
id - ID! The ID of an object
availableBalance - Int Amount of remaining credit that can be spent.
clearedBalance - Int Sum of most recent source_ledger eod_balance, cleared transactions, fees, adjustments less payments since most recent source_ledger eod_date.
creditLimit - Int Credit limit available to the company specifically related to Wex. For internal credit limit use company.credit_limit.
pendingBalance - Int Sum of all 'authorization' transaction_record types that have no corresponding clear transaction_record types. Note that this will always be an estimate since the authorization amount can differ from the cleared amount.
reservesAmount - Int Reserves amount
Example
{
  "id": 4,
  "availableBalance": 987,
  "clearedBalance": 123,
  "creditLimit": 987,
  "pendingBalance": 123,
  "reservesAmount": 123
}

CurrencyData

Fields
Field Name Description
id - ID! The ID of an object
originalCurrencyAmount - Int
originalCurrencyCode - String
exchangeRate - Float
exponent - Int
symbol - String
Example
{
  "id": "4",
  "originalCurrencyAmount": 987,
  "originalCurrencyCode": "xyz789",
  "exchangeRate": 987.65,
  "exponent": 987,
  "symbol": "abc123"
}

Date

Description

The Date scalar type represents a date. The Date appears in a JSON response as an ISO8601 formatted string, without a time component.

Example
"2007-12-03"

DateTime

Description

The DateTime scalar type represents a date and time in the UTC timezone. The DateTime appears in a JSON response as an ISO8601 formatted string, including UTC timezone ("Z"). The parsed date and time string will be converted to UTC if there is an offset.

Example
"2007-12-03T10:15:30Z"

DeclineDetails

Fields
Field Name Description
reason - String External decline reason. Intented to be directly user facing.
code - String Internal decline reason code. Not intented to be directly user facing.
Example
{
  "reason": "xyz789",
  "code": "xyz789"
}

DefaultScope

Values
Enum Value Description

GLOBAL

BUDGET

MERCHANT

Example
"GLOBAL"

DeleteBudgetInput

Fields
Input Field Description
id - ID

The ID of the budget to delete/retire

Example
{"id": "4"}

DeleteBudgetMccControlInput

Fields
Input Field Description
budgetId - ID!
Example
{"budgetId": "4"}

DeleteBudgetMccControlPayload

Fields
Field Name Description
budgetMccControl - BudgetMccControl
Example
{"budgetMccControl": BudgetMccControl}

DeleteBudgetPayload

Fields
Field Name Description
id - ID The ID of the deleted/retired budget
retired - Boolean Whether or not the budget was marked as deleted/retired
company - Company The company that the budget was deleted/retired from
Example
{
  "id": "4",
  "retired": true,
  "company": Company
}

DeleteCardInput

Fields
Input Field Description
cardId - ID!
reason - DeleteCardReasonEnum

Brief explanation for deleting card

Example
{"cardId": 4, "reason": "CANCELLED"}

DeleteCardPayload

Fields
Field Name Description
user - User The user the card was assigned to.
deletedCardId - ID
company - Company The company the card was assigned to.
budget - Budget The budget the card was assigned to.
Example
{
  "user": User,
  "deletedCardId": "4",
  "company": Company,
  "budget": Budget
}

DeleteCardReasonEnum

Values
Enum Value Description

CANCELLED

LOST

STOLEN

MISPLACED

FRAUD_CONFIRMED

Example
"CANCELLED"

DeleteReceiptInput

Fields
Input Field Description
transactionId - ID

Must provide null for this value if receipt is not on a transaction

receiptId - ID
Example
{"transactionId": 4, "receiptId": 4}

DeleteReceiptPayload

Fields
Field Name Description
transaction - Transaction
receiptId - ID
Example
{
  "transaction": Transaction,
  "receiptId": "4"
}

DeleteTagValueInput

Fields
Input Field Description
tagValueId - ID

The id of the tag value to delete

Example
{"tagValueId": 4}

DeleteTagValuePayload

Fields
Field Name Description
deletedTagValueId - ID
tagType - TagType
Example
{"deletedTagValueId": 4, "tagType": TagType}

DeleteUserDefaultTagInput

Fields
Input Field Description
userId - ID
tagTypeId - ID
Example
{"userId": 4, "tagTypeId": 4}

DeleteUserDefaultTagPayload

Fields
Field Name Description
ok - Boolean
Example
{"ok": false}

DeleteUserInput

Fields
Input Field Description
userId - ID
Example
{"userId": 4}

DeleteUserPayload

Fields
Field Name Description
id - ID
company - Company
Example
{
  "id": "4",
  "company": Company
}

DetachReceiptFromTransactionInput

Fields
Input Field Description
receiptId - String!
Example
{"receiptId": "abc123"}

DetachReceiptFromTransactionPayload

Fields
Field Name Description
transaction - Transaction
receipt - Receipt
Example
{
  "transaction": Transaction,
  "receipt": Receipt
}

DetailedUpdateUsersInput

Fields
Input Field Description
id - ID

The ID of the budget

budgetPeriodId - ID

The ID of the Budget Period

users - [UserAndAmount]

The list of users and details to update

note - String

Note to add about this change

requestId - String

Request ID to associate with this change

Example
{
  "id": 4,
  "budgetPeriodId": "4",
  "users": [UserAndAmount],
  "note": "xyz789",
  "requestId": "xyz789"
}

DetailedUpdateUsersPayload

Fields
Field Name Description
budget - Budget The updated budget
status - String The status of the update
Example
{
  "budget": Budget,
  "status": "abc123"
}

EditTagTypeInput

Fields
Input Field Description
tagTypeId - ID

The id of the tag type to edit

fieldType - FieldType

Field type

name - String

The name of the tag type

allowCustomValues - Boolean

Should the tag type allow users to enter custom values?

description - String

Description of the field that will appear alongside it when displayed

minimumAmountForRequirement - Int

The minimum amount of the transaction that will cause this field to be required

budgets - [BudgetForTagType]

The list of budgets to add that will attach this tag type to. Can be required

valuesToAdd - [String]

The values to add

valuesToDelete - [ID]

The values to delete

isGlobal - Boolean

Should the tag type be globally (company based) associated

isRequired - Boolean

Should the tag type be globally (company based) required

defaultScopes - [String]

Default scopes to update

Example
{
  "tagTypeId": 4,
  "fieldType": "CATEGORY",
  "name": "xyz789",
  "allowCustomValues": true,
  "description": "abc123",
  "minimumAmountForRequirement": 987,
  "budgets": [BudgetForTagType],
  "valuesToAdd": ["abc123"],
  "valuesToDelete": ["4"],
  "isGlobal": false,
  "isRequired": true,
  "defaultScopes": ["abc123"]
}

EditTagTypePayload

Fields
Field Name Description
tagType - TagType The tag type being edited
Example
{"tagType": TagType}

Export

Fields
Field Name Description
id - ID! The ID of an object
type - ExportType Type of export
status - ExportStatus Status of the export
prettyFilename - String Filename without unique identifier
s3Filename - String Filename with unique identifier
s3Url - String Download url
Example
{
  "id": 4,
  "type": "REIMBURSEMENT_RECEIPT",
  "status": "CREATED",
  "prettyFilename": "abc123",
  "s3Filename": "xyz789",
  "s3Url": "abc123"
}

ExportStatus

Values
Enum Value Description

CREATED

IN_PROGRESS

COMPLETE

FAILED

CANCELED

Example
"CREATED"

ExportType

Values
Enum Value Description

REIMBURSEMENT_RECEIPT

REIMBURSEMENT

STATEMENT

TRANSACTION_RECEIPT

TRANSACTION

Example
"REIMBURSEMENT_RECEIPT"

FieldType

Values
Enum Value Description

CATEGORY

CLASS

DEPARTMENT

ITEMS

LOCATION

OTHER

Example
"CATEGORY"

Float

Description

The Float scalar type represents signed double-precision fractional values as specified by IEEE 754.

Example
123.45

FreezeCardInput

Fields
Input Field Description
cardId - ID!

The card ID

reason - FreezeCardReasonEnum

The reason the card was frozen

Example
{"cardId": 4, "reason": "SUSPICIOUS_ACTIVITY"}

FreezeCardPayload

Fields
Field Name Description
card - Card The updated card
Example
{"card": Card}

FreezeCardReasonEnum

Values
Enum Value Description

SUSPICIOUS_ACTIVITY

CONFIRMED_FRAUD

Example
"SUSPICIOUS_ACTIVITY"

FrozenReason

Values
Enum Value Description

FROZEN_BY_ADMIN

FROZEN_BY_ADMIN_UI

FROZEN_BY_OWNER

COMPANY_FROZEN

DEACTIVATED

FROZEN_BY_BUDGET_RETIRE

UNCATEGORIZED_TRANSACTION

FROZEN_BY_BUDGET_OWNER

FROZEN_REASON_PREPARING_VISA_MIGRATION

OFAC_POSITIVE

SUSPICIOUS_ACTIVITY

CONFIRMED_FRAUD

THREE_DS_REJECTED

NO_DATE_OF_BIRTH

PENDING_DELETION

Example
"FROZEN_BY_ADMIN"

GenerateReceiptUploadUrlInput

Fields
Input Field Description
clientMutationId - String
actingOnCompany - ID
Example
{
  "clientMutationId": "abc123",
  "actingOnCompany": 4
}

GenerateReceiptUploadUrlPayload

Fields
Field Name Description
url - String Pre-signed URL that can be used to upload to an AWS S3 bucket
Example
{"url": "abc123"}

GetPanTokenInput

Fields
Input Field Description
cardToken - ID!

The persistent card token. This is the 'token' field on the Card object

Example
{"cardToken": "4"}

GetPanTokenPayload

Fields
Field Name Description
token - String A JWT token that can be used to retrieve PAN data. This token has a limited lifetime.
Example
{"token": "abc123"}

ID

Description

The ID scalar type represents a unique identifier, often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as "4") or integer (such as 4) input value will be accepted as an ID.

Example
4

Int

Description

The Int scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.

Example
123

Mcc

Fields
Field Name Description
id - ID! The ID of an object
mcc - String
description - String
Example
{
  "id": "4",
  "mcc": "abc123",
  "description": "abc123"
}

MccGroup

Fields
Field Name Description
id - ID! The ID of an object
uid - String
name - String
mccs - [Mcc]
Example
{
  "id": 4,
  "uid": "abc123",
  "name": "xyz789",
  "mccs": [Mcc]
}

MerchantOriginationType

Values
Enum Value Description

TRANSACTION

BILL_PAY

REIMBURSEMENT

Example
"TRANSACTION"

Node

PageInfo

Fields
Field Name Description
hasPreviousPage - Boolean! When paginating backwards, are there more items?
hasNextPage - Boolean! When paginating forwards, are there more items?
startCursor - String When paginating backwards, the cursor to continue.
endCursor - String When paginating forwards, the cursor to continue.
Example
{
  "hasPreviousPage": false,
  "hasNextPage": false,
  "startCursor": "abc123",
  "endCursor": "abc123"
}

PanTokenByCardIdInput

Fields
Input Field Description
cardId - ID!
Example
{"cardId": 4}

PanTokenByCardIdPayload

Fields
Field Name Description
token - String
Example
{"token": "xyz789"}

PeriodInterval

Values
Enum Value Description

NONE

DAILY

WEEKLY

MONTHLY

YEARLY

QUARTERLY

Example
"NONE"

ProgramNetwork

Description

The networks

Values
Enum Value Description

MASTERCARD

VISA

Example
"MASTERCARD"

Receipt

Fields
Field Name Description
id - ID! The ID of an object
url - String
filename - String
validated - Boolean
Example
{
  "id": "4",
  "url": "abc123",
  "filename": "abc123",
  "validated": false
}

ReceiptRequiredSetting

Values
Enum Value Description

REQUIRED_GLOBALLY

NOT_REQUIRED_GLOBALLY

REQUIRED_FOR_BUDGETS

Example
"REQUIRED_GLOBALLY"

ReceiptStatusEnum

Values
Enum Value Description

VALIDATED

NOT_VALIDATED

ATTACHED

MISSING

NOT_REQUIRED

NOT_ATTACHED

Example
"VALIDATED"

ReceiptSyncStatusEnum

Values
Enum Value Description

NOT_SYNCED

SYNCED

SYNC_ERROR

NO_ATTACHMENTS

Example
"NOT_SYNCED"

ReceiptUrlInput

Description

receipt url object

Fields
Input Field Description
url - String!
fileType - String!
validated - Boolean
ocrAmount - Int
ocrMerchantName - String
ocrTransactedAt - UnixTime
ocrSource - String
Example
{
  "url": "xyz789",
  "fileType": "abc123",
  "validated": true,
  "ocrAmount": 987,
  "ocrMerchantName": "xyz789",
  "ocrTransactedAt": UnixTime,
  "ocrSource": "abc123"
}

RemoveTagValueFromTransactionInput

Fields
Input Field Description
transactionId - ID

ID of the transaction to remove the tag value from

tagValueIds - [ID]

List of tag value IDs to remove

Example
{"transactionId": 4, "tagValueIds": ["4"]}

RemoveTagValueFromTransactionPayload

Fields
Field Name Description
transaction - Transaction
Example
{"transaction": Transaction}

ResetTagTypeInput

Fields
Input Field Description
tagTypeId - ID

The id of the tag type to reset

Example
{"tagTypeId": 4}

ResetTagTypePayload

Fields
Field Name Description
resetTagTypeId - ID
company - Company
Example
{"resetTagTypeId": 4, "company": Company}

Review

Fields
Field Name Description
id - ID! The ID of an object
isApproved - Boolean
note - String
insertedAt - UnixTime
deletedAt - UnixTime
reviewer - User
Example
{
  "id": "4",
  "isApproved": false,
  "note": "xyz789",
  "insertedAt": UnixTime,
  "deletedAt": UnixTime,
  "reviewer": User
}

RoleType

Values
Enum Value Description

MANAGER

OBSERVER

NONE

Example
"MANAGER"

SelectedTag

Description

Object used to make custom field default selections

Fields
Input Field Description
tagTypeId - ID!
tagValueIds - [ID]
Example
{"tagTypeId": "4", "tagValueIds": [4]}

SetUserDefaultTagPromptInput

Fields
Input Field Description
userId - ID
tagTypeId - ID
doPrompt - Boolean
Example
{
  "userId": "4",
  "tagTypeId": 4,
  "doPrompt": false
}

SetUserDefaultTagPromptPayload

Fields
Field Name Description
userDefaultTag - UserDefaultTag
Example
{"userDefaultTag": UserDefaultTag}

SetUserDefaultTagValueInput

Fields
Input Field Description
userId - ID
tagTypeId - ID
tagValueIds - [ID]
Example
{
  "userId": "4",
  "tagTypeId": "4",
  "tagValueIds": [4]
}

SetUserDefaultTagValuePayload

Fields
Field Name Description
userDefaultTag - UserDefaultTag
Example
{"userDefaultTag": UserDefaultTag}

SetValuesForTransactionInput

Fields
Input Field Description
transactionId - ID!

ID of the transaction to set the tag values for

tagValueAssignments - [TagValueAssignment]

A list of value assignments for the transaction's tag types

returnChild - Boolean

Return child transaction instead of default parent transaction

Example
{
  "transactionId": "4",
  "tagValueAssignments": [TagValueAssignment],
  "returnChild": false
}

SetValuesForTransactionPayload

Fields
Field Name Description
transaction - Transaction
Example
{"transaction": Transaction}

ShippingCreditType

Values
Enum Value Description

EXPEDITE_PROMO

METAL_PROMO

Example
"EXPEDITE_PROMO"

ShippingOrderCode

Values
Enum Value Description

MQ_USPS_STANDARD

MQ_FEDEX_EXPEDITE

MQ_FEDEX_OVERNIGHT

WEX_USPS_STANDARD

WEX_FEDEX_EXPEDITE

MQ_STANDARD

MQ_EXPEDITE

MQ_OVERNIGHT

WEX_STANDARD

WEX_EXPEDITE

Example
"MQ_USPS_STANDARD"

SimplifiedCardStatus

Values
Enum Value Description

ACTIVATED

NOT_ACTIVATED

FROZEN

DELETED

Example
"ACTIVATED"

SortDirection

Values
Enum Value Description

DESC

ASC

Example
"DESC"

SpendLimitSortColumn

Values
Enum Value Description

DISPLAY_NAME

TYPE

LIMIT

SPENT

BALANCE

Example
"DISPLAY_NAME"

SpendLimitType

Values
Enum Value Description

PERSON

BUDGET_CARD

Example
"PERSON"

SpendLimitsList

Fields
Field Name Description
id - ID! The ID of an object
totalLimitForBudget - Int
totalSpendForBudget - Int
totalAvailableForBudget - Int
allocations - UserAllocationConnection
Arguments
Name Description
after - String
first - Int
before - String
last - Int
Example
{
  "id": 4,
  "totalLimitForBudget": 123,
  "totalSpendForBudget": 987,
  "totalAvailableForBudget": 123,
  "allocations": UserAllocationConnection
}

String

Description

The String scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.

Example
"xyz789"

StringConnection

Fields
Field Name Description
pageInfo - PageInfo!
edges - [StringEdge]
Example
{
  "pageInfo": PageInfo,
  "edges": [StringEdge]
}

StringEdge

Fields
Field Name Description
node - String
cursor - String
Example
{
  "node": "xyz789",
  "cursor": "abc123"
}

SyncStatus

Values
Enum Value Description

PENDING

SYNCED

ERROR

MANUAL_SYNCED

NOT_SYNCED

Example
"PENDING"

Tag

Description

A tag is a field that can be applied to a number of different entities (e.g. transaction, reimbursement, etc.) as a means to categorize it. A tag can be a simple text field, a checkbox, a dropdown, or a multi-select dropdown. The type of tag is defined by its Tag Type, under the tagType field.

Also known as Custom Field in the application.

Fields
Field Name Description
id - ID! The ID of an object
isCompleted - Boolean Whether the field has meets requirements or not (always true for non-required fields)
isReadOnly - Boolean Whether the field is editable by the current user or not
isRequired - Boolean Whether the field is required or not, true for Required, false for Optional, null for Other (has a value, but is no longer relevant to the transaction or field is expired)
note - String For note fields only, contains current note value
possibleTagValues - TagValueConnection Only for value selector(single and multi) fields, gives the list of tag values that can be selected
Arguments
Name Description
after - String
first - Int
before - String
last - Int
search - String
possibleUsers - UserConnection Only for value selector(single and multi) fields, gives the list of users that can be selected
Arguments
Name Description
after - String
first - Int
before - String
last - Int
search - String
selectedTagValues - TagValueConnection Only for value selector(single and multi) fields, gives the list of tag values that are currently selected for the transaction on the field
Arguments
Name Description
after - String
first - Int
before - String
last - Int
selectedUsers - UserConnection Only for user selector(single and multi) fields, gives the list of users that are currently selected for the transaction on the field
Arguments
Name Description
after - String
first - Int
before - String
last - Int
tagType - TagType
userSelectedDefaultTagValues - [UserDefaultTag] Gives the list of user selected tag value defaults for the transaction on the field
Example
{
  "id": "4",
  "isCompleted": true,
  "isReadOnly": true,
  "isRequired": true,
  "note": "xyz789",
  "possibleTagValues": TagValueConnection,
  "possibleUsers": UserConnection,
  "selectedTagValues": TagValueConnection,
  "selectedUsers": UserConnection,
  "tagType": TagType,
  "userSelectedDefaultTagValues": [UserDefaultTag]
}

TagType

Description

Definition of a tag, it contains metadata that describes the tag and the types of values that can be assigned to it.

A tag is also known as a Custom Field in the application, thus the tag type can be thought of as the Custom Field definition.

Fields
Field Name Description
id - ID! The ID of an object
fieldType - FieldType
name - String
allowCustomValues - Boolean
description - String
kind - TagTypeKind
minimumAmountForRequirement - Int
deleted - Boolean
isLocked - Boolean
isGlobal - Boolean
isRequired - Boolean
multiSelect - Boolean
companyId - ID
company - Company
createdByUser - User
currentValues - TagValueConnection This field is intended to be used only in context of a transaction, card, or payment when using required_tag_types field otherwise it will throw an error!
Arguments
Name Description
after - String
first - Int
before - String
last - Int
tagValues - TagValueConnection
Arguments
Name Description
after - String
first - Int
before - String
last - Int
search - String
budgetId - ID
tagId - ID
includeTransactionValues - Boolean

Includes deleted values as well if there is any transaction associated with them

budgets - BudgetConnection

Budgets associated with the tag type that are visible to the current user. For a budget to be visible, the current user must be a company admin or a member of the budget.

Argument "include_global" could be used to filter - false "associates_only" or reconciled list of budgets. Returns reconciled list by default

Arguments
Name Description
after - String
first - Int
before - String
last - Int
includeGlobal - Boolean
budgetCount - Int The number of budgets associated with the tag type that are visible to the current user.
defaultScopes - [String]

Default scopes for a tag type.

These represent the available scope for a user selected default, defined by a company admin.

Example
{
  "id": 4,
  "fieldType": "CATEGORY",
  "name": "abc123",
  "allowCustomValues": false,
  "description": "xyz789",
  "kind": "CUSTOM_SELECTOR",
  "minimumAmountForRequirement": 123,
  "deleted": true,
  "isLocked": true,
  "isGlobal": false,
  "isRequired": false,
  "multiSelect": true,
  "companyId": 4,
  "company": Company,
  "createdByUser": User,
  "currentValues": TagValueConnection,
  "tagValues": TagValueConnection,
  "budgets": BudgetConnection,
  "budgetCount": 123,
  "defaultScopes": ["xyz789"]
}

TagTypeConnection

Fields
Field Name Description
pageInfo - PageInfo!
edges - [TagTypeEdge]
Example
{
  "pageInfo": PageInfo,
  "edges": [TagTypeEdge]
}

TagTypeEdge

Fields
Field Name Description
node - TagType
cursor - String
Example
{
  "node": TagType,
  "cursor": "xyz789"
}

TagTypeKind

Description

What kind of custom field the tag type should appear as and what datatype it handles

Values
Enum Value Description

CUSTOM_SELECTOR

CHECKBOX

NOTE

USER_SELECTOR

Example
"CUSTOM_SELECTOR"

TagValue

Description

Possible value that can be assigned to a tag, which is influenced by the tag's tag type.

A tag is also known as a Custom Field in the application, thus the tag value can be thought of as the value for a given Custom Field when applied to an entity (e.g. transaction, reimbursement, etc.).

Fields
Field Name Description
id - ID! The ID of an object
value - String
deleted - Boolean
isLocked - Boolean
tagType - TagType
Example
{
  "id": 4,
  "value": "abc123",
  "deleted": false,
  "isLocked": true,
  "tagType": TagType
}

TagValueAssignment

Description

Payload for a value to be assigned to an object for a specific tag type

Fields
Input Field Description
tagTypeId - ID!

ID of the tag type associated with the value being assigned

tagValueIds - [ID]

For custom value selectors only, list of tag value IDs that should be set for the transaction

selectedUserIds - [ID]

For user selectors only, list of user IDs that should be set for the transaction

note - String

For note fields only, contents to set the note to for the transaction

Example
{
  "tagTypeId": "4",
  "tagValueIds": [4],
  "selectedUserIds": [4],
  "note": "xyz789"
}

TagValueConnection

Fields
Field Name Description
pageInfo - PageInfo!
edges - [TagValueEdge]
totalCount - Int The total number of edges in this connection
Example
{
  "pageInfo": PageInfo,
  "edges": [TagValueEdge],
  "totalCount": 987
}

TagValueEdge

Fields
Field Name Description
node - TagValue
cursor - String
Example
{
  "node": TagValue,
  "cursor": "xyz789"
}

Transaction

Fields
Field Name Description
id - ID! The ID of an object
amount - Int This is the amount including fees.
transactedAmount - Int This is the amount with no fees. The swiped value if you will.
fees - Int This is the summation of all fees.
merchantName - String The name of the merchant
cleanedMerchantName - String The readable version of the raw merchant name of a transaction
merchantCategoryCode - String The merchant category code
insertedAt - UnixTime
updatedAt - UnixTime
occurredAt - UnixTime When the transaction occurred
authorizedAt - UnixTime When the transaction was authorized
receiptStatus - ReceiptStatusEnum Returns an enum receipt status
receiptSyncStatus - ReceiptSyncStatusEnum Returns the overall receipt sync status
companyProgram - CompanyProgram
parentTransactionId - ID Parent transaction id
matchedClearTransaction - Transaction
originalAuthTransaction - Transaction
parentTransaction - Transaction Returns the parent transaction
clearedAt - UnixTime
isCredit - Boolean
isParent - Boolean
isLocked - Boolean
hasAllRequiredFieldsCompleted - Boolean
type - TransactionType The type of transaction
declineDetails - DeclineDetails Returns the decline reason details for a transaction if a decline reason exists.
userAllocation - UserAllocation
user - User The user assigned to the transaction
card - Card The card used for the transaction
budget - Budget The budget used for the transaction
budgetPeriod - BudgetPeriod The budget period in which the transaction was made
company - Company The company assigned to the transaction
receipts - [Receipt] Returns a list of receipts
budgetOwners - [User] List of users who are budget owners of the budget to which this transaction belongs
receiptRequired - Boolean Returns a boolean indicating if the receipt is required for this specific transaction, including based on budget requirements and minimum amount requirements
reviewRequiredForTransaction - Boolean Returns a boolean indicating if review is required for this transaction based on review settings
reviewRequired - Boolean
tags - [Tag] The list of relevant tag types for the transaction, with their values and calculated fields
Arguments
Name Description
tagTypeIds - [ID]
limit - Int
accountingIntegrationTransactions - [AccountingIntegrationTransaction]
isReconciled - Boolean
childTransactions - TransactionConnection A list of child transactions
Arguments
Name Description
after - String
first - Int
before - String
last - Int
reviews - [Review]
Arguments
Name Description
includeDeleted - Boolean
reviewers - [TransactionReviewer]
currencyData - CurrencyData Info about the original currency for the transaction
pointsAwarded - Int How many points this transaction awarded. Returns 0 unless the transaction has cleared. Only viewable by admins and super_admins
Example
{
  "id": 4,
  "amount": 987,
  "transactedAmount": 123,
  "fees": 987,
  "merchantName": "abc123",
  "cleanedMerchantName": "abc123",
  "merchantCategoryCode": "xyz789",
  "insertedAt": UnixTime,
  "updatedAt": UnixTime,
  "occurredAt": UnixTime,
  "authorizedAt": UnixTime,
  "receiptStatus": "VALIDATED",
  "receiptSyncStatus": "NOT_SYNCED",
  "companyProgram": CompanyProgram,
  "parentTransactionId": 4,
  "matchedClearTransaction": Transaction,
  "originalAuthTransaction": Transaction,
  "parentTransaction": Transaction,
  "clearedAt": UnixTime,
  "isCredit": true,
  "isParent": false,
  "isLocked": true,
  "hasAllRequiredFieldsCompleted": true,
  "type": "CLEAR",
  "declineDetails": DeclineDetails,
  "userAllocation": UserAllocation,
  "user": User,
  "card": Card,
  "budget": Budget,
  "budgetPeriod": BudgetPeriod,
  "company": Company,
  "receipts": [Receipt],
  "budgetOwners": [User],
  "receiptRequired": true,
  "reviewRequiredForTransaction": true,
  "reviewRequired": true,
  "tags": [Tag],
  "accountingIntegrationTransactions": [
    AccountingIntegrationTransaction
  ],
  "isReconciled": false,
  "childTransactions": TransactionConnection,
  "reviews": [Review],
  "reviewers": [TransactionReviewer],
  "currencyData": CurrencyData,
  "pointsAwarded": 123
}

TransactionConnection

Fields
Field Name Description
pageInfo - PageInfo!
edges - [TransactionEdge]
totalCount - Int The total number of edges in this connection
Example
{
  "pageInfo": PageInfo,
  "edges": [TransactionEdge],
  "totalCount": 123
}

TransactionEdge

Fields
Field Name Description
node - Transaction
cursor - String
Example
{
  "node": Transaction,
  "cursor": "xyz789"
}

TransactionFilters

Fields
Input Field Description
amountMax - Int

The maximum amount of a transaction

amountMin - Int

The minimum amount of a transaction

budgetId - [ID]

The budget ID of a transaction

cardId - [ID]

The card id used for a transaction

categoryId - ID

The category of a transaction

cleanedMerchantName - [String]

A readable version of the raw merchant name associated with the transaction. The raw data will often include some unique identifier for a merchant which doesn't mean anything to a user. MX provides a service that will take this raw merchant name and return a more user friendly string

companyId - ID

The company ID

dateEnd - UnixTime

Limit to transactions before this datetime

dateStart - UnixTime

Limit to transactions after this datetime

feesMax - Int

The maximum fees of a transaction

feesMin - Int

The minimum fees of a transaction

filterTagTypes - [ID]

The transaction filter tag types

filterTagValues - [ID]

Limit to transactions to those which have the TagValues in the array

hasAllRequiredFieldsCompleted - Boolean

The status of a transaction's required fields

insertedDateEnd - UnixTime

Limit to transaction by inserted_at before this datetime

insertedDateStart - UnixTime

Limit to transaction by inserted_at after this datetime

isLocked - Boolean
isReviewed - Boolean

If true, returns reviewed transactions only. If false, returns unreviewed transactions only. If not provided, returns both reviewed and unreviewed transactions.

merchantName - String

The merchant name

receiptStatuses - [ReceiptStatusEnum]

The status of a transaction's receipts

reconciled - Boolean

If true, returns reconciled transactions only. If false, returns unreconciled (pending) transactions only. If not provided, returns both reconciled and unreconciled transactions.

reviewStatuses - [TransactionReviewStatus]

The review status of a transaction

search - String

Search string you want to use to filter the results

status - [TransactionStatus]

Defaults to all

transactionIds - [ID]

The IDs of a transaction

types - [TransactionType]

Defaults to [APPROVED, REVERSAL]

userId - [ID]

The list of user IDs

sortColumn - String

amount, merchant, spender, category, budget, clearedAt, tagType (requires a sortTagType argument), or occurredAt (default).

sortDirection - String

asc or desc. Defaults to asc. Sorting by occurredAt defaults to desc.

sortTagType - ID

Gives the id of the tag_type you want to sort on.

clearedDateEnd - UnixTime

Limit to transactions cleared before this datetime

clearedDateStart - UnixTime

Limit to transactions cleared after this datetime

Example
{
  "amountMax": 123,
  "amountMin": 987,
  "budgetId": [4],
  "cardId": ["4"],
  "categoryId": 4,
  "cleanedMerchantName": ["xyz789"],
  "companyId": "4",
  "dateEnd": UnixTime,
  "dateStart": UnixTime,
  "feesMax": 987,
  "feesMin": 123,
  "filterTagTypes": ["4"],
  "filterTagValues": ["4"],
  "hasAllRequiredFieldsCompleted": true,
  "insertedDateEnd": UnixTime,
  "insertedDateStart": UnixTime,
  "isLocked": false,
  "isReviewed": false,
  "merchantName": "abc123",
  "receiptStatuses": ["VALIDATED"],
  "reconciled": false,
  "reviewStatuses": ["AWAITING_BUDGET_OWNER_APPROVAL"],
  "search": "xyz789",
  "status": ["OPEN"],
  "transactionIds": [4],
  "types": ["CLEAR"],
  "userId": ["4"],
  "sortColumn": "xyz789",
  "sortDirection": "abc123",
  "sortTagType": "4",
  "clearedDateEnd": UnixTime,
  "clearedDateStart": UnixTime
}

TransactionReviewStatus

Values
Enum Value Description

AWAITING_BUDGET_OWNER_APPROVAL

AWAITING_ADMIN_APPROVAL

AWAITING_APPROVAL

APPROVED

DENIED

NEEDS_MY_APPROVAL

UPCOMING_APPROVAL

PENDING_APPROVAL

Example
"AWAITING_BUDGET_OWNER_APPROVAL"

TransactionReviewer

Fields
Field Name Description
approverType - ApproverType
reviewedAt - UnixTime
reviewerId - Int
status - TransactionReviewerStatus
approvers - [User]
user - User
Example
{
  "approverType": "ADMIN",
  "reviewedAt": UnixTime,
  "reviewerId": 123,
  "status": "WAITING",
  "approvers": [User],
  "user": User
}

TransactionReviewerStatus

Values
Enum Value Description

WAITING

APPROVED

DENIED

Example
"WAITING"

TransactionStatus

Values
Enum Value Description

OPEN

COMPLETE

LOCKED

Example
"OPEN"

TransactionType

Values
Enum Value Description

CLEAR

DECLINE

AUTHORIZATION

OTHER

Example
"CLEAR"

UnfreezeCardInput

Fields
Input Field Description
cardId - ID!

The card ID

Example
{"cardId": 4}

UnfreezeCardPayload

Fields
Field Name Description
card - Card The updated card
Example
{"card": Card}

UnixTime

Description

Unix/POSIX/epoch time

Example
UnixTime

UpdateBudgetInput

Fields
Input Field Description
id - ID

The ID of the budget to update

budgetPeriodId - ID

The budget period ID

softGoal - Int

The soft goal for the budget

hardLimit - Int

The hard limit for the budget

name - String

The new name of the budget

description - String

The description of the budget

timezone - String

The new timezone of the budget

recurringLimit - Int

The recurring limit for the budget

recurringGoal - Int

The recurring goal for the budget

startsAt - UnixTime

When the budget starts, defaults to now

expiresAt - UnixTime

Unix time for when the allocation should expire; set to 0 to set to no expiration

isCarryOver - Boolean

If true, then budget will have 0 recurring limit and will carry over funds

receiptRequired - Boolean

Whether or not receipts should be required for transactions in this budget

shareFunds - BudgetShareFundsOptions

Options to control how funds are shared amongst owners and/or members of this budget or if members must be assigned funds manually

rollover - Boolean

Whether or not remaining funds at the end of a period should rollover into the next period

periodInterval - PeriodInterval

How often the budget limit should be reset

nextPeriodStartMonth - Int

Calendar month to start the first budget period

assignedTagValues - [BudgetAssignedTagValues]

tag_type id with a list of assigned tag_values.

type - BudgetType

The budget type

allowBudgetOwnerToEditGoal - Boolean

Whether or not the budget owner can edit the goal

returnFunds - BudgetReturnFundsOptions

Settings to allow returning budget funds

autoAddUsers - Boolean

Whether or not new Divvy users should be automatically added to this budget

setUserFundsRecurring - Boolean

Settings that allow budgets type to be changed

maxTxSize - Int

The maximum amount allowed to be spent in a single transaction for any card within the budget

limitless - Boolean

true to update a budget to have no hard limit

limitlessGoal - Int

On limitless budgets, limitless_goal is a static amount that is displayed to the UI

Example
{
  "id": "4",
  "budgetPeriodId": "4",
  "softGoal": 123,
  "hardLimit": 987,
  "name": "xyz789",
  "description": "abc123",
  "timezone": "abc123",
  "recurringLimit": 987,
  "recurringGoal": 987,
  "startsAt": UnixTime,
  "expiresAt": UnixTime,
  "isCarryOver": true,
  "receiptRequired": false,
  "shareFunds": "DO_NOT_SHARE",
  "rollover": true,
  "periodInterval": "NONE",
  "nextPeriodStartMonth": 987,
  "assignedTagValues": [BudgetAssignedTagValues],
  "type": "ONE_TIME",
  "allowBudgetOwnerToEditGoal": true,
  "returnFunds": "RETURN_OWNER_FUNDS",
  "autoAddUsers": false,
  "setUserFundsRecurring": false,
  "maxTxSize": 987,
  "limitless": false,
  "limitlessGoal": 987
}

UpdateBudgetMccControlInput

Fields
Input Field Description
budgetId - ID!
controlType - ControlType
mccGroupUids - [ID]!
Example
{
  "budgetId": "4",
  "controlType": ControlType,
  "mccGroupUids": [4]
}

UpdateBudgetMccControlPayload

Fields
Field Name Description
budgetMccControl - BudgetMccControl
Example
{"budgetMccControl": BudgetMccControl}

UpdateBudgetPayload

Fields
Field Name Description
budget - Budget The updated budget
Example
{"budget": Budget}

UpdateCardInput

Fields
Input Field Description
cardId - ID

The id of the card to update

ownerId - ID

The id of the owner of the card

name - String

The new name for the card

amount - Int

The new amount (user_allocation.balance) of the card

allocationInterval - AllocationInterval

the new allocation interval

recurringAmount - Int

The new recurring amount (user_allocations.recurring_amount)

expiresAt - UnixTime

The expiration date

tagValueAssignments - [TagValueAssignment]

A list of value assignments for card's default tag type values

budgetId - ID

The budget destination for this card

intervalType - CardIntervalType

The card interval type (ONE_TIME, RECURRING)

receiptOverride - Boolean

Override receipt requirements for txs on a card

shareBudgetFunds - Boolean

True if the card should use shared funds

funderAmount - Int

Funds to give to the card on funder budgets

Example
{
  "cardId": "4",
  "ownerId": "4",
  "name": "xyz789",
  "amount": 123,
  "allocationInterval": "DAILY",
  "recurringAmount": 123,
  "expiresAt": UnixTime,
  "tagValueAssignments": [TagValueAssignment],
  "budgetId": "4",
  "intervalType": "ONE_TIME",
  "receiptOverride": false,
  "shareBudgetFunds": true,
  "funderAmount": 987
}

UpdateCardPayload

Fields
Field Name Description
card - Card
oldBudget - Budget
Example
{"card": Card, "oldBudget": Budget}

UpdateUserAllocationInput

Fields
Input Field Description
userAllocationId - ID!

The ID of the user allocation to update

name - String

Name for the allocation

type - BudgetType

Type of allocation

recurring - Boolean

Whether or not the allocation is recurring

amount - Int

The new balance for the allocation

recurringAmount - Int

The new recurring amount for the allocation

nextAllocation - UnixTime

Unix time for when the allocation should start

expiresAt - UnixTime

Unix time for when the allocation should expire; set to 0 to set to no expiration

allocationInterval - AllocationInterval

The interval for recurring allocations

funderAmount - Int

Funds to be given to the allocation on daily/weekly budgets

Example
{
  "userAllocationId": "4",
  "name": "xyz789",
  "type": "ONE_TIME",
  "recurring": true,
  "amount": 987,
  "recurringAmount": 123,
  "nextAllocation": UnixTime,
  "expiresAt": UnixTime,
  "allocationInterval": "DAILY",
  "funderAmount": 987
}

UpdateUserAllocationPayload

Fields
Field Name Description
userAllocation - UserAllocation The updated user allocation
budget - Budget The updated budget
Example
{
  "userAllocation": UserAllocation,
  "budget": Budget
}

UpdateUserInput

Fields
Input Field Description
userId - ID!
displayName - String
firstName - String
middleInitial - String
lastName - String
email - String
receiptEmail - String
street1 - String
street2 - String
city - String
state - String
zipCode - String
country - String
googlePlaceId - String
cellPhone - String
workPhone - String
avatarUrl - String
termsAcceptedAt - UnixTime
companyAdmin - Boolean
useCompanyMailingAddress - Boolean
onboard - Boolean
authEmail - String
dateOfBirth - Date
socialSecurityNumber - String
role - String
roleAttributes - [UserRoleAttribute]
passportCountry - String
passportNumber - String
smsOptIn - Boolean
canOrderOwnFirstPhysicalCard - Boolean
managerId - ID
locationId - ID
departmentId - ID
Example
{
  "userId": "4",
  "displayName": "xyz789",
  "firstName": "xyz789",
  "middleInitial": "xyz789",
  "lastName": "abc123",
  "email": "abc123",
  "receiptEmail": "abc123",
  "street1": "abc123",
  "street2": "abc123",
  "city": "abc123",
  "state": "xyz789",
  "zipCode": "abc123",
  "country": "xyz789",
  "googlePlaceId": "xyz789",
  "cellPhone": "abc123",
  "workPhone": "abc123",
  "avatarUrl": "abc123",
  "termsAcceptedAt": UnixTime,
  "companyAdmin": false,
  "useCompanyMailingAddress": true,
  "onboard": false,
  "authEmail": "abc123",
  "dateOfBirth": "2007-12-03",
  "socialSecurityNumber": "xyz789",
  "role": "xyz789",
  "roleAttributes": ["BOOKKEEPER_MAKE_PAYMENT"],
  "passportCountry": "xyz789",
  "passportNumber": "abc123",
  "smsOptIn": false,
  "canOrderOwnFirstPhysicalCard": true,
  "managerId": 4,
  "locationId": "4",
  "departmentId": "4"
}

UpdateUserPayload

Fields
Field Name Description
user - User
Example
{"user": User}

UpsertUserAllocationsInput

Fields
Input Field Description
budgetId - ID!
users - [UserAndAmount]
Example
{
  "budgetId": "4",
  "users": [UserAndAmount]
}

UpsertUserAllocationsPayload

Fields
Field Name Description
budget - Budget
budgetPeriod - BudgetPeriod
Example
{
  "budget": Budget,
  "budgetPeriod": BudgetPeriod
}

User

Fields
Field Name Description
firstName - String The user's first name
displayName - String The user's display name
middleInitial - String The user's middle initial
lastName - String The user's last name
email - String The user's email
receiptEmail - String The user's receipt email
roleAttributes - [UserRoleAttribute]
primaryRole - UserRole
cellPhone - String The user's cell phone number
smsOptIn - Boolean
workPhone - String The user's work phone number
companyAdmin - Boolean
useCompanyMailingAddress - Boolean
insertedAt - UnixTime
retired - Boolean
address - Address
totalCards - Int Get the total number of cards for a user
Arguments
Name Description
budgets - [ID]
merchants - [String]
search - String

Searches on card name, budget name, and owner name

types - [UserCardType]
intervalTypes - [CardIntervalType]

one_time or recurring

materialTypes - [CardMaterialType]

physical or virtual. Soon to be deprecated. Use card_types

cardTypes - [CardType]

physical or virtual

fundTypes - [CardFundType]

budget or member

expiresBy - UnixTime

cards that expire by a certain date

expiresAfter - UnixTime

cards that expire after a certain date

allCards - CardConnection All non-deleted cards for the user
Arguments
Name Description
after - String
first - Int
before - String
last - Int
budgets - [ID]

Filter cards to those which are in the given budgets

budgetPeriodId - ID

Filter cards to those which are in the given budget period

merchants - [String]

Filter cards to those which are used by the given merchants

search - String

Searches on card name, budget name, and owner name

types - [UserCardType]

Filter by the given card types

sortColumn - String

name (default), merchant, budgetName, lastCharged, type

sortDirection - String

asc or desc. Defaults to asc.

intervalTypes - [CardIntervalType]

one_time or recurring

materialTypes - [CardMaterialType]

physical or virtual. Soon to be deprecated. Use card_types

cardTypes - [CardType]

physical or virtual

fundTypes - [CardFundType]

budget or member

excludeFrozen - Boolean

if true will exclude frozen cards from the results

excludeExpired - Boolean

if true will exclude expired cards from the results

expiresBy - UnixTime

cards that expire by a certain date

expiresAfter - UnixTime

cards that expire after a certain date

simplifiedStatus - SimplifiedCardStatus

Filter cards by the given status

deleted - Boolean

if true, will only return deleted cards

frozenReasons - [FrozenReason]

Filter cards by the provided frozen reasons

cardsActiveThisPeriod - CardConnection All non-deleted cards for the user, plus any deleted cards that were used this period
Arguments
Name Description
after - String
first - Int
before - String
last - Int
budgets - [ID]
merchants - [String]
search - String

Searches on card name, budget name, and owner name

types - [UserCardType]
sortColumn - String

name (default), merchant, budgetName, lastCharged, type

sortDirection - String

asc or desc. Defaults to asc.

intervalTypes - [CardIntervalType]

one_time or recurring

materialTypes - [CardMaterialType]

physical or virtual. Soon to be deprecated. Use card_types

cardTypes - [CardType]

physical or virtual

fundTypes - [CardFundType]

budget or member

expiresBy - UnixTime

cards that expire by a certain date

expiresAfter - UnixTime

cards that expire after a certain date

budgets - UserToBudgetsConnection Returns all budgets for the user
Arguments
Name Description
after - String
first - Int
before - String
last - Int
role - RoleType

Filter based on user role to the budget

search - String

Searches on budgets name

isBudgetGroup - Boolean

Filters between budget groups (true) or budgets (false)

isSingleCardBudget - Boolean

If true, the response will only include sinlge card budgets

includeGroups - Boolean

If true, the response will include budget groups.

includeIndirectlyOwned - Boolean

If true, the response will include both directly owned and indirectly owned budgets and groups.

topLevelOwned - Boolean

If true, the response will only include the highest level of budget that the user directly owns.

budgetCount - Int The total number of budgets available
company - Company The company the user belongs to
initials - String The user's initials
dateOfBirth - Date
manager - User The manager assigned to the user
id - ID! The ID of an object
Example
{
  "firstName": "xyz789",
  "displayName": "abc123",
  "middleInitial": "xyz789",
  "lastName": "abc123",
  "email": "xyz789",
  "receiptEmail": "xyz789",
  "roleAttributes": ["BOOKKEEPER_MAKE_PAYMENT"],
  "primaryRole": "ADMIN",
  "cellPhone": "xyz789",
  "smsOptIn": true,
  "workPhone": "abc123",
  "companyAdmin": true,
  "useCompanyMailingAddress": false,
  "insertedAt": UnixTime,
  "retired": false,
  "address": Address,
  "totalCards": 987,
  "allCards": CardConnection,
  "cardsActiveThisPeriod": CardConnection,
  "budgets": UserToBudgetsConnection,
  "budgetCount": 123,
  "company": Company,
  "initials": "xyz789",
  "dateOfBirth": "2007-12-03",
  "manager": User,
  "id": "4"
}

UserAllocation

Fields
Field Name Description
id - ID! The ID of an object
name - String
type - BudgetType
limit - Int Amount currently allotted (divvied) from the budget limit to the allocation
recurringAmount - Int Amount that the allocation will be refilled to at the beginning of the next period
balance - Int Amount remaining in the allocation, as recorded in the ledger
balanceIncludingSharedFunds - Int Amount remaining in the allocation including shared funds if sharing
active - Boolean
retired - Boolean
allocationInterval - AllocationInterval
approved - Boolean
forSubscriptionCard - Boolean
recurring - Boolean Boolean value to show if the amount is recurring or not
funderAmount - Int
isVendorCard - Boolean
inBudget - Boolean Boolean value to show if the allocation exists on the budget, if false this means the allocation has been created for transferAllocationOptions to give ability to move transaction to budget user does not exisit on.
shareBudgetFunds - Boolean Whether the user of this allocation can spend from unallocated budget funds when the allocation is empty. This field is updated automatically whenever changes are made to the Budget's shareBudgetFunds, shareWithAllOwners, or shareWithAllMembers fields. It will be true if the budget's sharedBudgetFunds and shareWithAllOwners fields are true and the allocation's user is one of the budget's owners; or if the budget's shareBudgetFunds and shareWithAllMembers fields are true.
budgetRole - RoleType Return the budget role of the user for this allocation
user - User
expiresAt - UnixTime
budget - Budget
budgetPeriod - BudgetPeriod
nextBudgetPeriodAllocation - UserAllocation
previousBudgetPeriodAllocation - UserAllocation
subsequentBudgetPeriodAllocations - UserAllocationConnection
Arguments
Name Description
after - String
first - Int
before - String
last - Int
precedingBudgetPeriodAllocations - UserAllocationConnection
Arguments
Name Description
after - String
first - Int
before - String
last - Int
totalCleared - Int Return the sum of cleared transaction amounts for the user allocation
Arguments
Name Description
dateEnd - UnixTime
dateStart - UnixTime
occurredDateEnd - UnixTime
occurredDateStart - UnixTime
clearedDateEnd - UnixTime
clearedDateStart - UnixTime
totalPending - Int Return the sum of pending transaction amounts for the user allocation
Arguments
Name Description
dateEnd - UnixTime
dateStart - UnixTime
occurredDateEnd - UnixTime
occurredDateStart - UnixTime
clearedDateEnd - UnixTime
clearedDateStart - UnixTime
totalClearedForPeriod - Int Return the sum of cleared transaction amounts for the user allocation during the period (monthly for recurring, all-time for one-time).
totalPendingForPeriod - Int Return the sum of pending transaction amounts for the user allocation during the period (monthly for recurring, all-time for one-time).
totalSpendForPeriod - Int Return the sum of pending and cleared transaction amounts for the user allocation during the period (monthly for recurring, all-time for one-time).
availableFunds - Int Return the total amount available to spend. This will automatically account for budget owner spend (if enabled).
entityId - ID
displayName - String
ownerName - String
avatarUrl - String
avatarFallback - String
isOwner - Boolean
card - Card Get the card associated with the user allocation. If there isn't one, it'll return nil
connectedCardAllocationId - Int id of the connected card for a visa/mc combo allocation
Example
{
  "id": "4",
  "name": "abc123",
  "type": "ONE_TIME",
  "limit": 123,
  "recurringAmount": 987,
  "balance": 987,
  "balanceIncludingSharedFunds": 123,
  "active": false,
  "retired": false,
  "allocationInterval": "DAILY",
  "approved": false,
  "forSubscriptionCard": false,
  "recurring": true,
  "funderAmount": 123,
  "isVendorCard": false,
  "inBudget": false,
  "shareBudgetFunds": false,
  "budgetRole": "MANAGER",
  "user": User,
  "expiresAt": UnixTime,
  "budget": Budget,
  "budgetPeriod": BudgetPeriod,
  "nextBudgetPeriodAllocation": UserAllocation,
  "previousBudgetPeriodAllocation": UserAllocation,
  "subsequentBudgetPeriodAllocations": UserAllocationConnection,
  "precedingBudgetPeriodAllocations": UserAllocationConnection,
  "totalCleared": 987,
  "totalPending": 123,
  "totalClearedForPeriod": 123,
  "totalPendingForPeriod": 987,
  "totalSpendForPeriod": 123,
  "availableFunds": 987,
  "entityId": "4",
  "displayName": "xyz789",
  "ownerName": "abc123",
  "avatarUrl": "xyz789",
  "avatarFallback": "abc123",
  "isOwner": false,
  "card": Card,
  "connectedCardAllocationId": 123
}

UserAllocationConnection

Fields
Field Name Description
pageInfo - PageInfo!
edges - [UserAllocationEdge]
Example
{
  "pageInfo": PageInfo,
  "edges": [UserAllocationEdge]
}

UserAllocationEdge

Fields
Field Name Description
node - UserAllocation
cursor - String
Example
{
  "node": UserAllocation,
  "cursor": "xyz789"
}

UserAndAmount

Description

Object used to add users and send them funds at the same time

Fields
Input Field Description
userId - ID!

The ID of the user to update

amount - Int

New budget amount for the user

recurringAmount - Int

New recurring budget amount for the user

role - UserAndAmountRole

The role of the user

shareBudgetFunds - Boolean

If share budget funds are enabled for this user

Example
{
  "userId": 4,
  "amount": 987,
  "recurringAmount": 987,
  "role": "NONE",
  "shareBudgetFunds": false
}

UserAndAmountRole

Values
Enum Value Description

NONE

Makes user a regular member/employee of budget

MANAGER

Makes user a manager of the budget

OBSERVER

Makes user an observer of the budget

DELETE

Deletes the user from the budget

UNSPECIFIED

Default role for a user, makes user regular member/employee of budget
Example
"NONE"

UserCardType

Values
Enum Value Description

PHYSICAL

RECURRING

SUBSCRIPTION

BURNER

ONE_TIME

VIRTUAL_MEMBER

VIRTUAL_VENDOR

RECURRING_FUNDS

NON_RECURRING_FUNDS

Example
"PHYSICAL"

UserConnection

Fields
Field Name Description
pageInfo - PageInfo!
edges - [UserEdge]
totalCount - Int The total number of edges in this connection
Example
{
  "pageInfo": PageInfo,
  "edges": [UserEdge],
  "totalCount": 987
}

UserDefaultTag

Fields
Field Name Description
doPrompt - Boolean
tagType - TagType
tagValues - [TagValue]
userDefaultTagConditions - [UserDefaultTagCondition]
Example
{
  "doPrompt": true,
  "tagType": TagType,
  "tagValues": [TagValue],
  "userDefaultTagConditions": [UserDefaultTagCondition]
}

UserDefaultTagCondition

Fields
Field Name Description
defaultScope - DefaultScope
Example
{"defaultScope": "GLOBAL"}

UserEdge

Fields
Field Name Description
node - User
cursor - String
Example
{
  "node": User,
  "cursor": "abc123"
}

UserRole

Values
Enum Value Description

ADMIN

APPROVER

AUDITOR

BOOKKEEPER

MEMBER

FINANCE_ADMIN

SUPER_ADMIN

DISPUTE_ADMIN

BANK_ACCOUNT_ADMIN

CX_READ_ONLY

TRANSACTION_ANALYST

CHASE_COMPANY_CREATOR

CHASE_USER_MANAGER

NO_ACCESS

Example
"ADMIN"

UserRoleAttribute

Values
Enum Value Description

BOOKKEEPER_MAKE_PAYMENT

BOOKKEEPER_TRANSACTION_SETTINGS

Example
"BOOKKEEPER_MAKE_PAYMENT"

UserToBudgetsConnection

Fields
Field Name Description
pageInfo - PageInfo!
edges - [UserToBudgetsEdge]
Example
{
  "pageInfo": PageInfo,
  "edges": [UserToBudgetsEdge]
}

UserToBudgetsEdge

Fields
Field Name Description
node - Budget
cursor - String
role - RoleType
Example
{
  "node": Budget,
  "cursor": "xyz789",
  "role": "MANAGER"
}

ValidateReceiptInput

Fields
Input Field Description
receiptId - String!
Example
{"receiptId": "abc123"}

ValidateReceiptPayload

Fields
Field Name Description
receipt - Receipt
Example
{"receipt": Receipt}