Skip to main content

Placements

M
Written by Megan Pratt
Updated over a month ago

CRUD operations for placements

Endpoints

Method

Endpoint

Description

POST

/placements

Create a new placement

GET

/placements/[id]

Get details for a specific placement

PUT

/placements/[id]

Update a specific placement

Get Placement

Method: GET
Endpoint: /placements/[id]

Example

Response

{ "data": { "id": 1122110, "name": "test", "section_id": 602314, "status": "inactive", "is_previewable": true, "location": "right_rail", "devices": ["desktop", "mobile", "tablet"], "dfp_settings": { "rendering_mode": "default", "parent_count": 1 }, "injection_mode": "before", "mapping_value": "1122110", "position": 0, "priority": 1, "selector": null, "enable_video": true, "video_devices": [ "desktop", "mobile", "tablet" ], "ifu_id": 40049, "clp_id": null, "pub_network_clp_id": null, "display_sizes": [{ "id": "300x50", "devices": ["mobile", "tablet", "desktop"] }, { "id": "320x50", "devices": ["desktop"] }] } }

Create Placement

Method: POST
Endpoint: /placements/

Parameters

Parameter

Type

Description

id

integer

ID of the placement.

name (required)

string

Name of the advertiser.

Max: 500

section_id (required)

integer

ID of the section the placement will belong to.

location (required)

string

Used to denote where on the publication website the placement will render.

Options include main_well, right_rail, left_rail, bottom_of_article, top_of_article, middle_of_article, carousel, other

position (required)

integer

Location within the feed where the ad is replacing or injecting.

Max: 100

status

string

Options include active, inactive, deleted

Defaults to inactive

ad_server

string

Options include nativo, third_party, exchange, header, header_server, amazon_cxm, prebid_server, apple_news

Defaults to null (When value is null ad server will be inherited from the publication)

Field is only available to some users.

exchange_partner_id

integer

ID of the exchange/supply partner.

Defaults to null

devices

list

List of supported devices.
Options include desktop, mobile, tablet

Defaults to all devices.

enable_video

boolean

Defaults to true.

video_devices

list

Similar to devices but for video.

Requires enable_video to be true to modify.

Defaults to all devices.

priority

integer

Defines the order in which ads will be injected onto the page. This is only relevant to sections with multiple placements.

Defaults to 1.

selector

string

Unique ID, class, or pattern used to target ad location on page.

Required if publication uses (dfp ad server or exchange or mraid) AND rendering_mode is use_nativo_selector

Max: 500

injection_mode

string

Determines how ads will be rendered on the page.
Options include before, replace, append, prepend

Required if rendering_mode is break_out_of_iframe or use_nativo_selector.

Defaults to before

mapping_value

string

A custom value placed directly in the publisher page to allow Nativo to identify the correct placement.

Max: 100

dfp_settings

Required if publication uses dfp ad server or exchange.

is_previewable

boolean

Enables preview while placement is inactive.

Defaults to true

ifu_id

integer

ID of the In-Feed Unit

clp_id

integer

ID of the default Content Landing Page .

pub_network_clp_id

integer

ID of the Publisher Direct Content Landing Page.

display_sizes

List of displays sizes with devices. See DisplaySizesSchema

DfpSettingsSchema

Parameter

Type

Description

rendering_mode (required)

string

How Nativo should identify the location on the page to render the ad.
Options include default (inside of frame), break_out_of_frame, use_nativo_selector

parent_count

integer

The count of parent divs that Nativo should climb once broken out of the iframe to inject the ad.

Required if rendering_mode is break_out_of_frame

DisplaySizesSchema

Parameter

Type

Description

id

string

Width by height dimension in the format width x height with no spaces.
Options include '300x50, 300x250, 320x50, 250x250, 200x200, 468x60, 728x90, 336x280, 120x600, 160x600, 300x600, 970x90, 970x250, 836x120, 756x120, 836x164, 300x120

devices

list

List of supported devices.
Options include desktop, mobile, tablet

POST Example with the required fields for creation

Payload

{ "section_id": 602314, "location": "right_rail", "position": 0, "name": "test", "dfp_settings": { "rendering_mode": "default" } }

Response

{ "data": { "id": 1122110, "name": "test", "section_id": 602314, "status": "inactive", "is_previewable": true, "location": "right_rail", "devices": [ "desktop", "mobile", "tablet" ], "dfp_settings": { "rendering_mode": "default", }, "injection_mode": "before", "mapping_value": "1122110", "position": 0, "priority": 1, "selector": null, "enable_video": true, "video_devices": [ "desktop", "mobile", "tablet" ] "ifu_id": null, "clp_id": null, "pub_network_clp_id": null, } }


Update Placement

Method: PUT
Endpoint: /placements/[id]

Example

Update the Mapping Value.

Payload

{ "mapping_value": "1234" }

Response

{ "data": { "id": 1122110, "name": "test", "section_id": 602314, "status": "inactive", "is_previewable": true, "location": "right_rail", "devices": [ "desktop", "mobile", "tablet" ], "dfp_settings": { "rendering_mode": "default", }, "injection_mode": "before", "mapping_value": "1234", "position": 0, "priority": 1, "selector": null, "enable_video": true, "video_devices": [ "desktop", "mobile", "tablet" ] "ifu_id": null, "clp_id": null, "pub_network_clp_id": null, } }

Did this answer your question?