---
updatedAt: 2026-09-29T23:38:36.000Z
agentTools:
  projectIndex: https://dev.kevel.com/llms.txt
---

# Decision API

The Decision API enables you to make ad requests without using ad code. By posting to a RESTful endpoint, Kevel's ad engine will return decision data and creative contents that can be used to serve ads in your application.You'll want to set the Content-Type in the header as application/json. The API will also accept text/plain to support applications that cannot change the content type

<Callout icon="📘" theme="info">
  If the request does not contain a user key, one is automatically generated in the response. UserKeys are important for [Frequency Capping](https://dev.kevel.com/docs/frequency-capping-1) and [UserDB](https://dev.kevel.com/docs/userdb-1).
</Callout>

<Callout icon="👍" theme="okay">
  ### Note

  API Key authentication is not required when making a Decision API request. For added security, Kevel has the option to require API Key authentication. Please reach out to your CSM or [support@kevel.co](mailto:support@kevel.co) to enable.

  For more on authenticating requests, see this [page](https://dev.kevel.com/reference/getting-started-with-kevel#authenticating-requests).
</Callout>

## Error Handling

<Table align={["left","left"]}>
  <thead>
    <tr>
      <th>
        Message
      </th>

      <th>
        Reason(s)
      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        `Out of n% placements on the request, none were valid`
      </td>

      <td>
        * The siteId has been deleted
        * The siteId is not active
        * No siteId on the request
      </td>
    </tr>

    <tr>
      <td>
        `Keywords must be an array or string`
      </td>

      <td>
        Keywords are not a string or an array of strings
      </td>
    </tr>

    <tr>
      <td>
        `invalid JSON`
      </td>

      <td>
        JSON is not valid
      </td>
    </tr>

    <tr>
      <td>
        `Request received with no placements defined`
      </td>

      <td>
        The `placements` object or the request body is missing
      </td>
    </tr>

    <tr>
      <td>
        `No sites found`
      </td>

      <td>
        Invalid SiteId provided in the request
      </td>
    </tr>

    <tr>
      <td>
        `Count must be an integer in the interval [1, 20]`
      </td>

      <td>
        `placements.count` in the request is not between `1` and `20`
      </td>
    </tr>

    <tr>
      <td>
        `Event multiplier must be an integer in the interval [1, 100000000]`
      </td>

      <td>
        `placements.eventMultiplier` in the request is not between `1` and `100000000`
      </td>
    </tr>
  </tbody>
</Table>

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "engine-apis",
    "version": "1.0"
  },
  "servers": [
    {
      "url": "https://e-YOUR-NETWORKID.adzerk.net"
    }
  ],
  "security": [
    {}
  ],
  "paths": {
    "/api/v2": {
      "post": {
        "summary": "Decision API",
        "description": "The Decision API enables you to make ad requests without using ad code. By posting to a RESTful endpoint, Kevel's ad engine will return decision data and creative contents that can be used to serve ads in your application.You'll want to set the Content-Type in the header as application/json. The API will also accept text/plain to support applications that cannot change the content type",
        "operationId": "request",
        "parameters": [
          {
            "name": "networkId",
            "in": "path",
            "description": "Your account (network) ID",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "placements"
                ],
                "properties": {
                  "placements": {
                    "type": "array",
                    "description": "Every request must contain one or more placements. Each placement represents a \"slot\" in which an ad may be served. **Click the '+' below to view the placement object fields.**",
                    "items": {
                      "properties": {
                        "divName": {
                          "type": "string",
                          "description": "A unique name for the placement defined by you"
                        },
                        "networkId": {
                          "type": "integer",
                          "description": "The numeric network id",
                          "format": "int32"
                        },
                        "siteId": {
                          "type": "integer",
                          "description": "The numeric site id",
                          "format": "int32"
                        },
                        "adTypes": {
                          "type": "array",
                          "description": "One or more integer ad types. More info [here](doc:ad-sizes)",
                          "default": [],
                          "items": {
                            "type": "integer",
                            "format": "int32"
                          }
                        },
                        "zoneIds": {
                          "type": "array",
                          "description": "Zone IDs to use",
                          "default": [],
                          "items": {
                            "type": "integer",
                            "format": "int32"
                          }
                        },
                        "advertiserId": {
                          "type": "integer",
                          "description": "A numeric Advertiser id; if specified, only consider ads belonging to that Advertiser",
                          "format": "int32"
                        },
                        "campaignId": {
                          "type": "integer",
                          "description": "A numeric campaign id; if specified, only consider ads in that campaign",
                          "format": "int32"
                        },
                        "flightId": {
                          "type": "integer",
                          "description": "A numeric flight id; if specified, only consider ads in that flight",
                          "format": "int32"
                        },
                        "adId": {
                          "type": "integer",
                          "description": "A numeric Ad ID; if specified, only serve that ad if possible",
                          "format": "int32"
                        },
                        "clickUrl": {
                          "type": "string",
                          "description": "Override click-through URL (defaults to what is set on the Ad)"
                        },
                        "properties": {
                          "type": "object",
                          "description": "A map of key/value pairs used for [Custom Targeting](doc:custom-targeting)",
                          "properties": {
                            "age": {
                              "type": "integer",
                              "default": 29,
                              "format": "int32"
                            },
                            "segment_membership": {
                              "type": "string",
                              "default": "PRC"
                            }
                          }
                        },
                        "eventIds": {
                          "type": "array",
                          "description": "An array of numeric event types. Requests tracking URLs for custom events. More details: [Event Tracking IDs](doc:custom-event-tracking)",
                          "default": [],
                          "items": {
                            "type": "integer",
                            "format": "int32"
                          }
                        },
                        "contentKeys": {
                          "type": "object",
                          "description": "A map of key/value pairs used with [ContentDB](doc:contentdb-1). The format is `\"contentKeys\": {\"schema\": \"contentKey\"}.`",
                          "properties": {
                            "audience": {
                              "type": "string",
                              "description": "*example key/value pair*",
                              "default": "B2B"
                            },
                            "businesses": {
                              "type": "string",
                              "description": "*example key/value pair*",
                              "default": "sportingGoods"
                            }
                          }
                        },
                        "count": {
                          "type": "integer",
                          "description": "The number of ads to return per placement. Integer between 1 and 20. See [Multi-Winner Placements](ref:multi-winner-placements).",
                          "format": "int32"
                        },
                        "proportionality": {
                          "type": "boolean",
                          "description": "If true, fills ads in a multi-winner placement in proportion to the flight's goals",
                          "default": false
                        },
                        "ecpmPartitions": {
                          "type": "array",
                          "description": "The name of the eCPM Partition that should be used to source eCPM data for auctions",
                          "default": [],
                          "items": {
                            "type": "string"
                          }
                        },
                        "skipSelection": {
                          "type": "boolean",
                          "description": "If `true`, bypasses weighted lottery/auction selection and returns eligible candidate ads sorted by rank/eCPM. **Behavior:** Without `count`: Returns all eligible ads from the highest priority level only. With `count`: Returns up to `count` ads, evaluating lower priorities if needed to fill the `count`. **Notes:** Targeting filters, no-duplicate rules, and floor pricing still apply. Use `skipFilters: true` with `adId` to bypass all filters.",
                          "default": false
                        },
                        "skipFilters": {
                          "type": "object",
                          "description": "Specifies which filters to bypass during the selection process. For example, given `\"skipFilters\":{\"keyword\":true}`, keyword targeting is ignored. Options: `geodistance`, `geolocation`, `keyword`, `placementLimit`, `facet`, `siteZone`, `searchTerm`. See [skipFilters](doc:skipfilters) for more details.",
                          "properties": {
                            "keyword": {
                              "type": "boolean",
                              "default": false
                            }
                          }
                        },
                        "eventMultiplier": {
                          "type": "integer",
                          "description": "Multiples the count of all events returned in the selection. For example, an impression with an eventMultiplier of 10 will count as 10 impressions in reporting.",
                          "default": 1,
                          "format": "int32"
                        },
                        "floorPrice": {
                          "type": "number",
                          "description": "Sets a floor price to use if the selection results in an auction. Overrides any floor price set on the priority. Should be expressed as an eCPM value.",
                          "format": "float"
                        },
                        "floorCpc": {
                          "type": "number",
                          "description": "Sets a [floor CPC](doc:second-price-auctions#cpc-floor-prices) to use if the selection results in an auction. Overrides any floor CPC set on the priority.",
                          "format": "float"
                        },
                        "logEvents": {
                          "type": "string",
                          "description": "Similar to eventIds, but instead of returning event pixels in the response, pushes event pixels into [data shipping logs](doc:data-shipping)",
                          "format": "json"
                        },
                        "relevancy": {
                          "type": "object",
                          "description": "See the [relevancy score](doc:relevancy-score) documentation for data type examples",
                          "properties": {
                            "idAttribute": {
                              "type": "array",
                              "description": "See the [using relevancy score](https://dev.kevel.com/docs/relevancy-score#using-relevancy-scores) documentation for data type examples"
                            }
                          }
                        },
                        "adQuery": {
                          "type": "object",
                          "description": "See [AdQuery](doc:adquery#setting-up-adquery-decision-api-requests) for details and example usage.",
                          "properties": {
                            "key": {
                              "type": "string"
                            }
                          }
                        },
                        "eCtrOverride": {
                          "type": "object",
                          "description": "Override the click-through rate of specific ads by ID attribute. Applies to CPC and CPA Flights only. It has no effect on CPM or Flat-rate Flights. See [Per-ID eCTR + eCPM Overrides](doc:per-id-ectr-ecpm-overrides)",
                          "properties": {
                            "key": {
                              "type": "string"
                            }
                          }
                        },
                        "eCpmOverride": {
                          "type": "object",
                          "description": "Override the eCPM of specific ads by ID attribute. Applies to CPC and CPA Flights only. It has no effect on CPM or Flat-rate Flights. See [Per-ID eCTR + eCPM Overrides](doc:per-id-ectr-ecpm-overrides)"
                        },
                        "bidModifiers": {
                          "type": "array",
                          "description": "Kevel accepts Per-ID Bid Modifiers in Ad Decision Requests (ADRs). These values are provided in the same format as set during campaign management with the addition of additional allowed match types. Specifically, this feature allows customers to submit bid values for specific entities (advertiser, campaign, flight, ad, or creative template field) at request time. These provided values will augment (or optionally override) the default or auto-calculated bids, giving customers full control over how much they’re bidding for a given opportunity. Learn more at [Per-ID Bid Modifiers in ADRs](doc:per-id-bid-overrides).",
                          "items": {
                            "properties": {
                              "match": {
                                "type": "object",
                                "description": "Object containing the entity type and ID to match against.",
                                "properties": {
                                  "adId": {
                                    "type": "integer",
                                    "description": "`adId` key can be any of: adId, flightId, campaignId, advertiserId, creative template variable",
                                    "format": "int32"
                                  }
                                }
                              },
                              "multipler": {
                                "type": "number",
                                "description": "Specify the modification as a multiplier on the Flight's Price",
                                "format": "float"
                              },
                              "price": {
                                "type": "number",
                                "description": "Specify the modification as a fixed value",
                                "format": "float"
                              },
                              "forceOverride": {
                                "type": "boolean",
                                "description": "If true, ignore any other matching bid modifiers and only use the modifier sent in the ADR (defaults to false). Note: if multiple modifiers sent in an ADR contain force override true and more than one matches, the highest resulting bid will be used.",
                                "default": false
                              }
                            },
                            "type": "object"
                          }
                        },
                        "category": {
                          "type": "string",
                          "description": "Optional category of the page or placement the request comes from, as a string of at most 200 characters, such as `\"Electricals > Computing > Laptops\"`. Kevel checks the length before it trims spaces from the start and end of the value. A value that is not a string returns a 400 with \"Category must be a string\", and a value of more than 200 characters returns a 400 with \"Category must not exceed 200 characters\". Kevel reports the value as the *Placement Category* dimension. On a network with category targeting enabled, Kevel compares the whole trimmed value with the category rules on each Flight and Ad. The match ignores capitalization and is otherwise exact, and a parent category does not match its children. On such a network, if the placement has no category, an Ad that has any category rule, including an exclude-only rule, is not eligible. See [Category targeting](doc:category)."
                        }
                      },
                      "required": [
                        "divName",
                        "networkId",
                        "siteId",
                        "adTypes"
                      ],
                      "type": "object"
                    }
                  },
                  "user": {
                    "type": "object",
                    "description": "Object containing the UserKey used for [UserDB targeting](doc:userdb-1).",
                    "properties": {
                      "key": {
                        "type": "string"
                      },
                      "segments": {
                        "type": "array",
                        "description": "Array of Segment IDs that will override any set on the UserDB record for this user. For use with [Segment Targeting](doc:segment-targeting).",
                        "items": {
                          "type": "integer",
                          "format": "int32"
                        }
                      },
                      "group": {
                        "type": "integer",
                        "description": "The user’s assigned experimental cohort (1–100) used for incrementality testing using externally assigned user groups. This value determines whether the user is in a campaign’s holdout or test group when evaluating ads. Requests must include this field for incrementality-enabled campaigns."
                      }
                    }
                  },
                  "keywords": {
                    "type": "array",
                    "description": "Keywords for [Keyword Targeting](doc:keyword-targeting). Such as `\"keywords\": [\"foo\", \"bar\", \"baz\"]`",
                    "items": {
                      "type": "string"
                    }
                  },
                  "url": {
                    "type": "string",
                    "description": "The current page URL"
                  },
                  "referrer": {
                    "type": "string",
                    "description": "The referrer URL"
                  },
                  "ip": {
                    "type": "string",
                    "description": "The IP address. Required for [Geo-Targeting](doc:geo-location)"
                  },
                  "includePricingData": {
                    "type": "boolean",
                    "description": "If true, return pricing data for the decision in the response. Defaults to `false`",
                    "default": false
                  },
                  "includeRelevancyData": {
                    "type": "boolean",
                    "description": "See the [relevancy score](https://dev.kevel.com/docs/relevancy-score#reporting-on-relevancy-score) documentation for more information",
                    "default": false
                  },
                  "includeProvenanceData": {
                    "type": "boolean",
                    "description": "If true, return a `provenance` value on each ad in the response, identifying the demand source the ad came from. See the [response parameters](ref:response) documentation for more information. Defaults to `false`",
                    "default": false
                  },
                  "notrack": {
                    "type": "boolean",
                    "description": "Deprecated: If true, only return ads that are set to honor Do Not Track. Defaults to `false`",
                    "default": false
                  },
                  "enableBotFiltering": {
                    "type": "boolean",
                    "description": "If making a client-side request, set to `true`. Defaults to `false` to ensure a server isn't seen as a bot. See [here](doc:tracking-overview#bot-filtering) for more info",
                    "default": false
                  },
                  "enableUserDBIP": {
                    "type": "boolean",
                    "description": "If true, override the IP address of the request with the IP address supplied on the UserKey. If no IP address is found on the UserKey, this will fall back to the IP address on the request. Requires UserDB."
                  },
                  "consent": {
                    "type": "object",
                    "description": "Object that sets the data consent preferences. For example, `\"consent\": {\"gdpr\": true}` sets GDPR consent for tracking in the European Union. (This defaults to false.) Other consent settings are available in the [GDPR settings documentation](doc:gdpr-compliance-and-consent-settings).",
                    "properties": {
                      "gdpr": {
                        "type": "boolean"
                      },
                      "gdprConsentString": {
                        "type": "string",
                        "description": "Passes a user's consent to downstream providers via an IAB consent string. Does *not* pass Kevel consent, which must be passed via the `gdpr` parameter OR when an allowed `gdprVendorId` is passed and the user specifies ad selection consent (purpose number `3`) in the consent string.  gdprConsentString will be passed to downstream providers regardless of whether the request's IP address originates from the EU."
                      },
                      "gdprConsentRequired": {
                        "type": "boolean",
                        "description": "Requests with `gdprConsentRequired` set to `true` treat the user as requiring GDPR consent, even if the request or UserDB record doesn't use an EU IP address. Likewise, setting to `false` identifies the user as being outside of the EU and not subject to GDPR."
                      },
                      "gdprVendorId": {
                        "type": "integer",
                        "description": "A vendor ID that is used to compute the boolean `gdpr` consent from a consent string in `gdprConsentString` (if one is provided). The vendor ID is from the [IAB vendor list](https://vendorlist.consensu.org/vendorlist.json). Consent will only be calculated if the vendor ID is allowed and the user specifies ad selection consent (purpose number `3`) in the consent string.",
                        "format": "int32"
                      }
                    }
                  },
                  "deviceID": {
                    "type": "string",
                    "description": "RTB requests only - sets an Identifier for Advertisers (IFA or IDFA)"
                  },
                  "parallel": {
                    "type": "boolean",
                    "description": "If true, processes the placements in parallel. Has no advantage except for RTB and header bidding requests. Does not work with companion ads.",
                    "default": false
                  },
                  "intendedLatitude": {
                    "type": "number",
                    "description": "(BETA) Latitude to use for [Distance Targeting](doc:distance-targeting). Range: [-90, 90]. Contact Kevel support to get started",
                    "format": "float"
                  },
                  "intendedLongitude": {
                    "type": "number",
                    "description": "(BETA) Longitude to use for [Distance Targeting](doc:distance-targeting). Range: [-180, 180]. Contact Kevel support to get started",
                    "format": "float"
                  },
                  "radius": {
                    "type": "number",
                    "description": "(BETA) Radius of the user if using user-specified radius with [Distance Targeting](doc:distance-targeting). Range: [0.01, 100]. Contact Kevel support to get started",
                    "format": "float"
                  },
                  "rtb": {
                    "type": "object",
                    "description": "RTB specific parameters. Can be used to pass in Supply Chain information and overrides, e.g. `\"rtb\":{\"schain\":{\"ext\":{\"sid\":\"000111\"}}}` will override the `sid` on outbound RTB requests.",
                    "properties": {}
                  },
                  "time": {
                    "type": "integer",
                    "description": "Expects a Unix epoch timestamp (seconds or milliseconds) in the future.\n\n`time` overrides the time of the decision request, instead of _now_. Decisions will then consider ads active in that future time based on their start/end dates as well as its use in day parting, daily capping, etc.\nThis is useful in situations such as in-store, where ad decisions have to be made up to a few hours in advance.\n\nEvent URLs called, such as Impressions or Clicks, will be attributed to the date of the overridden time, so they will affect daily goal pacing for that date, and they will be included in the lifetime totals immediately, so if there is a lifetime cap or goal the future impressions could cause the ad to stop serving immediately.\n\nIn data shipping logs, the impression, clicks, conversions or other custom event `ImpressionCreatedOn` and `CreatedOn` (deprecated) timestamps are overridden, but the `EventCreatedOn` is not, as it denotes the time at which the event was received by kevel.\n\nMacros in creatives related to dates which will not respect the override, e.g., {{datetime.dayofweek}}\n\nKevel-run attribution may not cleanly support the time override, if you're running user-level attributable flows get in touch with Kevel for advice."
                  },
                  "searchTerm": {
                    "type": "string",
                    "description": "See [Search Term Targeting](doc:search-term-targeting)."
                  },
                  "block": {
                    "type": "object",
                    "properties": {
                      "advertisers": {
                        "type": "array",
                        "description": "Advertiser IDs to exclude",
                        "items": {
                          "type": "integer"
                        }
                      },
                      "campaigns": {
                        "type": "array",
                        "items": {
                          "type": "integer"
                        },
                        "description": "Campaign IDs to exclude"
                      },
                      "creatives": {
                        "type": "array",
                        "description": "Creative IDs to exclude",
                        "items": {
                          "type": "integer"
                        }
                      },
                      "flights": {
                        "type": "array",
                        "description": "Flight IDs to exclude",
                        "items": {
                          "type": "integer"
                        }
                      }
                    },
                    "description": "Prevents specific advertisers, campaigns, creatives, or flights from being served in the response."
                  }
                }
              },
              "examples": {
                "JSON": {
                  "value": {
                    "placements": [
                      {
                        "divName": "div0",
                        "networkId": 23,
                        "siteId": 667480,
                        "adTypes": [
                          5
                        ],
                        "eventIds": [
                          10,
                          11,
                          14
                        ]
                      }
                    ],
                    "user": {
                      "key": "abc"
                    },
                    "keywords": [
                      "foo",
                      "bar",
                      "baz"
                    ],
                    "consent": {
                      "gdpr": false
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n  \"user\": {\n    \"key\": \"abc\"\n  },\n  \"decisions\": {\n    \"div0\": {\n      \"adId\": 1111,\n      \"creativeId\": 2222,\n      \"flightId\": 3333,\n      \"campaignId\": 4444,\n      \"advertiserId\":5555,\n      \"priorityId\": 6666,\n      \"clickUrl\": \"https://e-23.adzerk.net/r?...\",\n      \"contents\": [\n        {\n          \"type\": \"html\",\n          \"body\": \"<a href='...'><img src='https://static.adzerk.net/Advertisers/cat.jpg' title='ZOMG A CAT' width='350' height='350'></a>\",\n          \"template\": \"image\",\n          \"data\": {\n            \"imageUrl\": \"https://static.adzerk.net/cat.jpg\",\n            \"title\": \"ZOMG A CAT\",\n            \"width\": 350,\n            \"height\": 350,\n            \"customData\": {\n              \"headline\": \"Test Headline\",\n              \"cta\": \"Download Here\"\n            }\n          }\n        }\n      ],\n      \"impressionUrl\": \"https://e-23.adzerk.net/i.gif?...\",\n      \"events\": [\n        {\n          \"id\": 12,\n          \"url\": \"https://e-23.adzerk.net/e.gif?...\"\n        },\n        {\n          \"id\": 13,\n          \"url\": \"https://e-23.adzerk.net/e.gif?...\"\n        },\n        {\n          \"id\": 14,\n          \"url\": \"https://e-23.adzerk.net/e.gif?...\"\n        }\n      ],\n      \"pricing\": {\n        \"price\": 5,\n        \"clearPrice\": 2.01,\n        \"revenue\": 0.00201,\n        \"rateType\": 2,\n        \"eCPM\": 5\n      },\n      \"provenance\": \"in_network\"\n    }\n  },\n  \"candidateRetrieval\": {\n    \"div0\": {\n      \"candidatesFoundCount\": 1\n    }\n  }\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "user": {
                      "type": "object",
                      "properties": {
                        "key": {
                          "type": "string",
                          "example": "abc"
                        }
                      }
                    },
                    "decisions": {
                      "type": "object",
                      "properties": {
                        "div0": {
                          "type": "object",
                          "properties": {
                            "adId": {
                              "type": "integer",
                              "example": 1111,
                              "default": 0
                            },
                            "creativeId": {
                              "type": "integer",
                              "example": 2222,
                              "default": 0
                            },
                            "flightId": {
                              "type": "integer",
                              "example": 3333,
                              "default": 0
                            },
                            "campaignId": {
                              "type": "integer",
                              "example": 4444,
                              "default": 0
                            },
                            "advertiserId": {
                              "type": "integer",
                              "example": 5555,
                              "default": 0
                            },
                            "priorityId": {
                              "type": "integer",
                              "example": 6666,
                              "default": 0
                            },
                            "clickUrl": {
                              "type": "string",
                              "example": "https://e-23.adzerk.net/r?..."
                            },
                            "contents": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "example": "html"
                                  },
                                  "body": {
                                    "type": "string",
                                    "example": "<a href='...'><img src='https://static.adzerk.net/Advertisers/cat.jpg' title='ZOMG A CAT' width='350' height='350'></a>"
                                  },
                                  "template": {
                                    "type": "string",
                                    "example": "image"
                                  },
                                  "data": {
                                    "type": "object",
                                    "properties": {
                                      "imageUrl": {
                                        "type": "string",
                                        "example": "https://static.adzerk.net/cat.jpg"
                                      },
                                      "title": {
                                        "type": "string",
                                        "example": "ZOMG A CAT"
                                      },
                                      "width": {
                                        "type": "integer",
                                        "example": 350,
                                        "default": 0
                                      },
                                      "height": {
                                        "type": "integer",
                                        "example": 350,
                                        "default": 0
                                      },
                                      "customData": {
                                        "type": "object",
                                        "properties": {
                                          "headline": {
                                            "type": "string",
                                            "example": "Test Headline"
                                          },
                                          "cta": {
                                            "type": "string",
                                            "example": "Download Here"
                                          }
                                        }
                                      }
                                    }
                                  }
                                }
                              }
                            },
                            "impressionUrl": {
                              "type": "string",
                              "example": "https://e-23.adzerk.net/i.gif?..."
                            },
                            "events": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": "integer",
                                    "example": 12,
                                    "default": 0
                                  },
                                  "url": {
                                    "type": "string",
                                    "example": "https://e-23.adzerk.net/e.gif?..."
                                  }
                                }
                              }
                            },
                            "pricing": {
                              "type": "object",
                              "description": "Returned when the request sets `includePricingData`. See [Pricing Data](ref:response#pricing-data).",
                              "properties": {
                                "price": {
                                  "type": "number",
                                  "description": "The Flight's price, or the Ad's if its settings override the Flight.",
                                  "example": 5,
                                  "default": 0
                                },
                                "clearPrice": {
                                  "type": "number",
                                  "description": "For a second price ad, the clear eCPM: a price per 1,000 impressions, whatever the rate type. Otherwise, the ad's `price`.",
                                  "example": 2.01,
                                  "default": 0
                                },
                                "revenue": {
                                  "type": "number",
                                  "description": "What the ad earns per event: per impression for CPM, per click for CPC, per conversion for CPA. In a second price priority, the amount after clearing.",
                                  "example": 0.00201,
                                  "default": 0
                                },
                                "rateType": {
                                  "type": "integer",
                                  "example": 2,
                                  "default": 0
                                },
                                "eCPM": {
                                  "type": "number",
                                  "description": "The ad's own eCPM, which ranked it in the auction. Not what the ad paid.",
                                  "example": 5,
                                  "default": 0
                                }
                              }
                            },
                            "provenance": {
                              "type": "string",
                              "description": "The demand source this ad came from. Only returned when `includeProvenanceData` is `true` on the request",
                              "enum": [
                                "in_network",
                                "programmatic",
                                "cross_network"
                              ],
                              "example": "in_network"
                            }
                          }
                        }
                      }
                    },
                    "candidateRetrieval": {
                      "type": "object",
                      "properties": {
                        "div0": {
                          "type": "object",
                          "properties": {
                            "candidatesFoundCount": {
                              "type": "integer",
                              "example": 1,
                              "default": 0
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "security": [],
        "x-readme": {
          "code-samples": [
            {
              "language": "curl",
              "code": "curl -H 'Content-Type:application/json' \\\n  -X POST \\\n  -d '{\"user\":{\"key\":\"abc\"},\n  \"placements\":[{\n  \"divName\":\"div0\",\n  \"networkId\":23,\n  \"siteId\":667480,\n  \"adTypes\":[5]}]}' \\\n  \\\n  https://e-23.adzerk.net/api/v2"
            },
            {
              "language": "javascript",
              "code": "const Adzerk = require('@adzerk/decision-sdk');\n\nlet client = new Adzerk.Client({networkId: 23, siteId: 667480});\n\nlet request = {\n  placements: [{adTypes: [5]}],\n  user: {key: \"abc\"},\n  keywords: [\"keyword1\", \"keyword2\"]\n};\n\nclient.decisions.get(request).then(response => {\n  console.dir(response, {depth: null})\n});"
            },
            {
              "language": "java",
              "code": "import java.util.*;\nimport com.adzerk.sdk.*;\nimport com.adzerk.sdk.generated.ApiException;\nimport com.adzerk.sdk.generated.model.*;\nimport com.adzerk.sdk.model.DecisionResponse;\n\npublic class FetchAds {\n  public static void main(String[] args) throws ApiException {\n    Client client = new Client(new ClientOptions(23).siteId(667480));\n    Placement placement = new Placement().adTypes(Arrays.asList(5));\n    User user = new User().key(\"abc\");\n\n    DecisionRequest request = new DecisionRequest()\n      .placements(Arrays.asList(placement))\n      .keywords(Arrays.asList(\"keyword1\", \"keyword2\"))\n      .user(user);\n\n    DecisionResponse response = client.decisions().get(request);\n    System.out.println(response.toString());\n  }  \n}"
            },
            {
              "language": "python",
              "code": "import adzerk_decision_sdk\n\nclient = adzerk_decision_sdk.Client(23, site_id=667480)\n\nrequest = {\n  \"placements\": [{\"adTypes\": [5]}],\n  \"user\": {\"key\": \"abc\"},\n  \"keywords\": [\"keyword1\", \"keyword2\"],\n}\n\nresponse = client.decisions.get(request)\nprint(response)"
            },
            {
              "language": "ruby",
              "code": "require \"adzerk_decision_sdk\"\n\nclient = AdzerkDecisionSdk::Client.new(network_id: 23, site_id: 667480)\n\nrequest = {\n  placements: [{ adTypes: [5] }],\n  user: { key: \"abc\" },\n  keywords: [\"keyword1\", \"keyword2\"],\n}\n\npp client.decisions.get(request)"
            },
            {
              "language": "clojure",
              "code": "(ns ad-request-sample\n  (:import (com.adzerk.sdk Client ClientOptions)\n           (com.adzerk.sdk.generated.model DecisionRequest Placement User)))\n\n(defn -main []\n  (let [client (Client. (doto (ClientOptions. (int 23)) (.siteId (int 667480))))\n        request (doto (DecisionRequest.)\n                      (.placements [(doto (Placement.) (.adTypes [5]))])\n                      (.keywords [\"keyword1\" \"keyword2\"])\n                      (.user (doto (User.) (.key \"abc\"))))]\n    (print (-> client (.decisions) (.get request)))))"
            },
            {
              "language": "swift",
              "code": "import AdzerkSDK\n\n// Demo network, site, & ad type IDs; find your own via the Adzerk UI!\nDecisionSDK.defaultNetworkId = 23\nDecisionSDK.defaultSiteId = 667480\n\nlet client = DecisionSDK()\n\nvar p = Placements.custom(divName: \"div0\", adTypes: [5])\n\nvar reqOpts = PlacementRequest<StandardPlacement>.Options()\nreqOpts.userKey = \"abc\"\nreqOpts.keywords = [\"keyword1\", \"keyword2\"]\n\nclient.request(placements: [p], options: reqOpts) {response in\n  dump(response)\n}"
            }
          ],
          "samples-languages": [
            "curl",
            "javascript",
            "java",
            "python",
            "ruby",
            "clojure",
            "swift"
          ]
        }
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": false,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true
}
```