getDocuments
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
Parameters
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
Array of `categoryCode` values to filter the documents. \\ Example: `filter.categoryCode='shopping'&filter.categoryCode='business'` (optional)
Array of `currencyCode` values to filter the documents. \\ Example: `filter.currencyCode='CAD'&filter.currencyCode='USD'` (optional)
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)
Array of `documentDate` values to filter the documents. \\ Example: `filter.documentDate='2021-04-04'&filter.documentDate='2021-12-08'` (optional)
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)
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)
Array of `documentNumber` values to filter the documents. \\ Example: `filter.documentNumber='112233'&filter.documentNumber='445566'` (optional)
Array of `documentTime` values to filter the documents. \\ Example: `filter.documentTime='21:12'&filter.documentTime='22:13'` (optional)
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)
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)
Array of `documentType` to filter the documents. Currently supported values are invoice, receipt. \\ Example: `filter.documentType='invoice'` (optional)
Array of `expenseType` to filter the documents. Currently supported values are business, personal. \\ Example: `filter.expenseType='business'` (optional)
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)
Array of `foreignId` to filter the documents. Example: `filter.foreignId='20210930_001'` (optional)
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)
Array of ids to filter the documents. Example: `filter.id='mE0wyhAwJoPMUWlzrbVY'` (optional)
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)
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)
Array of `merchantName` values to filter the documents. Example: `filter.merchantName='Home Sense'&filter.merchantName='IKAE'` (optional)
Array of `merchantTaxIdNumber` values to filter the documents. \\ Example: `filter.merchantTaxIdNumber='1111 RT0001'&filter.merchantTaxIdNumber='2222 RT0002'` (optional)
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)
Array of `paymentTender` values to filter the documents. \\ Example: `filter.paymentTender='Amex'&filter.paymentTender='Cash'` (optional)
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)
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)
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)
Array of `userMetadata.returnPeriod.unit` values to filter the documents. Example: `filter.returnPeriodUnit='day'&filter.returnPeriodUnit='week'` (optional)
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)
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)
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)
Array of `status` values to filter the documents. Example: `filter.status='CompletedFailed'&filter.status='CompletedSuccess'` (optional)
Array of `sourceFormat` values to filter the documents. Example: `filter.sourceFormat='image'&filter.sourceFormat='pdf'` (optional)
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)
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)
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)
Array of `userMetadata.warrantyPeriod.unit` values to filter the documents. Example: `filter.warrantyPeriodUnit='day'&filter.warrantyPeriodUnit='week'` (optional)