API: POST Campaign
Overview
A campaign is the total marketing budget for a given card-linked offer. It can be 1:1 with an offer in the Banyan platform, or it can be 1:many, campaigns to offers. For example, if you wanted to test two different regions with different offers using the same marketing budget, you would set up a single campaign within the Banyan network and two different offers.
Banyan has an internal ID created by POST-ing to the /campaign endpoint with your Banyan ID. You will then include the byn_campaign_id returned in the response when setting up your offers.
Developers, please see the API reference for an interactive experience.
Note: CLOs with Banyan are typically priced per campaign, not offer.
URL
api.banyan.com/rest/v1/campaign
Body
Name | Description | Type | Notes |
---|---|---|---|
byn_publisher_id | The ID given to your organization from Banyan | String | Reach out to your Customer Support representative if you are unsure what your byn_publisher_id is |
name | The name of the campaign | String | This is an optional field which will make it easier to use the GUI for finding the campaign you wish to create an offer with |
Example:
POST http://api.banyan.com/rest/v1/campaign
Bearer: {token_id}
Content-Type: application/json
Accept: application/json
{
"byn_publisher_id": 106,
"name": "Sample Campaign"
}
Response
Example:
POST http://api.banyan.com/rest/v1/campaign
Bearer: {token_id}
Content-Type: application/json
Accept: application/json
{
"data": [
{
"id": "cf8f9c27-f1da-580f-9316-3350333d234c",
"byn_publisher_id": 106,
"created_ts": "2022-12-06T21:41:36.422056Z"
}
],
"errors": []
}
Response Codes and Notes
Code | Description | Notes |
---|---|---|
201 | Campaign successfully created | Response will contain the Banyan ID of the campaign created |
409 | Status Conflict | Record did not save |
400 | General purpose state for client side issues | Refer to the response for details specific to the issue |
500 | General purpose state for server side issues | Refer to the response for details specific to the issue |
Updated about 1 year ago