Projects
Projects Endpoint ให้คุณตรวจสอบว่า API key ของคุณเข้าถึง Project ใดได้บ้าง มีประโยชน์สำหรับการตรวจสอบ Scope ของ Token, ค้นหา Project ID และสร้าง Integration แบบ Dynamic ที่เลือก Project ที่ถูกต้องขณะ Runtime
รายการ Projects
GET /v1/openapi/projectsคืนข้อมูล Project ตาม Scope ของ Token
- Organization Token — คืน Project ที่ Active ทั้งหมดใน Organization
- Project Token — คืน Array ที่มีเพียง Project เดียวที่ Token กำหนดไว้
Response จะเป็น Array เสมอไม่ว่าจะใช้ Token ประเภทใด ทำให้ Client Code จัดการทั้งสองกรณีได้แบบเดียวกัน
Headers:
| Header | Value | Required |
|---|---|---|
X-API-Key | ocr_your_api_key | Yes |
Example Request:
curl "https://api.ocriva.com/v1/openapi/projects" \
-H "X-API-Key: ocr_your_api_key"Example Response — Organization Token (200 OK):
[
{
"id": "68db4aa2967d9c03fa9b5e74",
"name": "Invoice Processing",
"description": "Automated invoice extraction pipeline",
"organizationId": "68da2880b45d7a01d90a3c51",
"isActive": true,
"createdAt": "2026-01-10T09:00:00.000Z",
"updatedAt": "2026-03-15T16:45:00.000Z"
},
{
"id": "68db5cc4c78g1e17gd4c7h85",
"name": "Receipt Scanning",
"description": "Mobile receipt scanning for expense reports",
"organizationId": "68da2880b45d7a01d90a3c51",
"isActive": true,
"createdAt": "2026-02-01T11:00:00.000Z",
"updatedAt": "2026-03-20T10:00:00.000Z"
}
]Example Response — Project Token (200 OK):
[
{
"id": "68db4aa2967d9c03fa9b5e74",
"name": "Invoice Processing",
"description": "Automated invoice extraction pipeline",
"organizationId": "68da2880b45d7a01d90a3c51",
"isActive": true,
"createdAt": "2026-01-10T09:00:00.000Z",
"updatedAt": "2026-03-15T16:45:00.000Z"
}
]Common Errors:
| Status | Cause |
|---|---|
401 | Token ไม่ถูกต้องหรือไม่มี Token |
