Typical scenarios and pitfalls
The four-step rule (read, back up, write, re-read), patch request pitfalls and ready request sequences for typical tasks.
The main principle for writing through the Advision API: read the current state of the object, save it to a file, write the change and re-read the object to confirm the result is exactly what you intended. Both patch requests work as replacement, not merge: playlistA set of files with a playback schedule that is assigned to screens or networks./patch requires the full body, point/patch overwrites playlistGroups entirely. Transient 500 and 504 on large operations happen regularly, so your script must be idempotent and able to retry.
playlist/patch without the full body resets the schedule
- Symptom: after a patch the playlistA set of files with a playback schedule that is assigned to screens or networks. plays around the clock, files, period or
source/sourceConfigdisappeared. - Cause:
playlistA set of files with a playback schedule that is assigned to screens or networks./patchtakes the same body as creation and treats omitted fields as empty. - Correct way:
GET /playlistA set of files with a playback schedule that is assigned to screens or networks./<PLAYLISTA set of files with a playback schedule that is assigned to screens or networks._ID>, drop the computedaccess,points,pointsTotal,expiration, change what you need and send everything else unchanged. Pass undocumented fields (fromTime2,limit,actionOnEnd,pixel,source…) as they are.
Missing duration in files[]
- Symptom:
500 Undefined index: durationonplaylistA set of files with a playback schedule that is assigned to screens or networks./post,playlistA set of files with a playback schedule that is assigned to screens or networks./patchorpoint/patch. - Cause: every element of
files[](in a playlistA set of files with a playback schedule that is assigned to screens or networks. and inplaylistGroups[].files) must carrydurationin seconds. - Correct way: always send
{"id": <FILE_ID>, "duration": 15}. Forpoint/patchthis is critical: after such an error the screenA device running the Advision player that shows content; the cabinet calls it a media device. may be left with empty groups, and a rollback with the same body fails too.
influence and periodicity get lost
- Symptom: a periodicPlaylist type that interrupts the background at a fixed interval, for example every 15 minutes. playlistA set of files with a playback schedule that is assigned to screens or networks. (
ADVERTISING) stopped being inserted, or the sync mode changed. - Cause: the patch did not include
periodicityorinfluencePlaylist field: Active goes on air, Passive is only stored., and the server reset the value. - Correct way:
influencePlaylist field: Active goes on air, Passive is only stored. is alwaysACTIVEby default; passperiodicityin every patch of anADVERTISINGplaylistA set of files with a playback schedule that is assigned to screens or networks. even if it does not change.
Empty weekDays
- Symptom: the playlistA set of files with a playback schedule that is assigned to screens or networks. is assigned, period and hours are right, but it is absent from the daily schedule.
- Cause:
weekDays: []means "no day", and the playlistA set of files with a playback schedule that is assigned to screens or networks. never enters the schedule. - Correct way: send the full set
[0,1,2,3,4,5,6](0 = Sunday) or the needed days; after writing, checkGET /point/get-daily-schedule.
point/patch overwrites playlistGroups together with plugins
- Symptom: after adding one playlistA set of files with a playback schedule that is assigned to screens or networks., all others, the all-day background or the plugins disappeared from the screenA device running the Advision player that shows content; the cabinet calls it a media device..
- Cause:
point/patchaccepts a partial body ({"broadcastFromTime": "09:00:00"}is safe), but theplaylistGroupsfield replaces the array entirely, plugins inside the groups included. - Correct way:
GET /point/<POINT_ID>, save the response to a file, add the playlistA set of files with a playback schedule that is assigned to screens or networks. to the existing groups, keep theisActivefield on every plugin, send the full array, re-read the screenA device running the Advision player that shows content; the cabinet calls it a media device.; if groups are fewer or empty, roll back with the saved body. Where channel 0 is enough, usepointsinplaylistA set of files with a playback schedule that is assigned to screens or networks./patchinstead.
Transient 500
- Symptom: a perfectly valid request randomly answers
500, a retry succeeds. - Cause: periodicPlaylist type that interrupts the background at a fixed interval, for example every 15 minutes. backend failures unrelated to the request body.
- Correct way: 4–6 retries with a 2–3 s pause for
GETand for writes with an idempotent body. Exception:point/patchwith a heavyplaylistGroups, where500may mean the groups are already wiped; re-read the screenA device running the Advision player that shows content; the cabinet calls it a media device. first.
504 on copy-with-screens
- Symptom:
POST /playlistA set of files with a playback schedule that is assigned to screens or networks./copy-with-screens/<PLAYLISTA set of files with a playback schedule that is assigned to screens or networks._ID>on a playlistA set of files with a playback schedule that is assigned to screens or networks. with a hundred screens answers504after about 50 s. - Cause: the gateway waits less than the copy takes, but the backend completes the operation.
- Correct way: do not retry, or a second copy appears. Find the new copy in
GET /playlistA set of files with a playback schedule that is assigned to screens or networks.?itemsPerPage=9999: the highestidnamed<NAME> (copy).
Date in get-daily-schedule
- Symptom:
GET /point/get-daily-schedulereturns a date format error suggestingYYYY/mm/dd. - Cause: the error text is inaccurate; the endpoint expects a number.
- Correct way:
date=20261001(aYYYYMMDDnumber) together withid=<POINT_ID>andchannel=0.
List keys
- Symptom: the code looks for
dataand gets an empty result. - Cause: lists come under the keys
points,playlists,files,nets,configs; only/folderand/statisticusedata. - Correct way: read the matching key and always pass
itemsPerPage=9999, otherwise only the first page comes back.
What the API does not offer
- Pairing a device:
point/postonly creates an empty screenA device running the Advision player that shows content; the cabinet calls it a media device. record without a device, the player code is entered in the cabinet. There is no renaming or deleting of screens via API. - Deleting files from the media library: cabinet only.
- Users, roles, webhooks, templates, payment operations and notifications are not in the API.
- There is no Swagger/OpenAPI; the full list of verified methods is in the screens, files, playlists and statistics references.
Typical scenarios
Task | Request sequence |
|---|---|
Add a clip to all screens | 1. |
Replace a clip that is already playing | 1. |
Remove content | From some screens: |
Bulk operation | 1. |
Related articles
- ReferencePlaylists: creation, update, assignmentEndpoints of the playlist controller: list, card, creation, full-body update, binding to screens with the points field, copy with screens, deletion.
- ReferenceScreens: reading, schedule, statusesEndpoints of the point controller: screen list and card, daily schedule, content assignment, screen capture, device control, networks.
- ReferenceFiles: upload, foldersEndpoints of the file controller: multipart upload, file list and card, media library folders, file configs (sound, plugins). File deletion is not available in the API.
- ConceptHow a screen receives content: synchronizationAfter «Save» the platform builds the schedule and sends files to the player; it downloads them into its storage and confirms the sync time.