Get committed hours for an opportunity

GET
/opportunities/{opportunityId}/commitments

The hours each expert has committed to working on this opportunity, from the weekly plan they keep on Terac, as it stands now. One row per expert, keyed by their submission, with the committed blocks that overlap the window and the committed time inside it. Only blocks planned for this opportunity are returned. An expert with nothing committed in the window has no row. Compare with GET /opportunities/{opportunityId}/hours for the hours they tracked.

Authorization<token>

API key as Bearer token: Authorization: Bearer

In: header

Path Parameters

opportunityId*string

ID of the opportunity, as returned by POST /opportunities or GET /opportunities.

Query Parameters

from*string

Start of the window, inclusive: an ISO 8601 UTC timestamp such as 2026-11-30T00:00:00Z, or a bare 2026-11-30 read as midnight UTC. A committed block is returned when any part of it falls in the window.

to*string

End of the window, exclusive, in the same UTC form. At most 62 days after from.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://terac.com/api/external/v2/opportunities/string/commitments?from=string&to=string"
{
  "total_seconds": -9007199254740991,
  "total_hours": 0,
  "data": [
    {
      "submission_id": "string",
      "committed_seconds": -9007199254740991,
      "committed_hours": 0,
      "blocks": [
        {
          "starts_at": "string",
          "ends_at": "string"
        }
      ]
    }
  ]
}
{
  "code": "BAD_REQUEST",
  "message": "Invalid input data",
  "issues": []
}

{
  "error": {
    "code": "UNAUTHORIZED",
    "message": "API key required. Include Authorization: Bearer <key> header."
  }
}

{
  "error": {
    "code": "FORBIDDEN",
    "message": "This account is not permitted to use the API."
  }
}

{
  "code": "NOT_FOUND",
  "message": "Not found",
  "issues": []
}
{
  "error": {
    "code": "RATE_LIMITED",
    "message": "Rate limit exceeded. Retry after 61 seconds."
  }
}
{
  "code": "INTERNAL_SERVER_ERROR",
  "message": "Internal server error",
  "issues": []
}