Start session
POST/v1/sessions/start
Allows to start a remote session for a consumer of an external system using a ServiceAccount. A created session returns the charge identifiers. Repeating the same start returns only sessionId. A business failure returns code, message, and the fields of that result.
Request
Responses
- 201
- 400
- 403
- 404
- 409
- 422
- 500
- 502
Session created, or the same start repeated. A new session returns the charge identifiers. An idempotent repeat returns only sessionId.
INVALID_MAX_COST. Fields: stationId, connectorId, consumerId, emspId, maxCostCents, unlockFeeCents, reason. reason is MustBeGreaterThanZero when maxCostCents is zero or negative: no session is created. reason is MustBeGreaterThanUnlockFee when maxCostCents is not greater than the unlock fee of the connector price: the session is created and fails before the charger is contacted, and unlockFeeCents is that fee in cents.
EXTERNAL_CONSUMER_CANNOT_START_SESSION. Fields: consumerId, stationId, cpoId, emspId.
STATION_DOES_NOT_EXIST. Fields: stationId.
CONCURRENT_OPERATION_DETECTED_ERROR (consumerId, connectorId, stationId), EXTERNAL_CONSUMER_ALREADY_HAS_ONGOING_SESSION (stationId, connectorId, consumerId, ongoingSessionId), or CONSUMER_HAS_PENDING_ORDER (stationId, emspId, consumerId, pendingOrder).
CONNECTOR_IS_NOT_AVAILABLE (stationId, connectorId, consumerId, emspId), START_SESSION_CONSUMER_CANNOT_START_SESSION_DUE_TO_RESERVATION_POLICY (stationId, connectorId, consumerId, emspId, cpoId, connectorStatus, reason), or PAYMENT_FAILED (consumerId, emspId, stationId, reason). reason is the upstream explanation.
EMPTY_UPSTREAM_RESPONSE. The session was not started.
CENTRAL_SYSTEM_START_TRANSACTION_ERROR. Fields: consumerId, emspId, connectorId, stationId, reason. reason is the upstream explanation.