Base URL
http://localhost:8014/api/v1
All endpoints require Bearer token authentication in the Authorization header.
Tenders
Create Tender
/api/v1/tendersRequest Body:
{
"title": "AI Infrastructure Upgrade",
"description": "Procurement of GPU compute infrastructure",
"category": "it_services",
"budget_min": 5000000,
"budget_max": 15000000,
"currency": "AED",
"deadline": "2024-03-15",
"requirements": [
"Minimum 100 TFLOPS aggregate compute",
"Data center within GCC region"
],
"evaluation_criteria": {
"technical_capability": 0.35,
"price": 0.25,
"experience": 0.20,
"delivery_timeline": 0.10,
"local_content": 0.10
}
}
| Field | Type | Required | Description |
|---|---|---|---|
title | string | Yes | Tender title (1-500 characters) |
description | string | No | Detailed description (up to 10,000 characters) |
category | string | No | Category (default: other) |
budget_min | number | No | Minimum budget (default: 0) |
budget_max | number | No | Maximum budget (default: 0) |
currency | string | No | AED, SAR, QAR, OMR, USD (default: AED) |
deadline | string | No | Submission deadline |
requirements | string[] | No | Mandatory requirements |
evaluation_criteria | object | No | Criteria names mapped to weights (0-1, should sum to 1) |
List Tenders
/api/v1/tendersQuery Parameters:
| Parameter | Type | Default | Description |
|---|---|---|---|
page | integer | 1 | Page number |
page_size | integer | 20 | Results per page (max 100) |
category | string | - | Filter by category |
status | string | - | Filter by status |
search | string | - | Search in title and description |
Get Tender
/api/v1/tenders/{tender_id}Update Tender
/api/v1/tenders/{tender_id}Delete Tender
/api/v1/tenders/{tender_id}Tender Statistics
/api/v1/tenders/statsReturns aggregate statistics: total tenders, breakdown by category and status, and average budget ranges.
Analyze Tender
/api/v1/tenders/{tender_id}/analyzeRun AI analysis producing risk assessment, market comparison, suggested weights, and recommendations.
Response:
{
"tender_id": "tnd-a1b2c3",
"risk_assessment": [
"Budget range may be below market rate",
"SOC 2 requirement limits supplier pool"
],
"market_comparison": "Similar tenders averaged AED 6-12M...",
"suggested_weights": {
"technical_approach": 0.35,
"price": 0.15,
"timeline": 0.15
},
"recommendation": "Consider increasing budget maximum..."
}
Bids
Submit Bid
/api/v1/tenders/{tender_id}/bidsRequest Body:
{
"supplier_id": "sup-001",
"amount": 6500000,
"proposal": "Our team brings 15 years of experience...",
"delivery_days": 120,
"qualifications": ["ISO 27001:2022", "SOC 2 Type II"]
}
List Bids
/api/v1/tenders/{tender_id}/bidsReturns all bids for a tender with scores and rankings.
Get Bid
/api/v1/tenders/{tender_id}/bids/{bid_id}Evaluate Single Bid
/api/v1/tenders/{tender_id}/bids/{bid_id}/evaluateRun AI evaluation on a single bid. Returns per-criterion scores, strengths, weaknesses, compliance check, and value assessment.
Evaluate All Bids
/api/v1/tenders/{tender_id}/evaluate-allEvaluate all bids for a tender and produce a ranked comparison with overall recommendation.
Response:
{
"tender_id": "tnd-a1b2c3",
"evaluations": [...],
"ranking": [
{"bid_id": "bid-001", "rank": 1, "total_score": 86.2},
{"bid_id": "bid-002", "rank": 2, "total_score": 79.8}
],
"recommendation": "Recommend awarding to Supplier A..."
}
Reports
Generate Report
/api/v1/reports/tender/{tender_id}Generate a comprehensive evaluation report for a tender.
Response:
{
"id": "rpt-a1b2c3",
"tender_id": "tnd-a1b2c3",
"report_type": "evaluation",
"content": {...},
"filename": "evaluation_report_tnd-a1b2c3.pdf",
"created_by": "user-123",
"created_at": "2024-01-15T10:30:00Z"
}
List Reports
/api/v1/reportsReturns all generated procurement reports.
Suppliers
Create Supplier
/api/v1/suppliersRequest Body:
{
"name": "Gulf Technology Solutions",
"registration_number": "CR-2024-001234",
"category": "it_services",
"contact_email": "procurement@gulftech.example",
"contact_phone": "+971-2-555-0100",
"capabilities": ["Cloud infrastructure", "Government migrations"],
"certifications": ["ISO 27001:2022", "SOC 2 Type II"]
}
List Suppliers
/api/v1/suppliersQuery Parameters:
| Parameter | Type | Description |
|---|---|---|
category | string | Filter by category |
search | string | Search in supplier names |
min_score | number | Minimum overall score (0-100) |
page | integer | Page number (default: 1) |
page_size | integer | Results per page (default: 20, max: 100) |
Get Supplier
/api/v1/suppliers/{supplier_id}Update Supplier
/api/v1/suppliers/{supplier_id}Score Supplier
/api/v1/suppliers/{supplier_id}/scoreGenerate an AI performance score based on bid history.
Response:
{
"supplier_id": "sup-001",
"overall_score": 82.5,
"breakdown": {
"bid_quality": 85.0,
"price_competitiveness": 78.0,
"delivery_reliability": 88.0,
"compliance_record": 90.0
},
"total_bids": 12,
"won_bids": 5,
"win_rate": 0.42
}
Health
Health Check
/api/v1/healthReturns service health status and version information.