GET /v1/order-intents

List Order Intents

Summary

List order intents for the authenticated user

Description

Returns all order intents for the authenticated user's organization, sorted by creation date (newest first). Useful for checkout workflows and order history.

Request Example

curl -X GET "http://127.0.0.1:8000/api/v1/order-intents" \
  -H "Authorization: Bearer YOUR_API_KEY"

Response Example

[
  {
    "order_intent_id": "oi_abc123def456",
    "status": "submitted",
    "created_at": "2024-01-27T21:12:00Z",
    "updated_at": "2024-01-27T21:15:00Z",
    "quantity": 10,
    "lead_time": "standard",
    "latest_quote_id": "quo_xyz789",
    "latest_order_id": "ord_def456"
  }
]

Error Codes

This endpoint may return the following error codes:

Code Status Meaning
missing_auth 401 No Authorization header provided
invalid_api_key 403 API key is invalid or missing

Authentication

This endpoint requires Bearer token authentication:

Authorization: Bearer YOUR_API_KEY