{
  "openapi": "3.1.0",
  "info": {
    "title": "SimItNow API",
    "version": "1.52.0",
    "description": "REST API for the SimItNow OCPP simulator: create charging stations and virtual EVs, drive transactions, simulate faults and network loss, and run a hosted CSMS. v1 is the fully-supported default; v2 is in beta (see the /v2/csms* endpoints, which are v2-only). Every request must carry the API key in the SIMITNOW-API-KEY header. See https://www.simitnow.com/docs for the human-readable reference this spec is generated alongside.\n\n## Authentication\nSend the API key in the `SIMITNOW-API-KEY` header on every request. Operations that create something or touch the account (creating a station or vehicle, `/v2/csms`, the probe) answer 401 for a missing or wrong key. Operations on an existing station or vehicle are routed by key and id first, so a wrong key answers 404, the same as a resource that does not exist.\n\n## Asynchronous behavior\nA 2xx reply means the request was accepted, not that the simulator has finished. Creating a station returns before the station has connected to its CSMS: until it has, every call that names it answers 409 with `connectionStatus` `connecting` and a `Retry-After` header. Poll Get Charging Station Info until it answers 200 and `network.connected` is true. Plugging an EV in changes the connector state a moment later: poll the same operation until `connector.<n>.status` is `Preparing`. Stopping and faults are reflected there too. Give each poll a timeout.\n\n## Limits\nEvery OCPP message counts toward a daily allowance that resets at 00:00 UTC (Free 500, Solo 2,500, Pro 10,000), shared by simulated stations, the hosted CSMS and OCPI. Past it, creating a station answers 429 `quota_exceeded`. A Free account also has a safety limit on how many stations it can hold. The only documented per-request rate limit is the probe's: 20 a minute per API key. A 503 carries `Retry-After` when the service is busy.\n\n## Pagination and deprecation\nNo operation returns a list, so nothing is paginated. No operation is deprecated: v1 is the fully supported API and v2 is in beta.",
    "termsOfService": "https://www.simitnow.com/terms",
    "contact": {
      "name": "SimItNow support",
      "email": "info@simitnow.com"
    }
  },
  "externalDocs": {
    "description": "Human-readable API reference",
    "url": "https://www.simitnow.com/docs"
  },
  "servers": [
    {
      "url": "https://api.simitnow.com"
    }
  ],
  "security": [
    {
      "ApiKeyAuth": []
    }
  ],
  "tags": [
    {
      "name": "v1",
      "description": "The fully supported API. Every operation has a path of its own per action."
    },
    {
      "name": "v2",
      "description": "The beta API: resource-style paths, plus the hosted-CSMS operations (/v2/csms), which exist only here."
    }
  ],
  "components": {
    "securitySchemes": {
      "ApiKeyAuth": {
        "type": "apiKey",
        "in": "header",
        "name": "SIMITNOW-API-KEY"
      }
    },
    "schemas": {
      "Error": {
        "type": "object",
        "properties": {
          "error": {
            "type": "string"
          }
        },
        "required": [
          "error"
        ]
      },
      "IdResult": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The id that was created or deleted."
          }
        },
        "required": [
          "id"
        ]
      },
      "TransactionStarted": {
        "type": "object",
        "properties": {
          "transactionId": {
            "type": "integer",
            "description": "Pass it to Transaction Stop. On OCPP 1.6 it is negative while the station is disconnected, a local placeholder until the CSMS assigns the real one."
          }
        },
        "required": [
          "transactionId"
        ]
      },
      "ChargingStationInfo": {
        "type": "object",
        "properties": {
          "config": {
            "type": "object",
            "description": "The creation parameters."
          },
          "connector": {
            "type": "object",
            "description": "Per-connector state keyed by the connector number as a string.",
            "additionalProperties": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "integer"
                },
                "status": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "OCPP status name with a capital first letter, such as Available, Preparing, Charging, Faulted."
                },
                "error_code": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "status_sent": {
                  "type": "boolean"
                }
              }
            }
          },
          "network": {
            "type": "object",
            "properties": {
              "connected": {
                "type": "boolean",
                "description": "False while the station is disconnected."
              },
              "queuedMessages": {
                "type": "integer",
                "description": "Transaction messages held until the connection returns."
              },
              "quotaPause": {
                "type": "object",
                "description": "Present only while the station is held back by the daily message allowance: it stays disconnected until `until`, or until the allowance is raised.",
                "properties": {
                  "until": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "count": {
                    "type": "integer"
                  },
                  "limit": {
                    "type": "integer"
                  }
                }
              }
            },
            "required": [
              "connected",
              "queuedMessages"
            ]
          },
          "iccid": {
            "type": [
              "string",
              "null"
            ]
          },
          "imsi": {
            "type": [
              "string",
              "null"
            ]
          },
          "authorizeLocalStart": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Null on OCPP 1.6."
          }
        },
        "required": [
          "config",
          "connector",
          "network"
        ]
      },
      "ElectricVehicleInfo": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "soc": {
            "type": "number",
            "description": "State of charge in percent."
          },
          "capacityWh": {
            "type": "number"
          },
          "connectedCbId": {
            "type": [
              "string",
              "null"
            ]
          },
          "connectedConnectorId": {
            "type": [
              "integer",
              "null"
            ]
          },
          "autoDischarge": {
            "type": "boolean"
          },
          "idTag": {
            "type": [
              "string",
              "null"
            ]
          },
          "maxAcPowerKw": {
            "type": "number"
          },
          "maxDcPowerKw": {
            "type": "number"
          }
        },
        "required": [
          "id",
          "soc",
          "capacityWh"
        ]
      },
      "CsmsInstance": {
        "type": "object",
        "properties": {
          "csmsId": {
            "type": "string"
          },
          "wsHost": {
            "type": "string",
            "description": "A chargepoint dials wss://{wsHost}/ocpp/{csmsId}/{cbId}."
          },
          "public": {
            "type": "boolean"
          },
          "connectionLimit": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Null when there is no limit."
          },
          "activeConnections": {
            "type": "integer",
            "description": "Returned by Get CSMS Instance Info only."
          }
        },
        "required": [
          "csmsId",
          "wsHost",
          "public"
        ]
      },
      "ProbeResult": {
        "type": "object",
        "properties": {
          "ok": {
            "type": "boolean"
          },
          "code": {
            "type": "string",
            "description": "Short diagnosis code, such as credentials_refused."
          },
          "cause": {
            "type": "string"
          },
          "action": {
            "type": "string"
          },
          "stages": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          },
          "statusCode": {
            "type": [
              "integer",
              "null"
            ]
          },
          "url": {
            "type": "string"
          }
        },
        "required": [
          "ok",
          "code"
        ]
      }
    },
    "responses": {
      "Unauthorized": {
        "description": "The API key is missing or not valid.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "examples": {
              "missing": {
                "value": {
                  "error": "API key missing"
                }
              },
              "invalid": {
                "value": {
                  "error": "Invalid API key"
                }
              }
            }
          }
        }
      }
    }
  },
  "paths": {
    "/v1/cs/probe": {
      "post": {
        "operationId": "probeCsms",
        "summary": "Probe a CSMS",
        "description": "Attempt one real WebSocket handshake against the URL a station would use, then close. Nothing is created and no BootNotification is sent, so probing leaves no session, registration or log entry on the target CSMS. Always returns HTTP 200 when the probe ran -- the verdict is in the body. Rate limited to 20 probes/minute per API key; the handshake times out after 8 seconds.",
        "tags": [
          "v1",
          "v2"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "csmsUrl": {
                    "type": "string"
                  },
                  "id": {
                    "type": "string"
                  },
                  "protocol": {
                    "type": "string",
                    "default": "ocpp1.6",
                    "enum": [
                      "ocpp1.6",
                      "ocpp2.0.1",
                      "ocpp2.1"
                    ]
                  },
                  "security": {
                    "type": "object"
                  }
                },
                "required": [
                  "csmsUrl",
                  "id"
                ]
              },
              "example": {
                "csmsUrl": "wss://csms.example.com/ocpp",
                "id": "CP-001",
                "protocol": "ocpp1.6"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The probe ran; a failed handshake is still a 200.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProbeResult"
                },
                "example": {
                  "ok": false,
                  "code": "path_not_found",
                  "cause": "The server does not recognise this path",
                  "action": "Check the path in the URL - did you replace the example value?",
                  "stages": {
                    "dns": "ok",
                    "tcp_tls": "ok",
                    "ocpp_ws": "fail"
                  },
                  "statusCode": 404,
                  "url": "wss://csms.example.com/ocpp/CP-001"
                }
              }
            }
          },
          "400": {
            "description": "Malformed body, missing csmsUrl/id, a non ws(s):// URL, or an invalid security profile. Nothing is dialled.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                },
                "example": {
                  "error": "csmsUrl is required"
                }
              }
            }
          },
          "429": {
            "description": "More than 20 probes in a minute for this API key.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                },
                "example": {
                  "error": "probe rate limit exceeded (20/min)"
                }
              }
            }
          },
          "503": {
            "description": "The rate limiter itself could not be consulted; fails closed.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                },
                "example": {
                  "error": "probe temporarily unavailable"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      }
    },
    "/v2/cs/{cb_id}": {
      "put": {
        "operationId": "createChargingStationV2",
        "summary": "Create Charging Station",
        "description": "Create and connect a new simulated charging station; it sends a BootNotification to the CSMS at the provided URL as soon as it has connected. The 201 comes back before that: until the connection is up, calls that name the station answer 409 with connectionStatus connecting and a Retry-After header.",
        "tags": [
          "v2"
        ],
        "parameters": [
          {
            "name": "cb_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Charging station id (chargebox id).",
            "example": "CP-001"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "csmsUrl": {
                    "type": "string"
                  },
                  "protocol": {
                    "type": "string",
                    "enum": [
                      "ocpp1.6",
                      "ocpp2.0.1",
                      "ocpp2.1"
                    ]
                  },
                  "power": {
                    "type": "number",
                    "default": 22
                  },
                  "efficiency": {
                    "type": "number",
                    "default": 1.0
                  },
                  "connectorCount": {
                    "type": "integer",
                    "default": 1
                  },
                  "evseCount": {
                    "type": "integer"
                  },
                  "connectorsPerEvse": {
                    "type": "integer",
                    "default": 1
                  },
                  "chargepointType": {
                    "type": "string",
                    "default": "DC",
                    "enum": [
                      "AC",
                      "DC"
                    ]
                  },
                  "reconnectWaitTimeInSeconds": {
                    "type": "integer",
                    "default": 5
                  },
                  "isStable": {
                    "type": "boolean",
                    "default": true
                  },
                  "initialMeterValue": {
                    "type": "number",
                    "default": 0
                  },
                  "waitTimeBeforeStartStop": {
                    "type": "integer",
                    "default": 5
                  },
                  "emulateRemoteStartFailsToStartCharging": {
                    "type": "boolean",
                    "default": false
                  },
                  "emulateRemoteStartRejected": {
                    "type": "boolean",
                    "default": false
                  },
                  "authorizeLocalStart": {
                    "type": "boolean",
                    "default": true
                  },
                  "useCommaInMeterValues": {
                    "type": "boolean",
                    "default": false
                  },
                  "sendEmptyMeterValues": {
                    "type": "boolean",
                    "default": false
                  },
                  "security": {
                    "type": "object"
                  },
                  "iccid": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 20
                  },
                  "imsi": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 20
                  }
                },
                "required": [
                  "csmsUrl",
                  "protocol"
                ]
              },
              "example": {
                "csmsUrl": "ws://your-csms:9000",
                "protocol": "ocpp1.6"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IdResult"
                },
                "example": {
                  "id": "CP-001"
                }
              }
            }
          },
          "409": {
            "description": "Station with this id already active.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                },
                "example": {
                  "error": "Simulator CP-001 exists"
                }
              }
            }
          },
          "400": {
            "description": "Unsupported protocol, an invalid/conflicting security profile, an invalid iccid/imsi, or an authorizeLocalStart that is not true or false.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                },
                "example": {
                  "error": "Unsupported protocol: xyz"
                }
              }
            }
          },
          "429": {
            "description": "A Free account's safety limit on charging stations is reached, or today's message allowance is used up (error \"quota_exceeded\"; it resets at 00:00 UTC).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                },
                "example": {
                  "error": "quota_exceeded",
                  "message_limit": 500,
                  "message_count": 500
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      },
      "get": {
        "operationId": "getChargingStationV2",
        "summary": "Get Charging Station Info",
        "description": "Retrieve the current configuration and connector state of a running station, the iccid and imsi it reports in BootNotification (null when not set), and authorizeLocalStart: whether a local start sends Authorize first right now (null on OCPP 1.6).",
        "tags": [
          "v2"
        ],
        "parameters": [
          {
            "name": "cb_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Charging station id (chargebox id).",
            "example": "CP-001"
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChargingStationInfo"
                },
                "example": {
                  "config": {},
                  "connector": {},
                  "network": {
                    "connected": true,
                    "queuedMessages": 0
                  },
                  "iccid": "8949000000000000001",
                  "imsi": "001010123456789",
                  "authorizeLocalStart": true
                }
              }
            }
          },
          "404": {
            "description": "Not found.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                },
                "example": {
                  "error": "Simulator CP-001 not found"
                }
              }
            }
          },
          "409": {
            "description": "The station was created but has not connected to the CSMS yet. Wait for the Retry-After header (seconds) and call again. A station that stays unreachable keeps answering 409 until it is deleted. A station paused for the daily message allowance answers 409 with a quotaPause object and no Retry-After header.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before calling again.",
                "schema": {
                  "type": "integer"
                },
                "example": 2
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                },
                "example": {
                  "error": "Simulator CP-001 is still connecting to the CSMS. Try again in a few seconds. If it stays this way, check that the CSMS address is reachable.",
                  "connectionStatus": "connecting"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "deleteChargingStationV2",
        "summary": "Delete Charging Station",
        "description": "Stop and remove a simulated charging station. It disconnects from the CSMS and stops counting toward your station limit.",
        "tags": [
          "v2"
        ],
        "parameters": [
          {
            "name": "cb_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Charging station id (chargebox id).",
            "example": "CP-001"
          }
        ],
        "responses": {
          "200": {
            "description": "Deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IdResult"
                },
                "example": {
                  "id": "CP-001"
                }
              }
            }
          },
          "404": {
            "description": "Not found.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                },
                "example": {
                  "error": "Simulator CP-001 not found"
                }
              }
            }
          }
        }
      }
    },
    "/v2/cs/{cb_id}/transactions": {
      "post": {
        "operationId": "startTransactionV2",
        "summary": "Transaction Start",
        "description": "Start a charging transaction on a connector. On OCPP 1.6 the connector must be in preparing state, which requires an EV to already be connected. On OCPP 2.0.1 and 2.1 the station first sends Authorize and starts the transaction only if the CSMS answers Accepted; create the station with authorizeLocalStart set to false, or set AuthCtrlr.Enabled to false with SetVariables, to skip that step. An EVSE takes one transaction at a time: on OCPP 2.0.1 and 2.1 the start is refused with 409 while the EVSE already has a running transaction or another start is waiting, and when the connector is Faulted or Unavailable. Nothing is opened and the connector keeps its status. The moment a transaction starts follows TxCtrlr.TxStartPoint (the station's own value is Authorized): with EVConnected,Authorized a plugged-in EV has already started a transaction and the station authorizes it by itself; if that Authorize was refused or got no answer, this call gives the waiting transaction its token. A transaction that started before any EV was plugged in ends with trigger reason EVConnectTimeout when no cable comes within TxCtrlr.EVConnectionTimeOut seconds (30 by default).",
        "tags": [
          "v2"
        ],
        "parameters": [
          {
            "name": "cb_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Charging station id (chargebox id).",
            "example": "CP-001"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "connectorId": {
                    "type": "integer"
                  },
                  "idTag": {
                    "type": "string"
                  }
                },
                "required": [
                  "connectorId"
                ]
              },
              "example": {
                "connectorId": 1
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Started. On OCPP 1.6, a currently-disconnected station returns a negative placeholder transactionId until the CSMS assigns the real one on reconnect.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TransactionStarted"
                },
                "example": {
                  "transactionId": 1
                }
              }
            }
          },
          "400": {
            "description": "EV not yet connected or connector not ready. On OCPP 2.0.1 and 2.1 the CSMS answered Authorize with a status other than Accepted (authorizationStatus holds it; allowedEvseIds lists the EVSEs it accepted the token for, if any).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                },
                "example": {
                  "error": "Authorize was not accepted: Blocked",
                  "authorizationStatus": "Blocked"
                }
              }
            }
          },
          "404": {
            "description": "Not found.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                },
                "example": {
                  "error": "Simulator CP-001 not found"
                }
              }
            }
          },
          "409": {
            "description": "Nothing was started. On every protocol: the CSMS has not accepted the station (it answered the BootNotification with Pending or Rejected; registrationStatus says which, null while the first answer is missing), and the station sends nothing else until it does. On OCPP 2.0.1 and 2.1 also: another start on the same EVSE is still waiting for the Authorize answer, a transaction is already running on the EVSE (runningTransactionId names it), the connector is Faulted or Unavailable (connectorStatus says which), or TxStartPoint has no Authorized and no EV is plugged in. Also 409, with connectionStatus connecting and a Retry-After header, while the station is still connecting to the CSMS.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before calling again.",
                "schema": {
                  "type": "integer"
                },
                "example": 2
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                },
                "example": {
                  "error": "A start is already in progress on this EVSE"
                }
              }
            }
          },
          "502": {
            "description": "OCPP 2.0.1 and 2.1 only: the CSMS did not answer Authorize (the call waits up to 10 seconds).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                },
                "example": {
                  "error": "The CSMS did not answer Authorize (TimeoutError). Fix the CSMS, or delete this station and create it again with authorizeLocalStart set to false. Your CSMS can also send SetVariables with AuthCtrlr.Enabled=false."
                }
              }
            }
          },
          "503": {
            "description": "Station is offline and its message queue is full; the transaction was deliberately not started.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                },
                "example": {
                  "error": "Simulator CP-001 is offline and its message queue is full"
                }
              }
            }
          }
        }
      }
    },
    "/v2/cs/{cb_id}/transactions/{transaction_id}": {
      "delete": {
        "operationId": "stopTransactionV2",
        "summary": "Transaction Stop",
        "description": "Stop an active charging transaction. The transaction id is in the URL path. On OCPP 2.0.1 and 2.1, TxCtrlr.TxStopPoint decides what a stop ends: with the station's own value (Authorized,EVConnected) the transaction ends with one Ended event; with EVConnected alone only the authorization ends (an Updated event) and the transaction ends when the EV is unplugged or when you stop it again. A suspended transaction ends with this call like any other: one Ended event with trigger reason StopAuthorized and the token. That covers a transaction suspended by an unplug with StopTxOnEVSideDisconnect false, and one suspended because your CSMS refused its token with StopTxOnInvalidId false. This call presents no token; to present one, use Transaction Stop with a Token. On OCPP 2.0.1 and 2.1 the call answers once your CSMS has answered the Ended event or sent a CALLERROR. If your CSMS does not answer, the transaction ends at the station after 30 seconds, and the call itself may time out with a 504. If earlier events of the station are still waiting for their answers, the Ended goes after them, and the call waits for those answers too. If your CSMS did not accept the event, the station sends it again in the background, as MessageAttempts and MessageAttemptInterval say, and the call does not wait for that.",
        "tags": [
          "v2"
        ],
        "parameters": [
          {
            "name": "cb_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Charging station id (chargebox id).",
            "example": "CP-001"
          },
          {
            "name": "transaction_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "description": "Transaction id returned by Transaction Start.",
            "example": 1
          }
        ],
        "responses": {
          "200": {
            "description": "Stopped.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {}
              }
            }
          },
          "400": {
            "description": "Already stopped.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                },
                "example": {
                  "error": "Transaction not found or already stopped"
                }
              }
            }
          },
          "404": {
            "description": "Not found.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                },
                "example": {
                  "error": "Simulator CP-001 not found"
                }
              }
            }
          },
          "409": {
            "description": "The station was created but has not connected to the CSMS yet. Wait for the Retry-After header (seconds) and call again. A station that stays unreachable keeps answering 409 until it is deleted. A station paused for the daily message allowance answers 409 with a quotaPause object and no Retry-After header.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before calling again.",
                "schema": {
                  "type": "integer"
                },
                "example": 2
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                },
                "example": {
                  "error": "Simulator CP-001 is still connecting to the CSMS. Try again in a few seconds. If it stays this way, check that the CSMS address is reachable.",
                  "connectionStatus": "connecting"
                }
              }
            }
          }
        }
      }
    },
    "/v2/cs/{cb_id}/transactions/{transaction_id}/stop": {
      "post": {
        "operationId": "stopTransactionWithTokenV2",
        "summary": "Transaction Stop with a Token",
        "description": "OCPP 2.0.1 and 2.1 only. Present a token at the station to stop a running transaction, as a driver does with a card. The token that started the transaction stops it, and the station does not ask your CSMS first. Any other token makes the station send Authorize; if your CSMS accepts it and returns the same groupIdToken it returned for the token that started the transaction, the transaction stops, and otherwise the station sends nothing more and the transaction keeps running. When it stops, the event has trigger reason StopAuthorized and carries the token that was presented. The station learns the group of the starting token from your CSMS: from the Authorize answer when it authorized the start, or from the answer to the TransactionEvent that carried the token. TxCtrlr.TxStopPoint decides what the stop ends, as for the DELETE call. Any token other than the starting one costs two messages (the Authorize and its answer) against the daily allowance, even when the transaction does not stop.",
        "tags": [
          "v2"
        ],
        "parameters": [
          {
            "name": "cb_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Charging station id (chargebox id).",
            "example": "CP-001"
          },
          {
            "name": "transaction_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "description": "Transaction id returned by Transaction Start.",
            "example": 1
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "idTag": {
                    "type": "string"
                  }
                },
                "required": [
                  "idTag"
                ]
              },
              "example": {
                "idTag": "TAG-B"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Stopped.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {}
              }
            }
          },
          "400": {
            "description": "Nothing was stopped: the idTag is missing or too long, the transaction does not exist or already stopped, your CSMS did not accept the token (authorizationStatus says which status it gave; allowedEvseIds lists the EVSEs when it accepted the token only for other ones), or it accepted the token without naming the group of the token that started the transaction. The transaction keeps running.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                },
                "example": {
                  "error": "TAG-B is not the token that started transaction 3f1c and the CSMS did not name the same group for it (idTokenInfo.groupIdToken): the transaction keeps running",
                  "authorizationStatus": "Accepted"
                }
              }
            }
          },
          "404": {
            "description": "Not found.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                },
                "example": {
                  "error": "Simulator CP-001 not found"
                }
              }
            }
          },
          "409": {
            "description": "The transaction holds no token (its authorization already ended, or it started at the cable), so there is nothing for a token to stop. Start it with a token to authorize it again, or stop it with the DELETE call. Also 409, with connectionStatus connecting and a Retry-After header, while the station is still connecting to the CSMS.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before calling again.",
                "schema": {
                  "type": "integer"
                },
                "example": 2
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                },
                "example": {
                  "error": "Transaction 3f1c holds no token (its authorization already ended, or it started at the cable): there is nothing for a token to stop."
                }
              }
            }
          },
          "502": {
            "description": "Your CSMS did not answer Authorize for the token (the call waits up to 10 seconds), or the station is offline. The transaction keeps running.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                },
                "example": {
                  "error": "Authorize for TAG-B got no usable answer (TimeoutError): without it the station cannot tell whether the token is in the group of the one that started the transaction, so the transaction keeps running."
                }
              }
            }
          }
        }
      }
    },
    "/v2/cs/{cb_id}/fault": {
      "post": {
        "operationId": "setFaultV2",
        "summary": "Error Set",
        "description": "Put a connector into a faulted state by setting an OCPP error code. A transaction running on that connector ends with the fault, and the connector stays Faulted until you clear it with Error Reset.",
        "tags": [
          "v2"
        ],
        "parameters": [
          {
            "name": "cb_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Charging station id (chargebox id).",
            "example": "CP-001"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "connectorId": {
                    "type": "integer"
                  },
                  "errorCode": {
                    "type": "string"
                  }
                },
                "required": [
                  "connectorId",
                  "errorCode"
                ]
              },
              "example": {
                "connectorId": 1,
                "errorCode": "GroundFailure"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {}
              }
            }
          },
          "400": {
            "description": "Invalid error code.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                },
                "example": {
                  "error": "Invalid errorCode: xyz"
                }
              }
            }
          },
          "404": {
            "description": "Not found.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                },
                "example": {
                  "error": "Simulator CP-001 not found"
                }
              }
            }
          },
          "409": {
            "description": "The station was created but has not connected to the CSMS yet. Wait for the Retry-After header (seconds) and call again. A station that stays unreachable keeps answering 409 until it is deleted. A station paused for the daily message allowance answers 409 with a quotaPause object and no Retry-After header.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before calling again.",
                "schema": {
                  "type": "integer"
                },
                "example": 2
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                },
                "example": {
                  "error": "Simulator CP-001 is still connecting to the CSMS. Try again in a few seconds. If it stays this way, check that the CSMS address is reachable.",
                  "connectionStatus": "connecting"
                }
              }
            }
          }
        }
      }
    },
    "/v2/cs/{cb_id}/fault/{connector_id}": {
      "delete": {
        "operationId": "resetFaultV2",
        "summary": "Error Reset",
        "description": "Clear a faulted connector, returning it to normal operation. The connector id is in the URL path. On OCPP 2.0.1 and 2.1 the connector then reports Occupied if an EV is still plugged into it, and Available if not (Unavailable when a change to Inoperative was waiting for a transaction, Reserved instead of Available while the EVSE has a reservation). On OCPP 1.6 it reports Available, and then Preparing again if an EV is still plugged in.",
        "tags": [
          "v2"
        ],
        "parameters": [
          {
            "name": "cb_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Charging station id (chargebox id).",
            "example": "CP-001"
          },
          {
            "name": "connector_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "description": "Connector number on the station.",
            "example": 1
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {}
              }
            }
          },
          "400": {
            "description": "Connector not in a faulted state.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                },
                "example": {
                  "error": "Connector not in a faulted state"
                }
              }
            }
          },
          "404": {
            "description": "Not found.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                },
                "example": {
                  "error": "Simulator CP-001 not found"
                }
              }
            }
          },
          "409": {
            "description": "The station was created but has not connected to the CSMS yet. Wait for the Retry-After header (seconds) and call again. A station that stays unreachable keeps answering 409 until it is deleted. A station paused for the daily message allowance answers 409 with a quotaPause object and no Retry-After header.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before calling again.",
                "schema": {
                  "type": "integer"
                },
                "example": 2
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                },
                "example": {
                  "error": "Simulator CP-001 is still connecting to the CSMS. Try again in a few seconds. If it stays this way, check that the CSMS address is reachable.",
                  "connectionStatus": "connecting"
                }
              }
            }
          }
        }
      }
    },
    "/v2/cs/{cb_id}/security-event": {
      "post": {
        "operationId": "securityEventV2",
        "summary": "Security Event",
        "description": "Make the station send an OCPP 1.6 SecurityEventNotification. Security events are reported by the station itself, so there is no CSMS command that triggers one.",
        "tags": [
          "v2"
        ],
        "parameters": [
          {
            "name": "cb_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Charging station id (chargebox id).",
            "example": "CP-001"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string"
                  },
                  "techInfo": {
                    "type": "string"
                  }
                },
                "required": [
                  "type"
                ]
              },
              "example": {
                "type": "TamperDetectionActivated",
                "techInfo": "enclosure sensor 3"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {}
              }
            }
          },
          "400": {
            "description": "Missing/invalid type.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                },
                "example": {
                  "error": "type is required and must be a non-empty string"
                }
              }
            }
          },
          "404": {
            "description": "Not found.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                },
                "example": {
                  "error": "Simulator CP-001 not found"
                }
              }
            }
          },
          "409": {
            "description": "The station was created but has not connected to the CSMS yet. Wait for the Retry-After header (seconds) and call again. A station that stays unreachable keeps answering 409 until it is deleted. A station paused for the daily message allowance answers 409 with a quotaPause object and no Retry-After header.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before calling again.",
                "schema": {
                  "type": "integer"
                },
                "example": 2
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                },
                "example": {
                  "error": "Simulator CP-001 is still connecting to the CSMS. Try again in a few seconds. If it stays this way, check that the CSMS address is reachable.",
                  "connectionStatus": "connecting"
                }
              }
            }
          }
        }
      }
    },
    "/v2/cs/{cb_id}/network/disconnect": {
      "post": {
        "operationId": "networkDisconnectV2",
        "summary": "Network Disconnect",
        "description": "Drop the WebSocket connection immediately. With a duration the station reconnects once it has passed; without one it stays offline until network/connect is called. The station keeps running while disconnected: meters advance, connector status changes, and transaction messages are queued for delivery in order once the connection returns.",
        "tags": [
          "v2"
        ],
        "parameters": [
          {
            "name": "cb_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Charging station id (chargebox id).",
            "example": "CP-001"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "duration": {
                    "type": "integer"
                  }
                }
              },
              "example": {
                "duration": 30
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {}
              }
            }
          },
          "404": {
            "description": "Not found.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                },
                "example": {
                  "error": "Simulator CP-001 not found"
                }
              }
            }
          },
          "409": {
            "description": "Already disconnected. Also 409, with connectionStatus connecting and a Retry-After header, while the station is still connecting to the CSMS.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before calling again.",
                "schema": {
                  "type": "integer"
                },
                "example": 2
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                },
                "example": {
                  "error": "Simulator CP-001 is already disconnected"
                }
              }
            }
          }
        }
      }
    },
    "/v2/cs/{cb_id}/network/connect": {
      "post": {
        "operationId": "networkConnectV2",
        "summary": "Network Connect",
        "description": "Trigger an immediate reconnect attempt: the station connects to its CSMS now instead of waiting for a disconnect duration to pass, and delivers the transaction messages it queued while offline. Poll Get Charging Station Info until network.connected is true. Answers 409 if the station is already connected.",
        "tags": [
          "v2"
        ],
        "parameters": [
          {
            "name": "cb_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Charging station id (chargebox id).",
            "example": "CP-001"
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {}
              }
            }
          },
          "404": {
            "description": "Not found.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                },
                "example": {
                  "error": "Simulator CP-001 not found"
                }
              }
            }
          },
          "409": {
            "description": "Already connected. Also 409, with connectionStatus connecting and a Retry-After header, while the station is still connecting to the CSMS.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before calling again.",
                "schema": {
                  "type": "integer"
                },
                "example": 2
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                },
                "example": {
                  "error": "Simulator CP-001 is already connected"
                }
              }
            }
          }
        }
      }
    },
    "/v2/cs/{cb_id}/network/power-loss": {
      "post": {
        "operationId": "powerLossV2",
        "summary": "Power Loss",
        "description": "Simulate a power cut: every active transaction is stopped with reason PowerLoss, then the station goes offline indefinitely. Use Network Connect to bring it back.",
        "tags": [
          "v2"
        ],
        "parameters": [
          {
            "name": "cb_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Charging station id (chargebox id).",
            "example": "CP-001"
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {}
              }
            }
          },
          "404": {
            "description": "Not found.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                },
                "example": {
                  "error": "Simulator CP-001 not found"
                }
              }
            }
          },
          "409": {
            "description": "Already disconnected. Also 409, with connectionStatus connecting and a Retry-After header, while the station is still connecting to the CSMS.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before calling again.",
                "schema": {
                  "type": "integer"
                },
                "example": 2
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                },
                "example": {
                  "error": "Simulator CP-001 is already disconnected"
                }
              }
            }
          }
        }
      }
    },
    "/v2/ev/{ev_id}": {
      "put": {
        "operationId": "createElectricVehicleV2",
        "summary": "Create Electric Vehicle",
        "description": "Create a new virtual electric vehicle with a battery capacity, a starting state of charge and AC and DC power limits. It is not plugged in until you connect it to a station. Answers 409 if the id already exists.",
        "tags": [
          "v2"
        ],
        "parameters": [
          {
            "name": "ev_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Electric vehicle id.",
            "example": "EV-01"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "batteryCapacity": {
                    "type": "number"
                  },
                  "initialSoc": {
                    "type": "number",
                    "default": 0
                  },
                  "enableAutoDischarge": {
                    "type": "boolean",
                    "default": true
                  },
                  "idTag": {
                    "type": "string"
                  },
                  "maxAcPowerKw": {
                    "type": "number",
                    "default": 11
                  },
                  "maxDcPowerKw": {
                    "type": "number",
                    "default": 90
                  }
                },
                "required": [
                  "batteryCapacity"
                ]
              },
              "example": {
                "batteryCapacity": 60
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IdResult"
                },
                "example": {
                  "id": "EV-01"
                }
              }
            }
          },
          "409": {
            "description": "Already exists.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                },
                "example": {
                  "error": "EV-01 exists"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      },
      "get": {
        "operationId": "getElectricVehicleV2",
        "summary": "Get Electric Vehicle Info",
        "description": "Retrieve the current state of a virtual EV, including SOC and connection status. connectedCbId/connectedConnectorId are null when the EV is not connected.",
        "tags": [
          "v2"
        ],
        "parameters": [
          {
            "name": "ev_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Electric vehicle id.",
            "example": "EV-01"
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ElectricVehicleInfo"
                },
                "example": {
                  "id": "EV-01",
                  "soc": 42.5,
                  "capacityWh": 60000,
                  "connectedCbId": "CP-001",
                  "connectedConnectorId": 1,
                  "autoDischarge": true,
                  "idTag": "ABC123",
                  "maxAcPowerKw": 11,
                  "maxDcPowerKw": 90
                }
              }
            }
          },
          "404": {
            "description": "Not found.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                },
                "example": {
                  "error": "No active EV found with ev_id: EV-01"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "deleteElectricVehicleV2",
        "summary": "Delete Electric Vehicle",
        "description": "Remove a virtual EV. If connected to a station, it is automatically disconnected first.",
        "tags": [
          "v2"
        ],
        "parameters": [
          {
            "name": "ev_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Electric vehicle id.",
            "example": "EV-01"
          }
        ],
        "responses": {
          "200": {
            "description": "Deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IdResult"
                },
                "example": {
                  "id": "EV-01"
                }
              }
            }
          },
          "404": {
            "description": "Not found.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                },
                "example": {
                  "error": "EV-01 not found"
                }
              }
            }
          }
        }
      }
    },
    "/v2/ev/{ev_id}/connection": {
      "post": {
        "operationId": "connectElectricVehicleV2",
        "summary": "Connect Electric Vehicle",
        "description": "Plug the EV into a connector on a charging station. The connector transitions to preparing state asynchronously.",
        "tags": [
          "v2"
        ],
        "parameters": [
          {
            "name": "ev_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Electric vehicle id.",
            "example": "EV-01"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "cbId": {
                    "type": "string"
                  },
                  "connectorId": {
                    "type": "integer"
                  }
                },
                "required": [
                  "cbId",
                  "connectorId"
                ]
              },
              "example": {
                "cbId": "CP-001",
                "connectorId": 1
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {}
              }
            }
          },
          "404": {
            "description": "EV or station not found.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                },
                "example": {
                  "error": "EV-01 not found"
                }
              }
            }
          },
          "409": {
            "description": "Already connected. Also 409, with connectionStatus connecting and a Retry-After header, while the station is still connecting to the CSMS.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before calling again.",
                "schema": {
                  "type": "integer"
                },
                "example": 2
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                },
                "example": {
                  "error": "EV-01 is already connected"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "disconnectElectricVehicleV2",
        "summary": "Disconnect Electric Vehicle",
        "description": "Unplug the EV from its current connector. The EV stays and can be connected again, to this or another station. No request body. On OCPP 2.0.1 and 2.1, a running transaction on that connector ends with an Ended event, unless your CSMS set StopTxOnEVSideDisconnect to false. Then the transaction stays open, the station sends an Updated event with chargingState SuspendedEV, and connecting the EV again resumes it.",
        "tags": [
          "v2"
        ],
        "parameters": [
          {
            "name": "ev_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Electric vehicle id.",
            "example": "EV-01"
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {}
              }
            }
          },
          "404": {
            "description": "Not found.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                },
                "example": {
                  "error": "EV-01 not found"
                }
              }
            }
          }
        }
      }
    },
    "/v2/ev/{ev_id}/discharge": {
      "post": {
        "operationId": "dischargeElectricVehicleV2",
        "summary": "Discharge Electric Vehicle",
        "description": "Manually remove energy from the EV's battery, lowering its state of charge.",
        "tags": [
          "v2"
        ],
        "parameters": [
          {
            "name": "ev_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Electric vehicle id.",
            "example": "EV-01"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "power": {
                    "type": "number"
                  }
                },
                "required": [
                  "power"
                ]
              },
              "example": {
                "power": 5000
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {}
              }
            }
          },
          "404": {
            "description": "Not found.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                },
                "example": {
                  "error": "EV-01 not found"
                }
              }
            }
          }
        }
      }
    },
    "/v2/csms": {
      "put": {
        "operationId": "createCsmsInstance",
        "summary": "Create CSMS Instance",
        "description": "Provision your account's own hosted Central System (CSMS) instance that speaks OCPP 1.6, 2.0.1 and 2.1 -- the reverse direction from every /cs endpoint above: a real or simulated chargepoint dials IN to SimItNow's own CSMS. Idempotent. A new instance is public, so a chargepoint can connect to your address right away; call this to get your connection details or to switch modes.",
        "tags": [
          "v2"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "public": {
                    "type": "boolean"
                  }
                }
              },
              "example": {
                "public": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CsmsInstance"
                },
                "example": {
                  "csmsId": "AbCdEf0123456789",
                  "wsHost": "csms.simitnow.com",
                  "public": true,
                  "connectionLimit": 20
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      },
      "get": {
        "operationId": "getCsmsInstance",
        "summary": "Get CSMS Instance Info",
        "description": "Read your CSMS instance's current mode, its connection limit (null when there is none), and how many connections are live against it.",
        "tags": [
          "v2"
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CsmsInstance"
                },
                "example": {
                  "csmsId": "AbCdEf0123456789",
                  "wsHost": "csms.simitnow.com",
                  "public": true,
                  "connectionLimit": 20,
                  "activeConnections": 2
                }
              }
            }
          },
          "404": {
            "description": "Not provisioned yet.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                },
                "example": {
                  "error": "No CSMS instance provisioned yet"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      },
      "delete": {
        "operationId": "clearCsmsInstance",
        "summary": "Clear CSMS Instance",
        "description": "Remove every chargepoint registered under your CSMS instance. Does not change csmsId, connection host, or public/private mode. While the instance is public, clearing it does not stop chargepoints connecting.",
        "tags": [
          "v2"
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "deleted": 3
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      }
    },
    "/v2/csms/cp/{cb_id}": {
      "put": {
        "operationId": "registerChargepoint",
        "summary": "Register Chargepoint",
        "description": "Add a chargepoint to your CSMS instance's allow-list. Returns a one-time HTTP Basic Auth password and the full wss:// connection URL -- the password is shown only once and cannot be recovered afterward. Only works in private mode: a new instance is public and registering is rejected (409) while it is, so switch first with PUT /v2/csms and {\"public\": false}. Deliberately v2-only: no v1 equivalent.",
        "tags": [
          "v2"
        ],
        "parameters": [
          {
            "name": "cb_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Charging station id (chargebox id).",
            "example": "CP-001"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "displayName": {
                    "type": "string"
                  }
                },
                "required": [
                  "displayName"
                ]
              },
              "example": {
                "displayName": "Test Rig 1"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "cbId": "CP-001",
                  "displayName": "Test Rig 1",
                  "password": "s3cr3t-shown-once",
                  "wsUrl": "wss://csms.simitnow.com/ocpp/AbCdEf0123456789/CP-001"
                }
              }
            }
          },
          "400": {
            "description": "Missing displayName.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                },
                "example": {
                  "error": "displayName is required"
                }
              }
            }
          },
          "409": {
            "description": "Already registered, or the instance is in public mode (no allow-list).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                },
                "example": {
                  "error": "Chargepoint CP-001 is already registered for this account"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      },
      "delete": {
        "operationId": "deleteChargepoint",
        "summary": "Delete Chargepoint",
        "description": "Remove a chargepoint from the allow-list. Config-only: an already-connected session is not force-disconnected -- it ends the next time that chargepoint reconnects and its credentials no longer resolve. While your instance is public, deleting a chargepoint does not stop it connecting; switch to private to enforce the allow-list.",
        "tags": [
          "v2"
        ],
        "parameters": [
          {
            "name": "cb_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Charging station id (chargebox id).",
            "example": "CP-001"
          }
        ],
        "responses": {
          "200": {
            "description": "Deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "id": "CP-001"
                }
              }
            }
          },
          "404": {
            "description": "Not found.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                },
                "example": {
                  "error": "Chargepoint CP-001 not found"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      }
    },
    "/v1/cs/create/{cb_id}": {
      "post": {
        "operationId": "createChargingStationV1",
        "summary": "Create Charging Station (v1)",
        "description": "Same parameters as v2, except iccid and imsi, which only v2 takes. This is the endpoint to build against today; v2 is still in beta. The call answers before the station has connected to the CSMS: until the connection is up, calls that name the station answer 409 with connectionStatus connecting and a Retry-After header.",
        "tags": [
          "v1"
        ],
        "parameters": [
          {
            "name": "cb_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Charging station id (chargebox id).",
            "example": "CP-001"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "csmsUrl": {
                    "type": "string"
                  },
                  "protocol": {
                    "type": "string",
                    "enum": [
                      "ocpp1.6",
                      "ocpp2.0.1",
                      "ocpp2.1"
                    ]
                  },
                  "power": {
                    "type": "number",
                    "default": 22
                  },
                  "efficiency": {
                    "type": "number",
                    "default": 1.0
                  },
                  "connectorCount": {
                    "type": "integer",
                    "default": 1
                  },
                  "evseCount": {
                    "type": "integer"
                  },
                  "connectorsPerEvse": {
                    "type": "integer",
                    "default": 1
                  },
                  "chargepointType": {
                    "type": "string",
                    "default": "DC",
                    "enum": [
                      "AC",
                      "DC"
                    ]
                  },
                  "reconnectWaitTimeInSeconds": {
                    "type": "integer",
                    "default": 5
                  },
                  "isStable": {
                    "type": "boolean",
                    "default": true
                  },
                  "initialMeterValue": {
                    "type": "number",
                    "default": 0
                  },
                  "waitTimeBeforeStartStop": {
                    "type": "integer",
                    "default": 5
                  },
                  "emulateRemoteStartFailsToStartCharging": {
                    "type": "boolean",
                    "default": false
                  },
                  "emulateRemoteStartRejected": {
                    "type": "boolean",
                    "default": false
                  },
                  "authorizeLocalStart": {
                    "type": "boolean",
                    "default": true
                  },
                  "useCommaInMeterValues": {
                    "type": "boolean",
                    "default": false
                  },
                  "sendEmptyMeterValues": {
                    "type": "boolean",
                    "default": false
                  },
                  "security": {
                    "type": "object"
                  }
                },
                "required": [
                  "csmsUrl",
                  "protocol"
                ]
              },
              "example": {
                "csmsUrl": "ws://your-csms:9000",
                "protocol": "ocpp1.6"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Created.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "result": "Simulator CP-001 is created"
                }
              }
            }
          },
          "400": {
            "description": "Unsupported protocol, an invalid/conflicting security profile, or an authorizeLocalStart that is not true or false.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                },
                "example": {
                  "error": "authorizeLocalStart must be true or false"
                }
              }
            }
          },
          "409": {
            "description": "Already exists.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                },
                "example": {
                  "error": "Simulator CP-001 exists"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      }
    },
    "/v1/cs/info/{cb_id}": {
      "get": {
        "operationId": "getChargingStationV1",
        "summary": "Get Charging Station Info (v1)",
        "description": "Retrieve configuration and connector state of a running station.",
        "tags": [
          "v1"
        ],
        "parameters": [
          {
            "name": "cb_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Charging station id (chargebox id).",
            "example": "CP-001"
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChargingStationInfo"
                },
                "example": {
                  "config": {},
                  "connector": {
                    "1": {
                      "id": 1,
                      "status": "Available",
                      "error_code": "NoError",
                      "status_sent": true
                    }
                  },
                  "network": {
                    "connected": true,
                    "queuedMessages": 0
                  }
                }
              }
            }
          },
          "404": {
            "description": "Not found.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                },
                "example": {
                  "error": "Simulator CP-001 not found"
                }
              }
            }
          },
          "409": {
            "description": "The station was created but has not connected to the CSMS yet. Wait for the Retry-After header (seconds) and call again. A station that stays unreachable keeps answering 409 until it is deleted. A station paused for the daily message allowance answers 409 with a quotaPause object and no Retry-After header.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before calling again.",
                "schema": {
                  "type": "integer"
                },
                "example": 2
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                },
                "example": {
                  "error": "Simulator CP-001 is still connecting to the CSMS. Try again in a few seconds. If it stays this way, check that the CSMS address is reachable.",
                  "connectionStatus": "connecting"
                }
              }
            }
          }
        }
      }
    },
    "/v1/cs/delete/{cb_id}": {
      "post": {
        "operationId": "deleteChargingStationV1",
        "summary": "Delete Charging Station (v1)",
        "description": "Stop and remove a simulated charging station. It disconnects from the CSMS and stops counting toward your station limit.",
        "tags": [
          "v1"
        ],
        "parameters": [
          {
            "name": "cb_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Charging station id (chargebox id).",
            "example": "CP-001"
          }
        ],
        "responses": {
          "200": {
            "description": "Deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "result": "Simulator CP-001 is deleted"
                }
              }
            }
          },
          "404": {
            "description": "Not found.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                },
                "example": {
                  "error": "Simulator CP-001 not found"
                }
              }
            }
          }
        }
      }
    },
    "/v1/cs/transaction/start/{cb_id}": {
      "post": {
        "operationId": "startTransactionV1",
        "summary": "Transaction Start (v1)",
        "description": "Start a charging transaction on a connector. On OCPP 2.0.1 and 2.1 the station first sends Authorize; when the CSMS does not accept it the answer is still 200 with result False, plus error and authorizationStatus fields. A start refused because the EVSE already has a transaction, because the connector is Faulted or Unavailable, or because TxStartPoint has no Authorized and no EV is plugged in, is answered the same way with error and runningTransactionId or connectorStatus where they apply. So is a start on a station the CSMS has not accepted yet (BootNotification answered Pending or Rejected), with registrationStatus.",
        "tags": [
          "v1"
        ],
        "parameters": [
          {
            "name": "cb_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Charging station id (chargebox id).",
            "example": "CP-001"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "connectorId": {
                    "type": "integer"
                  },
                  "idTag": {
                    "type": "string"
                  }
                },
                "required": [
                  "connectorId"
                ]
              },
              "example": {
                "connectorId": 1
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Started.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "result": "True",
                  "transaction_id": 1
                }
              }
            }
          },
          "400": {
            "description": "Connector not ready.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                },
                "example": {
                  "error": "Connector not in preparing state"
                }
              }
            }
          },
          "409": {
            "description": "The station was created but has not connected to the CSMS yet. Wait for the Retry-After header (seconds) and call again. A station that stays unreachable keeps answering 409 until it is deleted. A station paused for the daily message allowance answers 409 with a quotaPause object and no Retry-After header.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before calling again.",
                "schema": {
                  "type": "integer"
                },
                "example": 2
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                },
                "example": {
                  "error": "Simulator CP-001 is still connecting to the CSMS. Try again in a few seconds. If it stays this way, check that the CSMS address is reachable.",
                  "connectionStatus": "connecting"
                }
              }
            }
          }
        }
      }
    },
    "/v1/cs/transaction/stop/{cb_id}": {
      "post": {
        "operationId": "stopTransactionV1",
        "summary": "Transaction Stop (v1)",
        "description": "Stop an active charging transaction. The transaction id goes in the request body. This triggers StopTransaction to the CSMS. On an OCPP 2.0.1 or 2.1 station, an idTag in the body presents that token at the station, as Transaction Stop with a Token does in v2; when the token does not stop the transaction the answer is 200 with result False, an error that says why and, when your CSMS answered, its authorizationStatus. An OCPP 1.6 station ignores idTag.",
        "tags": [
          "v1"
        ],
        "parameters": [
          {
            "name": "cb_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Charging station id (chargebox id).",
            "example": "CP-001"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "transactionId": {
                    "type": "integer"
                  },
                  "idTag": {
                    "type": "string"
                  }
                },
                "required": [
                  "transactionId"
                ]
              },
              "example": {
                "transactionId": 1
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Stopped, or (with an idTag) the token did not stop it: result is then False.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "result": "True"
                }
              }
            }
          },
          "400": {
            "description": "Already stopped.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                },
                "example": {
                  "error": "Transaction not found or already stopped"
                }
              }
            }
          },
          "409": {
            "description": "The station was created but has not connected to the CSMS yet. Wait for the Retry-After header (seconds) and call again. A station that stays unreachable keeps answering 409 until it is deleted. A station paused for the daily message allowance answers 409 with a quotaPause object and no Retry-After header.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before calling again.",
                "schema": {
                  "type": "integer"
                },
                "example": 2
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                },
                "example": {
                  "error": "Simulator CP-001 is still connecting to the CSMS. Try again in a few seconds. If it stays this way, check that the CSMS address is reachable.",
                  "connectionStatus": "connecting"
                }
              }
            }
          }
        }
      }
    },
    "/v1/cs/error/set/{cb_id}": {
      "post": {
        "operationId": "setFaultV1",
        "summary": "Error Set (v1)",
        "description": "Put a connector into a faulted state by setting an OCPP error code. A transaction running on that connector ends with the fault, as in the v2 Error Set operation.",
        "tags": [
          "v1"
        ],
        "parameters": [
          {
            "name": "cb_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Charging station id (chargebox id).",
            "example": "CP-001"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "connectorId": {
                    "type": "integer"
                  },
                  "errorCode": {
                    "type": "string"
                  }
                },
                "required": [
                  "connectorId",
                  "errorCode"
                ]
              },
              "example": {
                "connectorId": 1,
                "errorCode": "HighTemperature"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {}
              }
            }
          },
          "409": {
            "description": "The station was created but has not connected to the CSMS yet. Wait for the Retry-After header (seconds) and call again. A station that stays unreachable keeps answering 409 until it is deleted. A station paused for the daily message allowance answers 409 with a quotaPause object and no Retry-After header.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before calling again.",
                "schema": {
                  "type": "integer"
                },
                "example": 2
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                },
                "example": {
                  "error": "Simulator CP-001 is still connecting to the CSMS. Try again in a few seconds. If it stays this way, check that the CSMS address is reachable.",
                  "connectionStatus": "connecting"
                }
              }
            }
          }
        }
      }
    },
    "/v1/cs/error/reset/{cb_id}": {
      "post": {
        "operationId": "resetFaultV1",
        "summary": "Error Reset (v1)",
        "description": "Clear a faulted connector. The connector id goes in the request body. On OCPP 1.6 the connector reports Available, and then Preparing again if an EV is still plugged in. On OCPP 2.0.1 and 2.1 it reports Occupied if an EV is still plugged into it, and Available if not.",
        "tags": [
          "v1"
        ],
        "parameters": [
          {
            "name": "cb_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Charging station id (chargebox id).",
            "example": "CP-001"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "connectorId": {
                    "type": "integer"
                  }
                },
                "required": [
                  "connectorId"
                ]
              },
              "example": {
                "connectorId": 1
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {}
              }
            }
          },
          "409": {
            "description": "The station was created but has not connected to the CSMS yet. Wait for the Retry-After header (seconds) and call again. A station that stays unreachable keeps answering 409 until it is deleted. A station paused for the daily message allowance answers 409 with a quotaPause object and no Retry-After header.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before calling again.",
                "schema": {
                  "type": "integer"
                },
                "example": 2
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                },
                "example": {
                  "error": "Simulator CP-001 is still connecting to the CSMS. Try again in a few seconds. If it stays this way, check that the CSMS address is reachable.",
                  "connectionStatus": "connecting"
                }
              }
            }
          }
        }
      }
    },
    "/v1/cs/security_event/{cb_id}": {
      "post": {
        "operationId": "securityEventV1",
        "summary": "Security Event (v1)",
        "description": "Make the station send an OCPP 1.6 SecurityEventNotification.",
        "tags": [
          "v1"
        ],
        "parameters": [
          {
            "name": "cb_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Charging station id (chargebox id).",
            "example": "CP-001"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string"
                  },
                  "techInfo": {
                    "type": "string"
                  }
                },
                "required": [
                  "type"
                ]
              },
              "example": {
                "type": "TamperDetectionActivated",
                "techInfo": "enclosure sensor 3"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {}
              }
            }
          },
          "409": {
            "description": "The station was created but has not connected to the CSMS yet. Wait for the Retry-After header (seconds) and call again. A station that stays unreachable keeps answering 409 until it is deleted. A station paused for the daily message allowance answers 409 with a quotaPause object and no Retry-After header.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before calling again.",
                "schema": {
                  "type": "integer"
                },
                "example": 2
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                },
                "example": {
                  "error": "Simulator CP-001 is still connecting to the CSMS. Try again in a few seconds. If it stays this way, check that the CSMS address is reachable.",
                  "connectionStatus": "connecting"
                }
              }
            }
          }
        }
      }
    },
    "/v1/cs/network/disconnect/{cb_id}": {
      "post": {
        "operationId": "networkDisconnectV1",
        "summary": "Network Disconnect (v1)",
        "description": "Drop the WebSocket connection immediately. With a duration in seconds the station reconnects once it has passed; without one it stays offline until you call Network Connect. The station keeps running while disconnected.",
        "tags": [
          "v1"
        ],
        "parameters": [
          {
            "name": "cb_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Charging station id (chargebox id).",
            "example": "CP-001"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "duration": {
                    "type": "integer"
                  }
                }
              },
              "example": {
                "duration": 30
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {}
              }
            }
          },
          "409": {
            "description": "The station was created but has not connected to the CSMS yet. Wait for the Retry-After header (seconds) and call again. A station that stays unreachable keeps answering 409 until it is deleted. A station paused for the daily message allowance answers 409 with a quotaPause object and no Retry-After header.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before calling again.",
                "schema": {
                  "type": "integer"
                },
                "example": 2
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                },
                "example": {
                  "error": "Simulator CP-001 is still connecting to the CSMS. Try again in a few seconds. If it stays this way, check that the CSMS address is reachable.",
                  "connectionStatus": "connecting"
                }
              }
            }
          }
        }
      }
    },
    "/v1/cs/network/connect/{cb_id}": {
      "post": {
        "operationId": "networkConnectV1",
        "summary": "Network Connect (v1)",
        "description": "Trigger an immediate reconnect attempt: the station connects to its CSMS now instead of waiting for a disconnect duration to pass, and delivers the transaction messages it queued while offline. Poll Get Charging Station Info until network.connected is true.",
        "tags": [
          "v1"
        ],
        "parameters": [
          {
            "name": "cb_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Charging station id (chargebox id).",
            "example": "CP-001"
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {}
              }
            }
          },
          "409": {
            "description": "The station was created but has not connected to the CSMS yet. Wait for the Retry-After header (seconds) and call again. A station that stays unreachable keeps answering 409 until it is deleted. A station paused for the daily message allowance answers 409 with a quotaPause object and no Retry-After header.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before calling again.",
                "schema": {
                  "type": "integer"
                },
                "example": 2
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                },
                "example": {
                  "error": "Simulator CP-001 is still connecting to the CSMS. Try again in a few seconds. If it stays this way, check that the CSMS address is reachable.",
                  "connectionStatus": "connecting"
                }
              }
            }
          }
        }
      }
    },
    "/v1/ev/create/{ev_id}": {
      "post": {
        "operationId": "createElectricVehicleV1",
        "summary": "Create Electric Vehicle (v1)",
        "description": "Create a virtual electric vehicle. The parameters are the same as in v2 Create Electric Vehicle.",
        "tags": [
          "v1"
        ],
        "parameters": [
          {
            "name": "ev_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Electric vehicle id.",
            "example": "EV-01"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "batteryCapacity": {
                    "type": "number"
                  },
                  "initialSoc": {
                    "type": "number",
                    "default": 0
                  },
                  "enableAutoDischarge": {
                    "type": "boolean",
                    "default": true
                  },
                  "idTag": {
                    "type": "string"
                  },
                  "maxAcPowerKw": {
                    "type": "number",
                    "default": 11
                  },
                  "maxDcPowerKw": {
                    "type": "number",
                    "default": 90
                  }
                },
                "required": [
                  "batteryCapacity"
                ]
              },
              "example": {
                "batteryCapacity": 60
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Created.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "result": "Created EV-01"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      }
    },
    "/v1/ev/info/{ev_id}": {
      "get": {
        "operationId": "getElectricVehicleV1",
        "summary": "Get Electric Vehicle Info (v1)",
        "description": "Retrieve the current state of a virtual EV, including its state of charge and the connector it is plugged into.",
        "tags": [
          "v1"
        ],
        "parameters": [
          {
            "name": "ev_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Electric vehicle id.",
            "example": "EV-01"
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ElectricVehicleInfo"
                },
                "example": {
                  "id": "EV-01",
                  "soc": 42.5,
                  "capacityWh": 60000
                }
              }
            }
          }
        }
      }
    },
    "/v1/ev/delete/{ev_id}": {
      "post": {
        "operationId": "deleteElectricVehicleV1",
        "summary": "Delete Electric Vehicle (v1)",
        "description": "Remove a virtual EV. If it is connected to a station it is disconnected first.",
        "tags": [
          "v1"
        ],
        "parameters": [
          {
            "name": "ev_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Electric vehicle id.",
            "example": "EV-01"
          }
        ],
        "responses": {
          "200": {
            "description": "Deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "result": "Deleted EV-01"
                }
              }
            }
          }
        }
      }
    },
    "/v1/ev/connect/{ev_id}": {
      "post": {
        "operationId": "connectElectricVehicleV1",
        "summary": "Connect Electric Vehicle (v1)",
        "description": "Plug an EV into a connector of a station. The connector changes to Preparing a moment later: poll Get Charging Station Info before starting a transaction.",
        "tags": [
          "v1"
        ],
        "parameters": [
          {
            "name": "ev_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Electric vehicle id.",
            "example": "EV-01"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "cbId": {
                    "type": "string"
                  },
                  "connectorId": {
                    "type": "integer"
                  }
                },
                "required": [
                  "cbId",
                  "connectorId"
                ]
              },
              "example": {
                "cbId": "CP-001",
                "connectorId": 1
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "result": "EV-01 is connected to CP-001 connector 1"
                }
              }
            }
          },
          "409": {
            "description": "The station was created but has not connected to the CSMS yet. Wait for the Retry-After header (seconds) and call again. A station that stays unreachable keeps answering 409 until it is deleted. A station paused for the daily message allowance answers 409 with a quotaPause object and no Retry-After header.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before calling again.",
                "schema": {
                  "type": "integer"
                },
                "example": 2
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                },
                "example": {
                  "error": "Simulator CP-001 is still connecting to the CSMS. Try again in a few seconds. If it stays this way, check that the CSMS address is reachable.",
                  "connectionStatus": "connecting"
                }
              }
            }
          }
        }
      }
    },
    "/v1/ev/disconnect/{ev_id}": {
      "post": {
        "operationId": "disconnectElectricVehicleV1",
        "summary": "Disconnect Electric Vehicle (v1)",
        "description": "Unplug the EV from its current connector. The EV stays and can be connected again, to this or another station. No request body. On OCPP 2.0.1 and 2.1, a running transaction on that connector ends with an Ended event, unless your CSMS set StopTxOnEVSideDisconnect to false. Then the transaction stays open, the station sends an Updated event with chargingState SuspendedEV, and connecting the EV again resumes it.",
        "tags": [
          "v1"
        ],
        "parameters": [
          {
            "name": "ev_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Electric vehicle id.",
            "example": "EV-01"
          }
        ],
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "result": "EV-01 is disconnected from CP-001 connector 1"
                }
              }
            }
          }
        }
      }
    },
    "/v1/ev/discharge/{ev_id}": {
      "post": {
        "operationId": "dischargeElectricVehicleV1",
        "summary": "Discharge Electric Vehicle (v1)",
        "description": "Manually remove energy from the EV battery, lowering its state of charge. The amount is the power field of the request body.",
        "tags": [
          "v1"
        ],
        "parameters": [
          {
            "name": "ev_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Electric vehicle id.",
            "example": "EV-01"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "power": {
                    "type": "number"
                  }
                },
                "required": [
                  "power"
                ]
              },
              "example": {
                "power": 5000
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {}
              }
            }
          }
        }
      }
    }
  }
}