Skip to content
Get started

Add Media Item (Photo)

POST/mediaitem

Submit a photo for a specific charging location

Body ParametersJSONExpand Collapse
chargePointID: number

ID value for the OCM site (POI) this image relates to.

imageDataBase64: string

BASE64 encoded data

minLength1
comment: optional string

Optional description of image or context

minLength1
ReturnsExpand Collapse
status: string

status code OK

description: optional string

Add Media Item (Photo)

curl https://api.openchargemap.io/v3/mediaitem \
    -H 'Content-Type: application/json' \
    -H "Authorization: Bearer $OCM_USERNAME" \
    -d '{
          "chargePointID": 1234,
          "imageDataBase64": "data:image/jpeg;base64,<BASE64_ENCODED_DATA>"
        }'
{
  "status": "OK",
  "description": "OK"
}
Returns Examples
{
  "status": "OK",
  "description": "OK"
}