---
title: "Upload bill document with OCR"
method: POST
path: "/bills/upload"
tags: ["Bills"]
---

# Upload bill document with OCR

`POST /bills/upload`

Upload a document (PDF, PNG, JPEG), extract data via OCR, and create a bill

## Request body

- UploadBillDocumentInput — Bill document upload request
  - `content` string
  - `content_type` string
  - `filename` string

## Response `201`

Created

- UploadBillDocumentReply — Bill upload result with OCR data
  - `bill_id` string
  - `bill_number` string
  - `document_path` string
  - `extracted_data` ExtractedBillDataReply — Extracted bill data from OCR
    - `description` string
    - `due_date` string
    - `invoice_number` string
    - `issue_date` string
    - `line_items` ExtractedLineItemReply[]
      - `description` string
      - `name` string
      - `quantity` number
      - `total` number
      - `unit_price` number
    - `total` number
    - `vendor_email` string
    - `vendor_name` string
  - `warnings` string[]

## Other responses

- `400` — Bad Request

---

[API](https://skmtc.net/alternativepayments/apis/alternative-payments.md) · [All operations](https://skmtc.net/alternativepayments/apis/alternative-payments/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/alternativepayments/alternative-payments/revisions/730efda86cd1/schema)
