Log inTalk to us

Report route outcomes and current routes (runner)

post/v1/migrations/{migration_id}/routes/reports
Requires an API key

Batched: each charger's current route and connections, with the outcome of a request (request_id) or none (its state, or a change made on the proxy itself). A rollback's applied outcome with no connection to Ivora emits migration.charger_rolled_back and records the route for QR scans; with a connection to Ivora still open the request is handed out again. A move to Ivora the API did not ask for is audited in the same transaction (503 when it cannot be; the rest of the report is kept). Runner credential only (POST /v1/migrations/{migration_id}/runners, scope migration:routes); any other credential is refused, whatever the migration's status (Ivora can always roll back: on a completed or archived migration the runner idles until one comes). Errors: 503 migration_audit_unavailable. See Errors and statuses.

Path parameters

  • migration_idstringRequired
    Pattern ^mig_[0-9a-f]{32}$

Request body

  • reportsarray of RouteReportRequired
    Child attributes
    • request_idstring | null
      The request this reports on; null for the charger's current state or a change made on the proxy itself (break-glass).
      Pattern ^rr_[0-9a-f]{32}$
    • charger_keystringRequired
      Pattern ^(?:[A-Za-z0-9._-]{1,64}/)?[A-Za-z0-9._:*@+=-]{1,64}$
    • currentenumRequired
      Where the proxy routes the charger now.
      One of ivora, previous_platform
    • outcomeenum | null
      With request_id: the proxy's result (exit 0 or 6: applied, 4: applied with a socket to Ivora still open (connected lists ivora), 2: refused_busy, 7: refused_parity, 3/5: failed).
      One of applied, refused_busy, refused_parity, failed, superseded
    • codeinteger | null
      The proxy tool's exit code.
      Minimum 0 · Maximum 255
    • atstring | null
      When the route changed, by the proxy's clock (ISO 8601 with offset).
      Up to 40 characters
    • connectedarray of enum
      The sides a connection of the charger is open on now.
    • detailstring | null
      A short note. Never a credential.
      Up to 300 characters

Returns · 200

  • recordedintegerRequired
  • resultsarray of ReportResultRequired
    Child attributes
    • charger_keystringRequired
    • request_idstring | nullRequired
    • statusenumRequired
      One of recorded, unknown_charger, unknown_request, already_settled
    • rollback_statusstring | nullRequired
POST /v1/migrations/{migration_id}/routes/reports
curl --fail-with-body -X POST "https://api.ivoracharge.com/v1/migrations/mig_0123456789abcdef0123456789abcdef/routes/reports" \
  -H "Authorization: Bearer $IVORA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "reports": [
    {
      "charger_key": "string",
      "current": "ivora"
    }
  ]
}'
Response · 200JSON
{
  "recorded": 1,
  "results": [
    {
      "charger_key": "string",
      "request_id": "request_0123456789abcdef",
      "status": "recorded",
      "rollback_status": "string"
    }
  ]
}
Requires an approved production API keyProduction access starts with a request, a short meeting with Ivora and a card on file, after which Ivora staff grant your account access. How to request access
Try itproduction · api.ivoracharge.com

Paste a production api key (iv_live_…). Create keys in Developer tools. The key stays in this page's memory, is sent only to https://api.ivoracharge.com and clears when you reload. Test keys are refused.

POST is a write: you confirm the method, path and project before it is sent, with a generated Idempotency-Key.