Managing Targeting Groups

Introduction

The targeting group is the entity where you set the targeting options for distribution. Targeting groups are made up of the various targeting options available for that campaign type. This can include ages, genders, OS, among other things.

One campaign can have multiple targeting groups. For example, a single campaign can target the following.

Campaign: US, UK, CA

  1. Female users with an age of 25+

  2. Both Male and Female users 50+ using operating system 12+

Bids can be set on 3 levels within a targeting group.

  1. Default bid level: this covers the bid for the entire target group.

  2. Country level: allows you to adjust the targeting group’s default bids for a single country or multiple countries.

  3. Sub-publisher level: here you can adjust the bids for each sub-publisher app within each country selection.

In addition to adjusting the bids, this API can deny certain sub-publisher's apps from a targeting group.

Get the list of targeting groups

https://prod.adjoe.zone/v2/campaign-management-api/public/%TOKEN%/targeting-groups
  • %TOKEN%

    The token is a hex string, which is given to the advertiser by the account manager.

  • Method:

    The http request type

    GET

  • URL Query Parameters

    Querying active targeting groups follows a similar way to querying active campaigns. By default, all targeting groups for all campaigns are returned. However, it is possible to exclusively query active targeting groups. The query response will be limited to 1000 targeting groups in response. The next batch of targeting groups can be obtained by making the request with the NextKey from the previous request as the paging_key. The number of targeting groups to return is controlled by the limit parameter. If NextKey is missing or set to null you have reached the final page and there are no more results. Optional: active_only=true paging_key=eyJLZXkiOiJhYmMxMjMifQ== limit=100

  • Success Response:

    When successful, the API responds with a http OK status code, and a valid json object. There will be one item in Content for each targeting group in the adjoe system. A campaign can have multiple targeting groups.

    • Code: 200

      Content-Type: application/json; charset=utf-8

      Content:

      {
        "Content": [
            {
              "CampaignUUID": "00b8aaf6-b51c-407f-a680-cfba796779ad",
              "CampaignType": "playtime",
              "BidType": "CPI",
              "ExternalCampaignID": "abc123",
              "AppID": "com.app.1",
              "Countries": [
                "US"
              ],
              "TargetingGroupUUID": "9cec5527-c47e-4a6c-9e5f-eaff16bcba8a",
              "ExternalID": "xyz456",
              "ExternalName": "APP_US_M_21+",
              "Active": true,
              "Bid": 1.05,
              "CountryBids": [
                  {
                    "Countries": ["US"],
                    "Bid": 1.2,
                    "BidType": "CPI",
                    "PublisherAppBids": [
                        {
                          "SubPublisherUUID": "e2529662-77ed-4072-8389-b023e867e393",
                          "Bid": 0.8
                        },
                        {
                          "SubPublisherUUID": "f3f66e52-50e4-40e4-9866-6ff0e42e0134",
                          "Bid": 1.2
                      }
                    ]
                 }
              ],
              "InstallLimits": {
                "Daily": 100,
                "Total": 10000
              },
              "BudgetLimits": {
                "Daily": 0,
                "Total": 0
              },
              "BudgetCapsUUIDs": ["cb7744d4-a6a1-4bb6-931e-c99e385fc9bb"]
            }
        ],
        "NextKey": "eyJLZXkiOiJhYmMxMjMifQ=="
      }

    JSON schema definition

  • Error Response:

    The API does respond with different status codes, depending on the error:

    • Code: 401 UNAUTHORIZED

      If the authorization fails, the API returns status code 401 with error message.

      Content-Type: application/json; charset=utf-8

      Content:

      {
          "error" : "invalid token"
      }
    • Code: 400 BAD REQUEST

      If one of the URL parameters has a wrong format, the API returns status code 400 with error specific message.

      Content-Type: application/json; charset=utf-8

      Content:

      {
          "error": "active_only format is wrong. Please use true or false."
      }
  • Sample Curl Call:

    curl -X GET \
     'https://prod.adjoe.zone/v2/campaign-management-api/public/%TOKEN%/targeting-groups?active_only=true&limit=100'

Updating a single targeting group

https://prod.adjoe.zone/v2/campaign-management-api/public/%TOKEN%/campaign/%CAMPAIGN_UUID%/targeting-group/%TARGETING_GROUP_UUID%
  • %TOKEN%

    The token is a hex string, which is given to the advertiser by the account manager.

  • %CAMPAIGN_UUID%

    The unique UUID of the campaign obtained by previously fetching the available campaigns/targeting groups.

  • %TARGETING_GROUP_UUID%

    The unique UUID of the targeting group obtained by previously fetching the available targeting groups.

  • Method:

    The http request type

    PUT

  • Request body

    Content

     {
       "Bid": 1.04,
       "CountryBids": [
          {
            "Countries": ["US"],
            "Bid": 1.2,
            "PublisherAppBids": [
              {
                "SubPublisherUUID": "e2529662-77ed-4072-8389-b023e867e393",
                "Bid": 0.8
              },
              {
                "SubPublisherUUID": "f3f66e52-50e4-40e4-9866-6ff0e42e0134",
                "Bid": 1.2
              }
            ]
          },
          {
            "Countries": ["GB"],
            "Bid": 1.0,
            "PublisherAppBids": [
              {
                "SubPublisherUUID": "3c9713d3-488a-494d-ad81-135c115289c5",
                "Bid": 0.5
              },
              {
                "SubPublisherUUID": "4069505b-05c3-4956-b895-90d58e96d9d0",
                "Bid": 1.4
              }
            ]
         }
       ],
       "InstallLimits": {
         "Daily": 0,
         "Total": 0
       },
       "BudgetLimits": {
         "Daily": 100.1,
         "Total": 0,
       },
       "DeniedSubPublisherUUIDs": ["5390d1f0-d1b2-4ea3-a95b-50e9d407df26"]
     }

    Fields that are not included in the json body will not be updated. This doesn't apply to items in the CountryBids array. If the CountryBid is no longer present for some Countries it is considered to be removed and adjoe will take the targeting groups bid. You can, however, leave out the "CountryBids" field completely and then adjoe will not make and update to them. Similarly if a SubPublisherUUID is removed from a CountryBid we will use the Bid from the Countries. It is only possible to set either an install limit or a budget limit on a targeting group. If you want to remove the install limit, please set both InstallLimits.Daily and InstallLimits.Total to 0.

  • Success Response:

    When successful, the API responds with a http OK status code and a valid json object.

    • Code: 200

      Content-Type: application/json; charset=utf-8

      Content:

      {
          "TargetingGroupUUID": "9cec5527-c47e-4a6c-9e5f-eaff16bcba8a",
          "ExternalID": "xyz456",
          "ExternalName": "APP_US_M_21+",
          "Active": true,
          "Bid": 1.04,
          "CountryBids": [
            {
              "Countries": ["US"],
              "Bid": 1.2,
              "PublisherAppBids": [
                {
                  "SubPublisherUUID": "e2529662-77ed-4072-8389-b023e867e393",
                  "Bid": 0.8
                },
                {
                  "SubPublisherUUID": "f3f66e52-50e4-40e4-9866-6ff0e42e0134",
                  "Bid": 1.2
                }
              ]
            },
            {
              "Countries": ["GB"],
              "Bid": 1.0,
              "PublisherAppBids": [
                {
                  "SubPublisherUUID": "3c9713d3-488a-494d-ad81-135c115289c5",
                  "Bid": 0.5
                },
                {
                  "SubPublisherUUID": "4069505b-05c3-4956-b895-90d58e96d9d0",
                  "Bid": 1.4
                }
              ]
           }
         ],
          "BudgetLimits": {
            "Daily": 100.1,
            "Total": 0
          },
          "DeniedSubPublisherUUIDs": ["5390d1f0-d1b2-4ea3-a95b-50e9d407df26"],
          "BudgetCapsUUIDs": ["cb7744d4-a6a1-4bb6-931e-c99e385fc9bb"]
      }

    JSON Schema definition

  • Error Response:

    The API does respond with different status codes, depending on the error:

    • Code: 401 UNAUTHORIZED

      If the authorization fails, the API returns status code 401 with error message.

      Content-Type: application/json; charset=utf-8

      Content:

      {
          "error" : "invalid token"
      }
    • Code: 404 NOT FOUND

      If either the campaign or the targeting group does not exist.

      Content-Type: application/json; charset=utf-8

      Content:

      {
          "error": "resource is unknown"
      }
  • Sample Curl Call:

    curl -X PUT \
      'https://prod.adjoe.zone/v1/campaign-management-api/public/%TOKEN%/campaign/%CAMPAIGN_UUID%/targeting-group/%TARGETING_GROUP_UUID%' \
      --data-raw '{
          "Bid": 1.04,
          "CountryBids": [
            {"Countries": ["US"],"Bid":1.2,"PublisherAppBids":[{"SubPublisherUUID":"e2529662-77ed-4072-8389-b023e867e393","Bid":0.8},{"SubPublisherUUID":"f3f66e52-50e4-40e4-9866-6ff0e42e0134","Bid": 1.2}]},
            {"Countries":["GB"],"Bid":1.0,"BidType":"install","PublisherAppBids":[{"SubPublisherUUID":"3c9713d3-488a-494d-ad81-135c115289c5","Bid":0.5},{"SubPublisherUUID":"4069505b-05c3-4956-b895-90d58e96d9d0","Bid": 1.4 }]}
          ]}'

Getting a single targeting group by UUID

https://prod.adjoe.zone/v2/campaign-management-api/public/%TOKEN%/targeting-groups/%TARGETING_GROUP_UUID%%
  • %TOKEN%

    The token is a hex string, which is given to the advertiser by the account manager.

  • %TARGETING_GROUP_UUID%

    The key is a UUIDV4 string, which is assigned to a targeting group resource on creation.

  • Method:

    The http request type

    GET

  • Success Response:

    When successful, the API responds with a http OK status code, and a valid json object. There will be one item in Content for each targeting group in the adjoe system. A campaign can have multiple targeting groups.

    • Code: 200

      Content-Type: application/json; charset=utf-8

      Content:

        {
          "CampaignUUID": "00b8aaf6-b51c-407f-a680-cfba796779ad",
          "ExternalCampaignID": "abc123",
          "AppID": "com.app.1",
          "Countries": [
            "US"
          ],
          "TargetingGroupUUID": "9cec5527-c47e-4a6c-9e5f-eaff16bcba8a",
          "ExternalID": "xyz456",
          "ExternalName": "APP_US_M_21+",
          "Active": true,
          "Bid": 1.04,
          "CountryBids": [
            {
              "Countries": ["US"],
              "Bid": 1.2,
              "PublisherAppBids": [
                {
                  "SubPublisherUUID": "e2529662-77ed-4072-8389-b023e867e393",
                  "Bid": 0.8
                },
                {
                  "SubPublisherUUID": "f3f66e52-50e4-40e4-9866-6ff0e42e0134",
                  "Bid": 1.2
                }
              ]
            },
            {
              "Countries": ["GB"],
              "Bid": 1.0,
              "PublisherAppBids": [
                {
                  "SubPublisherUUID": "3c9713d3-488a-494d-ad81-135c115289c5",
                  "Bid": 0.5
                },
                {
                  "SubPublisherUUID": "4069505b-05c3-4956-b895-90d58e96d9d0",
                  "Bid": 1.4
                }
              ]
           }
          ],
          "InstallLimits": {
            "Daily": 100,
            "Total": 10000
          },
          "BudgetCapsUUIDs": ["cb7744d4-a6a1-4bb6-931e-c99e385fc9bb"]
        }

    JSON schema definition

  • Error Response:

    The API does respond with different status codes, depending on the error:

    • Code: 401 UNAUTHORIZED

      If the authorization fails, the API returns status code 401 with error message.

      Content-Type: application/json; charset=utf-8

      Content:

      {
          "error" : "invalid token"
      }
    • Code: 404 NOT FOUND If the targeting group cannot be found Content-Type: application/json; charset=utf-8 Content:

      {
          "error" : "resource is unknown"
      }
    • Code: 400 BAD REQUEST

      If one of the URL parameters has a wrong format, the API returns status code 400 with error specific message.

      Content-Type: application/json; charset=utf-8

      Content:

      {
          "error": "active_only format is wrong. Please use true or false."
      }
  • Sample Curl Call:

    curl -X GET \
      'https://prod.adjoe.zone/v2/campaign-management-api/public/%TOKEN%/targeting-group/%TARGETING_GROUP_UUID%'

Last updated