1

API Publisher Help

Documentation for the public Publisher API

Gunnar Militz

Last Update há 3 meses

✔️ Auth

Requests to this API requires a JWT Authentication Token. You need to have a Publisher account on mcanism and it's credentials to generate a token. Your token will have access to all and only the resources your account on mcanism has access to. Please follow the following flow to obtain a token.

Make a POST https://api.skynet.mcanism.com/rest-auth/login/ request with the following JSON payload (with the appropriate Content-Type header)

✔️ The shape of expected response to the request should look like:

You can find your JWT token in the token property of the response JSON. To authenticate your API requests from here on out, you will have to add a header to the request with the key Authorization and it's value set to JWT [YOU TOKEN].

✔️ AdSpaces

To get a list of all the AdSpaces you have in your account, make a GET request to /api/v1/publisher/adspaces/.Campaigns

✔️ Campaigns

To get a list of all the available campaigns and your adspace approvals for them, make a GET request to /api/v1/publisher/campaigns/. To apply to a campaign, you can make a POST request to /api/v1/publisher/campaigns/apply/ with the following JSON body:

✔️ Advertisements

To get a list of all the available advertisements for a campaign, you can make a GET request to /api/v1/publisher/advertisements/?offer={CampaignID}. This endpoint also supports getting a list of all the advertisements if you omit the offer query parameter.

✔️ Creating Tracking Link

To create a tracking link for a specific advertisement, you can make a POST request to /api/v1/publisher/advertisements/links/ with the following body:

✔️ Tracking Link Parameters

You can add custom parameters and deeplink parameter to a tracking link and save that preference using the parameters endpoint. To get a list of all your parameters for a given campaign and media combination, you can make a GET request to /api/v1/publisher/advertisements/links/parameters/?offer={CampaignID}&media={AdSpaceID}. To add a new parameter to the combination, you can make a POST request to the /api/v1/publisher/advertisements/links/parameters/ endpoint with the following body:

The valid parameter names are:

✔️ Reports

- Click Report: Make a GET request to /api/v1/publisher/clicks/.

- Performance Report: Make a GET request to /api/v1/publisher/performance/.

- Transaction Report: Make a GET request to /api/v1/publisher/transactions/

Was this article helpful?

0 out of 1 liked this article

Still need help? Message Us