getDocuments

@GET(value = "documents")
abstract suspend fun getDocuments(@Query(value = "limit") limit: Int? = 20, @Query(value = "offset") offset: Int? = 0, @Query(value = "sortBy") sortBy: DocumentSortByEnum? = DocumentSortByEnum.ARRIVAL_DATE_TIME, @Query(value = "orderBy") orderBy: DocumentOrderByEnum? = DocumentOrderByEnum.DESC, @Query(value = "filter.accountMetadata.account") filterAccountMetadataAccount: @JvmSuppressWildcards List<String>? = null, @Query(value = "filter.accountMetadata.account.exists") filterAccountMetadataAccountExists: Boolean? = null, @Query(value = "filter.accountMetadata.transactionId") filterAccountMetadataTransactionId: @JvmSuppressWildcards List<String>? = null, @Query(value = "filter.accountMetadata.transactionId.exists") filterAccountMetadataTransactionIdExists: Boolean? = null, @Query(value = "filter.amountDue") filterAmountDue: @JvmSuppressWildcards List<BigDecimal>? = null, @Query(value = "filter.amountDue.gte") filterAmountDueGte: BigDecimal? = null, @Query(value = "filter.amountDue.lte") filterAmountDueLte: BigDecimal? = null, @Query(value = "filter.arrivalDateTime.gte") filterArrivalDateTimeGte: OffsetDateTime? = null, @Query(value = "filter.arrivalDateTime.lte") filterArrivalDateTimeLte: OffsetDateTime? = null, @Query(value = "filter.categoryCode") filterCategoryCode: @JvmSuppressWildcards List<String>? = null, @Query(value = "filter.currencyCode") filterCurrencyCode: @JvmSuppressWildcards List<String>? = null, @Query(value = "filter.description") filterDescription: @JvmSuppressWildcards List<String>? = null, @Query(value = "filter.documentDate") filterDocumentDate: @JvmSuppressWildcards List<LocalDate>? = null, @Query(value = "filter.documentDate.gte") filterDocumentDateGte: LocalDate? = null, @Query(value = "filter.documentDate.lte") filterDocumentDateLte: LocalDate? = null, @Query(value = "filter.documentNumber") filterDocumentNumber: @JvmSuppressWildcards List<String>? = null, @Query(value = "filter.documentTime") filterDocumentTime: @JvmSuppressWildcards List<String>? = null, @Query(value = "filter.documentTime.gte") filterDocumentTimeGte: String? = null, @Query(value = "filter.documentTime.lte") filterDocumentTimeLte: String? = null, @Query(value = "filter.documentType") filterDocumentType: @JvmSuppressWildcards List<DocumentTypeEnum>? = null, @Query(value = "filter.expenseType") filterExpenseType: @JvmSuppressWildcards List<ExpenseTypeEnum>? = null, @Query(value = "filter.folder") filterFolder: @JvmSuppressWildcards List<String>? = null, @Query(value = "filter.foreignId") filterForeignId: @JvmSuppressWildcards List<String>? = null, @Query(value = "filter.fulltext") filterFulltext: String? = null, @Query(value = "filter.id") filterId: @JvmSuppressWildcards List<String>? = null, @Query(value = "filter.lastUpdateDateTime.gte") filterLastUpdateDateTimeGte: OffsetDateTime? = null, @Query(value = "filter.lastUpdateDateTime.lte") filterLastUpdateDateTimeLte: OffsetDateTime? = null, @Query(value = "filter.merchantName") filterMerchantName: @JvmSuppressWildcards List<String>? = null, @Query(value = "filter.merchantTaxIdNumber") filterMerchantTaxIdNumber: @JvmSuppressWildcards List<String>? = null, @Query(value = "filter.notes") filterNotes: @JvmSuppressWildcards List<String>? = null, @Query(value = "filter.paymentTender") filterPaymentTender: @JvmSuppressWildcards List<TenderTypesEnum>? = null, @Query(value = "filter.returnPeriodDuration") filterReturnPeriodDuration: @JvmSuppressWildcards List<BigDecimal>? = null, @Query(value = "filter.returnPeriodDuration.gte") filterReturnPeriodDurationGte: BigDecimal? = null, @Query(value = "filter.returnPeriodDuration.lte") filterReturnPeriodDurationLte: BigDecimal? = null, @Query(value = "filter.returnPeriodUnit") filterReturnPeriodUnit: @JvmSuppressWildcards List<PeriodUnitEnum>? = null, @Query(value = "filter.total") filterTotal: @JvmSuppressWildcards List<BigDecimal>? = null, @Query(value = "filter.total.gte") filterTotalGte: BigDecimal? = null, @Query(value = "filter.total.lte") filterTotalLte: BigDecimal? = null, @Query(value = "filter.status") filterStatus: @JvmSuppressWildcards List<DocumentStatusTypeEnum>? = null, @Query(value = "filter.sourceFormat") filterSourceFormat: @JvmSuppressWildcards List<DocumentSourceFormatsEnum>? = null, @Query(value = "filter.warrantyPeriodDuration") filterWarrantyPeriodDuration: @JvmSuppressWildcards List<BigDecimal>? = null, @Query(value = "filter.warrantyPeriodDuration.gte") filterWarrantyPeriodDurationGte: BigDecimal? = null, @Query(value = "filter.warrantyPeriodDuration.lte") filterWarrantyPeriodDurationLte: BigDecimal? = null, @Query(value = "filter.warrantyPeriodUnit") filterWarrantyPeriodUnit: @JvmSuppressWildcards List<PeriodUnitEnum>? = null): Response<GetDocumentListResponseDto>

Returns a paginated list of documents from a user. This will retrieve a paginated list of documents for the current user. Responses:

  • 200: Success. The list of documents was successfully retrieved.

  • 400: Bad Request. This will occur if you omit a required parameter, send an invalid parameter or if you provide an invalid value for a parameter.

  • 401: Unauthorized. This will occur if you do not supply an access-token to this endpoint, or if you provide an expired or invalid access token.

  • 403: Forbidden. This will occur if you try to use this endpoint without being setup for documents.

  • 500: Internal Server Error.

Return

GetDocumentListResponseDto

Parameters

limit

Specify the number of documents to return. \\ If no value is passed it will use the default to limit the number of items in the list (optional, default to 20)

offset

Page number for the documents to be returned. The page count uses the limit value to define which documents will be returned. \\ It is zero based index, so first page is 0. \\ Example for starting at the third page in a list of results: `?offset=2` (optional, default to 0)

sortBy

Document attribute to sort the response data. The default sort order is descending, but this can be specified using the `orderBy` filter. \\ Current acceptable values are: `arrivalDateTime`, `documentDate`, or `documentTime` (optional, default to arrivalDateTime)

orderBy

If sorting the returned documents with the `sortBy` filter, this orderBy filter allows you to specify a sort order. \\ This will be handy if you want to sort in ascending order since the default sort order is descending. \\ Current acceptable values (case insensitive) are: `ASC`, `DESC` (optional, default to DESC)

filterAccountMetadataAccount

Array of `accountMetadata.account` to filter the documents. Should ideally satisfy the `/^a-zA-Z0-9-_:.+$/` pattern \\ Example: `filter.accountMetadata.account='ACC102030'&filter.accountMetadata.account='405060'` (optional)

filterAccountMetadataAccountExists

This is used to match and include documents where a value exists for the `accountMetadata.account` property. \\ Only `true` or `false` boolean values are accepted. A mix of operators with basic values is not supported. If `accountMetadata.account.exists` is provided together with plain values for account, this `exists` operator is ignored. \\ Example: To filter all documents with `accountMetadata.account` not set, use `filter.accountMetadata.account.exists=false` (optional)

filterAccountMetadataTransactionId

Array of `accountMetadata.transactionId` to filter the documents. Should ideally satisfy the `/^a-zA-Z0-9-_:.+$/` pattern. \\ Example: `filter.accountMetadata.transactionId='TX00001'&filter.accountMetadata.transactionId='TX00002'` (optional)

filterAccountMetadataTransactionIdExists

This is used to match and include documents where a value exists for the `accountMetadata.transactionId` property. \\ Only `true` or `false` boolean values are accepted. A mix of operators with basic values is not supported. If `accountMetadata.transactionId.exists` is provided together with plain values for transactionId, this `exists` operator is ignored. \\ Example: To filter all documents with `accountMetadata.transactionId` not set, use `filter.accountMetadata.transactionId.exists=false` (optional)

filterAmountDue

Array of `amountDue` values to filter the documents. `afterTax` is the document property considered for the match. \\ Example: `filter.amountDue=1000.55&filter.amountDue=1010.90` (optional)

filterAmountDueGte

This is a greater than or equal to filter on the `amountDue` value to filter the documents. `afterTax` is the document property considered for the match. \\ All filter conditions will compose a logical `AND` chain in the query. A mix of operators with basic values is not supported. \\ Examples: \\ * with single operator: `filter.amountDue.gte=1000.55` * with other operators (behave like AND): `filter.amountDue.gte=1000.55&filter.amountDue.lte=1010.90` (optional)

filterAmountDueLte

This is a lesser than or equal to filter on the `amountDue` value to filter the documents. `afterTax` is the document property considered for the match. \\ All filter conditions will compose a logical `AND` chain in the query. A mix of operators with basic values is not supported. \\ Examples: \\ * with single operator: `filter.amountDue.lte=1000.55` * with other operators (behave like AND): `filter.amountDue.gte=1000.55&filter.amountDue.lte=1010.90` (optional)

filterArrivalDateTimeGte

This is a greater than or equal to filter on the `arrivalDateTime` to filter the documents. All filter conditions will compose a logical `AND` chain in the query. The `arrivalDateTime` filter does not match exact values and is considered to be UTC. \\ Date-time formats allowed are: `YYYY-MM-DDTHH:mm:ss.SSS` or `YYYY-MM-DD HH:mm:ss.SSS`. Time fields can be suppressed from the end to the beginning i.e. `YYYY-MM-DD HH:mm` is acceptable. \\ Examples: \\ * with just date: `filter.arrivalDateTime.gte='2012-12-28'` * with date and time: `filter.arrivalDateTime.gte='2012-12-28T21:27'` * with date and time: `filter.arrivalDateTime.gte='2012-12-28 21:27:55.827'` * with other operators (behave like AND): `filter.arrivalDateTime.gte='2012-12-28T21:27'&filter.arrivalDateTime.lte='2012-12-28T21:27:59'` (optional)

filterArrivalDateTimeLte

This is a lesser than or equal to filter on the arrivalDateTime to filter the documents. All filter conditions will compose a logical `AND` chain in the query. The `arrivalDateTime` field does not match exact values and is considered to be UTC. \\ Date-time formats allowed are: `YYYY-MM-DDTHH:mm:ss.SSS` or `YYYY-MM-DD HH:mm:ss.SSS`. Time fields can be suppressed from the end to the beginning i.e. `YYYY-MM-DD HH:mm` is acceptable. \\ Examples: \\ * with just date: `filter.arrivalDateTime.lte='2012-12-28'` * with date and time: `filter.arrivalDateTime.lte='2012-12-28T21:27'` * with date and time: `filter.arrivalDateTime.lte='2012-12-28 21:27:55.827'` * with other operators (behave like AND): `filter.arrivalDateTime.gte='2012-12-28T21:27'&filter.arrivalDateTime.lte='2012-12-28T21:27:59'` (optional)

filterCategoryCode

Array of `categoryCode` values to filter the documents. \\ Example: `filter.categoryCode='shopping'&filter.categoryCode='business'` (optional)

filterCurrencyCode

Array of `currencyCode` values to filter the documents. \\ Example: `filter.currencyCode='CAD'&filter.currencyCode='USD'` (optional)

filterDescription

Array of `description` values to filter the documents. The filter is case insentive and matches any document where the description contains the given value. Values should ideally satisfy the /^a-zA-Z0-9.?!\\-,\\\\/:_@#'\" {0,75}$/ pattern which prohibits the `;` punctuation \\ Example: `filter.description='Dinner with friends'&filter.description='Children winter gear' (optional)

filterDocumentDate

Array of `documentDate` values to filter the documents. \\ Example: `filter.documentDate='2021-04-04'&filter.documentDate='2021-12-08'` (optional)

filterDocumentDateGte

This is a greater than or equal to filter on the `documentDate` to filter the documents. \\ All filter conditions will compose a logical `AND` chain in the query. A mix of operators with basic values is not supported. \\ Examples: \\ * with single operator: `filter.documentDate.gte='2012-12-28'` * with other operators (behave like AND): `filter.documentDate.gte='2012-12-28'&filter.documentDate.lte='2023-12-28'` (optional)

filterDocumentDateLte

This is a lesser than or equal to filter on the `documentDate` to filter the documents. \\ All filter conditions will compose a logical `AND` chain in the query. A mix of operators with basic values is not supported. \\ Examples: \\ * with single operator: `filter.documentDate.lte='2012-12-28'` * with other operators (behave like AND): `filter.documentDate.gte='2012-12-28'&filter.documentDate.lte='2023-12-28'` (optional)

filterDocumentNumber

Array of `documentNumber` values to filter the documents. \\ Example: `filter.documentNumber='112233'&filter.documentNumber='445566'` (optional)

filterDocumentTime

Array of `documentTime` values to filter the documents. \\ Example: `filter.documentTime='21:12'&filter.documentTime='22:13'` (optional)

filterDocumentTimeGte

This is a greater than or equal to filter on the `documentTime` to filter the documents. \\ All filter conditions will compose a logical `AND` chain in the query. A mix of operators with basic values is not supported. \\ Example: \\ * with single operator: `filter.documentTime.gte='10:00'` * with other operators (behave like AND): `filter.documentTime.gte='10:00'&filter.documentTime.lte='14:00'` (optional)

filterDocumentTimeLte

This is a lesser than or equal to filter on the `documentTime` to filter the documents. \\ All filter conditions will compose a logical `AND` chain in the query. A mix of operators with basic values is not supported. \\ Example: \\ * with single operator: `filter.documentTime.lte='10:00'` * with other operators (behave like AND): `filter.documentTime.gte='10:00'&filter.documentTime.lte='14:00'` (optional)

filterDocumentType

Array of `documentType` to filter the documents. Currently supported values are invoice, receipt. \\ Example: `filter.documentType='invoice'` (optional)

filterExpenseType

Array of `expenseType` to filter the documents. Currently supported values are business, personal. \\ Example: `filter.expenseType='business'` (optional)

filterFolder

Will only return documents that are in one or more of the folder IDs specified. The folder IDs should match those set on the user that the document belongs to. (optional)

filterForeignId

Array of `foreignId` to filter the documents. Example: `filter.foreignId='20210930_001'` (optional)

filterFulltext

Will perform a case insensitive full text search on the following properties of a document: merchant name, total amount (after tax), item descriptions, document description. Total amount can match both the integer part or the amount with two decimals with the `.` as separator. (optional)

filterId

Array of ids to filter the documents. Example: `filter.id='mE0wyhAwJoPMUWlzrbVY'` (optional)

filterLastUpdateDateTimeGte

This is a greater than or equal to filter on the `lastUpdateDateTime` to filter the documents. \\ All filter conditions will compose a logical `AND` chain in the query. The `lastUpdateDateTime` filter does not match exact values and is considered to be UTC. \\ Date time formats allowed are: 'YYYY-MM-DDTHH:mm:ss.SSS' or 'YYYY-MM-DD HH:mm:ss.SSS'. Time fields can be suppressed from the end to the beginning i.e. 'YYYY-MM-DD HH:mm' is acceptable. \\ Examples: \\ * with just date: `filter.lastUpdateDateTime.gte='2012-12-28'` * with date and time: `filter.lastUpdateDateTime.gte='2012-12-28T21:27'` * with date and time: `filter.lastUpdateDateTime.gte='2012-12-28 21:27:55.827'` * with other operators (behave like AND): `filter.lastUpdateDateTime.gte='2012-12-28T21:27'&filter.lastUpdateDateTime.lte='2012-12-28T21:27:59'` (optional)

filterLastUpdateDateTimeLte

This is a greater than or equal to filter on the `lastUpdateDateTime` to filter the documents. \\ All filter conditions will compose a logical `AND` chain in the query. The `lastUpdateDateTime` filter does not match exact values and is considered to be UTC. \\ Date time formats allowed are: 'YYYY-MM-DDTHH:mm:ss.SSS' or 'YYYY-MM-DD HH:mm:ss.SSS'. Time fields can be suppressed from the end to the beginning i.e. 'YYYY-MM-DD HH:mm' is acceptable. \\ Examples: \\ * with just date: `filter.lastUpdateDateTime.lte='2012-12-28'` * with date and time: `filter.lastUpdateDateTime.lte='2012-12-28T21:27'` * with date and time: `filter.lastUpdateDateTime.lte='2012-12-28 21:27:55.827'` * with other operators (behave like AND): `filter.lastUpdateDateTime.gte='2012-12-28T21:27'&filter.lastUpdateDateTime.lte='2012-12-28T21:27:59'` (optional)

filterMerchantName

Array of `merchantName` values to filter the documents. Example: `filter.merchantName='Home Sense'&filter.merchantName='IKAE'` (optional)

filterMerchantTaxIdNumber

Array of `merchantTaxIdNumber` values to filter the documents. \\ Example: `filter.merchantTaxIdNumber='1111 RT0001'&filter.merchantTaxIdNumber='2222 RT0002'` (optional)

filterNotes

Array of `notes` values to filter the documents. The filter is case insentive and matches any document where the notes contains the given value. \\ Example: `filter.notes='Recurrent expense'&filter.description='Wedding cake insurance' (optional)

filterPaymentTender

Array of `paymentTender` values to filter the documents. \\ Example: `filter.paymentTender='Amex'&filter.paymentTender='Cash'` (optional)

filterReturnPeriodDuration

Array of `userMetadata.returnPeriod.duration` values to filter the documents. \\ When an array of filter.returnPeriodDuration is provided, they will compose a logial `OR` chain in the query. A mix of operators with basic values is not supported. \\ Example: (behave like OR): `filter.returnPeriodDuration=1&filter.returnPeriodDuration=10` (optional)

filterReturnPeriodDurationGte

This is a greater than or equal to filter on the `userMetadata.returnPeriod.duration` to filter the documents. \\ All filter conditions will compose a logical `AND` chain in the query. A mix of operators with basic values is not supported. \\ Examples: * with single operator: `filter.returnPeriodDuration.gte=1` * with other operators (behave like AND): `filter.returnPeriodDuration.gte=1&filter.returnPeriodDuration.lte=10` (optional)

filterReturnPeriodDurationLte

This is a lesser than or equal to filter on the `userMetadata.returnPeriod.duration` to filter the documents. \\ All filter conditions will compose a logical `AND` chain in the query. A mix of operators with basic values is not supported. \\ Examples: * with single operator: `filter.returnPeriodDuration.lte=10` * with other operators (behave like AND): `filter.returnPeriodDuration.gte=1&filter.returnPeriodDuration.lte=10` (optional)

filterReturnPeriodUnit

Array of `userMetadata.returnPeriod.unit` values to filter the documents. Example: `filter.returnPeriodUnit='day'&filter.returnPeriodUnit='week'` (optional)

filterTotal

Array of `total` values to filter the documents. `afterTax` is the document property considered for the match. \\ When an array of filter.total is provided, they will compose a logial `OR` chain in the query. A mix of operators with basic values is not supported. \\ Example: (behave like OR): `filter.total=1000.55&filter.total=1010.90` (optional)

filterTotalGte

This is a greater than or equal to filter on the `total` to filter the documents. `afterTax` is the document property considered for the match. \\ All filter conditions will compose a logical `AND` chain in the query. A mix of operators with basic values is not supported. \\ Examples: * with single operator: `filter.total.gte=1000.55` * with other operators (behave like AND): `filter.total.gte=1000.55&filter.total.lte=1010.90` (optional)

filterTotalLte

This is a lesser than or equal to filter on the `total` to filter the documents. `afterTax` is the document property considered for the match. \\ All filter conditions will compose a logical `AND` chain in the query. A mix of operators with basic values is not supported. \\ Examples: * with single operator: `filter.total.lte=1000.55` * with other operators (behave like AND): `filter.total.gte=1000.55&filter.total.lte=1010.90` (optional)

filterStatus

Array of `status` values to filter the documents. Example: `filter.status='CompletedFailed'&filter.status='CompletedSuccess'` (optional)

filterSourceFormat

Array of `sourceFormat` values to filter the documents. Example: `filter.sourceFormat='image'&filter.sourceFormat='pdf'` (optional)

filterWarrantyPeriodDuration

Array of `userMetadata.warrantyPeriod.duration` values to filter the documents. \\ When an array of filter.warrantyPeriodDuration is provided, they will compose a logial `OR` chain in the query. A mix of operators with basic values is not supported. \\ Example: (behave like OR): `filter.warrantyPeriodDuration=1&filter.warrantyPeriodDuration=10` (optional)

filterWarrantyPeriodDurationGte

This is a greater than or equal to filter on the `userMetadata.warrantyPeriod.duration` to filter the documents. \\ All filter conditions will compose a logical `AND` chain in the query. A mix of operators with basic values is not supported. \\ Examples: * with single operator: `filter.warrantyPeriodDuration.gte=1` * with other operators (behave like AND): `filter.warrantyPeriodDuration.gte=1&filter.warrantyPeriodDuration.lte=10` (optional)

filterWarrantyPeriodDurationLte

This is a lesser than or equal to filter on the `userMetadata.warrantyPeriod.duration` to filter the documents. \\ All filter conditions will compose a logical `AND` chain in the query. A mix of operators with basic values is not supported. \\ Examples: * with single operator: `filter.warrantyPeriodDuration.lte=10` * with other operators (behave like AND): `filter.warrantyPeriodDuration.gte=1&filter.warrantyPeriodDuration.lte=10` (optional)

filterWarrantyPeriodUnit

Array of `userMetadata.warrantyPeriod.unit` values to filter the documents. Example: `filter.warrantyPeriodUnit='day'&filter.warrantyPeriodUnit='week'` (optional)