Skip to main content
POST
/
extractions
/
templates
/
{templateId}
/
sessions
/
batch
/
export
Batch Export
curl --request POST \
  --url https://api.raydocs.com/extractions/templates/{templateId}/sessions/batch/export \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "session_ids": [
    "3c90c3cc-0d44-4b50-8888-8dd25736052a"
  ],
  "format": "json"
}
'

Authentication & Scope

Requires the sessions-read ability.

Request

POST /extractions/templates/550e8400-e29b-41d4-a716-446655440000/sessions/batch/export/excel HTTP/1.1
Host: api.raydocs.com
Authorization: Bearer <token>
Content-Type: application/json

{
  "session_ids": [
    "770e8400-e29b-41d4-a716-446655440001",
    "770e8400-e29b-41d4-a716-446655440002",
    "770e8400-e29b-41d4-a716-446655440003"
  ]
}

Path Parameters

ParameterTypeRequiredDescription
templateIduuidYesThe template ID
formatstringYesExport format: json or excel

Body Parameters

ParameterTypeRequiredDescription
session_idsarrayYesArray of session IDs to export

Response

JSON Format

200 OK – JSON array of results.
[
  {
    "session_id": "770e8400-e29b-41d4-a716-446655440001",
    "session_name": "Invoice Batch 1",
    "data": {
      "invoice_details": {
        "invoice_number": "INV-001",
        "total_amount": 1500.00
      }
    }
  }
]

Excel Format

200 OK – Excel file download with Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.
Excel exports include audit data with reasoning and source references in additional sheets.

Authorizations

Authorization
string
header
required

Personal Access Token created from the Raydocs dashboard. Include in the Authorization header: Bearer <your_token> See API Keys for token creation and management.

Path Parameters

templateId
string<uuid>
required

Body

application/json
session_ids
string<uuid>[]
required
format
enum<string>
default:json
Available options:
json,
csv,
excel

Response

Export data