bind_unit_trailer
The bind_unit_trailer method 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 | 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. |