Generate Detail of PDF Session

Description

To download a PDF report that sums up a session KYC complete using the session identifier.

Endpoint

GET /api/v1/kyc/session/{id}/pdf

Method: PET Authentication: Required (Bearer Token) Type of Response: application/octet-stream

Parameters

ParameterTypeRequiredExample
id (path)stringYes6994bf1c1f24bffaedfbb9e5
Authorization (Leader)stringYesBearer TU_API_TOKEN

Environments

EnvironmentURL
Sandboxhttps://sandbox.api.jaak.ai
Productionhttps://services.api.jaak.ai

Examples of Request

cURL

curl -X GET \
  "https://sandbox.api.jaak.ai/api/v1/kyc/session/6994bf1c1f24bffaedfbb9e5/pdf" \
  -H "Authorization: Bearer {TU_API_TOKEN}" \
  -H "Accept: application/octet-stream" \
  --output "session_report.pdf"

JavaScript / Fetch

const response = await fetch(url, { headers: { Authorization: `Bearer ${token}` } });
const blob = await response.blob();
// Shoot download or open in new tab

Python

response = requests.get(url, headers=headers, stream=True)
with open('report.pdf', 'wb') as f:
    for chunk in response.iter_content(chunk_size=8192):
        f.write(chunk)

Responses

200 OK - Success

PDF returned as binary stream with leaders:

Content-Disposition: attachment; filename="session_{id}.pdf"

Error Codes

CodeMeaning
400Invalid ID or wrong format
401Invalid authentication kit
404Unfound meeting
500Internal server error

best practices

  • binary management: To manage response as a binary stream to avoid corruption
  • Nomenclature: Name Session ID Files for Tracking
  • Reattempts: Implement exponential backoff for 5xx errors; do not retry 4xx without fixes
  • Status: Check that the session has completed processing before applying for PDF

Support

Email: support@jaak.ai