bind_unit_trailer
The bind_unit_trailer function is used to assign trailers to units or to separate them from units.
svc=resource/bind_unit_trailer¶ms={"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: 
 | 
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_TRAILERS) or failed to fetch the unit with the desired ACL (ADF_ACL_ITEM_VIEW). | 
| 6 | Failed to assign the trailer. | 
| 4 | Failed to fetch the trailer with the desired trailerId or wrong input parameters. |