---
title: "Extract Lines Endpoint"
method: POST
path: "/api/v1/extract_lines"
---

# Extract Lines Endpoint

`POST /api/v1/extract_lines`

## Request body

- ExtractLinesRequest
  - `key_value_pairs` string, nullable
  - `key_value_pairs_s3` object, nullable
  - `textract_text` string, required
  - `textract_raw_expense_s3` object, nullable

## Response `200`

Successful Response

- ExtractLinesResponse
  - `run_id` string, required
  - `extracted_data` AppSchemasDocumentsLineItem[], required
    - `id` integer, nullable
    - `cancellation` boolean, nullable
    - `claim_type` string, required
    - `description` string, required
    - `early_childhood` boolean, nullable
    - `line_total` number, required
    - `quantity` number, required
    - `service_date_from` string, nullable
    - `service_date_to` string, nullable
    - `service_item_number` string, nullable
    - `service_type` string, nullable
    - `time_from` integer, nullable
    - `time_to` integer, nullable
    - `unit_price` number, nullable
    - `line_tax` number, nullable
    - `method` string, nullable
    - `line_total_valid` boolean, nullable
    - `gst_code` string, nullable
    - `fallback_data` object[], nullable
    - `has_business_violations` boolean, nullable
    - `business_violation_messages` string[], nullable
    - `business_violation_types` string[], nullable
    - `page_number` integer, nullable
    - `coordinates` object, nullable

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.dev/caresquare/apis/fastapi.md) · [All operations](https://skmtc.dev/caresquare/apis/fastapi/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/caresquare/fastapi/revisions/c9df874d8d59/schema)
