Admedia Webservice


Admedia API (V6) - POST (Create)

Einleitung

To create ad media via an automated process rather than manually in the easy.affiliate system, easy Marketing GmbH provides a web service API. For this purpose, each user has an Authentication Token and a Login ID available, which are provided via the frontend.

Endpoints


Example with cURL

Bash
curl -X POST -H "Content-Type: application/json" -H "X-Network-ID: -1" -H "X-Auth-Token: ADMIN_APIUSER_TOKEN" -H "X-Auth-ID: ADMIN_APIUSER_LOGIN_ID" -d "$EXAMPLE_JSON_DATA" https://DOMAIN/ws/V6/admin/JSON/Admedia

Code Example

Ad media can be created using the following format. An example request looks like this:

Headers:

HTTP
Content-Type: application/json
X-Network-ID: -1
X-Auth-Token: ADMIN_APIUSER_TOKEN
X-Auth-ID: ADMIN_APIUSER_LOGIN_ID

Body:

JSON
{
    "campaign_id": 1,
    "project_ids": [50012],
    "title": "Ad Media Title",
    "deeplink": "https://example.de/link",
    "category_id": 5,
    "mediatype": "text",
    "linktext": "Click here",
    "status": 1
}


Parameter Explanations

Headers

Variable Meaning Data Type
Content-Type The Content-Type of the request String
X-Network-ID The client (tenant) ID or -1 Integer
X-Auth-Token The API authentication token of the admin user String
X-Auth-ID The ID of the admin user Integer

Body

Parameter Explanation Data Type Required
campaign_id ID of the campaign Integer Yes
project_ids Whitelist of project IDs JSON Array No
title Title of the ad media String Yes
deeplink Deeplink of the ad media String Yes
category_id ID of the category Integer Yes
click_tracking_getparameter Click tracking parameters String No
valid_from "Valid from" date String No
valid_until "Valid until" date String No
mediatype Type of ad media (e.g., text, banner) String Yes
linktext Link text String Yes, if type is text
imageurl Image URL String Yes, if type is banner
size_width Width of the banner String Yes, if type is banner
size_height Height of the banner String Yes, if type is banner
status Status of the ad media Integer Yes

Response

Upon successful creation, the API returns the following information as JSON:

Admedia API (V6) - GET (Read)

Querying Generated Ad Media via the V6 REST-API

To ensure simple and efficient management of generated ad media, the V6 REST-API provides a query function. This feature allows users to retrieve relevant data regarding the ad media and their corresponding tracking links.

Endpoint

Required Parameters


Example Request with cURL

Bash
curl -X GET -H "Content-Type: application/json" -H "X-Network-ID: -1" -H "X-Auth-Token: ADMIN_APIUSER_TOKEN" -H "X-Auth-ID: ADMIN_APIUSER_LOGIN_ID" https://DOMAIN/ws/V6/admin/JSON/Admedia?campaign_id=1&project_id=50001

Expected Response

Upon a successful request, the API returns the following information about the ad media in JSON format:


📘 Error Handling