Beam Help
Get help now

How-to · Zoho DESK

How to retrieve a contract comment in Zoho Desk

Fetch a specific comment on a contract record using the API.

Retrieving a specific comment from a contract in Zoho Desk's Contracts API requires a straightforward GET request using both the contract's ID and the comment's ID. Here's everything you need to make it work correctly.


Why this matters


When building integrations or automations around contract collaboration, you may need to surface a particular comment — for example, to display approver feedback in a downstream system or audit a specific annotation. Rather than pulling every comment on a contract and filtering client-side, the dedicated single-comment endpoint lets you fetch exactly what you need in one call. This keeps payloads lean and your integration logic clean.


Step-by-step


Step 1. Confirm you have both identifiers ready before making any API call. You will need the contractId (the unique identifier for the contract record) and the commentId (the unique identifier for the specific comment you want to retrieve). If you are unsure of the commentId, you can first call the list endpoint — GET /api/v1/contracts/{contractId}/comments — to obtain all comments on a given contract and locate the one you need. [4]


Step 2. Construct your request to the single-comment endpoint. The operation is named getcontractcomment and targets the following path: [2]


GET /api/v1/contracts/{contractId}/comments/{commentId}

Replace {contractId} and {commentId} with the actual values for your record.


Step 3. Pass any optional query parameters via the p dictionary argument if your implementation requires them. The endpoint accepts an optional p parameter alongside the two path parameters. [2]


Step 4. If you are working in Python, the call follows this pattern — note that self.c.request handles the underlying HTTP transport: [2]


def get_contract_comment(self, contractId: str, commentId: str, p: dict = None):
    """Get Contract Comment"""
    return self.c.request("GET", f"/api/v1/contracts/{contractId}/comments/{commentId}", p, None)

Invoke this method with your resolved IDs and inspect the returned object for the comment content, author, and timestamp.


Step 5. Validate the response. A successful call will return the comment data for the specified record. If you receive a 404 or similar error, double-check that the commentId actually belongs to the contractId you supplied — comments are scoped to their parent contract. [2]


Common pitfalls


  • Mismatched IDs: Passing a commentId that belongs to a different contract will result in an error. Always verify the parent–child relationship between the contract and the comment before calling the endpoint. [2]
  • Missing collaborator association: Keep in mind that comments in Zoho Contracts are tied to users who are associated with the document (such as collaborators or approvers). If a comment was left by a user who has since been removed, the comment data may still be retrievable via the API, but context around the author could be limited. [1]
  • Listing before fetching: If you do not already know the commentId, skipping the list step (GET /api/v1/contracts/{contractId}/comments) and guessing IDs will waste API calls. Always list first, then retrieve. [4]

What to check


  • Both IDs are valid and correctly paired — confirm the commentId exists within the specified contractId by running the list endpoint first if needed. [4]
  • Authentication and permissions are in place — ensure the API credentials you are using have access to the contract in question, particularly if the contract is in a restricted department or approval stage. [2]
  • The response payload contains expected fields — after a successful call, verify that the returned comment object includes the data your integration depends on (e.g., comment text, author, timestamp) before passing it downstream. [2]

---


*Beam Help is an independent expert support resource for Zoho products and is not official Zoho support. For billing or account-level issues, please contact Zoho directly.*

Sources cited

  1. [1] What's new in Zoho Contracts?
  2. [2] GET /api/v1/contracts/{contractId}/comments/{commentId}
  3. [3] Introducing New APIs and Updates
  4. [4] GET /api/v1/contracts/{contractId}/comments
  5. [5] What's New
  6. [6] Upgrade your contract lifecycle management with Zoho Contracts 2.0!