DocumentsApi

interface DocumentsApi

Functions

deleteDocuments
Link copied to clipboard
@DELETE(value = documents)
abstract suspend fun deleteDocuments(@Body() documentDeleteDto: DocumentDeleteDto): Response<DocumentDeleteResponseDto>
Delete documents This endpoint will allow you to batch delete documents.
documentImage
Link copied to clipboard
@GET(value = documents/{id}/image)
abstract suspend fun documentImage(@Path(value = id) id: String): Response<ResponseBody>
Get an image version of the document.
documentPdf
Link copied to clipboard
@GET(value = documents/{id}/pdf)
abstract suspend fun documentPdf(@Path(value = id) id: String): Response<ResponseBody>
Get the orginal pdf of a pdf/pdf_email source format document.
editDocument
Link copied to clipboard
@PATCH(value = documents/{id})
abstract suspend fun editDocument(@Path(value = id) id: String, @Body() editDocumentRequestDto: EditDocumentRequestDto): Response<EditDocumentResponseDto>
Update a document This endpoint allows you to update a specific subset of data for a single document given its ID.
getDocumentById
Link copied to clipboard
@GET(value = documents/{id})
abstract suspend fun getDocumentById(@Path(value = id) id: String): Response<GetDocumentResponseDto>
Get a document This endpoint will retrieve the details of a single document with the given ID.
getDocuments
Link copied to clipboard
@GET(value = documents)
abstract suspend fun getDocuments(@Query(value = limit) limit: Int? = 20, @Query(value = offset) offset: Int? = 0, @Query(value = sortBy) sortBy: DocumentSortByEnum? = null, @Query(value = orderBy) orderBy: DocumentOrderByEnum? = null, @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.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.folders) filterFolders: @JvmSuppressWildcards() List<String>? = 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.
getDocumentsStatus
Link copied to clipboard
@GET(value = documents/status)
abstract suspend fun getDocumentsStatus(@Query(value = id) id: @JvmSuppressWildcards() List<String>, @Query(value = timeout) timeout: Int? = null): Response<DocumentsStatusResponseDto>
Query documents for processing status updates Query a list of documents (using their id) for their processing status Responses:
  • 200: Success. The list of document statuses 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.

postDocument
Link copied to clipboard
@POST(value = documents)
@Multipart()
abstract suspend fun postDocument(@Part() sourceFile: MultipartBody.Part, @Part(value = documentType) documentType: RequestBody, @Part(value = foreignId) foreignId: RequestBody?, @Part(value = accountId) accountId: RequestBody?, @Part(value = description) description: RequestBody?, @Part(value = transactionId) transactionId: RequestBody?): Response<DocumentCreationResponseDto>
Create a new document This allows clients to submit new documents to be processed by the system.