Notification Templates
5 API calls in this section.
List Notification Templates
System Configuration / Notification Templates
GET
/system/notification-templates?page=1&limit=50Send a bearer token in the Authorization header for an authenticated OnDi user session.
Request
curl
1curl --request GET "$ONDI_BASE_URL/system/notification-templates?page=1&limit=50" \2 --header "Authorization: Bearer {{access_token}}"Query parameters
pageOptionalquery string
1
limitOptionalquery string
50
Headers
AuthorizationOptionalheader string
Bearer {{access_token}}
Responses
Success200OK
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_acceptedSend a bearer token in the Authorization header for an authenticated OnDi user session.
Request
curl
1curl --request GET "$ONDI_BASE_URL/system/notification-templates/assignment_accepted" \2 --header "Authorization: Bearer {{access_token}}"Headers
AuthorizationOptionalheader string
Bearer {{access_token}}
Responses
Success200OK
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/actionsSend a bearer token in the Authorization header for an authenticated OnDi user session.
Request
curl
1curl --request PATCH "$ONDI_BASE_URL/system/notification-templates/assignment_accepted/actions" \2 --header "Authorization: Bearer {{access_token}}" \3 --header "Content-Type: application/json" \4 --header "Content-Type: application/json" \5 --data '{6 "portal": "dispatcher",7 "target": "internal",8 "path": "/operations/deliveries/{{deliveryId}}"9}'Request body
json
1{2 "portal": "dispatcher",3 "target": "internal",4 "path": "/operations/deliveries/{{deliveryId}}"5}Request body fields
portalExamplestring
Example field from the request body.
targetExamplestring
Example field from the request body.
pathExamplestring
Example field from the request body.
Headers
AuthorizationOptionalheader string
Bearer {{access_token}}
Content-TypeOptionalheader string
application/json
Responses
Success200OK
Response body
json
1{2 "success": true,3 "actions": {4 "dispatcher": {5 "target": "internal",6 "path": "/operations/deliveries/{{deliveryId}}"7 }8 }9}Error - Undeclared Variable400Bad Request
Response body
json
1{2 "success": false,3 "message": "action_path_contains_undeclared_variables",4 "undeclared_variables": [5 "unknownVar"6 ],7 "declared_variables": [8 "driverName",9 "deliveryCode",10 "deliveryId"11 ]12}Delete Portal Action
System Configuration / Notification Templates
DELETE
/system/notification-templates/assignment_accepted/actions/dispatcherSend a bearer token in the Authorization header for an authenticated OnDi user session.
Request
curl
1curl --request DELETE "$ONDI_BASE_URL/system/notification-templates/assignment_accepted/actions/dispatcher" \2 --header "Authorization: Bearer {{access_token}}"Headers
AuthorizationOptionalheader string
Bearer {{access_token}}
Responses
Success200OK
Response body
json
1{2 "success": true,3 "actions": null4}Update Template Variables
System Configuration / Notification Templates
PATCH
/system/notification-templates/assignment_accepted/variablesSend a bearer token in the Authorization header for an authenticated OnDi user session.
Request
curl
1curl --request PATCH "$ONDI_BASE_URL/system/notification-templates/assignment_accepted/variables" \2 --header "Authorization: Bearer {{access_token}}" \3 --header "Content-Type: application/json" \4 --header "Content-Type: application/json" \5 --data '{6 "variables": [7 "driverName",8 "deliveryCode",9 "deliveryId"10 ]11}'Request body
json
1{2 "variables": [3 "driverName",4 "deliveryCode",5 "deliveryId"6 ]7}Request body fields
variablesExamplearray<string>
Example field from the request body.
Headers
AuthorizationOptionalheader string
Bearer {{access_token}}
Content-TypeOptionalheader string
application/json
Responses
Success200OK
Response body
json
1{2 "success": true,3 "variables": [4 "driverName",5 "deliveryCode",6 "deliveryId"7 ]8}Error - Removing Referenced Variable400Bad Request
Response body
json
1{2 "success": false,3 "message": "cannot_remove_referenced_variables",4 "referenced_variables": [5 "driverName",6 "deliveryId"7 ]8}