Deals

Get the deal's unread and unanswered counts

GET/deals/{deal_id}/unread-counts

Returns four counts for one deal. questions_with_unread_replies counts questions with a live reply that the user did not write and has not marked read; marks are set with the question read-state route. unanswered_questions counts live questions with no live reply; deleted replies are not answers. unsettled_enquiries counts live enquiries not yet settled. unread_feedback counts live feedback not marked read; the flag is shared, so it is deal-wide, not per user. The first three are for the acting user. Entrepreneur acting users get zeros for questions and enquiries unless the deal delegates them; feedback is always counted. These differ from the platform screens' manager-wide counts.

Path parameters

  • deal_idstring (uuid)Required#

    The deal's id, a uuid. An unknown deal, or one the token can't see, returns 404.

Responses

200

The counts.

DealUnreadCounts
{
  "data": {
    "questions_with_unread_replies": 2,
    "unanswered_questions": 5,
    "unsettled_enquiries": 1,
    "unread_feedback": 4
  }
}
401

Authentication failed. error.code is one of invalid_token, expired, revoked.

Error
403

Authorization failed. error.code is one of org_disabled, ip_blocked, missing_scope, scope_disabled, user_disabled.

Error
404

Resource not found (error.code = not_found).

Error
429

Rate limit exceeded (error.code = rate_limited).

Error

Examples

curl https://your-org-domain/kong/core/api/v2/deals/{deal_id}/unread-counts\
  -H "Authorization: Bearer $HELM_API_KEY"\
  -H "Content-Type: application/json"