Documentation

Years

Get year with full details

Returns a year with all objectives, key results, achievements, and calculated progress

ProductionStagingUAT
GEThttps://ankiren.com/api/me/okr/{yearId}

Parameters

Path Parameters

  • yearIdintegerpathRequired

    OKR year ID

Responses

200 · Year with full nested details

  • yearOkrYearWithObjectives
    • idinteger
    • userIdstring
    • yearinteger

      Calendar year

    • themestring?

      Optional theme for the year

    • status"active" | "completed" | "cancelled"

      Status of the OKR item

    • createdAtstring<date-time>
      format: date-time
    • updatedAtstring<date-time>
      format: date-time
    • objectives[OkrObjectiveWithKeyResults]
    • progressinteger

      Average progress of all objectives

      min: 0max: 100
application/json
{
  "year": {
    "id": 0,
    "userId": "string",
    "year": 0,
    "theme": "string",
    "status": "active",
    "createdAt": "2026-01-01T00:00:00.000Z",
    "updatedAt": "2026-01-01T00:00:00.000Z",
    "objectives": [
      {
        "id": 0,
        "yearId": 0,
        "userId": "string",
        "title": "string",
        "description": "string",
        "quarter": null,
        "sortOrder": 0,
        "status": "active",
        "createdAt": "2026-01-01T00:00:00.000Z",
        "updatedAt": "2026-01-01T00:00:00.000Z",
        "keyResults": [
          {
            "id": 0,
            "objectiveId": 0,
            "userId": "string",
            "title": "string",
            "targetValue": 0,
            "currentValue": 0,
            "unit": "string",
            "sortOrder": 0,
            "status": null,
            "createdAt": "2026-01-01T00:00:00.000Z",
            "updatedAt": "2026-01-01T00:00:00.000Z",
            "achievements": [
              null
            ],
            "progress": 0
          }
        ],
        "progress": 0
      }
    ],
    "progress": 0
  }
}

Sample Code

Đổi ngôn ngữ ở ô Language trên thanh Documentation.

cURL
curl -X GET 'https://ankiren.com/api/me/okr/{yearId}' \
  -H 'Authorization: Bearer <token>' \
  -H 'Accept: application/json'