update_trailers_group

To create, edit, or delete trailer groups, use the resource/update_trailers_group method.

Endpoint

Copied!
svc=resource/update_trailers_group&params={
    "itemId": <long>,
    "id": <long>,
    "callMode": <text>,
    "n": <text>,
    "d": <text>,
    "drs": [<uint>]
}

Parameters

The request must contain the following parameters:

Parameter Description
itemId Resource ID.
id Trailer group ID.
callMode Action type: create, update, delete.
n Trailer group name. Required only for the create and update action types.
d Trailer group description. Required only for the create and update action types.
drs Array of trailer IDs. Required only for the create and update action types.

Response

If the request for creating or editing the trailer group is completed successfully, the response is returned in the following format:

Copied!
[
    <long>,  // Trailer group ID.
    {
        "id": <long>,  // Trailer group ID.
        "n": <text>,  // Trailer group name.
        "d": <text>,  // Trailer group description.
        "drs": [<uint>]  // Array of trailer IDs.
    }
]

If the request for deleting the trailer group is completed successfully, the response is returned in the following format:

Copied!
[
    <long>,  // Trailer group ID.
    null
]

If the request fails, an error code is returned.

Error codes

Error code Description
4 Invalid input parameters.
6 Failed to create or delete the trailer group. For the delete action type, this error is also returned if the trailer group with the specified ID doesn’t exist.
7 The user has no Create, edit, and delete trailers access right to the resource.

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