Documents

List documents

Retrieves a paginated list of documents belonging to the

GET /api/v2/documents Try It

List documents

cURL
curl --request GET \
  --url 'https://api.handwritingocr.com/v2/documents?per_page=SOME_INTEGER_VALUE&page=SOME_INTEGER_VALUE' \
  --header 'Authorization: Bearer your-api-token'
200 application/json
{
  "current_page": 1,
  "data": [
    {
      "document_id": "xyz789",
      "status": "processed",
      "created_at": "2024-03-15T14:30:00Z",
      "updated_at": "2024-03-15T14:35:00Z",
      "automatically_deleted_at": "2024-03-22T14:30:00Z",
      "page_count": 3,
      "original_file_name": "business_report.pdf",
      "action": "transcribe"
    },
    {
      "document_id": "abc123",
      "status": "queued",
      "created_at": "2024-03-15T14:25:00Z",
      "updated_at": "2024-03-15T14:25:00Z",
      "automatically_deleted_at": "2024-03-22T14:25:00Z",
      "page_count": 1,
      "original_file_name": "receipt.jpg",
      "action": "tables"
    }
  ],
  "first_page_url": "https://api.handwritingocr.com/v2/documents?page=1",
  "from": 1,
  "last_page": 5,
  "last_page_url": "https://api.handwritingocr.com/v2/documents?page=5",
  "next_page_url": "https://api.handwritingocr.com/v2/documents?page=2",
  "path": "https://api.handwritingocr.com/v2/documents",
  "per_page": 50,
  "prev_page_url": null,
  "to": 50,
  "total": 243
}

Retrieves a paginated list of documents belonging to the authenticated user. Documents are sorted by creation date in descending order.

Headers

  • Authorization string required header

    Bearer your-api-token

  • Accept string required header

    application/json

Query parameters

  • per_page integer query

    Number of items per page. Default 50, maximum 200.

  • page integer query

    The page number for pagination. Defaults to 1.

Response codes

HTTP status
  • 200

    Returns a paginated list of documents.

  • 401

    Unauthorized — invalid or missing API token.

  • 422

    Validation Error — invalid parameters.