Authorized Buyers Marketplace API
GET
authorizedbuyersmarketplace.buyers.auctionPackages.list
{{baseUrl}}/v1/:parent/auctionPackages
QUERY PARAMS
parent
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/:parent/auctionPackages");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v1/:parent/auctionPackages")
require "http/client"
url = "{{baseUrl}}/v1/:parent/auctionPackages"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/v1/:parent/auctionPackages"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/:parent/auctionPackages");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/:parent/auctionPackages"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/v1/:parent/auctionPackages HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v1/:parent/auctionPackages")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/:parent/auctionPackages"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/:parent/auctionPackages")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v1/:parent/auctionPackages")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/v1/:parent/auctionPackages');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/v1/:parent/auctionPackages'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/:parent/auctionPackages';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1/:parent/auctionPackages',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v1/:parent/auctionPackages")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/:parent/auctionPackages',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {method: 'GET', url: '{{baseUrl}}/v1/:parent/auctionPackages'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/v1/:parent/auctionPackages');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {method: 'GET', url: '{{baseUrl}}/v1/:parent/auctionPackages'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/:parent/auctionPackages';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/:parent/auctionPackages"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1/:parent/auctionPackages" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/:parent/auctionPackages",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/v1/:parent/auctionPackages');
echo $response->getBody();
setUrl('{{baseUrl}}/v1/:parent/auctionPackages');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v1/:parent/auctionPackages');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/:parent/auctionPackages' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/:parent/auctionPackages' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/v1/:parent/auctionPackages")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/:parent/auctionPackages"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/:parent/auctionPackages"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/:parent/auctionPackages")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/v1/:parent/auctionPackages') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/:parent/auctionPackages";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/v1/:parent/auctionPackages
http GET {{baseUrl}}/v1/:parent/auctionPackages
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/v1/:parent/auctionPackages
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/:parent/auctionPackages")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
authorizedbuyersmarketplace.buyers.auctionPackages.subscribe
{{baseUrl}}/v1/:name:subscribe
QUERY PARAMS
name
BODY json
{}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/:name:subscribe");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v1/:name:subscribe" {:content-type :json})
require "http/client"
url = "{{baseUrl}}/v1/:name:subscribe"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/v1/:name:subscribe"),
Content = new StringContent("{}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/:name:subscribe");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/:name:subscribe"
payload := strings.NewReader("{}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/v1/:name:subscribe HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 2
{}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1/:name:subscribe")
.setHeader("content-type", "application/json")
.setBody("{}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/:name:subscribe"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/:name:subscribe")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1/:name:subscribe")
.header("content-type", "application/json")
.body("{}")
.asString();
const data = JSON.stringify({});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/v1/:name:subscribe');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/:name:subscribe',
headers: {'content-type': 'application/json'},
data: {}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/:name:subscribe';
const options = {method: 'POST', headers: {'content-type': 'application/json'}, body: '{}'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1/:name:subscribe',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{}")
val request = Request.Builder()
.url("{{baseUrl}}/v1/:name:subscribe")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/:name:subscribe',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/:name:subscribe',
headers: {'content-type': 'application/json'},
body: {},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/v1/:name:subscribe');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/:name:subscribe',
headers: {'content-type': 'application/json'},
data: {}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/:name:subscribe';
const options = {method: 'POST', headers: {'content-type': 'application/json'}, body: '{}'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/:name:subscribe"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1/:name:subscribe" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/:name:subscribe",
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([
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/v1/:name:subscribe', [
'body' => '{}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1/:name:subscribe');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
]));
$request->setRequestUrl('{{baseUrl}}/v1/:name:subscribe');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/:name:subscribe' -Method POST -Headers $headers -ContentType 'application/json' -Body '{}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/:name:subscribe' -Method POST -Headers $headers -ContentType 'application/json' -Body '{}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v1/:name:subscribe", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/:name:subscribe"
payload = {}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/:name:subscribe"
payload <- "{}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/:name:subscribe")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/v1/:name:subscribe') do |req|
req.body = "{}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/:name:subscribe";
let payload = json!({});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/v1/:name:subscribe \
--header 'content-type: application/json' \
--data '{}'
echo '{}' | \
http POST {{baseUrl}}/v1/:name:subscribe \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{}' \
--output-document \
- {{baseUrl}}/v1/:name:subscribe
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/:name:subscribe")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
authorizedbuyersmarketplace.buyers.auctionPackages.subscribeClients
{{baseUrl}}/v1/:auctionPackage:subscribeClients
QUERY PARAMS
auctionPackage
BODY json
{
"clients": []
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/:auctionPackage:subscribeClients");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"clients\": []\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v1/:auctionPackage:subscribeClients" {:content-type :json
:form-params {:clients []}})
require "http/client"
url = "{{baseUrl}}/v1/:auctionPackage:subscribeClients"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"clients\": []\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/v1/:auctionPackage:subscribeClients"),
Content = new StringContent("{\n \"clients\": []\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/:auctionPackage:subscribeClients");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"clients\": []\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/:auctionPackage:subscribeClients"
payload := strings.NewReader("{\n \"clients\": []\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/v1/:auctionPackage:subscribeClients HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 19
{
"clients": []
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1/:auctionPackage:subscribeClients")
.setHeader("content-type", "application/json")
.setBody("{\n \"clients\": []\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/:auctionPackage:subscribeClients"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"clients\": []\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"clients\": []\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/:auctionPackage:subscribeClients")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1/:auctionPackage:subscribeClients")
.header("content-type", "application/json")
.body("{\n \"clients\": []\n}")
.asString();
const data = JSON.stringify({
clients: []
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/v1/:auctionPackage:subscribeClients');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/:auctionPackage:subscribeClients',
headers: {'content-type': 'application/json'},
data: {clients: []}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/:auctionPackage:subscribeClients';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"clients":[]}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1/:auctionPackage:subscribeClients',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "clients": []\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"clients\": []\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v1/:auctionPackage:subscribeClients")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/:auctionPackage:subscribeClients',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({clients: []}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/:auctionPackage:subscribeClients',
headers: {'content-type': 'application/json'},
body: {clients: []},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/v1/:auctionPackage:subscribeClients');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
clients: []
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/:auctionPackage:subscribeClients',
headers: {'content-type': 'application/json'},
data: {clients: []}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/:auctionPackage:subscribeClients';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"clients":[]}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"clients": @[ ] };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/:auctionPackage:subscribeClients"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1/:auctionPackage:subscribeClients" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"clients\": []\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/:auctionPackage:subscribeClients",
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([
'clients' => [
]
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/v1/:auctionPackage:subscribeClients', [
'body' => '{
"clients": []
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1/:auctionPackage:subscribeClients');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'clients' => [
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'clients' => [
]
]));
$request->setRequestUrl('{{baseUrl}}/v1/:auctionPackage:subscribeClients');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/:auctionPackage:subscribeClients' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"clients": []
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/:auctionPackage:subscribeClients' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"clients": []
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"clients\": []\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v1/:auctionPackage:subscribeClients", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/:auctionPackage:subscribeClients"
payload = { "clients": [] }
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/:auctionPackage:subscribeClients"
payload <- "{\n \"clients\": []\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/:auctionPackage:subscribeClients")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"clients\": []\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/v1/:auctionPackage:subscribeClients') do |req|
req.body = "{\n \"clients\": []\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/:auctionPackage:subscribeClients";
let payload = json!({"clients": ()});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/v1/:auctionPackage:subscribeClients \
--header 'content-type: application/json' \
--data '{
"clients": []
}'
echo '{
"clients": []
}' | \
http POST {{baseUrl}}/v1/:auctionPackage:subscribeClients \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "clients": []\n}' \
--output-document \
- {{baseUrl}}/v1/:auctionPackage:subscribeClients
import Foundation
let headers = ["content-type": "application/json"]
let parameters = ["clients": []] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/:auctionPackage:subscribeClients")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
authorizedbuyersmarketplace.buyers.auctionPackages.unsubscribe
{{baseUrl}}/v1/:name:unsubscribe
QUERY PARAMS
name
BODY json
{}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/:name:unsubscribe");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v1/:name:unsubscribe" {:content-type :json})
require "http/client"
url = "{{baseUrl}}/v1/:name:unsubscribe"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/v1/:name:unsubscribe"),
Content = new StringContent("{}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/:name:unsubscribe");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/:name:unsubscribe"
payload := strings.NewReader("{}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/v1/:name:unsubscribe HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 2
{}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1/:name:unsubscribe")
.setHeader("content-type", "application/json")
.setBody("{}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/:name:unsubscribe"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/:name:unsubscribe")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1/:name:unsubscribe")
.header("content-type", "application/json")
.body("{}")
.asString();
const data = JSON.stringify({});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/v1/:name:unsubscribe');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/:name:unsubscribe',
headers: {'content-type': 'application/json'},
data: {}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/:name:unsubscribe';
const options = {method: 'POST', headers: {'content-type': 'application/json'}, body: '{}'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1/:name:unsubscribe',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{}")
val request = Request.Builder()
.url("{{baseUrl}}/v1/:name:unsubscribe")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/:name:unsubscribe',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/:name:unsubscribe',
headers: {'content-type': 'application/json'},
body: {},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/v1/:name:unsubscribe');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/:name:unsubscribe',
headers: {'content-type': 'application/json'},
data: {}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/:name:unsubscribe';
const options = {method: 'POST', headers: {'content-type': 'application/json'}, body: '{}'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/:name:unsubscribe"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1/:name:unsubscribe" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/:name:unsubscribe",
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([
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/v1/:name:unsubscribe', [
'body' => '{}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1/:name:unsubscribe');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
]));
$request->setRequestUrl('{{baseUrl}}/v1/:name:unsubscribe');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/:name:unsubscribe' -Method POST -Headers $headers -ContentType 'application/json' -Body '{}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/:name:unsubscribe' -Method POST -Headers $headers -ContentType 'application/json' -Body '{}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v1/:name:unsubscribe", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/:name:unsubscribe"
payload = {}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/:name:unsubscribe"
payload <- "{}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/:name:unsubscribe")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/v1/:name:unsubscribe') do |req|
req.body = "{}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/:name:unsubscribe";
let payload = json!({});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/v1/:name:unsubscribe \
--header 'content-type: application/json' \
--data '{}'
echo '{}' | \
http POST {{baseUrl}}/v1/:name:unsubscribe \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{}' \
--output-document \
- {{baseUrl}}/v1/:name:unsubscribe
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/:name:unsubscribe")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
authorizedbuyersmarketplace.buyers.auctionPackages.unsubscribeClients
{{baseUrl}}/v1/:auctionPackage:unsubscribeClients
QUERY PARAMS
auctionPackage
BODY json
{
"clients": []
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/:auctionPackage:unsubscribeClients");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"clients\": []\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v1/:auctionPackage:unsubscribeClients" {:content-type :json
:form-params {:clients []}})
require "http/client"
url = "{{baseUrl}}/v1/:auctionPackage:unsubscribeClients"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"clients\": []\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/v1/:auctionPackage:unsubscribeClients"),
Content = new StringContent("{\n \"clients\": []\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/:auctionPackage:unsubscribeClients");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"clients\": []\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/:auctionPackage:unsubscribeClients"
payload := strings.NewReader("{\n \"clients\": []\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/v1/:auctionPackage:unsubscribeClients HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 19
{
"clients": []
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1/:auctionPackage:unsubscribeClients")
.setHeader("content-type", "application/json")
.setBody("{\n \"clients\": []\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/:auctionPackage:unsubscribeClients"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"clients\": []\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"clients\": []\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/:auctionPackage:unsubscribeClients")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1/:auctionPackage:unsubscribeClients")
.header("content-type", "application/json")
.body("{\n \"clients\": []\n}")
.asString();
const data = JSON.stringify({
clients: []
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/v1/:auctionPackage:unsubscribeClients');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/:auctionPackage:unsubscribeClients',
headers: {'content-type': 'application/json'},
data: {clients: []}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/:auctionPackage:unsubscribeClients';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"clients":[]}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1/:auctionPackage:unsubscribeClients',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "clients": []\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"clients\": []\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v1/:auctionPackage:unsubscribeClients")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/:auctionPackage:unsubscribeClients',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({clients: []}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/:auctionPackage:unsubscribeClients',
headers: {'content-type': 'application/json'},
body: {clients: []},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/v1/:auctionPackage:unsubscribeClients');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
clients: []
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/:auctionPackage:unsubscribeClients',
headers: {'content-type': 'application/json'},
data: {clients: []}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/:auctionPackage:unsubscribeClients';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"clients":[]}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"clients": @[ ] };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/:auctionPackage:unsubscribeClients"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1/:auctionPackage:unsubscribeClients" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"clients\": []\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/:auctionPackage:unsubscribeClients",
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([
'clients' => [
]
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/v1/:auctionPackage:unsubscribeClients', [
'body' => '{
"clients": []
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1/:auctionPackage:unsubscribeClients');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'clients' => [
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'clients' => [
]
]));
$request->setRequestUrl('{{baseUrl}}/v1/:auctionPackage:unsubscribeClients');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/:auctionPackage:unsubscribeClients' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"clients": []
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/:auctionPackage:unsubscribeClients' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"clients": []
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"clients\": []\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v1/:auctionPackage:unsubscribeClients", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/:auctionPackage:unsubscribeClients"
payload = { "clients": [] }
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/:auctionPackage:unsubscribeClients"
payload <- "{\n \"clients\": []\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/:auctionPackage:unsubscribeClients")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"clients\": []\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/v1/:auctionPackage:unsubscribeClients') do |req|
req.body = "{\n \"clients\": []\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/:auctionPackage:unsubscribeClients";
let payload = json!({"clients": ()});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/v1/:auctionPackage:unsubscribeClients \
--header 'content-type: application/json' \
--data '{
"clients": []
}'
echo '{
"clients": []
}' | \
http POST {{baseUrl}}/v1/:auctionPackage:unsubscribeClients \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "clients": []\n}' \
--output-document \
- {{baseUrl}}/v1/:auctionPackage:unsubscribeClients
import Foundation
let headers = ["content-type": "application/json"]
let parameters = ["clients": []] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/:auctionPackage:unsubscribeClients")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
authorizedbuyersmarketplace.buyers.clients.create
{{baseUrl}}/v1/:parent/clients
QUERY PARAMS
parent
BODY json
{
"displayName": "",
"name": "",
"partnerClientId": "",
"role": "",
"sellerVisible": false,
"state": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/:parent/clients");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"displayName\": \"\",\n \"name\": \"\",\n \"partnerClientId\": \"\",\n \"role\": \"\",\n \"sellerVisible\": false,\n \"state\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v1/:parent/clients" {:content-type :json
:form-params {:displayName ""
:name ""
:partnerClientId ""
:role ""
:sellerVisible false
:state ""}})
require "http/client"
url = "{{baseUrl}}/v1/:parent/clients"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"displayName\": \"\",\n \"name\": \"\",\n \"partnerClientId\": \"\",\n \"role\": \"\",\n \"sellerVisible\": false,\n \"state\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/v1/:parent/clients"),
Content = new StringContent("{\n \"displayName\": \"\",\n \"name\": \"\",\n \"partnerClientId\": \"\",\n \"role\": \"\",\n \"sellerVisible\": false,\n \"state\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/:parent/clients");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"displayName\": \"\",\n \"name\": \"\",\n \"partnerClientId\": \"\",\n \"role\": \"\",\n \"sellerVisible\": false,\n \"state\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/:parent/clients"
payload := strings.NewReader("{\n \"displayName\": \"\",\n \"name\": \"\",\n \"partnerClientId\": \"\",\n \"role\": \"\",\n \"sellerVisible\": false,\n \"state\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/v1/:parent/clients HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 117
{
"displayName": "",
"name": "",
"partnerClientId": "",
"role": "",
"sellerVisible": false,
"state": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1/:parent/clients")
.setHeader("content-type", "application/json")
.setBody("{\n \"displayName\": \"\",\n \"name\": \"\",\n \"partnerClientId\": \"\",\n \"role\": \"\",\n \"sellerVisible\": false,\n \"state\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/:parent/clients"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"displayName\": \"\",\n \"name\": \"\",\n \"partnerClientId\": \"\",\n \"role\": \"\",\n \"sellerVisible\": false,\n \"state\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"displayName\": \"\",\n \"name\": \"\",\n \"partnerClientId\": \"\",\n \"role\": \"\",\n \"sellerVisible\": false,\n \"state\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/:parent/clients")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1/:parent/clients")
.header("content-type", "application/json")
.body("{\n \"displayName\": \"\",\n \"name\": \"\",\n \"partnerClientId\": \"\",\n \"role\": \"\",\n \"sellerVisible\": false,\n \"state\": \"\"\n}")
.asString();
const data = JSON.stringify({
displayName: '',
name: '',
partnerClientId: '',
role: '',
sellerVisible: false,
state: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/v1/:parent/clients');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/:parent/clients',
headers: {'content-type': 'application/json'},
data: {
displayName: '',
name: '',
partnerClientId: '',
role: '',
sellerVisible: false,
state: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/:parent/clients';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"displayName":"","name":"","partnerClientId":"","role":"","sellerVisible":false,"state":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1/:parent/clients',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "displayName": "",\n "name": "",\n "partnerClientId": "",\n "role": "",\n "sellerVisible": false,\n "state": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"displayName\": \"\",\n \"name\": \"\",\n \"partnerClientId\": \"\",\n \"role\": \"\",\n \"sellerVisible\": false,\n \"state\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v1/:parent/clients")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/:parent/clients',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
displayName: '',
name: '',
partnerClientId: '',
role: '',
sellerVisible: false,
state: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/:parent/clients',
headers: {'content-type': 'application/json'},
body: {
displayName: '',
name: '',
partnerClientId: '',
role: '',
sellerVisible: false,
state: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/v1/:parent/clients');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
displayName: '',
name: '',
partnerClientId: '',
role: '',
sellerVisible: false,
state: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/:parent/clients',
headers: {'content-type': 'application/json'},
data: {
displayName: '',
name: '',
partnerClientId: '',
role: '',
sellerVisible: false,
state: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/:parent/clients';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"displayName":"","name":"","partnerClientId":"","role":"","sellerVisible":false,"state":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"displayName": @"",
@"name": @"",
@"partnerClientId": @"",
@"role": @"",
@"sellerVisible": @NO,
@"state": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/:parent/clients"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1/:parent/clients" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"displayName\": \"\",\n \"name\": \"\",\n \"partnerClientId\": \"\",\n \"role\": \"\",\n \"sellerVisible\": false,\n \"state\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/:parent/clients",
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([
'displayName' => '',
'name' => '',
'partnerClientId' => '',
'role' => '',
'sellerVisible' => null,
'state' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/v1/:parent/clients', [
'body' => '{
"displayName": "",
"name": "",
"partnerClientId": "",
"role": "",
"sellerVisible": false,
"state": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1/:parent/clients');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'displayName' => '',
'name' => '',
'partnerClientId' => '',
'role' => '',
'sellerVisible' => null,
'state' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'displayName' => '',
'name' => '',
'partnerClientId' => '',
'role' => '',
'sellerVisible' => null,
'state' => ''
]));
$request->setRequestUrl('{{baseUrl}}/v1/:parent/clients');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/:parent/clients' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"displayName": "",
"name": "",
"partnerClientId": "",
"role": "",
"sellerVisible": false,
"state": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/:parent/clients' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"displayName": "",
"name": "",
"partnerClientId": "",
"role": "",
"sellerVisible": false,
"state": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"displayName\": \"\",\n \"name\": \"\",\n \"partnerClientId\": \"\",\n \"role\": \"\",\n \"sellerVisible\": false,\n \"state\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v1/:parent/clients", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/:parent/clients"
payload = {
"displayName": "",
"name": "",
"partnerClientId": "",
"role": "",
"sellerVisible": False,
"state": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/:parent/clients"
payload <- "{\n \"displayName\": \"\",\n \"name\": \"\",\n \"partnerClientId\": \"\",\n \"role\": \"\",\n \"sellerVisible\": false,\n \"state\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/:parent/clients")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"displayName\": \"\",\n \"name\": \"\",\n \"partnerClientId\": \"\",\n \"role\": \"\",\n \"sellerVisible\": false,\n \"state\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/v1/:parent/clients') do |req|
req.body = "{\n \"displayName\": \"\",\n \"name\": \"\",\n \"partnerClientId\": \"\",\n \"role\": \"\",\n \"sellerVisible\": false,\n \"state\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/:parent/clients";
let payload = json!({
"displayName": "",
"name": "",
"partnerClientId": "",
"role": "",
"sellerVisible": false,
"state": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/v1/:parent/clients \
--header 'content-type: application/json' \
--data '{
"displayName": "",
"name": "",
"partnerClientId": "",
"role": "",
"sellerVisible": false,
"state": ""
}'
echo '{
"displayName": "",
"name": "",
"partnerClientId": "",
"role": "",
"sellerVisible": false,
"state": ""
}' | \
http POST {{baseUrl}}/v1/:parent/clients \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "displayName": "",\n "name": "",\n "partnerClientId": "",\n "role": "",\n "sellerVisible": false,\n "state": ""\n}' \
--output-document \
- {{baseUrl}}/v1/:parent/clients
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"displayName": "",
"name": "",
"partnerClientId": "",
"role": "",
"sellerVisible": false,
"state": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/:parent/clients")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
authorizedbuyersmarketplace.buyers.clients.list
{{baseUrl}}/v1/:parent/clients
QUERY PARAMS
parent
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/:parent/clients");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v1/:parent/clients")
require "http/client"
url = "{{baseUrl}}/v1/:parent/clients"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/v1/:parent/clients"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/:parent/clients");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/:parent/clients"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/v1/:parent/clients HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v1/:parent/clients")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/:parent/clients"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/:parent/clients")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v1/:parent/clients")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/v1/:parent/clients');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/v1/:parent/clients'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/:parent/clients';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1/:parent/clients',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v1/:parent/clients")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/:parent/clients',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {method: 'GET', url: '{{baseUrl}}/v1/:parent/clients'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/v1/:parent/clients');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {method: 'GET', url: '{{baseUrl}}/v1/:parent/clients'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/:parent/clients';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/:parent/clients"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1/:parent/clients" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/:parent/clients",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/v1/:parent/clients');
echo $response->getBody();
setUrl('{{baseUrl}}/v1/:parent/clients');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v1/:parent/clients');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/:parent/clients' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/:parent/clients' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/v1/:parent/clients")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/:parent/clients"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/:parent/clients"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/:parent/clients")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/v1/:parent/clients') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/:parent/clients";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/v1/:parent/clients
http GET {{baseUrl}}/v1/:parent/clients
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/v1/:parent/clients
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/:parent/clients")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
authorizedbuyersmarketplace.buyers.clients.users.activate
{{baseUrl}}/v1/:name:activate
QUERY PARAMS
name
BODY json
{}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/:name:activate");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v1/:name:activate" {:content-type :json})
require "http/client"
url = "{{baseUrl}}/v1/:name:activate"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/v1/:name:activate"),
Content = new StringContent("{}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/:name:activate");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/:name:activate"
payload := strings.NewReader("{}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/v1/:name:activate HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 2
{}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1/:name:activate")
.setHeader("content-type", "application/json")
.setBody("{}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/:name:activate"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/:name:activate")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1/:name:activate")
.header("content-type", "application/json")
.body("{}")
.asString();
const data = JSON.stringify({});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/v1/:name:activate');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/:name:activate',
headers: {'content-type': 'application/json'},
data: {}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/:name:activate';
const options = {method: 'POST', headers: {'content-type': 'application/json'}, body: '{}'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1/:name:activate',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{}")
val request = Request.Builder()
.url("{{baseUrl}}/v1/:name:activate")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/:name:activate',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/:name:activate',
headers: {'content-type': 'application/json'},
body: {},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/v1/:name:activate');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/:name:activate',
headers: {'content-type': 'application/json'},
data: {}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/:name:activate';
const options = {method: 'POST', headers: {'content-type': 'application/json'}, body: '{}'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/:name:activate"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1/:name:activate" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/:name:activate",
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([
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/v1/:name:activate', [
'body' => '{}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1/:name:activate');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
]));
$request->setRequestUrl('{{baseUrl}}/v1/:name:activate');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/:name:activate' -Method POST -Headers $headers -ContentType 'application/json' -Body '{}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/:name:activate' -Method POST -Headers $headers -ContentType 'application/json' -Body '{}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v1/:name:activate", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/:name:activate"
payload = {}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/:name:activate"
payload <- "{}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/:name:activate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/v1/:name:activate') do |req|
req.body = "{}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/:name:activate";
let payload = json!({});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/v1/:name:activate \
--header 'content-type: application/json' \
--data '{}'
echo '{}' | \
http POST {{baseUrl}}/v1/:name:activate \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{}' \
--output-document \
- {{baseUrl}}/v1/:name:activate
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/:name:activate")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
authorizedbuyersmarketplace.buyers.clients.users.create
{{baseUrl}}/v1/:parent/users
QUERY PARAMS
parent
BODY json
{
"email": "",
"name": "",
"state": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/:parent/users");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"email\": \"\",\n \"name\": \"\",\n \"state\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v1/:parent/users" {:content-type :json
:form-params {:email ""
:name ""
:state ""}})
require "http/client"
url = "{{baseUrl}}/v1/:parent/users"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"email\": \"\",\n \"name\": \"\",\n \"state\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/v1/:parent/users"),
Content = new StringContent("{\n \"email\": \"\",\n \"name\": \"\",\n \"state\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/:parent/users");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"email\": \"\",\n \"name\": \"\",\n \"state\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/:parent/users"
payload := strings.NewReader("{\n \"email\": \"\",\n \"name\": \"\",\n \"state\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/v1/:parent/users HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 46
{
"email": "",
"name": "",
"state": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1/:parent/users")
.setHeader("content-type", "application/json")
.setBody("{\n \"email\": \"\",\n \"name\": \"\",\n \"state\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/:parent/users"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"email\": \"\",\n \"name\": \"\",\n \"state\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"email\": \"\",\n \"name\": \"\",\n \"state\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/:parent/users")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1/:parent/users")
.header("content-type", "application/json")
.body("{\n \"email\": \"\",\n \"name\": \"\",\n \"state\": \"\"\n}")
.asString();
const data = JSON.stringify({
email: '',
name: '',
state: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/v1/:parent/users');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/:parent/users',
headers: {'content-type': 'application/json'},
data: {email: '', name: '', state: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/:parent/users';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"email":"","name":"","state":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1/:parent/users',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "email": "",\n "name": "",\n "state": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"email\": \"\",\n \"name\": \"\",\n \"state\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v1/:parent/users")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/:parent/users',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({email: '', name: '', state: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/:parent/users',
headers: {'content-type': 'application/json'},
body: {email: '', name: '', state: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/v1/:parent/users');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
email: '',
name: '',
state: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/:parent/users',
headers: {'content-type': 'application/json'},
data: {email: '', name: '', state: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/:parent/users';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"email":"","name":"","state":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"email": @"",
@"name": @"",
@"state": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/:parent/users"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1/:parent/users" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"email\": \"\",\n \"name\": \"\",\n \"state\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/:parent/users",
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([
'email' => '',
'name' => '',
'state' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/v1/:parent/users', [
'body' => '{
"email": "",
"name": "",
"state": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1/:parent/users');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'email' => '',
'name' => '',
'state' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'email' => '',
'name' => '',
'state' => ''
]));
$request->setRequestUrl('{{baseUrl}}/v1/:parent/users');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/:parent/users' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"email": "",
"name": "",
"state": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/:parent/users' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"email": "",
"name": "",
"state": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"email\": \"\",\n \"name\": \"\",\n \"state\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v1/:parent/users", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/:parent/users"
payload = {
"email": "",
"name": "",
"state": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/:parent/users"
payload <- "{\n \"email\": \"\",\n \"name\": \"\",\n \"state\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/:parent/users")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"email\": \"\",\n \"name\": \"\",\n \"state\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/v1/:parent/users') do |req|
req.body = "{\n \"email\": \"\",\n \"name\": \"\",\n \"state\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/:parent/users";
let payload = json!({
"email": "",
"name": "",
"state": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/v1/:parent/users \
--header 'content-type: application/json' \
--data '{
"email": "",
"name": "",
"state": ""
}'
echo '{
"email": "",
"name": "",
"state": ""
}' | \
http POST {{baseUrl}}/v1/:parent/users \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "email": "",\n "name": "",\n "state": ""\n}' \
--output-document \
- {{baseUrl}}/v1/:parent/users
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"email": "",
"name": "",
"state": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/:parent/users")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
authorizedbuyersmarketplace.buyers.clients.users.deactivate
{{baseUrl}}/v1/:name:deactivate
QUERY PARAMS
name
BODY json
{}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/:name:deactivate");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v1/:name:deactivate" {:content-type :json})
require "http/client"
url = "{{baseUrl}}/v1/:name:deactivate"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/v1/:name:deactivate"),
Content = new StringContent("{}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/:name:deactivate");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/:name:deactivate"
payload := strings.NewReader("{}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/v1/:name:deactivate HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 2
{}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1/:name:deactivate")
.setHeader("content-type", "application/json")
.setBody("{}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/:name:deactivate"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/:name:deactivate")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1/:name:deactivate")
.header("content-type", "application/json")
.body("{}")
.asString();
const data = JSON.stringify({});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/v1/:name:deactivate');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/:name:deactivate',
headers: {'content-type': 'application/json'},
data: {}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/:name:deactivate';
const options = {method: 'POST', headers: {'content-type': 'application/json'}, body: '{}'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1/:name:deactivate',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{}")
val request = Request.Builder()
.url("{{baseUrl}}/v1/:name:deactivate")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/:name:deactivate',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/:name:deactivate',
headers: {'content-type': 'application/json'},
body: {},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/v1/:name:deactivate');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/:name:deactivate',
headers: {'content-type': 'application/json'},
data: {}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/:name:deactivate';
const options = {method: 'POST', headers: {'content-type': 'application/json'}, body: '{}'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/:name:deactivate"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1/:name:deactivate" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/:name:deactivate",
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([
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/v1/:name:deactivate', [
'body' => '{}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1/:name:deactivate');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
]));
$request->setRequestUrl('{{baseUrl}}/v1/:name:deactivate');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/:name:deactivate' -Method POST -Headers $headers -ContentType 'application/json' -Body '{}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/:name:deactivate' -Method POST -Headers $headers -ContentType 'application/json' -Body '{}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v1/:name:deactivate", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/:name:deactivate"
payload = {}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/:name:deactivate"
payload <- "{}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/:name:deactivate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/v1/:name:deactivate') do |req|
req.body = "{}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/:name:deactivate";
let payload = json!({});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/v1/:name:deactivate \
--header 'content-type: application/json' \
--data '{}'
echo '{}' | \
http POST {{baseUrl}}/v1/:name:deactivate \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{}' \
--output-document \
- {{baseUrl}}/v1/:name:deactivate
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/:name:deactivate")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
DELETE
authorizedbuyersmarketplace.buyers.clients.users.delete
{{baseUrl}}/v1/:name
QUERY PARAMS
name
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/:name");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/delete "{{baseUrl}}/v1/:name")
require "http/client"
url = "{{baseUrl}}/v1/:name"
response = HTTP::Client.delete url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Delete,
RequestUri = new Uri("{{baseUrl}}/v1/:name"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/:name");
var request = new RestRequest("", Method.Delete);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/:name"
req, _ := http.NewRequest("DELETE", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
DELETE /baseUrl/v1/:name HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/v1/:name")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/:name"))
.method("DELETE", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/:name")
.delete(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/v1/:name")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('DELETE', '{{baseUrl}}/v1/:name');
xhr.send(data);
import axios from 'axios';
const options = {method: 'DELETE', url: '{{baseUrl}}/v1/:name'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/:name';
const options = {method: 'DELETE'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1/:name',
method: 'DELETE',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v1/:name")
.delete(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'DELETE',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/:name',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {method: 'DELETE', url: '{{baseUrl}}/v1/:name'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('DELETE', '{{baseUrl}}/v1/:name');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {method: 'DELETE', url: '{{baseUrl}}/v1/:name'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/:name';
const options = {method: 'DELETE'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/:name"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"DELETE"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1/:name" in
Client.call `DELETE uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/:name",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('DELETE', '{{baseUrl}}/v1/:name');
echo $response->getBody();
setUrl('{{baseUrl}}/v1/:name');
$request->setMethod(HTTP_METH_DELETE);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v1/:name');
$request->setRequestMethod('DELETE');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/:name' -Method DELETE
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/:name' -Method DELETE
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("DELETE", "/baseUrl/v1/:name")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/:name"
response = requests.delete(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/:name"
response <- VERB("DELETE", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/:name")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.delete('/baseUrl/v1/:name') do |req|
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/:name";
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("DELETE").unwrap(), url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request DELETE \
--url {{baseUrl}}/v1/:name
http DELETE {{baseUrl}}/v1/:name
wget --quiet \
--method DELETE \
--output-document \
- {{baseUrl}}/v1/:name
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/:name")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "DELETE"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
authorizedbuyersmarketplace.buyers.clients.users.list
{{baseUrl}}/v1/:parent/users
QUERY PARAMS
parent
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/:parent/users");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v1/:parent/users")
require "http/client"
url = "{{baseUrl}}/v1/:parent/users"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/v1/:parent/users"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/:parent/users");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/:parent/users"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/v1/:parent/users HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v1/:parent/users")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/:parent/users"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/:parent/users")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v1/:parent/users")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/v1/:parent/users');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/v1/:parent/users'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/:parent/users';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1/:parent/users',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v1/:parent/users")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/:parent/users',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {method: 'GET', url: '{{baseUrl}}/v1/:parent/users'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/v1/:parent/users');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {method: 'GET', url: '{{baseUrl}}/v1/:parent/users'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/:parent/users';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/:parent/users"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1/:parent/users" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/:parent/users",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/v1/:parent/users');
echo $response->getBody();
setUrl('{{baseUrl}}/v1/:parent/users');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v1/:parent/users');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/:parent/users' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/:parent/users' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/v1/:parent/users")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/:parent/users"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/:parent/users"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/:parent/users")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/v1/:parent/users') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/:parent/users";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/v1/:parent/users
http GET {{baseUrl}}/v1/:parent/users
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/v1/:parent/users
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/:parent/users")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
authorizedbuyersmarketplace.buyers.finalizedDeals.addCreative
{{baseUrl}}/v1/:deal:addCreative
QUERY PARAMS
deal
BODY json
{
"creative": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/:deal:addCreative");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"creative\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v1/:deal:addCreative" {:content-type :json
:form-params {:creative ""}})
require "http/client"
url = "{{baseUrl}}/v1/:deal:addCreative"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"creative\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/v1/:deal:addCreative"),
Content = new StringContent("{\n \"creative\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/:deal:addCreative");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"creative\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/:deal:addCreative"
payload := strings.NewReader("{\n \"creative\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/v1/:deal:addCreative HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 20
{
"creative": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1/:deal:addCreative")
.setHeader("content-type", "application/json")
.setBody("{\n \"creative\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/:deal:addCreative"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"creative\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"creative\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/:deal:addCreative")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1/:deal:addCreative")
.header("content-type", "application/json")
.body("{\n \"creative\": \"\"\n}")
.asString();
const data = JSON.stringify({
creative: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/v1/:deal:addCreative');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/:deal:addCreative',
headers: {'content-type': 'application/json'},
data: {creative: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/:deal:addCreative';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"creative":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1/:deal:addCreative',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "creative": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"creative\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v1/:deal:addCreative")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/:deal:addCreative',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({creative: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/:deal:addCreative',
headers: {'content-type': 'application/json'},
body: {creative: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/v1/:deal:addCreative');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
creative: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/:deal:addCreative',
headers: {'content-type': 'application/json'},
data: {creative: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/:deal:addCreative';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"creative":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"creative": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/:deal:addCreative"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1/:deal:addCreative" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"creative\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/:deal:addCreative",
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([
'creative' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/v1/:deal:addCreative', [
'body' => '{
"creative": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1/:deal:addCreative');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'creative' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'creative' => ''
]));
$request->setRequestUrl('{{baseUrl}}/v1/:deal:addCreative');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/:deal:addCreative' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"creative": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/:deal:addCreative' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"creative": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"creative\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v1/:deal:addCreative", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/:deal:addCreative"
payload = { "creative": "" }
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/:deal:addCreative"
payload <- "{\n \"creative\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/:deal:addCreative")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"creative\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/v1/:deal:addCreative') do |req|
req.body = "{\n \"creative\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/:deal:addCreative";
let payload = json!({"creative": ""});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/v1/:deal:addCreative \
--header 'content-type: application/json' \
--data '{
"creative": ""
}'
echo '{
"creative": ""
}' | \
http POST {{baseUrl}}/v1/:deal:addCreative \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "creative": ""\n}' \
--output-document \
- {{baseUrl}}/v1/:deal:addCreative
import Foundation
let headers = ["content-type": "application/json"]
let parameters = ["creative": ""] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/:deal:addCreative")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
authorizedbuyersmarketplace.buyers.finalizedDeals.list
{{baseUrl}}/v1/:parent/finalizedDeals
QUERY PARAMS
parent
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/:parent/finalizedDeals");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v1/:parent/finalizedDeals")
require "http/client"
url = "{{baseUrl}}/v1/:parent/finalizedDeals"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/v1/:parent/finalizedDeals"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/:parent/finalizedDeals");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/:parent/finalizedDeals"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/v1/:parent/finalizedDeals HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v1/:parent/finalizedDeals")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/:parent/finalizedDeals"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/:parent/finalizedDeals")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v1/:parent/finalizedDeals")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/v1/:parent/finalizedDeals');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/v1/:parent/finalizedDeals'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/:parent/finalizedDeals';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1/:parent/finalizedDeals',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v1/:parent/finalizedDeals")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/:parent/finalizedDeals',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {method: 'GET', url: '{{baseUrl}}/v1/:parent/finalizedDeals'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/v1/:parent/finalizedDeals');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {method: 'GET', url: '{{baseUrl}}/v1/:parent/finalizedDeals'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/:parent/finalizedDeals';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/:parent/finalizedDeals"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1/:parent/finalizedDeals" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/:parent/finalizedDeals",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/v1/:parent/finalizedDeals');
echo $response->getBody();
setUrl('{{baseUrl}}/v1/:parent/finalizedDeals');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v1/:parent/finalizedDeals');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/:parent/finalizedDeals' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/:parent/finalizedDeals' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/v1/:parent/finalizedDeals")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/:parent/finalizedDeals"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/:parent/finalizedDeals"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/:parent/finalizedDeals")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/v1/:parent/finalizedDeals') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/:parent/finalizedDeals";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/v1/:parent/finalizedDeals
http GET {{baseUrl}}/v1/:parent/finalizedDeals
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/v1/:parent/finalizedDeals
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/:parent/finalizedDeals")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
authorizedbuyersmarketplace.buyers.finalizedDeals.pause
{{baseUrl}}/v1/:name:pause
QUERY PARAMS
name
BODY json
{
"reason": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/:name:pause");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"reason\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v1/:name:pause" {:content-type :json
:form-params {:reason ""}})
require "http/client"
url = "{{baseUrl}}/v1/:name:pause"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"reason\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/v1/:name:pause"),
Content = new StringContent("{\n \"reason\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/:name:pause");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"reason\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/:name:pause"
payload := strings.NewReader("{\n \"reason\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/v1/:name:pause HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 18
{
"reason": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1/:name:pause")
.setHeader("content-type", "application/json")
.setBody("{\n \"reason\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/:name:pause"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"reason\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"reason\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/:name:pause")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1/:name:pause")
.header("content-type", "application/json")
.body("{\n \"reason\": \"\"\n}")
.asString();
const data = JSON.stringify({
reason: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/v1/:name:pause');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/:name:pause',
headers: {'content-type': 'application/json'},
data: {reason: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/:name:pause';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"reason":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1/:name:pause',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "reason": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"reason\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v1/:name:pause")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/:name:pause',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({reason: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/:name:pause',
headers: {'content-type': 'application/json'},
body: {reason: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/v1/:name:pause');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
reason: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/:name:pause',
headers: {'content-type': 'application/json'},
data: {reason: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/:name:pause';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"reason":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"reason": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/:name:pause"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1/:name:pause" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"reason\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/:name:pause",
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([
'reason' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/v1/:name:pause', [
'body' => '{
"reason": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1/:name:pause');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'reason' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'reason' => ''
]));
$request->setRequestUrl('{{baseUrl}}/v1/:name:pause');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/:name:pause' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"reason": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/:name:pause' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"reason": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"reason\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v1/:name:pause", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/:name:pause"
payload = { "reason": "" }
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/:name:pause"
payload <- "{\n \"reason\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/:name:pause")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"reason\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/v1/:name:pause') do |req|
req.body = "{\n \"reason\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/:name:pause";
let payload = json!({"reason": ""});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/v1/:name:pause \
--header 'content-type: application/json' \
--data '{
"reason": ""
}'
echo '{
"reason": ""
}' | \
http POST {{baseUrl}}/v1/:name:pause \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "reason": ""\n}' \
--output-document \
- {{baseUrl}}/v1/:name:pause
import Foundation
let headers = ["content-type": "application/json"]
let parameters = ["reason": ""] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/:name:pause")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
authorizedbuyersmarketplace.buyers.finalizedDeals.resume
{{baseUrl}}/v1/:name:resume
QUERY PARAMS
name
BODY json
{}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/:name:resume");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v1/:name:resume" {:content-type :json})
require "http/client"
url = "{{baseUrl}}/v1/:name:resume"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/v1/:name:resume"),
Content = new StringContent("{}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/:name:resume");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/:name:resume"
payload := strings.NewReader("{}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/v1/:name:resume HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 2
{}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1/:name:resume")
.setHeader("content-type", "application/json")
.setBody("{}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/:name:resume"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/:name:resume")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1/:name:resume")
.header("content-type", "application/json")
.body("{}")
.asString();
const data = JSON.stringify({});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/v1/:name:resume');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/:name:resume',
headers: {'content-type': 'application/json'},
data: {}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/:name:resume';
const options = {method: 'POST', headers: {'content-type': 'application/json'}, body: '{}'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1/:name:resume',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{}")
val request = Request.Builder()
.url("{{baseUrl}}/v1/:name:resume")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/:name:resume',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/:name:resume',
headers: {'content-type': 'application/json'},
body: {},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/v1/:name:resume');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/:name:resume',
headers: {'content-type': 'application/json'},
data: {}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/:name:resume';
const options = {method: 'POST', headers: {'content-type': 'application/json'}, body: '{}'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/:name:resume"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1/:name:resume" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/:name:resume",
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([
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/v1/:name:resume', [
'body' => '{}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1/:name:resume');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
]));
$request->setRequestUrl('{{baseUrl}}/v1/:name:resume');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/:name:resume' -Method POST -Headers $headers -ContentType 'application/json' -Body '{}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/:name:resume' -Method POST -Headers $headers -ContentType 'application/json' -Body '{}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v1/:name:resume", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/:name:resume"
payload = {}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/:name:resume"
payload <- "{}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/:name:resume")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/v1/:name:resume') do |req|
req.body = "{}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/:name:resume";
let payload = json!({});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/v1/:name:resume \
--header 'content-type: application/json' \
--data '{}'
echo '{}' | \
http POST {{baseUrl}}/v1/:name:resume \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{}' \
--output-document \
- {{baseUrl}}/v1/:name:resume
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/:name:resume")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
authorizedbuyersmarketplace.buyers.finalizedDeals.setReadyToServe
{{baseUrl}}/v1/:deal:setReadyToServe
QUERY PARAMS
deal
BODY json
{}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/:deal:setReadyToServe");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v1/:deal:setReadyToServe" {:content-type :json})
require "http/client"
url = "{{baseUrl}}/v1/:deal:setReadyToServe"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/v1/:deal:setReadyToServe"),
Content = new StringContent("{}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/:deal:setReadyToServe");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/:deal:setReadyToServe"
payload := strings.NewReader("{}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/v1/:deal:setReadyToServe HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 2
{}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1/:deal:setReadyToServe")
.setHeader("content-type", "application/json")
.setBody("{}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/:deal:setReadyToServe"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/:deal:setReadyToServe")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1/:deal:setReadyToServe")
.header("content-type", "application/json")
.body("{}")
.asString();
const data = JSON.stringify({});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/v1/:deal:setReadyToServe');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/:deal:setReadyToServe',
headers: {'content-type': 'application/json'},
data: {}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/:deal:setReadyToServe';
const options = {method: 'POST', headers: {'content-type': 'application/json'}, body: '{}'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1/:deal:setReadyToServe',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{}")
val request = Request.Builder()
.url("{{baseUrl}}/v1/:deal:setReadyToServe")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/:deal:setReadyToServe',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/:deal:setReadyToServe',
headers: {'content-type': 'application/json'},
body: {},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/v1/:deal:setReadyToServe');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/:deal:setReadyToServe',
headers: {'content-type': 'application/json'},
data: {}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/:deal:setReadyToServe';
const options = {method: 'POST', headers: {'content-type': 'application/json'}, body: '{}'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/:deal:setReadyToServe"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1/:deal:setReadyToServe" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/:deal:setReadyToServe",
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([
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/v1/:deal:setReadyToServe', [
'body' => '{}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1/:deal:setReadyToServe');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
]));
$request->setRequestUrl('{{baseUrl}}/v1/:deal:setReadyToServe');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/:deal:setReadyToServe' -Method POST -Headers $headers -ContentType 'application/json' -Body '{}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/:deal:setReadyToServe' -Method POST -Headers $headers -ContentType 'application/json' -Body '{}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v1/:deal:setReadyToServe", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/:deal:setReadyToServe"
payload = {}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/:deal:setReadyToServe"
payload <- "{}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/:deal:setReadyToServe")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/v1/:deal:setReadyToServe') do |req|
req.body = "{}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/:deal:setReadyToServe";
let payload = json!({});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/v1/:deal:setReadyToServe \
--header 'content-type: application/json' \
--data '{}'
echo '{}' | \
http POST {{baseUrl}}/v1/:deal:setReadyToServe \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{}' \
--output-document \
- {{baseUrl}}/v1/:deal:setReadyToServe
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/:deal:setReadyToServe")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
authorizedbuyersmarketplace.buyers.proposals.accept
{{baseUrl}}/v1/:name:accept
QUERY PARAMS
name
BODY json
{
"proposalRevision": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/:name:accept");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"proposalRevision\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v1/:name:accept" {:content-type :json
:form-params {:proposalRevision ""}})
require "http/client"
url = "{{baseUrl}}/v1/:name:accept"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"proposalRevision\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/v1/:name:accept"),
Content = new StringContent("{\n \"proposalRevision\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/:name:accept");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"proposalRevision\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/:name:accept"
payload := strings.NewReader("{\n \"proposalRevision\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/v1/:name:accept HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 28
{
"proposalRevision": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1/:name:accept")
.setHeader("content-type", "application/json")
.setBody("{\n \"proposalRevision\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/:name:accept"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"proposalRevision\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"proposalRevision\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/:name:accept")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1/:name:accept")
.header("content-type", "application/json")
.body("{\n \"proposalRevision\": \"\"\n}")
.asString();
const data = JSON.stringify({
proposalRevision: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/v1/:name:accept');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/:name:accept',
headers: {'content-type': 'application/json'},
data: {proposalRevision: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/:name:accept';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"proposalRevision":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1/:name:accept',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "proposalRevision": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"proposalRevision\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v1/:name:accept")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/:name:accept',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({proposalRevision: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/:name:accept',
headers: {'content-type': 'application/json'},
body: {proposalRevision: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/v1/:name:accept');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
proposalRevision: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/:name:accept',
headers: {'content-type': 'application/json'},
data: {proposalRevision: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/:name:accept';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"proposalRevision":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"proposalRevision": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/:name:accept"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1/:name:accept" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"proposalRevision\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/:name:accept",
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([
'proposalRevision' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/v1/:name:accept', [
'body' => '{
"proposalRevision": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1/:name:accept');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'proposalRevision' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'proposalRevision' => ''
]));
$request->setRequestUrl('{{baseUrl}}/v1/:name:accept');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/:name:accept' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"proposalRevision": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/:name:accept' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"proposalRevision": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"proposalRevision\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v1/:name:accept", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/:name:accept"
payload = { "proposalRevision": "" }
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/:name:accept"
payload <- "{\n \"proposalRevision\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/:name:accept")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"proposalRevision\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/v1/:name:accept') do |req|
req.body = "{\n \"proposalRevision\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/:name:accept";
let payload = json!({"proposalRevision": ""});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/v1/:name:accept \
--header 'content-type: application/json' \
--data '{
"proposalRevision": ""
}'
echo '{
"proposalRevision": ""
}' | \
http POST {{baseUrl}}/v1/:name:accept \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "proposalRevision": ""\n}' \
--output-document \
- {{baseUrl}}/v1/:name:accept
import Foundation
let headers = ["content-type": "application/json"]
let parameters = ["proposalRevision": ""] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/:name:accept")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
authorizedbuyersmarketplace.buyers.proposals.addNote
{{baseUrl}}/v1/:proposal:addNote
QUERY PARAMS
proposal
BODY json
{
"note": {
"createTime": "",
"creatorRole": "",
"note": ""
}
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/:proposal:addNote");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"note\": {\n \"createTime\": \"\",\n \"creatorRole\": \"\",\n \"note\": \"\"\n }\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v1/:proposal:addNote" {:content-type :json
:form-params {:note {:createTime ""
:creatorRole ""
:note ""}}})
require "http/client"
url = "{{baseUrl}}/v1/:proposal:addNote"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"note\": {\n \"createTime\": \"\",\n \"creatorRole\": \"\",\n \"note\": \"\"\n }\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/v1/:proposal:addNote"),
Content = new StringContent("{\n \"note\": {\n \"createTime\": \"\",\n \"creatorRole\": \"\",\n \"note\": \"\"\n }\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/:proposal:addNote");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"note\": {\n \"createTime\": \"\",\n \"creatorRole\": \"\",\n \"note\": \"\"\n }\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/:proposal:addNote"
payload := strings.NewReader("{\n \"note\": {\n \"createTime\": \"\",\n \"creatorRole\": \"\",\n \"note\": \"\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/v1/:proposal:addNote HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 79
{
"note": {
"createTime": "",
"creatorRole": "",
"note": ""
}
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1/:proposal:addNote")
.setHeader("content-type", "application/json")
.setBody("{\n \"note\": {\n \"createTime\": \"\",\n \"creatorRole\": \"\",\n \"note\": \"\"\n }\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/:proposal:addNote"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"note\": {\n \"createTime\": \"\",\n \"creatorRole\": \"\",\n \"note\": \"\"\n }\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"note\": {\n \"createTime\": \"\",\n \"creatorRole\": \"\",\n \"note\": \"\"\n }\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/:proposal:addNote")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1/:proposal:addNote")
.header("content-type", "application/json")
.body("{\n \"note\": {\n \"createTime\": \"\",\n \"creatorRole\": \"\",\n \"note\": \"\"\n }\n}")
.asString();
const data = JSON.stringify({
note: {
createTime: '',
creatorRole: '',
note: ''
}
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/v1/:proposal:addNote');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/:proposal:addNote',
headers: {'content-type': 'application/json'},
data: {note: {createTime: '', creatorRole: '', note: ''}}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/:proposal:addNote';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"note":{"createTime":"","creatorRole":"","note":""}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1/:proposal:addNote',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "note": {\n "createTime": "",\n "creatorRole": "",\n "note": ""\n }\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"note\": {\n \"createTime\": \"\",\n \"creatorRole\": \"\",\n \"note\": \"\"\n }\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v1/:proposal:addNote")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/:proposal:addNote',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({note: {createTime: '', creatorRole: '', note: ''}}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/:proposal:addNote',
headers: {'content-type': 'application/json'},
body: {note: {createTime: '', creatorRole: '', note: ''}},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/v1/:proposal:addNote');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
note: {
createTime: '',
creatorRole: '',
note: ''
}
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/:proposal:addNote',
headers: {'content-type': 'application/json'},
data: {note: {createTime: '', creatorRole: '', note: ''}}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/:proposal:addNote';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"note":{"createTime":"","creatorRole":"","note":""}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"note": @{ @"createTime": @"", @"creatorRole": @"", @"note": @"" } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/:proposal:addNote"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1/:proposal:addNote" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"note\": {\n \"createTime\": \"\",\n \"creatorRole\": \"\",\n \"note\": \"\"\n }\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/:proposal:addNote",
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([
'note' => [
'createTime' => '',
'creatorRole' => '',
'note' => ''
]
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/v1/:proposal:addNote', [
'body' => '{
"note": {
"createTime": "",
"creatorRole": "",
"note": ""
}
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1/:proposal:addNote');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'note' => [
'createTime' => '',
'creatorRole' => '',
'note' => ''
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'note' => [
'createTime' => '',
'creatorRole' => '',
'note' => ''
]
]));
$request->setRequestUrl('{{baseUrl}}/v1/:proposal:addNote');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/:proposal:addNote' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"note": {
"createTime": "",
"creatorRole": "",
"note": ""
}
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/:proposal:addNote' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"note": {
"createTime": "",
"creatorRole": "",
"note": ""
}
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"note\": {\n \"createTime\": \"\",\n \"creatorRole\": \"\",\n \"note\": \"\"\n }\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v1/:proposal:addNote", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/:proposal:addNote"
payload = { "note": {
"createTime": "",
"creatorRole": "",
"note": ""
} }
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/:proposal:addNote"
payload <- "{\n \"note\": {\n \"createTime\": \"\",\n \"creatorRole\": \"\",\n \"note\": \"\"\n }\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/:proposal:addNote")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"note\": {\n \"createTime\": \"\",\n \"creatorRole\": \"\",\n \"note\": \"\"\n }\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/v1/:proposal:addNote') do |req|
req.body = "{\n \"note\": {\n \"createTime\": \"\",\n \"creatorRole\": \"\",\n \"note\": \"\"\n }\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/:proposal:addNote";
let payload = json!({"note": json!({
"createTime": "",
"creatorRole": "",
"note": ""
})});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/v1/:proposal:addNote \
--header 'content-type: application/json' \
--data '{
"note": {
"createTime": "",
"creatorRole": "",
"note": ""
}
}'
echo '{
"note": {
"createTime": "",
"creatorRole": "",
"note": ""
}
}' | \
http POST {{baseUrl}}/v1/:proposal:addNote \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "note": {\n "createTime": "",\n "creatorRole": "",\n "note": ""\n }\n}' \
--output-document \
- {{baseUrl}}/v1/:proposal:addNote
import Foundation
let headers = ["content-type": "application/json"]
let parameters = ["note": [
"createTime": "",
"creatorRole": "",
"note": ""
]] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/:proposal:addNote")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
authorizedbuyersmarketplace.buyers.proposals.cancelNegotiation
{{baseUrl}}/v1/:proposal:cancelNegotiation
QUERY PARAMS
proposal
BODY json
{}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/:proposal:cancelNegotiation");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v1/:proposal:cancelNegotiation" {:content-type :json})
require "http/client"
url = "{{baseUrl}}/v1/:proposal:cancelNegotiation"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/v1/:proposal:cancelNegotiation"),
Content = new StringContent("{}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/:proposal:cancelNegotiation");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/:proposal:cancelNegotiation"
payload := strings.NewReader("{}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/v1/:proposal:cancelNegotiation HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 2
{}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1/:proposal:cancelNegotiation")
.setHeader("content-type", "application/json")
.setBody("{}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/:proposal:cancelNegotiation"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/:proposal:cancelNegotiation")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1/:proposal:cancelNegotiation")
.header("content-type", "application/json")
.body("{}")
.asString();
const data = JSON.stringify({});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/v1/:proposal:cancelNegotiation');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/:proposal:cancelNegotiation',
headers: {'content-type': 'application/json'},
data: {}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/:proposal:cancelNegotiation';
const options = {method: 'POST', headers: {'content-type': 'application/json'}, body: '{}'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1/:proposal:cancelNegotiation',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{}")
val request = Request.Builder()
.url("{{baseUrl}}/v1/:proposal:cancelNegotiation")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/:proposal:cancelNegotiation',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/:proposal:cancelNegotiation',
headers: {'content-type': 'application/json'},
body: {},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/v1/:proposal:cancelNegotiation');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/:proposal:cancelNegotiation',
headers: {'content-type': 'application/json'},
data: {}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/:proposal:cancelNegotiation';
const options = {method: 'POST', headers: {'content-type': 'application/json'}, body: '{}'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/:proposal:cancelNegotiation"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1/:proposal:cancelNegotiation" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/:proposal:cancelNegotiation",
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([
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/v1/:proposal:cancelNegotiation', [
'body' => '{}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1/:proposal:cancelNegotiation');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
]));
$request->setRequestUrl('{{baseUrl}}/v1/:proposal:cancelNegotiation');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/:proposal:cancelNegotiation' -Method POST -Headers $headers -ContentType 'application/json' -Body '{}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/:proposal:cancelNegotiation' -Method POST -Headers $headers -ContentType 'application/json' -Body '{}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v1/:proposal:cancelNegotiation", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/:proposal:cancelNegotiation"
payload = {}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/:proposal:cancelNegotiation"
payload <- "{}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/:proposal:cancelNegotiation")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/v1/:proposal:cancelNegotiation') do |req|
req.body = "{}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/:proposal:cancelNegotiation";
let payload = json!({});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/v1/:proposal:cancelNegotiation \
--header 'content-type: application/json' \
--data '{}'
echo '{}' | \
http POST {{baseUrl}}/v1/:proposal:cancelNegotiation \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{}' \
--output-document \
- {{baseUrl}}/v1/:proposal:cancelNegotiation
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/:proposal:cancelNegotiation")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
authorizedbuyersmarketplace.buyers.proposals.deals.batchUpdate
{{baseUrl}}/v1/:parent/deals:batchUpdate
QUERY PARAMS
parent
BODY json
{
"requests": [
{
"deal": {
"billedBuyer": "",
"buyer": "",
"client": "",
"createTime": "",
"creativeRequirements": {
"creativeFormat": "",
"creativePreApprovalPolicy": "",
"creativeSafeFrameCompatibility": "",
"maxAdDurationMs": "",
"programmaticCreativeSource": "",
"skippableAdType": ""
},
"dealType": "",
"deliveryControl": {
"companionDeliveryType": "",
"creativeRotationType": "",
"deliveryRateType": "",
"frequencyCap": [
{
"maxImpressions": 0,
"timeUnitType": "",
"timeUnitsCount": 0
}
],
"roadblockingType": ""
},
"description": "",
"displayName": "",
"estimatedGrossSpend": {
"currencyCode": "",
"nanos": 0,
"units": ""
},
"flightEndTime": "",
"flightStartTime": "",
"name": "",
"preferredDealTerms": {
"fixedPrice": {
"amount": {},
"type": ""
}
},
"privateAuctionTerms": {
"floorPrice": {},
"openAuctionAllowed": false
},
"programmaticGuaranteedTerms": {
"fixedPrice": {},
"guaranteedLooks": "",
"impressionCap": "",
"minimumDailyLooks": "",
"percentShareOfVoice": "",
"reservationType": ""
},
"proposalRevision": "",
"publisherProfile": "",
"sellerTimeZone": {
"id": "",
"version": ""
},
"targeting": {
"daypartTargeting": {
"dayParts": [
{
"dayOfWeek": "",
"endTime": {
"hours": 0,
"minutes": 0,
"nanos": 0,
"seconds": 0
},
"startTime": {}
}
],
"timeZoneType": ""
},
"geoTargeting": {
"excludedCriteriaIds": [],
"targetedCriteriaIds": []
},
"inventorySizeTargeting": {
"excludedInventorySizes": [
{
"height": "",
"type": "",
"width": ""
}
],
"targetedInventorySizes": [
{}
]
},
"inventoryTypeTargeting": {
"inventoryTypes": []
},
"placementTargeting": {
"mobileApplicationTargeting": {
"firstPartyTargeting": {
"excludedAppIds": [],
"targetedAppIds": []
}
},
"uriTargeting": {
"excludedUris": [],
"targetedUris": []
}
},
"technologyTargeting": {
"deviceCapabilityTargeting": {},
"deviceCategoryTargeting": {},
"operatingSystemTargeting": {
"operatingSystemCriteria": {},
"operatingSystemVersionCriteria": {}
}
},
"userListTargeting": {},
"videoTargeting": {
"excludedPositionTypes": [],
"targetedPositionTypes": []
}
},
"updateTime": ""
},
"updateMask": ""
}
]
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/:parent/deals:batchUpdate");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"requests\": [\n {\n \"deal\": {\n \"billedBuyer\": \"\",\n \"buyer\": \"\",\n \"client\": \"\",\n \"createTime\": \"\",\n \"creativeRequirements\": {\n \"creativeFormat\": \"\",\n \"creativePreApprovalPolicy\": \"\",\n \"creativeSafeFrameCompatibility\": \"\",\n \"maxAdDurationMs\": \"\",\n \"programmaticCreativeSource\": \"\",\n \"skippableAdType\": \"\"\n },\n \"dealType\": \"\",\n \"deliveryControl\": {\n \"companionDeliveryType\": \"\",\n \"creativeRotationType\": \"\",\n \"deliveryRateType\": \"\",\n \"frequencyCap\": [\n {\n \"maxImpressions\": 0,\n \"timeUnitType\": \"\",\n \"timeUnitsCount\": 0\n }\n ],\n \"roadblockingType\": \"\"\n },\n \"description\": \"\",\n \"displayName\": \"\",\n \"estimatedGrossSpend\": {\n \"currencyCode\": \"\",\n \"nanos\": 0,\n \"units\": \"\"\n },\n \"flightEndTime\": \"\",\n \"flightStartTime\": \"\",\n \"name\": \"\",\n \"preferredDealTerms\": {\n \"fixedPrice\": {\n \"amount\": {},\n \"type\": \"\"\n }\n },\n \"privateAuctionTerms\": {\n \"floorPrice\": {},\n \"openAuctionAllowed\": false\n },\n \"programmaticGuaranteedTerms\": {\n \"fixedPrice\": {},\n \"guaranteedLooks\": \"\",\n \"impressionCap\": \"\",\n \"minimumDailyLooks\": \"\",\n \"percentShareOfVoice\": \"\",\n \"reservationType\": \"\"\n },\n \"proposalRevision\": \"\",\n \"publisherProfile\": \"\",\n \"sellerTimeZone\": {\n \"id\": \"\",\n \"version\": \"\"\n },\n \"targeting\": {\n \"daypartTargeting\": {\n \"dayParts\": [\n {\n \"dayOfWeek\": \"\",\n \"endTime\": {\n \"hours\": 0,\n \"minutes\": 0,\n \"nanos\": 0,\n \"seconds\": 0\n },\n \"startTime\": {}\n }\n ],\n \"timeZoneType\": \"\"\n },\n \"geoTargeting\": {\n \"excludedCriteriaIds\": [],\n \"targetedCriteriaIds\": []\n },\n \"inventorySizeTargeting\": {\n \"excludedInventorySizes\": [\n {\n \"height\": \"\",\n \"type\": \"\",\n \"width\": \"\"\n }\n ],\n \"targetedInventorySizes\": [\n {}\n ]\n },\n \"inventoryTypeTargeting\": {\n \"inventoryTypes\": []\n },\n \"placementTargeting\": {\n \"mobileApplicationTargeting\": {\n \"firstPartyTargeting\": {\n \"excludedAppIds\": [],\n \"targetedAppIds\": []\n }\n },\n \"uriTargeting\": {\n \"excludedUris\": [],\n \"targetedUris\": []\n }\n },\n \"technologyTargeting\": {\n \"deviceCapabilityTargeting\": {},\n \"deviceCategoryTargeting\": {},\n \"operatingSystemTargeting\": {\n \"operatingSystemCriteria\": {},\n \"operatingSystemVersionCriteria\": {}\n }\n },\n \"userListTargeting\": {},\n \"videoTargeting\": {\n \"excludedPositionTypes\": [],\n \"targetedPositionTypes\": []\n }\n },\n \"updateTime\": \"\"\n },\n \"updateMask\": \"\"\n }\n ]\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v1/:parent/deals:batchUpdate" {:content-type :json
:form-params {:requests [{:deal {:billedBuyer ""
:buyer ""
:client ""
:createTime ""
:creativeRequirements {:creativeFormat ""
:creativePreApprovalPolicy ""
:creativeSafeFrameCompatibility ""
:maxAdDurationMs ""
:programmaticCreativeSource ""
:skippableAdType ""}
:dealType ""
:deliveryControl {:companionDeliveryType ""
:creativeRotationType ""
:deliveryRateType ""
:frequencyCap [{:maxImpressions 0
:timeUnitType ""
:timeUnitsCount 0}]
:roadblockingType ""}
:description ""
:displayName ""
:estimatedGrossSpend {:currencyCode ""
:nanos 0
:units ""}
:flightEndTime ""
:flightStartTime ""
:name ""
:preferredDealTerms {:fixedPrice {:amount {}
:type ""}}
:privateAuctionTerms {:floorPrice {}
:openAuctionAllowed false}
:programmaticGuaranteedTerms {:fixedPrice {}
:guaranteedLooks ""
:impressionCap ""
:minimumDailyLooks ""
:percentShareOfVoice ""
:reservationType ""}
:proposalRevision ""
:publisherProfile ""
:sellerTimeZone {:id ""
:version ""}
:targeting {:daypartTargeting {:dayParts [{:dayOfWeek ""
:endTime {:hours 0
:minutes 0
:nanos 0
:seconds 0}
:startTime {}}]
:timeZoneType ""}
:geoTargeting {:excludedCriteriaIds []
:targetedCriteriaIds []}
:inventorySizeTargeting {:excludedInventorySizes [{:height ""
:type ""
:width ""}]
:targetedInventorySizes [{}]}
:inventoryTypeTargeting {:inventoryTypes []}
:placementTargeting {:mobileApplicationTargeting {:firstPartyTargeting {:excludedAppIds []
:targetedAppIds []}}
:uriTargeting {:excludedUris []
:targetedUris []}}
:technologyTargeting {:deviceCapabilityTargeting {}
:deviceCategoryTargeting {}
:operatingSystemTargeting {:operatingSystemCriteria {}
:operatingSystemVersionCriteria {}}}
:userListTargeting {}
:videoTargeting {:excludedPositionTypes []
:targetedPositionTypes []}}
:updateTime ""}
:updateMask ""}]}})
require "http/client"
url = "{{baseUrl}}/v1/:parent/deals:batchUpdate"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"requests\": [\n {\n \"deal\": {\n \"billedBuyer\": \"\",\n \"buyer\": \"\",\n \"client\": \"\",\n \"createTime\": \"\",\n \"creativeRequirements\": {\n \"creativeFormat\": \"\",\n \"creativePreApprovalPolicy\": \"\",\n \"creativeSafeFrameCompatibility\": \"\",\n \"maxAdDurationMs\": \"\",\n \"programmaticCreativeSource\": \"\",\n \"skippableAdType\": \"\"\n },\n \"dealType\": \"\",\n \"deliveryControl\": {\n \"companionDeliveryType\": \"\",\n \"creativeRotationType\": \"\",\n \"deliveryRateType\": \"\",\n \"frequencyCap\": [\n {\n \"maxImpressions\": 0,\n \"timeUnitType\": \"\",\n \"timeUnitsCount\": 0\n }\n ],\n \"roadblockingType\": \"\"\n },\n \"description\": \"\",\n \"displayName\": \"\",\n \"estimatedGrossSpend\": {\n \"currencyCode\": \"\",\n \"nanos\": 0,\n \"units\": \"\"\n },\n \"flightEndTime\": \"\",\n \"flightStartTime\": \"\",\n \"name\": \"\",\n \"preferredDealTerms\": {\n \"fixedPrice\": {\n \"amount\": {},\n \"type\": \"\"\n }\n },\n \"privateAuctionTerms\": {\n \"floorPrice\": {},\n \"openAuctionAllowed\": false\n },\n \"programmaticGuaranteedTerms\": {\n \"fixedPrice\": {},\n \"guaranteedLooks\": \"\",\n \"impressionCap\": \"\",\n \"minimumDailyLooks\": \"\",\n \"percentShareOfVoice\": \"\",\n \"reservationType\": \"\"\n },\n \"proposalRevision\": \"\",\n \"publisherProfile\": \"\",\n \"sellerTimeZone\": {\n \"id\": \"\",\n \"version\": \"\"\n },\n \"targeting\": {\n \"daypartTargeting\": {\n \"dayParts\": [\n {\n \"dayOfWeek\": \"\",\n \"endTime\": {\n \"hours\": 0,\n \"minutes\": 0,\n \"nanos\": 0,\n \"seconds\": 0\n },\n \"startTime\": {}\n }\n ],\n \"timeZoneType\": \"\"\n },\n \"geoTargeting\": {\n \"excludedCriteriaIds\": [],\n \"targetedCriteriaIds\": []\n },\n \"inventorySizeTargeting\": {\n \"excludedInventorySizes\": [\n {\n \"height\": \"\",\n \"type\": \"\",\n \"width\": \"\"\n }\n ],\n \"targetedInventorySizes\": [\n {}\n ]\n },\n \"inventoryTypeTargeting\": {\n \"inventoryTypes\": []\n },\n \"placementTargeting\": {\n \"mobileApplicationTargeting\": {\n \"firstPartyTargeting\": {\n \"excludedAppIds\": [],\n \"targetedAppIds\": []\n }\n },\n \"uriTargeting\": {\n \"excludedUris\": [],\n \"targetedUris\": []\n }\n },\n \"technologyTargeting\": {\n \"deviceCapabilityTargeting\": {},\n \"deviceCategoryTargeting\": {},\n \"operatingSystemTargeting\": {\n \"operatingSystemCriteria\": {},\n \"operatingSystemVersionCriteria\": {}\n }\n },\n \"userListTargeting\": {},\n \"videoTargeting\": {\n \"excludedPositionTypes\": [],\n \"targetedPositionTypes\": []\n }\n },\n \"updateTime\": \"\"\n },\n \"updateMask\": \"\"\n }\n ]\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/v1/:parent/deals:batchUpdate"),
Content = new StringContent("{\n \"requests\": [\n {\n \"deal\": {\n \"billedBuyer\": \"\",\n \"buyer\": \"\",\n \"client\": \"\",\n \"createTime\": \"\",\n \"creativeRequirements\": {\n \"creativeFormat\": \"\",\n \"creativePreApprovalPolicy\": \"\",\n \"creativeSafeFrameCompatibility\": \"\",\n \"maxAdDurationMs\": \"\",\n \"programmaticCreativeSource\": \"\",\n \"skippableAdType\": \"\"\n },\n \"dealType\": \"\",\n \"deliveryControl\": {\n \"companionDeliveryType\": \"\",\n \"creativeRotationType\": \"\",\n \"deliveryRateType\": \"\",\n \"frequencyCap\": [\n {\n \"maxImpressions\": 0,\n \"timeUnitType\": \"\",\n \"timeUnitsCount\": 0\n }\n ],\n \"roadblockingType\": \"\"\n },\n \"description\": \"\",\n \"displayName\": \"\",\n \"estimatedGrossSpend\": {\n \"currencyCode\": \"\",\n \"nanos\": 0,\n \"units\": \"\"\n },\n \"flightEndTime\": \"\",\n \"flightStartTime\": \"\",\n \"name\": \"\",\n \"preferredDealTerms\": {\n \"fixedPrice\": {\n \"amount\": {},\n \"type\": \"\"\n }\n },\n \"privateAuctionTerms\": {\n \"floorPrice\": {},\n \"openAuctionAllowed\": false\n },\n \"programmaticGuaranteedTerms\": {\n \"fixedPrice\": {},\n \"guaranteedLooks\": \"\",\n \"impressionCap\": \"\",\n \"minimumDailyLooks\": \"\",\n \"percentShareOfVoice\": \"\",\n \"reservationType\": \"\"\n },\n \"proposalRevision\": \"\",\n \"publisherProfile\": \"\",\n \"sellerTimeZone\": {\n \"id\": \"\",\n \"version\": \"\"\n },\n \"targeting\": {\n \"daypartTargeting\": {\n \"dayParts\": [\n {\n \"dayOfWeek\": \"\",\n \"endTime\": {\n \"hours\": 0,\n \"minutes\": 0,\n \"nanos\": 0,\n \"seconds\": 0\n },\n \"startTime\": {}\n }\n ],\n \"timeZoneType\": \"\"\n },\n \"geoTargeting\": {\n \"excludedCriteriaIds\": [],\n \"targetedCriteriaIds\": []\n },\n \"inventorySizeTargeting\": {\n \"excludedInventorySizes\": [\n {\n \"height\": \"\",\n \"type\": \"\",\n \"width\": \"\"\n }\n ],\n \"targetedInventorySizes\": [\n {}\n ]\n },\n \"inventoryTypeTargeting\": {\n \"inventoryTypes\": []\n },\n \"placementTargeting\": {\n \"mobileApplicationTargeting\": {\n \"firstPartyTargeting\": {\n \"excludedAppIds\": [],\n \"targetedAppIds\": []\n }\n },\n \"uriTargeting\": {\n \"excludedUris\": [],\n \"targetedUris\": []\n }\n },\n \"technologyTargeting\": {\n \"deviceCapabilityTargeting\": {},\n \"deviceCategoryTargeting\": {},\n \"operatingSystemTargeting\": {\n \"operatingSystemCriteria\": {},\n \"operatingSystemVersionCriteria\": {}\n }\n },\n \"userListTargeting\": {},\n \"videoTargeting\": {\n \"excludedPositionTypes\": [],\n \"targetedPositionTypes\": []\n }\n },\n \"updateTime\": \"\"\n },\n \"updateMask\": \"\"\n }\n ]\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/:parent/deals:batchUpdate");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"requests\": [\n {\n \"deal\": {\n \"billedBuyer\": \"\",\n \"buyer\": \"\",\n \"client\": \"\",\n \"createTime\": \"\",\n \"creativeRequirements\": {\n \"creativeFormat\": \"\",\n \"creativePreApprovalPolicy\": \"\",\n \"creativeSafeFrameCompatibility\": \"\",\n \"maxAdDurationMs\": \"\",\n \"programmaticCreativeSource\": \"\",\n \"skippableAdType\": \"\"\n },\n \"dealType\": \"\",\n \"deliveryControl\": {\n \"companionDeliveryType\": \"\",\n \"creativeRotationType\": \"\",\n \"deliveryRateType\": \"\",\n \"frequencyCap\": [\n {\n \"maxImpressions\": 0,\n \"timeUnitType\": \"\",\n \"timeUnitsCount\": 0\n }\n ],\n \"roadblockingType\": \"\"\n },\n \"description\": \"\",\n \"displayName\": \"\",\n \"estimatedGrossSpend\": {\n \"currencyCode\": \"\",\n \"nanos\": 0,\n \"units\": \"\"\n },\n \"flightEndTime\": \"\",\n \"flightStartTime\": \"\",\n \"name\": \"\",\n \"preferredDealTerms\": {\n \"fixedPrice\": {\n \"amount\": {},\n \"type\": \"\"\n }\n },\n \"privateAuctionTerms\": {\n \"floorPrice\": {},\n \"openAuctionAllowed\": false\n },\n \"programmaticGuaranteedTerms\": {\n \"fixedPrice\": {},\n \"guaranteedLooks\": \"\",\n \"impressionCap\": \"\",\n \"minimumDailyLooks\": \"\",\n \"percentShareOfVoice\": \"\",\n \"reservationType\": \"\"\n },\n \"proposalRevision\": \"\",\n \"publisherProfile\": \"\",\n \"sellerTimeZone\": {\n \"id\": \"\",\n \"version\": \"\"\n },\n \"targeting\": {\n \"daypartTargeting\": {\n \"dayParts\": [\n {\n \"dayOfWeek\": \"\",\n \"endTime\": {\n \"hours\": 0,\n \"minutes\": 0,\n \"nanos\": 0,\n \"seconds\": 0\n },\n \"startTime\": {}\n }\n ],\n \"timeZoneType\": \"\"\n },\n \"geoTargeting\": {\n \"excludedCriteriaIds\": [],\n \"targetedCriteriaIds\": []\n },\n \"inventorySizeTargeting\": {\n \"excludedInventorySizes\": [\n {\n \"height\": \"\",\n \"type\": \"\",\n \"width\": \"\"\n }\n ],\n \"targetedInventorySizes\": [\n {}\n ]\n },\n \"inventoryTypeTargeting\": {\n \"inventoryTypes\": []\n },\n \"placementTargeting\": {\n \"mobileApplicationTargeting\": {\n \"firstPartyTargeting\": {\n \"excludedAppIds\": [],\n \"targetedAppIds\": []\n }\n },\n \"uriTargeting\": {\n \"excludedUris\": [],\n \"targetedUris\": []\n }\n },\n \"technologyTargeting\": {\n \"deviceCapabilityTargeting\": {},\n \"deviceCategoryTargeting\": {},\n \"operatingSystemTargeting\": {\n \"operatingSystemCriteria\": {},\n \"operatingSystemVersionCriteria\": {}\n }\n },\n \"userListTargeting\": {},\n \"videoTargeting\": {\n \"excludedPositionTypes\": [],\n \"targetedPositionTypes\": []\n }\n },\n \"updateTime\": \"\"\n },\n \"updateMask\": \"\"\n }\n ]\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/:parent/deals:batchUpdate"
payload := strings.NewReader("{\n \"requests\": [\n {\n \"deal\": {\n \"billedBuyer\": \"\",\n \"buyer\": \"\",\n \"client\": \"\",\n \"createTime\": \"\",\n \"creativeRequirements\": {\n \"creativeFormat\": \"\",\n \"creativePreApprovalPolicy\": \"\",\n \"creativeSafeFrameCompatibility\": \"\",\n \"maxAdDurationMs\": \"\",\n \"programmaticCreativeSource\": \"\",\n \"skippableAdType\": \"\"\n },\n \"dealType\": \"\",\n \"deliveryControl\": {\n \"companionDeliveryType\": \"\",\n \"creativeRotationType\": \"\",\n \"deliveryRateType\": \"\",\n \"frequencyCap\": [\n {\n \"maxImpressions\": 0,\n \"timeUnitType\": \"\",\n \"timeUnitsCount\": 0\n }\n ],\n \"roadblockingType\": \"\"\n },\n \"description\": \"\",\n \"displayName\": \"\",\n \"estimatedGrossSpend\": {\n \"currencyCode\": \"\",\n \"nanos\": 0,\n \"units\": \"\"\n },\n \"flightEndTime\": \"\",\n \"flightStartTime\": \"\",\n \"name\": \"\",\n \"preferredDealTerms\": {\n \"fixedPrice\": {\n \"amount\": {},\n \"type\": \"\"\n }\n },\n \"privateAuctionTerms\": {\n \"floorPrice\": {},\n \"openAuctionAllowed\": false\n },\n \"programmaticGuaranteedTerms\": {\n \"fixedPrice\": {},\n \"guaranteedLooks\": \"\",\n \"impressionCap\": \"\",\n \"minimumDailyLooks\": \"\",\n \"percentShareOfVoice\": \"\",\n \"reservationType\": \"\"\n },\n \"proposalRevision\": \"\",\n \"publisherProfile\": \"\",\n \"sellerTimeZone\": {\n \"id\": \"\",\n \"version\": \"\"\n },\n \"targeting\": {\n \"daypartTargeting\": {\n \"dayParts\": [\n {\n \"dayOfWeek\": \"\",\n \"endTime\": {\n \"hours\": 0,\n \"minutes\": 0,\n \"nanos\": 0,\n \"seconds\": 0\n },\n \"startTime\": {}\n }\n ],\n \"timeZoneType\": \"\"\n },\n \"geoTargeting\": {\n \"excludedCriteriaIds\": [],\n \"targetedCriteriaIds\": []\n },\n \"inventorySizeTargeting\": {\n \"excludedInventorySizes\": [\n {\n \"height\": \"\",\n \"type\": \"\",\n \"width\": \"\"\n }\n ],\n \"targetedInventorySizes\": [\n {}\n ]\n },\n \"inventoryTypeTargeting\": {\n \"inventoryTypes\": []\n },\n \"placementTargeting\": {\n \"mobileApplicationTargeting\": {\n \"firstPartyTargeting\": {\n \"excludedAppIds\": [],\n \"targetedAppIds\": []\n }\n },\n \"uriTargeting\": {\n \"excludedUris\": [],\n \"targetedUris\": []\n }\n },\n \"technologyTargeting\": {\n \"deviceCapabilityTargeting\": {},\n \"deviceCategoryTargeting\": {},\n \"operatingSystemTargeting\": {\n \"operatingSystemCriteria\": {},\n \"operatingSystemVersionCriteria\": {}\n }\n },\n \"userListTargeting\": {},\n \"videoTargeting\": {\n \"excludedPositionTypes\": [],\n \"targetedPositionTypes\": []\n }\n },\n \"updateTime\": \"\"\n },\n \"updateMask\": \"\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/v1/:parent/deals:batchUpdate HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 3457
{
"requests": [
{
"deal": {
"billedBuyer": "",
"buyer": "",
"client": "",
"createTime": "",
"creativeRequirements": {
"creativeFormat": "",
"creativePreApprovalPolicy": "",
"creativeSafeFrameCompatibility": "",
"maxAdDurationMs": "",
"programmaticCreativeSource": "",
"skippableAdType": ""
},
"dealType": "",
"deliveryControl": {
"companionDeliveryType": "",
"creativeRotationType": "",
"deliveryRateType": "",
"frequencyCap": [
{
"maxImpressions": 0,
"timeUnitType": "",
"timeUnitsCount": 0
}
],
"roadblockingType": ""
},
"description": "",
"displayName": "",
"estimatedGrossSpend": {
"currencyCode": "",
"nanos": 0,
"units": ""
},
"flightEndTime": "",
"flightStartTime": "",
"name": "",
"preferredDealTerms": {
"fixedPrice": {
"amount": {},
"type": ""
}
},
"privateAuctionTerms": {
"floorPrice": {},
"openAuctionAllowed": false
},
"programmaticGuaranteedTerms": {
"fixedPrice": {},
"guaranteedLooks": "",
"impressionCap": "",
"minimumDailyLooks": "",
"percentShareOfVoice": "",
"reservationType": ""
},
"proposalRevision": "",
"publisherProfile": "",
"sellerTimeZone": {
"id": "",
"version": ""
},
"targeting": {
"daypartTargeting": {
"dayParts": [
{
"dayOfWeek": "",
"endTime": {
"hours": 0,
"minutes": 0,
"nanos": 0,
"seconds": 0
},
"startTime": {}
}
],
"timeZoneType": ""
},
"geoTargeting": {
"excludedCriteriaIds": [],
"targetedCriteriaIds": []
},
"inventorySizeTargeting": {
"excludedInventorySizes": [
{
"height": "",
"type": "",
"width": ""
}
],
"targetedInventorySizes": [
{}
]
},
"inventoryTypeTargeting": {
"inventoryTypes": []
},
"placementTargeting": {
"mobileApplicationTargeting": {
"firstPartyTargeting": {
"excludedAppIds": [],
"targetedAppIds": []
}
},
"uriTargeting": {
"excludedUris": [],
"targetedUris": []
}
},
"technologyTargeting": {
"deviceCapabilityTargeting": {},
"deviceCategoryTargeting": {},
"operatingSystemTargeting": {
"operatingSystemCriteria": {},
"operatingSystemVersionCriteria": {}
}
},
"userListTargeting": {},
"videoTargeting": {
"excludedPositionTypes": [],
"targetedPositionTypes": []
}
},
"updateTime": ""
},
"updateMask": ""
}
]
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1/:parent/deals:batchUpdate")
.setHeader("content-type", "application/json")
.setBody("{\n \"requests\": [\n {\n \"deal\": {\n \"billedBuyer\": \"\",\n \"buyer\": \"\",\n \"client\": \"\",\n \"createTime\": \"\",\n \"creativeRequirements\": {\n \"creativeFormat\": \"\",\n \"creativePreApprovalPolicy\": \"\",\n \"creativeSafeFrameCompatibility\": \"\",\n \"maxAdDurationMs\": \"\",\n \"programmaticCreativeSource\": \"\",\n \"skippableAdType\": \"\"\n },\n \"dealType\": \"\",\n \"deliveryControl\": {\n \"companionDeliveryType\": \"\",\n \"creativeRotationType\": \"\",\n \"deliveryRateType\": \"\",\n \"frequencyCap\": [\n {\n \"maxImpressions\": 0,\n \"timeUnitType\": \"\",\n \"timeUnitsCount\": 0\n }\n ],\n \"roadblockingType\": \"\"\n },\n \"description\": \"\",\n \"displayName\": \"\",\n \"estimatedGrossSpend\": {\n \"currencyCode\": \"\",\n \"nanos\": 0,\n \"units\": \"\"\n },\n \"flightEndTime\": \"\",\n \"flightStartTime\": \"\",\n \"name\": \"\",\n \"preferredDealTerms\": {\n \"fixedPrice\": {\n \"amount\": {},\n \"type\": \"\"\n }\n },\n \"privateAuctionTerms\": {\n \"floorPrice\": {},\n \"openAuctionAllowed\": false\n },\n \"programmaticGuaranteedTerms\": {\n \"fixedPrice\": {},\n \"guaranteedLooks\": \"\",\n \"impressionCap\": \"\",\n \"minimumDailyLooks\": \"\",\n \"percentShareOfVoice\": \"\",\n \"reservationType\": \"\"\n },\n \"proposalRevision\": \"\",\n \"publisherProfile\": \"\",\n \"sellerTimeZone\": {\n \"id\": \"\",\n \"version\": \"\"\n },\n \"targeting\": {\n \"daypartTargeting\": {\n \"dayParts\": [\n {\n \"dayOfWeek\": \"\",\n \"endTime\": {\n \"hours\": 0,\n \"minutes\": 0,\n \"nanos\": 0,\n \"seconds\": 0\n },\n \"startTime\": {}\n }\n ],\n \"timeZoneType\": \"\"\n },\n \"geoTargeting\": {\n \"excludedCriteriaIds\": [],\n \"targetedCriteriaIds\": []\n },\n \"inventorySizeTargeting\": {\n \"excludedInventorySizes\": [\n {\n \"height\": \"\",\n \"type\": \"\",\n \"width\": \"\"\n }\n ],\n \"targetedInventorySizes\": [\n {}\n ]\n },\n \"inventoryTypeTargeting\": {\n \"inventoryTypes\": []\n },\n \"placementTargeting\": {\n \"mobileApplicationTargeting\": {\n \"firstPartyTargeting\": {\n \"excludedAppIds\": [],\n \"targetedAppIds\": []\n }\n },\n \"uriTargeting\": {\n \"excludedUris\": [],\n \"targetedUris\": []\n }\n },\n \"technologyTargeting\": {\n \"deviceCapabilityTargeting\": {},\n \"deviceCategoryTargeting\": {},\n \"operatingSystemTargeting\": {\n \"operatingSystemCriteria\": {},\n \"operatingSystemVersionCriteria\": {}\n }\n },\n \"userListTargeting\": {},\n \"videoTargeting\": {\n \"excludedPositionTypes\": [],\n \"targetedPositionTypes\": []\n }\n },\n \"updateTime\": \"\"\n },\n \"updateMask\": \"\"\n }\n ]\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/:parent/deals:batchUpdate"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"requests\": [\n {\n \"deal\": {\n \"billedBuyer\": \"\",\n \"buyer\": \"\",\n \"client\": \"\",\n \"createTime\": \"\",\n \"creativeRequirements\": {\n \"creativeFormat\": \"\",\n \"creativePreApprovalPolicy\": \"\",\n \"creativeSafeFrameCompatibility\": \"\",\n \"maxAdDurationMs\": \"\",\n \"programmaticCreativeSource\": \"\",\n \"skippableAdType\": \"\"\n },\n \"dealType\": \"\",\n \"deliveryControl\": {\n \"companionDeliveryType\": \"\",\n \"creativeRotationType\": \"\",\n \"deliveryRateType\": \"\",\n \"frequencyCap\": [\n {\n \"maxImpressions\": 0,\n \"timeUnitType\": \"\",\n \"timeUnitsCount\": 0\n }\n ],\n \"roadblockingType\": \"\"\n },\n \"description\": \"\",\n \"displayName\": \"\",\n \"estimatedGrossSpend\": {\n \"currencyCode\": \"\",\n \"nanos\": 0,\n \"units\": \"\"\n },\n \"flightEndTime\": \"\",\n \"flightStartTime\": \"\",\n \"name\": \"\",\n \"preferredDealTerms\": {\n \"fixedPrice\": {\n \"amount\": {},\n \"type\": \"\"\n }\n },\n \"privateAuctionTerms\": {\n \"floorPrice\": {},\n \"openAuctionAllowed\": false\n },\n \"programmaticGuaranteedTerms\": {\n \"fixedPrice\": {},\n \"guaranteedLooks\": \"\",\n \"impressionCap\": \"\",\n \"minimumDailyLooks\": \"\",\n \"percentShareOfVoice\": \"\",\n \"reservationType\": \"\"\n },\n \"proposalRevision\": \"\",\n \"publisherProfile\": \"\",\n \"sellerTimeZone\": {\n \"id\": \"\",\n \"version\": \"\"\n },\n \"targeting\": {\n \"daypartTargeting\": {\n \"dayParts\": [\n {\n \"dayOfWeek\": \"\",\n \"endTime\": {\n \"hours\": 0,\n \"minutes\": 0,\n \"nanos\": 0,\n \"seconds\": 0\n },\n \"startTime\": {}\n }\n ],\n \"timeZoneType\": \"\"\n },\n \"geoTargeting\": {\n \"excludedCriteriaIds\": [],\n \"targetedCriteriaIds\": []\n },\n \"inventorySizeTargeting\": {\n \"excludedInventorySizes\": [\n {\n \"height\": \"\",\n \"type\": \"\",\n \"width\": \"\"\n }\n ],\n \"targetedInventorySizes\": [\n {}\n ]\n },\n \"inventoryTypeTargeting\": {\n \"inventoryTypes\": []\n },\n \"placementTargeting\": {\n \"mobileApplicationTargeting\": {\n \"firstPartyTargeting\": {\n \"excludedAppIds\": [],\n \"targetedAppIds\": []\n }\n },\n \"uriTargeting\": {\n \"excludedUris\": [],\n \"targetedUris\": []\n }\n },\n \"technologyTargeting\": {\n \"deviceCapabilityTargeting\": {},\n \"deviceCategoryTargeting\": {},\n \"operatingSystemTargeting\": {\n \"operatingSystemCriteria\": {},\n \"operatingSystemVersionCriteria\": {}\n }\n },\n \"userListTargeting\": {},\n \"videoTargeting\": {\n \"excludedPositionTypes\": [],\n \"targetedPositionTypes\": []\n }\n },\n \"updateTime\": \"\"\n },\n \"updateMask\": \"\"\n }\n ]\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"requests\": [\n {\n \"deal\": {\n \"billedBuyer\": \"\",\n \"buyer\": \"\",\n \"client\": \"\",\n \"createTime\": \"\",\n \"creativeRequirements\": {\n \"creativeFormat\": \"\",\n \"creativePreApprovalPolicy\": \"\",\n \"creativeSafeFrameCompatibility\": \"\",\n \"maxAdDurationMs\": \"\",\n \"programmaticCreativeSource\": \"\",\n \"skippableAdType\": \"\"\n },\n \"dealType\": \"\",\n \"deliveryControl\": {\n \"companionDeliveryType\": \"\",\n \"creativeRotationType\": \"\",\n \"deliveryRateType\": \"\",\n \"frequencyCap\": [\n {\n \"maxImpressions\": 0,\n \"timeUnitType\": \"\",\n \"timeUnitsCount\": 0\n }\n ],\n \"roadblockingType\": \"\"\n },\n \"description\": \"\",\n \"displayName\": \"\",\n \"estimatedGrossSpend\": {\n \"currencyCode\": \"\",\n \"nanos\": 0,\n \"units\": \"\"\n },\n \"flightEndTime\": \"\",\n \"flightStartTime\": \"\",\n \"name\": \"\",\n \"preferredDealTerms\": {\n \"fixedPrice\": {\n \"amount\": {},\n \"type\": \"\"\n }\n },\n \"privateAuctionTerms\": {\n \"floorPrice\": {},\n \"openAuctionAllowed\": false\n },\n \"programmaticGuaranteedTerms\": {\n \"fixedPrice\": {},\n \"guaranteedLooks\": \"\",\n \"impressionCap\": \"\",\n \"minimumDailyLooks\": \"\",\n \"percentShareOfVoice\": \"\",\n \"reservationType\": \"\"\n },\n \"proposalRevision\": \"\",\n \"publisherProfile\": \"\",\n \"sellerTimeZone\": {\n \"id\": \"\",\n \"version\": \"\"\n },\n \"targeting\": {\n \"daypartTargeting\": {\n \"dayParts\": [\n {\n \"dayOfWeek\": \"\",\n \"endTime\": {\n \"hours\": 0,\n \"minutes\": 0,\n \"nanos\": 0,\n \"seconds\": 0\n },\n \"startTime\": {}\n }\n ],\n \"timeZoneType\": \"\"\n },\n \"geoTargeting\": {\n \"excludedCriteriaIds\": [],\n \"targetedCriteriaIds\": []\n },\n \"inventorySizeTargeting\": {\n \"excludedInventorySizes\": [\n {\n \"height\": \"\",\n \"type\": \"\",\n \"width\": \"\"\n }\n ],\n \"targetedInventorySizes\": [\n {}\n ]\n },\n \"inventoryTypeTargeting\": {\n \"inventoryTypes\": []\n },\n \"placementTargeting\": {\n \"mobileApplicationTargeting\": {\n \"firstPartyTargeting\": {\n \"excludedAppIds\": [],\n \"targetedAppIds\": []\n }\n },\n \"uriTargeting\": {\n \"excludedUris\": [],\n \"targetedUris\": []\n }\n },\n \"technologyTargeting\": {\n \"deviceCapabilityTargeting\": {},\n \"deviceCategoryTargeting\": {},\n \"operatingSystemTargeting\": {\n \"operatingSystemCriteria\": {},\n \"operatingSystemVersionCriteria\": {}\n }\n },\n \"userListTargeting\": {},\n \"videoTargeting\": {\n \"excludedPositionTypes\": [],\n \"targetedPositionTypes\": []\n }\n },\n \"updateTime\": \"\"\n },\n \"updateMask\": \"\"\n }\n ]\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/:parent/deals:batchUpdate")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1/:parent/deals:batchUpdate")
.header("content-type", "application/json")
.body("{\n \"requests\": [\n {\n \"deal\": {\n \"billedBuyer\": \"\",\n \"buyer\": \"\",\n \"client\": \"\",\n \"createTime\": \"\",\n \"creativeRequirements\": {\n \"creativeFormat\": \"\",\n \"creativePreApprovalPolicy\": \"\",\n \"creativeSafeFrameCompatibility\": \"\",\n \"maxAdDurationMs\": \"\",\n \"programmaticCreativeSource\": \"\",\n \"skippableAdType\": \"\"\n },\n \"dealType\": \"\",\n \"deliveryControl\": {\n \"companionDeliveryType\": \"\",\n \"creativeRotationType\": \"\",\n \"deliveryRateType\": \"\",\n \"frequencyCap\": [\n {\n \"maxImpressions\": 0,\n \"timeUnitType\": \"\",\n \"timeUnitsCount\": 0\n }\n ],\n \"roadblockingType\": \"\"\n },\n \"description\": \"\",\n \"displayName\": \"\",\n \"estimatedGrossSpend\": {\n \"currencyCode\": \"\",\n \"nanos\": 0,\n \"units\": \"\"\n },\n \"flightEndTime\": \"\",\n \"flightStartTime\": \"\",\n \"name\": \"\",\n \"preferredDealTerms\": {\n \"fixedPrice\": {\n \"amount\": {},\n \"type\": \"\"\n }\n },\n \"privateAuctionTerms\": {\n \"floorPrice\": {},\n \"openAuctionAllowed\": false\n },\n \"programmaticGuaranteedTerms\": {\n \"fixedPrice\": {},\n \"guaranteedLooks\": \"\",\n \"impressionCap\": \"\",\n \"minimumDailyLooks\": \"\",\n \"percentShareOfVoice\": \"\",\n \"reservationType\": \"\"\n },\n \"proposalRevision\": \"\",\n \"publisherProfile\": \"\",\n \"sellerTimeZone\": {\n \"id\": \"\",\n \"version\": \"\"\n },\n \"targeting\": {\n \"daypartTargeting\": {\n \"dayParts\": [\n {\n \"dayOfWeek\": \"\",\n \"endTime\": {\n \"hours\": 0,\n \"minutes\": 0,\n \"nanos\": 0,\n \"seconds\": 0\n },\n \"startTime\": {}\n }\n ],\n \"timeZoneType\": \"\"\n },\n \"geoTargeting\": {\n \"excludedCriteriaIds\": [],\n \"targetedCriteriaIds\": []\n },\n \"inventorySizeTargeting\": {\n \"excludedInventorySizes\": [\n {\n \"height\": \"\",\n \"type\": \"\",\n \"width\": \"\"\n }\n ],\n \"targetedInventorySizes\": [\n {}\n ]\n },\n \"inventoryTypeTargeting\": {\n \"inventoryTypes\": []\n },\n \"placementTargeting\": {\n \"mobileApplicationTargeting\": {\n \"firstPartyTargeting\": {\n \"excludedAppIds\": [],\n \"targetedAppIds\": []\n }\n },\n \"uriTargeting\": {\n \"excludedUris\": [],\n \"targetedUris\": []\n }\n },\n \"technologyTargeting\": {\n \"deviceCapabilityTargeting\": {},\n \"deviceCategoryTargeting\": {},\n \"operatingSystemTargeting\": {\n \"operatingSystemCriteria\": {},\n \"operatingSystemVersionCriteria\": {}\n }\n },\n \"userListTargeting\": {},\n \"videoTargeting\": {\n \"excludedPositionTypes\": [],\n \"targetedPositionTypes\": []\n }\n },\n \"updateTime\": \"\"\n },\n \"updateMask\": \"\"\n }\n ]\n}")
.asString();
const data = JSON.stringify({
requests: [
{
deal: {
billedBuyer: '',
buyer: '',
client: '',
createTime: '',
creativeRequirements: {
creativeFormat: '',
creativePreApprovalPolicy: '',
creativeSafeFrameCompatibility: '',
maxAdDurationMs: '',
programmaticCreativeSource: '',
skippableAdType: ''
},
dealType: '',
deliveryControl: {
companionDeliveryType: '',
creativeRotationType: '',
deliveryRateType: '',
frequencyCap: [
{
maxImpressions: 0,
timeUnitType: '',
timeUnitsCount: 0
}
],
roadblockingType: ''
},
description: '',
displayName: '',
estimatedGrossSpend: {
currencyCode: '',
nanos: 0,
units: ''
},
flightEndTime: '',
flightStartTime: '',
name: '',
preferredDealTerms: {
fixedPrice: {
amount: {},
type: ''
}
},
privateAuctionTerms: {
floorPrice: {},
openAuctionAllowed: false
},
programmaticGuaranteedTerms: {
fixedPrice: {},
guaranteedLooks: '',
impressionCap: '',
minimumDailyLooks: '',
percentShareOfVoice: '',
reservationType: ''
},
proposalRevision: '',
publisherProfile: '',
sellerTimeZone: {
id: '',
version: ''
},
targeting: {
daypartTargeting: {
dayParts: [
{
dayOfWeek: '',
endTime: {
hours: 0,
minutes: 0,
nanos: 0,
seconds: 0
},
startTime: {}
}
],
timeZoneType: ''
},
geoTargeting: {
excludedCriteriaIds: [],
targetedCriteriaIds: []
},
inventorySizeTargeting: {
excludedInventorySizes: [
{
height: '',
type: '',
width: ''
}
],
targetedInventorySizes: [
{}
]
},
inventoryTypeTargeting: {
inventoryTypes: []
},
placementTargeting: {
mobileApplicationTargeting: {
firstPartyTargeting: {
excludedAppIds: [],
targetedAppIds: []
}
},
uriTargeting: {
excludedUris: [],
targetedUris: []
}
},
technologyTargeting: {
deviceCapabilityTargeting: {},
deviceCategoryTargeting: {},
operatingSystemTargeting: {
operatingSystemCriteria: {},
operatingSystemVersionCriteria: {}
}
},
userListTargeting: {},
videoTargeting: {
excludedPositionTypes: [],
targetedPositionTypes: []
}
},
updateTime: ''
},
updateMask: ''
}
]
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/v1/:parent/deals:batchUpdate');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/:parent/deals:batchUpdate',
headers: {'content-type': 'application/json'},
data: {
requests: [
{
deal: {
billedBuyer: '',
buyer: '',
client: '',
createTime: '',
creativeRequirements: {
creativeFormat: '',
creativePreApprovalPolicy: '',
creativeSafeFrameCompatibility: '',
maxAdDurationMs: '',
programmaticCreativeSource: '',
skippableAdType: ''
},
dealType: '',
deliveryControl: {
companionDeliveryType: '',
creativeRotationType: '',
deliveryRateType: '',
frequencyCap: [{maxImpressions: 0, timeUnitType: '', timeUnitsCount: 0}],
roadblockingType: ''
},
description: '',
displayName: '',
estimatedGrossSpend: {currencyCode: '', nanos: 0, units: ''},
flightEndTime: '',
flightStartTime: '',
name: '',
preferredDealTerms: {fixedPrice: {amount: {}, type: ''}},
privateAuctionTerms: {floorPrice: {}, openAuctionAllowed: false},
programmaticGuaranteedTerms: {
fixedPrice: {},
guaranteedLooks: '',
impressionCap: '',
minimumDailyLooks: '',
percentShareOfVoice: '',
reservationType: ''
},
proposalRevision: '',
publisherProfile: '',
sellerTimeZone: {id: '', version: ''},
targeting: {
daypartTargeting: {
dayParts: [
{
dayOfWeek: '',
endTime: {hours: 0, minutes: 0, nanos: 0, seconds: 0},
startTime: {}
}
],
timeZoneType: ''
},
geoTargeting: {excludedCriteriaIds: [], targetedCriteriaIds: []},
inventorySizeTargeting: {
excludedInventorySizes: [{height: '', type: '', width: ''}],
targetedInventorySizes: [{}]
},
inventoryTypeTargeting: {inventoryTypes: []},
placementTargeting: {
mobileApplicationTargeting: {firstPartyTargeting: {excludedAppIds: [], targetedAppIds: []}},
uriTargeting: {excludedUris: [], targetedUris: []}
},
technologyTargeting: {
deviceCapabilityTargeting: {},
deviceCategoryTargeting: {},
operatingSystemTargeting: {operatingSystemCriteria: {}, operatingSystemVersionCriteria: {}}
},
userListTargeting: {},
videoTargeting: {excludedPositionTypes: [], targetedPositionTypes: []}
},
updateTime: ''
},
updateMask: ''
}
]
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/:parent/deals:batchUpdate';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"requests":[{"deal":{"billedBuyer":"","buyer":"","client":"","createTime":"","creativeRequirements":{"creativeFormat":"","creativePreApprovalPolicy":"","creativeSafeFrameCompatibility":"","maxAdDurationMs":"","programmaticCreativeSource":"","skippableAdType":""},"dealType":"","deliveryControl":{"companionDeliveryType":"","creativeRotationType":"","deliveryRateType":"","frequencyCap":[{"maxImpressions":0,"timeUnitType":"","timeUnitsCount":0}],"roadblockingType":""},"description":"","displayName":"","estimatedGrossSpend":{"currencyCode":"","nanos":0,"units":""},"flightEndTime":"","flightStartTime":"","name":"","preferredDealTerms":{"fixedPrice":{"amount":{},"type":""}},"privateAuctionTerms":{"floorPrice":{},"openAuctionAllowed":false},"programmaticGuaranteedTerms":{"fixedPrice":{},"guaranteedLooks":"","impressionCap":"","minimumDailyLooks":"","percentShareOfVoice":"","reservationType":""},"proposalRevision":"","publisherProfile":"","sellerTimeZone":{"id":"","version":""},"targeting":{"daypartTargeting":{"dayParts":[{"dayOfWeek":"","endTime":{"hours":0,"minutes":0,"nanos":0,"seconds":0},"startTime":{}}],"timeZoneType":""},"geoTargeting":{"excludedCriteriaIds":[],"targetedCriteriaIds":[]},"inventorySizeTargeting":{"excludedInventorySizes":[{"height":"","type":"","width":""}],"targetedInventorySizes":[{}]},"inventoryTypeTargeting":{"inventoryTypes":[]},"placementTargeting":{"mobileApplicationTargeting":{"firstPartyTargeting":{"excludedAppIds":[],"targetedAppIds":[]}},"uriTargeting":{"excludedUris":[],"targetedUris":[]}},"technologyTargeting":{"deviceCapabilityTargeting":{},"deviceCategoryTargeting":{},"operatingSystemTargeting":{"operatingSystemCriteria":{},"operatingSystemVersionCriteria":{}}},"userListTargeting":{},"videoTargeting":{"excludedPositionTypes":[],"targetedPositionTypes":[]}},"updateTime":""},"updateMask":""}]}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1/:parent/deals:batchUpdate',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "requests": [\n {\n "deal": {\n "billedBuyer": "",\n "buyer": "",\n "client": "",\n "createTime": "",\n "creativeRequirements": {\n "creativeFormat": "",\n "creativePreApprovalPolicy": "",\n "creativeSafeFrameCompatibility": "",\n "maxAdDurationMs": "",\n "programmaticCreativeSource": "",\n "skippableAdType": ""\n },\n "dealType": "",\n "deliveryControl": {\n "companionDeliveryType": "",\n "creativeRotationType": "",\n "deliveryRateType": "",\n "frequencyCap": [\n {\n "maxImpressions": 0,\n "timeUnitType": "",\n "timeUnitsCount": 0\n }\n ],\n "roadblockingType": ""\n },\n "description": "",\n "displayName": "",\n "estimatedGrossSpend": {\n "currencyCode": "",\n "nanos": 0,\n "units": ""\n },\n "flightEndTime": "",\n "flightStartTime": "",\n "name": "",\n "preferredDealTerms": {\n "fixedPrice": {\n "amount": {},\n "type": ""\n }\n },\n "privateAuctionTerms": {\n "floorPrice": {},\n "openAuctionAllowed": false\n },\n "programmaticGuaranteedTerms": {\n "fixedPrice": {},\n "guaranteedLooks": "",\n "impressionCap": "",\n "minimumDailyLooks": "",\n "percentShareOfVoice": "",\n "reservationType": ""\n },\n "proposalRevision": "",\n "publisherProfile": "",\n "sellerTimeZone": {\n "id": "",\n "version": ""\n },\n "targeting": {\n "daypartTargeting": {\n "dayParts": [\n {\n "dayOfWeek": "",\n "endTime": {\n "hours": 0,\n "minutes": 0,\n "nanos": 0,\n "seconds": 0\n },\n "startTime": {}\n }\n ],\n "timeZoneType": ""\n },\n "geoTargeting": {\n "excludedCriteriaIds": [],\n "targetedCriteriaIds": []\n },\n "inventorySizeTargeting": {\n "excludedInventorySizes": [\n {\n "height": "",\n "type": "",\n "width": ""\n }\n ],\n "targetedInventorySizes": [\n {}\n ]\n },\n "inventoryTypeTargeting": {\n "inventoryTypes": []\n },\n "placementTargeting": {\n "mobileApplicationTargeting": {\n "firstPartyTargeting": {\n "excludedAppIds": [],\n "targetedAppIds": []\n }\n },\n "uriTargeting": {\n "excludedUris": [],\n "targetedUris": []\n }\n },\n "technologyTargeting": {\n "deviceCapabilityTargeting": {},\n "deviceCategoryTargeting": {},\n "operatingSystemTargeting": {\n "operatingSystemCriteria": {},\n "operatingSystemVersionCriteria": {}\n }\n },\n "userListTargeting": {},\n "videoTargeting": {\n "excludedPositionTypes": [],\n "targetedPositionTypes": []\n }\n },\n "updateTime": ""\n },\n "updateMask": ""\n }\n ]\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"requests\": [\n {\n \"deal\": {\n \"billedBuyer\": \"\",\n \"buyer\": \"\",\n \"client\": \"\",\n \"createTime\": \"\",\n \"creativeRequirements\": {\n \"creativeFormat\": \"\",\n \"creativePreApprovalPolicy\": \"\",\n \"creativeSafeFrameCompatibility\": \"\",\n \"maxAdDurationMs\": \"\",\n \"programmaticCreativeSource\": \"\",\n \"skippableAdType\": \"\"\n },\n \"dealType\": \"\",\n \"deliveryControl\": {\n \"companionDeliveryType\": \"\",\n \"creativeRotationType\": \"\",\n \"deliveryRateType\": \"\",\n \"frequencyCap\": [\n {\n \"maxImpressions\": 0,\n \"timeUnitType\": \"\",\n \"timeUnitsCount\": 0\n }\n ],\n \"roadblockingType\": \"\"\n },\n \"description\": \"\",\n \"displayName\": \"\",\n \"estimatedGrossSpend\": {\n \"currencyCode\": \"\",\n \"nanos\": 0,\n \"units\": \"\"\n },\n \"flightEndTime\": \"\",\n \"flightStartTime\": \"\",\n \"name\": \"\",\n \"preferredDealTerms\": {\n \"fixedPrice\": {\n \"amount\": {},\n \"type\": \"\"\n }\n },\n \"privateAuctionTerms\": {\n \"floorPrice\": {},\n \"openAuctionAllowed\": false\n },\n \"programmaticGuaranteedTerms\": {\n \"fixedPrice\": {},\n \"guaranteedLooks\": \"\",\n \"impressionCap\": \"\",\n \"minimumDailyLooks\": \"\",\n \"percentShareOfVoice\": \"\",\n \"reservationType\": \"\"\n },\n \"proposalRevision\": \"\",\n \"publisherProfile\": \"\",\n \"sellerTimeZone\": {\n \"id\": \"\",\n \"version\": \"\"\n },\n \"targeting\": {\n \"daypartTargeting\": {\n \"dayParts\": [\n {\n \"dayOfWeek\": \"\",\n \"endTime\": {\n \"hours\": 0,\n \"minutes\": 0,\n \"nanos\": 0,\n \"seconds\": 0\n },\n \"startTime\": {}\n }\n ],\n \"timeZoneType\": \"\"\n },\n \"geoTargeting\": {\n \"excludedCriteriaIds\": [],\n \"targetedCriteriaIds\": []\n },\n \"inventorySizeTargeting\": {\n \"excludedInventorySizes\": [\n {\n \"height\": \"\",\n \"type\": \"\",\n \"width\": \"\"\n }\n ],\n \"targetedInventorySizes\": [\n {}\n ]\n },\n \"inventoryTypeTargeting\": {\n \"inventoryTypes\": []\n },\n \"placementTargeting\": {\n \"mobileApplicationTargeting\": {\n \"firstPartyTargeting\": {\n \"excludedAppIds\": [],\n \"targetedAppIds\": []\n }\n },\n \"uriTargeting\": {\n \"excludedUris\": [],\n \"targetedUris\": []\n }\n },\n \"technologyTargeting\": {\n \"deviceCapabilityTargeting\": {},\n \"deviceCategoryTargeting\": {},\n \"operatingSystemTargeting\": {\n \"operatingSystemCriteria\": {},\n \"operatingSystemVersionCriteria\": {}\n }\n },\n \"userListTargeting\": {},\n \"videoTargeting\": {\n \"excludedPositionTypes\": [],\n \"targetedPositionTypes\": []\n }\n },\n \"updateTime\": \"\"\n },\n \"updateMask\": \"\"\n }\n ]\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v1/:parent/deals:batchUpdate")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/:parent/deals:batchUpdate',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
requests: [
{
deal: {
billedBuyer: '',
buyer: '',
client: '',
createTime: '',
creativeRequirements: {
creativeFormat: '',
creativePreApprovalPolicy: '',
creativeSafeFrameCompatibility: '',
maxAdDurationMs: '',
programmaticCreativeSource: '',
skippableAdType: ''
},
dealType: '',
deliveryControl: {
companionDeliveryType: '',
creativeRotationType: '',
deliveryRateType: '',
frequencyCap: [{maxImpressions: 0, timeUnitType: '', timeUnitsCount: 0}],
roadblockingType: ''
},
description: '',
displayName: '',
estimatedGrossSpend: {currencyCode: '', nanos: 0, units: ''},
flightEndTime: '',
flightStartTime: '',
name: '',
preferredDealTerms: {fixedPrice: {amount: {}, type: ''}},
privateAuctionTerms: {floorPrice: {}, openAuctionAllowed: false},
programmaticGuaranteedTerms: {
fixedPrice: {},
guaranteedLooks: '',
impressionCap: '',
minimumDailyLooks: '',
percentShareOfVoice: '',
reservationType: ''
},
proposalRevision: '',
publisherProfile: '',
sellerTimeZone: {id: '', version: ''},
targeting: {
daypartTargeting: {
dayParts: [
{
dayOfWeek: '',
endTime: {hours: 0, minutes: 0, nanos: 0, seconds: 0},
startTime: {}
}
],
timeZoneType: ''
},
geoTargeting: {excludedCriteriaIds: [], targetedCriteriaIds: []},
inventorySizeTargeting: {
excludedInventorySizes: [{height: '', type: '', width: ''}],
targetedInventorySizes: [{}]
},
inventoryTypeTargeting: {inventoryTypes: []},
placementTargeting: {
mobileApplicationTargeting: {firstPartyTargeting: {excludedAppIds: [], targetedAppIds: []}},
uriTargeting: {excludedUris: [], targetedUris: []}
},
technologyTargeting: {
deviceCapabilityTargeting: {},
deviceCategoryTargeting: {},
operatingSystemTargeting: {operatingSystemCriteria: {}, operatingSystemVersionCriteria: {}}
},
userListTargeting: {},
videoTargeting: {excludedPositionTypes: [], targetedPositionTypes: []}
},
updateTime: ''
},
updateMask: ''
}
]
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/:parent/deals:batchUpdate',
headers: {'content-type': 'application/json'},
body: {
requests: [
{
deal: {
billedBuyer: '',
buyer: '',
client: '',
createTime: '',
creativeRequirements: {
creativeFormat: '',
creativePreApprovalPolicy: '',
creativeSafeFrameCompatibility: '',
maxAdDurationMs: '',
programmaticCreativeSource: '',
skippableAdType: ''
},
dealType: '',
deliveryControl: {
companionDeliveryType: '',
creativeRotationType: '',
deliveryRateType: '',
frequencyCap: [{maxImpressions: 0, timeUnitType: '', timeUnitsCount: 0}],
roadblockingType: ''
},
description: '',
displayName: '',
estimatedGrossSpend: {currencyCode: '', nanos: 0, units: ''},
flightEndTime: '',
flightStartTime: '',
name: '',
preferredDealTerms: {fixedPrice: {amount: {}, type: ''}},
privateAuctionTerms: {floorPrice: {}, openAuctionAllowed: false},
programmaticGuaranteedTerms: {
fixedPrice: {},
guaranteedLooks: '',
impressionCap: '',
minimumDailyLooks: '',
percentShareOfVoice: '',
reservationType: ''
},
proposalRevision: '',
publisherProfile: '',
sellerTimeZone: {id: '', version: ''},
targeting: {
daypartTargeting: {
dayParts: [
{
dayOfWeek: '',
endTime: {hours: 0, minutes: 0, nanos: 0, seconds: 0},
startTime: {}
}
],
timeZoneType: ''
},
geoTargeting: {excludedCriteriaIds: [], targetedCriteriaIds: []},
inventorySizeTargeting: {
excludedInventorySizes: [{height: '', type: '', width: ''}],
targetedInventorySizes: [{}]
},
inventoryTypeTargeting: {inventoryTypes: []},
placementTargeting: {
mobileApplicationTargeting: {firstPartyTargeting: {excludedAppIds: [], targetedAppIds: []}},
uriTargeting: {excludedUris: [], targetedUris: []}
},
technologyTargeting: {
deviceCapabilityTargeting: {},
deviceCategoryTargeting: {},
operatingSystemTargeting: {operatingSystemCriteria: {}, operatingSystemVersionCriteria: {}}
},
userListTargeting: {},
videoTargeting: {excludedPositionTypes: [], targetedPositionTypes: []}
},
updateTime: ''
},
updateMask: ''
}
]
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/v1/:parent/deals:batchUpdate');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
requests: [
{
deal: {
billedBuyer: '',
buyer: '',
client: '',
createTime: '',
creativeRequirements: {
creativeFormat: '',
creativePreApprovalPolicy: '',
creativeSafeFrameCompatibility: '',
maxAdDurationMs: '',
programmaticCreativeSource: '',
skippableAdType: ''
},
dealType: '',
deliveryControl: {
companionDeliveryType: '',
creativeRotationType: '',
deliveryRateType: '',
frequencyCap: [
{
maxImpressions: 0,
timeUnitType: '',
timeUnitsCount: 0
}
],
roadblockingType: ''
},
description: '',
displayName: '',
estimatedGrossSpend: {
currencyCode: '',
nanos: 0,
units: ''
},
flightEndTime: '',
flightStartTime: '',
name: '',
preferredDealTerms: {
fixedPrice: {
amount: {},
type: ''
}
},
privateAuctionTerms: {
floorPrice: {},
openAuctionAllowed: false
},
programmaticGuaranteedTerms: {
fixedPrice: {},
guaranteedLooks: '',
impressionCap: '',
minimumDailyLooks: '',
percentShareOfVoice: '',
reservationType: ''
},
proposalRevision: '',
publisherProfile: '',
sellerTimeZone: {
id: '',
version: ''
},
targeting: {
daypartTargeting: {
dayParts: [
{
dayOfWeek: '',
endTime: {
hours: 0,
minutes: 0,
nanos: 0,
seconds: 0
},
startTime: {}
}
],
timeZoneType: ''
},
geoTargeting: {
excludedCriteriaIds: [],
targetedCriteriaIds: []
},
inventorySizeTargeting: {
excludedInventorySizes: [
{
height: '',
type: '',
width: ''
}
],
targetedInventorySizes: [
{}
]
},
inventoryTypeTargeting: {
inventoryTypes: []
},
placementTargeting: {
mobileApplicationTargeting: {
firstPartyTargeting: {
excludedAppIds: [],
targetedAppIds: []
}
},
uriTargeting: {
excludedUris: [],
targetedUris: []
}
},
technologyTargeting: {
deviceCapabilityTargeting: {},
deviceCategoryTargeting: {},
operatingSystemTargeting: {
operatingSystemCriteria: {},
operatingSystemVersionCriteria: {}
}
},
userListTargeting: {},
videoTargeting: {
excludedPositionTypes: [],
targetedPositionTypes: []
}
},
updateTime: ''
},
updateMask: ''
}
]
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/:parent/deals:batchUpdate',
headers: {'content-type': 'application/json'},
data: {
requests: [
{
deal: {
billedBuyer: '',
buyer: '',
client: '',
createTime: '',
creativeRequirements: {
creativeFormat: '',
creativePreApprovalPolicy: '',
creativeSafeFrameCompatibility: '',
maxAdDurationMs: '',
programmaticCreativeSource: '',
skippableAdType: ''
},
dealType: '',
deliveryControl: {
companionDeliveryType: '',
creativeRotationType: '',
deliveryRateType: '',
frequencyCap: [{maxImpressions: 0, timeUnitType: '', timeUnitsCount: 0}],
roadblockingType: ''
},
description: '',
displayName: '',
estimatedGrossSpend: {currencyCode: '', nanos: 0, units: ''},
flightEndTime: '',
flightStartTime: '',
name: '',
preferredDealTerms: {fixedPrice: {amount: {}, type: ''}},
privateAuctionTerms: {floorPrice: {}, openAuctionAllowed: false},
programmaticGuaranteedTerms: {
fixedPrice: {},
guaranteedLooks: '',
impressionCap: '',
minimumDailyLooks: '',
percentShareOfVoice: '',
reservationType: ''
},
proposalRevision: '',
publisherProfile: '',
sellerTimeZone: {id: '', version: ''},
targeting: {
daypartTargeting: {
dayParts: [
{
dayOfWeek: '',
endTime: {hours: 0, minutes: 0, nanos: 0, seconds: 0},
startTime: {}
}
],
timeZoneType: ''
},
geoTargeting: {excludedCriteriaIds: [], targetedCriteriaIds: []},
inventorySizeTargeting: {
excludedInventorySizes: [{height: '', type: '', width: ''}],
targetedInventorySizes: [{}]
},
inventoryTypeTargeting: {inventoryTypes: []},
placementTargeting: {
mobileApplicationTargeting: {firstPartyTargeting: {excludedAppIds: [], targetedAppIds: []}},
uriTargeting: {excludedUris: [], targetedUris: []}
},
technologyTargeting: {
deviceCapabilityTargeting: {},
deviceCategoryTargeting: {},
operatingSystemTargeting: {operatingSystemCriteria: {}, operatingSystemVersionCriteria: {}}
},
userListTargeting: {},
videoTargeting: {excludedPositionTypes: [], targetedPositionTypes: []}
},
updateTime: ''
},
updateMask: ''
}
]
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/:parent/deals:batchUpdate';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"requests":[{"deal":{"billedBuyer":"","buyer":"","client":"","createTime":"","creativeRequirements":{"creativeFormat":"","creativePreApprovalPolicy":"","creativeSafeFrameCompatibility":"","maxAdDurationMs":"","programmaticCreativeSource":"","skippableAdType":""},"dealType":"","deliveryControl":{"companionDeliveryType":"","creativeRotationType":"","deliveryRateType":"","frequencyCap":[{"maxImpressions":0,"timeUnitType":"","timeUnitsCount":0}],"roadblockingType":""},"description":"","displayName":"","estimatedGrossSpend":{"currencyCode":"","nanos":0,"units":""},"flightEndTime":"","flightStartTime":"","name":"","preferredDealTerms":{"fixedPrice":{"amount":{},"type":""}},"privateAuctionTerms":{"floorPrice":{},"openAuctionAllowed":false},"programmaticGuaranteedTerms":{"fixedPrice":{},"guaranteedLooks":"","impressionCap":"","minimumDailyLooks":"","percentShareOfVoice":"","reservationType":""},"proposalRevision":"","publisherProfile":"","sellerTimeZone":{"id":"","version":""},"targeting":{"daypartTargeting":{"dayParts":[{"dayOfWeek":"","endTime":{"hours":0,"minutes":0,"nanos":0,"seconds":0},"startTime":{}}],"timeZoneType":""},"geoTargeting":{"excludedCriteriaIds":[],"targetedCriteriaIds":[]},"inventorySizeTargeting":{"excludedInventorySizes":[{"height":"","type":"","width":""}],"targetedInventorySizes":[{}]},"inventoryTypeTargeting":{"inventoryTypes":[]},"placementTargeting":{"mobileApplicationTargeting":{"firstPartyTargeting":{"excludedAppIds":[],"targetedAppIds":[]}},"uriTargeting":{"excludedUris":[],"targetedUris":[]}},"technologyTargeting":{"deviceCapabilityTargeting":{},"deviceCategoryTargeting":{},"operatingSystemTargeting":{"operatingSystemCriteria":{},"operatingSystemVersionCriteria":{}}},"userListTargeting":{},"videoTargeting":{"excludedPositionTypes":[],"targetedPositionTypes":[]}},"updateTime":""},"updateMask":""}]}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"requests": @[ @{ @"deal": @{ @"billedBuyer": @"", @"buyer": @"", @"client": @"", @"createTime": @"", @"creativeRequirements": @{ @"creativeFormat": @"", @"creativePreApprovalPolicy": @"", @"creativeSafeFrameCompatibility": @"", @"maxAdDurationMs": @"", @"programmaticCreativeSource": @"", @"skippableAdType": @"" }, @"dealType": @"", @"deliveryControl": @{ @"companionDeliveryType": @"", @"creativeRotationType": @"", @"deliveryRateType": @"", @"frequencyCap": @[ @{ @"maxImpressions": @0, @"timeUnitType": @"", @"timeUnitsCount": @0 } ], @"roadblockingType": @"" }, @"description": @"", @"displayName": @"", @"estimatedGrossSpend": @{ @"currencyCode": @"", @"nanos": @0, @"units": @"" }, @"flightEndTime": @"", @"flightStartTime": @"", @"name": @"", @"preferredDealTerms": @{ @"fixedPrice": @{ @"amount": @{ }, @"type": @"" } }, @"privateAuctionTerms": @{ @"floorPrice": @{ }, @"openAuctionAllowed": @NO }, @"programmaticGuaranteedTerms": @{ @"fixedPrice": @{ }, @"guaranteedLooks": @"", @"impressionCap": @"", @"minimumDailyLooks": @"", @"percentShareOfVoice": @"", @"reservationType": @"" }, @"proposalRevision": @"", @"publisherProfile": @"", @"sellerTimeZone": @{ @"id": @"", @"version": @"" }, @"targeting": @{ @"daypartTargeting": @{ @"dayParts": @[ @{ @"dayOfWeek": @"", @"endTime": @{ @"hours": @0, @"minutes": @0, @"nanos": @0, @"seconds": @0 }, @"startTime": @{ } } ], @"timeZoneType": @"" }, @"geoTargeting": @{ @"excludedCriteriaIds": @[ ], @"targetedCriteriaIds": @[ ] }, @"inventorySizeTargeting": @{ @"excludedInventorySizes": @[ @{ @"height": @"", @"type": @"", @"width": @"" } ], @"targetedInventorySizes": @[ @{ } ] }, @"inventoryTypeTargeting": @{ @"inventoryTypes": @[ ] }, @"placementTargeting": @{ @"mobileApplicationTargeting": @{ @"firstPartyTargeting": @{ @"excludedAppIds": @[ ], @"targetedAppIds": @[ ] } }, @"uriTargeting": @{ @"excludedUris": @[ ], @"targetedUris": @[ ] } }, @"technologyTargeting": @{ @"deviceCapabilityTargeting": @{ }, @"deviceCategoryTargeting": @{ }, @"operatingSystemTargeting": @{ @"operatingSystemCriteria": @{ }, @"operatingSystemVersionCriteria": @{ } } }, @"userListTargeting": @{ }, @"videoTargeting": @{ @"excludedPositionTypes": @[ ], @"targetedPositionTypes": @[ ] } }, @"updateTime": @"" }, @"updateMask": @"" } ] };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/:parent/deals:batchUpdate"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1/:parent/deals:batchUpdate" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"requests\": [\n {\n \"deal\": {\n \"billedBuyer\": \"\",\n \"buyer\": \"\",\n \"client\": \"\",\n \"createTime\": \"\",\n \"creativeRequirements\": {\n \"creativeFormat\": \"\",\n \"creativePreApprovalPolicy\": \"\",\n \"creativeSafeFrameCompatibility\": \"\",\n \"maxAdDurationMs\": \"\",\n \"programmaticCreativeSource\": \"\",\n \"skippableAdType\": \"\"\n },\n \"dealType\": \"\",\n \"deliveryControl\": {\n \"companionDeliveryType\": \"\",\n \"creativeRotationType\": \"\",\n \"deliveryRateType\": \"\",\n \"frequencyCap\": [\n {\n \"maxImpressions\": 0,\n \"timeUnitType\": \"\",\n \"timeUnitsCount\": 0\n }\n ],\n \"roadblockingType\": \"\"\n },\n \"description\": \"\",\n \"displayName\": \"\",\n \"estimatedGrossSpend\": {\n \"currencyCode\": \"\",\n \"nanos\": 0,\n \"units\": \"\"\n },\n \"flightEndTime\": \"\",\n \"flightStartTime\": \"\",\n \"name\": \"\",\n \"preferredDealTerms\": {\n \"fixedPrice\": {\n \"amount\": {},\n \"type\": \"\"\n }\n },\n \"privateAuctionTerms\": {\n \"floorPrice\": {},\n \"openAuctionAllowed\": false\n },\n \"programmaticGuaranteedTerms\": {\n \"fixedPrice\": {},\n \"guaranteedLooks\": \"\",\n \"impressionCap\": \"\",\n \"minimumDailyLooks\": \"\",\n \"percentShareOfVoice\": \"\",\n \"reservationType\": \"\"\n },\n \"proposalRevision\": \"\",\n \"publisherProfile\": \"\",\n \"sellerTimeZone\": {\n \"id\": \"\",\n \"version\": \"\"\n },\n \"targeting\": {\n \"daypartTargeting\": {\n \"dayParts\": [\n {\n \"dayOfWeek\": \"\",\n \"endTime\": {\n \"hours\": 0,\n \"minutes\": 0,\n \"nanos\": 0,\n \"seconds\": 0\n },\n \"startTime\": {}\n }\n ],\n \"timeZoneType\": \"\"\n },\n \"geoTargeting\": {\n \"excludedCriteriaIds\": [],\n \"targetedCriteriaIds\": []\n },\n \"inventorySizeTargeting\": {\n \"excludedInventorySizes\": [\n {\n \"height\": \"\",\n \"type\": \"\",\n \"width\": \"\"\n }\n ],\n \"targetedInventorySizes\": [\n {}\n ]\n },\n \"inventoryTypeTargeting\": {\n \"inventoryTypes\": []\n },\n \"placementTargeting\": {\n \"mobileApplicationTargeting\": {\n \"firstPartyTargeting\": {\n \"excludedAppIds\": [],\n \"targetedAppIds\": []\n }\n },\n \"uriTargeting\": {\n \"excludedUris\": [],\n \"targetedUris\": []\n }\n },\n \"technologyTargeting\": {\n \"deviceCapabilityTargeting\": {},\n \"deviceCategoryTargeting\": {},\n \"operatingSystemTargeting\": {\n \"operatingSystemCriteria\": {},\n \"operatingSystemVersionCriteria\": {}\n }\n },\n \"userListTargeting\": {},\n \"videoTargeting\": {\n \"excludedPositionTypes\": [],\n \"targetedPositionTypes\": []\n }\n },\n \"updateTime\": \"\"\n },\n \"updateMask\": \"\"\n }\n ]\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/:parent/deals:batchUpdate",
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([
'requests' => [
[
'deal' => [
'billedBuyer' => '',
'buyer' => '',
'client' => '',
'createTime' => '',
'creativeRequirements' => [
'creativeFormat' => '',
'creativePreApprovalPolicy' => '',
'creativeSafeFrameCompatibility' => '',
'maxAdDurationMs' => '',
'programmaticCreativeSource' => '',
'skippableAdType' => ''
],
'dealType' => '',
'deliveryControl' => [
'companionDeliveryType' => '',
'creativeRotationType' => '',
'deliveryRateType' => '',
'frequencyCap' => [
[
'maxImpressions' => 0,
'timeUnitType' => '',
'timeUnitsCount' => 0
]
],
'roadblockingType' => ''
],
'description' => '',
'displayName' => '',
'estimatedGrossSpend' => [
'currencyCode' => '',
'nanos' => 0,
'units' => ''
],
'flightEndTime' => '',
'flightStartTime' => '',
'name' => '',
'preferredDealTerms' => [
'fixedPrice' => [
'amount' => [
],
'type' => ''
]
],
'privateAuctionTerms' => [
'floorPrice' => [
],
'openAuctionAllowed' => null
],
'programmaticGuaranteedTerms' => [
'fixedPrice' => [
],
'guaranteedLooks' => '',
'impressionCap' => '',
'minimumDailyLooks' => '',
'percentShareOfVoice' => '',
'reservationType' => ''
],
'proposalRevision' => '',
'publisherProfile' => '',
'sellerTimeZone' => [
'id' => '',
'version' => ''
],
'targeting' => [
'daypartTargeting' => [
'dayParts' => [
[
'dayOfWeek' => '',
'endTime' => [
'hours' => 0,
'minutes' => 0,
'nanos' => 0,
'seconds' => 0
],
'startTime' => [
]
]
],
'timeZoneType' => ''
],
'geoTargeting' => [
'excludedCriteriaIds' => [
],
'targetedCriteriaIds' => [
]
],
'inventorySizeTargeting' => [
'excludedInventorySizes' => [
[
'height' => '',
'type' => '',
'width' => ''
]
],
'targetedInventorySizes' => [
[
]
]
],
'inventoryTypeTargeting' => [
'inventoryTypes' => [
]
],
'placementTargeting' => [
'mobileApplicationTargeting' => [
'firstPartyTargeting' => [
'excludedAppIds' => [
],
'targetedAppIds' => [
]
]
],
'uriTargeting' => [
'excludedUris' => [
],
'targetedUris' => [
]
]
],
'technologyTargeting' => [
'deviceCapabilityTargeting' => [
],
'deviceCategoryTargeting' => [
],
'operatingSystemTargeting' => [
'operatingSystemCriteria' => [
],
'operatingSystemVersionCriteria' => [
]
]
],
'userListTargeting' => [
],
'videoTargeting' => [
'excludedPositionTypes' => [
],
'targetedPositionTypes' => [
]
]
],
'updateTime' => ''
],
'updateMask' => ''
]
]
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/v1/:parent/deals:batchUpdate', [
'body' => '{
"requests": [
{
"deal": {
"billedBuyer": "",
"buyer": "",
"client": "",
"createTime": "",
"creativeRequirements": {
"creativeFormat": "",
"creativePreApprovalPolicy": "",
"creativeSafeFrameCompatibility": "",
"maxAdDurationMs": "",
"programmaticCreativeSource": "",
"skippableAdType": ""
},
"dealType": "",
"deliveryControl": {
"companionDeliveryType": "",
"creativeRotationType": "",
"deliveryRateType": "",
"frequencyCap": [
{
"maxImpressions": 0,
"timeUnitType": "",
"timeUnitsCount": 0
}
],
"roadblockingType": ""
},
"description": "",
"displayName": "",
"estimatedGrossSpend": {
"currencyCode": "",
"nanos": 0,
"units": ""
},
"flightEndTime": "",
"flightStartTime": "",
"name": "",
"preferredDealTerms": {
"fixedPrice": {
"amount": {},
"type": ""
}
},
"privateAuctionTerms": {
"floorPrice": {},
"openAuctionAllowed": false
},
"programmaticGuaranteedTerms": {
"fixedPrice": {},
"guaranteedLooks": "",
"impressionCap": "",
"minimumDailyLooks": "",
"percentShareOfVoice": "",
"reservationType": ""
},
"proposalRevision": "",
"publisherProfile": "",
"sellerTimeZone": {
"id": "",
"version": ""
},
"targeting": {
"daypartTargeting": {
"dayParts": [
{
"dayOfWeek": "",
"endTime": {
"hours": 0,
"minutes": 0,
"nanos": 0,
"seconds": 0
},
"startTime": {}
}
],
"timeZoneType": ""
},
"geoTargeting": {
"excludedCriteriaIds": [],
"targetedCriteriaIds": []
},
"inventorySizeTargeting": {
"excludedInventorySizes": [
{
"height": "",
"type": "",
"width": ""
}
],
"targetedInventorySizes": [
{}
]
},
"inventoryTypeTargeting": {
"inventoryTypes": []
},
"placementTargeting": {
"mobileApplicationTargeting": {
"firstPartyTargeting": {
"excludedAppIds": [],
"targetedAppIds": []
}
},
"uriTargeting": {
"excludedUris": [],
"targetedUris": []
}
},
"technologyTargeting": {
"deviceCapabilityTargeting": {},
"deviceCategoryTargeting": {},
"operatingSystemTargeting": {
"operatingSystemCriteria": {},
"operatingSystemVersionCriteria": {}
}
},
"userListTargeting": {},
"videoTargeting": {
"excludedPositionTypes": [],
"targetedPositionTypes": []
}
},
"updateTime": ""
},
"updateMask": ""
}
]
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1/:parent/deals:batchUpdate');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'requests' => [
[
'deal' => [
'billedBuyer' => '',
'buyer' => '',
'client' => '',
'createTime' => '',
'creativeRequirements' => [
'creativeFormat' => '',
'creativePreApprovalPolicy' => '',
'creativeSafeFrameCompatibility' => '',
'maxAdDurationMs' => '',
'programmaticCreativeSource' => '',
'skippableAdType' => ''
],
'dealType' => '',
'deliveryControl' => [
'companionDeliveryType' => '',
'creativeRotationType' => '',
'deliveryRateType' => '',
'frequencyCap' => [
[
'maxImpressions' => 0,
'timeUnitType' => '',
'timeUnitsCount' => 0
]
],
'roadblockingType' => ''
],
'description' => '',
'displayName' => '',
'estimatedGrossSpend' => [
'currencyCode' => '',
'nanos' => 0,
'units' => ''
],
'flightEndTime' => '',
'flightStartTime' => '',
'name' => '',
'preferredDealTerms' => [
'fixedPrice' => [
'amount' => [
],
'type' => ''
]
],
'privateAuctionTerms' => [
'floorPrice' => [
],
'openAuctionAllowed' => null
],
'programmaticGuaranteedTerms' => [
'fixedPrice' => [
],
'guaranteedLooks' => '',
'impressionCap' => '',
'minimumDailyLooks' => '',
'percentShareOfVoice' => '',
'reservationType' => ''
],
'proposalRevision' => '',
'publisherProfile' => '',
'sellerTimeZone' => [
'id' => '',
'version' => ''
],
'targeting' => [
'daypartTargeting' => [
'dayParts' => [
[
'dayOfWeek' => '',
'endTime' => [
'hours' => 0,
'minutes' => 0,
'nanos' => 0,
'seconds' => 0
],
'startTime' => [
]
]
],
'timeZoneType' => ''
],
'geoTargeting' => [
'excludedCriteriaIds' => [
],
'targetedCriteriaIds' => [
]
],
'inventorySizeTargeting' => [
'excludedInventorySizes' => [
[
'height' => '',
'type' => '',
'width' => ''
]
],
'targetedInventorySizes' => [
[
]
]
],
'inventoryTypeTargeting' => [
'inventoryTypes' => [
]
],
'placementTargeting' => [
'mobileApplicationTargeting' => [
'firstPartyTargeting' => [
'excludedAppIds' => [
],
'targetedAppIds' => [
]
]
],
'uriTargeting' => [
'excludedUris' => [
],
'targetedUris' => [
]
]
],
'technologyTargeting' => [
'deviceCapabilityTargeting' => [
],
'deviceCategoryTargeting' => [
],
'operatingSystemTargeting' => [
'operatingSystemCriteria' => [
],
'operatingSystemVersionCriteria' => [
]
]
],
'userListTargeting' => [
],
'videoTargeting' => [
'excludedPositionTypes' => [
],
'targetedPositionTypes' => [
]
]
],
'updateTime' => ''
],
'updateMask' => ''
]
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'requests' => [
[
'deal' => [
'billedBuyer' => '',
'buyer' => '',
'client' => '',
'createTime' => '',
'creativeRequirements' => [
'creativeFormat' => '',
'creativePreApprovalPolicy' => '',
'creativeSafeFrameCompatibility' => '',
'maxAdDurationMs' => '',
'programmaticCreativeSource' => '',
'skippableAdType' => ''
],
'dealType' => '',
'deliveryControl' => [
'companionDeliveryType' => '',
'creativeRotationType' => '',
'deliveryRateType' => '',
'frequencyCap' => [
[
'maxImpressions' => 0,
'timeUnitType' => '',
'timeUnitsCount' => 0
]
],
'roadblockingType' => ''
],
'description' => '',
'displayName' => '',
'estimatedGrossSpend' => [
'currencyCode' => '',
'nanos' => 0,
'units' => ''
],
'flightEndTime' => '',
'flightStartTime' => '',
'name' => '',
'preferredDealTerms' => [
'fixedPrice' => [
'amount' => [
],
'type' => ''
]
],
'privateAuctionTerms' => [
'floorPrice' => [
],
'openAuctionAllowed' => null
],
'programmaticGuaranteedTerms' => [
'fixedPrice' => [
],
'guaranteedLooks' => '',
'impressionCap' => '',
'minimumDailyLooks' => '',
'percentShareOfVoice' => '',
'reservationType' => ''
],
'proposalRevision' => '',
'publisherProfile' => '',
'sellerTimeZone' => [
'id' => '',
'version' => ''
],
'targeting' => [
'daypartTargeting' => [
'dayParts' => [
[
'dayOfWeek' => '',
'endTime' => [
'hours' => 0,
'minutes' => 0,
'nanos' => 0,
'seconds' => 0
],
'startTime' => [
]
]
],
'timeZoneType' => ''
],
'geoTargeting' => [
'excludedCriteriaIds' => [
],
'targetedCriteriaIds' => [
]
],
'inventorySizeTargeting' => [
'excludedInventorySizes' => [
[
'height' => '',
'type' => '',
'width' => ''
]
],
'targetedInventorySizes' => [
[
]
]
],
'inventoryTypeTargeting' => [
'inventoryTypes' => [
]
],
'placementTargeting' => [
'mobileApplicationTargeting' => [
'firstPartyTargeting' => [
'excludedAppIds' => [
],
'targetedAppIds' => [
]
]
],
'uriTargeting' => [
'excludedUris' => [
],
'targetedUris' => [
]
]
],
'technologyTargeting' => [
'deviceCapabilityTargeting' => [
],
'deviceCategoryTargeting' => [
],
'operatingSystemTargeting' => [
'operatingSystemCriteria' => [
],
'operatingSystemVersionCriteria' => [
]
]
],
'userListTargeting' => [
],
'videoTargeting' => [
'excludedPositionTypes' => [
],
'targetedPositionTypes' => [
]
]
],
'updateTime' => ''
],
'updateMask' => ''
]
]
]));
$request->setRequestUrl('{{baseUrl}}/v1/:parent/deals:batchUpdate');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/:parent/deals:batchUpdate' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"requests": [
{
"deal": {
"billedBuyer": "",
"buyer": "",
"client": "",
"createTime": "",
"creativeRequirements": {
"creativeFormat": "",
"creativePreApprovalPolicy": "",
"creativeSafeFrameCompatibility": "",
"maxAdDurationMs": "",
"programmaticCreativeSource": "",
"skippableAdType": ""
},
"dealType": "",
"deliveryControl": {
"companionDeliveryType": "",
"creativeRotationType": "",
"deliveryRateType": "",
"frequencyCap": [
{
"maxImpressions": 0,
"timeUnitType": "",
"timeUnitsCount": 0
}
],
"roadblockingType": ""
},
"description": "",
"displayName": "",
"estimatedGrossSpend": {
"currencyCode": "",
"nanos": 0,
"units": ""
},
"flightEndTime": "",
"flightStartTime": "",
"name": "",
"preferredDealTerms": {
"fixedPrice": {
"amount": {},
"type": ""
}
},
"privateAuctionTerms": {
"floorPrice": {},
"openAuctionAllowed": false
},
"programmaticGuaranteedTerms": {
"fixedPrice": {},
"guaranteedLooks": "",
"impressionCap": "",
"minimumDailyLooks": "",
"percentShareOfVoice": "",
"reservationType": ""
},
"proposalRevision": "",
"publisherProfile": "",
"sellerTimeZone": {
"id": "",
"version": ""
},
"targeting": {
"daypartTargeting": {
"dayParts": [
{
"dayOfWeek": "",
"endTime": {
"hours": 0,
"minutes": 0,
"nanos": 0,
"seconds": 0
},
"startTime": {}
}
],
"timeZoneType": ""
},
"geoTargeting": {
"excludedCriteriaIds": [],
"targetedCriteriaIds": []
},
"inventorySizeTargeting": {
"excludedInventorySizes": [
{
"height": "",
"type": "",
"width": ""
}
],
"targetedInventorySizes": [
{}
]
},
"inventoryTypeTargeting": {
"inventoryTypes": []
},
"placementTargeting": {
"mobileApplicationTargeting": {
"firstPartyTargeting": {
"excludedAppIds": [],
"targetedAppIds": []
}
},
"uriTargeting": {
"excludedUris": [],
"targetedUris": []
}
},
"technologyTargeting": {
"deviceCapabilityTargeting": {},
"deviceCategoryTargeting": {},
"operatingSystemTargeting": {
"operatingSystemCriteria": {},
"operatingSystemVersionCriteria": {}
}
},
"userListTargeting": {},
"videoTargeting": {
"excludedPositionTypes": [],
"targetedPositionTypes": []
}
},
"updateTime": ""
},
"updateMask": ""
}
]
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/:parent/deals:batchUpdate' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"requests": [
{
"deal": {
"billedBuyer": "",
"buyer": "",
"client": "",
"createTime": "",
"creativeRequirements": {
"creativeFormat": "",
"creativePreApprovalPolicy": "",
"creativeSafeFrameCompatibility": "",
"maxAdDurationMs": "",
"programmaticCreativeSource": "",
"skippableAdType": ""
},
"dealType": "",
"deliveryControl": {
"companionDeliveryType": "",
"creativeRotationType": "",
"deliveryRateType": "",
"frequencyCap": [
{
"maxImpressions": 0,
"timeUnitType": "",
"timeUnitsCount": 0
}
],
"roadblockingType": ""
},
"description": "",
"displayName": "",
"estimatedGrossSpend": {
"currencyCode": "",
"nanos": 0,
"units": ""
},
"flightEndTime": "",
"flightStartTime": "",
"name": "",
"preferredDealTerms": {
"fixedPrice": {
"amount": {},
"type": ""
}
},
"privateAuctionTerms": {
"floorPrice": {},
"openAuctionAllowed": false
},
"programmaticGuaranteedTerms": {
"fixedPrice": {},
"guaranteedLooks": "",
"impressionCap": "",
"minimumDailyLooks": "",
"percentShareOfVoice": "",
"reservationType": ""
},
"proposalRevision": "",
"publisherProfile": "",
"sellerTimeZone": {
"id": "",
"version": ""
},
"targeting": {
"daypartTargeting": {
"dayParts": [
{
"dayOfWeek": "",
"endTime": {
"hours": 0,
"minutes": 0,
"nanos": 0,
"seconds": 0
},
"startTime": {}
}
],
"timeZoneType": ""
},
"geoTargeting": {
"excludedCriteriaIds": [],
"targetedCriteriaIds": []
},
"inventorySizeTargeting": {
"excludedInventorySizes": [
{
"height": "",
"type": "",
"width": ""
}
],
"targetedInventorySizes": [
{}
]
},
"inventoryTypeTargeting": {
"inventoryTypes": []
},
"placementTargeting": {
"mobileApplicationTargeting": {
"firstPartyTargeting": {
"excludedAppIds": [],
"targetedAppIds": []
}
},
"uriTargeting": {
"excludedUris": [],
"targetedUris": []
}
},
"technologyTargeting": {
"deviceCapabilityTargeting": {},
"deviceCategoryTargeting": {},
"operatingSystemTargeting": {
"operatingSystemCriteria": {},
"operatingSystemVersionCriteria": {}
}
},
"userListTargeting": {},
"videoTargeting": {
"excludedPositionTypes": [],
"targetedPositionTypes": []
}
},
"updateTime": ""
},
"updateMask": ""
}
]
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"requests\": [\n {\n \"deal\": {\n \"billedBuyer\": \"\",\n \"buyer\": \"\",\n \"client\": \"\",\n \"createTime\": \"\",\n \"creativeRequirements\": {\n \"creativeFormat\": \"\",\n \"creativePreApprovalPolicy\": \"\",\n \"creativeSafeFrameCompatibility\": \"\",\n \"maxAdDurationMs\": \"\",\n \"programmaticCreativeSource\": \"\",\n \"skippableAdType\": \"\"\n },\n \"dealType\": \"\",\n \"deliveryControl\": {\n \"companionDeliveryType\": \"\",\n \"creativeRotationType\": \"\",\n \"deliveryRateType\": \"\",\n \"frequencyCap\": [\n {\n \"maxImpressions\": 0,\n \"timeUnitType\": \"\",\n \"timeUnitsCount\": 0\n }\n ],\n \"roadblockingType\": \"\"\n },\n \"description\": \"\",\n \"displayName\": \"\",\n \"estimatedGrossSpend\": {\n \"currencyCode\": \"\",\n \"nanos\": 0,\n \"units\": \"\"\n },\n \"flightEndTime\": \"\",\n \"flightStartTime\": \"\",\n \"name\": \"\",\n \"preferredDealTerms\": {\n \"fixedPrice\": {\n \"amount\": {},\n \"type\": \"\"\n }\n },\n \"privateAuctionTerms\": {\n \"floorPrice\": {},\n \"openAuctionAllowed\": false\n },\n \"programmaticGuaranteedTerms\": {\n \"fixedPrice\": {},\n \"guaranteedLooks\": \"\",\n \"impressionCap\": \"\",\n \"minimumDailyLooks\": \"\",\n \"percentShareOfVoice\": \"\",\n \"reservationType\": \"\"\n },\n \"proposalRevision\": \"\",\n \"publisherProfile\": \"\",\n \"sellerTimeZone\": {\n \"id\": \"\",\n \"version\": \"\"\n },\n \"targeting\": {\n \"daypartTargeting\": {\n \"dayParts\": [\n {\n \"dayOfWeek\": \"\",\n \"endTime\": {\n \"hours\": 0,\n \"minutes\": 0,\n \"nanos\": 0,\n \"seconds\": 0\n },\n \"startTime\": {}\n }\n ],\n \"timeZoneType\": \"\"\n },\n \"geoTargeting\": {\n \"excludedCriteriaIds\": [],\n \"targetedCriteriaIds\": []\n },\n \"inventorySizeTargeting\": {\n \"excludedInventorySizes\": [\n {\n \"height\": \"\",\n \"type\": \"\",\n \"width\": \"\"\n }\n ],\n \"targetedInventorySizes\": [\n {}\n ]\n },\n \"inventoryTypeTargeting\": {\n \"inventoryTypes\": []\n },\n \"placementTargeting\": {\n \"mobileApplicationTargeting\": {\n \"firstPartyTargeting\": {\n \"excludedAppIds\": [],\n \"targetedAppIds\": []\n }\n },\n \"uriTargeting\": {\n \"excludedUris\": [],\n \"targetedUris\": []\n }\n },\n \"technologyTargeting\": {\n \"deviceCapabilityTargeting\": {},\n \"deviceCategoryTargeting\": {},\n \"operatingSystemTargeting\": {\n \"operatingSystemCriteria\": {},\n \"operatingSystemVersionCriteria\": {}\n }\n },\n \"userListTargeting\": {},\n \"videoTargeting\": {\n \"excludedPositionTypes\": [],\n \"targetedPositionTypes\": []\n }\n },\n \"updateTime\": \"\"\n },\n \"updateMask\": \"\"\n }\n ]\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v1/:parent/deals:batchUpdate", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/:parent/deals:batchUpdate"
payload = { "requests": [
{
"deal": {
"billedBuyer": "",
"buyer": "",
"client": "",
"createTime": "",
"creativeRequirements": {
"creativeFormat": "",
"creativePreApprovalPolicy": "",
"creativeSafeFrameCompatibility": "",
"maxAdDurationMs": "",
"programmaticCreativeSource": "",
"skippableAdType": ""
},
"dealType": "",
"deliveryControl": {
"companionDeliveryType": "",
"creativeRotationType": "",
"deliveryRateType": "",
"frequencyCap": [
{
"maxImpressions": 0,
"timeUnitType": "",
"timeUnitsCount": 0
}
],
"roadblockingType": ""
},
"description": "",
"displayName": "",
"estimatedGrossSpend": {
"currencyCode": "",
"nanos": 0,
"units": ""
},
"flightEndTime": "",
"flightStartTime": "",
"name": "",
"preferredDealTerms": { "fixedPrice": {
"amount": {},
"type": ""
} },
"privateAuctionTerms": {
"floorPrice": {},
"openAuctionAllowed": False
},
"programmaticGuaranteedTerms": {
"fixedPrice": {},
"guaranteedLooks": "",
"impressionCap": "",
"minimumDailyLooks": "",
"percentShareOfVoice": "",
"reservationType": ""
},
"proposalRevision": "",
"publisherProfile": "",
"sellerTimeZone": {
"id": "",
"version": ""
},
"targeting": {
"daypartTargeting": {
"dayParts": [
{
"dayOfWeek": "",
"endTime": {
"hours": 0,
"minutes": 0,
"nanos": 0,
"seconds": 0
},
"startTime": {}
}
],
"timeZoneType": ""
},
"geoTargeting": {
"excludedCriteriaIds": [],
"targetedCriteriaIds": []
},
"inventorySizeTargeting": {
"excludedInventorySizes": [
{
"height": "",
"type": "",
"width": ""
}
],
"targetedInventorySizes": [{}]
},
"inventoryTypeTargeting": { "inventoryTypes": [] },
"placementTargeting": {
"mobileApplicationTargeting": { "firstPartyTargeting": {
"excludedAppIds": [],
"targetedAppIds": []
} },
"uriTargeting": {
"excludedUris": [],
"targetedUris": []
}
},
"technologyTargeting": {
"deviceCapabilityTargeting": {},
"deviceCategoryTargeting": {},
"operatingSystemTargeting": {
"operatingSystemCriteria": {},
"operatingSystemVersionCriteria": {}
}
},
"userListTargeting": {},
"videoTargeting": {
"excludedPositionTypes": [],
"targetedPositionTypes": []
}
},
"updateTime": ""
},
"updateMask": ""
}
] }
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/:parent/deals:batchUpdate"
payload <- "{\n \"requests\": [\n {\n \"deal\": {\n \"billedBuyer\": \"\",\n \"buyer\": \"\",\n \"client\": \"\",\n \"createTime\": \"\",\n \"creativeRequirements\": {\n \"creativeFormat\": \"\",\n \"creativePreApprovalPolicy\": \"\",\n \"creativeSafeFrameCompatibility\": \"\",\n \"maxAdDurationMs\": \"\",\n \"programmaticCreativeSource\": \"\",\n \"skippableAdType\": \"\"\n },\n \"dealType\": \"\",\n \"deliveryControl\": {\n \"companionDeliveryType\": \"\",\n \"creativeRotationType\": \"\",\n \"deliveryRateType\": \"\",\n \"frequencyCap\": [\n {\n \"maxImpressions\": 0,\n \"timeUnitType\": \"\",\n \"timeUnitsCount\": 0\n }\n ],\n \"roadblockingType\": \"\"\n },\n \"description\": \"\",\n \"displayName\": \"\",\n \"estimatedGrossSpend\": {\n \"currencyCode\": \"\",\n \"nanos\": 0,\n \"units\": \"\"\n },\n \"flightEndTime\": \"\",\n \"flightStartTime\": \"\",\n \"name\": \"\",\n \"preferredDealTerms\": {\n \"fixedPrice\": {\n \"amount\": {},\n \"type\": \"\"\n }\n },\n \"privateAuctionTerms\": {\n \"floorPrice\": {},\n \"openAuctionAllowed\": false\n },\n \"programmaticGuaranteedTerms\": {\n \"fixedPrice\": {},\n \"guaranteedLooks\": \"\",\n \"impressionCap\": \"\",\n \"minimumDailyLooks\": \"\",\n \"percentShareOfVoice\": \"\",\n \"reservationType\": \"\"\n },\n \"proposalRevision\": \"\",\n \"publisherProfile\": \"\",\n \"sellerTimeZone\": {\n \"id\": \"\",\n \"version\": \"\"\n },\n \"targeting\": {\n \"daypartTargeting\": {\n \"dayParts\": [\n {\n \"dayOfWeek\": \"\",\n \"endTime\": {\n \"hours\": 0,\n \"minutes\": 0,\n \"nanos\": 0,\n \"seconds\": 0\n },\n \"startTime\": {}\n }\n ],\n \"timeZoneType\": \"\"\n },\n \"geoTargeting\": {\n \"excludedCriteriaIds\": [],\n \"targetedCriteriaIds\": []\n },\n \"inventorySizeTargeting\": {\n \"excludedInventorySizes\": [\n {\n \"height\": \"\",\n \"type\": \"\",\n \"width\": \"\"\n }\n ],\n \"targetedInventorySizes\": [\n {}\n ]\n },\n \"inventoryTypeTargeting\": {\n \"inventoryTypes\": []\n },\n \"placementTargeting\": {\n \"mobileApplicationTargeting\": {\n \"firstPartyTargeting\": {\n \"excludedAppIds\": [],\n \"targetedAppIds\": []\n }\n },\n \"uriTargeting\": {\n \"excludedUris\": [],\n \"targetedUris\": []\n }\n },\n \"technologyTargeting\": {\n \"deviceCapabilityTargeting\": {},\n \"deviceCategoryTargeting\": {},\n \"operatingSystemTargeting\": {\n \"operatingSystemCriteria\": {},\n \"operatingSystemVersionCriteria\": {}\n }\n },\n \"userListTargeting\": {},\n \"videoTargeting\": {\n \"excludedPositionTypes\": [],\n \"targetedPositionTypes\": []\n }\n },\n \"updateTime\": \"\"\n },\n \"updateMask\": \"\"\n }\n ]\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/:parent/deals:batchUpdate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"requests\": [\n {\n \"deal\": {\n \"billedBuyer\": \"\",\n \"buyer\": \"\",\n \"client\": \"\",\n \"createTime\": \"\",\n \"creativeRequirements\": {\n \"creativeFormat\": \"\",\n \"creativePreApprovalPolicy\": \"\",\n \"creativeSafeFrameCompatibility\": \"\",\n \"maxAdDurationMs\": \"\",\n \"programmaticCreativeSource\": \"\",\n \"skippableAdType\": \"\"\n },\n \"dealType\": \"\",\n \"deliveryControl\": {\n \"companionDeliveryType\": \"\",\n \"creativeRotationType\": \"\",\n \"deliveryRateType\": \"\",\n \"frequencyCap\": [\n {\n \"maxImpressions\": 0,\n \"timeUnitType\": \"\",\n \"timeUnitsCount\": 0\n }\n ],\n \"roadblockingType\": \"\"\n },\n \"description\": \"\",\n \"displayName\": \"\",\n \"estimatedGrossSpend\": {\n \"currencyCode\": \"\",\n \"nanos\": 0,\n \"units\": \"\"\n },\n \"flightEndTime\": \"\",\n \"flightStartTime\": \"\",\n \"name\": \"\",\n \"preferredDealTerms\": {\n \"fixedPrice\": {\n \"amount\": {},\n \"type\": \"\"\n }\n },\n \"privateAuctionTerms\": {\n \"floorPrice\": {},\n \"openAuctionAllowed\": false\n },\n \"programmaticGuaranteedTerms\": {\n \"fixedPrice\": {},\n \"guaranteedLooks\": \"\",\n \"impressionCap\": \"\",\n \"minimumDailyLooks\": \"\",\n \"percentShareOfVoice\": \"\",\n \"reservationType\": \"\"\n },\n \"proposalRevision\": \"\",\n \"publisherProfile\": \"\",\n \"sellerTimeZone\": {\n \"id\": \"\",\n \"version\": \"\"\n },\n \"targeting\": {\n \"daypartTargeting\": {\n \"dayParts\": [\n {\n \"dayOfWeek\": \"\",\n \"endTime\": {\n \"hours\": 0,\n \"minutes\": 0,\n \"nanos\": 0,\n \"seconds\": 0\n },\n \"startTime\": {}\n }\n ],\n \"timeZoneType\": \"\"\n },\n \"geoTargeting\": {\n \"excludedCriteriaIds\": [],\n \"targetedCriteriaIds\": []\n },\n \"inventorySizeTargeting\": {\n \"excludedInventorySizes\": [\n {\n \"height\": \"\",\n \"type\": \"\",\n \"width\": \"\"\n }\n ],\n \"targetedInventorySizes\": [\n {}\n ]\n },\n \"inventoryTypeTargeting\": {\n \"inventoryTypes\": []\n },\n \"placementTargeting\": {\n \"mobileApplicationTargeting\": {\n \"firstPartyTargeting\": {\n \"excludedAppIds\": [],\n \"targetedAppIds\": []\n }\n },\n \"uriTargeting\": {\n \"excludedUris\": [],\n \"targetedUris\": []\n }\n },\n \"technologyTargeting\": {\n \"deviceCapabilityTargeting\": {},\n \"deviceCategoryTargeting\": {},\n \"operatingSystemTargeting\": {\n \"operatingSystemCriteria\": {},\n \"operatingSystemVersionCriteria\": {}\n }\n },\n \"userListTargeting\": {},\n \"videoTargeting\": {\n \"excludedPositionTypes\": [],\n \"targetedPositionTypes\": []\n }\n },\n \"updateTime\": \"\"\n },\n \"updateMask\": \"\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/v1/:parent/deals:batchUpdate') do |req|
req.body = "{\n \"requests\": [\n {\n \"deal\": {\n \"billedBuyer\": \"\",\n \"buyer\": \"\",\n \"client\": \"\",\n \"createTime\": \"\",\n \"creativeRequirements\": {\n \"creativeFormat\": \"\",\n \"creativePreApprovalPolicy\": \"\",\n \"creativeSafeFrameCompatibility\": \"\",\n \"maxAdDurationMs\": \"\",\n \"programmaticCreativeSource\": \"\",\n \"skippableAdType\": \"\"\n },\n \"dealType\": \"\",\n \"deliveryControl\": {\n \"companionDeliveryType\": \"\",\n \"creativeRotationType\": \"\",\n \"deliveryRateType\": \"\",\n \"frequencyCap\": [\n {\n \"maxImpressions\": 0,\n \"timeUnitType\": \"\",\n \"timeUnitsCount\": 0\n }\n ],\n \"roadblockingType\": \"\"\n },\n \"description\": \"\",\n \"displayName\": \"\",\n \"estimatedGrossSpend\": {\n \"currencyCode\": \"\",\n \"nanos\": 0,\n \"units\": \"\"\n },\n \"flightEndTime\": \"\",\n \"flightStartTime\": \"\",\n \"name\": \"\",\n \"preferredDealTerms\": {\n \"fixedPrice\": {\n \"amount\": {},\n \"type\": \"\"\n }\n },\n \"privateAuctionTerms\": {\n \"floorPrice\": {},\n \"openAuctionAllowed\": false\n },\n \"programmaticGuaranteedTerms\": {\n \"fixedPrice\": {},\n \"guaranteedLooks\": \"\",\n \"impressionCap\": \"\",\n \"minimumDailyLooks\": \"\",\n \"percentShareOfVoice\": \"\",\n \"reservationType\": \"\"\n },\n \"proposalRevision\": \"\",\n \"publisherProfile\": \"\",\n \"sellerTimeZone\": {\n \"id\": \"\",\n \"version\": \"\"\n },\n \"targeting\": {\n \"daypartTargeting\": {\n \"dayParts\": [\n {\n \"dayOfWeek\": \"\",\n \"endTime\": {\n \"hours\": 0,\n \"minutes\": 0,\n \"nanos\": 0,\n \"seconds\": 0\n },\n \"startTime\": {}\n }\n ],\n \"timeZoneType\": \"\"\n },\n \"geoTargeting\": {\n \"excludedCriteriaIds\": [],\n \"targetedCriteriaIds\": []\n },\n \"inventorySizeTargeting\": {\n \"excludedInventorySizes\": [\n {\n \"height\": \"\",\n \"type\": \"\",\n \"width\": \"\"\n }\n ],\n \"targetedInventorySizes\": [\n {}\n ]\n },\n \"inventoryTypeTargeting\": {\n \"inventoryTypes\": []\n },\n \"placementTargeting\": {\n \"mobileApplicationTargeting\": {\n \"firstPartyTargeting\": {\n \"excludedAppIds\": [],\n \"targetedAppIds\": []\n }\n },\n \"uriTargeting\": {\n \"excludedUris\": [],\n \"targetedUris\": []\n }\n },\n \"technologyTargeting\": {\n \"deviceCapabilityTargeting\": {},\n \"deviceCategoryTargeting\": {},\n \"operatingSystemTargeting\": {\n \"operatingSystemCriteria\": {},\n \"operatingSystemVersionCriteria\": {}\n }\n },\n \"userListTargeting\": {},\n \"videoTargeting\": {\n \"excludedPositionTypes\": [],\n \"targetedPositionTypes\": []\n }\n },\n \"updateTime\": \"\"\n },\n \"updateMask\": \"\"\n }\n ]\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/:parent/deals:batchUpdate";
let payload = json!({"requests": (
json!({
"deal": json!({
"billedBuyer": "",
"buyer": "",
"client": "",
"createTime": "",
"creativeRequirements": json!({
"creativeFormat": "",
"creativePreApprovalPolicy": "",
"creativeSafeFrameCompatibility": "",
"maxAdDurationMs": "",
"programmaticCreativeSource": "",
"skippableAdType": ""
}),
"dealType": "",
"deliveryControl": json!({
"companionDeliveryType": "",
"creativeRotationType": "",
"deliveryRateType": "",
"frequencyCap": (
json!({
"maxImpressions": 0,
"timeUnitType": "",
"timeUnitsCount": 0
})
),
"roadblockingType": ""
}),
"description": "",
"displayName": "",
"estimatedGrossSpend": json!({
"currencyCode": "",
"nanos": 0,
"units": ""
}),
"flightEndTime": "",
"flightStartTime": "",
"name": "",
"preferredDealTerms": json!({"fixedPrice": json!({
"amount": json!({}),
"type": ""
})}),
"privateAuctionTerms": json!({
"floorPrice": json!({}),
"openAuctionAllowed": false
}),
"programmaticGuaranteedTerms": json!({
"fixedPrice": json!({}),
"guaranteedLooks": "",
"impressionCap": "",
"minimumDailyLooks": "",
"percentShareOfVoice": "",
"reservationType": ""
}),
"proposalRevision": "",
"publisherProfile": "",
"sellerTimeZone": json!({
"id": "",
"version": ""
}),
"targeting": json!({
"daypartTargeting": json!({
"dayParts": (
json!({
"dayOfWeek": "",
"endTime": json!({
"hours": 0,
"minutes": 0,
"nanos": 0,
"seconds": 0
}),
"startTime": json!({})
})
),
"timeZoneType": ""
}),
"geoTargeting": json!({
"excludedCriteriaIds": (),
"targetedCriteriaIds": ()
}),
"inventorySizeTargeting": json!({
"excludedInventorySizes": (
json!({
"height": "",
"type": "",
"width": ""
})
),
"targetedInventorySizes": (json!({}))
}),
"inventoryTypeTargeting": json!({"inventoryTypes": ()}),
"placementTargeting": json!({
"mobileApplicationTargeting": json!({"firstPartyTargeting": json!({
"excludedAppIds": (),
"targetedAppIds": ()
})}),
"uriTargeting": json!({
"excludedUris": (),
"targetedUris": ()
})
}),
"technologyTargeting": json!({
"deviceCapabilityTargeting": json!({}),
"deviceCategoryTargeting": json!({}),
"operatingSystemTargeting": json!({
"operatingSystemCriteria": json!({}),
"operatingSystemVersionCriteria": json!({})
})
}),
"userListTargeting": json!({}),
"videoTargeting": json!({
"excludedPositionTypes": (),
"targetedPositionTypes": ()
})
}),
"updateTime": ""
}),
"updateMask": ""
})
)});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/v1/:parent/deals:batchUpdate \
--header 'content-type: application/json' \
--data '{
"requests": [
{
"deal": {
"billedBuyer": "",
"buyer": "",
"client": "",
"createTime": "",
"creativeRequirements": {
"creativeFormat": "",
"creativePreApprovalPolicy": "",
"creativeSafeFrameCompatibility": "",
"maxAdDurationMs": "",
"programmaticCreativeSource": "",
"skippableAdType": ""
},
"dealType": "",
"deliveryControl": {
"companionDeliveryType": "",
"creativeRotationType": "",
"deliveryRateType": "",
"frequencyCap": [
{
"maxImpressions": 0,
"timeUnitType": "",
"timeUnitsCount": 0
}
],
"roadblockingType": ""
},
"description": "",
"displayName": "",
"estimatedGrossSpend": {
"currencyCode": "",
"nanos": 0,
"units": ""
},
"flightEndTime": "",
"flightStartTime": "",
"name": "",
"preferredDealTerms": {
"fixedPrice": {
"amount": {},
"type": ""
}
},
"privateAuctionTerms": {
"floorPrice": {},
"openAuctionAllowed": false
},
"programmaticGuaranteedTerms": {
"fixedPrice": {},
"guaranteedLooks": "",
"impressionCap": "",
"minimumDailyLooks": "",
"percentShareOfVoice": "",
"reservationType": ""
},
"proposalRevision": "",
"publisherProfile": "",
"sellerTimeZone": {
"id": "",
"version": ""
},
"targeting": {
"daypartTargeting": {
"dayParts": [
{
"dayOfWeek": "",
"endTime": {
"hours": 0,
"minutes": 0,
"nanos": 0,
"seconds": 0
},
"startTime": {}
}
],
"timeZoneType": ""
},
"geoTargeting": {
"excludedCriteriaIds": [],
"targetedCriteriaIds": []
},
"inventorySizeTargeting": {
"excludedInventorySizes": [
{
"height": "",
"type": "",
"width": ""
}
],
"targetedInventorySizes": [
{}
]
},
"inventoryTypeTargeting": {
"inventoryTypes": []
},
"placementTargeting": {
"mobileApplicationTargeting": {
"firstPartyTargeting": {
"excludedAppIds": [],
"targetedAppIds": []
}
},
"uriTargeting": {
"excludedUris": [],
"targetedUris": []
}
},
"technologyTargeting": {
"deviceCapabilityTargeting": {},
"deviceCategoryTargeting": {},
"operatingSystemTargeting": {
"operatingSystemCriteria": {},
"operatingSystemVersionCriteria": {}
}
},
"userListTargeting": {},
"videoTargeting": {
"excludedPositionTypes": [],
"targetedPositionTypes": []
}
},
"updateTime": ""
},
"updateMask": ""
}
]
}'
echo '{
"requests": [
{
"deal": {
"billedBuyer": "",
"buyer": "",
"client": "",
"createTime": "",
"creativeRequirements": {
"creativeFormat": "",
"creativePreApprovalPolicy": "",
"creativeSafeFrameCompatibility": "",
"maxAdDurationMs": "",
"programmaticCreativeSource": "",
"skippableAdType": ""
},
"dealType": "",
"deliveryControl": {
"companionDeliveryType": "",
"creativeRotationType": "",
"deliveryRateType": "",
"frequencyCap": [
{
"maxImpressions": 0,
"timeUnitType": "",
"timeUnitsCount": 0
}
],
"roadblockingType": ""
},
"description": "",
"displayName": "",
"estimatedGrossSpend": {
"currencyCode": "",
"nanos": 0,
"units": ""
},
"flightEndTime": "",
"flightStartTime": "",
"name": "",
"preferredDealTerms": {
"fixedPrice": {
"amount": {},
"type": ""
}
},
"privateAuctionTerms": {
"floorPrice": {},
"openAuctionAllowed": false
},
"programmaticGuaranteedTerms": {
"fixedPrice": {},
"guaranteedLooks": "",
"impressionCap": "",
"minimumDailyLooks": "",
"percentShareOfVoice": "",
"reservationType": ""
},
"proposalRevision": "",
"publisherProfile": "",
"sellerTimeZone": {
"id": "",
"version": ""
},
"targeting": {
"daypartTargeting": {
"dayParts": [
{
"dayOfWeek": "",
"endTime": {
"hours": 0,
"minutes": 0,
"nanos": 0,
"seconds": 0
},
"startTime": {}
}
],
"timeZoneType": ""
},
"geoTargeting": {
"excludedCriteriaIds": [],
"targetedCriteriaIds": []
},
"inventorySizeTargeting": {
"excludedInventorySizes": [
{
"height": "",
"type": "",
"width": ""
}
],
"targetedInventorySizes": [
{}
]
},
"inventoryTypeTargeting": {
"inventoryTypes": []
},
"placementTargeting": {
"mobileApplicationTargeting": {
"firstPartyTargeting": {
"excludedAppIds": [],
"targetedAppIds": []
}
},
"uriTargeting": {
"excludedUris": [],
"targetedUris": []
}
},
"technologyTargeting": {
"deviceCapabilityTargeting": {},
"deviceCategoryTargeting": {},
"operatingSystemTargeting": {
"operatingSystemCriteria": {},
"operatingSystemVersionCriteria": {}
}
},
"userListTargeting": {},
"videoTargeting": {
"excludedPositionTypes": [],
"targetedPositionTypes": []
}
},
"updateTime": ""
},
"updateMask": ""
}
]
}' | \
http POST {{baseUrl}}/v1/:parent/deals:batchUpdate \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "requests": [\n {\n "deal": {\n "billedBuyer": "",\n "buyer": "",\n "client": "",\n "createTime": "",\n "creativeRequirements": {\n "creativeFormat": "",\n "creativePreApprovalPolicy": "",\n "creativeSafeFrameCompatibility": "",\n "maxAdDurationMs": "",\n "programmaticCreativeSource": "",\n "skippableAdType": ""\n },\n "dealType": "",\n "deliveryControl": {\n "companionDeliveryType": "",\n "creativeRotationType": "",\n "deliveryRateType": "",\n "frequencyCap": [\n {\n "maxImpressions": 0,\n "timeUnitType": "",\n "timeUnitsCount": 0\n }\n ],\n "roadblockingType": ""\n },\n "description": "",\n "displayName": "",\n "estimatedGrossSpend": {\n "currencyCode": "",\n "nanos": 0,\n "units": ""\n },\n "flightEndTime": "",\n "flightStartTime": "",\n "name": "",\n "preferredDealTerms": {\n "fixedPrice": {\n "amount": {},\n "type": ""\n }\n },\n "privateAuctionTerms": {\n "floorPrice": {},\n "openAuctionAllowed": false\n },\n "programmaticGuaranteedTerms": {\n "fixedPrice": {},\n "guaranteedLooks": "",\n "impressionCap": "",\n "minimumDailyLooks": "",\n "percentShareOfVoice": "",\n "reservationType": ""\n },\n "proposalRevision": "",\n "publisherProfile": "",\n "sellerTimeZone": {\n "id": "",\n "version": ""\n },\n "targeting": {\n "daypartTargeting": {\n "dayParts": [\n {\n "dayOfWeek": "",\n "endTime": {\n "hours": 0,\n "minutes": 0,\n "nanos": 0,\n "seconds": 0\n },\n "startTime": {}\n }\n ],\n "timeZoneType": ""\n },\n "geoTargeting": {\n "excludedCriteriaIds": [],\n "targetedCriteriaIds": []\n },\n "inventorySizeTargeting": {\n "excludedInventorySizes": [\n {\n "height": "",\n "type": "",\n "width": ""\n }\n ],\n "targetedInventorySizes": [\n {}\n ]\n },\n "inventoryTypeTargeting": {\n "inventoryTypes": []\n },\n "placementTargeting": {\n "mobileApplicationTargeting": {\n "firstPartyTargeting": {\n "excludedAppIds": [],\n "targetedAppIds": []\n }\n },\n "uriTargeting": {\n "excludedUris": [],\n "targetedUris": []\n }\n },\n "technologyTargeting": {\n "deviceCapabilityTargeting": {},\n "deviceCategoryTargeting": {},\n "operatingSystemTargeting": {\n "operatingSystemCriteria": {},\n "operatingSystemVersionCriteria": {}\n }\n },\n "userListTargeting": {},\n "videoTargeting": {\n "excludedPositionTypes": [],\n "targetedPositionTypes": []\n }\n },\n "updateTime": ""\n },\n "updateMask": ""\n }\n ]\n}' \
--output-document \
- {{baseUrl}}/v1/:parent/deals:batchUpdate
import Foundation
let headers = ["content-type": "application/json"]
let parameters = ["requests": [
[
"deal": [
"billedBuyer": "",
"buyer": "",
"client": "",
"createTime": "",
"creativeRequirements": [
"creativeFormat": "",
"creativePreApprovalPolicy": "",
"creativeSafeFrameCompatibility": "",
"maxAdDurationMs": "",
"programmaticCreativeSource": "",
"skippableAdType": ""
],
"dealType": "",
"deliveryControl": [
"companionDeliveryType": "",
"creativeRotationType": "",
"deliveryRateType": "",
"frequencyCap": [
[
"maxImpressions": 0,
"timeUnitType": "",
"timeUnitsCount": 0
]
],
"roadblockingType": ""
],
"description": "",
"displayName": "",
"estimatedGrossSpend": [
"currencyCode": "",
"nanos": 0,
"units": ""
],
"flightEndTime": "",
"flightStartTime": "",
"name": "",
"preferredDealTerms": ["fixedPrice": [
"amount": [],
"type": ""
]],
"privateAuctionTerms": [
"floorPrice": [],
"openAuctionAllowed": false
],
"programmaticGuaranteedTerms": [
"fixedPrice": [],
"guaranteedLooks": "",
"impressionCap": "",
"minimumDailyLooks": "",
"percentShareOfVoice": "",
"reservationType": ""
],
"proposalRevision": "",
"publisherProfile": "",
"sellerTimeZone": [
"id": "",
"version": ""
],
"targeting": [
"daypartTargeting": [
"dayParts": [
[
"dayOfWeek": "",
"endTime": [
"hours": 0,
"minutes": 0,
"nanos": 0,
"seconds": 0
],
"startTime": []
]
],
"timeZoneType": ""
],
"geoTargeting": [
"excludedCriteriaIds": [],
"targetedCriteriaIds": []
],
"inventorySizeTargeting": [
"excludedInventorySizes": [
[
"height": "",
"type": "",
"width": ""
]
],
"targetedInventorySizes": [[]]
],
"inventoryTypeTargeting": ["inventoryTypes": []],
"placementTargeting": [
"mobileApplicationTargeting": ["firstPartyTargeting": [
"excludedAppIds": [],
"targetedAppIds": []
]],
"uriTargeting": [
"excludedUris": [],
"targetedUris": []
]
],
"technologyTargeting": [
"deviceCapabilityTargeting": [],
"deviceCategoryTargeting": [],
"operatingSystemTargeting": [
"operatingSystemCriteria": [],
"operatingSystemVersionCriteria": []
]
],
"userListTargeting": [],
"videoTargeting": [
"excludedPositionTypes": [],
"targetedPositionTypes": []
]
],
"updateTime": ""
],
"updateMask": ""
]
]] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/:parent/deals:batchUpdate")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
authorizedbuyersmarketplace.buyers.proposals.deals.list
{{baseUrl}}/v1/:parent/deals
QUERY PARAMS
parent
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/:parent/deals");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v1/:parent/deals")
require "http/client"
url = "{{baseUrl}}/v1/:parent/deals"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/v1/:parent/deals"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/:parent/deals");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/:parent/deals"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/v1/:parent/deals HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v1/:parent/deals")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/:parent/deals"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/:parent/deals")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v1/:parent/deals")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/v1/:parent/deals');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/v1/:parent/deals'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/:parent/deals';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1/:parent/deals',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v1/:parent/deals")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/:parent/deals',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {method: 'GET', url: '{{baseUrl}}/v1/:parent/deals'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/v1/:parent/deals');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {method: 'GET', url: '{{baseUrl}}/v1/:parent/deals'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/:parent/deals';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/:parent/deals"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1/:parent/deals" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/:parent/deals",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/v1/:parent/deals');
echo $response->getBody();
setUrl('{{baseUrl}}/v1/:parent/deals');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v1/:parent/deals');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/:parent/deals' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/:parent/deals' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/v1/:parent/deals")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/:parent/deals"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/:parent/deals"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/:parent/deals")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/v1/:parent/deals') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/:parent/deals";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/v1/:parent/deals
http GET {{baseUrl}}/v1/:parent/deals
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/v1/:parent/deals
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/:parent/deals")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PATCH
authorizedbuyersmarketplace.buyers.proposals.deals.patch
{{baseUrl}}/v1/:name
QUERY PARAMS
name
BODY json
{
"billedBuyer": "",
"buyer": "",
"client": "",
"createTime": "",
"creativeRequirements": {
"creativeFormat": "",
"creativePreApprovalPolicy": "",
"creativeSafeFrameCompatibility": "",
"maxAdDurationMs": "",
"programmaticCreativeSource": "",
"skippableAdType": ""
},
"dealType": "",
"deliveryControl": {
"companionDeliveryType": "",
"creativeRotationType": "",
"deliveryRateType": "",
"frequencyCap": [
{
"maxImpressions": 0,
"timeUnitType": "",
"timeUnitsCount": 0
}
],
"roadblockingType": ""
},
"description": "",
"displayName": "",
"estimatedGrossSpend": {
"currencyCode": "",
"nanos": 0,
"units": ""
},
"flightEndTime": "",
"flightStartTime": "",
"name": "",
"preferredDealTerms": {
"fixedPrice": {
"amount": {},
"type": ""
}
},
"privateAuctionTerms": {
"floorPrice": {},
"openAuctionAllowed": false
},
"programmaticGuaranteedTerms": {
"fixedPrice": {},
"guaranteedLooks": "",
"impressionCap": "",
"minimumDailyLooks": "",
"percentShareOfVoice": "",
"reservationType": ""
},
"proposalRevision": "",
"publisherProfile": "",
"sellerTimeZone": {
"id": "",
"version": ""
},
"targeting": {
"daypartTargeting": {
"dayParts": [
{
"dayOfWeek": "",
"endTime": {
"hours": 0,
"minutes": 0,
"nanos": 0,
"seconds": 0
},
"startTime": {}
}
],
"timeZoneType": ""
},
"geoTargeting": {
"excludedCriteriaIds": [],
"targetedCriteriaIds": []
},
"inventorySizeTargeting": {
"excludedInventorySizes": [
{
"height": "",
"type": "",
"width": ""
}
],
"targetedInventorySizes": [
{}
]
},
"inventoryTypeTargeting": {
"inventoryTypes": []
},
"placementTargeting": {
"mobileApplicationTargeting": {
"firstPartyTargeting": {
"excludedAppIds": [],
"targetedAppIds": []
}
},
"uriTargeting": {
"excludedUris": [],
"targetedUris": []
}
},
"technologyTargeting": {
"deviceCapabilityTargeting": {},
"deviceCategoryTargeting": {},
"operatingSystemTargeting": {
"operatingSystemCriteria": {},
"operatingSystemVersionCriteria": {}
}
},
"userListTargeting": {},
"videoTargeting": {
"excludedPositionTypes": [],
"targetedPositionTypes": []
}
},
"updateTime": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/:name");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"billedBuyer\": \"\",\n \"buyer\": \"\",\n \"client\": \"\",\n \"createTime\": \"\",\n \"creativeRequirements\": {\n \"creativeFormat\": \"\",\n \"creativePreApprovalPolicy\": \"\",\n \"creativeSafeFrameCompatibility\": \"\",\n \"maxAdDurationMs\": \"\",\n \"programmaticCreativeSource\": \"\",\n \"skippableAdType\": \"\"\n },\n \"dealType\": \"\",\n \"deliveryControl\": {\n \"companionDeliveryType\": \"\",\n \"creativeRotationType\": \"\",\n \"deliveryRateType\": \"\",\n \"frequencyCap\": [\n {\n \"maxImpressions\": 0,\n \"timeUnitType\": \"\",\n \"timeUnitsCount\": 0\n }\n ],\n \"roadblockingType\": \"\"\n },\n \"description\": \"\",\n \"displayName\": \"\",\n \"estimatedGrossSpend\": {\n \"currencyCode\": \"\",\n \"nanos\": 0,\n \"units\": \"\"\n },\n \"flightEndTime\": \"\",\n \"flightStartTime\": \"\",\n \"name\": \"\",\n \"preferredDealTerms\": {\n \"fixedPrice\": {\n \"amount\": {},\n \"type\": \"\"\n }\n },\n \"privateAuctionTerms\": {\n \"floorPrice\": {},\n \"openAuctionAllowed\": false\n },\n \"programmaticGuaranteedTerms\": {\n \"fixedPrice\": {},\n \"guaranteedLooks\": \"\",\n \"impressionCap\": \"\",\n \"minimumDailyLooks\": \"\",\n \"percentShareOfVoice\": \"\",\n \"reservationType\": \"\"\n },\n \"proposalRevision\": \"\",\n \"publisherProfile\": \"\",\n \"sellerTimeZone\": {\n \"id\": \"\",\n \"version\": \"\"\n },\n \"targeting\": {\n \"daypartTargeting\": {\n \"dayParts\": [\n {\n \"dayOfWeek\": \"\",\n \"endTime\": {\n \"hours\": 0,\n \"minutes\": 0,\n \"nanos\": 0,\n \"seconds\": 0\n },\n \"startTime\": {}\n }\n ],\n \"timeZoneType\": \"\"\n },\n \"geoTargeting\": {\n \"excludedCriteriaIds\": [],\n \"targetedCriteriaIds\": []\n },\n \"inventorySizeTargeting\": {\n \"excludedInventorySizes\": [\n {\n \"height\": \"\",\n \"type\": \"\",\n \"width\": \"\"\n }\n ],\n \"targetedInventorySizes\": [\n {}\n ]\n },\n \"inventoryTypeTargeting\": {\n \"inventoryTypes\": []\n },\n \"placementTargeting\": {\n \"mobileApplicationTargeting\": {\n \"firstPartyTargeting\": {\n \"excludedAppIds\": [],\n \"targetedAppIds\": []\n }\n },\n \"uriTargeting\": {\n \"excludedUris\": [],\n \"targetedUris\": []\n }\n },\n \"technologyTargeting\": {\n \"deviceCapabilityTargeting\": {},\n \"deviceCategoryTargeting\": {},\n \"operatingSystemTargeting\": {\n \"operatingSystemCriteria\": {},\n \"operatingSystemVersionCriteria\": {}\n }\n },\n \"userListTargeting\": {},\n \"videoTargeting\": {\n \"excludedPositionTypes\": [],\n \"targetedPositionTypes\": []\n }\n },\n \"updateTime\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/patch "{{baseUrl}}/v1/:name" {:content-type :json
:form-params {:billedBuyer ""
:buyer ""
:client ""
:createTime ""
:creativeRequirements {:creativeFormat ""
:creativePreApprovalPolicy ""
:creativeSafeFrameCompatibility ""
:maxAdDurationMs ""
:programmaticCreativeSource ""
:skippableAdType ""}
:dealType ""
:deliveryControl {:companionDeliveryType ""
:creativeRotationType ""
:deliveryRateType ""
:frequencyCap [{:maxImpressions 0
:timeUnitType ""
:timeUnitsCount 0}]
:roadblockingType ""}
:description ""
:displayName ""
:estimatedGrossSpend {:currencyCode ""
:nanos 0
:units ""}
:flightEndTime ""
:flightStartTime ""
:name ""
:preferredDealTerms {:fixedPrice {:amount {}
:type ""}}
:privateAuctionTerms {:floorPrice {}
:openAuctionAllowed false}
:programmaticGuaranteedTerms {:fixedPrice {}
:guaranteedLooks ""
:impressionCap ""
:minimumDailyLooks ""
:percentShareOfVoice ""
:reservationType ""}
:proposalRevision ""
:publisherProfile ""
:sellerTimeZone {:id ""
:version ""}
:targeting {:daypartTargeting {:dayParts [{:dayOfWeek ""
:endTime {:hours 0
:minutes 0
:nanos 0
:seconds 0}
:startTime {}}]
:timeZoneType ""}
:geoTargeting {:excludedCriteriaIds []
:targetedCriteriaIds []}
:inventorySizeTargeting {:excludedInventorySizes [{:height ""
:type ""
:width ""}]
:targetedInventorySizes [{}]}
:inventoryTypeTargeting {:inventoryTypes []}
:placementTargeting {:mobileApplicationTargeting {:firstPartyTargeting {:excludedAppIds []
:targetedAppIds []}}
:uriTargeting {:excludedUris []
:targetedUris []}}
:technologyTargeting {:deviceCapabilityTargeting {}
:deviceCategoryTargeting {}
:operatingSystemTargeting {:operatingSystemCriteria {}
:operatingSystemVersionCriteria {}}}
:userListTargeting {}
:videoTargeting {:excludedPositionTypes []
:targetedPositionTypes []}}
:updateTime ""}})
require "http/client"
url = "{{baseUrl}}/v1/:name"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"billedBuyer\": \"\",\n \"buyer\": \"\",\n \"client\": \"\",\n \"createTime\": \"\",\n \"creativeRequirements\": {\n \"creativeFormat\": \"\",\n \"creativePreApprovalPolicy\": \"\",\n \"creativeSafeFrameCompatibility\": \"\",\n \"maxAdDurationMs\": \"\",\n \"programmaticCreativeSource\": \"\",\n \"skippableAdType\": \"\"\n },\n \"dealType\": \"\",\n \"deliveryControl\": {\n \"companionDeliveryType\": \"\",\n \"creativeRotationType\": \"\",\n \"deliveryRateType\": \"\",\n \"frequencyCap\": [\n {\n \"maxImpressions\": 0,\n \"timeUnitType\": \"\",\n \"timeUnitsCount\": 0\n }\n ],\n \"roadblockingType\": \"\"\n },\n \"description\": \"\",\n \"displayName\": \"\",\n \"estimatedGrossSpend\": {\n \"currencyCode\": \"\",\n \"nanos\": 0,\n \"units\": \"\"\n },\n \"flightEndTime\": \"\",\n \"flightStartTime\": \"\",\n \"name\": \"\",\n \"preferredDealTerms\": {\n \"fixedPrice\": {\n \"amount\": {},\n \"type\": \"\"\n }\n },\n \"privateAuctionTerms\": {\n \"floorPrice\": {},\n \"openAuctionAllowed\": false\n },\n \"programmaticGuaranteedTerms\": {\n \"fixedPrice\": {},\n \"guaranteedLooks\": \"\",\n \"impressionCap\": \"\",\n \"minimumDailyLooks\": \"\",\n \"percentShareOfVoice\": \"\",\n \"reservationType\": \"\"\n },\n \"proposalRevision\": \"\",\n \"publisherProfile\": \"\",\n \"sellerTimeZone\": {\n \"id\": \"\",\n \"version\": \"\"\n },\n \"targeting\": {\n \"daypartTargeting\": {\n \"dayParts\": [\n {\n \"dayOfWeek\": \"\",\n \"endTime\": {\n \"hours\": 0,\n \"minutes\": 0,\n \"nanos\": 0,\n \"seconds\": 0\n },\n \"startTime\": {}\n }\n ],\n \"timeZoneType\": \"\"\n },\n \"geoTargeting\": {\n \"excludedCriteriaIds\": [],\n \"targetedCriteriaIds\": []\n },\n \"inventorySizeTargeting\": {\n \"excludedInventorySizes\": [\n {\n \"height\": \"\",\n \"type\": \"\",\n \"width\": \"\"\n }\n ],\n \"targetedInventorySizes\": [\n {}\n ]\n },\n \"inventoryTypeTargeting\": {\n \"inventoryTypes\": []\n },\n \"placementTargeting\": {\n \"mobileApplicationTargeting\": {\n \"firstPartyTargeting\": {\n \"excludedAppIds\": [],\n \"targetedAppIds\": []\n }\n },\n \"uriTargeting\": {\n \"excludedUris\": [],\n \"targetedUris\": []\n }\n },\n \"technologyTargeting\": {\n \"deviceCapabilityTargeting\": {},\n \"deviceCategoryTargeting\": {},\n \"operatingSystemTargeting\": {\n \"operatingSystemCriteria\": {},\n \"operatingSystemVersionCriteria\": {}\n }\n },\n \"userListTargeting\": {},\n \"videoTargeting\": {\n \"excludedPositionTypes\": [],\n \"targetedPositionTypes\": []\n }\n },\n \"updateTime\": \"\"\n}"
response = HTTP::Client.patch url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Patch,
RequestUri = new Uri("{{baseUrl}}/v1/:name"),
Content = new StringContent("{\n \"billedBuyer\": \"\",\n \"buyer\": \"\",\n \"client\": \"\",\n \"createTime\": \"\",\n \"creativeRequirements\": {\n \"creativeFormat\": \"\",\n \"creativePreApprovalPolicy\": \"\",\n \"creativeSafeFrameCompatibility\": \"\",\n \"maxAdDurationMs\": \"\",\n \"programmaticCreativeSource\": \"\",\n \"skippableAdType\": \"\"\n },\n \"dealType\": \"\",\n \"deliveryControl\": {\n \"companionDeliveryType\": \"\",\n \"creativeRotationType\": \"\",\n \"deliveryRateType\": \"\",\n \"frequencyCap\": [\n {\n \"maxImpressions\": 0,\n \"timeUnitType\": \"\",\n \"timeUnitsCount\": 0\n }\n ],\n \"roadblockingType\": \"\"\n },\n \"description\": \"\",\n \"displayName\": \"\",\n \"estimatedGrossSpend\": {\n \"currencyCode\": \"\",\n \"nanos\": 0,\n \"units\": \"\"\n },\n \"flightEndTime\": \"\",\n \"flightStartTime\": \"\",\n \"name\": \"\",\n \"preferredDealTerms\": {\n \"fixedPrice\": {\n \"amount\": {},\n \"type\": \"\"\n }\n },\n \"privateAuctionTerms\": {\n \"floorPrice\": {},\n \"openAuctionAllowed\": false\n },\n \"programmaticGuaranteedTerms\": {\n \"fixedPrice\": {},\n \"guaranteedLooks\": \"\",\n \"impressionCap\": \"\",\n \"minimumDailyLooks\": \"\",\n \"percentShareOfVoice\": \"\",\n \"reservationType\": \"\"\n },\n \"proposalRevision\": \"\",\n \"publisherProfile\": \"\",\n \"sellerTimeZone\": {\n \"id\": \"\",\n \"version\": \"\"\n },\n \"targeting\": {\n \"daypartTargeting\": {\n \"dayParts\": [\n {\n \"dayOfWeek\": \"\",\n \"endTime\": {\n \"hours\": 0,\n \"minutes\": 0,\n \"nanos\": 0,\n \"seconds\": 0\n },\n \"startTime\": {}\n }\n ],\n \"timeZoneType\": \"\"\n },\n \"geoTargeting\": {\n \"excludedCriteriaIds\": [],\n \"targetedCriteriaIds\": []\n },\n \"inventorySizeTargeting\": {\n \"excludedInventorySizes\": [\n {\n \"height\": \"\",\n \"type\": \"\",\n \"width\": \"\"\n }\n ],\n \"targetedInventorySizes\": [\n {}\n ]\n },\n \"inventoryTypeTargeting\": {\n \"inventoryTypes\": []\n },\n \"placementTargeting\": {\n \"mobileApplicationTargeting\": {\n \"firstPartyTargeting\": {\n \"excludedAppIds\": [],\n \"targetedAppIds\": []\n }\n },\n \"uriTargeting\": {\n \"excludedUris\": [],\n \"targetedUris\": []\n }\n },\n \"technologyTargeting\": {\n \"deviceCapabilityTargeting\": {},\n \"deviceCategoryTargeting\": {},\n \"operatingSystemTargeting\": {\n \"operatingSystemCriteria\": {},\n \"operatingSystemVersionCriteria\": {}\n }\n },\n \"userListTargeting\": {},\n \"videoTargeting\": {\n \"excludedPositionTypes\": [],\n \"targetedPositionTypes\": []\n }\n },\n \"updateTime\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/:name");
var request = new RestRequest("", Method.Patch);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"billedBuyer\": \"\",\n \"buyer\": \"\",\n \"client\": \"\",\n \"createTime\": \"\",\n \"creativeRequirements\": {\n \"creativeFormat\": \"\",\n \"creativePreApprovalPolicy\": \"\",\n \"creativeSafeFrameCompatibility\": \"\",\n \"maxAdDurationMs\": \"\",\n \"programmaticCreativeSource\": \"\",\n \"skippableAdType\": \"\"\n },\n \"dealType\": \"\",\n \"deliveryControl\": {\n \"companionDeliveryType\": \"\",\n \"creativeRotationType\": \"\",\n \"deliveryRateType\": \"\",\n \"frequencyCap\": [\n {\n \"maxImpressions\": 0,\n \"timeUnitType\": \"\",\n \"timeUnitsCount\": 0\n }\n ],\n \"roadblockingType\": \"\"\n },\n \"description\": \"\",\n \"displayName\": \"\",\n \"estimatedGrossSpend\": {\n \"currencyCode\": \"\",\n \"nanos\": 0,\n \"units\": \"\"\n },\n \"flightEndTime\": \"\",\n \"flightStartTime\": \"\",\n \"name\": \"\",\n \"preferredDealTerms\": {\n \"fixedPrice\": {\n \"amount\": {},\n \"type\": \"\"\n }\n },\n \"privateAuctionTerms\": {\n \"floorPrice\": {},\n \"openAuctionAllowed\": false\n },\n \"programmaticGuaranteedTerms\": {\n \"fixedPrice\": {},\n \"guaranteedLooks\": \"\",\n \"impressionCap\": \"\",\n \"minimumDailyLooks\": \"\",\n \"percentShareOfVoice\": \"\",\n \"reservationType\": \"\"\n },\n \"proposalRevision\": \"\",\n \"publisherProfile\": \"\",\n \"sellerTimeZone\": {\n \"id\": \"\",\n \"version\": \"\"\n },\n \"targeting\": {\n \"daypartTargeting\": {\n \"dayParts\": [\n {\n \"dayOfWeek\": \"\",\n \"endTime\": {\n \"hours\": 0,\n \"minutes\": 0,\n \"nanos\": 0,\n \"seconds\": 0\n },\n \"startTime\": {}\n }\n ],\n \"timeZoneType\": \"\"\n },\n \"geoTargeting\": {\n \"excludedCriteriaIds\": [],\n \"targetedCriteriaIds\": []\n },\n \"inventorySizeTargeting\": {\n \"excludedInventorySizes\": [\n {\n \"height\": \"\",\n \"type\": \"\",\n \"width\": \"\"\n }\n ],\n \"targetedInventorySizes\": [\n {}\n ]\n },\n \"inventoryTypeTargeting\": {\n \"inventoryTypes\": []\n },\n \"placementTargeting\": {\n \"mobileApplicationTargeting\": {\n \"firstPartyTargeting\": {\n \"excludedAppIds\": [],\n \"targetedAppIds\": []\n }\n },\n \"uriTargeting\": {\n \"excludedUris\": [],\n \"targetedUris\": []\n }\n },\n \"technologyTargeting\": {\n \"deviceCapabilityTargeting\": {},\n \"deviceCategoryTargeting\": {},\n \"operatingSystemTargeting\": {\n \"operatingSystemCriteria\": {},\n \"operatingSystemVersionCriteria\": {}\n }\n },\n \"userListTargeting\": {},\n \"videoTargeting\": {\n \"excludedPositionTypes\": [],\n \"targetedPositionTypes\": []\n }\n },\n \"updateTime\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/:name"
payload := strings.NewReader("{\n \"billedBuyer\": \"\",\n \"buyer\": \"\",\n \"client\": \"\",\n \"createTime\": \"\",\n \"creativeRequirements\": {\n \"creativeFormat\": \"\",\n \"creativePreApprovalPolicy\": \"\",\n \"creativeSafeFrameCompatibility\": \"\",\n \"maxAdDurationMs\": \"\",\n \"programmaticCreativeSource\": \"\",\n \"skippableAdType\": \"\"\n },\n \"dealType\": \"\",\n \"deliveryControl\": {\n \"companionDeliveryType\": \"\",\n \"creativeRotationType\": \"\",\n \"deliveryRateType\": \"\",\n \"frequencyCap\": [\n {\n \"maxImpressions\": 0,\n \"timeUnitType\": \"\",\n \"timeUnitsCount\": 0\n }\n ],\n \"roadblockingType\": \"\"\n },\n \"description\": \"\",\n \"displayName\": \"\",\n \"estimatedGrossSpend\": {\n \"currencyCode\": \"\",\n \"nanos\": 0,\n \"units\": \"\"\n },\n \"flightEndTime\": \"\",\n \"flightStartTime\": \"\",\n \"name\": \"\",\n \"preferredDealTerms\": {\n \"fixedPrice\": {\n \"amount\": {},\n \"type\": \"\"\n }\n },\n \"privateAuctionTerms\": {\n \"floorPrice\": {},\n \"openAuctionAllowed\": false\n },\n \"programmaticGuaranteedTerms\": {\n \"fixedPrice\": {},\n \"guaranteedLooks\": \"\",\n \"impressionCap\": \"\",\n \"minimumDailyLooks\": \"\",\n \"percentShareOfVoice\": \"\",\n \"reservationType\": \"\"\n },\n \"proposalRevision\": \"\",\n \"publisherProfile\": \"\",\n \"sellerTimeZone\": {\n \"id\": \"\",\n \"version\": \"\"\n },\n \"targeting\": {\n \"daypartTargeting\": {\n \"dayParts\": [\n {\n \"dayOfWeek\": \"\",\n \"endTime\": {\n \"hours\": 0,\n \"minutes\": 0,\n \"nanos\": 0,\n \"seconds\": 0\n },\n \"startTime\": {}\n }\n ],\n \"timeZoneType\": \"\"\n },\n \"geoTargeting\": {\n \"excludedCriteriaIds\": [],\n \"targetedCriteriaIds\": []\n },\n \"inventorySizeTargeting\": {\n \"excludedInventorySizes\": [\n {\n \"height\": \"\",\n \"type\": \"\",\n \"width\": \"\"\n }\n ],\n \"targetedInventorySizes\": [\n {}\n ]\n },\n \"inventoryTypeTargeting\": {\n \"inventoryTypes\": []\n },\n \"placementTargeting\": {\n \"mobileApplicationTargeting\": {\n \"firstPartyTargeting\": {\n \"excludedAppIds\": [],\n \"targetedAppIds\": []\n }\n },\n \"uriTargeting\": {\n \"excludedUris\": [],\n \"targetedUris\": []\n }\n },\n \"technologyTargeting\": {\n \"deviceCapabilityTargeting\": {},\n \"deviceCategoryTargeting\": {},\n \"operatingSystemTargeting\": {\n \"operatingSystemCriteria\": {},\n \"operatingSystemVersionCriteria\": {}\n }\n },\n \"userListTargeting\": {},\n \"videoTargeting\": {\n \"excludedPositionTypes\": [],\n \"targetedPositionTypes\": []\n }\n },\n \"updateTime\": \"\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
PATCH /baseUrl/v1/:name HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 2645
{
"billedBuyer": "",
"buyer": "",
"client": "",
"createTime": "",
"creativeRequirements": {
"creativeFormat": "",
"creativePreApprovalPolicy": "",
"creativeSafeFrameCompatibility": "",
"maxAdDurationMs": "",
"programmaticCreativeSource": "",
"skippableAdType": ""
},
"dealType": "",
"deliveryControl": {
"companionDeliveryType": "",
"creativeRotationType": "",
"deliveryRateType": "",
"frequencyCap": [
{
"maxImpressions": 0,
"timeUnitType": "",
"timeUnitsCount": 0
}
],
"roadblockingType": ""
},
"description": "",
"displayName": "",
"estimatedGrossSpend": {
"currencyCode": "",
"nanos": 0,
"units": ""
},
"flightEndTime": "",
"flightStartTime": "",
"name": "",
"preferredDealTerms": {
"fixedPrice": {
"amount": {},
"type": ""
}
},
"privateAuctionTerms": {
"floorPrice": {},
"openAuctionAllowed": false
},
"programmaticGuaranteedTerms": {
"fixedPrice": {},
"guaranteedLooks": "",
"impressionCap": "",
"minimumDailyLooks": "",
"percentShareOfVoice": "",
"reservationType": ""
},
"proposalRevision": "",
"publisherProfile": "",
"sellerTimeZone": {
"id": "",
"version": ""
},
"targeting": {
"daypartTargeting": {
"dayParts": [
{
"dayOfWeek": "",
"endTime": {
"hours": 0,
"minutes": 0,
"nanos": 0,
"seconds": 0
},
"startTime": {}
}
],
"timeZoneType": ""
},
"geoTargeting": {
"excludedCriteriaIds": [],
"targetedCriteriaIds": []
},
"inventorySizeTargeting": {
"excludedInventorySizes": [
{
"height": "",
"type": "",
"width": ""
}
],
"targetedInventorySizes": [
{}
]
},
"inventoryTypeTargeting": {
"inventoryTypes": []
},
"placementTargeting": {
"mobileApplicationTargeting": {
"firstPartyTargeting": {
"excludedAppIds": [],
"targetedAppIds": []
}
},
"uriTargeting": {
"excludedUris": [],
"targetedUris": []
}
},
"technologyTargeting": {
"deviceCapabilityTargeting": {},
"deviceCategoryTargeting": {},
"operatingSystemTargeting": {
"operatingSystemCriteria": {},
"operatingSystemVersionCriteria": {}
}
},
"userListTargeting": {},
"videoTargeting": {
"excludedPositionTypes": [],
"targetedPositionTypes": []
}
},
"updateTime": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PATCH", "{{baseUrl}}/v1/:name")
.setHeader("content-type", "application/json")
.setBody("{\n \"billedBuyer\": \"\",\n \"buyer\": \"\",\n \"client\": \"\",\n \"createTime\": \"\",\n \"creativeRequirements\": {\n \"creativeFormat\": \"\",\n \"creativePreApprovalPolicy\": \"\",\n \"creativeSafeFrameCompatibility\": \"\",\n \"maxAdDurationMs\": \"\",\n \"programmaticCreativeSource\": \"\",\n \"skippableAdType\": \"\"\n },\n \"dealType\": \"\",\n \"deliveryControl\": {\n \"companionDeliveryType\": \"\",\n \"creativeRotationType\": \"\",\n \"deliveryRateType\": \"\",\n \"frequencyCap\": [\n {\n \"maxImpressions\": 0,\n \"timeUnitType\": \"\",\n \"timeUnitsCount\": 0\n }\n ],\n \"roadblockingType\": \"\"\n },\n \"description\": \"\",\n \"displayName\": \"\",\n \"estimatedGrossSpend\": {\n \"currencyCode\": \"\",\n \"nanos\": 0,\n \"units\": \"\"\n },\n \"flightEndTime\": \"\",\n \"flightStartTime\": \"\",\n \"name\": \"\",\n \"preferredDealTerms\": {\n \"fixedPrice\": {\n \"amount\": {},\n \"type\": \"\"\n }\n },\n \"privateAuctionTerms\": {\n \"floorPrice\": {},\n \"openAuctionAllowed\": false\n },\n \"programmaticGuaranteedTerms\": {\n \"fixedPrice\": {},\n \"guaranteedLooks\": \"\",\n \"impressionCap\": \"\",\n \"minimumDailyLooks\": \"\",\n \"percentShareOfVoice\": \"\",\n \"reservationType\": \"\"\n },\n \"proposalRevision\": \"\",\n \"publisherProfile\": \"\",\n \"sellerTimeZone\": {\n \"id\": \"\",\n \"version\": \"\"\n },\n \"targeting\": {\n \"daypartTargeting\": {\n \"dayParts\": [\n {\n \"dayOfWeek\": \"\",\n \"endTime\": {\n \"hours\": 0,\n \"minutes\": 0,\n \"nanos\": 0,\n \"seconds\": 0\n },\n \"startTime\": {}\n }\n ],\n \"timeZoneType\": \"\"\n },\n \"geoTargeting\": {\n \"excludedCriteriaIds\": [],\n \"targetedCriteriaIds\": []\n },\n \"inventorySizeTargeting\": {\n \"excludedInventorySizes\": [\n {\n \"height\": \"\",\n \"type\": \"\",\n \"width\": \"\"\n }\n ],\n \"targetedInventorySizes\": [\n {}\n ]\n },\n \"inventoryTypeTargeting\": {\n \"inventoryTypes\": []\n },\n \"placementTargeting\": {\n \"mobileApplicationTargeting\": {\n \"firstPartyTargeting\": {\n \"excludedAppIds\": [],\n \"targetedAppIds\": []\n }\n },\n \"uriTargeting\": {\n \"excludedUris\": [],\n \"targetedUris\": []\n }\n },\n \"technologyTargeting\": {\n \"deviceCapabilityTargeting\": {},\n \"deviceCategoryTargeting\": {},\n \"operatingSystemTargeting\": {\n \"operatingSystemCriteria\": {},\n \"operatingSystemVersionCriteria\": {}\n }\n },\n \"userListTargeting\": {},\n \"videoTargeting\": {\n \"excludedPositionTypes\": [],\n \"targetedPositionTypes\": []\n }\n },\n \"updateTime\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/:name"))
.header("content-type", "application/json")
.method("PATCH", HttpRequest.BodyPublishers.ofString("{\n \"billedBuyer\": \"\",\n \"buyer\": \"\",\n \"client\": \"\",\n \"createTime\": \"\",\n \"creativeRequirements\": {\n \"creativeFormat\": \"\",\n \"creativePreApprovalPolicy\": \"\",\n \"creativeSafeFrameCompatibility\": \"\",\n \"maxAdDurationMs\": \"\",\n \"programmaticCreativeSource\": \"\",\n \"skippableAdType\": \"\"\n },\n \"dealType\": \"\",\n \"deliveryControl\": {\n \"companionDeliveryType\": \"\",\n \"creativeRotationType\": \"\",\n \"deliveryRateType\": \"\",\n \"frequencyCap\": [\n {\n \"maxImpressions\": 0,\n \"timeUnitType\": \"\",\n \"timeUnitsCount\": 0\n }\n ],\n \"roadblockingType\": \"\"\n },\n \"description\": \"\",\n \"displayName\": \"\",\n \"estimatedGrossSpend\": {\n \"currencyCode\": \"\",\n \"nanos\": 0,\n \"units\": \"\"\n },\n \"flightEndTime\": \"\",\n \"flightStartTime\": \"\",\n \"name\": \"\",\n \"preferredDealTerms\": {\n \"fixedPrice\": {\n \"amount\": {},\n \"type\": \"\"\n }\n },\n \"privateAuctionTerms\": {\n \"floorPrice\": {},\n \"openAuctionAllowed\": false\n },\n \"programmaticGuaranteedTerms\": {\n \"fixedPrice\": {},\n \"guaranteedLooks\": \"\",\n \"impressionCap\": \"\",\n \"minimumDailyLooks\": \"\",\n \"percentShareOfVoice\": \"\",\n \"reservationType\": \"\"\n },\n \"proposalRevision\": \"\",\n \"publisherProfile\": \"\",\n \"sellerTimeZone\": {\n \"id\": \"\",\n \"version\": \"\"\n },\n \"targeting\": {\n \"daypartTargeting\": {\n \"dayParts\": [\n {\n \"dayOfWeek\": \"\",\n \"endTime\": {\n \"hours\": 0,\n \"minutes\": 0,\n \"nanos\": 0,\n \"seconds\": 0\n },\n \"startTime\": {}\n }\n ],\n \"timeZoneType\": \"\"\n },\n \"geoTargeting\": {\n \"excludedCriteriaIds\": [],\n \"targetedCriteriaIds\": []\n },\n \"inventorySizeTargeting\": {\n \"excludedInventorySizes\": [\n {\n \"height\": \"\",\n \"type\": \"\",\n \"width\": \"\"\n }\n ],\n \"targetedInventorySizes\": [\n {}\n ]\n },\n \"inventoryTypeTargeting\": {\n \"inventoryTypes\": []\n },\n \"placementTargeting\": {\n \"mobileApplicationTargeting\": {\n \"firstPartyTargeting\": {\n \"excludedAppIds\": [],\n \"targetedAppIds\": []\n }\n },\n \"uriTargeting\": {\n \"excludedUris\": [],\n \"targetedUris\": []\n }\n },\n \"technologyTargeting\": {\n \"deviceCapabilityTargeting\": {},\n \"deviceCategoryTargeting\": {},\n \"operatingSystemTargeting\": {\n \"operatingSystemCriteria\": {},\n \"operatingSystemVersionCriteria\": {}\n }\n },\n \"userListTargeting\": {},\n \"videoTargeting\": {\n \"excludedPositionTypes\": [],\n \"targetedPositionTypes\": []\n }\n },\n \"updateTime\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"billedBuyer\": \"\",\n \"buyer\": \"\",\n \"client\": \"\",\n \"createTime\": \"\",\n \"creativeRequirements\": {\n \"creativeFormat\": \"\",\n \"creativePreApprovalPolicy\": \"\",\n \"creativeSafeFrameCompatibility\": \"\",\n \"maxAdDurationMs\": \"\",\n \"programmaticCreativeSource\": \"\",\n \"skippableAdType\": \"\"\n },\n \"dealType\": \"\",\n \"deliveryControl\": {\n \"companionDeliveryType\": \"\",\n \"creativeRotationType\": \"\",\n \"deliveryRateType\": \"\",\n \"frequencyCap\": [\n {\n \"maxImpressions\": 0,\n \"timeUnitType\": \"\",\n \"timeUnitsCount\": 0\n }\n ],\n \"roadblockingType\": \"\"\n },\n \"description\": \"\",\n \"displayName\": \"\",\n \"estimatedGrossSpend\": {\n \"currencyCode\": \"\",\n \"nanos\": 0,\n \"units\": \"\"\n },\n \"flightEndTime\": \"\",\n \"flightStartTime\": \"\",\n \"name\": \"\",\n \"preferredDealTerms\": {\n \"fixedPrice\": {\n \"amount\": {},\n \"type\": \"\"\n }\n },\n \"privateAuctionTerms\": {\n \"floorPrice\": {},\n \"openAuctionAllowed\": false\n },\n \"programmaticGuaranteedTerms\": {\n \"fixedPrice\": {},\n \"guaranteedLooks\": \"\",\n \"impressionCap\": \"\",\n \"minimumDailyLooks\": \"\",\n \"percentShareOfVoice\": \"\",\n \"reservationType\": \"\"\n },\n \"proposalRevision\": \"\",\n \"publisherProfile\": \"\",\n \"sellerTimeZone\": {\n \"id\": \"\",\n \"version\": \"\"\n },\n \"targeting\": {\n \"daypartTargeting\": {\n \"dayParts\": [\n {\n \"dayOfWeek\": \"\",\n \"endTime\": {\n \"hours\": 0,\n \"minutes\": 0,\n \"nanos\": 0,\n \"seconds\": 0\n },\n \"startTime\": {}\n }\n ],\n \"timeZoneType\": \"\"\n },\n \"geoTargeting\": {\n \"excludedCriteriaIds\": [],\n \"targetedCriteriaIds\": []\n },\n \"inventorySizeTargeting\": {\n \"excludedInventorySizes\": [\n {\n \"height\": \"\",\n \"type\": \"\",\n \"width\": \"\"\n }\n ],\n \"targetedInventorySizes\": [\n {}\n ]\n },\n \"inventoryTypeTargeting\": {\n \"inventoryTypes\": []\n },\n \"placementTargeting\": {\n \"mobileApplicationTargeting\": {\n \"firstPartyTargeting\": {\n \"excludedAppIds\": [],\n \"targetedAppIds\": []\n }\n },\n \"uriTargeting\": {\n \"excludedUris\": [],\n \"targetedUris\": []\n }\n },\n \"technologyTargeting\": {\n \"deviceCapabilityTargeting\": {},\n \"deviceCategoryTargeting\": {},\n \"operatingSystemTargeting\": {\n \"operatingSystemCriteria\": {},\n \"operatingSystemVersionCriteria\": {}\n }\n },\n \"userListTargeting\": {},\n \"videoTargeting\": {\n \"excludedPositionTypes\": [],\n \"targetedPositionTypes\": []\n }\n },\n \"updateTime\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/:name")
.patch(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.patch("{{baseUrl}}/v1/:name")
.header("content-type", "application/json")
.body("{\n \"billedBuyer\": \"\",\n \"buyer\": \"\",\n \"client\": \"\",\n \"createTime\": \"\",\n \"creativeRequirements\": {\n \"creativeFormat\": \"\",\n \"creativePreApprovalPolicy\": \"\",\n \"creativeSafeFrameCompatibility\": \"\",\n \"maxAdDurationMs\": \"\",\n \"programmaticCreativeSource\": \"\",\n \"skippableAdType\": \"\"\n },\n \"dealType\": \"\",\n \"deliveryControl\": {\n \"companionDeliveryType\": \"\",\n \"creativeRotationType\": \"\",\n \"deliveryRateType\": \"\",\n \"frequencyCap\": [\n {\n \"maxImpressions\": 0,\n \"timeUnitType\": \"\",\n \"timeUnitsCount\": 0\n }\n ],\n \"roadblockingType\": \"\"\n },\n \"description\": \"\",\n \"displayName\": \"\",\n \"estimatedGrossSpend\": {\n \"currencyCode\": \"\",\n \"nanos\": 0,\n \"units\": \"\"\n },\n \"flightEndTime\": \"\",\n \"flightStartTime\": \"\",\n \"name\": \"\",\n \"preferredDealTerms\": {\n \"fixedPrice\": {\n \"amount\": {},\n \"type\": \"\"\n }\n },\n \"privateAuctionTerms\": {\n \"floorPrice\": {},\n \"openAuctionAllowed\": false\n },\n \"programmaticGuaranteedTerms\": {\n \"fixedPrice\": {},\n \"guaranteedLooks\": \"\",\n \"impressionCap\": \"\",\n \"minimumDailyLooks\": \"\",\n \"percentShareOfVoice\": \"\",\n \"reservationType\": \"\"\n },\n \"proposalRevision\": \"\",\n \"publisherProfile\": \"\",\n \"sellerTimeZone\": {\n \"id\": \"\",\n \"version\": \"\"\n },\n \"targeting\": {\n \"daypartTargeting\": {\n \"dayParts\": [\n {\n \"dayOfWeek\": \"\",\n \"endTime\": {\n \"hours\": 0,\n \"minutes\": 0,\n \"nanos\": 0,\n \"seconds\": 0\n },\n \"startTime\": {}\n }\n ],\n \"timeZoneType\": \"\"\n },\n \"geoTargeting\": {\n \"excludedCriteriaIds\": [],\n \"targetedCriteriaIds\": []\n },\n \"inventorySizeTargeting\": {\n \"excludedInventorySizes\": [\n {\n \"height\": \"\",\n \"type\": \"\",\n \"width\": \"\"\n }\n ],\n \"targetedInventorySizes\": [\n {}\n ]\n },\n \"inventoryTypeTargeting\": {\n \"inventoryTypes\": []\n },\n \"placementTargeting\": {\n \"mobileApplicationTargeting\": {\n \"firstPartyTargeting\": {\n \"excludedAppIds\": [],\n \"targetedAppIds\": []\n }\n },\n \"uriTargeting\": {\n \"excludedUris\": [],\n \"targetedUris\": []\n }\n },\n \"technologyTargeting\": {\n \"deviceCapabilityTargeting\": {},\n \"deviceCategoryTargeting\": {},\n \"operatingSystemTargeting\": {\n \"operatingSystemCriteria\": {},\n \"operatingSystemVersionCriteria\": {}\n }\n },\n \"userListTargeting\": {},\n \"videoTargeting\": {\n \"excludedPositionTypes\": [],\n \"targetedPositionTypes\": []\n }\n },\n \"updateTime\": \"\"\n}")
.asString();
const data = JSON.stringify({
billedBuyer: '',
buyer: '',
client: '',
createTime: '',
creativeRequirements: {
creativeFormat: '',
creativePreApprovalPolicy: '',
creativeSafeFrameCompatibility: '',
maxAdDurationMs: '',
programmaticCreativeSource: '',
skippableAdType: ''
},
dealType: '',
deliveryControl: {
companionDeliveryType: '',
creativeRotationType: '',
deliveryRateType: '',
frequencyCap: [
{
maxImpressions: 0,
timeUnitType: '',
timeUnitsCount: 0
}
],
roadblockingType: ''
},
description: '',
displayName: '',
estimatedGrossSpend: {
currencyCode: '',
nanos: 0,
units: ''
},
flightEndTime: '',
flightStartTime: '',
name: '',
preferredDealTerms: {
fixedPrice: {
amount: {},
type: ''
}
},
privateAuctionTerms: {
floorPrice: {},
openAuctionAllowed: false
},
programmaticGuaranteedTerms: {
fixedPrice: {},
guaranteedLooks: '',
impressionCap: '',
minimumDailyLooks: '',
percentShareOfVoice: '',
reservationType: ''
},
proposalRevision: '',
publisherProfile: '',
sellerTimeZone: {
id: '',
version: ''
},
targeting: {
daypartTargeting: {
dayParts: [
{
dayOfWeek: '',
endTime: {
hours: 0,
minutes: 0,
nanos: 0,
seconds: 0
},
startTime: {}
}
],
timeZoneType: ''
},
geoTargeting: {
excludedCriteriaIds: [],
targetedCriteriaIds: []
},
inventorySizeTargeting: {
excludedInventorySizes: [
{
height: '',
type: '',
width: ''
}
],
targetedInventorySizes: [
{}
]
},
inventoryTypeTargeting: {
inventoryTypes: []
},
placementTargeting: {
mobileApplicationTargeting: {
firstPartyTargeting: {
excludedAppIds: [],
targetedAppIds: []
}
},
uriTargeting: {
excludedUris: [],
targetedUris: []
}
},
technologyTargeting: {
deviceCapabilityTargeting: {},
deviceCategoryTargeting: {},
operatingSystemTargeting: {
operatingSystemCriteria: {},
operatingSystemVersionCriteria: {}
}
},
userListTargeting: {},
videoTargeting: {
excludedPositionTypes: [],
targetedPositionTypes: []
}
},
updateTime: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PATCH', '{{baseUrl}}/v1/:name');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PATCH',
url: '{{baseUrl}}/v1/:name',
headers: {'content-type': 'application/json'},
data: {
billedBuyer: '',
buyer: '',
client: '',
createTime: '',
creativeRequirements: {
creativeFormat: '',
creativePreApprovalPolicy: '',
creativeSafeFrameCompatibility: '',
maxAdDurationMs: '',
programmaticCreativeSource: '',
skippableAdType: ''
},
dealType: '',
deliveryControl: {
companionDeliveryType: '',
creativeRotationType: '',
deliveryRateType: '',
frequencyCap: [{maxImpressions: 0, timeUnitType: '', timeUnitsCount: 0}],
roadblockingType: ''
},
description: '',
displayName: '',
estimatedGrossSpend: {currencyCode: '', nanos: 0, units: ''},
flightEndTime: '',
flightStartTime: '',
name: '',
preferredDealTerms: {fixedPrice: {amount: {}, type: ''}},
privateAuctionTerms: {floorPrice: {}, openAuctionAllowed: false},
programmaticGuaranteedTerms: {
fixedPrice: {},
guaranteedLooks: '',
impressionCap: '',
minimumDailyLooks: '',
percentShareOfVoice: '',
reservationType: ''
},
proposalRevision: '',
publisherProfile: '',
sellerTimeZone: {id: '', version: ''},
targeting: {
daypartTargeting: {
dayParts: [
{
dayOfWeek: '',
endTime: {hours: 0, minutes: 0, nanos: 0, seconds: 0},
startTime: {}
}
],
timeZoneType: ''
},
geoTargeting: {excludedCriteriaIds: [], targetedCriteriaIds: []},
inventorySizeTargeting: {
excludedInventorySizes: [{height: '', type: '', width: ''}],
targetedInventorySizes: [{}]
},
inventoryTypeTargeting: {inventoryTypes: []},
placementTargeting: {
mobileApplicationTargeting: {firstPartyTargeting: {excludedAppIds: [], targetedAppIds: []}},
uriTargeting: {excludedUris: [], targetedUris: []}
},
technologyTargeting: {
deviceCapabilityTargeting: {},
deviceCategoryTargeting: {},
operatingSystemTargeting: {operatingSystemCriteria: {}, operatingSystemVersionCriteria: {}}
},
userListTargeting: {},
videoTargeting: {excludedPositionTypes: [], targetedPositionTypes: []}
},
updateTime: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/:name';
const options = {
method: 'PATCH',
headers: {'content-type': 'application/json'},
body: '{"billedBuyer":"","buyer":"","client":"","createTime":"","creativeRequirements":{"creativeFormat":"","creativePreApprovalPolicy":"","creativeSafeFrameCompatibility":"","maxAdDurationMs":"","programmaticCreativeSource":"","skippableAdType":""},"dealType":"","deliveryControl":{"companionDeliveryType":"","creativeRotationType":"","deliveryRateType":"","frequencyCap":[{"maxImpressions":0,"timeUnitType":"","timeUnitsCount":0}],"roadblockingType":""},"description":"","displayName":"","estimatedGrossSpend":{"currencyCode":"","nanos":0,"units":""},"flightEndTime":"","flightStartTime":"","name":"","preferredDealTerms":{"fixedPrice":{"amount":{},"type":""}},"privateAuctionTerms":{"floorPrice":{},"openAuctionAllowed":false},"programmaticGuaranteedTerms":{"fixedPrice":{},"guaranteedLooks":"","impressionCap":"","minimumDailyLooks":"","percentShareOfVoice":"","reservationType":""},"proposalRevision":"","publisherProfile":"","sellerTimeZone":{"id":"","version":""},"targeting":{"daypartTargeting":{"dayParts":[{"dayOfWeek":"","endTime":{"hours":0,"minutes":0,"nanos":0,"seconds":0},"startTime":{}}],"timeZoneType":""},"geoTargeting":{"excludedCriteriaIds":[],"targetedCriteriaIds":[]},"inventorySizeTargeting":{"excludedInventorySizes":[{"height":"","type":"","width":""}],"targetedInventorySizes":[{}]},"inventoryTypeTargeting":{"inventoryTypes":[]},"placementTargeting":{"mobileApplicationTargeting":{"firstPartyTargeting":{"excludedAppIds":[],"targetedAppIds":[]}},"uriTargeting":{"excludedUris":[],"targetedUris":[]}},"technologyTargeting":{"deviceCapabilityTargeting":{},"deviceCategoryTargeting":{},"operatingSystemTargeting":{"operatingSystemCriteria":{},"operatingSystemVersionCriteria":{}}},"userListTargeting":{},"videoTargeting":{"excludedPositionTypes":[],"targetedPositionTypes":[]}},"updateTime":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1/:name',
method: 'PATCH',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "billedBuyer": "",\n "buyer": "",\n "client": "",\n "createTime": "",\n "creativeRequirements": {\n "creativeFormat": "",\n "creativePreApprovalPolicy": "",\n "creativeSafeFrameCompatibility": "",\n "maxAdDurationMs": "",\n "programmaticCreativeSource": "",\n "skippableAdType": ""\n },\n "dealType": "",\n "deliveryControl": {\n "companionDeliveryType": "",\n "creativeRotationType": "",\n "deliveryRateType": "",\n "frequencyCap": [\n {\n "maxImpressions": 0,\n "timeUnitType": "",\n "timeUnitsCount": 0\n }\n ],\n "roadblockingType": ""\n },\n "description": "",\n "displayName": "",\n "estimatedGrossSpend": {\n "currencyCode": "",\n "nanos": 0,\n "units": ""\n },\n "flightEndTime": "",\n "flightStartTime": "",\n "name": "",\n "preferredDealTerms": {\n "fixedPrice": {\n "amount": {},\n "type": ""\n }\n },\n "privateAuctionTerms": {\n "floorPrice": {},\n "openAuctionAllowed": false\n },\n "programmaticGuaranteedTerms": {\n "fixedPrice": {},\n "guaranteedLooks": "",\n "impressionCap": "",\n "minimumDailyLooks": "",\n "percentShareOfVoice": "",\n "reservationType": ""\n },\n "proposalRevision": "",\n "publisherProfile": "",\n "sellerTimeZone": {\n "id": "",\n "version": ""\n },\n "targeting": {\n "daypartTargeting": {\n "dayParts": [\n {\n "dayOfWeek": "",\n "endTime": {\n "hours": 0,\n "minutes": 0,\n "nanos": 0,\n "seconds": 0\n },\n "startTime": {}\n }\n ],\n "timeZoneType": ""\n },\n "geoTargeting": {\n "excludedCriteriaIds": [],\n "targetedCriteriaIds": []\n },\n "inventorySizeTargeting": {\n "excludedInventorySizes": [\n {\n "height": "",\n "type": "",\n "width": ""\n }\n ],\n "targetedInventorySizes": [\n {}\n ]\n },\n "inventoryTypeTargeting": {\n "inventoryTypes": []\n },\n "placementTargeting": {\n "mobileApplicationTargeting": {\n "firstPartyTargeting": {\n "excludedAppIds": [],\n "targetedAppIds": []\n }\n },\n "uriTargeting": {\n "excludedUris": [],\n "targetedUris": []\n }\n },\n "technologyTargeting": {\n "deviceCapabilityTargeting": {},\n "deviceCategoryTargeting": {},\n "operatingSystemTargeting": {\n "operatingSystemCriteria": {},\n "operatingSystemVersionCriteria": {}\n }\n },\n "userListTargeting": {},\n "videoTargeting": {\n "excludedPositionTypes": [],\n "targetedPositionTypes": []\n }\n },\n "updateTime": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"billedBuyer\": \"\",\n \"buyer\": \"\",\n \"client\": \"\",\n \"createTime\": \"\",\n \"creativeRequirements\": {\n \"creativeFormat\": \"\",\n \"creativePreApprovalPolicy\": \"\",\n \"creativeSafeFrameCompatibility\": \"\",\n \"maxAdDurationMs\": \"\",\n \"programmaticCreativeSource\": \"\",\n \"skippableAdType\": \"\"\n },\n \"dealType\": \"\",\n \"deliveryControl\": {\n \"companionDeliveryType\": \"\",\n \"creativeRotationType\": \"\",\n \"deliveryRateType\": \"\",\n \"frequencyCap\": [\n {\n \"maxImpressions\": 0,\n \"timeUnitType\": \"\",\n \"timeUnitsCount\": 0\n }\n ],\n \"roadblockingType\": \"\"\n },\n \"description\": \"\",\n \"displayName\": \"\",\n \"estimatedGrossSpend\": {\n \"currencyCode\": \"\",\n \"nanos\": 0,\n \"units\": \"\"\n },\n \"flightEndTime\": \"\",\n \"flightStartTime\": \"\",\n \"name\": \"\",\n \"preferredDealTerms\": {\n \"fixedPrice\": {\n \"amount\": {},\n \"type\": \"\"\n }\n },\n \"privateAuctionTerms\": {\n \"floorPrice\": {},\n \"openAuctionAllowed\": false\n },\n \"programmaticGuaranteedTerms\": {\n \"fixedPrice\": {},\n \"guaranteedLooks\": \"\",\n \"impressionCap\": \"\",\n \"minimumDailyLooks\": \"\",\n \"percentShareOfVoice\": \"\",\n \"reservationType\": \"\"\n },\n \"proposalRevision\": \"\",\n \"publisherProfile\": \"\",\n \"sellerTimeZone\": {\n \"id\": \"\",\n \"version\": \"\"\n },\n \"targeting\": {\n \"daypartTargeting\": {\n \"dayParts\": [\n {\n \"dayOfWeek\": \"\",\n \"endTime\": {\n \"hours\": 0,\n \"minutes\": 0,\n \"nanos\": 0,\n \"seconds\": 0\n },\n \"startTime\": {}\n }\n ],\n \"timeZoneType\": \"\"\n },\n \"geoTargeting\": {\n \"excludedCriteriaIds\": [],\n \"targetedCriteriaIds\": []\n },\n \"inventorySizeTargeting\": {\n \"excludedInventorySizes\": [\n {\n \"height\": \"\",\n \"type\": \"\",\n \"width\": \"\"\n }\n ],\n \"targetedInventorySizes\": [\n {}\n ]\n },\n \"inventoryTypeTargeting\": {\n \"inventoryTypes\": []\n },\n \"placementTargeting\": {\n \"mobileApplicationTargeting\": {\n \"firstPartyTargeting\": {\n \"excludedAppIds\": [],\n \"targetedAppIds\": []\n }\n },\n \"uriTargeting\": {\n \"excludedUris\": [],\n \"targetedUris\": []\n }\n },\n \"technologyTargeting\": {\n \"deviceCapabilityTargeting\": {},\n \"deviceCategoryTargeting\": {},\n \"operatingSystemTargeting\": {\n \"operatingSystemCriteria\": {},\n \"operatingSystemVersionCriteria\": {}\n }\n },\n \"userListTargeting\": {},\n \"videoTargeting\": {\n \"excludedPositionTypes\": [],\n \"targetedPositionTypes\": []\n }\n },\n \"updateTime\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v1/:name")
.patch(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PATCH',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/:name',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
billedBuyer: '',
buyer: '',
client: '',
createTime: '',
creativeRequirements: {
creativeFormat: '',
creativePreApprovalPolicy: '',
creativeSafeFrameCompatibility: '',
maxAdDurationMs: '',
programmaticCreativeSource: '',
skippableAdType: ''
},
dealType: '',
deliveryControl: {
companionDeliveryType: '',
creativeRotationType: '',
deliveryRateType: '',
frequencyCap: [{maxImpressions: 0, timeUnitType: '', timeUnitsCount: 0}],
roadblockingType: ''
},
description: '',
displayName: '',
estimatedGrossSpend: {currencyCode: '', nanos: 0, units: ''},
flightEndTime: '',
flightStartTime: '',
name: '',
preferredDealTerms: {fixedPrice: {amount: {}, type: ''}},
privateAuctionTerms: {floorPrice: {}, openAuctionAllowed: false},
programmaticGuaranteedTerms: {
fixedPrice: {},
guaranteedLooks: '',
impressionCap: '',
minimumDailyLooks: '',
percentShareOfVoice: '',
reservationType: ''
},
proposalRevision: '',
publisherProfile: '',
sellerTimeZone: {id: '', version: ''},
targeting: {
daypartTargeting: {
dayParts: [
{
dayOfWeek: '',
endTime: {hours: 0, minutes: 0, nanos: 0, seconds: 0},
startTime: {}
}
],
timeZoneType: ''
},
geoTargeting: {excludedCriteriaIds: [], targetedCriteriaIds: []},
inventorySizeTargeting: {
excludedInventorySizes: [{height: '', type: '', width: ''}],
targetedInventorySizes: [{}]
},
inventoryTypeTargeting: {inventoryTypes: []},
placementTargeting: {
mobileApplicationTargeting: {firstPartyTargeting: {excludedAppIds: [], targetedAppIds: []}},
uriTargeting: {excludedUris: [], targetedUris: []}
},
technologyTargeting: {
deviceCapabilityTargeting: {},
deviceCategoryTargeting: {},
operatingSystemTargeting: {operatingSystemCriteria: {}, operatingSystemVersionCriteria: {}}
},
userListTargeting: {},
videoTargeting: {excludedPositionTypes: [], targetedPositionTypes: []}
},
updateTime: ''
}));
req.end();
const request = require('request');
const options = {
method: 'PATCH',
url: '{{baseUrl}}/v1/:name',
headers: {'content-type': 'application/json'},
body: {
billedBuyer: '',
buyer: '',
client: '',
createTime: '',
creativeRequirements: {
creativeFormat: '',
creativePreApprovalPolicy: '',
creativeSafeFrameCompatibility: '',
maxAdDurationMs: '',
programmaticCreativeSource: '',
skippableAdType: ''
},
dealType: '',
deliveryControl: {
companionDeliveryType: '',
creativeRotationType: '',
deliveryRateType: '',
frequencyCap: [{maxImpressions: 0, timeUnitType: '', timeUnitsCount: 0}],
roadblockingType: ''
},
description: '',
displayName: '',
estimatedGrossSpend: {currencyCode: '', nanos: 0, units: ''},
flightEndTime: '',
flightStartTime: '',
name: '',
preferredDealTerms: {fixedPrice: {amount: {}, type: ''}},
privateAuctionTerms: {floorPrice: {}, openAuctionAllowed: false},
programmaticGuaranteedTerms: {
fixedPrice: {},
guaranteedLooks: '',
impressionCap: '',
minimumDailyLooks: '',
percentShareOfVoice: '',
reservationType: ''
},
proposalRevision: '',
publisherProfile: '',
sellerTimeZone: {id: '', version: ''},
targeting: {
daypartTargeting: {
dayParts: [
{
dayOfWeek: '',
endTime: {hours: 0, minutes: 0, nanos: 0, seconds: 0},
startTime: {}
}
],
timeZoneType: ''
},
geoTargeting: {excludedCriteriaIds: [], targetedCriteriaIds: []},
inventorySizeTargeting: {
excludedInventorySizes: [{height: '', type: '', width: ''}],
targetedInventorySizes: [{}]
},
inventoryTypeTargeting: {inventoryTypes: []},
placementTargeting: {
mobileApplicationTargeting: {firstPartyTargeting: {excludedAppIds: [], targetedAppIds: []}},
uriTargeting: {excludedUris: [], targetedUris: []}
},
technologyTargeting: {
deviceCapabilityTargeting: {},
deviceCategoryTargeting: {},
operatingSystemTargeting: {operatingSystemCriteria: {}, operatingSystemVersionCriteria: {}}
},
userListTargeting: {},
videoTargeting: {excludedPositionTypes: [], targetedPositionTypes: []}
},
updateTime: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PATCH', '{{baseUrl}}/v1/:name');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
billedBuyer: '',
buyer: '',
client: '',
createTime: '',
creativeRequirements: {
creativeFormat: '',
creativePreApprovalPolicy: '',
creativeSafeFrameCompatibility: '',
maxAdDurationMs: '',
programmaticCreativeSource: '',
skippableAdType: ''
},
dealType: '',
deliveryControl: {
companionDeliveryType: '',
creativeRotationType: '',
deliveryRateType: '',
frequencyCap: [
{
maxImpressions: 0,
timeUnitType: '',
timeUnitsCount: 0
}
],
roadblockingType: ''
},
description: '',
displayName: '',
estimatedGrossSpend: {
currencyCode: '',
nanos: 0,
units: ''
},
flightEndTime: '',
flightStartTime: '',
name: '',
preferredDealTerms: {
fixedPrice: {
amount: {},
type: ''
}
},
privateAuctionTerms: {
floorPrice: {},
openAuctionAllowed: false
},
programmaticGuaranteedTerms: {
fixedPrice: {},
guaranteedLooks: '',
impressionCap: '',
minimumDailyLooks: '',
percentShareOfVoice: '',
reservationType: ''
},
proposalRevision: '',
publisherProfile: '',
sellerTimeZone: {
id: '',
version: ''
},
targeting: {
daypartTargeting: {
dayParts: [
{
dayOfWeek: '',
endTime: {
hours: 0,
minutes: 0,
nanos: 0,
seconds: 0
},
startTime: {}
}
],
timeZoneType: ''
},
geoTargeting: {
excludedCriteriaIds: [],
targetedCriteriaIds: []
},
inventorySizeTargeting: {
excludedInventorySizes: [
{
height: '',
type: '',
width: ''
}
],
targetedInventorySizes: [
{}
]
},
inventoryTypeTargeting: {
inventoryTypes: []
},
placementTargeting: {
mobileApplicationTargeting: {
firstPartyTargeting: {
excludedAppIds: [],
targetedAppIds: []
}
},
uriTargeting: {
excludedUris: [],
targetedUris: []
}
},
technologyTargeting: {
deviceCapabilityTargeting: {},
deviceCategoryTargeting: {},
operatingSystemTargeting: {
operatingSystemCriteria: {},
operatingSystemVersionCriteria: {}
}
},
userListTargeting: {},
videoTargeting: {
excludedPositionTypes: [],
targetedPositionTypes: []
}
},
updateTime: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PATCH',
url: '{{baseUrl}}/v1/:name',
headers: {'content-type': 'application/json'},
data: {
billedBuyer: '',
buyer: '',
client: '',
createTime: '',
creativeRequirements: {
creativeFormat: '',
creativePreApprovalPolicy: '',
creativeSafeFrameCompatibility: '',
maxAdDurationMs: '',
programmaticCreativeSource: '',
skippableAdType: ''
},
dealType: '',
deliveryControl: {
companionDeliveryType: '',
creativeRotationType: '',
deliveryRateType: '',
frequencyCap: [{maxImpressions: 0, timeUnitType: '', timeUnitsCount: 0}],
roadblockingType: ''
},
description: '',
displayName: '',
estimatedGrossSpend: {currencyCode: '', nanos: 0, units: ''},
flightEndTime: '',
flightStartTime: '',
name: '',
preferredDealTerms: {fixedPrice: {amount: {}, type: ''}},
privateAuctionTerms: {floorPrice: {}, openAuctionAllowed: false},
programmaticGuaranteedTerms: {
fixedPrice: {},
guaranteedLooks: '',
impressionCap: '',
minimumDailyLooks: '',
percentShareOfVoice: '',
reservationType: ''
},
proposalRevision: '',
publisherProfile: '',
sellerTimeZone: {id: '', version: ''},
targeting: {
daypartTargeting: {
dayParts: [
{
dayOfWeek: '',
endTime: {hours: 0, minutes: 0, nanos: 0, seconds: 0},
startTime: {}
}
],
timeZoneType: ''
},
geoTargeting: {excludedCriteriaIds: [], targetedCriteriaIds: []},
inventorySizeTargeting: {
excludedInventorySizes: [{height: '', type: '', width: ''}],
targetedInventorySizes: [{}]
},
inventoryTypeTargeting: {inventoryTypes: []},
placementTargeting: {
mobileApplicationTargeting: {firstPartyTargeting: {excludedAppIds: [], targetedAppIds: []}},
uriTargeting: {excludedUris: [], targetedUris: []}
},
technologyTargeting: {
deviceCapabilityTargeting: {},
deviceCategoryTargeting: {},
operatingSystemTargeting: {operatingSystemCriteria: {}, operatingSystemVersionCriteria: {}}
},
userListTargeting: {},
videoTargeting: {excludedPositionTypes: [], targetedPositionTypes: []}
},
updateTime: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/:name';
const options = {
method: 'PATCH',
headers: {'content-type': 'application/json'},
body: '{"billedBuyer":"","buyer":"","client":"","createTime":"","creativeRequirements":{"creativeFormat":"","creativePreApprovalPolicy":"","creativeSafeFrameCompatibility":"","maxAdDurationMs":"","programmaticCreativeSource":"","skippableAdType":""},"dealType":"","deliveryControl":{"companionDeliveryType":"","creativeRotationType":"","deliveryRateType":"","frequencyCap":[{"maxImpressions":0,"timeUnitType":"","timeUnitsCount":0}],"roadblockingType":""},"description":"","displayName":"","estimatedGrossSpend":{"currencyCode":"","nanos":0,"units":""},"flightEndTime":"","flightStartTime":"","name":"","preferredDealTerms":{"fixedPrice":{"amount":{},"type":""}},"privateAuctionTerms":{"floorPrice":{},"openAuctionAllowed":false},"programmaticGuaranteedTerms":{"fixedPrice":{},"guaranteedLooks":"","impressionCap":"","minimumDailyLooks":"","percentShareOfVoice":"","reservationType":""},"proposalRevision":"","publisherProfile":"","sellerTimeZone":{"id":"","version":""},"targeting":{"daypartTargeting":{"dayParts":[{"dayOfWeek":"","endTime":{"hours":0,"minutes":0,"nanos":0,"seconds":0},"startTime":{}}],"timeZoneType":""},"geoTargeting":{"excludedCriteriaIds":[],"targetedCriteriaIds":[]},"inventorySizeTargeting":{"excludedInventorySizes":[{"height":"","type":"","width":""}],"targetedInventorySizes":[{}]},"inventoryTypeTargeting":{"inventoryTypes":[]},"placementTargeting":{"mobileApplicationTargeting":{"firstPartyTargeting":{"excludedAppIds":[],"targetedAppIds":[]}},"uriTargeting":{"excludedUris":[],"targetedUris":[]}},"technologyTargeting":{"deviceCapabilityTargeting":{},"deviceCategoryTargeting":{},"operatingSystemTargeting":{"operatingSystemCriteria":{},"operatingSystemVersionCriteria":{}}},"userListTargeting":{},"videoTargeting":{"excludedPositionTypes":[],"targetedPositionTypes":[]}},"updateTime":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"billedBuyer": @"",
@"buyer": @"",
@"client": @"",
@"createTime": @"",
@"creativeRequirements": @{ @"creativeFormat": @"", @"creativePreApprovalPolicy": @"", @"creativeSafeFrameCompatibility": @"", @"maxAdDurationMs": @"", @"programmaticCreativeSource": @"", @"skippableAdType": @"" },
@"dealType": @"",
@"deliveryControl": @{ @"companionDeliveryType": @"", @"creativeRotationType": @"", @"deliveryRateType": @"", @"frequencyCap": @[ @{ @"maxImpressions": @0, @"timeUnitType": @"", @"timeUnitsCount": @0 } ], @"roadblockingType": @"" },
@"description": @"",
@"displayName": @"",
@"estimatedGrossSpend": @{ @"currencyCode": @"", @"nanos": @0, @"units": @"" },
@"flightEndTime": @"",
@"flightStartTime": @"",
@"name": @"",
@"preferredDealTerms": @{ @"fixedPrice": @{ @"amount": @{ }, @"type": @"" } },
@"privateAuctionTerms": @{ @"floorPrice": @{ }, @"openAuctionAllowed": @NO },
@"programmaticGuaranteedTerms": @{ @"fixedPrice": @{ }, @"guaranteedLooks": @"", @"impressionCap": @"", @"minimumDailyLooks": @"", @"percentShareOfVoice": @"", @"reservationType": @"" },
@"proposalRevision": @"",
@"publisherProfile": @"",
@"sellerTimeZone": @{ @"id": @"", @"version": @"" },
@"targeting": @{ @"daypartTargeting": @{ @"dayParts": @[ @{ @"dayOfWeek": @"", @"endTime": @{ @"hours": @0, @"minutes": @0, @"nanos": @0, @"seconds": @0 }, @"startTime": @{ } } ], @"timeZoneType": @"" }, @"geoTargeting": @{ @"excludedCriteriaIds": @[ ], @"targetedCriteriaIds": @[ ] }, @"inventorySizeTargeting": @{ @"excludedInventorySizes": @[ @{ @"height": @"", @"type": @"", @"width": @"" } ], @"targetedInventorySizes": @[ @{ } ] }, @"inventoryTypeTargeting": @{ @"inventoryTypes": @[ ] }, @"placementTargeting": @{ @"mobileApplicationTargeting": @{ @"firstPartyTargeting": @{ @"excludedAppIds": @[ ], @"targetedAppIds": @[ ] } }, @"uriTargeting": @{ @"excludedUris": @[ ], @"targetedUris": @[ ] } }, @"technologyTargeting": @{ @"deviceCapabilityTargeting": @{ }, @"deviceCategoryTargeting": @{ }, @"operatingSystemTargeting": @{ @"operatingSystemCriteria": @{ }, @"operatingSystemVersionCriteria": @{ } } }, @"userListTargeting": @{ }, @"videoTargeting": @{ @"excludedPositionTypes": @[ ], @"targetedPositionTypes": @[ ] } },
@"updateTime": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/:name"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PATCH"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1/:name" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"billedBuyer\": \"\",\n \"buyer\": \"\",\n \"client\": \"\",\n \"createTime\": \"\",\n \"creativeRequirements\": {\n \"creativeFormat\": \"\",\n \"creativePreApprovalPolicy\": \"\",\n \"creativeSafeFrameCompatibility\": \"\",\n \"maxAdDurationMs\": \"\",\n \"programmaticCreativeSource\": \"\",\n \"skippableAdType\": \"\"\n },\n \"dealType\": \"\",\n \"deliveryControl\": {\n \"companionDeliveryType\": \"\",\n \"creativeRotationType\": \"\",\n \"deliveryRateType\": \"\",\n \"frequencyCap\": [\n {\n \"maxImpressions\": 0,\n \"timeUnitType\": \"\",\n \"timeUnitsCount\": 0\n }\n ],\n \"roadblockingType\": \"\"\n },\n \"description\": \"\",\n \"displayName\": \"\",\n \"estimatedGrossSpend\": {\n \"currencyCode\": \"\",\n \"nanos\": 0,\n \"units\": \"\"\n },\n \"flightEndTime\": \"\",\n \"flightStartTime\": \"\",\n \"name\": \"\",\n \"preferredDealTerms\": {\n \"fixedPrice\": {\n \"amount\": {},\n \"type\": \"\"\n }\n },\n \"privateAuctionTerms\": {\n \"floorPrice\": {},\n \"openAuctionAllowed\": false\n },\n \"programmaticGuaranteedTerms\": {\n \"fixedPrice\": {},\n \"guaranteedLooks\": \"\",\n \"impressionCap\": \"\",\n \"minimumDailyLooks\": \"\",\n \"percentShareOfVoice\": \"\",\n \"reservationType\": \"\"\n },\n \"proposalRevision\": \"\",\n \"publisherProfile\": \"\",\n \"sellerTimeZone\": {\n \"id\": \"\",\n \"version\": \"\"\n },\n \"targeting\": {\n \"daypartTargeting\": {\n \"dayParts\": [\n {\n \"dayOfWeek\": \"\",\n \"endTime\": {\n \"hours\": 0,\n \"minutes\": 0,\n \"nanos\": 0,\n \"seconds\": 0\n },\n \"startTime\": {}\n }\n ],\n \"timeZoneType\": \"\"\n },\n \"geoTargeting\": {\n \"excludedCriteriaIds\": [],\n \"targetedCriteriaIds\": []\n },\n \"inventorySizeTargeting\": {\n \"excludedInventorySizes\": [\n {\n \"height\": \"\",\n \"type\": \"\",\n \"width\": \"\"\n }\n ],\n \"targetedInventorySizes\": [\n {}\n ]\n },\n \"inventoryTypeTargeting\": {\n \"inventoryTypes\": []\n },\n \"placementTargeting\": {\n \"mobileApplicationTargeting\": {\n \"firstPartyTargeting\": {\n \"excludedAppIds\": [],\n \"targetedAppIds\": []\n }\n },\n \"uriTargeting\": {\n \"excludedUris\": [],\n \"targetedUris\": []\n }\n },\n \"technologyTargeting\": {\n \"deviceCapabilityTargeting\": {},\n \"deviceCategoryTargeting\": {},\n \"operatingSystemTargeting\": {\n \"operatingSystemCriteria\": {},\n \"operatingSystemVersionCriteria\": {}\n }\n },\n \"userListTargeting\": {},\n \"videoTargeting\": {\n \"excludedPositionTypes\": [],\n \"targetedPositionTypes\": []\n }\n },\n \"updateTime\": \"\"\n}" in
Client.call ~headers ~body `PATCH uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/:name",
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([
'billedBuyer' => '',
'buyer' => '',
'client' => '',
'createTime' => '',
'creativeRequirements' => [
'creativeFormat' => '',
'creativePreApprovalPolicy' => '',
'creativeSafeFrameCompatibility' => '',
'maxAdDurationMs' => '',
'programmaticCreativeSource' => '',
'skippableAdType' => ''
],
'dealType' => '',
'deliveryControl' => [
'companionDeliveryType' => '',
'creativeRotationType' => '',
'deliveryRateType' => '',
'frequencyCap' => [
[
'maxImpressions' => 0,
'timeUnitType' => '',
'timeUnitsCount' => 0
]
],
'roadblockingType' => ''
],
'description' => '',
'displayName' => '',
'estimatedGrossSpend' => [
'currencyCode' => '',
'nanos' => 0,
'units' => ''
],
'flightEndTime' => '',
'flightStartTime' => '',
'name' => '',
'preferredDealTerms' => [
'fixedPrice' => [
'amount' => [
],
'type' => ''
]
],
'privateAuctionTerms' => [
'floorPrice' => [
],
'openAuctionAllowed' => null
],
'programmaticGuaranteedTerms' => [
'fixedPrice' => [
],
'guaranteedLooks' => '',
'impressionCap' => '',
'minimumDailyLooks' => '',
'percentShareOfVoice' => '',
'reservationType' => ''
],
'proposalRevision' => '',
'publisherProfile' => '',
'sellerTimeZone' => [
'id' => '',
'version' => ''
],
'targeting' => [
'daypartTargeting' => [
'dayParts' => [
[
'dayOfWeek' => '',
'endTime' => [
'hours' => 0,
'minutes' => 0,
'nanos' => 0,
'seconds' => 0
],
'startTime' => [
]
]
],
'timeZoneType' => ''
],
'geoTargeting' => [
'excludedCriteriaIds' => [
],
'targetedCriteriaIds' => [
]
],
'inventorySizeTargeting' => [
'excludedInventorySizes' => [
[
'height' => '',
'type' => '',
'width' => ''
]
],
'targetedInventorySizes' => [
[
]
]
],
'inventoryTypeTargeting' => [
'inventoryTypes' => [
]
],
'placementTargeting' => [
'mobileApplicationTargeting' => [
'firstPartyTargeting' => [
'excludedAppIds' => [
],
'targetedAppIds' => [
]
]
],
'uriTargeting' => [
'excludedUris' => [
],
'targetedUris' => [
]
]
],
'technologyTargeting' => [
'deviceCapabilityTargeting' => [
],
'deviceCategoryTargeting' => [
],
'operatingSystemTargeting' => [
'operatingSystemCriteria' => [
],
'operatingSystemVersionCriteria' => [
]
]
],
'userListTargeting' => [
],
'videoTargeting' => [
'excludedPositionTypes' => [
],
'targetedPositionTypes' => [
]
]
],
'updateTime' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('PATCH', '{{baseUrl}}/v1/:name', [
'body' => '{
"billedBuyer": "",
"buyer": "",
"client": "",
"createTime": "",
"creativeRequirements": {
"creativeFormat": "",
"creativePreApprovalPolicy": "",
"creativeSafeFrameCompatibility": "",
"maxAdDurationMs": "",
"programmaticCreativeSource": "",
"skippableAdType": ""
},
"dealType": "",
"deliveryControl": {
"companionDeliveryType": "",
"creativeRotationType": "",
"deliveryRateType": "",
"frequencyCap": [
{
"maxImpressions": 0,
"timeUnitType": "",
"timeUnitsCount": 0
}
],
"roadblockingType": ""
},
"description": "",
"displayName": "",
"estimatedGrossSpend": {
"currencyCode": "",
"nanos": 0,
"units": ""
},
"flightEndTime": "",
"flightStartTime": "",
"name": "",
"preferredDealTerms": {
"fixedPrice": {
"amount": {},
"type": ""
}
},
"privateAuctionTerms": {
"floorPrice": {},
"openAuctionAllowed": false
},
"programmaticGuaranteedTerms": {
"fixedPrice": {},
"guaranteedLooks": "",
"impressionCap": "",
"minimumDailyLooks": "",
"percentShareOfVoice": "",
"reservationType": ""
},
"proposalRevision": "",
"publisherProfile": "",
"sellerTimeZone": {
"id": "",
"version": ""
},
"targeting": {
"daypartTargeting": {
"dayParts": [
{
"dayOfWeek": "",
"endTime": {
"hours": 0,
"minutes": 0,
"nanos": 0,
"seconds": 0
},
"startTime": {}
}
],
"timeZoneType": ""
},
"geoTargeting": {
"excludedCriteriaIds": [],
"targetedCriteriaIds": []
},
"inventorySizeTargeting": {
"excludedInventorySizes": [
{
"height": "",
"type": "",
"width": ""
}
],
"targetedInventorySizes": [
{}
]
},
"inventoryTypeTargeting": {
"inventoryTypes": []
},
"placementTargeting": {
"mobileApplicationTargeting": {
"firstPartyTargeting": {
"excludedAppIds": [],
"targetedAppIds": []
}
},
"uriTargeting": {
"excludedUris": [],
"targetedUris": []
}
},
"technologyTargeting": {
"deviceCapabilityTargeting": {},
"deviceCategoryTargeting": {},
"operatingSystemTargeting": {
"operatingSystemCriteria": {},
"operatingSystemVersionCriteria": {}
}
},
"userListTargeting": {},
"videoTargeting": {
"excludedPositionTypes": [],
"targetedPositionTypes": []
}
},
"updateTime": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1/:name');
$request->setMethod(HttpRequest::HTTP_METH_PATCH);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'billedBuyer' => '',
'buyer' => '',
'client' => '',
'createTime' => '',
'creativeRequirements' => [
'creativeFormat' => '',
'creativePreApprovalPolicy' => '',
'creativeSafeFrameCompatibility' => '',
'maxAdDurationMs' => '',
'programmaticCreativeSource' => '',
'skippableAdType' => ''
],
'dealType' => '',
'deliveryControl' => [
'companionDeliveryType' => '',
'creativeRotationType' => '',
'deliveryRateType' => '',
'frequencyCap' => [
[
'maxImpressions' => 0,
'timeUnitType' => '',
'timeUnitsCount' => 0
]
],
'roadblockingType' => ''
],
'description' => '',
'displayName' => '',
'estimatedGrossSpend' => [
'currencyCode' => '',
'nanos' => 0,
'units' => ''
],
'flightEndTime' => '',
'flightStartTime' => '',
'name' => '',
'preferredDealTerms' => [
'fixedPrice' => [
'amount' => [
],
'type' => ''
]
],
'privateAuctionTerms' => [
'floorPrice' => [
],
'openAuctionAllowed' => null
],
'programmaticGuaranteedTerms' => [
'fixedPrice' => [
],
'guaranteedLooks' => '',
'impressionCap' => '',
'minimumDailyLooks' => '',
'percentShareOfVoice' => '',
'reservationType' => ''
],
'proposalRevision' => '',
'publisherProfile' => '',
'sellerTimeZone' => [
'id' => '',
'version' => ''
],
'targeting' => [
'daypartTargeting' => [
'dayParts' => [
[
'dayOfWeek' => '',
'endTime' => [
'hours' => 0,
'minutes' => 0,
'nanos' => 0,
'seconds' => 0
],
'startTime' => [
]
]
],
'timeZoneType' => ''
],
'geoTargeting' => [
'excludedCriteriaIds' => [
],
'targetedCriteriaIds' => [
]
],
'inventorySizeTargeting' => [
'excludedInventorySizes' => [
[
'height' => '',
'type' => '',
'width' => ''
]
],
'targetedInventorySizes' => [
[
]
]
],
'inventoryTypeTargeting' => [
'inventoryTypes' => [
]
],
'placementTargeting' => [
'mobileApplicationTargeting' => [
'firstPartyTargeting' => [
'excludedAppIds' => [
],
'targetedAppIds' => [
]
]
],
'uriTargeting' => [
'excludedUris' => [
],
'targetedUris' => [
]
]
],
'technologyTargeting' => [
'deviceCapabilityTargeting' => [
],
'deviceCategoryTargeting' => [
],
'operatingSystemTargeting' => [
'operatingSystemCriteria' => [
],
'operatingSystemVersionCriteria' => [
]
]
],
'userListTargeting' => [
],
'videoTargeting' => [
'excludedPositionTypes' => [
],
'targetedPositionTypes' => [
]
]
],
'updateTime' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'billedBuyer' => '',
'buyer' => '',
'client' => '',
'createTime' => '',
'creativeRequirements' => [
'creativeFormat' => '',
'creativePreApprovalPolicy' => '',
'creativeSafeFrameCompatibility' => '',
'maxAdDurationMs' => '',
'programmaticCreativeSource' => '',
'skippableAdType' => ''
],
'dealType' => '',
'deliveryControl' => [
'companionDeliveryType' => '',
'creativeRotationType' => '',
'deliveryRateType' => '',
'frequencyCap' => [
[
'maxImpressions' => 0,
'timeUnitType' => '',
'timeUnitsCount' => 0
]
],
'roadblockingType' => ''
],
'description' => '',
'displayName' => '',
'estimatedGrossSpend' => [
'currencyCode' => '',
'nanos' => 0,
'units' => ''
],
'flightEndTime' => '',
'flightStartTime' => '',
'name' => '',
'preferredDealTerms' => [
'fixedPrice' => [
'amount' => [
],
'type' => ''
]
],
'privateAuctionTerms' => [
'floorPrice' => [
],
'openAuctionAllowed' => null
],
'programmaticGuaranteedTerms' => [
'fixedPrice' => [
],
'guaranteedLooks' => '',
'impressionCap' => '',
'minimumDailyLooks' => '',
'percentShareOfVoice' => '',
'reservationType' => ''
],
'proposalRevision' => '',
'publisherProfile' => '',
'sellerTimeZone' => [
'id' => '',
'version' => ''
],
'targeting' => [
'daypartTargeting' => [
'dayParts' => [
[
'dayOfWeek' => '',
'endTime' => [
'hours' => 0,
'minutes' => 0,
'nanos' => 0,
'seconds' => 0
],
'startTime' => [
]
]
],
'timeZoneType' => ''
],
'geoTargeting' => [
'excludedCriteriaIds' => [
],
'targetedCriteriaIds' => [
]
],
'inventorySizeTargeting' => [
'excludedInventorySizes' => [
[
'height' => '',
'type' => '',
'width' => ''
]
],
'targetedInventorySizes' => [
[
]
]
],
'inventoryTypeTargeting' => [
'inventoryTypes' => [
]
],
'placementTargeting' => [
'mobileApplicationTargeting' => [
'firstPartyTargeting' => [
'excludedAppIds' => [
],
'targetedAppIds' => [
]
]
],
'uriTargeting' => [
'excludedUris' => [
],
'targetedUris' => [
]
]
],
'technologyTargeting' => [
'deviceCapabilityTargeting' => [
],
'deviceCategoryTargeting' => [
],
'operatingSystemTargeting' => [
'operatingSystemCriteria' => [
],
'operatingSystemVersionCriteria' => [
]
]
],
'userListTargeting' => [
],
'videoTargeting' => [
'excludedPositionTypes' => [
],
'targetedPositionTypes' => [
]
]
],
'updateTime' => ''
]));
$request->setRequestUrl('{{baseUrl}}/v1/:name');
$request->setRequestMethod('PATCH');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/:name' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"billedBuyer": "",
"buyer": "",
"client": "",
"createTime": "",
"creativeRequirements": {
"creativeFormat": "",
"creativePreApprovalPolicy": "",
"creativeSafeFrameCompatibility": "",
"maxAdDurationMs": "",
"programmaticCreativeSource": "",
"skippableAdType": ""
},
"dealType": "",
"deliveryControl": {
"companionDeliveryType": "",
"creativeRotationType": "",
"deliveryRateType": "",
"frequencyCap": [
{
"maxImpressions": 0,
"timeUnitType": "",
"timeUnitsCount": 0
}
],
"roadblockingType": ""
},
"description": "",
"displayName": "",
"estimatedGrossSpend": {
"currencyCode": "",
"nanos": 0,
"units": ""
},
"flightEndTime": "",
"flightStartTime": "",
"name": "",
"preferredDealTerms": {
"fixedPrice": {
"amount": {},
"type": ""
}
},
"privateAuctionTerms": {
"floorPrice": {},
"openAuctionAllowed": false
},
"programmaticGuaranteedTerms": {
"fixedPrice": {},
"guaranteedLooks": "",
"impressionCap": "",
"minimumDailyLooks": "",
"percentShareOfVoice": "",
"reservationType": ""
},
"proposalRevision": "",
"publisherProfile": "",
"sellerTimeZone": {
"id": "",
"version": ""
},
"targeting": {
"daypartTargeting": {
"dayParts": [
{
"dayOfWeek": "",
"endTime": {
"hours": 0,
"minutes": 0,
"nanos": 0,
"seconds": 0
},
"startTime": {}
}
],
"timeZoneType": ""
},
"geoTargeting": {
"excludedCriteriaIds": [],
"targetedCriteriaIds": []
},
"inventorySizeTargeting": {
"excludedInventorySizes": [
{
"height": "",
"type": "",
"width": ""
}
],
"targetedInventorySizes": [
{}
]
},
"inventoryTypeTargeting": {
"inventoryTypes": []
},
"placementTargeting": {
"mobileApplicationTargeting": {
"firstPartyTargeting": {
"excludedAppIds": [],
"targetedAppIds": []
}
},
"uriTargeting": {
"excludedUris": [],
"targetedUris": []
}
},
"technologyTargeting": {
"deviceCapabilityTargeting": {},
"deviceCategoryTargeting": {},
"operatingSystemTargeting": {
"operatingSystemCriteria": {},
"operatingSystemVersionCriteria": {}
}
},
"userListTargeting": {},
"videoTargeting": {
"excludedPositionTypes": [],
"targetedPositionTypes": []
}
},
"updateTime": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/:name' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"billedBuyer": "",
"buyer": "",
"client": "",
"createTime": "",
"creativeRequirements": {
"creativeFormat": "",
"creativePreApprovalPolicy": "",
"creativeSafeFrameCompatibility": "",
"maxAdDurationMs": "",
"programmaticCreativeSource": "",
"skippableAdType": ""
},
"dealType": "",
"deliveryControl": {
"companionDeliveryType": "",
"creativeRotationType": "",
"deliveryRateType": "",
"frequencyCap": [
{
"maxImpressions": 0,
"timeUnitType": "",
"timeUnitsCount": 0
}
],
"roadblockingType": ""
},
"description": "",
"displayName": "",
"estimatedGrossSpend": {
"currencyCode": "",
"nanos": 0,
"units": ""
},
"flightEndTime": "",
"flightStartTime": "",
"name": "",
"preferredDealTerms": {
"fixedPrice": {
"amount": {},
"type": ""
}
},
"privateAuctionTerms": {
"floorPrice": {},
"openAuctionAllowed": false
},
"programmaticGuaranteedTerms": {
"fixedPrice": {},
"guaranteedLooks": "",
"impressionCap": "",
"minimumDailyLooks": "",
"percentShareOfVoice": "",
"reservationType": ""
},
"proposalRevision": "",
"publisherProfile": "",
"sellerTimeZone": {
"id": "",
"version": ""
},
"targeting": {
"daypartTargeting": {
"dayParts": [
{
"dayOfWeek": "",
"endTime": {
"hours": 0,
"minutes": 0,
"nanos": 0,
"seconds": 0
},
"startTime": {}
}
],
"timeZoneType": ""
},
"geoTargeting": {
"excludedCriteriaIds": [],
"targetedCriteriaIds": []
},
"inventorySizeTargeting": {
"excludedInventorySizes": [
{
"height": "",
"type": "",
"width": ""
}
],
"targetedInventorySizes": [
{}
]
},
"inventoryTypeTargeting": {
"inventoryTypes": []
},
"placementTargeting": {
"mobileApplicationTargeting": {
"firstPartyTargeting": {
"excludedAppIds": [],
"targetedAppIds": []
}
},
"uriTargeting": {
"excludedUris": [],
"targetedUris": []
}
},
"technologyTargeting": {
"deviceCapabilityTargeting": {},
"deviceCategoryTargeting": {},
"operatingSystemTargeting": {
"operatingSystemCriteria": {},
"operatingSystemVersionCriteria": {}
}
},
"userListTargeting": {},
"videoTargeting": {
"excludedPositionTypes": [],
"targetedPositionTypes": []
}
},
"updateTime": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"billedBuyer\": \"\",\n \"buyer\": \"\",\n \"client\": \"\",\n \"createTime\": \"\",\n \"creativeRequirements\": {\n \"creativeFormat\": \"\",\n \"creativePreApprovalPolicy\": \"\",\n \"creativeSafeFrameCompatibility\": \"\",\n \"maxAdDurationMs\": \"\",\n \"programmaticCreativeSource\": \"\",\n \"skippableAdType\": \"\"\n },\n \"dealType\": \"\",\n \"deliveryControl\": {\n \"companionDeliveryType\": \"\",\n \"creativeRotationType\": \"\",\n \"deliveryRateType\": \"\",\n \"frequencyCap\": [\n {\n \"maxImpressions\": 0,\n \"timeUnitType\": \"\",\n \"timeUnitsCount\": 0\n }\n ],\n \"roadblockingType\": \"\"\n },\n \"description\": \"\",\n \"displayName\": \"\",\n \"estimatedGrossSpend\": {\n \"currencyCode\": \"\",\n \"nanos\": 0,\n \"units\": \"\"\n },\n \"flightEndTime\": \"\",\n \"flightStartTime\": \"\",\n \"name\": \"\",\n \"preferredDealTerms\": {\n \"fixedPrice\": {\n \"amount\": {},\n \"type\": \"\"\n }\n },\n \"privateAuctionTerms\": {\n \"floorPrice\": {},\n \"openAuctionAllowed\": false\n },\n \"programmaticGuaranteedTerms\": {\n \"fixedPrice\": {},\n \"guaranteedLooks\": \"\",\n \"impressionCap\": \"\",\n \"minimumDailyLooks\": \"\",\n \"percentShareOfVoice\": \"\",\n \"reservationType\": \"\"\n },\n \"proposalRevision\": \"\",\n \"publisherProfile\": \"\",\n \"sellerTimeZone\": {\n \"id\": \"\",\n \"version\": \"\"\n },\n \"targeting\": {\n \"daypartTargeting\": {\n \"dayParts\": [\n {\n \"dayOfWeek\": \"\",\n \"endTime\": {\n \"hours\": 0,\n \"minutes\": 0,\n \"nanos\": 0,\n \"seconds\": 0\n },\n \"startTime\": {}\n }\n ],\n \"timeZoneType\": \"\"\n },\n \"geoTargeting\": {\n \"excludedCriteriaIds\": [],\n \"targetedCriteriaIds\": []\n },\n \"inventorySizeTargeting\": {\n \"excludedInventorySizes\": [\n {\n \"height\": \"\",\n \"type\": \"\",\n \"width\": \"\"\n }\n ],\n \"targetedInventorySizes\": [\n {}\n ]\n },\n \"inventoryTypeTargeting\": {\n \"inventoryTypes\": []\n },\n \"placementTargeting\": {\n \"mobileApplicationTargeting\": {\n \"firstPartyTargeting\": {\n \"excludedAppIds\": [],\n \"targetedAppIds\": []\n }\n },\n \"uriTargeting\": {\n \"excludedUris\": [],\n \"targetedUris\": []\n }\n },\n \"technologyTargeting\": {\n \"deviceCapabilityTargeting\": {},\n \"deviceCategoryTargeting\": {},\n \"operatingSystemTargeting\": {\n \"operatingSystemCriteria\": {},\n \"operatingSystemVersionCriteria\": {}\n }\n },\n \"userListTargeting\": {},\n \"videoTargeting\": {\n \"excludedPositionTypes\": [],\n \"targetedPositionTypes\": []\n }\n },\n \"updateTime\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("PATCH", "/baseUrl/v1/:name", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/:name"
payload = {
"billedBuyer": "",
"buyer": "",
"client": "",
"createTime": "",
"creativeRequirements": {
"creativeFormat": "",
"creativePreApprovalPolicy": "",
"creativeSafeFrameCompatibility": "",
"maxAdDurationMs": "",
"programmaticCreativeSource": "",
"skippableAdType": ""
},
"dealType": "",
"deliveryControl": {
"companionDeliveryType": "",
"creativeRotationType": "",
"deliveryRateType": "",
"frequencyCap": [
{
"maxImpressions": 0,
"timeUnitType": "",
"timeUnitsCount": 0
}
],
"roadblockingType": ""
},
"description": "",
"displayName": "",
"estimatedGrossSpend": {
"currencyCode": "",
"nanos": 0,
"units": ""
},
"flightEndTime": "",
"flightStartTime": "",
"name": "",
"preferredDealTerms": { "fixedPrice": {
"amount": {},
"type": ""
} },
"privateAuctionTerms": {
"floorPrice": {},
"openAuctionAllowed": False
},
"programmaticGuaranteedTerms": {
"fixedPrice": {},
"guaranteedLooks": "",
"impressionCap": "",
"minimumDailyLooks": "",
"percentShareOfVoice": "",
"reservationType": ""
},
"proposalRevision": "",
"publisherProfile": "",
"sellerTimeZone": {
"id": "",
"version": ""
},
"targeting": {
"daypartTargeting": {
"dayParts": [
{
"dayOfWeek": "",
"endTime": {
"hours": 0,
"minutes": 0,
"nanos": 0,
"seconds": 0
},
"startTime": {}
}
],
"timeZoneType": ""
},
"geoTargeting": {
"excludedCriteriaIds": [],
"targetedCriteriaIds": []
},
"inventorySizeTargeting": {
"excludedInventorySizes": [
{
"height": "",
"type": "",
"width": ""
}
],
"targetedInventorySizes": [{}]
},
"inventoryTypeTargeting": { "inventoryTypes": [] },
"placementTargeting": {
"mobileApplicationTargeting": { "firstPartyTargeting": {
"excludedAppIds": [],
"targetedAppIds": []
} },
"uriTargeting": {
"excludedUris": [],
"targetedUris": []
}
},
"technologyTargeting": {
"deviceCapabilityTargeting": {},
"deviceCategoryTargeting": {},
"operatingSystemTargeting": {
"operatingSystemCriteria": {},
"operatingSystemVersionCriteria": {}
}
},
"userListTargeting": {},
"videoTargeting": {
"excludedPositionTypes": [],
"targetedPositionTypes": []
}
},
"updateTime": ""
}
headers = {"content-type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/:name"
payload <- "{\n \"billedBuyer\": \"\",\n \"buyer\": \"\",\n \"client\": \"\",\n \"createTime\": \"\",\n \"creativeRequirements\": {\n \"creativeFormat\": \"\",\n \"creativePreApprovalPolicy\": \"\",\n \"creativeSafeFrameCompatibility\": \"\",\n \"maxAdDurationMs\": \"\",\n \"programmaticCreativeSource\": \"\",\n \"skippableAdType\": \"\"\n },\n \"dealType\": \"\",\n \"deliveryControl\": {\n \"companionDeliveryType\": \"\",\n \"creativeRotationType\": \"\",\n \"deliveryRateType\": \"\",\n \"frequencyCap\": [\n {\n \"maxImpressions\": 0,\n \"timeUnitType\": \"\",\n \"timeUnitsCount\": 0\n }\n ],\n \"roadblockingType\": \"\"\n },\n \"description\": \"\",\n \"displayName\": \"\",\n \"estimatedGrossSpend\": {\n \"currencyCode\": \"\",\n \"nanos\": 0,\n \"units\": \"\"\n },\n \"flightEndTime\": \"\",\n \"flightStartTime\": \"\",\n \"name\": \"\",\n \"preferredDealTerms\": {\n \"fixedPrice\": {\n \"amount\": {},\n \"type\": \"\"\n }\n },\n \"privateAuctionTerms\": {\n \"floorPrice\": {},\n \"openAuctionAllowed\": false\n },\n \"programmaticGuaranteedTerms\": {\n \"fixedPrice\": {},\n \"guaranteedLooks\": \"\",\n \"impressionCap\": \"\",\n \"minimumDailyLooks\": \"\",\n \"percentShareOfVoice\": \"\",\n \"reservationType\": \"\"\n },\n \"proposalRevision\": \"\",\n \"publisherProfile\": \"\",\n \"sellerTimeZone\": {\n \"id\": \"\",\n \"version\": \"\"\n },\n \"targeting\": {\n \"daypartTargeting\": {\n \"dayParts\": [\n {\n \"dayOfWeek\": \"\",\n \"endTime\": {\n \"hours\": 0,\n \"minutes\": 0,\n \"nanos\": 0,\n \"seconds\": 0\n },\n \"startTime\": {}\n }\n ],\n \"timeZoneType\": \"\"\n },\n \"geoTargeting\": {\n \"excludedCriteriaIds\": [],\n \"targetedCriteriaIds\": []\n },\n \"inventorySizeTargeting\": {\n \"excludedInventorySizes\": [\n {\n \"height\": \"\",\n \"type\": \"\",\n \"width\": \"\"\n }\n ],\n \"targetedInventorySizes\": [\n {}\n ]\n },\n \"inventoryTypeTargeting\": {\n \"inventoryTypes\": []\n },\n \"placementTargeting\": {\n \"mobileApplicationTargeting\": {\n \"firstPartyTargeting\": {\n \"excludedAppIds\": [],\n \"targetedAppIds\": []\n }\n },\n \"uriTargeting\": {\n \"excludedUris\": [],\n \"targetedUris\": []\n }\n },\n \"technologyTargeting\": {\n \"deviceCapabilityTargeting\": {},\n \"deviceCategoryTargeting\": {},\n \"operatingSystemTargeting\": {\n \"operatingSystemCriteria\": {},\n \"operatingSystemVersionCriteria\": {}\n }\n },\n \"userListTargeting\": {},\n \"videoTargeting\": {\n \"excludedPositionTypes\": [],\n \"targetedPositionTypes\": []\n }\n },\n \"updateTime\": \"\"\n}"
encode <- "json"
response <- VERB("PATCH", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/:name")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"billedBuyer\": \"\",\n \"buyer\": \"\",\n \"client\": \"\",\n \"createTime\": \"\",\n \"creativeRequirements\": {\n \"creativeFormat\": \"\",\n \"creativePreApprovalPolicy\": \"\",\n \"creativeSafeFrameCompatibility\": \"\",\n \"maxAdDurationMs\": \"\",\n \"programmaticCreativeSource\": \"\",\n \"skippableAdType\": \"\"\n },\n \"dealType\": \"\",\n \"deliveryControl\": {\n \"companionDeliveryType\": \"\",\n \"creativeRotationType\": \"\",\n \"deliveryRateType\": \"\",\n \"frequencyCap\": [\n {\n \"maxImpressions\": 0,\n \"timeUnitType\": \"\",\n \"timeUnitsCount\": 0\n }\n ],\n \"roadblockingType\": \"\"\n },\n \"description\": \"\",\n \"displayName\": \"\",\n \"estimatedGrossSpend\": {\n \"currencyCode\": \"\",\n \"nanos\": 0,\n \"units\": \"\"\n },\n \"flightEndTime\": \"\",\n \"flightStartTime\": \"\",\n \"name\": \"\",\n \"preferredDealTerms\": {\n \"fixedPrice\": {\n \"amount\": {},\n \"type\": \"\"\n }\n },\n \"privateAuctionTerms\": {\n \"floorPrice\": {},\n \"openAuctionAllowed\": false\n },\n \"programmaticGuaranteedTerms\": {\n \"fixedPrice\": {},\n \"guaranteedLooks\": \"\",\n \"impressionCap\": \"\",\n \"minimumDailyLooks\": \"\",\n \"percentShareOfVoice\": \"\",\n \"reservationType\": \"\"\n },\n \"proposalRevision\": \"\",\n \"publisherProfile\": \"\",\n \"sellerTimeZone\": {\n \"id\": \"\",\n \"version\": \"\"\n },\n \"targeting\": {\n \"daypartTargeting\": {\n \"dayParts\": [\n {\n \"dayOfWeek\": \"\",\n \"endTime\": {\n \"hours\": 0,\n \"minutes\": 0,\n \"nanos\": 0,\n \"seconds\": 0\n },\n \"startTime\": {}\n }\n ],\n \"timeZoneType\": \"\"\n },\n \"geoTargeting\": {\n \"excludedCriteriaIds\": [],\n \"targetedCriteriaIds\": []\n },\n \"inventorySizeTargeting\": {\n \"excludedInventorySizes\": [\n {\n \"height\": \"\",\n \"type\": \"\",\n \"width\": \"\"\n }\n ],\n \"targetedInventorySizes\": [\n {}\n ]\n },\n \"inventoryTypeTargeting\": {\n \"inventoryTypes\": []\n },\n \"placementTargeting\": {\n \"mobileApplicationTargeting\": {\n \"firstPartyTargeting\": {\n \"excludedAppIds\": [],\n \"targetedAppIds\": []\n }\n },\n \"uriTargeting\": {\n \"excludedUris\": [],\n \"targetedUris\": []\n }\n },\n \"technologyTargeting\": {\n \"deviceCapabilityTargeting\": {},\n \"deviceCategoryTargeting\": {},\n \"operatingSystemTargeting\": {\n \"operatingSystemCriteria\": {},\n \"operatingSystemVersionCriteria\": {}\n }\n },\n \"userListTargeting\": {},\n \"videoTargeting\": {\n \"excludedPositionTypes\": [],\n \"targetedPositionTypes\": []\n }\n },\n \"updateTime\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.patch('/baseUrl/v1/:name') do |req|
req.body = "{\n \"billedBuyer\": \"\",\n \"buyer\": \"\",\n \"client\": \"\",\n \"createTime\": \"\",\n \"creativeRequirements\": {\n \"creativeFormat\": \"\",\n \"creativePreApprovalPolicy\": \"\",\n \"creativeSafeFrameCompatibility\": \"\",\n \"maxAdDurationMs\": \"\",\n \"programmaticCreativeSource\": \"\",\n \"skippableAdType\": \"\"\n },\n \"dealType\": \"\",\n \"deliveryControl\": {\n \"companionDeliveryType\": \"\",\n \"creativeRotationType\": \"\",\n \"deliveryRateType\": \"\",\n \"frequencyCap\": [\n {\n \"maxImpressions\": 0,\n \"timeUnitType\": \"\",\n \"timeUnitsCount\": 0\n }\n ],\n \"roadblockingType\": \"\"\n },\n \"description\": \"\",\n \"displayName\": \"\",\n \"estimatedGrossSpend\": {\n \"currencyCode\": \"\",\n \"nanos\": 0,\n \"units\": \"\"\n },\n \"flightEndTime\": \"\",\n \"flightStartTime\": \"\",\n \"name\": \"\",\n \"preferredDealTerms\": {\n \"fixedPrice\": {\n \"amount\": {},\n \"type\": \"\"\n }\n },\n \"privateAuctionTerms\": {\n \"floorPrice\": {},\n \"openAuctionAllowed\": false\n },\n \"programmaticGuaranteedTerms\": {\n \"fixedPrice\": {},\n \"guaranteedLooks\": \"\",\n \"impressionCap\": \"\",\n \"minimumDailyLooks\": \"\",\n \"percentShareOfVoice\": \"\",\n \"reservationType\": \"\"\n },\n \"proposalRevision\": \"\",\n \"publisherProfile\": \"\",\n \"sellerTimeZone\": {\n \"id\": \"\",\n \"version\": \"\"\n },\n \"targeting\": {\n \"daypartTargeting\": {\n \"dayParts\": [\n {\n \"dayOfWeek\": \"\",\n \"endTime\": {\n \"hours\": 0,\n \"minutes\": 0,\n \"nanos\": 0,\n \"seconds\": 0\n },\n \"startTime\": {}\n }\n ],\n \"timeZoneType\": \"\"\n },\n \"geoTargeting\": {\n \"excludedCriteriaIds\": [],\n \"targetedCriteriaIds\": []\n },\n \"inventorySizeTargeting\": {\n \"excludedInventorySizes\": [\n {\n \"height\": \"\",\n \"type\": \"\",\n \"width\": \"\"\n }\n ],\n \"targetedInventorySizes\": [\n {}\n ]\n },\n \"inventoryTypeTargeting\": {\n \"inventoryTypes\": []\n },\n \"placementTargeting\": {\n \"mobileApplicationTargeting\": {\n \"firstPartyTargeting\": {\n \"excludedAppIds\": [],\n \"targetedAppIds\": []\n }\n },\n \"uriTargeting\": {\n \"excludedUris\": [],\n \"targetedUris\": []\n }\n },\n \"technologyTargeting\": {\n \"deviceCapabilityTargeting\": {},\n \"deviceCategoryTargeting\": {},\n \"operatingSystemTargeting\": {\n \"operatingSystemCriteria\": {},\n \"operatingSystemVersionCriteria\": {}\n }\n },\n \"userListTargeting\": {},\n \"videoTargeting\": {\n \"excludedPositionTypes\": [],\n \"targetedPositionTypes\": []\n }\n },\n \"updateTime\": \"\"\n}"
end
puts response.status
puts response.body
use std::str::FromStr;
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/:name";
let payload = json!({
"billedBuyer": "",
"buyer": "",
"client": "",
"createTime": "",
"creativeRequirements": json!({
"creativeFormat": "",
"creativePreApprovalPolicy": "",
"creativeSafeFrameCompatibility": "",
"maxAdDurationMs": "",
"programmaticCreativeSource": "",
"skippableAdType": ""
}),
"dealType": "",
"deliveryControl": json!({
"companionDeliveryType": "",
"creativeRotationType": "",
"deliveryRateType": "",
"frequencyCap": (
json!({
"maxImpressions": 0,
"timeUnitType": "",
"timeUnitsCount": 0
})
),
"roadblockingType": ""
}),
"description": "",
"displayName": "",
"estimatedGrossSpend": json!({
"currencyCode": "",
"nanos": 0,
"units": ""
}),
"flightEndTime": "",
"flightStartTime": "",
"name": "",
"preferredDealTerms": json!({"fixedPrice": json!({
"amount": json!({}),
"type": ""
})}),
"privateAuctionTerms": json!({
"floorPrice": json!({}),
"openAuctionAllowed": false
}),
"programmaticGuaranteedTerms": json!({
"fixedPrice": json!({}),
"guaranteedLooks": "",
"impressionCap": "",
"minimumDailyLooks": "",
"percentShareOfVoice": "",
"reservationType": ""
}),
"proposalRevision": "",
"publisherProfile": "",
"sellerTimeZone": json!({
"id": "",
"version": ""
}),
"targeting": json!({
"daypartTargeting": json!({
"dayParts": (
json!({
"dayOfWeek": "",
"endTime": json!({
"hours": 0,
"minutes": 0,
"nanos": 0,
"seconds": 0
}),
"startTime": json!({})
})
),
"timeZoneType": ""
}),
"geoTargeting": json!({
"excludedCriteriaIds": (),
"targetedCriteriaIds": ()
}),
"inventorySizeTargeting": json!({
"excludedInventorySizes": (
json!({
"height": "",
"type": "",
"width": ""
})
),
"targetedInventorySizes": (json!({}))
}),
"inventoryTypeTargeting": json!({"inventoryTypes": ()}),
"placementTargeting": json!({
"mobileApplicationTargeting": json!({"firstPartyTargeting": json!({
"excludedAppIds": (),
"targetedAppIds": ()
})}),
"uriTargeting": json!({
"excludedUris": (),
"targetedUris": ()
})
}),
"technologyTargeting": json!({
"deviceCapabilityTargeting": json!({}),
"deviceCategoryTargeting": json!({}),
"operatingSystemTargeting": json!({
"operatingSystemCriteria": json!({}),
"operatingSystemVersionCriteria": json!({})
})
}),
"userListTargeting": json!({}),
"videoTargeting": json!({
"excludedPositionTypes": (),
"targetedPositionTypes": ()
})
}),
"updateTime": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PATCH").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PATCH \
--url {{baseUrl}}/v1/:name \
--header 'content-type: application/json' \
--data '{
"billedBuyer": "",
"buyer": "",
"client": "",
"createTime": "",
"creativeRequirements": {
"creativeFormat": "",
"creativePreApprovalPolicy": "",
"creativeSafeFrameCompatibility": "",
"maxAdDurationMs": "",
"programmaticCreativeSource": "",
"skippableAdType": ""
},
"dealType": "",
"deliveryControl": {
"companionDeliveryType": "",
"creativeRotationType": "",
"deliveryRateType": "",
"frequencyCap": [
{
"maxImpressions": 0,
"timeUnitType": "",
"timeUnitsCount": 0
}
],
"roadblockingType": ""
},
"description": "",
"displayName": "",
"estimatedGrossSpend": {
"currencyCode": "",
"nanos": 0,
"units": ""
},
"flightEndTime": "",
"flightStartTime": "",
"name": "",
"preferredDealTerms": {
"fixedPrice": {
"amount": {},
"type": ""
}
},
"privateAuctionTerms": {
"floorPrice": {},
"openAuctionAllowed": false
},
"programmaticGuaranteedTerms": {
"fixedPrice": {},
"guaranteedLooks": "",
"impressionCap": "",
"minimumDailyLooks": "",
"percentShareOfVoice": "",
"reservationType": ""
},
"proposalRevision": "",
"publisherProfile": "",
"sellerTimeZone": {
"id": "",
"version": ""
},
"targeting": {
"daypartTargeting": {
"dayParts": [
{
"dayOfWeek": "",
"endTime": {
"hours": 0,
"minutes": 0,
"nanos": 0,
"seconds": 0
},
"startTime": {}
}
],
"timeZoneType": ""
},
"geoTargeting": {
"excludedCriteriaIds": [],
"targetedCriteriaIds": []
},
"inventorySizeTargeting": {
"excludedInventorySizes": [
{
"height": "",
"type": "",
"width": ""
}
],
"targetedInventorySizes": [
{}
]
},
"inventoryTypeTargeting": {
"inventoryTypes": []
},
"placementTargeting": {
"mobileApplicationTargeting": {
"firstPartyTargeting": {
"excludedAppIds": [],
"targetedAppIds": []
}
},
"uriTargeting": {
"excludedUris": [],
"targetedUris": []
}
},
"technologyTargeting": {
"deviceCapabilityTargeting": {},
"deviceCategoryTargeting": {},
"operatingSystemTargeting": {
"operatingSystemCriteria": {},
"operatingSystemVersionCriteria": {}
}
},
"userListTargeting": {},
"videoTargeting": {
"excludedPositionTypes": [],
"targetedPositionTypes": []
}
},
"updateTime": ""
}'
echo '{
"billedBuyer": "",
"buyer": "",
"client": "",
"createTime": "",
"creativeRequirements": {
"creativeFormat": "",
"creativePreApprovalPolicy": "",
"creativeSafeFrameCompatibility": "",
"maxAdDurationMs": "",
"programmaticCreativeSource": "",
"skippableAdType": ""
},
"dealType": "",
"deliveryControl": {
"companionDeliveryType": "",
"creativeRotationType": "",
"deliveryRateType": "",
"frequencyCap": [
{
"maxImpressions": 0,
"timeUnitType": "",
"timeUnitsCount": 0
}
],
"roadblockingType": ""
},
"description": "",
"displayName": "",
"estimatedGrossSpend": {
"currencyCode": "",
"nanos": 0,
"units": ""
},
"flightEndTime": "",
"flightStartTime": "",
"name": "",
"preferredDealTerms": {
"fixedPrice": {
"amount": {},
"type": ""
}
},
"privateAuctionTerms": {
"floorPrice": {},
"openAuctionAllowed": false
},
"programmaticGuaranteedTerms": {
"fixedPrice": {},
"guaranteedLooks": "",
"impressionCap": "",
"minimumDailyLooks": "",
"percentShareOfVoice": "",
"reservationType": ""
},
"proposalRevision": "",
"publisherProfile": "",
"sellerTimeZone": {
"id": "",
"version": ""
},
"targeting": {
"daypartTargeting": {
"dayParts": [
{
"dayOfWeek": "",
"endTime": {
"hours": 0,
"minutes": 0,
"nanos": 0,
"seconds": 0
},
"startTime": {}
}
],
"timeZoneType": ""
},
"geoTargeting": {
"excludedCriteriaIds": [],
"targetedCriteriaIds": []
},
"inventorySizeTargeting": {
"excludedInventorySizes": [
{
"height": "",
"type": "",
"width": ""
}
],
"targetedInventorySizes": [
{}
]
},
"inventoryTypeTargeting": {
"inventoryTypes": []
},
"placementTargeting": {
"mobileApplicationTargeting": {
"firstPartyTargeting": {
"excludedAppIds": [],
"targetedAppIds": []
}
},
"uriTargeting": {
"excludedUris": [],
"targetedUris": []
}
},
"technologyTargeting": {
"deviceCapabilityTargeting": {},
"deviceCategoryTargeting": {},
"operatingSystemTargeting": {
"operatingSystemCriteria": {},
"operatingSystemVersionCriteria": {}
}
},
"userListTargeting": {},
"videoTargeting": {
"excludedPositionTypes": [],
"targetedPositionTypes": []
}
},
"updateTime": ""
}' | \
http PATCH {{baseUrl}}/v1/:name \
content-type:application/json
wget --quiet \
--method PATCH \
--header 'content-type: application/json' \
--body-data '{\n "billedBuyer": "",\n "buyer": "",\n "client": "",\n "createTime": "",\n "creativeRequirements": {\n "creativeFormat": "",\n "creativePreApprovalPolicy": "",\n "creativeSafeFrameCompatibility": "",\n "maxAdDurationMs": "",\n "programmaticCreativeSource": "",\n "skippableAdType": ""\n },\n "dealType": "",\n "deliveryControl": {\n "companionDeliveryType": "",\n "creativeRotationType": "",\n "deliveryRateType": "",\n "frequencyCap": [\n {\n "maxImpressions": 0,\n "timeUnitType": "",\n "timeUnitsCount": 0\n }\n ],\n "roadblockingType": ""\n },\n "description": "",\n "displayName": "",\n "estimatedGrossSpend": {\n "currencyCode": "",\n "nanos": 0,\n "units": ""\n },\n "flightEndTime": "",\n "flightStartTime": "",\n "name": "",\n "preferredDealTerms": {\n "fixedPrice": {\n "amount": {},\n "type": ""\n }\n },\n "privateAuctionTerms": {\n "floorPrice": {},\n "openAuctionAllowed": false\n },\n "programmaticGuaranteedTerms": {\n "fixedPrice": {},\n "guaranteedLooks": "",\n "impressionCap": "",\n "minimumDailyLooks": "",\n "percentShareOfVoice": "",\n "reservationType": ""\n },\n "proposalRevision": "",\n "publisherProfile": "",\n "sellerTimeZone": {\n "id": "",\n "version": ""\n },\n "targeting": {\n "daypartTargeting": {\n "dayParts": [\n {\n "dayOfWeek": "",\n "endTime": {\n "hours": 0,\n "minutes": 0,\n "nanos": 0,\n "seconds": 0\n },\n "startTime": {}\n }\n ],\n "timeZoneType": ""\n },\n "geoTargeting": {\n "excludedCriteriaIds": [],\n "targetedCriteriaIds": []\n },\n "inventorySizeTargeting": {\n "excludedInventorySizes": [\n {\n "height": "",\n "type": "",\n "width": ""\n }\n ],\n "targetedInventorySizes": [\n {}\n ]\n },\n "inventoryTypeTargeting": {\n "inventoryTypes": []\n },\n "placementTargeting": {\n "mobileApplicationTargeting": {\n "firstPartyTargeting": {\n "excludedAppIds": [],\n "targetedAppIds": []\n }\n },\n "uriTargeting": {\n "excludedUris": [],\n "targetedUris": []\n }\n },\n "technologyTargeting": {\n "deviceCapabilityTargeting": {},\n "deviceCategoryTargeting": {},\n "operatingSystemTargeting": {\n "operatingSystemCriteria": {},\n "operatingSystemVersionCriteria": {}\n }\n },\n "userListTargeting": {},\n "videoTargeting": {\n "excludedPositionTypes": [],\n "targetedPositionTypes": []\n }\n },\n "updateTime": ""\n}' \
--output-document \
- {{baseUrl}}/v1/:name
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"billedBuyer": "",
"buyer": "",
"client": "",
"createTime": "",
"creativeRequirements": [
"creativeFormat": "",
"creativePreApprovalPolicy": "",
"creativeSafeFrameCompatibility": "",
"maxAdDurationMs": "",
"programmaticCreativeSource": "",
"skippableAdType": ""
],
"dealType": "",
"deliveryControl": [
"companionDeliveryType": "",
"creativeRotationType": "",
"deliveryRateType": "",
"frequencyCap": [
[
"maxImpressions": 0,
"timeUnitType": "",
"timeUnitsCount": 0
]
],
"roadblockingType": ""
],
"description": "",
"displayName": "",
"estimatedGrossSpend": [
"currencyCode": "",
"nanos": 0,
"units": ""
],
"flightEndTime": "",
"flightStartTime": "",
"name": "",
"preferredDealTerms": ["fixedPrice": [
"amount": [],
"type": ""
]],
"privateAuctionTerms": [
"floorPrice": [],
"openAuctionAllowed": false
],
"programmaticGuaranteedTerms": [
"fixedPrice": [],
"guaranteedLooks": "",
"impressionCap": "",
"minimumDailyLooks": "",
"percentShareOfVoice": "",
"reservationType": ""
],
"proposalRevision": "",
"publisherProfile": "",
"sellerTimeZone": [
"id": "",
"version": ""
],
"targeting": [
"daypartTargeting": [
"dayParts": [
[
"dayOfWeek": "",
"endTime": [
"hours": 0,
"minutes": 0,
"nanos": 0,
"seconds": 0
],
"startTime": []
]
],
"timeZoneType": ""
],
"geoTargeting": [
"excludedCriteriaIds": [],
"targetedCriteriaIds": []
],
"inventorySizeTargeting": [
"excludedInventorySizes": [
[
"height": "",
"type": "",
"width": ""
]
],
"targetedInventorySizes": [[]]
],
"inventoryTypeTargeting": ["inventoryTypes": []],
"placementTargeting": [
"mobileApplicationTargeting": ["firstPartyTargeting": [
"excludedAppIds": [],
"targetedAppIds": []
]],
"uriTargeting": [
"excludedUris": [],
"targetedUris": []
]
],
"technologyTargeting": [
"deviceCapabilityTargeting": [],
"deviceCategoryTargeting": [],
"operatingSystemTargeting": [
"operatingSystemCriteria": [],
"operatingSystemVersionCriteria": []
]
],
"userListTargeting": [],
"videoTargeting": [
"excludedPositionTypes": [],
"targetedPositionTypes": []
]
],
"updateTime": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/:name")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PATCH"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
authorizedbuyersmarketplace.buyers.proposals.list
{{baseUrl}}/v1/:parent/proposals
QUERY PARAMS
parent
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/:parent/proposals");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v1/:parent/proposals")
require "http/client"
url = "{{baseUrl}}/v1/:parent/proposals"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/v1/:parent/proposals"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/:parent/proposals");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/:parent/proposals"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/v1/:parent/proposals HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v1/:parent/proposals")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/:parent/proposals"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/:parent/proposals")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v1/:parent/proposals")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/v1/:parent/proposals');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/v1/:parent/proposals'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/:parent/proposals';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1/:parent/proposals',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v1/:parent/proposals")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/:parent/proposals',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {method: 'GET', url: '{{baseUrl}}/v1/:parent/proposals'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/v1/:parent/proposals');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {method: 'GET', url: '{{baseUrl}}/v1/:parent/proposals'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/:parent/proposals';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/:parent/proposals"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1/:parent/proposals" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/:parent/proposals",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/v1/:parent/proposals');
echo $response->getBody();
setUrl('{{baseUrl}}/v1/:parent/proposals');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v1/:parent/proposals');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/:parent/proposals' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/:parent/proposals' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/v1/:parent/proposals")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/:parent/proposals"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/:parent/proposals"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/:parent/proposals")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/v1/:parent/proposals') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/:parent/proposals";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/v1/:parent/proposals
http GET {{baseUrl}}/v1/:parent/proposals
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/v1/:parent/proposals
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/:parent/proposals")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
authorizedbuyersmarketplace.buyers.proposals.sendRfp
{{baseUrl}}/v1/:buyer/proposals:sendRfp
QUERY PARAMS
buyer
BODY json
{
"buyerContacts": [
{
"displayName": "",
"email": ""
}
],
"client": "",
"displayName": "",
"estimatedGrossSpend": {
"currencyCode": "",
"nanos": 0,
"units": ""
},
"flightEndTime": "",
"flightStartTime": "",
"geoTargeting": {
"excludedCriteriaIds": [],
"targetedCriteriaIds": []
},
"inventorySizeTargeting": {
"excludedInventorySizes": [
{
"height": "",
"type": "",
"width": ""
}
],
"targetedInventorySizes": [
{}
]
},
"note": "",
"preferredDealTerms": {
"fixedPrice": {
"amount": {},
"type": ""
}
},
"programmaticGuaranteedTerms": {
"fixedPrice": {},
"guaranteedLooks": "",
"impressionCap": "",
"minimumDailyLooks": "",
"percentShareOfVoice": "",
"reservationType": ""
},
"publisherProfile": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/:buyer/proposals:sendRfp");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"buyerContacts\": [\n {\n \"displayName\": \"\",\n \"email\": \"\"\n }\n ],\n \"client\": \"\",\n \"displayName\": \"\",\n \"estimatedGrossSpend\": {\n \"currencyCode\": \"\",\n \"nanos\": 0,\n \"units\": \"\"\n },\n \"flightEndTime\": \"\",\n \"flightStartTime\": \"\",\n \"geoTargeting\": {\n \"excludedCriteriaIds\": [],\n \"targetedCriteriaIds\": []\n },\n \"inventorySizeTargeting\": {\n \"excludedInventorySizes\": [\n {\n \"height\": \"\",\n \"type\": \"\",\n \"width\": \"\"\n }\n ],\n \"targetedInventorySizes\": [\n {}\n ]\n },\n \"note\": \"\",\n \"preferredDealTerms\": {\n \"fixedPrice\": {\n \"amount\": {},\n \"type\": \"\"\n }\n },\n \"programmaticGuaranteedTerms\": {\n \"fixedPrice\": {},\n \"guaranteedLooks\": \"\",\n \"impressionCap\": \"\",\n \"minimumDailyLooks\": \"\",\n \"percentShareOfVoice\": \"\",\n \"reservationType\": \"\"\n },\n \"publisherProfile\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v1/:buyer/proposals:sendRfp" {:content-type :json
:form-params {:buyerContacts [{:displayName ""
:email ""}]
:client ""
:displayName ""
:estimatedGrossSpend {:currencyCode ""
:nanos 0
:units ""}
:flightEndTime ""
:flightStartTime ""
:geoTargeting {:excludedCriteriaIds []
:targetedCriteriaIds []}
:inventorySizeTargeting {:excludedInventorySizes [{:height ""
:type ""
:width ""}]
:targetedInventorySizes [{}]}
:note ""
:preferredDealTerms {:fixedPrice {:amount {}
:type ""}}
:programmaticGuaranteedTerms {:fixedPrice {}
:guaranteedLooks ""
:impressionCap ""
:minimumDailyLooks ""
:percentShareOfVoice ""
:reservationType ""}
:publisherProfile ""}})
require "http/client"
url = "{{baseUrl}}/v1/:buyer/proposals:sendRfp"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"buyerContacts\": [\n {\n \"displayName\": \"\",\n \"email\": \"\"\n }\n ],\n \"client\": \"\",\n \"displayName\": \"\",\n \"estimatedGrossSpend\": {\n \"currencyCode\": \"\",\n \"nanos\": 0,\n \"units\": \"\"\n },\n \"flightEndTime\": \"\",\n \"flightStartTime\": \"\",\n \"geoTargeting\": {\n \"excludedCriteriaIds\": [],\n \"targetedCriteriaIds\": []\n },\n \"inventorySizeTargeting\": {\n \"excludedInventorySizes\": [\n {\n \"height\": \"\",\n \"type\": \"\",\n \"width\": \"\"\n }\n ],\n \"targetedInventorySizes\": [\n {}\n ]\n },\n \"note\": \"\",\n \"preferredDealTerms\": {\n \"fixedPrice\": {\n \"amount\": {},\n \"type\": \"\"\n }\n },\n \"programmaticGuaranteedTerms\": {\n \"fixedPrice\": {},\n \"guaranteedLooks\": \"\",\n \"impressionCap\": \"\",\n \"minimumDailyLooks\": \"\",\n \"percentShareOfVoice\": \"\",\n \"reservationType\": \"\"\n },\n \"publisherProfile\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/v1/:buyer/proposals:sendRfp"),
Content = new StringContent("{\n \"buyerContacts\": [\n {\n \"displayName\": \"\",\n \"email\": \"\"\n }\n ],\n \"client\": \"\",\n \"displayName\": \"\",\n \"estimatedGrossSpend\": {\n \"currencyCode\": \"\",\n \"nanos\": 0,\n \"units\": \"\"\n },\n \"flightEndTime\": \"\",\n \"flightStartTime\": \"\",\n \"geoTargeting\": {\n \"excludedCriteriaIds\": [],\n \"targetedCriteriaIds\": []\n },\n \"inventorySizeTargeting\": {\n \"excludedInventorySizes\": [\n {\n \"height\": \"\",\n \"type\": \"\",\n \"width\": \"\"\n }\n ],\n \"targetedInventorySizes\": [\n {}\n ]\n },\n \"note\": \"\",\n \"preferredDealTerms\": {\n \"fixedPrice\": {\n \"amount\": {},\n \"type\": \"\"\n }\n },\n \"programmaticGuaranteedTerms\": {\n \"fixedPrice\": {},\n \"guaranteedLooks\": \"\",\n \"impressionCap\": \"\",\n \"minimumDailyLooks\": \"\",\n \"percentShareOfVoice\": \"\",\n \"reservationType\": \"\"\n },\n \"publisherProfile\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/:buyer/proposals:sendRfp");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"buyerContacts\": [\n {\n \"displayName\": \"\",\n \"email\": \"\"\n }\n ],\n \"client\": \"\",\n \"displayName\": \"\",\n \"estimatedGrossSpend\": {\n \"currencyCode\": \"\",\n \"nanos\": 0,\n \"units\": \"\"\n },\n \"flightEndTime\": \"\",\n \"flightStartTime\": \"\",\n \"geoTargeting\": {\n \"excludedCriteriaIds\": [],\n \"targetedCriteriaIds\": []\n },\n \"inventorySizeTargeting\": {\n \"excludedInventorySizes\": [\n {\n \"height\": \"\",\n \"type\": \"\",\n \"width\": \"\"\n }\n ],\n \"targetedInventorySizes\": [\n {}\n ]\n },\n \"note\": \"\",\n \"preferredDealTerms\": {\n \"fixedPrice\": {\n \"amount\": {},\n \"type\": \"\"\n }\n },\n \"programmaticGuaranteedTerms\": {\n \"fixedPrice\": {},\n \"guaranteedLooks\": \"\",\n \"impressionCap\": \"\",\n \"minimumDailyLooks\": \"\",\n \"percentShareOfVoice\": \"\",\n \"reservationType\": \"\"\n },\n \"publisherProfile\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/:buyer/proposals:sendRfp"
payload := strings.NewReader("{\n \"buyerContacts\": [\n {\n \"displayName\": \"\",\n \"email\": \"\"\n }\n ],\n \"client\": \"\",\n \"displayName\": \"\",\n \"estimatedGrossSpend\": {\n \"currencyCode\": \"\",\n \"nanos\": 0,\n \"units\": \"\"\n },\n \"flightEndTime\": \"\",\n \"flightStartTime\": \"\",\n \"geoTargeting\": {\n \"excludedCriteriaIds\": [],\n \"targetedCriteriaIds\": []\n },\n \"inventorySizeTargeting\": {\n \"excludedInventorySizes\": [\n {\n \"height\": \"\",\n \"type\": \"\",\n \"width\": \"\"\n }\n ],\n \"targetedInventorySizes\": [\n {}\n ]\n },\n \"note\": \"\",\n \"preferredDealTerms\": {\n \"fixedPrice\": {\n \"amount\": {},\n \"type\": \"\"\n }\n },\n \"programmaticGuaranteedTerms\": {\n \"fixedPrice\": {},\n \"guaranteedLooks\": \"\",\n \"impressionCap\": \"\",\n \"minimumDailyLooks\": \"\",\n \"percentShareOfVoice\": \"\",\n \"reservationType\": \"\"\n },\n \"publisherProfile\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/v1/:buyer/proposals:sendRfp HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 875
{
"buyerContacts": [
{
"displayName": "",
"email": ""
}
],
"client": "",
"displayName": "",
"estimatedGrossSpend": {
"currencyCode": "",
"nanos": 0,
"units": ""
},
"flightEndTime": "",
"flightStartTime": "",
"geoTargeting": {
"excludedCriteriaIds": [],
"targetedCriteriaIds": []
},
"inventorySizeTargeting": {
"excludedInventorySizes": [
{
"height": "",
"type": "",
"width": ""
}
],
"targetedInventorySizes": [
{}
]
},
"note": "",
"preferredDealTerms": {
"fixedPrice": {
"amount": {},
"type": ""
}
},
"programmaticGuaranteedTerms": {
"fixedPrice": {},
"guaranteedLooks": "",
"impressionCap": "",
"minimumDailyLooks": "",
"percentShareOfVoice": "",
"reservationType": ""
},
"publisherProfile": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v1/:buyer/proposals:sendRfp")
.setHeader("content-type", "application/json")
.setBody("{\n \"buyerContacts\": [\n {\n \"displayName\": \"\",\n \"email\": \"\"\n }\n ],\n \"client\": \"\",\n \"displayName\": \"\",\n \"estimatedGrossSpend\": {\n \"currencyCode\": \"\",\n \"nanos\": 0,\n \"units\": \"\"\n },\n \"flightEndTime\": \"\",\n \"flightStartTime\": \"\",\n \"geoTargeting\": {\n \"excludedCriteriaIds\": [],\n \"targetedCriteriaIds\": []\n },\n \"inventorySizeTargeting\": {\n \"excludedInventorySizes\": [\n {\n \"height\": \"\",\n \"type\": \"\",\n \"width\": \"\"\n }\n ],\n \"targetedInventorySizes\": [\n {}\n ]\n },\n \"note\": \"\",\n \"preferredDealTerms\": {\n \"fixedPrice\": {\n \"amount\": {},\n \"type\": \"\"\n }\n },\n \"programmaticGuaranteedTerms\": {\n \"fixedPrice\": {},\n \"guaranteedLooks\": \"\",\n \"impressionCap\": \"\",\n \"minimumDailyLooks\": \"\",\n \"percentShareOfVoice\": \"\",\n \"reservationType\": \"\"\n },\n \"publisherProfile\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/:buyer/proposals:sendRfp"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"buyerContacts\": [\n {\n \"displayName\": \"\",\n \"email\": \"\"\n }\n ],\n \"client\": \"\",\n \"displayName\": \"\",\n \"estimatedGrossSpend\": {\n \"currencyCode\": \"\",\n \"nanos\": 0,\n \"units\": \"\"\n },\n \"flightEndTime\": \"\",\n \"flightStartTime\": \"\",\n \"geoTargeting\": {\n \"excludedCriteriaIds\": [],\n \"targetedCriteriaIds\": []\n },\n \"inventorySizeTargeting\": {\n \"excludedInventorySizes\": [\n {\n \"height\": \"\",\n \"type\": \"\",\n \"width\": \"\"\n }\n ],\n \"targetedInventorySizes\": [\n {}\n ]\n },\n \"note\": \"\",\n \"preferredDealTerms\": {\n \"fixedPrice\": {\n \"amount\": {},\n \"type\": \"\"\n }\n },\n \"programmaticGuaranteedTerms\": {\n \"fixedPrice\": {},\n \"guaranteedLooks\": \"\",\n \"impressionCap\": \"\",\n \"minimumDailyLooks\": \"\",\n \"percentShareOfVoice\": \"\",\n \"reservationType\": \"\"\n },\n \"publisherProfile\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"buyerContacts\": [\n {\n \"displayName\": \"\",\n \"email\": \"\"\n }\n ],\n \"client\": \"\",\n \"displayName\": \"\",\n \"estimatedGrossSpend\": {\n \"currencyCode\": \"\",\n \"nanos\": 0,\n \"units\": \"\"\n },\n \"flightEndTime\": \"\",\n \"flightStartTime\": \"\",\n \"geoTargeting\": {\n \"excludedCriteriaIds\": [],\n \"targetedCriteriaIds\": []\n },\n \"inventorySizeTargeting\": {\n \"excludedInventorySizes\": [\n {\n \"height\": \"\",\n \"type\": \"\",\n \"width\": \"\"\n }\n ],\n \"targetedInventorySizes\": [\n {}\n ]\n },\n \"note\": \"\",\n \"preferredDealTerms\": {\n \"fixedPrice\": {\n \"amount\": {},\n \"type\": \"\"\n }\n },\n \"programmaticGuaranteedTerms\": {\n \"fixedPrice\": {},\n \"guaranteedLooks\": \"\",\n \"impressionCap\": \"\",\n \"minimumDailyLooks\": \"\",\n \"percentShareOfVoice\": \"\",\n \"reservationType\": \"\"\n },\n \"publisherProfile\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/:buyer/proposals:sendRfp")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v1/:buyer/proposals:sendRfp")
.header("content-type", "application/json")
.body("{\n \"buyerContacts\": [\n {\n \"displayName\": \"\",\n \"email\": \"\"\n }\n ],\n \"client\": \"\",\n \"displayName\": \"\",\n \"estimatedGrossSpend\": {\n \"currencyCode\": \"\",\n \"nanos\": 0,\n \"units\": \"\"\n },\n \"flightEndTime\": \"\",\n \"flightStartTime\": \"\",\n \"geoTargeting\": {\n \"excludedCriteriaIds\": [],\n \"targetedCriteriaIds\": []\n },\n \"inventorySizeTargeting\": {\n \"excludedInventorySizes\": [\n {\n \"height\": \"\",\n \"type\": \"\",\n \"width\": \"\"\n }\n ],\n \"targetedInventorySizes\": [\n {}\n ]\n },\n \"note\": \"\",\n \"preferredDealTerms\": {\n \"fixedPrice\": {\n \"amount\": {},\n \"type\": \"\"\n }\n },\n \"programmaticGuaranteedTerms\": {\n \"fixedPrice\": {},\n \"guaranteedLooks\": \"\",\n \"impressionCap\": \"\",\n \"minimumDailyLooks\": \"\",\n \"percentShareOfVoice\": \"\",\n \"reservationType\": \"\"\n },\n \"publisherProfile\": \"\"\n}")
.asString();
const data = JSON.stringify({
buyerContacts: [
{
displayName: '',
email: ''
}
],
client: '',
displayName: '',
estimatedGrossSpend: {
currencyCode: '',
nanos: 0,
units: ''
},
flightEndTime: '',
flightStartTime: '',
geoTargeting: {
excludedCriteriaIds: [],
targetedCriteriaIds: []
},
inventorySizeTargeting: {
excludedInventorySizes: [
{
height: '',
type: '',
width: ''
}
],
targetedInventorySizes: [
{}
]
},
note: '',
preferredDealTerms: {
fixedPrice: {
amount: {},
type: ''
}
},
programmaticGuaranteedTerms: {
fixedPrice: {},
guaranteedLooks: '',
impressionCap: '',
minimumDailyLooks: '',
percentShareOfVoice: '',
reservationType: ''
},
publisherProfile: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/v1/:buyer/proposals:sendRfp');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/:buyer/proposals:sendRfp',
headers: {'content-type': 'application/json'},
data: {
buyerContacts: [{displayName: '', email: ''}],
client: '',
displayName: '',
estimatedGrossSpend: {currencyCode: '', nanos: 0, units: ''},
flightEndTime: '',
flightStartTime: '',
geoTargeting: {excludedCriteriaIds: [], targetedCriteriaIds: []},
inventorySizeTargeting: {
excludedInventorySizes: [{height: '', type: '', width: ''}],
targetedInventorySizes: [{}]
},
note: '',
preferredDealTerms: {fixedPrice: {amount: {}, type: ''}},
programmaticGuaranteedTerms: {
fixedPrice: {},
guaranteedLooks: '',
impressionCap: '',
minimumDailyLooks: '',
percentShareOfVoice: '',
reservationType: ''
},
publisherProfile: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/:buyer/proposals:sendRfp';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"buyerContacts":[{"displayName":"","email":""}],"client":"","displayName":"","estimatedGrossSpend":{"currencyCode":"","nanos":0,"units":""},"flightEndTime":"","flightStartTime":"","geoTargeting":{"excludedCriteriaIds":[],"targetedCriteriaIds":[]},"inventorySizeTargeting":{"excludedInventorySizes":[{"height":"","type":"","width":""}],"targetedInventorySizes":[{}]},"note":"","preferredDealTerms":{"fixedPrice":{"amount":{},"type":""}},"programmaticGuaranteedTerms":{"fixedPrice":{},"guaranteedLooks":"","impressionCap":"","minimumDailyLooks":"","percentShareOfVoice":"","reservationType":""},"publisherProfile":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1/:buyer/proposals:sendRfp',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "buyerContacts": [\n {\n "displayName": "",\n "email": ""\n }\n ],\n "client": "",\n "displayName": "",\n "estimatedGrossSpend": {\n "currencyCode": "",\n "nanos": 0,\n "units": ""\n },\n "flightEndTime": "",\n "flightStartTime": "",\n "geoTargeting": {\n "excludedCriteriaIds": [],\n "targetedCriteriaIds": []\n },\n "inventorySizeTargeting": {\n "excludedInventorySizes": [\n {\n "height": "",\n "type": "",\n "width": ""\n }\n ],\n "targetedInventorySizes": [\n {}\n ]\n },\n "note": "",\n "preferredDealTerms": {\n "fixedPrice": {\n "amount": {},\n "type": ""\n }\n },\n "programmaticGuaranteedTerms": {\n "fixedPrice": {},\n "guaranteedLooks": "",\n "impressionCap": "",\n "minimumDailyLooks": "",\n "percentShareOfVoice": "",\n "reservationType": ""\n },\n "publisherProfile": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"buyerContacts\": [\n {\n \"displayName\": \"\",\n \"email\": \"\"\n }\n ],\n \"client\": \"\",\n \"displayName\": \"\",\n \"estimatedGrossSpend\": {\n \"currencyCode\": \"\",\n \"nanos\": 0,\n \"units\": \"\"\n },\n \"flightEndTime\": \"\",\n \"flightStartTime\": \"\",\n \"geoTargeting\": {\n \"excludedCriteriaIds\": [],\n \"targetedCriteriaIds\": []\n },\n \"inventorySizeTargeting\": {\n \"excludedInventorySizes\": [\n {\n \"height\": \"\",\n \"type\": \"\",\n \"width\": \"\"\n }\n ],\n \"targetedInventorySizes\": [\n {}\n ]\n },\n \"note\": \"\",\n \"preferredDealTerms\": {\n \"fixedPrice\": {\n \"amount\": {},\n \"type\": \"\"\n }\n },\n \"programmaticGuaranteedTerms\": {\n \"fixedPrice\": {},\n \"guaranteedLooks\": \"\",\n \"impressionCap\": \"\",\n \"minimumDailyLooks\": \"\",\n \"percentShareOfVoice\": \"\",\n \"reservationType\": \"\"\n },\n \"publisherProfile\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v1/:buyer/proposals:sendRfp")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/:buyer/proposals:sendRfp',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
buyerContacts: [{displayName: '', email: ''}],
client: '',
displayName: '',
estimatedGrossSpend: {currencyCode: '', nanos: 0, units: ''},
flightEndTime: '',
flightStartTime: '',
geoTargeting: {excludedCriteriaIds: [], targetedCriteriaIds: []},
inventorySizeTargeting: {
excludedInventorySizes: [{height: '', type: '', width: ''}],
targetedInventorySizes: [{}]
},
note: '',
preferredDealTerms: {fixedPrice: {amount: {}, type: ''}},
programmaticGuaranteedTerms: {
fixedPrice: {},
guaranteedLooks: '',
impressionCap: '',
minimumDailyLooks: '',
percentShareOfVoice: '',
reservationType: ''
},
publisherProfile: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/:buyer/proposals:sendRfp',
headers: {'content-type': 'application/json'},
body: {
buyerContacts: [{displayName: '', email: ''}],
client: '',
displayName: '',
estimatedGrossSpend: {currencyCode: '', nanos: 0, units: ''},
flightEndTime: '',
flightStartTime: '',
geoTargeting: {excludedCriteriaIds: [], targetedCriteriaIds: []},
inventorySizeTargeting: {
excludedInventorySizes: [{height: '', type: '', width: ''}],
targetedInventorySizes: [{}]
},
note: '',
preferredDealTerms: {fixedPrice: {amount: {}, type: ''}},
programmaticGuaranteedTerms: {
fixedPrice: {},
guaranteedLooks: '',
impressionCap: '',
minimumDailyLooks: '',
percentShareOfVoice: '',
reservationType: ''
},
publisherProfile: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/v1/:buyer/proposals:sendRfp');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
buyerContacts: [
{
displayName: '',
email: ''
}
],
client: '',
displayName: '',
estimatedGrossSpend: {
currencyCode: '',
nanos: 0,
units: ''
},
flightEndTime: '',
flightStartTime: '',
geoTargeting: {
excludedCriteriaIds: [],
targetedCriteriaIds: []
},
inventorySizeTargeting: {
excludedInventorySizes: [
{
height: '',
type: '',
width: ''
}
],
targetedInventorySizes: [
{}
]
},
note: '',
preferredDealTerms: {
fixedPrice: {
amount: {},
type: ''
}
},
programmaticGuaranteedTerms: {
fixedPrice: {},
guaranteedLooks: '',
impressionCap: '',
minimumDailyLooks: '',
percentShareOfVoice: '',
reservationType: ''
},
publisherProfile: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/v1/:buyer/proposals:sendRfp',
headers: {'content-type': 'application/json'},
data: {
buyerContacts: [{displayName: '', email: ''}],
client: '',
displayName: '',
estimatedGrossSpend: {currencyCode: '', nanos: 0, units: ''},
flightEndTime: '',
flightStartTime: '',
geoTargeting: {excludedCriteriaIds: [], targetedCriteriaIds: []},
inventorySizeTargeting: {
excludedInventorySizes: [{height: '', type: '', width: ''}],
targetedInventorySizes: [{}]
},
note: '',
preferredDealTerms: {fixedPrice: {amount: {}, type: ''}},
programmaticGuaranteedTerms: {
fixedPrice: {},
guaranteedLooks: '',
impressionCap: '',
minimumDailyLooks: '',
percentShareOfVoice: '',
reservationType: ''
},
publisherProfile: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/:buyer/proposals:sendRfp';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"buyerContacts":[{"displayName":"","email":""}],"client":"","displayName":"","estimatedGrossSpend":{"currencyCode":"","nanos":0,"units":""},"flightEndTime":"","flightStartTime":"","geoTargeting":{"excludedCriteriaIds":[],"targetedCriteriaIds":[]},"inventorySizeTargeting":{"excludedInventorySizes":[{"height":"","type":"","width":""}],"targetedInventorySizes":[{}]},"note":"","preferredDealTerms":{"fixedPrice":{"amount":{},"type":""}},"programmaticGuaranteedTerms":{"fixedPrice":{},"guaranteedLooks":"","impressionCap":"","minimumDailyLooks":"","percentShareOfVoice":"","reservationType":""},"publisherProfile":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"buyerContacts": @[ @{ @"displayName": @"", @"email": @"" } ],
@"client": @"",
@"displayName": @"",
@"estimatedGrossSpend": @{ @"currencyCode": @"", @"nanos": @0, @"units": @"" },
@"flightEndTime": @"",
@"flightStartTime": @"",
@"geoTargeting": @{ @"excludedCriteriaIds": @[ ], @"targetedCriteriaIds": @[ ] },
@"inventorySizeTargeting": @{ @"excludedInventorySizes": @[ @{ @"height": @"", @"type": @"", @"width": @"" } ], @"targetedInventorySizes": @[ @{ } ] },
@"note": @"",
@"preferredDealTerms": @{ @"fixedPrice": @{ @"amount": @{ }, @"type": @"" } },
@"programmaticGuaranteedTerms": @{ @"fixedPrice": @{ }, @"guaranteedLooks": @"", @"impressionCap": @"", @"minimumDailyLooks": @"", @"percentShareOfVoice": @"", @"reservationType": @"" },
@"publisherProfile": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/:buyer/proposals:sendRfp"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1/:buyer/proposals:sendRfp" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"buyerContacts\": [\n {\n \"displayName\": \"\",\n \"email\": \"\"\n }\n ],\n \"client\": \"\",\n \"displayName\": \"\",\n \"estimatedGrossSpend\": {\n \"currencyCode\": \"\",\n \"nanos\": 0,\n \"units\": \"\"\n },\n \"flightEndTime\": \"\",\n \"flightStartTime\": \"\",\n \"geoTargeting\": {\n \"excludedCriteriaIds\": [],\n \"targetedCriteriaIds\": []\n },\n \"inventorySizeTargeting\": {\n \"excludedInventorySizes\": [\n {\n \"height\": \"\",\n \"type\": \"\",\n \"width\": \"\"\n }\n ],\n \"targetedInventorySizes\": [\n {}\n ]\n },\n \"note\": \"\",\n \"preferredDealTerms\": {\n \"fixedPrice\": {\n \"amount\": {},\n \"type\": \"\"\n }\n },\n \"programmaticGuaranteedTerms\": {\n \"fixedPrice\": {},\n \"guaranteedLooks\": \"\",\n \"impressionCap\": \"\",\n \"minimumDailyLooks\": \"\",\n \"percentShareOfVoice\": \"\",\n \"reservationType\": \"\"\n },\n \"publisherProfile\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/:buyer/proposals:sendRfp",
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([
'buyerContacts' => [
[
'displayName' => '',
'email' => ''
]
],
'client' => '',
'displayName' => '',
'estimatedGrossSpend' => [
'currencyCode' => '',
'nanos' => 0,
'units' => ''
],
'flightEndTime' => '',
'flightStartTime' => '',
'geoTargeting' => [
'excludedCriteriaIds' => [
],
'targetedCriteriaIds' => [
]
],
'inventorySizeTargeting' => [
'excludedInventorySizes' => [
[
'height' => '',
'type' => '',
'width' => ''
]
],
'targetedInventorySizes' => [
[
]
]
],
'note' => '',
'preferredDealTerms' => [
'fixedPrice' => [
'amount' => [
],
'type' => ''
]
],
'programmaticGuaranteedTerms' => [
'fixedPrice' => [
],
'guaranteedLooks' => '',
'impressionCap' => '',
'minimumDailyLooks' => '',
'percentShareOfVoice' => '',
'reservationType' => ''
],
'publisherProfile' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/v1/:buyer/proposals:sendRfp', [
'body' => '{
"buyerContacts": [
{
"displayName": "",
"email": ""
}
],
"client": "",
"displayName": "",
"estimatedGrossSpend": {
"currencyCode": "",
"nanos": 0,
"units": ""
},
"flightEndTime": "",
"flightStartTime": "",
"geoTargeting": {
"excludedCriteriaIds": [],
"targetedCriteriaIds": []
},
"inventorySizeTargeting": {
"excludedInventorySizes": [
{
"height": "",
"type": "",
"width": ""
}
],
"targetedInventorySizes": [
{}
]
},
"note": "",
"preferredDealTerms": {
"fixedPrice": {
"amount": {},
"type": ""
}
},
"programmaticGuaranteedTerms": {
"fixedPrice": {},
"guaranteedLooks": "",
"impressionCap": "",
"minimumDailyLooks": "",
"percentShareOfVoice": "",
"reservationType": ""
},
"publisherProfile": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v1/:buyer/proposals:sendRfp');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'buyerContacts' => [
[
'displayName' => '',
'email' => ''
]
],
'client' => '',
'displayName' => '',
'estimatedGrossSpend' => [
'currencyCode' => '',
'nanos' => 0,
'units' => ''
],
'flightEndTime' => '',
'flightStartTime' => '',
'geoTargeting' => [
'excludedCriteriaIds' => [
],
'targetedCriteriaIds' => [
]
],
'inventorySizeTargeting' => [
'excludedInventorySizes' => [
[
'height' => '',
'type' => '',
'width' => ''
]
],
'targetedInventorySizes' => [
[
]
]
],
'note' => '',
'preferredDealTerms' => [
'fixedPrice' => [
'amount' => [
],
'type' => ''
]
],
'programmaticGuaranteedTerms' => [
'fixedPrice' => [
],
'guaranteedLooks' => '',
'impressionCap' => '',
'minimumDailyLooks' => '',
'percentShareOfVoice' => '',
'reservationType' => ''
],
'publisherProfile' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'buyerContacts' => [
[
'displayName' => '',
'email' => ''
]
],
'client' => '',
'displayName' => '',
'estimatedGrossSpend' => [
'currencyCode' => '',
'nanos' => 0,
'units' => ''
],
'flightEndTime' => '',
'flightStartTime' => '',
'geoTargeting' => [
'excludedCriteriaIds' => [
],
'targetedCriteriaIds' => [
]
],
'inventorySizeTargeting' => [
'excludedInventorySizes' => [
[
'height' => '',
'type' => '',
'width' => ''
]
],
'targetedInventorySizes' => [
[
]
]
],
'note' => '',
'preferredDealTerms' => [
'fixedPrice' => [
'amount' => [
],
'type' => ''
]
],
'programmaticGuaranteedTerms' => [
'fixedPrice' => [
],
'guaranteedLooks' => '',
'impressionCap' => '',
'minimumDailyLooks' => '',
'percentShareOfVoice' => '',
'reservationType' => ''
],
'publisherProfile' => ''
]));
$request->setRequestUrl('{{baseUrl}}/v1/:buyer/proposals:sendRfp');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/:buyer/proposals:sendRfp' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"buyerContacts": [
{
"displayName": "",
"email": ""
}
],
"client": "",
"displayName": "",
"estimatedGrossSpend": {
"currencyCode": "",
"nanos": 0,
"units": ""
},
"flightEndTime": "",
"flightStartTime": "",
"geoTargeting": {
"excludedCriteriaIds": [],
"targetedCriteriaIds": []
},
"inventorySizeTargeting": {
"excludedInventorySizes": [
{
"height": "",
"type": "",
"width": ""
}
],
"targetedInventorySizes": [
{}
]
},
"note": "",
"preferredDealTerms": {
"fixedPrice": {
"amount": {},
"type": ""
}
},
"programmaticGuaranteedTerms": {
"fixedPrice": {},
"guaranteedLooks": "",
"impressionCap": "",
"minimumDailyLooks": "",
"percentShareOfVoice": "",
"reservationType": ""
},
"publisherProfile": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/:buyer/proposals:sendRfp' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"buyerContacts": [
{
"displayName": "",
"email": ""
}
],
"client": "",
"displayName": "",
"estimatedGrossSpend": {
"currencyCode": "",
"nanos": 0,
"units": ""
},
"flightEndTime": "",
"flightStartTime": "",
"geoTargeting": {
"excludedCriteriaIds": [],
"targetedCriteriaIds": []
},
"inventorySizeTargeting": {
"excludedInventorySizes": [
{
"height": "",
"type": "",
"width": ""
}
],
"targetedInventorySizes": [
{}
]
},
"note": "",
"preferredDealTerms": {
"fixedPrice": {
"amount": {},
"type": ""
}
},
"programmaticGuaranteedTerms": {
"fixedPrice": {},
"guaranteedLooks": "",
"impressionCap": "",
"minimumDailyLooks": "",
"percentShareOfVoice": "",
"reservationType": ""
},
"publisherProfile": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"buyerContacts\": [\n {\n \"displayName\": \"\",\n \"email\": \"\"\n }\n ],\n \"client\": \"\",\n \"displayName\": \"\",\n \"estimatedGrossSpend\": {\n \"currencyCode\": \"\",\n \"nanos\": 0,\n \"units\": \"\"\n },\n \"flightEndTime\": \"\",\n \"flightStartTime\": \"\",\n \"geoTargeting\": {\n \"excludedCriteriaIds\": [],\n \"targetedCriteriaIds\": []\n },\n \"inventorySizeTargeting\": {\n \"excludedInventorySizes\": [\n {\n \"height\": \"\",\n \"type\": \"\",\n \"width\": \"\"\n }\n ],\n \"targetedInventorySizes\": [\n {}\n ]\n },\n \"note\": \"\",\n \"preferredDealTerms\": {\n \"fixedPrice\": {\n \"amount\": {},\n \"type\": \"\"\n }\n },\n \"programmaticGuaranteedTerms\": {\n \"fixedPrice\": {},\n \"guaranteedLooks\": \"\",\n \"impressionCap\": \"\",\n \"minimumDailyLooks\": \"\",\n \"percentShareOfVoice\": \"\",\n \"reservationType\": \"\"\n },\n \"publisherProfile\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v1/:buyer/proposals:sendRfp", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/:buyer/proposals:sendRfp"
payload = {
"buyerContacts": [
{
"displayName": "",
"email": ""
}
],
"client": "",
"displayName": "",
"estimatedGrossSpend": {
"currencyCode": "",
"nanos": 0,
"units": ""
},
"flightEndTime": "",
"flightStartTime": "",
"geoTargeting": {
"excludedCriteriaIds": [],
"targetedCriteriaIds": []
},
"inventorySizeTargeting": {
"excludedInventorySizes": [
{
"height": "",
"type": "",
"width": ""
}
],
"targetedInventorySizes": [{}]
},
"note": "",
"preferredDealTerms": { "fixedPrice": {
"amount": {},
"type": ""
} },
"programmaticGuaranteedTerms": {
"fixedPrice": {},
"guaranteedLooks": "",
"impressionCap": "",
"minimumDailyLooks": "",
"percentShareOfVoice": "",
"reservationType": ""
},
"publisherProfile": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/:buyer/proposals:sendRfp"
payload <- "{\n \"buyerContacts\": [\n {\n \"displayName\": \"\",\n \"email\": \"\"\n }\n ],\n \"client\": \"\",\n \"displayName\": \"\",\n \"estimatedGrossSpend\": {\n \"currencyCode\": \"\",\n \"nanos\": 0,\n \"units\": \"\"\n },\n \"flightEndTime\": \"\",\n \"flightStartTime\": \"\",\n \"geoTargeting\": {\n \"excludedCriteriaIds\": [],\n \"targetedCriteriaIds\": []\n },\n \"inventorySizeTargeting\": {\n \"excludedInventorySizes\": [\n {\n \"height\": \"\",\n \"type\": \"\",\n \"width\": \"\"\n }\n ],\n \"targetedInventorySizes\": [\n {}\n ]\n },\n \"note\": \"\",\n \"preferredDealTerms\": {\n \"fixedPrice\": {\n \"amount\": {},\n \"type\": \"\"\n }\n },\n \"programmaticGuaranteedTerms\": {\n \"fixedPrice\": {},\n \"guaranteedLooks\": \"\",\n \"impressionCap\": \"\",\n \"minimumDailyLooks\": \"\",\n \"percentShareOfVoice\": \"\",\n \"reservationType\": \"\"\n },\n \"publisherProfile\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/:buyer/proposals:sendRfp")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"buyerContacts\": [\n {\n \"displayName\": \"\",\n \"email\": \"\"\n }\n ],\n \"client\": \"\",\n \"displayName\": \"\",\n \"estimatedGrossSpend\": {\n \"currencyCode\": \"\",\n \"nanos\": 0,\n \"units\": \"\"\n },\n \"flightEndTime\": \"\",\n \"flightStartTime\": \"\",\n \"geoTargeting\": {\n \"excludedCriteriaIds\": [],\n \"targetedCriteriaIds\": []\n },\n \"inventorySizeTargeting\": {\n \"excludedInventorySizes\": [\n {\n \"height\": \"\",\n \"type\": \"\",\n \"width\": \"\"\n }\n ],\n \"targetedInventorySizes\": [\n {}\n ]\n },\n \"note\": \"\",\n \"preferredDealTerms\": {\n \"fixedPrice\": {\n \"amount\": {},\n \"type\": \"\"\n }\n },\n \"programmaticGuaranteedTerms\": {\n \"fixedPrice\": {},\n \"guaranteedLooks\": \"\",\n \"impressionCap\": \"\",\n \"minimumDailyLooks\": \"\",\n \"percentShareOfVoice\": \"\",\n \"reservationType\": \"\"\n },\n \"publisherProfile\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/v1/:buyer/proposals:sendRfp') do |req|
req.body = "{\n \"buyerContacts\": [\n {\n \"displayName\": \"\",\n \"email\": \"\"\n }\n ],\n \"client\": \"\",\n \"displayName\": \"\",\n \"estimatedGrossSpend\": {\n \"currencyCode\": \"\",\n \"nanos\": 0,\n \"units\": \"\"\n },\n \"flightEndTime\": \"\",\n \"flightStartTime\": \"\",\n \"geoTargeting\": {\n \"excludedCriteriaIds\": [],\n \"targetedCriteriaIds\": []\n },\n \"inventorySizeTargeting\": {\n \"excludedInventorySizes\": [\n {\n \"height\": \"\",\n \"type\": \"\",\n \"width\": \"\"\n }\n ],\n \"targetedInventorySizes\": [\n {}\n ]\n },\n \"note\": \"\",\n \"preferredDealTerms\": {\n \"fixedPrice\": {\n \"amount\": {},\n \"type\": \"\"\n }\n },\n \"programmaticGuaranteedTerms\": {\n \"fixedPrice\": {},\n \"guaranteedLooks\": \"\",\n \"impressionCap\": \"\",\n \"minimumDailyLooks\": \"\",\n \"percentShareOfVoice\": \"\",\n \"reservationType\": \"\"\n },\n \"publisherProfile\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/:buyer/proposals:sendRfp";
let payload = json!({
"buyerContacts": (
json!({
"displayName": "",
"email": ""
})
),
"client": "",
"displayName": "",
"estimatedGrossSpend": json!({
"currencyCode": "",
"nanos": 0,
"units": ""
}),
"flightEndTime": "",
"flightStartTime": "",
"geoTargeting": json!({
"excludedCriteriaIds": (),
"targetedCriteriaIds": ()
}),
"inventorySizeTargeting": json!({
"excludedInventorySizes": (
json!({
"height": "",
"type": "",
"width": ""
})
),
"targetedInventorySizes": (json!({}))
}),
"note": "",
"preferredDealTerms": json!({"fixedPrice": json!({
"amount": json!({}),
"type": ""
})}),
"programmaticGuaranteedTerms": json!({
"fixedPrice": json!({}),
"guaranteedLooks": "",
"impressionCap": "",
"minimumDailyLooks": "",
"percentShareOfVoice": "",
"reservationType": ""
}),
"publisherProfile": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/v1/:buyer/proposals:sendRfp \
--header 'content-type: application/json' \
--data '{
"buyerContacts": [
{
"displayName": "",
"email": ""
}
],
"client": "",
"displayName": "",
"estimatedGrossSpend": {
"currencyCode": "",
"nanos": 0,
"units": ""
},
"flightEndTime": "",
"flightStartTime": "",
"geoTargeting": {
"excludedCriteriaIds": [],
"targetedCriteriaIds": []
},
"inventorySizeTargeting": {
"excludedInventorySizes": [
{
"height": "",
"type": "",
"width": ""
}
],
"targetedInventorySizes": [
{}
]
},
"note": "",
"preferredDealTerms": {
"fixedPrice": {
"amount": {},
"type": ""
}
},
"programmaticGuaranteedTerms": {
"fixedPrice": {},
"guaranteedLooks": "",
"impressionCap": "",
"minimumDailyLooks": "",
"percentShareOfVoice": "",
"reservationType": ""
},
"publisherProfile": ""
}'
echo '{
"buyerContacts": [
{
"displayName": "",
"email": ""
}
],
"client": "",
"displayName": "",
"estimatedGrossSpend": {
"currencyCode": "",
"nanos": 0,
"units": ""
},
"flightEndTime": "",
"flightStartTime": "",
"geoTargeting": {
"excludedCriteriaIds": [],
"targetedCriteriaIds": []
},
"inventorySizeTargeting": {
"excludedInventorySizes": [
{
"height": "",
"type": "",
"width": ""
}
],
"targetedInventorySizes": [
{}
]
},
"note": "",
"preferredDealTerms": {
"fixedPrice": {
"amount": {},
"type": ""
}
},
"programmaticGuaranteedTerms": {
"fixedPrice": {},
"guaranteedLooks": "",
"impressionCap": "",
"minimumDailyLooks": "",
"percentShareOfVoice": "",
"reservationType": ""
},
"publisherProfile": ""
}' | \
http POST {{baseUrl}}/v1/:buyer/proposals:sendRfp \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "buyerContacts": [\n {\n "displayName": "",\n "email": ""\n }\n ],\n "client": "",\n "displayName": "",\n "estimatedGrossSpend": {\n "currencyCode": "",\n "nanos": 0,\n "units": ""\n },\n "flightEndTime": "",\n "flightStartTime": "",\n "geoTargeting": {\n "excludedCriteriaIds": [],\n "targetedCriteriaIds": []\n },\n "inventorySizeTargeting": {\n "excludedInventorySizes": [\n {\n "height": "",\n "type": "",\n "width": ""\n }\n ],\n "targetedInventorySizes": [\n {}\n ]\n },\n "note": "",\n "preferredDealTerms": {\n "fixedPrice": {\n "amount": {},\n "type": ""\n }\n },\n "programmaticGuaranteedTerms": {\n "fixedPrice": {},\n "guaranteedLooks": "",\n "impressionCap": "",\n "minimumDailyLooks": "",\n "percentShareOfVoice": "",\n "reservationType": ""\n },\n "publisherProfile": ""\n}' \
--output-document \
- {{baseUrl}}/v1/:buyer/proposals:sendRfp
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"buyerContacts": [
[
"displayName": "",
"email": ""
]
],
"client": "",
"displayName": "",
"estimatedGrossSpend": [
"currencyCode": "",
"nanos": 0,
"units": ""
],
"flightEndTime": "",
"flightStartTime": "",
"geoTargeting": [
"excludedCriteriaIds": [],
"targetedCriteriaIds": []
],
"inventorySizeTargeting": [
"excludedInventorySizes": [
[
"height": "",
"type": "",
"width": ""
]
],
"targetedInventorySizes": [[]]
],
"note": "",
"preferredDealTerms": ["fixedPrice": [
"amount": [],
"type": ""
]],
"programmaticGuaranteedTerms": [
"fixedPrice": [],
"guaranteedLooks": "",
"impressionCap": "",
"minimumDailyLooks": "",
"percentShareOfVoice": "",
"reservationType": ""
],
"publisherProfile": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/:buyer/proposals:sendRfp")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
authorizedbuyersmarketplace.buyers.publisherProfiles.get
{{baseUrl}}/v1/:name
QUERY PARAMS
name
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/:name");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v1/:name")
require "http/client"
url = "{{baseUrl}}/v1/:name"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/v1/:name"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/:name");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/:name"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/v1/:name HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v1/:name")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/:name"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/:name")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v1/:name")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/v1/:name');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/v1/:name'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/:name';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1/:name',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v1/:name")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/:name',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {method: 'GET', url: '{{baseUrl}}/v1/:name'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/v1/:name');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {method: 'GET', url: '{{baseUrl}}/v1/:name'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/:name';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/:name"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1/:name" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/:name",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/v1/:name');
echo $response->getBody();
setUrl('{{baseUrl}}/v1/:name');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v1/:name');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/:name' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/:name' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/v1/:name")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/:name"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/:name"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/:name")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/v1/:name') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/:name";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/v1/:name
http GET {{baseUrl}}/v1/:name
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/v1/:name
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/:name")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
authorizedbuyersmarketplace.buyers.publisherProfiles.list
{{baseUrl}}/v1/:parent/publisherProfiles
QUERY PARAMS
parent
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v1/:parent/publisherProfiles");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v1/:parent/publisherProfiles")
require "http/client"
url = "{{baseUrl}}/v1/:parent/publisherProfiles"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/v1/:parent/publisherProfiles"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v1/:parent/publisherProfiles");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v1/:parent/publisherProfiles"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/v1/:parent/publisherProfiles HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v1/:parent/publisherProfiles")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v1/:parent/publisherProfiles"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/v1/:parent/publisherProfiles")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v1/:parent/publisherProfiles")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/v1/:parent/publisherProfiles');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/v1/:parent/publisherProfiles'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v1/:parent/publisherProfiles';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v1/:parent/publisherProfiles',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v1/:parent/publisherProfiles")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/v1/:parent/publisherProfiles',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {method: 'GET', url: '{{baseUrl}}/v1/:parent/publisherProfiles'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/v1/:parent/publisherProfiles');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {method: 'GET', url: '{{baseUrl}}/v1/:parent/publisherProfiles'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v1/:parent/publisherProfiles';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v1/:parent/publisherProfiles"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v1/:parent/publisherProfiles" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v1/:parent/publisherProfiles",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/v1/:parent/publisherProfiles');
echo $response->getBody();
setUrl('{{baseUrl}}/v1/:parent/publisherProfiles');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v1/:parent/publisherProfiles');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v1/:parent/publisherProfiles' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v1/:parent/publisherProfiles' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/v1/:parent/publisherProfiles")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v1/:parent/publisherProfiles"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v1/:parent/publisherProfiles"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v1/:parent/publisherProfiles")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/v1/:parent/publisherProfiles') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v1/:parent/publisherProfiles";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/v1/:parent/publisherProfiles
http GET {{baseUrl}}/v1/:parent/publisherProfiles
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/v1/:parent/publisherProfiles
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v1/:parent/publisherProfiles")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()