# Meters The Zuora Mediation APIs provide a comprehensive set of endpoints to manage, test, run, and monitor usage meters. These APIs support actions such as running or testing specific meter versions, importing and exporting meter configurations, managing input files, performing event store operations, and ingesting usage data in real time via streaming. All APIs follow a consistent response structure to simplify integration and error handling. Use these APIs to automate and streamline your usage processing pipeline—from data ingestion to transformation and billing. ## Run a specific version of a meter - [POST /meters/run/{meterId}/{version}](https://developer.zuora.com/v1-api-reference/api/meters/runspecificversionofmeter.md): Executes a specific version of a meter in Zuora Mediation. You can choose to run it with either a local file or event store source by providing optional configurations. ## Test a specific version of a meter - [POST /meters/debug/{meterId}/{version}](https://developer.zuora.com/v1-api-reference/api/meters/testspecificversionofmeter.md): Test a specific version of a meter in Zuora Mediation without executing a full run. It supports multiple input methods, including uploaded files, sample files, and manual test data. This is useful for validating meter logic and transformations before meter run. ## Retrieve summary data for a meter - [POST /meters/{meterId}/summary](https://developer.zuora.com/v1-api-reference/api/meters/retrievemetersummarydata.md): Retrieves summary data for a specific meter in Zuora Mediation, providing a rolled-up view of a meter run or time window. The API supports grouping by Operator ID, Error Code, or Session ID, and allows optional filters such as Query From Time, Query To Time, Operator IDs, and Session IDs. The API returns aggregated output and error counts per group and includes validation with detailed error responses for invalid parameters or formats. ## Retrieve the run status of a specific meter version - [GET /meters/{meterId}/{version}/runStatus](https://developer.zuora.com/v1-api-reference/api/meters/getrunstatusofspecificmeterversion.md): Retrieves the current run status of a specific meter version in Zuora Mediation. It returns an integer code indicating the status, such as RUNNING, COMPLETED, or FAILED, which helps monitor the meter's execution state. ## Retrieve the audit trail entries for a meter - [GET /meters/{meterId}/auditTrail/entries](https://developer.zuora.com/v1-api-reference/api/meters/getaudittrailentriesformeter.md): Retrieves the audit trail entries for a specific meter in Zuora Mediation. The API provides detailed, record-level information about what happened during processing, including Payload and error details, operator information, and the trace ID/event ID. ## Retrieve the list of export jobs for a meter - [GET /meters/{meterId}/auditTrail/export](https://developer.zuora.com/v1-api-reference/api/meters/getaudittrailexportjobs.md): Retrieves the list of previously initiated export jobs for a specific meter in Zuora Mediation. The API supports advanced filtering by time range, run status, run type, export type, session IDs, and operator IDs. Use the returned status and fileList fields to determine whether a job is complete and which files to download. Then use the "Retrieve the presigned URL for an export job" API operation with each fileKey in fileList to obtain the download URLs. ## Create a job to export audit trail data for a meter - [POST /meters/{meterId}/auditTrail/export](https://developer.zuora.com/v1-api-reference/api/meters/createaudittrailexportjob.md): Creates a background job to export the audit trail entries for a specific meter in Zuora Mediation. This API is for large-scale, offline access to audit data. Only one export job is processed per tenant at a time, and each export has a record limit, for example, up to 5 million rows per report. Use the returned requestId with the "Retrieve the list of export jobs for a meter" API operation to track the job status and retrieve the generated file names from fileList, then download them using the "Retrieve the presigned URL for an export job" API operation. ## Retrieve the presigned URL for an export job - [GET /meters/auditTrail/presignedUrl](https://developer.zuora.com/v1-api-reference/api/meters/getpresignedurlformeterexport.md): Returns a pre-signed URL that you can use to download a specific export file (usually from object storage such as S3). The fileKey corresponds to one entry from the fileList array in the List API. Use the returned URL in the data field directly in a browser or via a HTTP client to download the export file. ## Export details of a specific meter - [GET /meters/export/{meterId}](https://developer.zuora.com/v1-api-reference/api/meters/exportspecificmeter.md): The Export Meter operation exports the full definition of a specific meter in Zuora Mediation, including metadata, all versions, event schemas, and operator configurations (source, processor, sink). It's useful for reviewing, backing up, or replicating meter setups across environments. ## Import a meter definition - [POST /meters/import](https://developer.zuora.com/v1-api-reference/api/meters/importmeterdefinition.md): Import a meter definition into Zuora Mediation using a file exported from the Export Meter API. ## Upload a file - [POST /meters/files](https://developer.zuora.com/v1-api-reference/api/meters/uploadmeteringfile.md): Uploads and stores a file in Zuora Mediation for use in meter processing. Supported formats include CSV, Excel, and JSON. You can specify metadata like headers, delimiters, sheets, and data ranges. ## Ingest usage events for a meter - [POST /usage/bulk/{meterGlobalId}](https://developer.zuora.com/v1-api-reference/api/meters/ingestusageevents.md): Ingests usage events directly into Zuora Mediation in real time. You can send a single event or batch multiple events in a JSON array to optimize throughput. Each event must conform to the meter's event schema. This operation is supported only for meters that use the Streaming API as their source in Zuora Mediation. You can use this API to bulk-ingest events into a meter only when the meter's source is configured as a Streaming API operator. For meters that use other sources, use the appropriate ingestion mechanism for that source instead. ## Bulk delete events from an event store - [POST /meters/events/bulkDelete](https://developer.zuora.com/v1-api-reference/api/meters/bulkdeleteeventsfromeventstore.md): Allows you to delete multiple events from an event store in Zuora Mediation using a file that lists the event IDs to be removed. It is useful for cleaning up or correcting data in bulk. ## Retrieve the latest query job of a specific event store - [GET /meters/events/stores/{id}/jobs/latest](https://developer.zuora.com/v1-api-reference/api/meters/getlatestqueryjobofspecificeventstore.md): Retrieves the most recent query job executed on a specific event store in Zuora Mediation. It returns metadata such as query type (e.g., DELETE), status, record counts, and timestamps. ## Submit an event store query - [POST /meters/event-store-queries](https://developer.zuora.com/v1-api-reference/api/meters/submiteventstorequery.md): Submits a SQL-style asynchronous query to the Event Store to retrieve and inspect metering events for validation, troubleshooting, and reconciliation. The API returns a queryId that can be used to poll and fetch paginated results. ## Retrieve the results for an event store query - [GET /meters/event-store-queries/{queryId}](https://developer.zuora.com/v1-api-reference/api/meters/getqueryresultsforeventstore.md): Retrieves paginated result rows and column metadata for a previously submitted Event Store query using its queryId, including total row count, row-level field values, and readiness status. Query execution is asynchronous.