update_tag

The update_tag function is used to create, edit, or delete tags. The tags are used when assigning or separating passengers.

Copied!
svc=resource/update_tag&params={"itemId":<long>,
								"id":<long>,
								"callMode":"<text>",
								"c":"<text>",
								"ck":<short>,
								"n":"<text>",
								"p":"<text>",
								"r":<double>,
								"tz":<int>,
								"f":<int>,
								"art":<uint>,
								"jp":{
				    					"<text>":"<text>",
				    					...
				  				}}

Parameters

NameDescription
itemIdResource ID.
id

Tag ID. To create a tag, send 0.

callMode

Modes:

  • create;
  • update;
  • delete; 
  • reset_image.

The following parameters are only required to create and update tags:

NameDescription
cCode.
ck

The check sum of the tag image. 

nTag name.
pPhone number of the +1234567890 type. Should be encoded as %2B. 
tzTime zone. 
jpCustom fields in the "name":"value" format.
fFlags (optional). 0 by default.
artThe timeout for automatic reset (optional). 36000 (10 hours) by default. 

Returned result

For creation and modification requests:

Copied!
[
	<long>,					/* tag ID */
	{
		"id":<long>,		/* ID */
		"n":"<text>",			/* name */
		"c":"<text>",			/* code */
		"jp": {				/* custom fields */
			"<text>":"<text>",	/* "name":"value" */
			...
		},
		"r":<double>,		/* aspect ratio of tag image */
		"ck":<ushort>,		/* the check sum of tag image */
		"f":<ushort>,		/* flag, not currently used, default value = 1 */
		"bu":<long>,		/* the assigned unit */
		"pu":<long>,		/* the previous assigned unit */
		"bt":<uint>,		/* the time of the previous assignment/separation */
		"pos":{				/* position */	
			"y":<double>,	/* latitude */	
			"x":<double>	/* longitude */
		}		
	}
]

For deletion requests:

Copied!
[
	<long>,		/* tag ID */
	null
]

Possible error codes:

CodeDescription
7Failed to fetch the resource with the desired ACL (ADF_ACL_AVL_RES_EDIT_TAGS).
6Undefined error.
4Wrong input parameters.
Download PDF file
Download Word document

See also