Skip to main content
POST
/
reports
Create a report generation request
curl --request POST \
  --url https://api.chargeapi.co/v1/reports \
  --header 'Content-Type: application/json' \
  --data '{
  "parameters": {
    "type": "charging_summary",
    "period_start": 1711929600,
    "period_end": 1714608000
  },
  "fleet": "fleet_12345"
}'
{
  "id": null,
  "object": null,
  "account": null,
  "created": null,
  "fleet": null,
  "parameters": {
    "filters": {
      "vehicle": null
    },
    "group_by": null,
    "period_start": null,
    "period_end": null,
    "type": null
  },
  "size": null,
  "status": null,
  "succeeded_at": null,
  "type": null,
  "url": null
}

Body

application/json
parameters
object

Report configuration payload.

fleet
string

Limit the report to a single fleet. Omit to aggregate across the entire account.

Response

Returns the newly created Report object. The report’s status is set to pending until generation completes. Use the status field (or the succeeded_at timestamp) to track when the report is ready.

id
string

Unique identifier for the report object.

Example:

null

object
string

String representing the object’s type. Always reporting.

Example:

null

account
string

ID of the account associated with this report.

Example:

null

created
integer

Time at which the report was created.

Example:

null

fleet
string

ID of the fleet that this report is scoped to, if applicable.

Example:

null

parameters
object

Parameters used to generate the report.

size
integer

Size of the generated report file in bytes.

Example:

null

status
enum<string>

Current status of the report generation process.

Available options:
pending,
processing,
succeeded,
failed
Example:

null

succeeded_at
integer

Timestamp when the report generation was completed successfully.

Example:

null

type
string

File format of the generated report (e.g., csv, pdf).

Example:

null

url
string<uri>

Public URL to download the generated report file.

Example:

null