Solea API Reference

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.30.

General Rules

Recommended POST Request Example

POST /SetCommercialPlan HTTP/1.1
Host: http://192.168.1.15:9019
Content-Type: application/json; charset=utf-8

{ JSON_DATA }

Small GET Request Examples


localhost:9019/GetServerDateTime?{"Format": 100}
localhost:9019/GetAPIVersion?{"Format": 100}
Both examples can be tested on a computer where the Solea Server is running (by pasting to address bar of any web browser).

Parameter Types

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.

Generic Input Parameters (GIP)

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 read/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.
DomainNo
DomainName
API_Integer
API_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 of these 2 is specified, default DomainId 1 will be used.

Generic Output

Return data is as follows. ReturnCodes and Messages are listed in Error Codes and Messages.

{
  "ReturnCode": API_Number,
  "Message": API_String,
  ...
  --- Output Data ---
  ...
}

API Functions

Function Description
GetAPIVersion It retrieves the API version supported by current Solea Server. Recommended method is GET.
GetCommercialList It retrieves the list of commercial spots. Recommended method is GET.
GetCommercialPlan It retrieves the plan of a commercial. Recommended method is GET.
GetDailyTasks It retrieves the list of "Daily Tasks" for selected item types (Commercials, News, Play Lists etc.). Recommended method is GET.
GetServerDateTime It retrieves the current date-time of Solea Server. Recommended method is GET.
SetCommercialPlan Deletes and inserts commercial plan data into the Solea Database. Recommended method is POST.
Function

GetAPIVersion

GetAPIVersion retrieves the API version supported by current Solea Server.

Input Parameters

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.

Example JSON Input

{
  "FormatVersion": 100
}

Response

Return data will be as follows:

Field Type Description
ReturnCode
Message
API_Number
API_String
see. Error Codes and Messages
APIVersionNo API_String

Example JSON Output

{
  "ReturnCode": 0,
  "Message": "Success",
  "APIVersionNo": "1.01"
  ]
}
Function

GetCommercialList

GetCommercialList is used for retrieving the list of commercial spots from the Solea database.

Input Parameters

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.
ReceivedDateFrom
ReceivedDateUpTo
API_Date They are used for filtering the records by Received Date.
Both fields are optional. It is not mandatory to specify any of them.
StartDateFrom
StartDateUpTo
API_Date They are used for filtering the records by Plan Start Date.
Both fields are optional. It is not mandatory to specify any of them.
EndDateFrom
EndDateUpTo
API_Date They are used for filtering the records by Plan End Date.
Both fields are optional. It is not mandatory to specify any of them.
If EndDateUpto value is greater than or equal to current date, only commercial spots with an ongoing broadcast period will be listed.
Columns nAPI_String It can be combination of "CommId", "CommCode", "CommName, "ProductId", "ProductName", "NetDuration", "ReceivedDate", "StartDate, EndDate, "NumPlanned", "NumBroadcasted"

Example JSON Input

{
  "FormatVersion": 100,
  "User": "CommUser1",
  "Password": "abc123",
  "StartDate": "20260224",
  "Columns": ["CommId", "CommName", "NetDuration", "StartDate", "NumPlanned"]
}

Response

Return data will be as follows:

Field Type Description
ReturnCode
Message
API_Number
API_String
See Error Codes and Messages
RowCount API_Number
Columns nAPI_String Column names returned (same as input)
Rows Mixed Array It can be combination of following columns (fields):
CommId as API_Number
CommCode as API_String
CommName as API_String
ProductId as API_Number
ProductName as API_String
NetDuration as API_Number
ReceivedDate as API_Date
StartDate as API_Date
EndDate as API_Date
NumPlanned as API_Number
NumBroadcasted as API_Number

Example JSON Output

{
  "ReturnCode": 0,
  "Message": "Success",
  "RowCount": 4,
  "Columns": ["CommId", "CommName", "NetDuration", "StartDate", "NumPlanned"],
  "Rows": [
    [6787, "ABC Bank April Campaign Spot A", 32000, "20260226", 1320],
    [6788, "DEF Airlines April Spot A", 24000, "20260302", 784],
    [6789, "GHI Telecom", 26500, "20260302", 858],
    [6792, "JKL Automobiles April", 41000, "20260303", 1167]
  ]
}
Function

GetCommercialPlan

GetCommercialPlan is used for retrieving "Broadcast Plan" records of a commercial spot from the Solea database.

Input Parameters

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.
CommId
CommCode
API_Integer
API_String
CommId is Id of commercial spot. If it is not known, CommCode (Code of the commercial spot) can be preferred.
ListFrom
ListUpTo
API_DateTime Plan records between ListFrom and ListUpTo will be listed.
Both fields are optional. One of them or both of them may not be specified.
Status nAPI_Number Broadcast Status of the records: 0 = all, 1 = broadcasteds, 2 = unbroadcasteds. If It is not specified, 0 will be applied.
Columns nAPI_String It can be combination of "TimeType", "PlannedDateTime" and "BroadcastedDateTime".

Example JSON Input

{
  "FormatVersion": 100,
  "User": "CommUser1",
  "Password": "abc123",
  "CommId": 35,	
  "ListFrom": "20260422 070010",
  "ListUpTo": "20260422 235959",
  "Columns": ["TimeType", "PlannedDateTime", "BroadcastedDateTime"]
}

Response

Return data will be as follows:

Field Type Description
ReturnCode
Message
API_Number
API_String
See Error Codes and Messages
RowCount API_Number
Columns nAPI_String Column names returned (same as input)
Rows Mixed Array It can be combination of following columns (fields):
TimeType as API_Number
TimeType values: 1 = Normal Time, 2 = Prime Time, 3 = Special Time, 4 = Free Time.

PlannedDateTime as API_DateTime
BroadcastedDateTime as API_DateTime

Example JSON Output

{
  "ReturnCode": 0,
  "Message": "Success",
  "RowCount": 5,
  "Columns": ["TimeType", "PlannedDateTime", "BroadcastedDateTime"],
  "Rows": [
    [2, "20260426 071000", "20260426 071105"],
    [2, "20260426 081000", "20260426 081135"],
    [1, "20260426 091000", "20260426 091218"],
    [1, "20260426 101000", "20260426 101105"],
    [1, "20260426 111000", "20260426 111224"]
  ]
}
Function

GetDailyTasks

GetDailyTasks is used for retrieving "Daily Tasks" records the from Solea Database.

Input Parameters

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.
ListFrom
ListUpTo
API_DateTime Plan records between ListFrom and ListUpTo will be listed. Maximum 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.

Example JSON Input

{
  "FormatVersion": 100,
  "User": "CommUser1",
  "Password": "abc123",
  "ListFrom": "20260422 070010",
  "ListUpTo": "20260422 235959",
  "ItemTypes": [3, 5],
  "Columns": ["ItemCode", "PlannedDateTime", "BroadcastedDateTime", "ItemName"]
}

Response

Return data will be as follows:

Field Type Description
ReturnCode
Message
API_Number
API_String
See Error Codes and Messages
RowCount 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

Example JSON Output

{
  "ReturnCode": 0,
  "Message": "Success",
  "RowCount": 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"]
  ]
}
Function

GetServerDateTime

GetServerDateTime retrieves the current date-time of Solea Server. Date-time of the all Soleas are same with this date-time.

Input Parameters

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.

Example JSON Input

{
  "FormatVersion": 100
}

Response

Return data will be as follows:

Field Type Description
ReturnCode
Message
API_Number
API_String
See Error Codes and Messages
CurrentDateTime API_DateTime

Example JSON Output

{
  "ReturnCode": 0,
  "Message": "Success",
  "CurrentDateTime": "20260426 194521"
  ]
}
Function

SetCommercialPlan

SetCommercialPlan is used for deleting and inserting commercial plan data into the Solea Database.

Input Parameters

Input data must be JSON format and contain the following information.

Field Type Description
FormatVersion API_Number Always 100 for this type of JSON data.
GIP Generic Parameters must be used in every function as input.
DeleteFrom
DeleteUpTo
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 rows's PlannedDateTime. If DeleteFrom is not set, current date-time or the first rows's PlannedDateTime will be considered automatically. DeleteUpTo is usually equal to the last rows's PlannedDateTime. If DeleteUpTo is not set, current date's 23:59:59 will be considered automatically.
InsertFrom
InsertUpTo
API_DateTime If InsertFrom is not set, the first rows's PlannedDateTime will be considered. If InsertUpTo is empty, the last rows's PlannedDateTime will be considered.
RowCount API_Number Number of rows. It must be equal to number of rows in Rows field. It 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 spot as API_DateTime.
ItemCode: Code of the item in Solea as API_String. When ItemId is unknown, it can be preferred.
ItemId: Id of the item in Solea as API_Number. When ItemId is unknown, ItemCode can be preferred.
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. Location-0 represents Radio. Location-1 to Location-31 represent Multi-Broadcast Module locations. Locations value can be between 1 and 4294967295.
Stations: Planned stations array as nAPI_String. It is used for Multi-Station Module.

Examples for Locations data:
Just Radio = 1 (2^0)
Radio and Location-2 = 5 (2^0 + 2^2)
Location-2, Location-3 and Location-5 = 44 (2^2 + 2^3 + 2^5)

Example for Stations data:
[["S01", "S07"], ["S01"], ["S08", "S07", "M03"]]

Example JSON Input

{
  "FormatVersion": 100,
  "User": "CommUser1",
  "Password": "abc123",
  "DeleteFrom": "20260422 070010",
  "DeleteUpTo": "20260422 235959",
  "InsertFrom": "20260422 070010",
  "InsertUpTo": "20260422 225000",
  "RowCount": 3,
  "Columns": ["PlannedDateTime", "ItemCode"],
  "Rows": [
    ["20260422 071000", "9458-46"],
    ["20260422 071000", "4298-51"],
    ["20260422 225000", "9458-46"]
  ]
}

Response

Return data will contain just ReturnCode and Message in Generic Output format.

Error Codes and Messages

Return Code Message
   0Success
1001JSON data has 0 length!
1002End of JSON data must have "}" character!
1003Invalid JSON format! Correct it and retry.
1004Database read error!
1005Database write error!
1021DatabaseNo must be between 1 and 8!
1022DomainName cannot be found!
1023DomainNo must be between 1 and 32!
1031RowCount cannot be 0!
1051User is not specified!
1052ADM user is not allowed to read/write to database over API!
1053User cannot be found!
1054User is expired (User's Expire Date is less than today)!
1055Password is expired (Password's Expire Date is less than today)!
1056Incorrect password!
1081Field is not set!
1082Field value is invalid!
1083Field1 must be greater than or equal to Field2!
1084Field1 or Field2 must be set!
1085Array's item count is different than expected!
1086Difference between Field2 and Field1 is out of range!
1101User doesn't have enough rights for this operation!
1206These code(s) are not defined in Solea!
9998Data read error! Use POST method to send data instead of GET.
9999Unknown Error!