Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Documentation: Admedia API (V6) - POST (Create)

Introduction

The easy Marketing GmbH provides a Webservice-API to enable automated processing of Admedia in the easy.affiliate system, allowing users to create and retrieve advertising materials efficiently and effectively. Each user is provided with an Authentication Token and a Login_id for accessing this service.

Endpoint

  • Admin

    • <https://SUBDOMAIN.de/ws/V6/admin/JSON/Admedia>

  • Advertiser

    • <https://SUBDOMAIN.de/ws/V6/advertiser/JSON/Admedia>

User-ID & Access-Token

POST Request

Headers

Code Block
Content-Type: application/json
X-Auth-Token: ADMIN_APIUSER_TOKEN
X-Auth-ID: ADMIN_APIUSER_LOGIN_ID

Body

For mediatype = text:

Code Block
languagejson
{
  "campaign_id": 1,
  "project_ids": [50001],
  "title": "Sample Admedia Title",
  "deeplink": "<https://example.com/deeplink",>
  "category_id": 123,
  "mediatype": "text",
  "linktext": "Sample Link Text",
  "status": 1
}

For mediatype = banner:

Code Block
languagejson
{
  "campaign_id": 1,
  "project_ids": [50001],
  "title": "Sample Banner Title",
  "deeplink": "<https://example.com/deeplink",>
  "category_id": 123,
  "mediatype": "banner",
  "imageurl": "<https://example.com/imageurl",>
  "size_width": "300",
  "size_height": "250",
  "status": 1
}

Parameter explanation

Headers

Header

Description

Data Type

Content-Type

Defines the content type of the request.

String

X-Auth-Token

Stores the API Authentication Token of the Admin user.

String

X-Auth-ID

Stores the ID of the Admin user.

Integer

Body

Parameter

Beschreibung

Datentyp

Pflichtfeld

campaign_id

Stores the Campaign_id.

Integer

Mandatory

project_ids

Whitelist in the form of a JSON array, e.g., [50012].

Array

Optional

title

Title of the admedia, max 255 characters.

String

Mandatory

deeplink

The deeplink of the admedia, max 255 characters.

String

Mandatory

category_id

Stores the category ID.

Integer

Optional

mediatype

Type of the media, e.g., text or banner.

String

Mandatory

linktext

Mandatory if mediatype = text. Stored in campaign.admedia_settings.

String

Only if mediatype = text

imageurl

Mandatory if mediatype = banner, max 255 characters. Stored in campaign.admedia_settings.

String

Only if mediatype = banner

size_width

Mandatory if mediatype = banner.

String

Only if mediatype = banner

size_height

Mandatory if mediatype = banner.

String

Only if mediatype = banner

status

Stores the status.

Integer

Mandatory

Response

The API returns the created Admedia's relevant details in JSON format, such as:

  • Admedia ID: Integer

  • Admedia Title: String

  • Admedia Category: String

  • View-Link: String

  • Click-Link: String

  • View-Link (Shortener): String

  • Click-Link (Shortener): String

  • Adcode: String

Example with cURL

For mediatype = text:

Code Block
languagebash
curl -X POST \
     -H "Content-Type: application/json" \
     -H "X-Auth-Token: ADMIN_APIUSER_TOKEN" \
     -H "X-Auth-ID: ADMIN_APIUSER_LOGIN_ID" \
     -d '{
         "campaign_id": 1,
         "project_ids": [50001],
         "title": "Sample Admedia Title",
         "deeplink": "<https://example.com/deeplink",>
         "category_id": 123,
         "mediatype": "text",
         "linktext": "Sample Link Text",
         "status": 1
     }' \
     <https://SUBDOMAIN.de/ws/V6/admin/JSON/Admedia>

Notes

  • Replace SUBDOMAIN with your actual subdomain.

  • Please include the appropriate authentication tokens if required by your API.

  • Ensure that you replace placeholder data with actual data suitable to your application.