Skip to main content

Comment on Quote

This PUT API allows you to add or update a comment on an existing quote. This can be useful for documenting changes or providing additional context during a business transaction.

Endpoint Details

  • URL: /quote/comment/{quote_id}
  • Method: PUT
  • Authentication: Bearer Token (required)

Path Parameters

ParameterTypeDescription
quote_idstringThe unique identifier of the quote to comment on.

Authentication

You must provide a valid accessToken in the request headers to authenticate and access this endpoint.

Authentication Headers

HeaderTypeDescription
Content-TypestringMust be set to application/json.
accessTokenstringA valid access token is required.

Request Body

The request body should be in JSON format and must include the details for the comment:

FieldTypeDescription
companystringThe unique identifier of the company associated with the quote.
customerstringThe unique identifier of the customer related to the quote.
commentstringThe text content of the comment to be added or updated.
commentIdstringThe unique identifier of the comment to be updated (if applicable).

Sample Request Body

{
"company": "65ba028af764f931f1c7c18b",
"customer": "66d07121db294e0b70180bf6",
"comment": "Agreed terms after discussion.",
"commentId": "66fb9ddfac1453f825712ca3"
}

Response

Success Response

Status CodeDescription
200 OKThe request was successful, and the comment was added or updated.

Success Response Body Structure

FieldTypeDescription
successbooleanIndicates if the request was successful.
messagestringMessage indicating the result of the operation.
dataobjectContains the updated details of the quote, including comments.

Sample Response Body

{
"success": true,
"message": "Quote updated Successfully",
"data": {
"id": "7323abc1648b4f3a8dfd7e23",
"company": "65ba028af764f931f1c7c18b",
"customer": "66d07121db294e0b70180bf6",
"comments": [
{
"commentId": "66fb9ddfac1453f825712ca3",
"text": "Agreed terms after discussion.",
"createdAt": "2024-01-10T12:00:00Z",
"updatedAt": "2024-01-15T14:00:00Z"
}
]
}
}

Error Responses

Status CodeDescription
400 Bad RequestInvalid request format or missing data.
401 UnauthorizedInvalid or missing access token.
403 ForbiddenAccess denied.
404 Not FoundQuote or comment not found.
500 Internal Server ErrorServer encountered an error.

Notes

  • Ensure that the quote_id in the URL corresponds to the actual ID of the quote you wish to comment on.
  • Include all necessary fields in the request body to avoid validation errors.
  • A valid access token is necessary for authentication to successfully add or update the comment on the quote.