Update a risk scenario
const url = 'https://api.vendorica.com/v1/risk-scenarios/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0';const options = { method: 'PUT', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"title":"example","description":"example","categoryId":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","riskType":["confidentiality"],"inherentLikelihood":1,"inherentImpact":1,"residualLikelihood":1,"residualImpact":1,"lifecycleStatus":"open","treatment":"mitigate","treatmentPlan":"example","ownerUserId":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","targetResolutionDate":"2026-04-15","vendorId":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","businessFunctionId":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","controlId":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","businessUnitIds":["2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"],"expectedUpdatedAt":"2026-04-15T12:00:00Z"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url https://api.vendorica.com/v1/risk-scenarios/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0 \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "title": "example", "description": "example", "categoryId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "riskType": [ "confidentiality" ], "inherentLikelihood": 1, "inherentImpact": 1, "residualLikelihood": 1, "residualImpact": 1, "lifecycleStatus": "open", "treatment": "mitigate", "treatmentPlan": "example", "ownerUserId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "targetResolutionDate": "2026-04-15", "vendorId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "businessFunctionId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "controlId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "businessUnitIds": [ "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" ], "expectedUpdatedAt": "2026-04-15T12:00:00Z" }'Patches a scenario’s content. A submitted value that EQUALS the stored one is not a change: a request in which nothing differs writes no row, bumps no updatedAt and files no audit entry. Pass the optional expectedUpdatedAt precondition (ADR-0022) to be refused 409 RECORD_MODIFIED rather than overwrite an edit that landed since you read the record; omitting it is last-write-wins, unchanged. Editing an approved scenario returns it to needs_review and discards its approvals — a decision describes a record, and the record moved. approvalStatus and isArchived are refused: both are transitions with their own endpoints.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Request Bodyrequired
Section titled “Request Bodyrequired”object
Responses
Section titled “Responses”Success
object
object
Example
{ "success": true, "data": { "id": "21101191-9f4b-4a69-8e1d-44de7213632e", "organizationId": "59c6770c-616d-4b0a-883f-7f2b4af536fd", "registerId": "bd3bb052-34f6-4df0-8321-75896aac0cf7", "displayId": "string", "title": "string", "description": "string", "categoryId": "3d623995-38a0-48b5-8ae9-968223b7f4f2", "riskType": [ "confidentiality" ], "inherentLikelihood": 1, "inherentImpact": 1, "residualLikelihood": 1, "residualImpact": 1, "lifecycleStatus": "open", "approvalStatus": "draft", "isArchived": true, "treatment": "mitigate", "treatmentPlan": "string", "ownerUserId": "48f20193-65f8-4743-8623-b9c0ae3d6f8c", "targetResolutionDate": "string", "vendorId": "9b61e63b-d41d-4bbb-8250-92a830d6e4c4", "businessFunctionId": "8f883923-1471-4ef3-8f5b-23d0307966bc", "controlId": "540c8a1c-6dbd-4d3a-8a32-f0bb9d30fcad", "sourceTemplateId": "37896b88-f754-4a3e-86b0-de073b6d7eb9", "businessUnitIds": [ "09f21e56-fc25-4e3c-8e6a-7d2d3aa3078b" ], "createdBy": "fd7d4923-2d3a-4ef3-827e-b3d0217516bc", "createdAt": "2026-08-19T09:41:12.004Z", "updatedAt": "2026-08-19T09:41:12.004Z", "inherentScore": 1, "residualScore": 1 }, "timestamp": "2026-08-19T09:41:12.004Z", "requestId": "req_01J5X8ZC3K4T7Q9M2W6B0N1V4H", "message": "string"}Validation error
object
Example
{ "success": false, "error": "Bad request", "code": "BAD_REQUEST", "timestamp": "2026-08-19T09:41:12.004Z", "requestId": "req_01J5X8ZC3K4T7Q9M2W6B0N1V4H"}Unauthorized
object
Example
{ "success": false, "error": "Unauthorized", "code": "UNAUTHORIZED", "timestamp": "2026-08-19T09:41:12.004Z", "requestId": "req_01J5X8ZC3K4T7Q9M2W6B0N1V4H"}Forbidden — missing scope
object
Example
{ "success": false, "error": "Forbidden", "code": "FORBIDDEN", "timestamp": "2026-08-19T09:41:12.004Z", "requestId": "req_01J5X8ZC3K4T7Q9M2W6B0N1V4H"}No such scenario in this organization
object
Example
{ "success": false, "error": "Resource not found", "code": "NOT_FOUND", "timestamp": "2026-08-19T09:41:12.004Z", "requestId": "req_01J5X8ZC3K4T7Q9M2W6B0N1V4H"}The record changed since expectedUpdatedAt (RECORD_MODIFIED)
object
Example
{ "success": false}Unrecognised or invalid field — the response names it
object
Example
{ "success": false, "error": "Validation failed", "code": "VALIDATION_ERROR", "timestamp": "2026-08-19T09:41:12.004Z", "requestId": "req_01J5X8ZC3K4T7Q9M2W6B0N1V4H"}Rate limit exceeded
object
Example
{ "success": false, "error": "Too many requests", "code": "TOO_MANY_REQUESTS", "timestamp": "2026-08-19T09:41:12.004Z", "requestId": "req_01J5X8ZC3K4T7Q9M2W6B0N1V4H"}