https://api.visionparser.com/parse/image/file

Request

Headers

Content-TypestringRequired

Allowed value: multipart/form-data

api_keystringRequired

Header for api authentication

Body

filefileRequired

The image is uploaded as a file (PNG or JPEG only)

response_typestringRequired

The type of response format desired.

    Allowed values:
    • simple: Provides basic parsing details.
    • advanced: Provides detailed parsing including detailed metadata.
    Default: simple

Success Response

HTTP Status200 OK
Content-Typeapplication/json
Body
{
  "data": {
    "totalAmount": {
      "value": 45.99,
      "conf_score": 0.98
    },
    "taxAmount": {
      "value": 3.99,
      "conf_score": 0.95
    },
    // Other response fields based on the response type
  }
}

Click here to learn more about confidence score

Response fields (Simple)

Field NameShort DescriptionData TypePath in JSON
totalAmountTotal amount of the transactionfloatdata.totalAmount
taxAmountTax amount for the transactionfloatdata.taxAmount
dateTimeDate and time of the transaction in ISO format (yyyy-MM-dd'T'HH:mm:ss)DateTimedata.dateTime
merchantNameName of the merchantstringdata.merchantName
merchantAddressMerchant's physical addressstringdata.merchantAddress
currencyCodeCurrency code used in the transactionstringdata.currencyCode
merchantCountryMerchant's countrystringdata.merchantCountry
merchantStateMerchant's state or regionstringdata.merchantState
merchantCityMerchant's citystringdata.merchantCity
merchantPostalCodeMerchant's postal or ZIP codestringdata.merchantPostalCode
merchantPhoneMerchant's contact phone numberstringdata.merchantPhone
merchantEmailMerchant's email addressstringdata.merchantEmail
requestIdUnique request ID for the transactionstringdata.requestId

Note:

  • If the time is not specified in the dateTime field, 00:00:00 (midnight) will be assumed as the default time.
  • If a field is not available in the image, its value will be null.

Response fields (Advanced)

The response when the response_type is set to advanced.
The fields in addition to all the fields in the simple response.

Field NameShort DescriptionData TypePath in JSON
invoiceReceiptNumberThe invoice or receipt numberstringdata.invoiceReceiptNumber
paidAmountThe amount paid by the customerfloatdata.paidAmount
discountAmountAny discount applied to the transactionfloatdata.discountAmount
serviceChargeAny service charge paid for the transactionfloatdata.serviceCharge
productLineItemsList of products/services with detailed breakdownarraydata.productLineItems[]

Error Response

HTTP StatusDescriptionExample Response
400 Bad RequestInvalid or missing image_source, image, or response_type.{ "detail": "Invalid value for image_source. Please use 'file', 'bytes', or 'url'." }
401 UnauthorizedMissing API key.{ "detail": "API key missing" }
403 ForbiddenInvalid API key.{ "detail": "Invalid API key" }
429 Too Many RequestsExceeded rate limit.{ "detail": "Rate limit exceeded. Try again later." }
500 Internal Server ErrorGeneral error in processing the request.{ "detail": "Internal Server Error" }