Icecat users have the ability to upload media assets to Icecat endpoints using the UserMedia feature. This manual provides instructions on uploading videos via the UserMedia API and presenting them via Icecat LIVE.
Swagger schema: https://api.icecat.biz/#/UserMedia
All requests are sent to https://bo.icecat.biz/restful/v3/ and SessionType is always Rest.While it is possible to reach API with your programming language or terminal tools like curl and wGet, I would recommend using tools like Insomnia or Postman to work with our data as the requests can be complicated.
https://bo.icecat.biz/restful/v3/
SessionType
Rest
You need to have either a brand or shop type account to use UserMedia API. To initiate data transmission, you must authenticate yourself with the API by obtaining a session key. This session key is required for subsequent requests to ensure proper API authentication. Please, follow point 1.3 from the PUSH API manual.
Path:
https://bo.icecat.biz/restful/v3/UserMedia/Videos?AccessKey={{_.accessKey}}&SessionType=Rest
Headers:
Content-Type: multipart/form-data
Multipart data:
'Title=My Title' 'LanguageIds=10,1,2' SourceLink=http://example.com/FunnyElephant.mp4 ProviderUserId=99999
Example:
curl --request POST \ --url 'https://bo.icecat.biz/restful/v3/UserMedia/Videos?AccessKey={{_.accessKey}}&SessionType=Rest' \ --header 'Content-Type: multipart/form-data' \ --header 'accept: application/json' \ --form 'Title=My Title' \ --form 'LanguageIds=10,1,2' \ --form SourceLink=http://example.com/FunnyElephant.mp4 \ --form ProviderUserId=99999
Variables:
Success response 201:
{ "Data": { "VideoId": 33232080 } }
https://bo.icecat.biz/restful/v3/UserMedia/Videos/{{_.videoID}}?AccessKey={{_.accessKey}}&SessionType=Rest
curl --request GET \ --url 'https://bo.icecat.biz/restful/v3/UserMedia/Videos/{{_.videoID}}?AccessKey={{_.accessKey}}&SessionType=Rest' \
Success response 200:
{ "Data": { "VideoId": 99999, "Title": "My Title", "Link": "https://example.icecat.biz//", "LanguageIds": [ 2, 3, 10 ], "ProviderUserId": 303033, "Status": "Done", "PreviewImageLink": "https://example.icecat.biz//", "PreviewImageLinkTmp": "https://example.icecat.biz//", "PreviewThumbLink": "https://example.icecat.biz//", "PreviewThumbLinkTmp": "https://example.icecat.biz//", "Accesses": [], "AgeRatings": [] } }
Response is constructed from links to your UserMedia on Icecat servers and additional data.
https://bo.icecat.biz/restful/v3/UserMedia/Videos/{{_.videoID}}?AccessKey={{_.accessKey}}&Sess ionType=Rest
Body:
{ "Title": "My new Title" }
curl --request PATCH \ --url 'https://bo.icecat.biz/restful/v3/UserMedia/Videos/{{_.videoID}}?AccessKey={{_.accessKey}}&SessionType=Rest' \ --header 'Content-Type: application/json' \ --data '{ "Title": "My new title" }'
{ "Data": {} }
curl --request DELETE \ --url 'https://bo.icecat.biz/restful/v3/UserMedia/Videos/{{_.videoID}}?AccessKey={{_.accessKey}}&SessionType=Rest'
Success response 200: Returns an ID of the deleted Video.
{ "Data": { "VideoId": 332079 } }
curl --request GET \ --url 'https://bo.icecat.biz/restful/v3/UserMedia/Videos?AccessKey={{_.accessKey}}&SessionType=Rest' \
Success response 200: Method returns all Videos stored on Icecat.
Please check the IDs for Icecat Languages here: Locales & Language Code
https://bo.icecat.biz/restful/v3/UserMedia/Videos/{{_.videoID}}/Languages?AccessKey={{_.accessKey}}&SessionType=Rest
curl --request POST \ --url 'https://bo.icecat.biz/restful/v3/UserMedia/Videos/{{_.videoID}}/Languages?AccessKey={{_.accessKey}}&SessionType=Rest' \ --data '{ "LanguageId": 3 }'
{ "LanguageId": 3 }
Success response 200: Returns ID of activated languages.
{ "Data": { "LanguageId": 3 } }
https://bo.icecat.biz/restful/v3/UserMedia/Videos/{{_.videoID}}?AccessKey={{_.accessKey}}&SessionType=Rest&Metadata%5B%5D=Languages
curl --request GET \ --url 'https://bo.icecat.biz/restful/v3/UserMedia/Videos/{{_.videoID}}?AccessKey={{_.accessKey}}&SessionType=Rest&Metadata%5B%5D=Languages' \
{ "Data": { "VideoId": 0, "Title": "", "Link": "", "LanguageIds": [ 2, 3, 10 ], "ProviderUserId": 0, "Status": "Done", "PreviewImageLink": "", "PreviewImageLinkTmp": "", "PreviewThumbLink": "", "PreviewThumbLinkTmp": "", "Accesses": [], "AgeRatings": [] }, "Metadata": { "Languages": [ { "LanguageId": 2, "ShortCode": "NL" }, { "LanguageId": 3, "ShortCode": "FR" }, { "LanguageId": 10, "ShortCode": "BR" } ] } }
https://bo.icecat.biz/restful/v3/UserMedia/Videos/{{_.videoID}}/Languages/{{ _.languageID }}?AccessKey={{_.accessKey}}&SessionType=Rest
curl --request DELETE \ --url 'https://bo.icecat.biz/restful/v3/UserMedia/Videos/{{_.videoID}}/Languages/{{ _.languageID }}?AccessKey={{_.accessKey}}&SessionType=Rest' \
With accesses you can assign users to edit your UserMedia. You can only allow shop users to get access to your videos.
https://bo.icecat.biz/restful/v3/UserMedia/Videos/{{_.videoID}}/Accesses?AccessKey={{ _.accessKey }}&SessionType=Rest
{ "AuthorizedUserId": {{_.userID}}, "UserReference": "My-team-lead" }
curl --request POST \ --url 'https://bo.icecat.biz/restful/v3/UserMedia/Videos/332080/Accesses?AccessKey={{ _.accessKey }}&SessionType=Rest' \ --data '{ "AuthorizedUserId": {{_.userID}}, "UserReference": "My-team-lead" }'
{ "Data": { "AccessId": 0, "AuthorizedUserId": 0, "UserReference": "My-team-lead" } }
https://bo.icecat.biz/restful/v3/UserMedia/Videos/{{_.videoID}}/Accesses/{{_.accessId}}?AccessKey={{ _.accessKey }}&SessionType=Rest
{ "UserReference": "My-ex-team-lead" }
curl --request PATCH \ --url 'https://bo.icecat.biz/restful/v3/UserMedia/Videos/{{_.videoID}}/Accesses/{{ _.accessId }}?AccessKey={{ _.accessKey }}&SessionType=Rest' \ --data '{ "UserReference": "My-ex-team-lead" }'
{ "Data": { "AccessId": 9060198, "AuthorizedUserId": 110865, "UserReference": "My-ex-team-lead" } }
curl --request DELETE \ --url 'https://bo.icecat.biz/restful/v3/UserMedia/Videos/{{_.videoID}}/Accesses/{{_.accessId}}?AccessKey={{ _.accessKey }}&SessionType=Rest' \
Age Ratings are additional labels to mark which audience the video is available for. They display minimum age requirements for the content.
https://bo.icecat.biz/restful/v3/UserMedia/Videos/{{_.videoID}}?AccessKey={{_.accessKey}}&SessionType=Rest&Metadata%5B%5D=AgeRatings
curl --request GET \ --url 'https://bo.icecat.biz/restful/v3/UserMedia/Videos/{{_.videoID}}?AccessKey={{_.accessKey}}&SessionType=Rest&Metadata%5B%5D=AgeRatings'
Response returns all information about each Age Rating provider.
https://bo.icecat.biz/restful/v3/UserMedia/Videos/{{ _.videoID }}/AgeRatings?AccessKey={{_.accessKey}}&SessionType=Rest
{ "AgeRatingId": 1, "AgeRatingValueId": 2, "AgeRatingDescriptorIds": [ 2 ] }
curl --request POST \ --url 'https://bo.icecat.biz/restful/v3/UserMedia/Videos/{{ _.videoID }}/AgeRatings?AccessKey={{_.accessKey}}&SessionType=Rest' \ --header 'Content-Type: application/json' \ --data ' { "AgeRatingId": 1, "AgeRatingValueId": 2, "AgeRatingDescriptorIds": [ 2 ] }'
{ "Data": { "AgeRatingId": 1 } }
https://bo.icecat.biz/restful/v3/UserMedia/Videos/{{ _.videoID }}/AgeRatings/{{ _.ageRatingId }}?AccessKey={{_.accessKey}}&SessionType=Rest
{ "AgeRatingValueId": 3 }
curl --request PATCH \ --url 'https://bo.icecat.biz/restful/v3/UserMedia/Videos/{{ _.videoID }}/AgeRatings/{{ _.ageRatingId }}?AccessKey={{_.accessKey}}&SessionType=Rest' \ --header 'Content-Type: application/json' \ --data '{ "AgeRatingValueId": 3 }'
Success response:
curl --request DELETE \ --url 'https://bo.icecat.biz/restful/v3/UserMedia/Videos/{{ _.videoID }}/AgeRatings/{{ _.ageRatingId }}?AccessKey={{_.accessKey}}&SessionType=Rest' \
AgeRatingDescriptor is a label that shows additional information about provocative content that is not suited for minors. For example, “Drugs” or “Sex” are the descriptors in PEGI rating.
AgeRatingDescriptor
https://bo.icecat.biz/restful/v3/UserMedia/Videos/{{ _.videoID }}/AgeRatings/{{ _.ageRatingID }}/Descriptors?AccessKey={{_.accessKey}}&SessionType=Rest
{ "AgeRatingDescriptorId": 7 }
curl --request POST \ --url 'https://bo.icecat.biz/restful/v3/UserMedia/Videos/{{ _.videoID }}/AgeRatings/{{ _.ageRatingID }}/Descriptors?AccessKey={{_.accessKey}}&SessionType=Rest' \ --data '{ "AgeRatingDescriptorId": 7 }'
{ "Data": { "AgeRatingDescriptorId": 7 } }
https://bo.icecat.biz/restful/v3/UserMedia/Videos/{{ _.videoID }}/AgeRatings/{{ _.ageRatingID }}/Descriptors/{{ _.ageRatingDescriptorID }}?AccessKey={{_.accessKey}}&SessionType=Rest
curl --request DELETE \ --url 'https://bo.icecat.biz/restful/v3/UserMedia/Videos/{{ _.videoID }}/AgeRatings/{{ _.ageRatingID }}/Descriptors/{{ _.ageRatingDescriptorID }}?AccessKey={{_.accessKey}}&SessionType=Rest' \
To retrieve videos uploaded through the UserMedia API using Icecat LIVE JS API, you will need to include two essential parameters in your request code:
These two parameters are required for showing the user’s videos into live html.
Age gating is activated by default, however it is possible to disable it by adding videoAgeGatingDisabled: true parameter. Please see an example below.
videoAgeGatingDisabled: true
Videos uploaded via UserMedia API can be requested via Granular call to be included among other containers. For this you need to include a ‘videos’ container to the call, UserReference and ProviderId are also required. The request works with any identifier combinations, Smart call and Multilingual request. Please refer to the Granular Call manual for more info.
Granular call with UserMedia API parameters – Brand + MPN:
<!DOCTYPE html> <html> <head></head> <body> <div id="сontainer1"></div> <div id="сontainer2"></div> <script> window.addEventListener('liveload', function () { IcecatLive.getDatasheet( { gallery: '#сontainer1', videos: '#сontainer2', }, { Brand: 'Philips', PartCode: 'DS8900/10', UserName: 'shop_user', UserReference: 'user_code', ProviderId: 1, }, 'en' ); }); </script> <script src="https://live.icecat.biz/js/live-current-2.js" async></script> </body> </html>
The same request with Age gating disabled:
<!DOCTYPE html> <html> <head></head> <body> <div id="сontainer1"></div> <div id="сontainer2"></div> <script> window.addEventListener('liveload', function () { IcecatLive.getDatasheet( { gallery: '#сontainer1', videos: '#сontainer2', }, { Brand: 'Philips', PartCode: 'DS8900/10', UserName: 'shop_user', UserReference: 'user_code', ProviderId: 1, videoAgeGatingDisabled: true, }, 'en' ); }); </script> <script src="https://live.icecat.biz/js/live-current-2.js" async></script> </body> </html>
Users can request videos uploaded via UserMedia API exclusively without requesting any specific product or data containers using Icecat Live. ProviderId and UserReference parameters are required.
<!DOCTYPE html> <html> <head></head> <body> <div id="сontainer"></div> <script> window.addEventListener('liveload', function () { IcecatLive.getUnlinkedVideos( '#сontainer', { shopname: 'shop_user', UserReference: 'user_code', ProviderId: 1, }, 'en' ); }); </script> <script src="https://live.icecat.biz/js/live-current-2.js" async></script> </body> </html>
The Regular call of datasheet + UserMedia API parameters – Brand + MPN (can also be used with Icecat ID based, EAN-based calls, and Smart call):
<!DOCTYPE html> <html> <head></head> <body> <div id="container"></div> <script> window.addEventListener('liveload', function () { window.IcecatLive.getDatasheet( '#container', { Brand: 'Philips', PartCode: 'DS8900/10', UserName: 'shop_user', UserReference: 'user_code', ProviderId: 1, }, 'en' ); }); </script> <script src="https://live.icecat.biz/js/live-current-2.js" async></script> </body> </html>
Read further: Manuals, Icecat, manual, PIM, product content