Skip to main content

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.

  • User ID: Where is the User ID stored? (See frontend profile)

  • Access Token: Where is the Access Token stored? (See API settings)

Endpoints

  • Endpoint for Admin: https://SUBDOMAIN.de/ws/V6/admin/JSON/Admedia

  • Endpoint for Advertiser: https://SUBDOMAIN.de/ws/V6/advertiser/JSON/Admedia


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:

  • Ad Media ID: Integer

  • Ad Media Title: String

  • Ad Media Category: String

  • View Link: String

  • Click Link: String

  • View Link (Shortener): String

  • Click Link (Shortener): String

  • Adcode: String