Documentation
Learn how to integrate Receipt Scan into your apps.
Analyze Receipt
POST https://app.receiptscan.co.uk/api/analyze_receipt
Description
This endpoint allows you to analyze a receipt by uploading an image or PDF file. The API will extract relevant information from the receipt and return it in a structured JSON format.
Headers
| Name | Required | Description |
|---|---|---|
| AccessToken | Yes | Your API key for authentication |
Body
The request body should be a multipart/form-data with the following parameter:
| Name | Required | Type | Description |
|---|---|---|---|
| file | Yes | File | The image or PDF invoice file to be analyzed |
Example Request
curl --location 'https://app.receiptscan.co.uk/api/analyze_receipt' \
--header 'AccessToken: YOUR_API_KEY' \
--form 'file=@"/path/to/your/receipt.pdf"'
Response
The API returns a JSON object with the following properties:
| Field | Type | Description |
|---|---|---|
| ReceiptDate | String | The date of the receipt (format: dd/MM/yyyy) |
| NetValue | Decimal | The net value of the purchase |
| TaxValue | Decimal | The tax amount |
| Total | Decimal | The total amount of the purchase |
| TaxRate | String | The tax rate applied |
| ReceiptNumber | String | The unique identifier for the receipt |
| Summary | String | A brief description of the purchase |
| OrderNumber | String | The order number (if available) |
| VATNumber | String | The VAT number of the retailer |
| Retailer | String | The name of the retailer |
| items | Array | An array of items purchased, each containing Description, Price, and Qty |
Example Response
{
"ReceiptDate": "01/08/2024",
"NetValue": 6.12,
"TaxValue": 1.23,
"Total": 7.35,
"TaxRate": "20%",
"ReceiptNumber": "",
"Summary": "Isopropanol Alcohol IPA 99.99% 1L\nShipping Charges: £0.00",
"OrderNumber": "026-1936828-2277101",
"VATNumber": "GB205462631",
"Retailer": "Trade Chemicals Limited",
"items": [
{
"Description": "Isopropanol Alcohol IPA 99.99% 1L",
"Price": 6.12,
"Qty": 1
}
]
}
Error Handling
In case of errors, the API will return an appropriate HTTP status code along with a JSON object containing an error message. Common error scenarios include:
- 401 Unauthorized: Invalid or missing API key
- 400 Bad Request: Missing or invalid file upload
- 403 Forbidden: Not enough credits to complete this request.
- 500 Internal Server Error: Server-side processing error
Rate Limiting
Please refer to your API plan for information on rate limits. If you exceed the rate limit, you'll receive a 429 Too Many Requests response.
View Credits
GET https://app.receiptscan.co.uk/api/credits
Description
This endpoint allows you to retrieve the current credit balance and subscription renewal date for your account.
Headers
| Name | Required | Description |
|---|---|---|
| AccessToken | Yes | Your API key for authentication |
Example Request
curl --location 'https://app.receiptscan.co.uk/api/credits' \
--header 'AccessToken: YOUR_API_KEY'
Response
The API returns a JSON object with the following properties:
| Field | Type | Description |
|---|---|---|
| Credits | Integer | The current number of credits available in your account |
| SubscriptionRenewalDate | String | The date when your subscription will renew (format: dd/MM/yyy HH:mm) |
| SubscriptionPlan | String | The name of your subscription plan |
Example Response
{
"Credits": 998,
"SubscriptionRenewalDate": "20/10/2024 14:09",
"SubscriptionPlan": "Growth"
}
Error Handling
In case of errors, the API will return an appropriate HTTP status code along with a JSON object containing an error message. Common error scenarios include:
- 401 Unauthorized: Invalid or missing API key
- 500 Internal Server Error: Server-side processing error
Support
For any questions or issues regarding the API, please contact our support team at support@receiptscan.co.uk.
Pricing
Starter
£39/month
- 250 scans/month
- Javascript Library
- Product support
- API access
- 24 Hours data retention
Growth
£119/month
- 1,000 scans/month
- Javascript Library
- Product support
- API access
- 30 Days data retention
Scale
£249/month
- 2,500 scans/month
- Javascript Library
- Priority support
- API access
- Custom integrations
- 60 Days data retention
1 page = 1 scan. Multi-page documents are charged per page.