openapi: 3.2.0 info: title: Observability Batch Transactions API version: 1.0.0 description: The Batch Transactions endpoints provide monitoring for bulk transaction file. servers: - url: https://api.fenergox.com/tm/observability tags: - name: Batch Transactions description: The Batch Transactions endpoints provide monitoring for bulk transaction file. paths: /api/v1/batch-transactions/batches: get: tags: - Batch Transactions summary: Batch Transactions Batches description: 'Returns batch transaction information either by batch IDs or by date range. Use either ''ids'' parameter OR both ''start_date'' and ''end_date'' parameters.' operationId: batch_transactions_batches_api_v1_batch_transactions_batches_get parameters: - name: ids in: query required: false schema: anyOf: - type: string - type: 'null' description: Comma-separated batch IDs to retrieve details for. title: Ids description: Comma-separated batch IDs to retrieve details for. - name: start_date in: query required: false schema: anyOf: - type: string - type: 'null' description: The start date from which the metrics should be generated. title: Start Date description: The start date from which the metrics should be generated. - name: end_date in: query required: false schema: anyOf: - type: string - type: 'null' description: The end date up to which the metrics should be generated. title: End Date description: The end date up to which the metrics should be generated. responses: '200': description: Successful response with batch transaction details content: application/json: schema: anyOf: - type: array items: $ref: '#/components/schemas/BatchDetail' - type: array items: $ref: '#/components/schemas/BatchTransactionsByDateResponse' title: Response Batch Transactions Batches Api V1 Batch Transactions Batches Get examples: by_ids: summary: Batch details retrieved by batch IDs value: - batch_id: batch-123 status: completed ingest_start: '2023-10-01T10:00:00Z' ingest_end: '2023-10-01T10:15:00Z' duration_seconds: 900 reject_on_invalid: true counts: total: 1000 accepted: 950 invalid: 50 exports: s3_location: s3://bucket/path/to/batch-123 by_date_range: summary: Batch transactions grouped by date value: - date: '2023-10-01' count: 1 batches: - batch_id: batch-123 status: completed ingest_start: '2023-10-01T10:00:00Z' ingest_end: '2023-10-01T10:15:00Z' duration_seconds: 900 reject_on_invalid: true counts: total: 1000 accepted: 950 invalid: 50 '400': description: Invalid parameter combination content: application/json: example: message: Invalid parameters. Provide either 'ids' OR both 'start_date' and 'end_date'. '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' components: schemas: BatchDetail: properties: batch_id: type: string title: Batch Id description: Unique identifier for the batch. status: $ref: '#/components/schemas/BatchTransactionIngestionStatus' description: Current ingestion status of the batch. ingest_start: anyOf: - type: string format: date-time title: Ingestion started - type: 'null' title: Ingestion not yet started title: Ingest Start description: Timestamp when batch ingestion started (UTC, ISO 8601). ingest_end: anyOf: - type: string format: date-time title: Ingestion completed - type: 'null' title: Ingestion not yet completed title: Ingest End description: Timestamp when batch ingestion completed (UTC, ISO 8601). duration_seconds: anyOf: - type: integer title: Ingestion completed - type: 'null' title: Ingestion not yet completed title: Duration Seconds description: Elapsed ingestion time in seconds. counts: anyOf: - $ref: '#/components/schemas/BatchCounts' title: Counts available - type: 'null' title: Counts not yet available title: Counts description: Breakdown of transaction counts by outcome (total, accepted, invalid). reject_on_invalid: anyOf: - type: boolean title: Configuration known - type: 'null' title: Configuration not available title: Reject On Invalid description: Whether the batch was configured to reject all transactions on encountering an invalid one. error_message: anyOf: - type: string title: Batch failed - type: 'null' title: No error title: Error Message description: Error message if the batch failed. Null if no error occurred. exports: anyOf: - additionalProperties: type: string type: object title: Exports generated - type: 'null' title: No exports generated title: Exports description: Map of export type to export location (e.g. S3 path). Null if no exports were generated. additionalProperties: false type: object required: - batch_id - status title: BatchDetail description: Model for detailed batch information. BatchTransactionIngestionStatus: type: string enum: - uploaded - processed - failed - validation_failed - validation_completed - processed_with_failures - pending_ingestion - ingestion_in_progress title: BatchTransactionIngestionStatus BatchCounts: properties: total: anyOf: - type: integer title: Counts available - type: 'null' title: Counts not yet computed title: Total description: Total number of transactions in the batch. accepted: anyOf: - type: integer title: Counts available - type: 'null' title: Counts not yet computed title: Accepted description: Number of transactions accepted for ingestion. invalid: anyOf: - type: integer title: Counts available - type: 'null' title: Counts not yet computed title: Invalid description: Number of transactions rejected as invalid. additionalProperties: false type: object title: BatchCounts description: Model for batch counts. BatchTransactionsByDateResponse: properties: date: type: string title: Date description: Date of the batches in YYYY-MM-DD format. count: type: integer title: Count description: Number of batches on this date. batches: items: $ref: '#/components/schemas/BatchDetail' type: array title: Batches description: List of batch details for this date. additionalProperties: false type: object required: - date - count - batches title: BatchTransactionsByDateResponse description: Model for batches grouped by date. HTTPValidationError: properties: detail: items: $ref: '#/components/schemas/ValidationError' type: array title: Detail type: object title: HTTPValidationError ValidationError: properties: loc: items: anyOf: - type: string - type: integer type: array title: Location msg: type: string title: Message type: type: string title: Error Type input: title: Input ctx: type: object title: Context type: object required: - loc - msg - type title: ValidationError