Update Agreement
PUT /v1/agreement/:id
Updates an existing agreement record. Validates input, applies changes, and returns the updated agreement with all fields including timestamps and metadata.
Request Body
{
"content": {
"en": {
"title": "Updated Agreement",
"description": "Updated terms and conditions.",
"body": "{\"blocks\":[{\"key\":\"a1b2c\",\"text\":\"Updated agreement content.\",\"type\":\"unstyled\",\"depth\":0,\"inlineStyleRanges\":[],\"entityRanges\":[],\"data\":{}}],\"entityMap\":{}}"
}
},
"active": true,
"reconsent": false
}
Response Example
{
"_id": "agreement-id-1",
"content": {
"en": {
"title": "Updated Agreement",
"description": "Updated terms and conditions.",
"body": "{\"blocks\":[{\"key\":\"a1b2c\",\"text\":\"Updated agreement content.\",\"type\":\"unstyled\",\"depth\":0,\"inlineStyleRanges\":[],\"entityRanges\":[],\"data\":{}}],\"entityMap\":{}}"
}
},
"services": ["service-id-1", "service-id-2"],
"active": true,
"global": false,
"reconsent": false,
"tenant": "tenant-id-1",
"type": "USER",
"created": "2025-04-02T16:01:45.209Z",
"updated": "2025-11-03T15:35:48.001Z"
}