Extract data from receipts or invoices by providing a URL to a receipt or invoice file.
Authorization
API key required in the Authorization header.
Request Parameters
| Name | Required | Description |
|---|
| Authorization | Yes | Your API key |
| Content-Type | Yes | application/json |
Request Body
{
"url": "https://example.com/path/to/your/receipt-image.jpg",
"skipItems": false
}
| Field | Type | Required | Description |
|---|
| url | URL | Yes | URL of the receipt image or PDF file |
| skipItems | boolean | No | Controls whether to skip the detailed item extraction process. When set to true, significantly accelerates the extraction process by omitting individual line item details. (default: false) |
Supported File Types
- Images (
image/*)
- PDF (
application/pdf)
Responses
Success (200 OK)
{
"data": {
"documentType": "invoice",
"documentNo": "string",
"vendor": "string",
"taxNo": "string",
"time": "YYYY-MM-DDTHH:mm",
"currency": "string",
"country": "string",
"items": [
{
"name": "string",
"quantity": "string",
"unitPrice": "string",
"unitPriceBeforeDiscount": "string",
"priceBeforeDiscount": "string",
"discount": "string",
"price": "string"
}
],
"totalNet": "string",
"totalTax": "string",
"taxDetails": [
{
"rate": "string",
"amount": "string"
}
],
"total": "string"
}
}
| Field | Type | Description |
|---|
| documentType | string | Type of document: "invoice" or "receipt" |
| documentNo | string | Sequential document number |
| vendor | string | Name of the business issuing the receipt |
| taxNo | string | Vendor's tax identification number |
| time | string | Date and time of purchase (ISO format) |
| currency | string | Currency code |
| country | string | Vendor's country (ISO 3166-1 alpha-2 code) |
| items | array | List of purchased items |
| totalNet | string | Net value |
| totalTax | string | Tax value |
| taxDetails | array | List of tax rates and their corresponding amounts |
| total | string | Total amount of the purchase |
Errors
| Status Code | Description | Example |
|---|
| 400 Bad Request | No file URL provided | {"error": "No URL provided"} |
| 400 Bad Request | No readable text in image | {"error": "No text found in the image"} |
| 400 Bad Request | File is not a receipt or the data is incomplete | {"error": "This is not a receipt or is incomplete"} |
| 400 Bad Request | The dimensions of the image must be greater than 50 x 50 pixels and less than 16,000 x 16,000 pixels | {"error": "Image resolution must be between 50px and 16000px in both dimensions"} |
| 401 Unauthorized | API key missing | {"error": "Missing token"} |
| 401 Unauthorized | API key invalid | {"error": "Invalid token"} |
| 402 Payment Required | Insufficient account balance | {"error": "You don't have enough credits"} |
| 500 Internal Server Error | Server-side error | {"error": "Internal Server Error"} |
Examples
Request Example
curl -X POST https://api.wiseocr.com/v1/url \
-H "Authorization: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://example.com/path/to/your/receipt-image.jpg",
"skipItems": false
}'
Response Example
{
"data": {
"documentType": "invoice",
"documentNo": "INV-2025-001234",
"vendor": "Grocery Store",
"taxNo": "US123456789",
"time": "2025-02-15T14:30",
"currency": "USD",
"country": "US",
"items": [
{
"name": "Apples",
"quantity": "1.000",
"unitPriceBeforeDiscount": "3.99",
"unitPrice": "3.99",
"priceBeforeDiscount": "3.99",
"discount": "0.00",
"price": "3.99"
},
{
"name": "Milk",
"quantity": "1",
"unitPriceBeforeDiscount": "3.00",
"unitPrice": "2.50",
"priceBeforeDiscount": "2.50",
"discount": "0.50",
"price": "2.00"
}
],
"totalNet": "5.45",
"totalTax": "0.54",
"taxDetails": [
{
"rate": "0.23",
"amount": "0.54"
}
],
"total": "5.99"
}
}
Credit System
- Requires available credits in user's account
- Consumes 1 credit per successful image or PDF page scan
What's next?