Skip to content
Get started

Submit Comment or Checkin

client.comment.submit(CommentSubmitParams { chargePointID, checkinStatusTypeID, comment, 4 more } body, RequestOptionsoptions?): CommentSubmitResponse { description, status }
POST/comment

Submit a user comment or checkin for a specific charging location

ParametersExpand Collapse
body: CommentSubmitParams { chargePointID, checkinStatusTypeID, comment, 4 more }
chargePointID: number

This must be a valid POI ID

checkinStatusTypeID?: number

Optional valid CheckStatusTypeID to indicate overall catgeory and success/failure to use equipment e.g. 10 = Charged Successfully.

comment?: string

This is an optional comment to describe the charging experience, may include guidance for future users.

minLength1
maxLength4000
commentTypeID?: number

This must be a valid Comment Type ID as per UserCommentTypes found in Core Reference Data. If left as null then General Comment will be used.

rating?: number

Optional integer rating between 1 = Worst, 5 = Best.

relatedURL?: string

Optional website URL for related information

minLength1
maxLength500
userName?: string

This is an optional name to associate with the submission, for authenticated users their profile username is used.

minLength1
maxLength100
ReturnsExpand Collapse
CommentSubmitResponse { description, status }
description: string
minLength1
status: string
minLength1

Submit Comment or Checkin

import Ocm from 'ocm-sdk';

const client = new Ocm({
  bearer: process.env['OCM_USERNAME'], // This is the default and can be omitted
});

const response = await client.comment.submit({
  chargePointID: 0,
  comment: 'string',
  rating: 3,
  relatedURL: 'string',
  userName: 'string',
});

console.log(response.description);
{
  "status": "OK",
  "description": "OK"
}
Returns Examples
{
  "status": "OK",
  "description": "OK"
}