Skip to main content

Ad Serving Request

M
Written by Megan Pratt
Updated over a month ago

The basic request to the Nativo Ad-Serving API requires three query parameters:

  1. page_url - where the requested ad will be rendered

  2. user_agent - the user agent of the end user who will see the ad

Each of the parameters above is required for the request to be completed successfully. If any of the two stated parameters are missing you will receive an error message.

🚧

Note

Before making your first request to the Ad-Serving API please contact a Nativo representative to gain access to the API.

Initial setup

Create a basic get request URL using the example request below. Replace the values of user_ip, user_agent, and page_url parameters with values relevant to your use case.

HTTPcURLJavaScript

https://jadserve.postrelease.com/adsver/api?visitor_id=0000000-0000-0000000&user_ip=1.1.1.1&user_agent=Mozilla/5.0%20(Macintosh;%20Intel%20Mac%20OS%20X%2013.0;%20rv:106.0)%20Gecko/20100101%20Firefox/106.0&page_url=https://www.nativo.com/newsroom

Make Your API request

Use curl or any other programmatic method to make a get request with the URL above.

Query String Parameters

Type

Required

Description

Example

page_url

String

Yes

The page URL the user agent has requested ad(s) for.

user_ip

String

optional

Provides the the IP address of the user agent requesting ads

1.1.1.1

user_agent

String

Yes

The user agent making the ad request

Mozilla/5.0 (Windows NT 10.0; WOW64; rv:48.0) Gecko/20100101 Firefox/48.0

visitor_id

String

optional

The visitor identifier as determined by Nativo

4901e330-3af0-4123-afe5-0d48127d787b

placement_ids

list of integers

optional

The placement ids to display, a comma separated list of ints

10000, 122200, 100003

gdpr_consent

String

optional

Parameter to pass a GDPR consent string

BPkYneZPkYneZAMABBAAABAAAAAAEA

gdpr_version

int

optional

The version of the GDPR consent string

1

us_privacy

String

optional

Parameter for passing the CCPA consent string

1---

Did this answer your question?