update_orders_notification
The update_orders_notification function is used to update the settings of the notification templates for orders.
svc=resource/update_orders_notification¶ms={"resourceId":<long>,
"ordersNotification":<JSON>}
Parameters
Name | Description |
---|---|
resourceId | Resource ID. |
ordersNotification | The notification template settings in JSON format. |
JSON keys:
{
"sms":"<text>", /* SMS notification text */
"subj":"<text>", /* email subject */
"text":"<text>", /* email text */
"html":<uint>, /* email text as HTML (1 — yes) */
"currency":"<text>", /* currency */
"dns":"<text>", /* locator URL (without http://) */
"driverPushMsg":{ /* driver push notification settings */
"crR":{
"t":"<text>" /* notification text after creating a new route */
},
"delR":{
"t":"<text>" /* notification text after deleting a route */
},
"updC":{
"t":"<text>" /* notification text after changing contact details */
},
"attO":{
"t":"<text>" /* notification text after attaching files */
},
"detO":{
"t":"<text>" /* notification text after deleting files */
},
"updG":{
"t":"<text>" /* notification text after changing order parameters */
},
"vtD":{
"t":"<text>" /* notification text after exceeding the delivery time*/
},
"utD":{
"t":"<text>" /* notification text after exceeding the unloading time */
},
"trk":{
"t":"<text>" /* notification text in case of a deviation from a route */
}
"skp":{
"t":"<text>" /* notification text in case of skipping an order */
},
"stO":{
"t":"<text>" /* notification text in case an order is not confirmed by the courier/operator */
}
},
}
The tags of notification body and email subject:
Tag | Description |
---|---|
%ORDER_NAME% | Order name. |
%ORDER_ARRIVAL_TIME% | Estimated arrival. |
%ORDER_COST% | Order cost. |
%ORDER_COMMENT% | Comment. |
%LOCATOR_LINK% | Current location. |
Returned result
If the request is successful, an empty JSON is returned.
{ }
If not, an error code is returned. Possible error codes:
Code | Description |
---|---|
7 | Failed to fetch the resource with the desired ACL (ADF_ACL_AVL_RES_EDIT_ORDERS). |
6 | Undefined error. |
4 | Wrong input parameters. |