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 = idid: 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 = idid: 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 = idid: 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 = idid: 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 = limitlimit: Int? = 20, @Query(value = offsetoffset: Int? = 0, @Query(value = sortBysortBy: DocumentSortByEnum? = null, @Query(value = orderByorderBy: DocumentOrderByEnum? = null, @Query(value = filter.accountMetadata.accountfilterAccountMetadataAccount: @JvmSuppressWildcards() List<String>? = null, @Query(value = filter.accountMetadata.account.existsfilterAccountMetadataAccountExists: Boolean? = null, @Query(value = filter.accountMetadata.transactionIdfilterAccountMetadataTransactionId: @JvmSuppressWildcards() List<String>? = null, @Query(value = filter.accountMetadata.transactionId.existsfilterAccountMetadataTransactionIdExists: Boolean? = null, @Query(value = filter.amountDuefilterAmountDue: @JvmSuppressWildcards() List<BigDecimal>? = null, @Query(value = filter.amountDue.gtefilterAmountDueGte: BigDecimal? = null, @Query(value = filter.amountDue.ltefilterAmountDueLte: BigDecimal? = null, @Query(value = filter.arrivalDateTime.gtefilterArrivalDateTimeGte: OffsetDateTime? = null, @Query(value = filter.arrivalDateTime.ltefilterArrivalDateTimeLte: OffsetDateTime? = null, @Query(value = filter.categoryCodefilterCategoryCode: @JvmSuppressWildcards() List<String>? = null, @Query(value = filter.currencyCodefilterCurrencyCode: @JvmSuppressWildcards() List<String>? = null, @Query(value = filter.descriptionfilterDescription: @JvmSuppressWildcards() List<String>? = null, @Query(value = filter.documentDatefilterDocumentDate: @JvmSuppressWildcards() List<LocalDate>? = null, @Query(value = filter.documentDate.gtefilterDocumentDateGte: LocalDate? = null, @Query(value = filter.documentDate.ltefilterDocumentDateLte: LocalDate? = null, @Query(value = filter.documentNumberfilterDocumentNumber: @JvmSuppressWildcards() List<String>? = null, @Query(value = filter.documentTimefilterDocumentTime: @JvmSuppressWildcards() List<String>? = null, @Query(value = filter.documentTime.gtefilterDocumentTimeGte: String? = null, @Query(value = filter.documentTime.ltefilterDocumentTimeLte: String? = null, @Query(value = filter.documentTypefilterDocumentType: @JvmSuppressWildcards() List<DocumentTypeEnum>? = null, @Query(value = filter.expenseTypefilterExpenseType: @JvmSuppressWildcards() List<ExpenseTypeEnum>? = null, @Query(value = filter.foreignIdfilterForeignId: @JvmSuppressWildcards() List<String>? = null, @Query(value = filter.fulltextfilterFulltext: String? = null, @Query(value = filter.idfilterId: @JvmSuppressWildcards() List<String>? = null, @Query(value = filter.lastUpdateDateTime.gtefilterLastUpdateDateTimeGte: OffsetDateTime? = null, @Query(value = filter.lastUpdateDateTime.ltefilterLastUpdateDateTimeLte: OffsetDateTime? = null, @Query(value = filter.merchantNamefilterMerchantName: @JvmSuppressWildcards() List<String>? = null, @Query(value = filter.merchantTaxIdNumberfilterMerchantTaxIdNumber: @JvmSuppressWildcards() List<String>? = null, @Query(value = filter.notesfilterNotes: @JvmSuppressWildcards() List<String>? = null, @Query(value = filter.paymentTenderfilterPaymentTender: @JvmSuppressWildcards() List<TenderTypesEnum>? = null, @Query(value = filter.foldersfilterFolders: @JvmSuppressWildcards() List<String>? = null, @Query(value = filter.returnPeriodDurationfilterReturnPeriodDuration: @JvmSuppressWildcards() List<BigDecimal>? = null, @Query(value = filter.returnPeriodDuration.gtefilterReturnPeriodDurationGte: BigDecimal? = null, @Query(value = filter.returnPeriodDuration.ltefilterReturnPeriodDurationLte: BigDecimal? = null, @Query(value = filter.returnPeriodUnitfilterReturnPeriodUnit: @JvmSuppressWildcards() List<PeriodUnitEnum>? = null, @Query(value = filter.totalfilterTotal: @JvmSuppressWildcards() List<BigDecimal>? = null, @Query(value = filter.total.gtefilterTotalGte: BigDecimal? = null, @Query(value = filter.total.ltefilterTotalLte: BigDecimal? = null, @Query(value = filter.statusfilterStatus: @JvmSuppressWildcards() List<DocumentStatusTypeEnum>? = null, @Query(value = filter.sourceFormatfilterSourceFormat: @JvmSuppressWildcards() List<DocumentSourceFormatsEnum>? = null, @Query(value = filter.warrantyPeriodDurationfilterWarrantyPeriodDuration: @JvmSuppressWildcards() List<BigDecimal>? = null, @Query(value = filter.warrantyPeriodDuration.gtefilterWarrantyPeriodDurationGte: BigDecimal? = null, @Query(value = filter.warrantyPeriodDuration.ltefilterWarrantyPeriodDurationLte: BigDecimal? = null, @Query(value = filter.warrantyPeriodUnitfilterWarrantyPeriodUnit: @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 = idid: @JvmSuppressWildcards() List<String>, @Query(value = timeouttimeout: 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 = documentTypedocumentType: RequestBody, @Part(value = foreignIdforeignId: RequestBody?, @Part(value = accountIdaccountId: RequestBody?, @Part(value = descriptiondescription: RequestBody?, @Part(value = transactionIdtransactionId: RequestBody?): Response<DocumentCreationResponseDto>
Create a new document This allows clients to submit new documents to be processed by the system.