ProductOSDocs

Entity reference · v1

objectives

OBJ-NNNNNNtable objectivessoft delete

OKR 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 and details.missing carries them as an array
  • an element that is not a uuid fails with 422 naming the element; sequence ids such as INIT-000042 are not accepted here, resolve them first with GET /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 does null

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.

Endpoints

GET/api/v1/objectives
POST/api/v1/objectives
GET/api/v1/objectives/{id}
PATCH/api/v1/objectives/{id}
DELETE/api/v1/objectives/{id}
POST/api/v1/objectives/{id}/restore

Writable fields

* required on create. PATCH treats every field as optional.

FieldTypeConstraintsNotes
title*string
descriptiontext
time_framestring
statusstringactive | completed | cancelled
ownerstring
initiative_idsuuid[]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_orderinteger
is_draftboolean
metadatajson

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

curlbash
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.

Try it out

Issue tokens in Settings → API tokens. Token never leaves this page.

GET/api/v1/objectives?limit=3

Generated from the API's entity configuration. This page is rebuilt on every deploy, so it always matches the live API.