Skip to main content

Upload Document

Suggest Edits


Overview

This endpoint allows users to upload a document either as an attachment to a check (ATTACH_TO_CHECK) or as a standalone document for independent processing (UNATTACHED).

Upload Methods:

  • For PDF file uploads, use the documentFile field.
  • For base64-encoded file uploads, use the documentBase64File and documentBase64FileName fields.

If special print processing is required, please contact Ahrvo to determine the appropriate documentType value.


Resource Access

Production (api.ahrvo.network)

POST https://api.ahrvo.network/banking/echecks/apiServices/uploadChecks.php?UploadDocument

Staging (gateway.ahrvo.network)

POST https://gateway.ahrvo.network/banking/echecks/apiServices/uploadChecks.php?UploadDocument

Arguments

AttributeMandatory / Optional
documentTypeMandatory
merchantUploadRequestIDMandatory
documentFileConditional¹
documentBase64FileConditional²
documentBase64FileNameConditional²
inBehalfOptional
¹ Required if uploading PDF directly (not base64-encoded).
² Required if uploading base64-encoded PDF.

Example Request (PDF File)

curl -X POST https://gateway.ahrvo.network/banking/echecks/apiServices/uploadChecks.php?UploadDocument \
-H "Authorization: Bearer {jwtToken}" \
-H "x-api-key: {apiKey}" \
-F "documentType=ATTACH_TO_CHECK" \
-F "merchantUploadRequestID=merchant-upload-document-request-id-454efdt4" \
-F "documentFile=@/path/to/invoice.pdf"

Example Request (Base64)

curl -X POST https://gateway.ahrvo.network/banking/echecks/apiServices/uploadChecks.php?UploadDocument \
-H "Content-Type: application/json" \
-H "Authorization: Bearer {jwtToken}" \
-H "x-api-key: {apiKey}" \
-d '{
"documentBase64File": "JVBERi0xLjQKJcfs...",
"documentBase64FileName": "invoice-12345",
"documentType": "ATTACH_TO_CHECK",
"merchantUploadRequestID": "merchant-upload-document-request-id-454efdt4"
}'

Example Response

{
"errorCode": 0,
"errorMessage": "",
"documentToken": "uploaded-document-token-65ggfg8",
"merchantUploadRequestID": "merchant-upload-document-request-id-454efdt4"
}

API Documentation