Skip to main content

Comment on Quote

Adds a comment to a quote on behalf of a customer. To reply to an existing comment, include its commentId.

HTTP Request​

  • URL: /quote/comment/{id}
  • Method: PUT
  • Headers:
    • accessToken: Required. Your API access token.
    • Content-Type: application/json
  • Required scope: READ_WRITE_QUOTE

Path Parameters​

ParameterTypeDescription
idStringRequired. The ID of the quote to comment on.

Request Body​

The request body must be JSON and contain the following fields:

FieldTypeRequiredDescription
customerStringYesID of the customer writing the comment.
commentStringYesText of the comment.
commentIdStringNoID of an existing comment. The new comment is added as a reply to it.

cURL Example​

curl --location --request PUT '<BASE_URL>/quote/comment/6720f3c1a8b4e21f9c3d5a10' \
--header 'accessToken: <ACCESS_TOKEN>' \
--header 'Content-Type: application/json' \
--data '{
"customer": "66d07121db294e0b70180bf6",
"commentId": "6720f3c1a8b4e21f9c3d5a13",
"comment": "Lead time of two weeks works for us."
}'

Response​

  • 200 OK: The comment was added successfully.
  • 400 Bad Request: The access token is missing or invalid, does not have the required scope, the request body is not valid, or the quote was not found.

Sample JSON Response​

{
"success": true,
"message": "Quote Comment Successfully",
"data": {
"_id": "6720f3c1a8b4e21f9c3d5a10",
"id": "6720f3c1a8b4e21f9c3d5a10",
"quoteId": 1042,
"title": "Q4 Restock Quote",
"status": "negotiated",
"comments": [
{
"_id": "6720f3c1a8b4e21f9c3d5a13",
"id": "6720f3c1a8b4e21f9c3d5a13",
"name": "ERP Integration",
"comment": "Please confirm lead time.",
"isCustomer": false,
"customer": null,
"user": "66d07121db294e0b70180bf6",
"replies": [
{
"_id": "6721c4f2e5a1b73d8f0c2a40",
"name": "Dana Whitfield",
"comment": "Lead time of two weeks works for us.",
"isCustomer": false,
"customer": "66d07121db294e0b70180bf6",
"user": null,
"createdAt": "2024-10-30T12:53:06.348Z",
"updatedAt": "2024-10-30T12:53:06.348Z"
}
],
"createdAt": "2024-10-29T14:02:09.512Z",
"updatedAt": "2024-10-30T12:53:06.348Z"
}
],
"createdAt": "2024-10-29T14:02:09.512Z",
"updatedAt": "2024-10-30T12:53:06.352Z"
}
}

Response Details​

FieldTypeDescription
successBooleanWhether the request was successful.
messageStringResult message.
dataObjectThe updated quote.

Comment Data​

FieldTypeDescription
idStringUnique identifier of the comment.
nameStringName of the person who wrote the comment.
commentStringText of the comment.
isCustomerBooleanWhether the comment was written by a customer.
customerStringID of the customer who wrote the comment, if any.
repliesArrayReplies to the comment, with the same fields.
createdAtStringDate and time the comment was added (ISO 8601).
updatedAtStringDate and time the comment was last updated (ISO 8601).

Other quote fields are described in Get Single Quote.