Skip to main content

Customer Portal Settings

2 API calls in this section.

Get Customer Portal Settings​

Delivery & Last-Mile / Customer Portal Settings
GET/delivery/customer-portal/settings

Returns the effective Customer Portal settings for delivery creation for the authenticated tenant.

Tenant ID is derived from req.context.tenantId (JWT / auth). No tenant ID in URL.

Access

  • Tenant admin with manage:tenant, manage:operations:tenant, or manage:module:delivery.

Response

data includes { options, values }. values.support_ticket_settings.support_users includes the selected support users with their names.

Query parameters

ParameterTypeDescription
languageOptionalstring

Language code for response localization (Optional, default: en)

Example: en

Headers

ParameterTypeDescription
Authorizationstring

Example: Bearer {{access_token}}

Staging
Request
curl
1curl --globoff --request GET "https://staging-api.ondi.io/functions/v1/delivery/customer-portal/settings?language=en" \2  --header "Authorization: Bearer ${ONDI_ACCESS_TOKEN}"

Response examples

200Success
Response body
json
1{2  "success": true,3  "data": {4    "options": {5      "pickup_settings": {6        "modes": [7          "fixed_default",8          "select_from_list",9          "predefined_only",10          "any_address"11        ],12        "allowed_address_types": [13          "pickup",14          "warehouse",15          "branch"16        ]17      },18      "wallet_settings": {19        "allowed_payout_user_types": [20          "individual",21          "business"22        ]23      }24    },25    "values": {26      "pickup_settings": {27        "mode": "fixed_default",28        "allow_change": false,29        "default_pickup_address_id": "uuid",30        "allowed_pickup_address_ids": []31      },32      "delivery_service_settings": {33        "default_delivery_service_id": "uuid",34        "allowed_delivery_service_ids": []35      },36      "cod_settings": {37        "enabled": true,38        "required": false,39        "allow_zero": true,40        "min": 0,41        "max": null42      },43      "delivery_creation_fields": {44        "reference_id_enabled": true,45        "invoicing_enabled": false,46        "custom_shipment_label_enabled": false47      },48      "package_settings": {49        "multipart_enabled": true50      },51      "visibility_settings": {52        "driver_info": {53          "show_driver_info": true,54          "show_driver_phone": true55        },56        "tracking": {57          "realtime_tracking_enabled": true58        },59        "chat": {60          "support_chat_enabled": true,61          "driver_chat_enabled": false62        }63      },64      "support_ticket_settings": {65        "enabled": true,66        "allow_customer_close": true,67        "support_user_ids": [68          "uuid",69          "uuid"70        ],71        "support_users": [72          {73            "id": "uuid",74            "full_name": "Support User One"75          },76          {77            "id": "uuid",78            "full_name": "Support User Two"79          }80        ],81        "default_priority": "medium",82        "auto_assign_on_first_reply": false83      },84      "wallet_settings": {85        "allowed_payout_user_types": [86          "business"87        ]88      },89      "brand_settings": {90        "brand": {91          "name": {92            "en": "",93            "ar": "",94            "ku": ""95          },96          "page_title": ""97        },98        "assets": {99          "favicon_url": "",100          "logo_url": ""101        },102        "theme": {103          "colors": {104            "primary": "#2B14DA",105            "primary2": "#000000",106            "misGrey": "#F7F8FA",107            "misGrey2": "#F3F5F9",108            "blueBigOrder": "#2B7FFF",109            "orangeBgTransit": "#FF6B2B",110            "yellowBgPending": "#E6C718",111            "greenBgDelivered": "#19B53B",112            "redBgDropOff": "#F40909",113            "selectedColor": "rgba(43, 20, 218, 0.05)",114            "activeTextColor": "rgba(0, 0, 0, 1)",115            "iconRestState": "rgba(105, 98, 98, 1)",116            "textRestState": "rgba(105, 98, 98, 1)",117            "characterDisabled": "rgba(0, 0, 0, 0.2)",118            "buttonTextColor": "rgba(255, 255, 255, 1)",119            "overlaysDefault": "rgba(0, 0, 0, 0.2)",120            "neutralStroke": "rgba(217, 217, 217, 1)",121            "backgroundColorWhite": "rgba(255, 255, 255, 1)",122            "borderColor": "rgba(243, 243, 243, 1)"123          }124        }125      }126    }127  }128}

Update Customer Portal Settings​

Delivery & Last-Mile / Customer Portal Settings
PUT/delivery/customer-portal/settings

Upserts tenant customer portal settings for delivery creation.

Tenant ID is derived from req.context.tenantId. No tenant ID in URL.

Access

  • Tenant admin with manage:tenant, manage:operations:tenant, or manage:module:delivery.

Validation

  • Pickup address/service IDs must belong to the tenant.

  • predefined_only requires allowed_pickup_address_ids.

  • fixed_default requires default_pickup_address_id.

  • any_address: no restrictions; customer provides pickup (address_id or location JSON) at order creation.

support_ticket_settings (optional):

  • enabled: enable or disable customer support tickets.

  • allow_customer_close: allow customers to close their own tickets.

  • support_user_ids: array of tenant support user ids for the shared queue. Each must be an active tenant user in the same tenant.

  • support_users: optional frontend object list; if sent, its ids are also validated.

  • users with the driver tenant role are not allowed as support users.

  • default_priority: low | medium | high | urgent.

  • auto_assign_on_first_reply: when true, the first support reply to an unassigned ticket claims it automatically.

brand_settings.theme.colors (partial update supported; defaults for omitted keys):

  • primary: #2B14DA | primary2: #000000 | misGrey: #F7F8FA | misGrey2: #F3F5F9

  • blueBigOrder: #2B7FFF | orangeBgTransit: #FF6B2B | yellowBgPending: #E6C718 | greenBgDelivered: #19B53B | redBgDropOff: #F40909

  • selectedColor: rgba(43, 20, 218, 0.05) | activeTextColor: rgba(0, 0, 0, 1)

  • iconRestState: rgba(105, 98, 98, 1) | textRestState: rgba(105, 98, 98, 1) | characterDisabled: rgba(0, 0, 0, 0.2)

  • buttonTextColor: rgba(255, 255, 255, 1) | overlaysDefault: rgba(0, 0, 0, 0.2)

  • neutralStroke: rgba(217, 217, 217, 1) | backgroundColorWhite: rgba(255, 255, 255, 1) | borderColor: rgba(243, 243, 243, 1)

wallet_settings (optional):

  • allowed_payout_user_types: array of "individual" and/or "business" - which customer types can request payouts from customer portal. Default: ["business"]. Enterprise users are treated as business.

track_orders (optional):

  • enable: enable or disable order tracking.

  • track_url: tracking application URL.

Query parameters

ParameterTypeDescription
languageOptionalstring

Language code for response localization (Optional, default: en)

Example: en

Headers

ParameterTypeDescription
Authorizationstring

Example: Bearer {{access_token}}

Content-Typestring

Example: application/json

Body parameters

ParameterTypeDescription
pickup_settingsobject—
pickup_settings.modestring—
pickup_settings.default_pickup_address_idstring—
pickup_settings.allowed_pickup_address_idsarray<string>—
delivery_service_settingsobject—
delivery_service_settings.default_delivery_service_idstring—
delivery_service_settings.allowed_delivery_service_idsarray—
cod_settingsobject—
cod_settings.enabledboolean—
cod_settings.requiredboolean—
cod_settings.allow_zeroboolean—
cod_settings.minnumber—
Show 58 more body fields

Additional body parameters

ParameterTypeDescription
cod_settings.maxnumber—
delivery_creation_fieldsobject—
delivery_creation_fields.reference_id_enabledboolean—
delivery_creation_fields.invoicing_enabledboolean—
delivery_creation_fields.custom_shipment_label_enabledboolean—
package_settingsobject—
package_settings.multipart_enabledboolean—
visibility_settingsobject—
visibility_settings.driver_infoobject—
visibility_settings.driver_info.show_driver_infoboolean—
visibility_settings.driver_info.show_driver_phoneboolean—
visibility_settings.trackingobject—
visibility_settings.tracking.realtime_tracking_enabledboolean—
visibility_settings.chatobject—
visibility_settings.chat.support_chat_enabledboolean—
visibility_settings.chat.driver_chat_enabledboolean—
support_ticket_settingsobject—
support_ticket_settings.enabledboolean—
support_ticket_settings.allow_customer_closeboolean—
support_ticket_settings.support_user_idsarray<string>—
support_ticket_settings.default_prioritystring—
support_ticket_settings.auto_assign_on_first_replyboolean—
wallet_settingsobject—
wallet_settings.allowed_payout_user_typesarray<string>—
track_ordersobject—
track_orders.enableboolean—
track_orders.track_urlstring—
brand_settingsobject—
brand_settings.brandobject—
brand_settings.brand.nameobject—
brand_settings.brand.name.enstring—
brand_settings.brand.name.arstring—
brand_settings.brand.name.kustring—
brand_settings.brand.page_titlestring—
brand_settings.assetsobject—
brand_settings.assets.favicon_urlstring—
brand_settings.assets.logo_urlstring—
brand_settings.themeobject—
brand_settings.theme.colorsobject—
brand_settings.theme.colors.primarystring—
brand_settings.theme.colors.primary2string—
brand_settings.theme.colors.misGreystring—
brand_settings.theme.colors.misGrey2string—
brand_settings.theme.colors.blueBigOrderstring—
brand_settings.theme.colors.orangeBgTransitstring—
brand_settings.theme.colors.yellowBgPendingstring—
brand_settings.theme.colors.greenBgDeliveredstring—
brand_settings.theme.colors.redBgDropOffstring—
brand_settings.theme.colors.selectedColorstring—
brand_settings.theme.colors.activeTextColorstring—
brand_settings.theme.colors.iconRestStatestring—
brand_settings.theme.colors.textRestStatestring—
brand_settings.theme.colors.characterDisabledstring—
brand_settings.theme.colors.buttonTextColorstring—
brand_settings.theme.colors.overlaysDefaultstring—
brand_settings.theme.colors.neutralStrokestring—
brand_settings.theme.colors.backgroundColorWhitestring—
brand_settings.theme.colors.borderColorstring—
Staging
Request
curl
1curl --globoff --request PUT "https://staging-api.ondi.io/functions/v1/delivery/customer-portal/settings?language=en" \2  --header "Authorization: Bearer ${ONDI_ACCESS_TOKEN}" \3  --header "Content-Type: application/json" \4  --data-raw '{5  "pickup_settings": {6    "mode": "predefined_only",7    "default_pickup_address_id": "uuid",8    "allowed_pickup_address_ids": [9      "uuid"10    ]11  },12  "delivery_service_settings": {13    "default_delivery_service_id": "uuid",14    "allowed_delivery_service_ids": []15  },16  "cod_settings": {17    "enabled": true,18    "required": false,19    "allow_zero": true,20    "min": 0,21    "max": 50000022  },23  "delivery_creation_fields": {24    "reference_id_enabled": true,25    "invoicing_enabled": false,26    "custom_shipment_label_enabled": false27  },28  "package_settings": {29    "multipart_enabled": true30  },31  "visibility_settings": {32    "driver_info": {33      "show_driver_info": true,34      "show_driver_phone": false35    },36    "tracking": {37      "realtime_tracking_enabled": true38    },39    "chat": {40      "support_chat_enabled": true,41      "driver_chat_enabled": false42    }43  },44  "support_ticket_settings": {45    "enabled": true,46    "allow_customer_close": true,47    "support_user_ids": [48      "uuid",49      "uuid"50    ],51    "default_priority": "medium",52    "auto_assign_on_first_reply": true53  },54  "wallet_settings": {55    "allowed_payout_user_types": [56      "individual",57      "business"58    ]59  },60  "track_orders": {61    "enable": true,62    "track_url": "https://staging-app.ondi.io/tracking"63  },64  "brand_settings": {65    "brand": {66      "name": {67        "en": "Acme",68        "ar": "",69        "ku": ""70      },71      "page_title": "Acme Tracking"72    },73    "assets": {74      "favicon_url": "https://...",75      "logo_url": "https://..."76    },77    "theme": {78      "colors": {79        "primary": "#2B14DA",80        "primary2": "#000000",81        "misGrey": "#F7F8FA",82        "misGrey2": "#F3F5F9",83        "blueBigOrder": "#2B7FFF",84        "orangeBgTransit": "#FF6B2B",85        "yellowBgPending": "#E6C718",86        "greenBgDelivered": "#19B53B",87        "redBgDropOff": "#F40909",88        "selectedColor": "rgba(43, 20, 218, 0.05)",89        "activeTextColor": "rgba(0, 0, 0, 1)",90        "iconRestState": "rgba(105, 98, 98, 1)",91        "textRestState": "rgba(105, 98, 98, 1)",92        "characterDisabled": "rgba(0, 0, 0, 0.2)",93        "buttonTextColor": "rgba(255, 255, 255, 1)",94        "overlaysDefault": "rgba(0, 0, 0, 0.2)",95        "neutralStroke": "rgba(217, 217, 217, 1)",96        "backgroundColorWhite": "rgba(255, 255, 255, 1)",97        "borderColor": "rgba(243, 243, 243, 1)"98      }99    }100  }101}'

Response examples

200Success
Response body
json
1{2  "success": true,3  "message": "Tenant Setting Updated Successfully",4  "data": {5    "options": {6      "pickup_settings": {7        "modes": [8          "fixed_default",9          "select_from_list",10          "predefined_only",11          "any_address"12        ],13        "allowed_address_types": [14          "pickup",15          "warehouse",16          "branch"17        ]18      },19      "wallet_settings": {20        "allowed_payout_user_types": [21          "individual",22          "business"23        ]24      }25    },26    "values": {27      "pickup_settings": {28        "mode": "predefined_only",29        "allow_change": true,30        "default_pickup_address_id": "uuid",31        "allowed_pickup_address_ids": [32          "uuid"33        ]34      },35      "brand_settings": {36        "brand": {37          "name": {38            "en": "Acme",39            "ar": "",40            "ku": ""41          },42          "page_title": "Acme Tracking"43        },44        "assets": {45          "favicon_url": "https://...",46          "logo_url": "https://..."47        },48        "theme": {49          "colors": {50            "primary": "#2B14DA",51            "primary2": "#000000",52            "misGrey": "#F7F8FA",53            "misGrey2": "#F3F5F9",54            "blueBigOrder": "#2B7FFF",55            "orangeBgTransit": "#FF6B2B",56            "yellowBgPending": "#E6C718",57            "greenBgDelivered": "#19B53B",58            "redBgDropOff": "#F40909",59            "selectedColor": "rgba(43, 20, 218, 0.05)",60            "activeTextColor": "rgba(0, 0, 0, 1)",61            "iconRestState": "rgba(105, 98, 98, 1)",62            "textRestState": "rgba(105, 98, 98, 1)",63            "characterDisabled": "rgba(0, 0, 0, 0.2)",64            "buttonTextColor": "rgba(255, 255, 255, 1)",65            "overlaysDefault": "rgba(0, 0, 0, 0.2)",66            "neutralStroke": "rgba(217, 217, 217, 1)",67            "backgroundColorWhite": "rgba(255, 255, 255, 1)",68            "borderColor": "rgba(243, 243, 243, 1)"69          }70        }71      }72    }73  }74}