bind_unit_trailer

The bind_unit_trailer method is used to assign trailers to units or to separate them from units.

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

Parameters

Name Description
resourceId Resource ID.
unitId Unit ID.
trailerId Trailer ID.
time Time (0 — current time).
mode Modes:
  • 1/true — assign;
  • 0/false — separate.

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 trailers 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 assign the trailer.
4 Failed to fetch the trailer with the desired trailerId or wrong input parameters.

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