Connect or update catalog feeds (a feed URL or inline items)
curl --request POST \
--url https://api.semicola.com/api/v2/buyer/advertisers/{id}/catalogs/sync \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"catalogs": [
{
"catalogId": "<string>",
"platformId": "<string>",
"name": "<string>",
"url": "<string>",
"items": [
{}
]
}
]
}
'import requests
url = "https://api.semicola.com/api/v2/buyer/advertisers/{id}/catalogs/sync"
payload = { "catalogs": [
{
"catalogId": "<string>",
"platformId": "<string>",
"name": "<string>",
"url": "<string>",
"items": [{}]
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
catalogs: [
{
catalogId: '<string>',
platformId: '<string>',
name: '<string>',
url: '<string>',
items: [{}]
}
]
})
};
fetch('https://api.semicola.com/api/v2/buyer/advertisers/{id}/catalogs/sync', 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.semicola.com/api/v2/buyer/advertisers/{id}/catalogs/sync",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'catalogs' => [
[
'catalogId' => '<string>',
'platformId' => '<string>',
'name' => '<string>',
'url' => '<string>',
'items' => [
[
]
]
]
]
]),
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.semicola.com/api/v2/buyer/advertisers/{id}/catalogs/sync"
payload := strings.NewReader("{\n \"catalogs\": [\n {\n \"catalogId\": \"<string>\",\n \"platformId\": \"<string>\",\n \"name\": \"<string>\",\n \"url\": \"<string>\",\n \"items\": [\n {}\n ]\n }\n ]\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.semicola.com/api/v2/buyer/advertisers/{id}/catalogs/sync")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"catalogs\": [\n {\n \"catalogId\": \"<string>\",\n \"platformId\": \"<string>\",\n \"name\": \"<string>\",\n \"url\": \"<string>\",\n \"items\": [\n {}\n ]\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.semicola.com/api/v2/buyer/advertisers/{id}/catalogs/sync")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"catalogs\": [\n {\n \"catalogId\": \"<string>\",\n \"platformId\": \"<string>\",\n \"name\": \"<string>\",\n \"url\": \"<string>\",\n \"items\": [\n {}\n ]\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {
"catalogs": [
{
"catalogId": "<string>",
"platformId": "<string>",
"type": "offering",
"sourceType": "inline",
"name": "<string>",
"url": "<string>",
"feedFormat": "google_merchant_center",
"updateFrequency": "realtime",
"itemCount": 4503599627370495,
"fields": [
"<string>"
],
"syncStatus": "pending",
"healthStatus": "not_synced",
"latestVersionId": "<string>",
"latestVersionNumber": 0,
"latestContentHash": "<string>",
"activeTransform": {
"groupBy": [
"<string>"
],
"creativePrompt": "<string>",
"budgetPerGroup": 1,
"savedAt": "2023-11-07T05:31:56Z"
},
"latestActivationPlanId": "<string>",
"lastChangeSummary": {
"added": 4503599627370495,
"updated": 4503599627370495,
"unchanged": 4503599627370495,
"removed": 4503599627370495
},
"lastSyncAttemptAt": "2023-11-07T05:31:56Z",
"lastSyncedAt": "2023-11-07T05:31:56Z",
"nextSyncAt": "2023-11-07T05:31:56Z",
"staleAfterAt": "2023-11-07T05:31:56Z",
"versions": [
{
"versionId": "<string>",
"versionNumber": 123,
"itemCount": 4503599627370495,
"contentHash": "<string>",
"changeSummary": {
"added": 4503599627370495,
"updated": 4503599627370495,
"unchanged": 4503599627370495,
"removed": 4503599627370495
},
"syncStatus": "pending",
"createdAt": "2023-11-07T05:31:56Z",
"completedAt": "2023-11-07T05:31:56Z"
}
],
"recentRefreshRuns": [
{
"refreshRunId": "<string>",
"status": "syncing",
"httpStatus": 0,
"itemCount": 4503599627370495,
"activationSkippedReason": "<string>",
"error": "<string>",
"startedAt": "2023-11-07T05:31:56Z",
"completedAt": "2023-11-07T05:31:56Z"
}
],
"recentActivationExecutions": [
{
"executionId": "<string>",
"planId": "<string>",
"catalogVersionId": "<string>",
"status": "pending",
"trigger": "manual",
"campaignGroupCount": 4503599627370495,
"creativeAssetCount": 4503599627370495,
"syndicationTargetCount": 4503599627370495,
"error": "<string>",
"startedAt": "2023-11-07T05:31:56Z",
"completedAt": "2023-11-07T05:31:56Z"
}
],
"advertiserId": 123
}
]
},
"error": {
"code": "<string>",
"message": "<string>",
"field": "<string>",
"details": "<unknown>"
}
}Catalogs
Connect or update catalog feeds (a feed URL or inline items)
POST
/
api
/
v2
/
buyer
/
advertisers
/
{id}
/
catalogs
/
sync
Connect or update catalog feeds (a feed URL or inline items)
curl --request POST \
--url https://api.semicola.com/api/v2/buyer/advertisers/{id}/catalogs/sync \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"catalogs": [
{
"catalogId": "<string>",
"platformId": "<string>",
"name": "<string>",
"url": "<string>",
"items": [
{}
]
}
]
}
'import requests
url = "https://api.semicola.com/api/v2/buyer/advertisers/{id}/catalogs/sync"
payload = { "catalogs": [
{
"catalogId": "<string>",
"platformId": "<string>",
"name": "<string>",
"url": "<string>",
"items": [{}]
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
catalogs: [
{
catalogId: '<string>',
platformId: '<string>',
name: '<string>',
url: '<string>',
items: [{}]
}
]
})
};
fetch('https://api.semicola.com/api/v2/buyer/advertisers/{id}/catalogs/sync', 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.semicola.com/api/v2/buyer/advertisers/{id}/catalogs/sync",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'catalogs' => [
[
'catalogId' => '<string>',
'platformId' => '<string>',
'name' => '<string>',
'url' => '<string>',
'items' => [
[
]
]
]
]
]),
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.semicola.com/api/v2/buyer/advertisers/{id}/catalogs/sync"
payload := strings.NewReader("{\n \"catalogs\": [\n {\n \"catalogId\": \"<string>\",\n \"platformId\": \"<string>\",\n \"name\": \"<string>\",\n \"url\": \"<string>\",\n \"items\": [\n {}\n ]\n }\n ]\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.semicola.com/api/v2/buyer/advertisers/{id}/catalogs/sync")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"catalogs\": [\n {\n \"catalogId\": \"<string>\",\n \"platformId\": \"<string>\",\n \"name\": \"<string>\",\n \"url\": \"<string>\",\n \"items\": [\n {}\n ]\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.semicola.com/api/v2/buyer/advertisers/{id}/catalogs/sync")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"catalogs\": [\n {\n \"catalogId\": \"<string>\",\n \"platformId\": \"<string>\",\n \"name\": \"<string>\",\n \"url\": \"<string>\",\n \"items\": [\n {}\n ]\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {
"catalogs": [
{
"catalogId": "<string>",
"platformId": "<string>",
"type": "offering",
"sourceType": "inline",
"name": "<string>",
"url": "<string>",
"feedFormat": "google_merchant_center",
"updateFrequency": "realtime",
"itemCount": 4503599627370495,
"fields": [
"<string>"
],
"syncStatus": "pending",
"healthStatus": "not_synced",
"latestVersionId": "<string>",
"latestVersionNumber": 0,
"latestContentHash": "<string>",
"activeTransform": {
"groupBy": [
"<string>"
],
"creativePrompt": "<string>",
"budgetPerGroup": 1,
"savedAt": "2023-11-07T05:31:56Z"
},
"latestActivationPlanId": "<string>",
"lastChangeSummary": {
"added": 4503599627370495,
"updated": 4503599627370495,
"unchanged": 4503599627370495,
"removed": 4503599627370495
},
"lastSyncAttemptAt": "2023-11-07T05:31:56Z",
"lastSyncedAt": "2023-11-07T05:31:56Z",
"nextSyncAt": "2023-11-07T05:31:56Z",
"staleAfterAt": "2023-11-07T05:31:56Z",
"versions": [
{
"versionId": "<string>",
"versionNumber": 123,
"itemCount": 4503599627370495,
"contentHash": "<string>",
"changeSummary": {
"added": 4503599627370495,
"updated": 4503599627370495,
"unchanged": 4503599627370495,
"removed": 4503599627370495
},
"syncStatus": "pending",
"createdAt": "2023-11-07T05:31:56Z",
"completedAt": "2023-11-07T05:31:56Z"
}
],
"recentRefreshRuns": [
{
"refreshRunId": "<string>",
"status": "syncing",
"httpStatus": 0,
"itemCount": 4503599627370495,
"activationSkippedReason": "<string>",
"error": "<string>",
"startedAt": "2023-11-07T05:31:56Z",
"completedAt": "2023-11-07T05:31:56Z"
}
],
"recentActivationExecutions": [
{
"executionId": "<string>",
"planId": "<string>",
"catalogVersionId": "<string>",
"status": "pending",
"trigger": "manual",
"campaignGroupCount": 4503599627370495,
"creativeAssetCount": 4503599627370495,
"syndicationTargetCount": 4503599627370495,
"error": "<string>",
"startedAt": "2023-11-07T05:31:56Z",
"completedAt": "2023-11-07T05:31:56Z"
}
],
"advertiserId": 123
}
]
},
"error": {
"code": "<string>",
"message": "<string>",
"field": "<string>",
"details": "<unknown>"
}
}Authorizations
bearerAuthsessionCookie
API key or OAuth access token.
Path Parameters
Required range:
x <= 9007199254740991Body
application/json
Required array length:
1 - 10 elementsShow child attributes
Show child attributes