Skip to main content
curl https://api.chargeapi.co/v1/fleets/flt_61R9a6NUWsRmOW3RM41L6nFOS1ekDGHo \
  -H "Authorization: Bearer ch_sk_test_..."
{
    "code": "fleet_not_found",
    "doc_url": "https://docs.chargeapi.co/errors#fleet_not_found",
    "message": "Fleet not found.",
    "object": "error",
    "param": "fleet",
    "request": "req_6R3M9pQ4bV2kLs8nT1xY7wEf5cZa0HdJ",
    "status": 404,
    "type": "invalid_request_error"
}
When a request fails, Charge returns a JSON error object. The shape stays consistent across the API so your client can handle failures in a predictable way instead of writing endpoint-specific parsing logic for every error response. Charge uses standard HTTP status codes to signal what kind of failure happened. In general, 4xx responses mean the request could not be completed as sent, while 5xx responses mean something unexpected happened on Charge’s side. The most useful fields for debugging are usually type, code, message, and request. type tells you the broad category of failure, code identifies the specific condition when Charge has one, message is safe to show in logs and internal tooling, and request gives Charge support a concrete request to trace. Endpoint reference pages may still call out especially relevant statuses or error codes when they matter for that operation, but they all use the same underlying error object described here.

Attributes

code
string | null
Short error code you can use to identify the error.Available options: account_not_found, charging_session_conflict, charging_session_dependency_not_found, charging_session_not_found, charging_session_state_conflict, charging_station_not_found, driver_fleet_conflict, driver_not_found, driver_or_fleet_not_found, estimation_not_found, estimation_validation_error, fleet_not_found, invoice_finalize_invalid_state, invoice_not_found, invoice_payment_invalid_state, invoice_update_invalid_state, invoice_validation_error, invoice_void_invalid_state, owner_scope_invalid, payment_authorization_failed, payment_method_invalid_input, payment_method_not_found, payment_method_owner_not_found, payment_method_scope_invalid, payment_method_scope_not_found, policy_blocked, policy_not_found, rate_limit_exceeded, report_not_found, report_validation_error, reservation_cancel_invalid_state, reservation_invalid_input, reservation_invalid_state, reservation_not_found, reservation_update_invalid_state, transaction_not_found, unsupported_expand_value, vehicle_not_found, vehicle_owner_not_found, vehicle_telemetry_not_found, webhook_endpoint_not_found
message
string
required
Human-readable description of the error.
param
string | null
Name of the request parameter that caused the error, if applicable.
request
string
required
Unique identifier for the request. Include this when contacting Charge support about a specific error.
status
integer
HTTP status code returned with the error.
type
string
required
Broad category of error.Available options: invalid_request_error, authentication_error, rate_limit_error, api_error, idempotency_error

More attributes

object
string
required
String representing the object’s type. Objects of the same type share the same value.
doc_url
string | null
Link to the relevant section in the Charge API docs.

HTTP Status Code Summary

StatusMeaningDescription
200OKEverything worked as expected.
400Bad RequestThe request is invalid for this Charge operation.
401UnauthorizedThe Charge API key is missing, invalid, or could not be authenticated.
402Payment RequiredThe payment step failed or could not be authorized.
403ForbiddenThe request was blocked by a Charge policy or permission rule.
404Not FoundThe requested resource does not exist.
409ConflictThe request conflicts with the current state of the resource.
429Too Many RequestsYour integration is sending requests too quickly.
5xxServer ErrorAn unexpected server-side error occurred while processing the request.

Most Common Error Types

Error typeDescription
invalid_request_errorThe request is malformed, incomplete, or incompatible with the current resource state.
authentication_errorThe API key is missing, invalid, or not allowed to access the request.
rate_limit_errorThe request rate is too high and the client should slow down before retrying.
api_errorAn unexpected server-side failure occurred while processing the request.