Contents
The API is documented using Swagger. It provides this access point for development:https://int.audioxchange.de
The swagger page can be reached with this path:https://int.audioxchange.de/swagger/index.html
For each available version of the API, the complete definition is available.
Access to functions is always based on the pattern
/api/v{version}/{controller}/{function}{parameters}
As an example, to search for campaigns you can use something like:
api/v0.9/Campaign/FindCampaign?campaignId=4711
api/v0.9/Campaign/FindCampaign?wildcard=myCampaignName
api/v0.9/Campaign/FindCampaign?wildcard='%2B[tab;Campaign;col;Name;my campaign name]'
The assignment of functions to the controllers is defined in the swagger description. Please note that the assignment is not identical to or derived from the swagger definition.
All relevant fields contained in the JSON objects accepted by the API can be classified into the following categories according to their accessibility:
Categories | Description | Display in Swagger |
Required | Fields marked as required must be defined in JSON and cannot be set to null. | Required fields are indicated by red asterisk. For example: ![]() |
Optional |
These fields are not required and can be missing in JSON. Attention: If a field is not available in JSON, then its database value will be overwritten with the default value of its data type. |
Optional fields are not specially marked. For example: ![]() |
Repeat Value on Update | These should always be provided in the unchanged (= read out) state. Leave the fields empty on creation of object. | The fields are decorated with the readonly: true annotation. For example: ![]() |
Computed | The values are provided to the user. The fields are computed automatically and cannot be set via the API. Passing the values with JSON is optional - they are ignored. |
The fields are marked analogous to the category "Repeat Value on Update". For example: ![]() |
Wildcard Search | This field type can be combined with any of the aforementioned field types. |
These are annotated with the description Attribute is available for wildcard searches. For example: ![]() |
The API provides many functions which act similar. For each type of functions, the common behavior is outlined in this chapter to simplify understanding of the API. Nevertheless, some functions provide additional or different parameters.
The JSON returned is filtered for performance reasons to skip some of the data available. In general, the objects returned at the top level are complete, but detail objects may be truncated. In these cases, the detail objects can be queried directly to read the missing data. As an example, a request for a campaign might return details on people involved (planner, buyer, ...) but the details provided will include a name of the person but not all available fields.
The OBP uses cookies for authentication. These cookies must be passed with every access. The only anonymous calls are
(Additional functions will follow for registration of new organizations)
HTTP Get is used to query data. It returns either a single object or a list of objects.
Common Parameters | Description | |
Id | Optional | Id of the object. Restricts the results to only one object. |
Wildcard | Optional |
Filters the data with a general filter. The data returned is always limited to the table queried. No details are returned. This general search is performed whenever the id is not specified as search parameter. |
DepthSearch | Optional |
Depth of hierarchy to be searched for wildcard searches. Example: when searching for a campaign, a level of
Default value: 0 – search in the object itself only. |
DepthResult | Optional |
Depth of hierarchy to be returned. Example: when searching for a campaign, a level of
Default value: 0 – do not return details. |
MaxRecords | Optional |
All requests returning a list of records provide a parameter to limit the number of rows returned by the top-level object.
|
SelectDetail | Optional |
The result sets returned are filtered to optimize performance of the platform. In some cases, details on top-level are not included to speed up the queries.
Parameter SelectDetail can be used to restrict query and result to one detail only (without subdetails). Parameter depthResult is ignored in this case, and depthSearch is implicitly set to 1. Examples:
Default value: null. |
Wildcard searches search in a defined depth, i.e. a range of database tables reached with a defined number of joins, on a predefined list of columns that are available for searches.
Wildcard searches support this syntax:Search expression | Restriction | Search text | Remark | |
Table | Column | |||
[tab;tablename;col;columnname;searchtext] | tablename | columnname | searchtext | The search is restricted to table "tablename" and column "columnname". |
[tab;tablename;searchtext] | tablename | searchtext | The search is restricted to table "tablename". | |
[col;columnname;searchtext] | columnname | searchtext | The search is restricted to column "columnname" in any table searched. | |
[tab;Campaign;col;Name;campaign xxx] | Campaign | Name | campaign xxx | The search is restricted to exactly one column in one table. |
[col;Name;campaign xxx] | Name | campaign xxx | The search is restricted to any table with a column named 'Name'. |
HTTP Post is used to create data. In most cases, the data is passed with the body parameter. When creating data, field Id must not be set and these fields are ignored:
Some functions to create data allow detail data to be created immediately.
HTTP Put is used to update data or to call functions.
A call to put may create detail data. As an example, you can
To distinguish between new detail objects and modified detail objects, the id of the detail object is used:
To delete detail objects, the details are removed from the parent collection. This leads to a delete of the missing objects.
When an object is updated, it automatically updates its detail objects. These operations are performed:
To keep a slim interface, an additional field “KeepMissingDetailsOnUpdate” exists on all classes. This field is not persisted. If it is set to true in an update operation, the check for missing details is skipped, allowing to pass only new or modified details to the server. For more details please refer to the subchapter 3.7.1 KeepMissingDetailsOnUpdate.
HTTP Patch is used to update partial resources. This is not supported by this API.
HTTP Delete is used to delete data. For this, the object itself is generally passed as the body parameter for verification of the row version. Depending on the data, this operation leads either to a delete on the database or the data as marked as no longer available.
For many objects, delete operations are performed using put-operations on the parent object.
In order to delete non-desired child/subordinate entities from the database, do not provide them in a JSON passed in and set the value of the KeepMissingDetailsOnUpdate key to false while updating/modifying the corresponding parent entity. Once KeepMissingDetailsOnUpdate has been set, it will have the following impact on the delete behavior depending on the parent it has been applied for:
Parent Entity | JSON Example | Deletion Effects |
Campaign | ![]() |
|
CampaignElement | ![]() |
|
<other tables> | Analogous to the tables above. |
Parameter | Value | Category | Description |
Content-Type | application/json | Required, optional for requests without body parameter. | This value must be set for all requests using body parameters. |
OnBehalfOfOrganizationId | 4711 | Optional | Work for another organization. Subagencies may work for the main agency, and platform administrators may work for any organization. |
ContextInfo | e.g. "MySignInTest" | Optional, recommended | A short information used to identify the calling context. This is copied to the log to simplify tracing problems. |
X-Requested-With | XMLHttpRequest | Optional - tested only by users of API | This value might help to avoid an automatic redirect on unsuccessful authentication, leading to an error code 401 instead of 302. |
Common Parameters | Description | |
Version | Required |
The version of the API used, e.g. “0.9”. The target is |
To simplify updates, the API is designed to provide multiple versions at the same time. All concurrently available versions target the same database. When a new API version is made available, older versions that can be kept active are mapped internally to the new version, e.g. by providing default values or by mapping values to new functionality. If an old version is kept active, it is marked as deprecated and will be disabled within a reasonable time frame.
There can be cases when old versions cannot be mapped automatically to new versions. In this case, the old versions will be set inactive with go live of the new version.
Active versions of the API are available in the Swagger documentation. For each API request, the version must be specified as a path parameter (see chapter 2, Access to the API, or 3.9, Path Parameters).
To use the examples, store all examples in one directory using the filename suggested.
To run an example, open powershell in the directory. Powershell version 7 or above is recommended.
Filename | Usage | Remark | File Content |
functions.ps1 | . .\functions.ps1 | Utilities used by other scripts | |
login.ps1 | . .\login.ps1 |
Provide passwords in your copy of the file.
Run this once to store login information in the variables. Due to timeouts defined this needs to be repeated after longer idle time. |
|
workflow1.ps1 | . .\workflow1.ps1 |
A complete workflow script.
The 1st block of commands (before line 'ObpDocument "create a campaign"') depends on the agency / marketer used. Adapt wildcard searches to your needs/data. Run .\ .login.ps1 first. |
For a rule to be executed, this information/data is required:
Notes:
These common actions are available:
Action | Description | Context Data | Processing Data |
Send a message | Send an email and/or notification, depending on the user preferences. | The data item triggering the event. Starting with this data item, parts of the item and data related to this item can be used in the messages. Details are described below. |
Parts of the message:
|
Update a worklist | Reprocess a worklist for an item, i.e. update the worklist of all users to include or not include an item. | The data item triggering the event. | The worklist to update. |
To refer to item data within messages, there are two possibilities:
Starting string | Context | Description |
Object:: | Get property from object. | Read a property value directly from an item data, e.g. [Object::Id] or [Object::BuyerId]. |
Account:: | Get Id of account for email / notifications. | For message elements "mail to" and mail cc", an account id is required. To define elements sending mails to fixed accounts (not depending on item data), pass in [Account::<username>]. |
ParameterNew:: | Use event parameterNew. | Directly insert the value provided in the event as "ValueNew" into the message. This is used to provide special data, e.g. an automatically created password, to an email. |
Send a mail when a password is reset:
{
"OrganizationId": 1,
"Name": "AccountResetPassword",
"EmDefinition": { "OrganizationId": 1, "Name": "AccountResetPassword", "EmEventType": "AccountResetPassword", "DbTableId": "Account" },
"EmAction" : { "OrganizationId": 1, "Name": "SendMail", "ActionType": "SendMessage" },
"Active" : true,
"EmMessageElements": [
{ "OrganizationId": 1, "Name": "MailT_AccountResetPassword", "EmContentType": "MailTo" , "Content": "[Object::Id]" },
{ "OrganizationId": 1, "Name": "MailC_AccountResetPassword", "EmContentType": "MailContent", "Content": "Password: @[ParameterNew::]@" },
{ "OrganizationId": 1, "Name": "MailS_AccountResetPassword", "EmContentType": "MailSubject", "Content": "AccountResetPassword Username=@[Object::Username]@, Id=@[Object::Id]@." }
]
}
Notify platform admin after an organization is created:
{
"Id": 19,
"OrganizationId": 1,
"Name": "CreateOrganizationNotify_OrgAdmin",
"EmDefinition": { "OrganizationId": 1, "Name": "OrganizationChangeActiveState", "EmEventType": "OrganizationChangeActiveState", "DbTableId": "Organization" },
"EmAction" : { "OrganizationId": 1, "Name": "SendMail", "ActionType": "SendMessage" },
"Active" : false,
"EmMessageElements": [
{ "OrganizationId": 1, "Name": "MailT_OrganizationCreate", "EmContentType": "MailTo" , "Content": "[Object::Id]" },
{ "OrganizationId": 1, "Name": "MailS_OrganizationCreate", "EmContentType": "MailSubject", "Content": "OrganizationChangeActiveState [Object::Name]@, Id=@[Object::Id]@, set to state @[ParameterNew::]@, state=@[Object::Active]@." },
]
}
English | German |
Address | Adresse |
Advertiser | Werbetreibender/Kunde |
Agency | Agentur |
Booking plan | Belegungsplan |
Broadcasting company | Rundfunkanstalt (Betreiber) |
Broadcasting station, Broadcaster | Radiosender |
Campaign | Kampagne |
Campaign element | Kampagnenelement |
Channel | Sender |
Competition | Konkurrenz |
Contact | Kontaktperson |
Document | Dokument |
Gross | Brutto |
Marketer | Vermarkter |
Motif | Motiv |
Net | Netto |
Offer | Angebot |
Offer type | Angebotsform (Produkt des Vermarkters) |
Order | Auftrag |
Organization | Unternehmen |
Person | Person |
Plan | Plan |
Plan element | Planelement |
Product | Produkt (des Werbetreibenden) |
Reminder | Reminder (Tandem, Tridem, Multispot) |
Spot | Schaltung, Termin, Werbespot |
User | Anwender |
Period | Zeitraum |
Time schedule | Terminplan |
Variation plan | Streuplan |