# Store Multiple Listings
API call format
POST /broker/listings/multiple //Use token autorization
POST /broker/private/listings/multiple //Use Api Key
{{
"listings":
[
{
"color": "<color_code>",
"imageUrl": "<image_url>",
"channel": "<channel_guid>",
"start": <start_timestamp_01>,
"description": "<listing_description>",
"end": <end_timestamp_01>,
"title": "<listing_title>"
},
.....
{
"color": "<color_code>",
"imageUrl": "<image_url>",
"channel": "<channel_guid>",
"start": <end_timestamp_01>,
"description": "<listing_description>",
"end": <end_timestamp_02>,
"title": "<listing_title>"
}
],
"channel": "<channel_guid>",
"start": "<channel_start_timestamp>",
"end": "<channel_end_timestamp>"
}
Description
This call creates specified listings inside the video channel.
Precondition
- Authorization token/Api key is needed.
- Mandatory elements (should be specified):
- "channel" - valid channel guid. Take a specific channel guid using Channels List API call.
- "start" - valid Unix timestamp
- "end" - valid Unix timestamp
- "title" - listing title
- Conditions to be met:
- All time related variables should be valid Unix timestamps.
- Next listing "start" time should be equal to previous listing "end" time
- Last listing "end" time should be equal to channel "end" time.
- First listing "start" time should be equal to channel "start" time.
- Not mandatory (optional):
- "color" - valid color code.
- "imageUrl" - valid image link.
- "description" - listing description.
Postcondition
- On success response code should be 200
- On success message for successful creation of listings in JSON format is returned.
- On failure an error will be returned with the right error code and description.
Example:
[Request] POST https://<base_api_url>/broker/listings/multiple
[Request] POST https://<base_api_url>/broker/private/listings/multiple
{
"color": "<color_code>",
"imageUrl": "<image_url>",
"channel": "<channel_guid>",
"start": <start_timestamp>,
"description": "<listing_description>",
"end": <start_timestamp>,
"title": "<listing_title>"
}
[Request Headers] {"Content-Type":"application/json","Accept":"application/json","Authorization":"<IdToken>"} //Use token autorization
[Request Headers] {"Content-Type":"application/json","Accept":"application/json","X-Api-Key":"<api_key>"} //Use Api Key
[Response] 200
[Response Headers] {"Content-Type":["application/json"],"Content-Length":["..."],"Connection":["keep-alive"],"Date":["..... GMT"],"x-amzn-RequestId":["....."],....]}
[Response]
{
"status":true,
"data":"Item was created successfully"
}