Skip to main content

Stop a charge

Description#

This endpoint is used to stop a running charge. The charge can either a local charge or a remote.

Request format#

Method: POST

Endpoint: https://dev.api.thor.tools/latest/integration/charges/stop

Body format: JSON

KeyTypeDescription
chargeboxStringThe unique chargebox identifier.
connectorIntegerThe connector where you want to start the charge.
id_tagStringThe identifier that the chargebox used to start a transaction.
transactionIntegerThe transaction progressive returned by the Start charge request from Thor. This field is optional.

Request schema:

{
"$schema": "http://json-schema.org/draft-04/schema",
"id": "http://example.com/example.json",
"type": "object",
"title": "The root schema",
"description": "The root schema comprises the entire JSON document.",
"default": {},
"required": [
"chargebox",
"connector",
"id_tag"
],
"properties": {
"chargebox": {
"id": "http://example.com/properties/chargebox",
"type": "string",
"title": "The chargebox schema",
"description": "The chargebox identifier.",
"default": ""
},
"connector": {
"id": "http://example.com/properties/connector",
"type": "integer",
"title": "The connector schema",
"description": "The connector where you want to stop the transaction.",
"default": 0
},
"id_tag": {
"id": "http://example.com/properties/id_tag",
"type": "string",
"title": "The id_tag schema",
"description": "The unlock id_tag.",
"default": ""
},
"transaction": {
"id": "http://example.com/properties/transaction",
"type": "integer",
"title": "The transaction schema",
"description": "The transaction progressive.",
"default": 0
}
},
"additionalProperties": true
}

Response format#

The response doesn't conain any field, but if it has an HTTP status code 200 - OK, it means that the request was sent to the chargebox.

Error response#

The following errors are returned if something went wrong while processing the request:

HTTP status codeMessageDescription
400ConnectorNotValidThe connector value is lesser than or equal to zero.
400NotInTransactionThe given connector of the given chargebox is currently not involved in a transaction.
400WrongTransactionThe id_tag or transaction (if given) field is not valid.
403APIKeyNotFoundAn invalid API key was given in the header of the request.
403RestAPINotEnabledREST API integration is set as disabled in the administration dashboard.
403InvalidSourceIPAddrThe request comes from an IP address that is different from the one given in the REST API integration configuration.
404ChargeboxNotFoundNo chargebox with the give identifier was found.
500InternalServerErrorSomething unexpected went wrong while executing the request.