Entity reference · v1
objectives
OBJ-NNNNNNtable objectivessoft deleteOKR objectives.
Objectives are the top of the OKR tree: a time-framed goal with a status, an owner, its key results underneath, and the initiatives that serve it. This page covers the one field whose semantics are not obvious from the table below.
The initiative list
initiative_ids is an array of initiative ids (uuids), stored on the objective itself rather than in a junction table, so it is written like any other field: pass the whole list on POST or PATCH, or in fields of create_objectives, update_objectives or update_entities over MCP.
curl -X PATCH 'https://productos.ca/api/v1/objectives/OBJ-000003' \
-H "Authorization: Bearer $TOKEN" \
-H 'content-type: application/json' \
-d '{"initiative_ids": ["3f1c2e6a-9b0d-4c7e-8a5f-2d1b0c9e8f7a"]}'The write checks the list before anything is saved:
- every id must be a live initiative in your workspace. An unknown id, a trashed initiative or one from another workspace fails the whole request with
422 validation_failed; the message lists the offending ids anddetails.missingcarries them as an array - an element that is not a uuid fails with
422naming the element; sequence ids such asINIT-000042are not accepted here, resolve them first withGET /api/v1/initiatives/INIT-000042 - duplicates are dropped and ids are stored lowercase, so the value you read back may differ from the one you sent
[]clears the list, and so doesnull
Import and export
The Objectives tab of the export workbook carries the same links as a Linked Initiatives column: initiative titles, semicolon-separated. On import the titles resolve against the Initiatives tab of the same file (or the workspace's existing initiatives), and a title that matches nothing drops that one link rather than failing the row.
Related
Endpoints
/api/v1/objectives/api/v1/objectives/api/v1/objectives/{id}/api/v1/objectives/{id}/api/v1/objectives/{id}/api/v1/objectives/{id}/restoreWritable fields
* required on create. PATCH treats every field as optional.
| Field | Type | Constraints | Notes |
|---|---|---|---|
| title* | string | ||
| description | text | ||
| time_frame | string | ||
| status | string | active | completed | cancelled | |
| owner | string | ||
| initiative_ids | uuid[] | The initiatives that serve this objective, as initiative ids. Every id must be a live initiative in this workspace; duplicates are dropped and [] clears the list. | |
| sort_order | integer | ||
| is_draft | boolean | ||
| metadata | json |
Listing & filtering
- Pagination:
?limit=50&offset=0· max limit 200 - Default sort:
?sort=sort_order&order=asc - Sortable fields: created_at · updated_at · sort_order · title · id_number
- Search (?q=): title, description
- Filters: ?status= ?time_frame= , repeat any filter to OR multiple values
- Trash: hidden by default; pass
?include_deleted=true
Examples
curl 'https://productos.ca/api/v1/objectives?limit=10' \
-H "Authorization: Bearer $TOKEN"Try it out
Paste a token and hit a real endpoint. The request goes from your browser straight to /api/v1/objectives. The token is held in this page only for the request and is never stored.
Issue tokens in Settings → API tokens. Token never leaves this page.
GET/api/v1/objectives?limit=3