Delete a campaign timetable for a specific day (dayparting).
curl --request DELETE \
--url https://api.topsort.com/public/v1/campaign-service/campaigns/{campaign_id}/timetables/{day_of_week} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.topsort.com/public/v1/campaign-service/campaigns/{campaign_id}/timetables/{day_of_week}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.topsort.com/public/v1/campaign-service/campaigns/{campaign_id}/timetables/{day_of_week}', 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.topsort.com/public/v1/campaign-service/campaigns/{campaign_id}/timetables/{day_of_week}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.topsort.com/public/v1/campaign-service/campaigns/{campaign_id}/timetables/{day_of_week}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://api.topsort.com/public/v1/campaign-service/campaigns/{campaign_id}/timetables/{day_of_week}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.topsort.com/public/v1/campaign-service/campaigns/{campaign_id}/timetables/{day_of_week}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Campaign API
Delete a campaign timetable for a specific day (dayparting).
Delete the timetable configuration for a specific day of the week.
This removes the dayparting rule for the specified day, reverting the campaign to be active all day for that day (if the campaign is otherwise active).
After deletion, the campaign will run 24 hours on the specified day (no time restrictions).
DELETE
/
public
/
v1
/
campaign-service
/
campaigns
/
{campaign_id}
/
timetables
/
{day_of_week}
Delete a campaign timetable for a specific day (dayparting).
curl --request DELETE \
--url https://api.topsort.com/public/v1/campaign-service/campaigns/{campaign_id}/timetables/{day_of_week} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.topsort.com/public/v1/campaign-service/campaigns/{campaign_id}/timetables/{day_of_week}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.topsort.com/public/v1/campaign-service/campaigns/{campaign_id}/timetables/{day_of_week}', 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.topsort.com/public/v1/campaign-service/campaigns/{campaign_id}/timetables/{day_of_week}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.topsort.com/public/v1/campaign-service/campaigns/{campaign_id}/timetables/{day_of_week}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://api.topsort.com/public/v1/campaign-service/campaigns/{campaign_id}/timetables/{day_of_week}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.topsort.com/public/v1/campaign-service/campaigns/{campaign_id}/timetables/{day_of_week}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Autorisations
A valid API key generated in Topsort's UI. Use the TSE API key if calling auctions or events API, otherwise use the TSC API key.
Paramètres de chemin
The ID of the campaign.
The day of the week (1=Monday, 7=Sunday).
Options disponibles:
1, 2, 3, 4, 5, 6, 7 Paramètres de requête
The ID of the vendor.
Minimum string length:
1Réponse
Successful Response
Cette page vous a-t-elle été utile ?