update_orders_notification

The update_orders_notification function is used to update the settings of the notification templates for orders.

Copied!
svc=resource/update_orders_notification&params={"resourceId":<long>,
												"ordersNotification":<JSON>}

Parameters

NameDescription
resourceIdResource ID.
ordersNotificationThe notification template settings in JSON format.

JSON keys:

Copied!
{
"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:

TagDescription
%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.

Copied!
{ }

If not, an error code is returned. Possible error codes:

CodeDescription
7Failed to fetch the resource with the desired ACL (ADF_ACL_AVL_RES_EDIT_ORDERS).
6Undefined error.
4

Wrong input parameters.

Download PDF file
Download Word document

See also