update_trailer
The update_trailer function is used to create, edit, or delete trailers.
svc=resource/update_trailer¶ms={"itemId":<long>,
"id":<long>,
"callMode":"<text>",
"ej":{ ... },
"c":"<text>",
"ds":"<text>",
"n":"<text>",
"f":<uint>,
"jp":{
"<text>":"<text>",
...
}}
Parameters
Name | Description |
---|---|
itemId | Resource ID. |
id | Trailer ID. To create a trailer, send 0. |
callMode | Modes:
|
The following parameters are only required to create and update trailers:
Name | Description |
---|---|
ej | Extended JSON (optional). { } by default. |
c | Code. |
ds | Description. |
n | Trailer name. |
f | Flags, not currently used. |
jp | Custom fields in the "name":"value" format. Optional. { } by default. |
Returned result
For creation and modification requests:
[
<long>, /* trailer ID */
{
"id":<long>, /* trailer ID */
"n":"<text>", /* name */
"c":"<text>", /* code */
"ej":"<text>", /* extended JSON */
"jp": { /* custom fields */
"<text>":"<text>", /* name: value */
...
},
"ds":"<text>", /* description */
"p":"<text>", /* phone number */
"r":<double>, /* aspect ratio of the image */
"ck":<ushort> /* the check sum of the image */
"bu":<long>, /* the assigned unit */
"pu":<long>, /* the previous assigned unit */
"bt":<uint>, /* the time of the previous assignment/separation */
"pos":{ /* position */
"y":<double>, /* latitude */
"x":<double> /* longitude */
}
}
]
For deletion requests:
[
<long>, /* trailer ID */
null
]
Possible error codes:
Code | Description |
---|---|
7 | Failed to fetch the resource with the desired ACL (ADF_ACL_AVL_RES_EDIT_TRAILERS). |
6 | Undefined error. |
4 | Wrong input parameters. |