OBJECT

Expense

This represents an Expense

link GraphQL Schema definition

  • type Expense {
  • id: String!
  • # Legacy ID as returned by API V1. Avoid relying on this field as it may be
  • # removed in the future.
  • legacyId: Int!
  • # Title/main description for this expense
  • description: String!
  • # Longer description for this expense
  • longDescription: String
  • # Total amount of the expense (sum of the item's amounts).
  • amount: Int!
  • # The time of creation
  • createdAt: DateTime!
  • # Currency that should be used for the payout
  • currency: Currency!
  • # Whether this expense is a receipt or an invoice
  • type: ExpenseType!
  • # The state of the expense (pending, approved, paid, rejected...etc)
  • status: ExpenseStatus!
  • # Returns the list of comments for this expense, or `null` if user is not allowed
  • # to see them
  • #
  • # Arguments
  • # limit: The number of results to fetch (default 10, max 1000)
  • # offset: The offset to use to fetch
  • # orderBy: [Not documented]
  • comments(limit: Int, offset: Int, orderBy: ChronologicalOrderInput): CommentCollection
  • # The account where the expense was submitted
  • account: Account!
  • # The account being paid by this expense
  • payee: Account!
  • # The address of the payee
  • payeeLocation: Location
  • # The account who created this expense
  • createdByAccount: Account
  • # The payout method to use for this expense
  • payoutMethod: PayoutMethod
  • # (Optional) files attached to the expense
  • attachedFiles: [ExpenseAttachedFile!]
  • attachments: [ExpenseItem] @deprecated( reason: "2020-04-08: Field has been renamed to "items"" )
  • items: [ExpenseItem]
  • # Additional information about the payment as HTML. Only visible to user and
  • # admins.
  • privateMessage: String
  • # Information to display on the invoice. Only visible to user and admins.
  • invoiceInfo: String
  • # The permissions given to current logged in user for this expense
  • permissions: ExpensePermissions!
  • # The list of activities (ie. approved, edited, etc) for this expense ordered by
  • # date ascending
  • activities: [Activity!]!
  • tags: [String]!
  • # Returns the list of legal documents required from the payee before the expense
  • # can be payed. Must be logged in.
  • requiredLegalDocuments: [LegalDocumentType]
  • # Drafted field values that were still not persisted
  • draft: JSON
  • # The account that requested this expense to be submitted
  • requestedByAccount: Account
  • }