Skip to main content

Notification Templates

5 API calls in this section.

List Notification Templates​

System Configuration / Notification Templates
GET/system/notification-templates

Browse notification templates used by the system’s notification flows.

Query parameters

ParameterTypeDescription
pagestring

Example: 1

limitstring

Example: 50

searchOptionalstring—

Headers

ParameterTypeDescription
Authorizationstring

Example: Bearer {{access_token}}

Staging
Request
curl
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

200OK
Response body
json
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 Configuration / Notification Templates
GET/system/notification-templates/assignment_accepted

Read one notification template, including its declared variables and portal actions.

Headers

ParameterTypeDescription
Authorizationstring

Example: Bearer {{access_token}}

Staging
Request
curl
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

200OK
Response body
json
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 Configuration / Notification Templates
PATCH/system/notification-templates/assignment_accepted/actions

As 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

ParameterTypeDescription
Authorizationstring

Example: Bearer {{access_token}}

Content-Typestring

Example: application/json

Body parameters

ParameterTypeDescription
portalstring—
targetstring—
pathstring—
Staging
Request
curl
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

200OK
Response body
json
1{2  "success": true,3  "actions": {4    "dispatcher": {5      "target": "internal",6      "path": "/operations/deliveries/{{deliveryId}}"7    }8  }9}

Delete Portal Action​

System Configuration / Notification Templates
DELETE/system/notification-templates/assignment_accepted/actions/dispatcher

As a system administrator, remove one portal’s navigation action from a notification template. Other portal actions remain unchanged.

Headers

ParameterTypeDescription
Authorizationstring

Example: Bearer {{access_token}}

Staging
Request
curl
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

200OK
Response body
json
1{2  "success": true,3  "actions": null4}

Update Template Variables​

System Configuration / Notification Templates
PATCH/system/notification-templates/assignment_accepted/variables

As 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

ParameterTypeDescription
Authorizationstring

Example: Bearer {{access_token}}

Content-Typestring

Example: application/json

Body parameters

ParameterTypeDescription
variablesarray<string>—
Staging
Request
curl
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

200OK
Response body
json
1{2  "success": true,3  "variables": [4    "driverName",5    "deliveryCode",6    "deliveryId"7  ]8}