This API is used for accessing the Solea Database externally. The API receives HTTP calls using GET or POST, executes the required operations, and returns a result or an error message. Most API calls require at least Solea Server version 4.28.
application/json; charset=utf-8.POST /SetCommercialPlan HTTP/1.1
Host: http://192.168.1.15:9019
Content-Type: application/json; charset=utf-8
{ JSON_DATA }
http://192.168.1.15:9019/SetCommercialPlan?{ "User" : "CommUser1", "Password": "abc123", ... }
| Type | Description |
|---|---|
API_Date |
Date type as YYYYMMDD format. Example: 20260329 represents 29th of March 2026. |
API_Time |
Time type as hhmmss format. Example: 174500 represents 17:45:00. |
API_DateTime |
Date-time type as YYYYMMDD hhmmss format. Example: 20260329 174500 represents 29th of March 2026, 17:45:00. |
API_String |
String type in any length. Example: ABC Bank April Campaign Spot A. It must be UTF-8 encoded. |
API_Number |
Positive integer number between 0 and 4294967295. |
API_Integer |
Signed integer number between -2147483648 and 2147483647. |
API_Float |
Floating value number (e.g 456.67, 765443.2345) between -2147483648.0 and 2147483647.0. |
nAPI_xxx |
Array type of any API type. Examples: nAPI_String, nAPI_DateTime. |
| Name | Type | Description |
|---|---|---|
User |
API_String |
User code defined in Solea. Example: CommUser1. This user must have insert and delete rights on Daily Tasks. The ADM user is not allowed for write operations for security reasons. |
Password |
API_String |
Password of the specified user. Example: abc123. |
DatabaseNo |
API_Number |
Database number between 1 and 8. Default is 1. If omitted, default DatabaseNo 1 will be used. |
DomainNoDomainName |
API_IntegerAPI_String |
DomainNo can be between 1 and 32. Default is 1. If DomainNo is unknown, DomainName can be used. Examples: TestFM, Domain1, Radio 1. If none is specified, default DomainId 1 will be used. |
Return data is as follows. ReturnCodes and Messages are listed in Error Codes and Messages
{
"ReturnCode": API_Number,
"Message": API_String,
...
--- Output Data ---
...
}
| Function | Description |
|---|---|
GetDailyTasks |
Retrieves the list of Daily Tasks for selected Item Types(Commercials, News, Play Lists etc.). Recommended method is GET. |
SetCommercialPlan |
Deletes and inserts commercial plan data into the Solea Database. Recommended method is POST. |
GetDailyTasks is used for retrieving Daily Tasks records from Solea Database.
Input data must be JSON format and contain the following information.
| Name | Type | Description |
|---|---|---|
FormatVersion |
API_Number |
Always 100 for this type of JSON data. |
GIP |
Generic Parameters must be used in every function as input. | |
ListFromListUpTo |
API_DateTime |
Plan records between ListFrom and ListUpTo will be deleted. Difference between ListUpTo and ListFrom can be 7 days. |
ItemTypes |
nAPI_Number |
ItemType is 3 for Commercials, 4 for News, 5 for Promos. |
Columns |
nAPI_String |
It can be combination of "Rank", "ItemType", "ItemId", "ItemCode", "ItemName", "PlannedDateTime" and "BroadcastedDateTime".
Rank is the order of the record in same PlannedDateTime group. |
{
"FormatVersion": 100,
"User": "CommUser1",
"Password": "abc123",
"ListFrom": "20260422 070010",
"ListUpTo": "20260422 235959",
"ItemTypes": [3, 5],
"Columns": ["ItemCode", "PlannedDateTime", "BroadcastedDateTime", "ItemName"]
}
Return data will be a as follows:
| Name | Type | Description |
|---|---|---|
ReturnCode
Message
|
API_Number
API_String
|
See Error Codes and Messages |
ItemCount |
API_Number |
|
Columns |
nAPI_String |
Column names returned (same as input) |
Rows |
Mixed Array |
It can be combination of following columns (fields):
Rank as API_Number
ItemType as API_Number
ItemId as API_Number
ItemCode as API_String
ItemName as API_String
PlannedDateTime as API_DateTime
BroadcastedDateTime as API_DateTime
|
{
"ReturnCode": 0,
"Message": "Success",
"ItemCount": 5,
"Columns": ["ItemCode", "PlannedDateTime", "BroadcastedDateTime", "ItemName"],
"Rows": [
["C-789", "20260426 071000", "20260426 071105", "ABC Bank April Campaign Spot A"],
["C-391", "20260426 071000", "20260426 071135", "DEF Airlines April Spot A"],
["C-210", "20260426 071000", "20260426 071218", "GHI Telecom"],
["C-643", "20260426 071000", "20260426 071105", "JKL Automobiles April"],
["P-023", "20260426 071500", "20260426 071600", "Promo 1"]
]
}
SetCommercialPlan is used for deleting and inserting commercial plan data into the Solea Database.
Input data must be JSON format and contain the following information.
| Name | Type | Description |
|---|---|---|
FormatVersion |
API_Number |
Always 100 for this type of JSON data. |
GIP |
Generic Parameters must be used in every function as input. | |
DeleteFromDeleteUpTo |
API_DateTime |
Plan records between DeleteFrom and DeleteUpTo will be deleted. DeleteFrom cannot be less than current date-time. It is usually equal to the first item's date-time. If DeleteFrom is empty, current date-time or the first item's date-time will be considered automatically. DeleteUpTo is usually equal to the last item's date-time. If DeleteUpTo is empty, current date's 23:59:59 will be considered automatically. |
InsertFromInsertUpTo |
API_DateTime |
If InsertFrom is empty, the first item's date-time will be considered. If InsertUpTo is empty, the last item's date-time will be considered. |
ItemCount |
API_Number |
Number of items. It must be equal to the number of items in item arrays and is used for consistency checking. |
Columns |
nAPI_String |
It can be combination of "PlannedDateTime", "ItemCode", "ItemId", "ItemName", "Locations" and "Stations". |
Rows |
Mixed Array |
It can be combination of following columns (fields):
PlannedDateTime: Planned date time of of spot as API_DateTime.
ItemCode: Code of the item in Solea as API_String. When ItemId is unknown, it must be preffered.
ItemId: Id of the item in Solea as API_Number. When ItemId is unknown, ItemCode can be used preffered.
ItemName: Name of the item as API_String. It is not used currently.
Locations: Bit packed value of locations as API_Number. A spot can be planned for more than one location. Location0 represents Radio. Location1 to Location31 represent Multi-Broadcast Module locations. Location values can be between 1 and 4294967295
Stations: Planned stations array as nAPI_String. Rarely used for Multi-Station Module.
Example for Locations: Just Radio = 1 (2^0) Radio and Location2 = 5 2^0 + 2^2) Location2, Location3 and Location5 = 44 (2^2 + 2^3 + 2^5) Example for Stations: [["S01", "S07"], ["S01"], ["S08", "S07", "M03"]] |
{
"FormatVersion": 100,
"User": "CommUser1",
"Password": "abc123",
"DeleteFrom": "20260422 070010",
"DeleteUpTo": "20260422 235959",
"InsertFrom": "20260422 070010",
"InsertUpTo": "20260422 225000",
"ItemCount": 3,
"Columns": ["PlannedDateTime", "ItemCode"],
"Rows": [
["20260422 071000", "9458-46"],
["20260422 071000", "4298-51"},
["20260422 225000", "9458-46"]
]
}
Return data will contain just ReturnCode and Message in Generic Output format.
| Return Code | Message |
|---|---|
0 | Success |
1000 | Database read/write error! |
1001 | JSON data has 0 length! |
1002 | End of JSON data must have "}" character! |
1003 | Invalid JSON format! Correct it and retry. |
1021 | DatabaseNo must be between 1 and 8! |
1022 | DomainName cannot be found! |
1023 | DomainNo must be between 1 and 32! |
1031 | ItemCount cannot be 0! |
1051 | User is not specified! |
1052 | ADM user is not allowed to write to database over API! |
1053 | User cannot be found! |
1054 | User is expired (User's Expire Date is less than today)! |
1055 | Password is expired (Password's Expire Date is less than today)! |
1056 | Incorrect password! |
1081 | Field is not set! |
1082 | Field value is invalid! |
1083 | Field1 must be greater than or equal to Field2! |
1084 | Field1 or Field2 must be set!' |
1085 | Array's item count is different than expected! |
1086 | Difference between Field2 and Field1 is out of range! |
1101 | User doesn't have enough rights for this operation! |
1206 | These code(s) are not defined in Solea! |
9998 | Data read error! Use POST method to send data instead of GET. |
9999 | Unknown Error! |