List transaction costs
Endpoint
Section titled “Endpoint”GET /v1/transactions/{transactionId}/costs
Authentication
Section titled “Authentication”Requires Bearer token authentication.
Path Parameters
Section titled “Path Parameters”| Parameter | Type | Required | Description |
|---|---|---|---|
transactionId | string | Yes | Transaction ID |
cURL Example
Section titled “cURL Example”curl -X GET "https://api.sapiom.ai/v1/transactions/{transactionId}/costs" \ -H "Authorization: Bearer YOUR_API_KEY"Response
Section titled “Response”{ "costs": [ { "id": "123e4567-e89b-12d3-a456-426614174000", "transactionId": "123e4567-e89b-12d3-a456-426614174000", "tenantId": "123e4567-e89b-12d3-a456-426614174000", "paymentTransactionId": "123e4567-e89b-12d3-a456-426614174000", "fiatAmount": "0.25", "fiatAssetId": "123e4567-e89b-12d3-a456-426614174000", "isEstimate": false, "isActive": true, "supersedesCostId": "123e4567-e89b-12d3-a456-426614174000", "supersededAt": "2024-01-15T10:30:00Z", "costDetails": { "provider": "anthropic", "model": "claude-3-5-sonnet-20241022", "inputTokens": 1000, "outputTokens": 5000 }, "createdAt": "2024-01-15T10:00:00Z", "updatedAt": "2024-01-15T10:30:00Z" } ], "totalActiveCostUsd": "0.25"}Error Responses
Section titled “Error Responses”| Status | Code | Description |
|---|---|---|
| 401 | - | Unauthorized - invalid or missing API key |
| 404 | - | Transaction not found |
See API Introduction for error handling details.