Notification Templates
5 API calls in this section.
List Notification Templates
/system/notification-templatesBrowse notification templates used by the system’s notification flows.
Query parameters
| Parameter | Type | Description |
|---|---|---|
page | string | Example: |
limit | string | Example: |
searchOptional | string | — |
Headers
| Parameter | Type | Description |
|---|---|---|
Authorization | string | Example: |
1curl --globoff --request GET "https://staging-api.ondi.io/functions/v1/system/notification-templates?page=1&limit=50" \2 --header "Authorization: Bearer ${ONDI_ACCESS_TOKEN}"Response examples
1{2 "success": true,3 "templates": [4 {5 "id": "uuid",6 "key": "assignment_accepted",7 "channels": [8 "in_app",9 "push"10 ],11 "title_template": "Delivery accepted",12 "body_template": "{{driverName}} accepted delivery #{{deliveryCode}}.",13 "variables": [14 "driverName",15 "deliveryCode"16 ],17 "actions": {18 "dispatcher": {19 "target": "internal",20 "path": "/operations/deliveries/{{deliveryId}}"21 }22 },23 "is_active": true,24 "updated_at": "2026-04-03T12:00:00Z"25 }26 ],27 "total": 42,28 "page": 1,29 "limit": 5030}Get Notification Template
/system/notification-templates/assignment_acceptedRead one notification template, including its declared variables and portal actions.
Headers
| Parameter | Type | Description |
|---|---|---|
Authorization | string | Example: |
1curl --globoff --request GET "https://staging-api.ondi.io/functions/v1/system/notification-templates/assignment_accepted" \2 --header "Authorization: Bearer ${ONDI_ACCESS_TOKEN}"Response examples
1{2 "success": true,3 "template": {4 "id": "uuid",5 "key": "assignment_accepted",6 "channels": [7 "in_app",8 "push"9 ],10 "title_template": "Delivery accepted",11 "body_template": "{{driverName}} accepted delivery #{{deliveryCode}}.",12 "variables": [13 "driverName",14 "deliveryCode",15 "deliveryId"16 ],17 "actions": {18 "dispatcher": {19 "target": "internal",20 "path": "/operations/deliveries/{{deliveryId}}"21 },22 "driver_app": {23 "target": "internal",24 "path": "/driver/deliveries/{{deliveryId}}"25 }26 },27 "is_active": true,28 "engine": "handlebars",29 "tenant_id": null30 }31}Upsert Portal Action
/system/notification-templates/assignment_accepted/actionsAs a system administrator, replace one portal’s notification navigation action while preserving actions for other portals. Paths may reference only variables already declared by the template.
Headers
| Parameter | Type | Description |
|---|---|---|
Authorization | string | Example: |
Content-Type | string | Example: |
Body parameters
| Parameter | Type | Description |
|---|---|---|
portal | string | — |
target | string | — |
path | string | — |
1curl --globoff --request PATCH "https://staging-api.ondi.io/functions/v1/system/notification-templates/assignment_accepted/actions" \2 --header "Authorization: Bearer ${ONDI_ACCESS_TOKEN}" \3 --header "Content-Type: application/json" \4 --data-raw '{5 "portal": "dispatcher",6 "target": "internal",7 "path": "/operations/deliveries/{{deliveryId}}"8}'Replace {{placeholders}} with your own values before sending.
Response examples
1{2 "success": true,3 "actions": {4 "dispatcher": {5 "target": "internal",6 "path": "/operations/deliveries/{{deliveryId}}"7 }8 }9}Delete Portal Action
/system/notification-templates/assignment_accepted/actions/dispatcherAs a system administrator, remove one portal’s navigation action from a notification template. Other portal actions remain unchanged.
Headers
| Parameter | Type | Description |
|---|---|---|
Authorization | string | Example: |
1curl --globoff --request DELETE "https://staging-api.ondi.io/functions/v1/system/notification-templates/assignment_accepted/actions/dispatcher" \2 --header "Authorization: Bearer ${ONDI_ACCESS_TOKEN}"Response examples
1{2 "success": true,3 "actions": null4}Update Template Variables
/system/notification-templates/assignment_accepted/variablesAs a system administrator, replace a notification template’s declared variable list. Variables still referenced by the title, body or action paths cannot be removed.
Headers
| Parameter | Type | Description |
|---|---|---|
Authorization | string | Example: |
Content-Type | string | Example: |
Body parameters
| Parameter | Type | Description |
|---|---|---|
variables | array<string> | — |
1curl --globoff --request PATCH "https://staging-api.ondi.io/functions/v1/system/notification-templates/assignment_accepted/variables" \2 --header "Authorization: Bearer ${ONDI_ACCESS_TOKEN}" \3 --header "Content-Type: application/json" \4 --data-raw '{5 "variables": [6 "driverName",7 "deliveryCode",8 "deliveryId"9 ]10}'Response examples
1{2 "success": true,3 "variables": [4 "driverName",5 "deliveryCode",6 "deliveryId"7 ]8}