/experimental/retail-media/line-items/{line-item-id}
curl --request PATCH \
--url https://api.criteo.com/experimental/retail-media/line-items/{line-item-id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"data": {
"attributes": {
"flightDates": {
"endDate": "2023-11-07T05:31:56Z",
"startDate": "2023-11-07T05:31:56Z"
},
"isPaused": true,
"name": "<string>",
"onsiteDisplayDetails": {
"auctionDetails": {
"isDynamicMatch": true
}
},
"serveToOptOutUser": true
},
"type": "<string>"
}
}
'import requests
url = "https://api.criteo.com/experimental/retail-media/line-items/{line-item-id}"
payload = { "data": {
"attributes": {
"flightDates": {
"endDate": "2023-11-07T05:31:56Z",
"startDate": "2023-11-07T05:31:56Z"
},
"isPaused": True,
"name": "<string>",
"onsiteDisplayDetails": { "auctionDetails": { "isDynamicMatch": True } },
"serveToOptOutUser": True
},
"type": "<string>"
} }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
data: {
attributes: {
flightDates: {endDate: '2023-11-07T05:31:56Z', startDate: '2023-11-07T05:31:56Z'},
isPaused: true,
name: '<string>',
onsiteDisplayDetails: {auctionDetails: {isDynamicMatch: true}},
serveToOptOutUser: true
},
type: '<string>'
}
})
};
fetch('https://api.criteo.com/experimental/retail-media/line-items/{line-item-id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.criteo.com/experimental/retail-media/line-items/{line-item-id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'data' => [
'attributes' => [
'flightDates' => [
'endDate' => '2023-11-07T05:31:56Z',
'startDate' => '2023-11-07T05:31:56Z'
],
'isPaused' => true,
'name' => '<string>',
'onsiteDisplayDetails' => [
'auctionDetails' => [
'isDynamicMatch' => true
]
],
'serveToOptOutUser' => true
],
'type' => '<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.criteo.com/experimental/retail-media/line-items/{line-item-id}"
payload := strings.NewReader("{\n \"data\": {\n \"attributes\": {\n \"flightDates\": {\n \"endDate\": \"2023-11-07T05:31:56Z\",\n \"startDate\": \"2023-11-07T05:31:56Z\"\n },\n \"isPaused\": true,\n \"name\": \"<string>\",\n \"onsiteDisplayDetails\": {\n \"auctionDetails\": {\n \"isDynamicMatch\": true\n }\n },\n \"serveToOptOutUser\": true\n },\n \"type\": \"<string>\"\n }\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.criteo.com/experimental/retail-media/line-items/{line-item-id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"data\": {\n \"attributes\": {\n \"flightDates\": {\n \"endDate\": \"2023-11-07T05:31:56Z\",\n \"startDate\": \"2023-11-07T05:31:56Z\"\n },\n \"isPaused\": true,\n \"name\": \"<string>\",\n \"onsiteDisplayDetails\": {\n \"auctionDetails\": {\n \"isDynamicMatch\": true\n }\n },\n \"serveToOptOutUser\": true\n },\n \"type\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.criteo.com/experimental/retail-media/line-items/{line-item-id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"data\": {\n \"attributes\": {\n \"flightDates\": {\n \"endDate\": \"2023-11-07T05:31:56Z\",\n \"startDate\": \"2023-11-07T05:31:56Z\"\n },\n \"isPaused\": true,\n \"name\": \"<string>\",\n \"onsiteDisplayDetails\": {\n \"auctionDetails\": {\n \"isDynamicMatch\": true\n }\n },\n \"serveToOptOutUser\": true\n },\n \"type\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"data": {
"attributes": {
"campaignId": "<string>",
"conquestingSettings": {
"conquestingAdStrategyEnabled": true,
"defensiveAdStrategyEnabled": true,
"isAdStrategyLocked": true,
"neutralAdStrategyEnabled": true
},
"effectiveFlightDates": {
"endDate": "2023-11-07T05:31:56Z",
"startDate": "2023-11-07T05:31:56Z"
},
"isPaused": true,
"lineItemId": "<string>",
"name": "<string>",
"onsiteDisplayDetails": {
"auctionDetails": {
"isDynamicMatch": true
}
},
"retailerId": "<string>",
"serveToOptOutUser": true
},
"id": "<string>",
"type": "<string>"
},
"errors": [
{
"code": "<string>",
"detail": "<string>",
"instance": "<string>",
"source": {},
"stackTrace": "<string>",
"title": "<string>",
"traceId": "<string>",
"traceIdentifier": "<string>"
}
],
"warnings": [
{
"code": "<string>",
"detail": "<string>",
"instance": "<string>",
"source": {},
"stackTrace": "<string>",
"title": "<string>",
"traceId": "<string>",
"traceIdentifier": "<string>"
}
]
}/experimental/retail-media/line-items/{line-item-id}
Update an existing line item.
PATCH
/
experimental
/
retail-media
/
line-items
/
{line-item-id}
/experimental/retail-media/line-items/{line-item-id}
curl --request PATCH \
--url https://api.criteo.com/experimental/retail-media/line-items/{line-item-id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"data": {
"attributes": {
"flightDates": {
"endDate": "2023-11-07T05:31:56Z",
"startDate": "2023-11-07T05:31:56Z"
},
"isPaused": true,
"name": "<string>",
"onsiteDisplayDetails": {
"auctionDetails": {
"isDynamicMatch": true
}
},
"serveToOptOutUser": true
},
"type": "<string>"
}
}
'import requests
url = "https://api.criteo.com/experimental/retail-media/line-items/{line-item-id}"
payload = { "data": {
"attributes": {
"flightDates": {
"endDate": "2023-11-07T05:31:56Z",
"startDate": "2023-11-07T05:31:56Z"
},
"isPaused": True,
"name": "<string>",
"onsiteDisplayDetails": { "auctionDetails": { "isDynamicMatch": True } },
"serveToOptOutUser": True
},
"type": "<string>"
} }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
data: {
attributes: {
flightDates: {endDate: '2023-11-07T05:31:56Z', startDate: '2023-11-07T05:31:56Z'},
isPaused: true,
name: '<string>',
onsiteDisplayDetails: {auctionDetails: {isDynamicMatch: true}},
serveToOptOutUser: true
},
type: '<string>'
}
})
};
fetch('https://api.criteo.com/experimental/retail-media/line-items/{line-item-id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.criteo.com/experimental/retail-media/line-items/{line-item-id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'data' => [
'attributes' => [
'flightDates' => [
'endDate' => '2023-11-07T05:31:56Z',
'startDate' => '2023-11-07T05:31:56Z'
],
'isPaused' => true,
'name' => '<string>',
'onsiteDisplayDetails' => [
'auctionDetails' => [
'isDynamicMatch' => true
]
],
'serveToOptOutUser' => true
],
'type' => '<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.criteo.com/experimental/retail-media/line-items/{line-item-id}"
payload := strings.NewReader("{\n \"data\": {\n \"attributes\": {\n \"flightDates\": {\n \"endDate\": \"2023-11-07T05:31:56Z\",\n \"startDate\": \"2023-11-07T05:31:56Z\"\n },\n \"isPaused\": true,\n \"name\": \"<string>\",\n \"onsiteDisplayDetails\": {\n \"auctionDetails\": {\n \"isDynamicMatch\": true\n }\n },\n \"serveToOptOutUser\": true\n },\n \"type\": \"<string>\"\n }\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.criteo.com/experimental/retail-media/line-items/{line-item-id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"data\": {\n \"attributes\": {\n \"flightDates\": {\n \"endDate\": \"2023-11-07T05:31:56Z\",\n \"startDate\": \"2023-11-07T05:31:56Z\"\n },\n \"isPaused\": true,\n \"name\": \"<string>\",\n \"onsiteDisplayDetails\": {\n \"auctionDetails\": {\n \"isDynamicMatch\": true\n }\n },\n \"serveToOptOutUser\": true\n },\n \"type\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.criteo.com/experimental/retail-media/line-items/{line-item-id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"data\": {\n \"attributes\": {\n \"flightDates\": {\n \"endDate\": \"2023-11-07T05:31:56Z\",\n \"startDate\": \"2023-11-07T05:31:56Z\"\n },\n \"isPaused\": true,\n \"name\": \"<string>\",\n \"onsiteDisplayDetails\": {\n \"auctionDetails\": {\n \"isDynamicMatch\": true\n }\n },\n \"serveToOptOutUser\": true\n },\n \"type\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"data": {
"attributes": {
"campaignId": "<string>",
"conquestingSettings": {
"conquestingAdStrategyEnabled": true,
"defensiveAdStrategyEnabled": true,
"isAdStrategyLocked": true,
"neutralAdStrategyEnabled": true
},
"effectiveFlightDates": {
"endDate": "2023-11-07T05:31:56Z",
"startDate": "2023-11-07T05:31:56Z"
},
"isPaused": true,
"lineItemId": "<string>",
"name": "<string>",
"onsiteDisplayDetails": {
"auctionDetails": {
"isDynamicMatch": true
}
},
"retailerId": "<string>",
"serveToOptOutUser": true
},
"id": "<string>",
"type": "<string>"
},
"errors": [
{
"code": "<string>",
"detail": "<string>",
"instance": "<string>",
"source": {},
"stackTrace": "<string>",
"title": "<string>",
"traceId": "<string>",
"traceIdentifier": "<string>"
}
],
"warnings": [
{
"code": "<string>",
"detail": "<string>",
"instance": "<string>",
"source": {},
"stackTrace": "<string>",
"title": "<string>",
"traceId": "<string>",
"traceIdentifier": "<string>"
}
]
}Authorizations
The access token received from the authorization server in the OAuth 2.0 flow.
Path Parameters
The line item id
Body
application/json
Line item details
A top-level object that encapsulates a Criteo API request for a single value object.
A value resource exposed by the API.
Show child attributes
Show child attributes
Response
200 - application/json
Success
A top-level object that encapsulates a Criteo API response for a single entity.
Was this page helpful?
⌘I