Skip to main content
GET
/
api
/
proposals
/
{proposal_id}
Get Proposal
curl --request GET \
  --url https://api.example.com/api/proposals/{proposal_id}
{
  "id": "<string>",
  "proposalCode": "<string>",
  "title": "<string>",
  "description": "<string>",
  "template_id": "<string>",
  "status": "<string>",
  "created_at": "<string>",
  "updated_at": "<string>",
  "user_id": "<string>",
  "user_email": "<string>",
  "user_name": "<string>",
  "uploaded_files": {},
  "text_inputs": {},
  "metadata": {},
  "completed_steps": [
    {}
  ],
  "step_completion": {
    "step_1": {},
    "step_2": {},
    "step_3": {},
    "step_4": {}
  },
  "404 Not Found": {},
  "403 Forbidden": {}
}

Authentication

This endpoint requires authentication via Bearer token.
Authorization: Bearer <token>

Path Parameters

proposal_id
string
required
The proposal identifier. Can be either:
  • UUID format: a1b2c3d4-e5f6-7890-abcd-ef1234567890
  • Proposal code format: PROP-20260304-A1B2

Response

Returns a proposal object with computed step completion information.
id
string
Unique proposal identifier (UUID).
proposalCode
string
Human-readable proposal code (format: PROP-YYYYMMDD-XXXX).
title
string
The title of the proposal.
description
string
The description of the proposal.
template_id
string
The template ID if specified.
status
string
Current status of the proposal (e.g., “draft”, “submitted”, “completed”).
created_at
string
ISO 8601 timestamp of when the proposal was created.
updated_at
string
ISO 8601 timestamp of the last update.
user_id
string
The ID of the user who owns the proposal.
user_email
string
The email of the user who owns the proposal.
user_name
string
The name of the user who owns the proposal.
uploaded_files
object
Dictionary of uploaded files organized by category.Common categories:
  • rfp-document: RFP/tender documents
  • concept-document: Initial concept documents
  • reference-proposals: Reference proposal examples
text_inputs
object
Dictionary of text inputs provided by the user.Common keys:
  • initial-concept: User’s initial concept text
metadata
object
Additional metadata including analysis results and processing status.
completed_steps
array
Array of step numbers that have been completed (e.g., [1, 2, 3]).Steps:
  • Step 1: Document upload (RFP and concept/references)
  • Step 2: Analysis completion (RFP and concept)
  • Step 3: Template generation
  • Step 4: Draft feedback
step_completion
object
Detailed completion status for each step.

Example Requests

curl -X GET https://api.igadregion.org/api/proposals/a1b2c3d4-e5f6-7890-abcd-ef1234567890 \
  -H "Authorization: Bearer YOUR_TOKEN"

Response Example

{
  "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "proposalCode": "PROP-20260304-A1B2",
  "title": "Climate Resilience in East Africa",
  "description": "Proposal for improving climate adaptation strategies",
  "template_id": null,
  "status": "draft",
  "created_at": "2026-03-04T10:30:00.000Z",
  "updated_at": "2026-03-04T15:45:00.000Z",
  "user_id": "user_123",
  "user_email": "[email protected]",
  "user_name": "John Doe",
  "uploaded_files": {
    "rfp-document": ["s3://bucket/PROP-20260304-A1B2/rfp.pdf"],
    "concept-document": ["s3://bucket/PROP-20260304-A1B2/concept.pdf"]
  },
  "text_inputs": {
    "initial-concept": "Brief description of the project concept..."
  },
  "metadata": {
    "rfp_analysis": {
      "summary": "Analysis of the RFP requirements...",
      "key_requirements": ["Requirement 1", "Requirement 2"]
    },
    "rfp_analysis_status": "completed",
    "concept_analysis_status": "processing",
    "rfp_analysis_completed_at": "2026-03-04T14:30:00.000Z"
  },
  "completed_steps": [1, 2],
  "step_completion": {
    "step_1": {
      "completed": true,
      "has_rfp": true,
      "has_concept": true,
      "has_references": false
    },
    "step_2": {
      "completed": true,
      "rfp_analysis_status": "completed",
      "concept_analysis_status": "completed",
      "has_concept_document": true
    },
    "step_3": {
      "completed": false,
      "template_status": "pending",
      "has_template": false,
      "has_generated_content": false
    },
    "step_4": {
      "completed": false,
      "feedback_status": "pending",
      "has_feedback": false
    }
  }
}

Error Responses

404 Not Found
error
{
  "detail": "Proposal not found"
}
The proposal with the specified ID does not exist or does not belong to the authenticated user.
403 Forbidden
error
{
  "detail": "Access denied"
}
The proposal exists but belongs to a different user.

Notes

  • Flexible ID Format: You can use either the UUID or the human-readable proposal code (PROP-YYYYMMDD-XXXX) as the identifier.
  • Access Control: Users can only access their own proposals. Attempting to access another user’s proposal returns a 403 error.
  • Step Completion: The completed_steps and step_completion fields are computed server-side based on actual data presence, ensuring consistent state across sessions.
  • Eventual Consistency: For newly created proposals queried by UUID, the endpoint includes a fallback scan to handle GSI eventual consistency.

Build docs developers (and LLMs) love