Legacy Data & OCR
Upload historical payslips and tax documents for OCR parsing. Extract structured data from PDFs and images to build a complete financial picture for new users.
/api/v1/legacyEndpoints
POST
/api/v1/legacy/payslip/uploadSoonUpload a payslip image or PDF for OCR
GET
/api/v1/legacy/payslip/{doc_id}SoonGet OCR parsing results
GET
/api/v1/legacy/tax-history/{user_id}SoonGet extracted tax history summary
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| file | file | Required | Payslip PDF or image (max 5 MB, jpg/png/pdf) |
| user_id | string | Required | User identifier for history association |
| document_type | string | Optional | Type hint: payslip, p60, p45 (improves OCR accuracy) |
Example
Request
http
POST /api/v1/legacy/payslip/upload HTTP/1.1
Host: api.tpay365.com
Authorization: Bearer sk_live_abc123
Content-Type: multipart/form-data
[PDF or image file]Response
json
{
"doc_id": "doc_xyz789",
"status": "parsed",
"extracted": {
"employer_name": "Acme Corp",
"pay_period": "January 2026",
"gross_pay": 285000,
"net_pay": 221340,
"tax_deducted": 47160,
"ni_deducted": 16500,
"pension_deducted": 0
},
"confidence": 0.94,
"parsed_at": "2026-02-10T14:30:00Z"
}