Update Goal
PATCH
Updates an active Goal with a revision precondition. Completing or canceling it requires a terminal reason.
header
AuthorizationBearer <token>A signed-in SMB user's access token. Workspace-scoped operations also require SMB-Workspace-Id.
goal_id*stringStable Goal ID.
Match
^gol_[0-7][0-9A-HJKMNP-TV-Z]{25}$SMB-Workspace-Id*stringWorkspace where this operation runs. Required for user tokens and Workspace API keys.
Format
uuidIdempotency-Key*stringLength
8 <= length <= 200application/json- body
expected_revision*integerRange
1 <= valueroom_id?stringMust match the goal's Room.
Match
^rom_[0-7][0-9A-HJKMNP-TV-Z]{25}$title?stringLength
1 <= length <= 300description?|Length
length <= 10000accountable_user_id?|Match
^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$due_at?|Format
date-timestatus?stringValue in
"completed""canceled"terminal_reason?|Length
length <= 4000Successful authorized response.
application/json- response
data*receipt*idempotent_replay*smb_v0_operations_create_list_request.__local.properties.body.__schema16request_id*stringcurl -X PATCH 'https://example.com/v1/goals/string' \ -H 'SMB-Workspace-Id: 497f6eca-6276-4993-bfeb-53cbbbba6f08' \ -H 'Idempotency-Key: stringst' \ -H 'Content-Type: application/json' \ -d '{ "expected_revision": 1}'{ "data": { "goal_id": "string", "business_id": "string", "room_id": "string", "title": "string", "description": "string", "status": "active", "accountable_user_id": "string", "due_at": "2019-08-24T14:15:22Z", "terminal_reason": "string", "completed_at": "2019-08-24T14:15:22Z", "canceled_at": "2019-08-24T14:15:22Z", "created_by": { "type": "user", "id": "string" }, "revision": 1, "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z" }, "receipt": { "receipt_id": "64d0a161-468e-472a-b00e-a06ee9ab7de7", "command_id": "7d510d78-7444-4252-aeac-9e473949661e", "operation": "string", "workspace_id": "0967198e-ec7b-4c6b-b4d3-f71244cadbe9" }, "idempotent_replay": true, "request_id": "string"}