Using the API

๐Ÿ”Œ Charge Point Sensors API

๐Ÿ—๏ธ Creating a Charge Point Sensor

To create a new charge point sensor, send a POST request to:

POST /api/v1/charge-point-sensors

๐Ÿ“ฅ Request Body (JSON):

{
  "chargePointId": 1,
  "type": "occupancy",
  "externalId": "externalid-1234",
  "partnerExternalId": "yourinternalid-1234",
  "value": "true",
  "valueUpdatedAt": "2025-09-10T20:23:44Z"
}

๐Ÿ“ค Response (201 Created):

{
  "id": 166,
  "type": "occupancy",
  "operatorId": 1,
  "chargePointId": 1,
  "externalId": "externalid-1234",
  "partnerExternalId": "yourinternalid-1234",
  "value": "true",
  "valueUpdatedAt": null,
  "createdAt": "2025-02-17T14:34:23Z",
  "updatedAt": "2025-02-17T14:34:52Z",
  "deletedAt": null
}

๐Ÿ”„ Updating a Charge Point Sensor

To update an existing charge point sensor, send a PATCH request to:

PATCH /api/v1/charge-point-sensors/{sensor_id}

๐Ÿ“ฅ Request Body (JSON):

{
    "value": "false",
    "valueUpdatedAt": "2025-09-14T20:23:45Z"
}

๐Ÿ“ค Response (200 OK):

{
  "id": 166,
  "type": "occupancy",
  "operatorId": 1,
  "chargePointId": 1,
  "externalId": "externalid-1234",
  "partnerExternalId": "yourinternalid-1234",
  "value": "false",
  "valueUpdatedAt": "2025-09-14T20:23:45Z",
  "createdAt": "2025-02-17T14:34:23Z",
  "updatedAt": "2025-02-17T14:34:52Z",
  "deletedAt": null
}

๐Ÿ—‘๏ธ Deleting a Charge Point Sensor

To remove a charge point sensor, send a DELETE request to:

DELETE /api/v1/charge-point-sensors/{sensor_id}

๐Ÿ“ค Response (204 No Content):

โœ… No response body, indicating successful deletion.


Did this page help you?