bind_unit_tag

The bind_unit_tag method is used to bind a tag to a unit or to unbind it manually. The tags are used when assigning or separating passengers.

Copied!
svc=resource/bind_unit_tag&params={"resourceId":<long>,
				   				   "unitId":<long>,
				   				   "tagId":<long>,
				   				   "time":<uint>,
				   				   "mode":<bool>
								  }

Parameters

Name Description
resourceId Resource ID.
unitId Unit ID.
tagId Tag ID.
time Time (0 — current time). Unix time value in GMT+0 time zone.
mode Modes:
  • 1/true — bind;
  • 0/false — unbind.

Returned result

If the request is successful, an empty JSON is returned.

Copied!
{ }

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

Code Description
7 The resource doesn’t exist or the user doesn’t have the Create, edit, and delete passengers access right to it, or the unit doesn’t exist or the user doesn’t have the View object and its basic properties access right to it.
6 Failed to bind the tag.
4 Failed to fetch the tag with the desired tagId or wrong input parameters.

If you find a mistake in the text, please select it and press Ctrl+Enter.