Skip to main content

Overview

Assessments are the core entity in the CGIAR Risk Intelligence Tool. Each assessment represents a comprehensive risk evaluation for a specific company or partner organization. The platform supports multiple intake modes and tracks assessments through a complete lifecycle from draft to completion.

Assessment Lifecycle

Assessments progress through four distinct statuses:
1

DRAFT

Initial state when an assessment is created. Users can configure basic details and choose an intake mode.
2

ANALYZING

Document parsing and AI analysis are in progress. Background jobs are running to extract information.
3

ACTION_REQUIRED

Gap detection has identified missing or incomplete data fields that need user review and correction.
4

COMPLETE

Risk analysis is finished. All 7 risk categories have been scored and the final report is available.

Intake Modes

The platform supports three intake modes for gathering assessment data:

Upload

Upload PDF documents (business plans, financial statements) for automated extraction using AWS Textract

Guided Interview

Step-by-step questionnaire that collects information through structured questions

Manual Entry

Direct data entry into structured forms organized by risk category

Creating an Assessment

Required Fields

All assessments are user-scoped. Users can only access assessments they created.

Updating an Assessment

Assessments support optimistic locking to prevent concurrent modification conflicts:

Updatable Fields

  • name - Assessment name
  • companyName - Company name
  • companyType - Company type
  • status - Assessment status (transitions managed by system in most cases)
  • progress - Completion percentage (0-100, managed by system)
  • version - Current version for optimistic locking
The version field is critical for preventing data loss. Always include the current version when updating. The API will return a 409 Conflict if another user has modified the assessment.

Document Upload

For assessments using the UPLOAD intake mode, documents are uploaded via presigned S3 URLs:
1

Request Upload URL

POST /api/assessments/:id/documents
Response includes a presigned URL and document ID:
2

Upload to S3

Upload the file directly to the presigned URL using a PUT request:
3

Trigger Parse

After upload completes, trigger document parsing:
POST /api/assessments/:id/documents/:documentId/parse
This creates a background job and updates the assessment status to ANALYZING.
Only PDF files are supported. The maximum file size and MIME type validation is enforced at the API level.

Listing Assessments

Retrieve assessments with cursor-based pagination, filtering, and search:

Query Parameters

Assessment Statistics

Get aggregated counts by status:

Comments

Assessments support threaded comments for collaboration:

Deleting an Assessment

Deletion is permanent and cascades to all related data (documents, gap fields, risk scores, recommendations, comments).
DELETE /api/assessments/:id

Complete API Reference

Request Body:
Response: Assessment object with status DRAFT
Query Parameters:
  • status?: AssessmentStatus
  • search?: string
  • limit?: number (default: 10)
  • cursor?: string
Response: Paginated list with data, nextCursor, total
Response:
Response: Complete Assessment objectErrors:
  • 404 if assessment not found
  • 403 if user doesn’t own the assessment
Request Body: Partial update with optional version for optimistic lockingResponse: Updated Assessment object with incremented versionErrors:
  • 409 if version conflict detected
Response: 204 No ContentNote: Cascades to all related entities

Code Example: Complete Assessment Creation Flow

Best Practices

Always Use Version Control

Include the version field when updating assessments to prevent data loss from concurrent edits

Poll Job Status

After triggering document parsing, poll the job status endpoint every 3-5 seconds until completion

Handle 403 Errors

Users can only access their own assessments. Always handle ownership errors gracefully

Validate File Types

Only PDF files are supported for upload. Validate on the client before requesting presigned URLs

Risk Scoring

Learn how assessments are scored across 7 risk categories

AI Analysis

Understand the multi-agent AI pipeline that processes assessments

Report Generation

Generate PDF reports with traffic-light risk indicators