Skip to main content

Placements

To get an advertisement to display you need to create a placement.

A placement represents an single showing of an ad.

GraphQL Request

mutation {
createPlacements(
input: {
slotId: "d4af8161-0993-4589-a0d5-f8718b062d93"
max: 1
unique: true
}
) {
# The time the placement was created
timestamp

# Unique ID of this placement
id

# ID of the advertisement showing in this placement
advertisementId
}
}
FieldRequiredDescriptionFormatDefault
slotIdYesThe ID of the slot you'd like to get advertisements for.UUID v4
maxNoThe maximum number of advertisements you'd like to show for a slot. For example, you may want to have a single slot for the front page of your slot, but on the page you'd like to display 3 ads in different spots.Integer1
uniqueNoWhen specifying a max of more than 1, setting unique to true ensures that different ads are returned instead of the same one multiple times.Booleantrue

Response

{
"data": {
"createPlacements": [
{
"timestamp": "2021-12-29T16:35:53+00:00",
"id": "3cc60e23-6a81-4958-8c6e-b2a5b9a89267",
"advertisementId": "015ec88f-5463-4c7e-bf34-362d0c60caba"
}
]
}
}
FieldDescriptionFormat
timestampThe time the placement was createdUTC timestamp as RFC3339
idUnique ID of this placementUUID v4
advertisementIdUnique ID of the advertisement showing in this placementUUID v4