Skip to content

Order Comment API

Comments are an integral part of the Bolt restaurant orders API.
Each comment instance represents additional information or notes recorded for a specific order in the system.

A Comment model has the following fields:

FieldDescription
bolt_commentThe content of the comment to be associated with the specific order.

Request

The request for adding a comment to an order requires the following fields:

FieldTypeRequiredDescription
bolt_commentstringYesThe content of the comment to be added to the order.

Endpoint

The Order Bolt Comment API allows administrators to add or update comments for a specific order.

Endpoint URL

POST /api/v2/order/{id}/comment

Description

This endpoint is used to add or update a comment for an order identified by its unique id.

Request Method

POST

URL Parameters

ParameterTypeRequiredDescription
idintegerYesThe unique identifier of the order.

Example Request

URL

POST /api/v2/order/12345/comment

JSON Body

{
"bolt_comment": "This is a new comment for the order."
}

Response

The Order Comment API returns the following responses based on the result of the request:

Successful Response

FieldTypeDescription
successboolIndicates whether the operation was successful.

Example Response

{
"success": true
}

Error Response

FieldTypeDescription
messagestringA message indicating the validation failure.
errorsobjectDetails of the fields that failed validation.
{
"message": "Validation failed",
"errors": {
"bolt_comment": "The comment field is required."
}
}

Not Found Response

FieldTypeDescription
successboolIndicates whether the operation was successful.
messagestringA message indicating that the order was not found.
{
"success": false,
"message": "Order not found."
}