Skip to main content

Getting Started with BankStmtConverter API

Welcome to the BankStmtConverter API documentation!
Here you will find everything you need to get started with integrating BankStmtConverter into your applications.

API Keys

  • Obtaining: To access the API, you’ll need a valid API key. Retrieve it from the BankStmtConverter billing dashboard. If unavailable, please contact the admin.
  • Authentication: BankStmtConverter primarily authenticates using API keys.
  • Usage: Always include your API key in the request header:
{
  "Authorization": "Bearer <api_key>"
}

JSON Response

Expect responses from the API in JSON format. Ensure your system can parse this data structure. For errors, check the error key within the JSON response.

Handling Authentication Errors

If your API key is absent, not formatted correctly, or invalid, you’ll receive a 401 Unauthorized HTTP response.

API Endpoints

Convert Bank Statement

Endpoint

POST /bankstmtconversion/sync

Request Headers

HeaderTypeDescription
AuthorizationStringBearer <api_key>
Content-TypeStringmultipart/form-data

Request Body

FieldTypeDescription
fileStringURL of the bank statement file to be converted (PDF).
page_numIntNumber of pages to be processed (default is 1).

Response Body

FieldTypeDescription
urlStringPresigned URL to download the converted file.
doc_idStringDocument ID for converted file.
errorStringError message, if any.

Success Codes

CodeDescription
200Conversion successful.

Error Codes

CodeDescription
400Bad Request - Invalid input data.
404Not found - file is missing.
401Unauthorized - Invalid API key.
422Unprocessable Entity - Field required or missing data.
402Payment Required - Plan expired.
500Internal Server Error.

Example Request

curl --request POST \
  --url https://api.bankstmtconverter.com/sync \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: multipart/form-data' \
  --form page_num=1 \
  --form file="https://example.com/path/to/your/file.pdf"

Example Response

Success Response
{
  "url": "https://presigned-url.example.com",
  "doc_id": "20240XXX"
}
Error Response
{
  "code": "Error_Code",
  "error": "Your_error_message"
}

Async Conversion

Endpoint

POST /bankstmtconversion/async

Request Headers - Async

HeaderTypeDescription
AuthorizationStringBearer <api_key>
Content-TypeStringmultipart/form-data

Request Body - Async

FieldTypeDescription
fileStringURL of the bank statement file to be converted (PDF).
page_numIntNumber of pages to be processed (default is 1).
webhook_urlStringURL for webhook notification.

Response Body

FieldTypeDescription
urlStringPresigned URL to download the converted file.
doc_idStringDocument id for converted file.
errorStringError message, if any.

Success Codes

CodeDescription
200Conversion successful.

Error Codes

CodeDescription
400Bad Request - Invalid input data.
404Not found - file is missing.
401Unauthorized - Invalid API key.
422Unprocessable Entity - Field required or missing data.
402Payment Required - Plan expired.
500Internal Server Error.

Example Request - Async

curl --request POST \
  --url https://api.bankstmtconverter.com/async \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: multipart/form-data' \
  --form page_num=1 \
  --form webhook_url="https://your-webhook.example.com/callback" \
  --form file="https://example.com/path/to/your/file.pdf"

Example Response

Success Response
{
  "doc_id": "20240XXX",
  "status": "In-Progress"
}
Error Response
{
  "code": "Error_Code",
  "error": "Your_error_message"
}

Check Remaining Credits

Endpoint

GET /bankstmtconversion/balance

Request Headers

HeaderTypeDescription
AuthorizationStringBearer <api_key>
Content-TypeStringapplication/json

Response Body

FieldTypeDescription
remaining_creditsIntCredits after your file processing.
errorStringError message, if any.

Success Codes

CodeDescription
200Conversion successful.

Error Codes

CodeDescription
401Unauthorized - Invalid API key.

Example Request

curl --request GET \
  --url https://api.bankstmtconverter.com/balance \
  --header 'Authorization: Bearer <token>'

Example Response

Success Response
{
  "remaining_credits": 1500
}
Error Response
{
  "code": "Error_Code",
  "error": "Your_error_message"
}

Support & Assistance

For assistance or further queries, reach out to us.
I