Suggestions
GET
Get SKU Suggestion by ID
{{baseUrl}}/suggestions/:sellerId/:sellerSkuId
HEADERS
Accept
Content-Type
QUERY PARAMS
accountName
sellerId
sellerSkuId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/suggestions/:sellerId/:sellerSkuId?accountName=");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "accept: ");
headers = curl_slist_append(headers, "content-type: ");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/suggestions/:sellerId/:sellerSkuId" {:headers {:accept ""
:content-type ""}
:query-params {:accountName ""}})
require "http/client"
url = "{{baseUrl}}/suggestions/:sellerId/:sellerSkuId?accountName="
headers = HTTP::Headers{
"accept" => ""
"content-type" => ""
}
response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/suggestions/:sellerId/:sellerSkuId?accountName="),
Headers =
{
{ "accept", "" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/suggestions/:sellerId/:sellerSkuId?accountName=");
var request = new RestRequest("", Method.Get);
request.AddHeader("accept", "");
request.AddHeader("content-type", "");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/suggestions/:sellerId/:sellerSkuId?accountName="
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("accept", "")
req.Header.Add("content-type", "")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/suggestions/:sellerId/:sellerSkuId?accountName= HTTP/1.1
Accept:
Content-Type:
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/suggestions/:sellerId/:sellerSkuId?accountName=")
.setHeader("accept", "")
.setHeader("content-type", "")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/suggestions/:sellerId/:sellerSkuId?accountName="))
.header("accept", "")
.header("content-type", "")
.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}}/suggestions/:sellerId/:sellerSkuId?accountName=")
.get()
.addHeader("accept", "")
.addHeader("content-type", "")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/suggestions/:sellerId/:sellerSkuId?accountName=")
.header("accept", "")
.header("content-type", "")
.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}}/suggestions/:sellerId/:sellerSkuId?accountName=');
xhr.setRequestHeader('accept', '');
xhr.setRequestHeader('content-type', '');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/suggestions/:sellerId/:sellerSkuId',
params: {accountName: ''},
headers: {accept: '', 'content-type': ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/suggestions/:sellerId/:sellerSkuId?accountName=';
const options = {method: 'GET', headers: {accept: '', 'content-type': ''}};
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}}/suggestions/:sellerId/:sellerSkuId?accountName=',
method: 'GET',
headers: {
accept: '',
'content-type': ''
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/suggestions/:sellerId/:sellerSkuId?accountName=")
.get()
.addHeader("accept", "")
.addHeader("content-type", "")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/suggestions/:sellerId/:sellerSkuId?accountName=',
headers: {
accept: '',
'content-type': ''
}
};
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}}/suggestions/:sellerId/:sellerSkuId',
qs: {accountName: ''},
headers: {accept: '', 'content-type': ''}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/suggestions/:sellerId/:sellerSkuId');
req.query({
accountName: ''
});
req.headers({
accept: '',
'content-type': ''
});
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}}/suggestions/:sellerId/:sellerSkuId',
params: {accountName: ''},
headers: {accept: '', 'content-type': ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/suggestions/:sellerId/:sellerSkuId?accountName=';
const options = {method: 'GET', headers: {accept: '', 'content-type': ''}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"accept": @"",
@"content-type": @"" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/suggestions/:sellerId/:sellerSkuId?accountName="]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];
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}}/suggestions/:sellerId/:sellerSkuId?accountName=" in
let headers = Header.add_list (Header.init ()) [
("accept", "");
("content-type", "");
] in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/suggestions/:sellerId/:sellerSkuId?accountName=",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"accept: ",
"content-type: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/suggestions/:sellerId/:sellerSkuId?accountName=', [
'headers' => [
'accept' => '',
'content-type' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/suggestions/:sellerId/:sellerSkuId');
$request->setMethod(HTTP_METH_GET);
$request->setQueryData([
'accountName' => ''
]);
$request->setHeaders([
'accept' => '',
'content-type' => ''
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/suggestions/:sellerId/:sellerSkuId');
$request->setRequestMethod('GET');
$request->setQuery(new http\QueryString([
'accountName' => ''
]));
$request->setHeaders([
'accept' => '',
'content-type' => ''
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("accept", "")
$headers.Add("content-type", "")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/suggestions/:sellerId/:sellerSkuId?accountName=' -Method GET -Headers $headers
$headers=@{}
$headers.Add("accept", "")
$headers.Add("content-type", "")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/suggestions/:sellerId/:sellerSkuId?accountName=' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = {
'accept': "",
'content-type': ""
}
conn.request("GET", "/baseUrl/suggestions/:sellerId/:sellerSkuId?accountName=", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/suggestions/:sellerId/:sellerSkuId"
querystring = {"accountName":""}
headers = {
"accept": "",
"content-type": ""
}
response = requests.get(url, headers=headers, params=querystring)
print(response.json())
library(httr)
url <- "{{baseUrl}}/suggestions/:sellerId/:sellerSkuId"
queryString <- list(accountName = "")
response <- VERB("GET", url, query = queryString, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/suggestions/:sellerId/:sellerSkuId?accountName=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["accept"] = ''
request["content-type"] = ''
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/suggestions/:sellerId/:sellerSkuId') do |req|
req.headers['accept'] = ''
req.params['accountName'] = ''
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/suggestions/:sellerId/:sellerSkuId";
let querystring = [
("accountName", ""),
];
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("accept", "".parse().unwrap());
headers.insert("content-type", "".parse().unwrap());
let client = reqwest::Client::new();
let response = client.get(url)
.query(&querystring)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url '{{baseUrl}}/suggestions/:sellerId/:sellerSkuId?accountName=' \
--header 'accept: ' \
--header 'content-type: '
http GET '{{baseUrl}}/suggestions/:sellerId/:sellerSkuId?accountName=' \
accept:'' \
content-type:''
wget --quiet \
--method GET \
--header 'accept: ' \
--header 'content-type: ' \
--output-document \
- '{{baseUrl}}/suggestions/:sellerId/:sellerSkuId?accountName='
import Foundation
let headers = [
"accept": "",
"content-type": ""
]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/suggestions/:sellerId/:sellerSkuId?accountName=")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
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
Get all SKU suggestions
{{baseUrl}}/suggestions
HEADERS
Accept
Content-Type
QUERY PARAMS
accountName
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/suggestions?accountName=");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "accept: ");
headers = curl_slist_append(headers, "content-type: ");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/suggestions" {:headers {:accept ""
:content-type ""}
:query-params {:accountName ""}})
require "http/client"
url = "{{baseUrl}}/suggestions?accountName="
headers = HTTP::Headers{
"accept" => ""
"content-type" => ""
}
response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/suggestions?accountName="),
Headers =
{
{ "accept", "" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/suggestions?accountName=");
var request = new RestRequest("", Method.Get);
request.AddHeader("accept", "");
request.AddHeader("content-type", "");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/suggestions?accountName="
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("accept", "")
req.Header.Add("content-type", "")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/suggestions?accountName= HTTP/1.1
Accept:
Content-Type:
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/suggestions?accountName=")
.setHeader("accept", "")
.setHeader("content-type", "")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/suggestions?accountName="))
.header("accept", "")
.header("content-type", "")
.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}}/suggestions?accountName=")
.get()
.addHeader("accept", "")
.addHeader("content-type", "")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/suggestions?accountName=")
.header("accept", "")
.header("content-type", "")
.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}}/suggestions?accountName=');
xhr.setRequestHeader('accept', '');
xhr.setRequestHeader('content-type', '');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/suggestions',
params: {accountName: ''},
headers: {accept: '', 'content-type': ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/suggestions?accountName=';
const options = {method: 'GET', headers: {accept: '', 'content-type': ''}};
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}}/suggestions?accountName=',
method: 'GET',
headers: {
accept: '',
'content-type': ''
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/suggestions?accountName=")
.get()
.addHeader("accept", "")
.addHeader("content-type", "")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/suggestions?accountName=',
headers: {
accept: '',
'content-type': ''
}
};
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}}/suggestions',
qs: {accountName: ''},
headers: {accept: '', 'content-type': ''}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/suggestions');
req.query({
accountName: ''
});
req.headers({
accept: '',
'content-type': ''
});
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}}/suggestions',
params: {accountName: ''},
headers: {accept: '', 'content-type': ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/suggestions?accountName=';
const options = {method: 'GET', headers: {accept: '', 'content-type': ''}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"accept": @"",
@"content-type": @"" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/suggestions?accountName="]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];
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}}/suggestions?accountName=" in
let headers = Header.add_list (Header.init ()) [
("accept", "");
("content-type", "");
] in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/suggestions?accountName=",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"accept: ",
"content-type: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/suggestions?accountName=', [
'headers' => [
'accept' => '',
'content-type' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/suggestions');
$request->setMethod(HTTP_METH_GET);
$request->setQueryData([
'accountName' => ''
]);
$request->setHeaders([
'accept' => '',
'content-type' => ''
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/suggestions');
$request->setRequestMethod('GET');
$request->setQuery(new http\QueryString([
'accountName' => ''
]));
$request->setHeaders([
'accept' => '',
'content-type' => ''
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("accept", "")
$headers.Add("content-type", "")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/suggestions?accountName=' -Method GET -Headers $headers
$headers=@{}
$headers.Add("accept", "")
$headers.Add("content-type", "")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/suggestions?accountName=' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = {
'accept': "",
'content-type': ""
}
conn.request("GET", "/baseUrl/suggestions?accountName=", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/suggestions"
querystring = {"accountName":""}
headers = {
"accept": "",
"content-type": ""
}
response = requests.get(url, headers=headers, params=querystring)
print(response.json())
library(httr)
url <- "{{baseUrl}}/suggestions"
queryString <- list(accountName = "")
response <- VERB("GET", url, query = queryString, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/suggestions?accountName=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["accept"] = ''
request["content-type"] = ''
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/suggestions') do |req|
req.headers['accept'] = ''
req.params['accountName'] = ''
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/suggestions";
let querystring = [
("accountName", ""),
];
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("accept", "".parse().unwrap());
headers.insert("content-type", "".parse().unwrap());
let client = reqwest::Client::new();
let response = client.get(url)
.query(&querystring)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url '{{baseUrl}}/suggestions?accountName=' \
--header 'accept: ' \
--header 'content-type: '
http GET '{{baseUrl}}/suggestions?accountName=' \
accept:'' \
content-type:''
wget --quiet \
--method GET \
--header 'accept: ' \
--header 'content-type: ' \
--output-document \
- '{{baseUrl}}/suggestions?accountName='
import Foundation
let headers = [
"accept": "",
"content-type": ""
]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/suggestions?accountName=")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
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
Get Version by ID
{{baseUrl}}/suggestions/:sellerId/:sellerskuid/versions/:version
HEADERS
Accept
Content-Type
QUERY PARAMS
accountName
sellerId
sellerskuid
version
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/suggestions/:sellerId/:sellerskuid/versions/:version?accountName=");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "accept: ");
headers = curl_slist_append(headers, "content-type: ");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/suggestions/:sellerId/:sellerskuid/versions/:version" {:headers {:accept ""
:content-type ""}
:query-params {:accountName ""}})
require "http/client"
url = "{{baseUrl}}/suggestions/:sellerId/:sellerskuid/versions/:version?accountName="
headers = HTTP::Headers{
"accept" => ""
"content-type" => ""
}
response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/suggestions/:sellerId/:sellerskuid/versions/:version?accountName="),
Headers =
{
{ "accept", "" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/suggestions/:sellerId/:sellerskuid/versions/:version?accountName=");
var request = new RestRequest("", Method.Get);
request.AddHeader("accept", "");
request.AddHeader("content-type", "");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/suggestions/:sellerId/:sellerskuid/versions/:version?accountName="
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("accept", "")
req.Header.Add("content-type", "")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/suggestions/:sellerId/:sellerskuid/versions/:version?accountName= HTTP/1.1
Accept:
Content-Type:
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/suggestions/:sellerId/:sellerskuid/versions/:version?accountName=")
.setHeader("accept", "")
.setHeader("content-type", "")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/suggestions/:sellerId/:sellerskuid/versions/:version?accountName="))
.header("accept", "")
.header("content-type", "")
.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}}/suggestions/:sellerId/:sellerskuid/versions/:version?accountName=")
.get()
.addHeader("accept", "")
.addHeader("content-type", "")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/suggestions/:sellerId/:sellerskuid/versions/:version?accountName=")
.header("accept", "")
.header("content-type", "")
.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}}/suggestions/:sellerId/:sellerskuid/versions/:version?accountName=');
xhr.setRequestHeader('accept', '');
xhr.setRequestHeader('content-type', '');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/suggestions/:sellerId/:sellerskuid/versions/:version',
params: {accountName: ''},
headers: {accept: '', 'content-type': ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/suggestions/:sellerId/:sellerskuid/versions/:version?accountName=';
const options = {method: 'GET', headers: {accept: '', 'content-type': ''}};
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}}/suggestions/:sellerId/:sellerskuid/versions/:version?accountName=',
method: 'GET',
headers: {
accept: '',
'content-type': ''
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/suggestions/:sellerId/:sellerskuid/versions/:version?accountName=")
.get()
.addHeader("accept", "")
.addHeader("content-type", "")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/suggestions/:sellerId/:sellerskuid/versions/:version?accountName=',
headers: {
accept: '',
'content-type': ''
}
};
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}}/suggestions/:sellerId/:sellerskuid/versions/:version',
qs: {accountName: ''},
headers: {accept: '', 'content-type': ''}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/suggestions/:sellerId/:sellerskuid/versions/:version');
req.query({
accountName: ''
});
req.headers({
accept: '',
'content-type': ''
});
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}}/suggestions/:sellerId/:sellerskuid/versions/:version',
params: {accountName: ''},
headers: {accept: '', 'content-type': ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/suggestions/:sellerId/:sellerskuid/versions/:version?accountName=';
const options = {method: 'GET', headers: {accept: '', 'content-type': ''}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"accept": @"",
@"content-type": @"" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/suggestions/:sellerId/:sellerskuid/versions/:version?accountName="]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];
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}}/suggestions/:sellerId/:sellerskuid/versions/:version?accountName=" in
let headers = Header.add_list (Header.init ()) [
("accept", "");
("content-type", "");
] in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/suggestions/:sellerId/:sellerskuid/versions/:version?accountName=",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"accept: ",
"content-type: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/suggestions/:sellerId/:sellerskuid/versions/:version?accountName=', [
'headers' => [
'accept' => '',
'content-type' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/suggestions/:sellerId/:sellerskuid/versions/:version');
$request->setMethod(HTTP_METH_GET);
$request->setQueryData([
'accountName' => ''
]);
$request->setHeaders([
'accept' => '',
'content-type' => ''
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/suggestions/:sellerId/:sellerskuid/versions/:version');
$request->setRequestMethod('GET');
$request->setQuery(new http\QueryString([
'accountName' => ''
]));
$request->setHeaders([
'accept' => '',
'content-type' => ''
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("accept", "")
$headers.Add("content-type", "")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/suggestions/:sellerId/:sellerskuid/versions/:version?accountName=' -Method GET -Headers $headers
$headers=@{}
$headers.Add("accept", "")
$headers.Add("content-type", "")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/suggestions/:sellerId/:sellerskuid/versions/:version?accountName=' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = {
'accept': "",
'content-type': ""
}
conn.request("GET", "/baseUrl/suggestions/:sellerId/:sellerskuid/versions/:version?accountName=", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/suggestions/:sellerId/:sellerskuid/versions/:version"
querystring = {"accountName":""}
headers = {
"accept": "",
"content-type": ""
}
response = requests.get(url, headers=headers, params=querystring)
print(response.json())
library(httr)
url <- "{{baseUrl}}/suggestions/:sellerId/:sellerskuid/versions/:version"
queryString <- list(accountName = "")
response <- VERB("GET", url, query = queryString, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/suggestions/:sellerId/:sellerskuid/versions/:version?accountName=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["accept"] = ''
request["content-type"] = ''
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/suggestions/:sellerId/:sellerskuid/versions/:version') do |req|
req.headers['accept'] = ''
req.params['accountName'] = ''
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/suggestions/:sellerId/:sellerskuid/versions/:version";
let querystring = [
("accountName", ""),
];
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("accept", "".parse().unwrap());
headers.insert("content-type", "".parse().unwrap());
let client = reqwest::Client::new();
let response = client.get(url)
.query(&querystring)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url '{{baseUrl}}/suggestions/:sellerId/:sellerskuid/versions/:version?accountName=' \
--header 'accept: ' \
--header 'content-type: '
http GET '{{baseUrl}}/suggestions/:sellerId/:sellerskuid/versions/:version?accountName=' \
accept:'' \
content-type:''
wget --quiet \
--method GET \
--header 'accept: ' \
--header 'content-type: ' \
--output-document \
- '{{baseUrl}}/suggestions/:sellerId/:sellerskuid/versions/:version?accountName='
import Foundation
let headers = [
"accept": "",
"content-type": ""
]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/suggestions/:sellerId/:sellerskuid/versions/:version?accountName=")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
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
Get all Versions
{{baseUrl}}/suggestions/:sellerId/:sellerskuid/versions
HEADERS
Accept
Content-Type
QUERY PARAMS
accountName
sellerId
sellerskuid
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/suggestions/:sellerId/:sellerskuid/versions?accountName=");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "accept: ");
headers = curl_slist_append(headers, "content-type: ");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/suggestions/:sellerId/:sellerskuid/versions" {:headers {:accept ""
:content-type ""}
:query-params {:accountName ""}})
require "http/client"
url = "{{baseUrl}}/suggestions/:sellerId/:sellerskuid/versions?accountName="
headers = HTTP::Headers{
"accept" => ""
"content-type" => ""
}
response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/suggestions/:sellerId/:sellerskuid/versions?accountName="),
Headers =
{
{ "accept", "" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/suggestions/:sellerId/:sellerskuid/versions?accountName=");
var request = new RestRequest("", Method.Get);
request.AddHeader("accept", "");
request.AddHeader("content-type", "");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/suggestions/:sellerId/:sellerskuid/versions?accountName="
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("accept", "")
req.Header.Add("content-type", "")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/suggestions/:sellerId/:sellerskuid/versions?accountName= HTTP/1.1
Accept:
Content-Type:
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/suggestions/:sellerId/:sellerskuid/versions?accountName=")
.setHeader("accept", "")
.setHeader("content-type", "")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/suggestions/:sellerId/:sellerskuid/versions?accountName="))
.header("accept", "")
.header("content-type", "")
.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}}/suggestions/:sellerId/:sellerskuid/versions?accountName=")
.get()
.addHeader("accept", "")
.addHeader("content-type", "")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/suggestions/:sellerId/:sellerskuid/versions?accountName=")
.header("accept", "")
.header("content-type", "")
.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}}/suggestions/:sellerId/:sellerskuid/versions?accountName=');
xhr.setRequestHeader('accept', '');
xhr.setRequestHeader('content-type', '');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/suggestions/:sellerId/:sellerskuid/versions',
params: {accountName: ''},
headers: {accept: '', 'content-type': ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/suggestions/:sellerId/:sellerskuid/versions?accountName=';
const options = {method: 'GET', headers: {accept: '', 'content-type': ''}};
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}}/suggestions/:sellerId/:sellerskuid/versions?accountName=',
method: 'GET',
headers: {
accept: '',
'content-type': ''
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/suggestions/:sellerId/:sellerskuid/versions?accountName=")
.get()
.addHeader("accept", "")
.addHeader("content-type", "")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/suggestions/:sellerId/:sellerskuid/versions?accountName=',
headers: {
accept: '',
'content-type': ''
}
};
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}}/suggestions/:sellerId/:sellerskuid/versions',
qs: {accountName: ''},
headers: {accept: '', 'content-type': ''}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/suggestions/:sellerId/:sellerskuid/versions');
req.query({
accountName: ''
});
req.headers({
accept: '',
'content-type': ''
});
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}}/suggestions/:sellerId/:sellerskuid/versions',
params: {accountName: ''},
headers: {accept: '', 'content-type': ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/suggestions/:sellerId/:sellerskuid/versions?accountName=';
const options = {method: 'GET', headers: {accept: '', 'content-type': ''}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"accept": @"",
@"content-type": @"" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/suggestions/:sellerId/:sellerskuid/versions?accountName="]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];
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}}/suggestions/:sellerId/:sellerskuid/versions?accountName=" in
let headers = Header.add_list (Header.init ()) [
("accept", "");
("content-type", "");
] in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/suggestions/:sellerId/:sellerskuid/versions?accountName=",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"accept: ",
"content-type: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/suggestions/:sellerId/:sellerskuid/versions?accountName=', [
'headers' => [
'accept' => '',
'content-type' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/suggestions/:sellerId/:sellerskuid/versions');
$request->setMethod(HTTP_METH_GET);
$request->setQueryData([
'accountName' => ''
]);
$request->setHeaders([
'accept' => '',
'content-type' => ''
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/suggestions/:sellerId/:sellerskuid/versions');
$request->setRequestMethod('GET');
$request->setQuery(new http\QueryString([
'accountName' => ''
]));
$request->setHeaders([
'accept' => '',
'content-type' => ''
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("accept", "")
$headers.Add("content-type", "")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/suggestions/:sellerId/:sellerskuid/versions?accountName=' -Method GET -Headers $headers
$headers=@{}
$headers.Add("accept", "")
$headers.Add("content-type", "")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/suggestions/:sellerId/:sellerskuid/versions?accountName=' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = {
'accept': "",
'content-type': ""
}
conn.request("GET", "/baseUrl/suggestions/:sellerId/:sellerskuid/versions?accountName=", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/suggestions/:sellerId/:sellerskuid/versions"
querystring = {"accountName":""}
headers = {
"accept": "",
"content-type": ""
}
response = requests.get(url, headers=headers, params=querystring)
print(response.json())
library(httr)
url <- "{{baseUrl}}/suggestions/:sellerId/:sellerskuid/versions"
queryString <- list(accountName = "")
response <- VERB("GET", url, query = queryString, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/suggestions/:sellerId/:sellerskuid/versions?accountName=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["accept"] = ''
request["content-type"] = ''
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/suggestions/:sellerId/:sellerskuid/versions') do |req|
req.headers['accept'] = ''
req.params['accountName'] = ''
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/suggestions/:sellerId/:sellerskuid/versions";
let querystring = [
("accountName", ""),
];
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("accept", "".parse().unwrap());
headers.insert("content-type", "".parse().unwrap());
let client = reqwest::Client::new();
let response = client.get(url)
.query(&querystring)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url '{{baseUrl}}/suggestions/:sellerId/:sellerskuid/versions?accountName=' \
--header 'accept: ' \
--header 'content-type: '
http GET '{{baseUrl}}/suggestions/:sellerId/:sellerskuid/versions?accountName=' \
accept:'' \
content-type:''
wget --quiet \
--method GET \
--header 'accept: ' \
--header 'content-type: ' \
--output-document \
- '{{baseUrl}}/suggestions/:sellerId/:sellerskuid/versions?accountName='
import Foundation
let headers = [
"accept": "",
"content-type": ""
]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/suggestions/:sellerId/:sellerskuid/versions?accountName=")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
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
Delete SKU Suggestion
{{baseUrl}}/suggestions/:sellerId/:sellerSkuId
HEADERS
Accept
Content-Type
QUERY PARAMS
accountName
sellerId
sellerSkuId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/suggestions/:sellerId/:sellerSkuId?accountName=");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "accept: ");
headers = curl_slist_append(headers, "content-type: ");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/delete "{{baseUrl}}/suggestions/:sellerId/:sellerSkuId" {:headers {:accept ""
:content-type ""}
:query-params {:accountName ""}})
require "http/client"
url = "{{baseUrl}}/suggestions/:sellerId/:sellerSkuId?accountName="
headers = HTTP::Headers{
"accept" => ""
"content-type" => ""
}
response = HTTP::Client.delete url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Delete,
RequestUri = new Uri("{{baseUrl}}/suggestions/:sellerId/:sellerSkuId?accountName="),
Headers =
{
{ "accept", "" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/suggestions/:sellerId/:sellerSkuId?accountName=");
var request = new RestRequest("", Method.Delete);
request.AddHeader("accept", "");
request.AddHeader("content-type", "");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/suggestions/:sellerId/:sellerSkuId?accountName="
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("accept", "")
req.Header.Add("content-type", "")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
DELETE /baseUrl/suggestions/:sellerId/:sellerSkuId?accountName= HTTP/1.1
Accept:
Content-Type:
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/suggestions/:sellerId/:sellerSkuId?accountName=")
.setHeader("accept", "")
.setHeader("content-type", "")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/suggestions/:sellerId/:sellerSkuId?accountName="))
.header("accept", "")
.header("content-type", "")
.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}}/suggestions/:sellerId/:sellerSkuId?accountName=")
.delete(null)
.addHeader("accept", "")
.addHeader("content-type", "")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/suggestions/:sellerId/:sellerSkuId?accountName=")
.header("accept", "")
.header("content-type", "")
.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}}/suggestions/:sellerId/:sellerSkuId?accountName=');
xhr.setRequestHeader('accept', '');
xhr.setRequestHeader('content-type', '');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'DELETE',
url: '{{baseUrl}}/suggestions/:sellerId/:sellerSkuId',
params: {accountName: ''},
headers: {accept: '', 'content-type': ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/suggestions/:sellerId/:sellerSkuId?accountName=';
const options = {method: 'DELETE', headers: {accept: '', 'content-type': ''}};
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}}/suggestions/:sellerId/:sellerSkuId?accountName=',
method: 'DELETE',
headers: {
accept: '',
'content-type': ''
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/suggestions/:sellerId/:sellerSkuId?accountName=")
.delete(null)
.addHeader("accept", "")
.addHeader("content-type", "")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'DELETE',
hostname: 'example.com',
port: null,
path: '/baseUrl/suggestions/:sellerId/:sellerSkuId?accountName=',
headers: {
accept: '',
'content-type': ''
}
};
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}}/suggestions/:sellerId/:sellerSkuId',
qs: {accountName: ''},
headers: {accept: '', 'content-type': ''}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('DELETE', '{{baseUrl}}/suggestions/:sellerId/:sellerSkuId');
req.query({
accountName: ''
});
req.headers({
accept: '',
'content-type': ''
});
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}}/suggestions/:sellerId/:sellerSkuId',
params: {accountName: ''},
headers: {accept: '', 'content-type': ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/suggestions/:sellerId/:sellerSkuId?accountName=';
const options = {method: 'DELETE', headers: {accept: '', 'content-type': ''}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"accept": @"",
@"content-type": @"" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/suggestions/:sellerId/:sellerSkuId?accountName="]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"DELETE"];
[request setAllHTTPHeaderFields:headers];
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}}/suggestions/:sellerId/:sellerSkuId?accountName=" in
let headers = Header.add_list (Header.init ()) [
("accept", "");
("content-type", "");
] in
Client.call ~headers `DELETE uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/suggestions/:sellerId/:sellerSkuId?accountName=",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"accept: ",
"content-type: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('DELETE', '{{baseUrl}}/suggestions/:sellerId/:sellerSkuId?accountName=', [
'headers' => [
'accept' => '',
'content-type' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/suggestions/:sellerId/:sellerSkuId');
$request->setMethod(HTTP_METH_DELETE);
$request->setQueryData([
'accountName' => ''
]);
$request->setHeaders([
'accept' => '',
'content-type' => ''
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/suggestions/:sellerId/:sellerSkuId');
$request->setRequestMethod('DELETE');
$request->setQuery(new http\QueryString([
'accountName' => ''
]));
$request->setHeaders([
'accept' => '',
'content-type' => ''
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("accept", "")
$headers.Add("content-type", "")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/suggestions/:sellerId/:sellerSkuId?accountName=' -Method DELETE -Headers $headers
$headers=@{}
$headers.Add("accept", "")
$headers.Add("content-type", "")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/suggestions/:sellerId/:sellerSkuId?accountName=' -Method DELETE -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = {
'accept': "",
'content-type': ""
}
conn.request("DELETE", "/baseUrl/suggestions/:sellerId/:sellerSkuId?accountName=", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/suggestions/:sellerId/:sellerSkuId"
querystring = {"accountName":""}
headers = {
"accept": "",
"content-type": ""
}
response = requests.delete(url, headers=headers, params=querystring)
print(response.json())
library(httr)
url <- "{{baseUrl}}/suggestions/:sellerId/:sellerSkuId"
queryString <- list(accountName = "")
response <- VERB("DELETE", url, query = queryString, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/suggestions/:sellerId/:sellerSkuId?accountName=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["accept"] = ''
request["content-type"] = ''
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.delete('/baseUrl/suggestions/:sellerId/:sellerSkuId') do |req|
req.headers['accept'] = ''
req.params['accountName'] = ''
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/suggestions/:sellerId/:sellerSkuId";
let querystring = [
("accountName", ""),
];
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("accept", "".parse().unwrap());
headers.insert("content-type", "".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("DELETE").unwrap(), url)
.query(&querystring)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request DELETE \
--url '{{baseUrl}}/suggestions/:sellerId/:sellerSkuId?accountName=' \
--header 'accept: ' \
--header 'content-type: '
http DELETE '{{baseUrl}}/suggestions/:sellerId/:sellerSkuId?accountName=' \
accept:'' \
content-type:''
wget --quiet \
--method DELETE \
--header 'accept: ' \
--header 'content-type: ' \
--output-document \
- '{{baseUrl}}/suggestions/:sellerId/:sellerSkuId?accountName='
import Foundation
let headers = [
"accept": "",
"content-type": ""
]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/suggestions/:sellerId/:sellerSkuId?accountName=")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "DELETE"
request.allHTTPHeaderFields = headers
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()
PUT
Send SKU Suggestion
{{baseUrl}}/suggestions/:sellerId/:sellerSkuId
HEADERS
Accept
Content-Type
QUERY PARAMS
accountName
sellerId
sellerSkuId
BODY json
{
"AvailableQuantity": 0,
"BrandName": "",
"CategoryFullPath": "",
"EAN": "",
"Height": 0,
"Images": [
{
"imageName": "",
"imageUrl": ""
}
],
"Length": 0,
"MeasurementUnit": "",
"Pricing": {
"Currency": "",
"CurrencySymbol": "",
"SalePrice": 0
},
"ProductDescription": "",
"ProductId": "",
"ProductName": "",
"ProductSpecifications": [
{
"fieldName": "",
"fieldValues": []
}
],
"RefId": "",
"SellerId": "",
"SellerStockKeepingUnitId": 0,
"SkuName": "",
"SkuSpecifications": [
{
"fieldName": "",
"fieldValues": []
}
],
"UnitMultiplier": 0,
"Weight": 0,
"Width": 0
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/suggestions/:sellerId/:sellerSkuId?accountName=");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "accept: ");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"AvailableQuantity\": 111,\n \"BrandName\": \"Brand 1\",\n \"CategoryFullPath\": \"Category 1\",\n \"EAN\": \"EAN123\",\n \"Height\": 1,\n \"Images\": [\n {\n \"imageName\": \"Principal\",\n \"imageUrl\": \"https://i.pinimg.com/originals/2d/96/4a/2d964a6bf37d9224d0615dc85fccdd62.jpg\"\n }\n ],\n \"Length\": 1,\n \"MeasurementUnit\": \"un\",\n \"NameComplete\": \"Complete product name\",\n \"Pricing\": {\n \"Currency\": \"BRL\",\n \"CurrencySymbol\": \"R$\",\n \"SalePrice\": 399\n },\n \"ProductDescription\": \"sample\",\n \"ProductId\": \"321\",\n \"ProductName\": \"Product sample\",\n \"ProductSpecifications\": [\n {\n \"fieldName\": \"Fabric\",\n \"fieldValues\": [\n \"Cotton\",\n \"Velvet\"\n ]\n }\n ],\n \"RefId\": \"REFID123\",\n \"SellerId\": \"string\",\n \"SellerStockKeepingUnitId\": 567,\n \"SkuName\": \"Sku sample\",\n \"SkuSpecifications\": [\n {\n \"fieldName\": \"Color\",\n \"fieldValues\": [\n \"Red\",\n \"Blue\"\n ]\n }\n ],\n \"UnitMultiplier\": 1,\n \"Updated\": null,\n \"Weight\": 1,\n \"Width\": 1\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/suggestions/:sellerId/:sellerSkuId" {:headers {:accept ""}
:query-params {:accountName ""}
:content-type :json
:form-params {:AvailableQuantity 111
:BrandName "Brand 1"
:CategoryFullPath "Category 1"
:EAN "EAN123"
:Height 1
:Images [{:imageName "Principal"
:imageUrl "https://i.pinimg.com/originals/2d/96/4a/2d964a6bf37d9224d0615dc85fccdd62.jpg"}]
:Length 1
:MeasurementUnit "un"
:NameComplete "Complete product name"
:Pricing {:Currency "BRL"
:CurrencySymbol "R$"
:SalePrice 399}
:ProductDescription "sample"
:ProductId "321"
:ProductName "Product sample"
:ProductSpecifications [{:fieldName "Fabric"
:fieldValues ["Cotton" "Velvet"]}]
:RefId "REFID123"
:SellerId "string"
:SellerStockKeepingUnitId 567
:SkuName "Sku sample"
:SkuSpecifications [{:fieldName "Color"
:fieldValues ["Red" "Blue"]}]
:UnitMultiplier 1
:Updated nil
:Weight 1
:Width 1}})
require "http/client"
url = "{{baseUrl}}/suggestions/:sellerId/:sellerSkuId?accountName="
headers = HTTP::Headers{
"accept" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"AvailableQuantity\": 111,\n \"BrandName\": \"Brand 1\",\n \"CategoryFullPath\": \"Category 1\",\n \"EAN\": \"EAN123\",\n \"Height\": 1,\n \"Images\": [\n {\n \"imageName\": \"Principal\",\n \"imageUrl\": \"https://i.pinimg.com/originals/2d/96/4a/2d964a6bf37d9224d0615dc85fccdd62.jpg\"\n }\n ],\n \"Length\": 1,\n \"MeasurementUnit\": \"un\",\n \"NameComplete\": \"Complete product name\",\n \"Pricing\": {\n \"Currency\": \"BRL\",\n \"CurrencySymbol\": \"R$\",\n \"SalePrice\": 399\n },\n \"ProductDescription\": \"sample\",\n \"ProductId\": \"321\",\n \"ProductName\": \"Product sample\",\n \"ProductSpecifications\": [\n {\n \"fieldName\": \"Fabric\",\n \"fieldValues\": [\n \"Cotton\",\n \"Velvet\"\n ]\n }\n ],\n \"RefId\": \"REFID123\",\n \"SellerId\": \"string\",\n \"SellerStockKeepingUnitId\": 567,\n \"SkuName\": \"Sku sample\",\n \"SkuSpecifications\": [\n {\n \"fieldName\": \"Color\",\n \"fieldValues\": [\n \"Red\",\n \"Blue\"\n ]\n }\n ],\n \"UnitMultiplier\": 1,\n \"Updated\": null,\n \"Weight\": 1,\n \"Width\": 1\n}"
response = HTTP::Client.put url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Put,
RequestUri = new Uri("{{baseUrl}}/suggestions/:sellerId/:sellerSkuId?accountName="),
Headers =
{
{ "accept", "" },
},
Content = new StringContent("{\n \"AvailableQuantity\": 111,\n \"BrandName\": \"Brand 1\",\n \"CategoryFullPath\": \"Category 1\",\n \"EAN\": \"EAN123\",\n \"Height\": 1,\n \"Images\": [\n {\n \"imageName\": \"Principal\",\n \"imageUrl\": \"https://i.pinimg.com/originals/2d/96/4a/2d964a6bf37d9224d0615dc85fccdd62.jpg\"\n }\n ],\n \"Length\": 1,\n \"MeasurementUnit\": \"un\",\n \"NameComplete\": \"Complete product name\",\n \"Pricing\": {\n \"Currency\": \"BRL\",\n \"CurrencySymbol\": \"R$\",\n \"SalePrice\": 399\n },\n \"ProductDescription\": \"sample\",\n \"ProductId\": \"321\",\n \"ProductName\": \"Product sample\",\n \"ProductSpecifications\": [\n {\n \"fieldName\": \"Fabric\",\n \"fieldValues\": [\n \"Cotton\",\n \"Velvet\"\n ]\n }\n ],\n \"RefId\": \"REFID123\",\n \"SellerId\": \"string\",\n \"SellerStockKeepingUnitId\": 567,\n \"SkuName\": \"Sku sample\",\n \"SkuSpecifications\": [\n {\n \"fieldName\": \"Color\",\n \"fieldValues\": [\n \"Red\",\n \"Blue\"\n ]\n }\n ],\n \"UnitMultiplier\": 1,\n \"Updated\": null,\n \"Weight\": 1,\n \"Width\": 1\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}}/suggestions/:sellerId/:sellerSkuId?accountName=");
var request = new RestRequest("", Method.Put);
request.AddHeader("accept", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"AvailableQuantity\": 111,\n \"BrandName\": \"Brand 1\",\n \"CategoryFullPath\": \"Category 1\",\n \"EAN\": \"EAN123\",\n \"Height\": 1,\n \"Images\": [\n {\n \"imageName\": \"Principal\",\n \"imageUrl\": \"https://i.pinimg.com/originals/2d/96/4a/2d964a6bf37d9224d0615dc85fccdd62.jpg\"\n }\n ],\n \"Length\": 1,\n \"MeasurementUnit\": \"un\",\n \"NameComplete\": \"Complete product name\",\n \"Pricing\": {\n \"Currency\": \"BRL\",\n \"CurrencySymbol\": \"R$\",\n \"SalePrice\": 399\n },\n \"ProductDescription\": \"sample\",\n \"ProductId\": \"321\",\n \"ProductName\": \"Product sample\",\n \"ProductSpecifications\": [\n {\n \"fieldName\": \"Fabric\",\n \"fieldValues\": [\n \"Cotton\",\n \"Velvet\"\n ]\n }\n ],\n \"RefId\": \"REFID123\",\n \"SellerId\": \"string\",\n \"SellerStockKeepingUnitId\": 567,\n \"SkuName\": \"Sku sample\",\n \"SkuSpecifications\": [\n {\n \"fieldName\": \"Color\",\n \"fieldValues\": [\n \"Red\",\n \"Blue\"\n ]\n }\n ],\n \"UnitMultiplier\": 1,\n \"Updated\": null,\n \"Weight\": 1,\n \"Width\": 1\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/suggestions/:sellerId/:sellerSkuId?accountName="
payload := strings.NewReader("{\n \"AvailableQuantity\": 111,\n \"BrandName\": \"Brand 1\",\n \"CategoryFullPath\": \"Category 1\",\n \"EAN\": \"EAN123\",\n \"Height\": 1,\n \"Images\": [\n {\n \"imageName\": \"Principal\",\n \"imageUrl\": \"https://i.pinimg.com/originals/2d/96/4a/2d964a6bf37d9224d0615dc85fccdd62.jpg\"\n }\n ],\n \"Length\": 1,\n \"MeasurementUnit\": \"un\",\n \"NameComplete\": \"Complete product name\",\n \"Pricing\": {\n \"Currency\": \"BRL\",\n \"CurrencySymbol\": \"R$\",\n \"SalePrice\": 399\n },\n \"ProductDescription\": \"sample\",\n \"ProductId\": \"321\",\n \"ProductName\": \"Product sample\",\n \"ProductSpecifications\": [\n {\n \"fieldName\": \"Fabric\",\n \"fieldValues\": [\n \"Cotton\",\n \"Velvet\"\n ]\n }\n ],\n \"RefId\": \"REFID123\",\n \"SellerId\": \"string\",\n \"SellerStockKeepingUnitId\": 567,\n \"SkuName\": \"Sku sample\",\n \"SkuSpecifications\": [\n {\n \"fieldName\": \"Color\",\n \"fieldValues\": [\n \"Red\",\n \"Blue\"\n ]\n }\n ],\n \"UnitMultiplier\": 1,\n \"Updated\": null,\n \"Weight\": 1,\n \"Width\": 1\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("accept", "")
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))
}
PUT /baseUrl/suggestions/:sellerId/:sellerSkuId?accountName= HTTP/1.1
Accept:
Content-Type: application/json
Host: example.com
Content-Length: 1006
{
"AvailableQuantity": 111,
"BrandName": "Brand 1",
"CategoryFullPath": "Category 1",
"EAN": "EAN123",
"Height": 1,
"Images": [
{
"imageName": "Principal",
"imageUrl": "https://i.pinimg.com/originals/2d/96/4a/2d964a6bf37d9224d0615dc85fccdd62.jpg"
}
],
"Length": 1,
"MeasurementUnit": "un",
"NameComplete": "Complete product name",
"Pricing": {
"Currency": "BRL",
"CurrencySymbol": "R$",
"SalePrice": 399
},
"ProductDescription": "sample",
"ProductId": "321",
"ProductName": "Product sample",
"ProductSpecifications": [
{
"fieldName": "Fabric",
"fieldValues": [
"Cotton",
"Velvet"
]
}
],
"RefId": "REFID123",
"SellerId": "string",
"SellerStockKeepingUnitId": 567,
"SkuName": "Sku sample",
"SkuSpecifications": [
{
"fieldName": "Color",
"fieldValues": [
"Red",
"Blue"
]
}
],
"UnitMultiplier": 1,
"Updated": null,
"Weight": 1,
"Width": 1
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/suggestions/:sellerId/:sellerSkuId?accountName=")
.setHeader("accept", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"AvailableQuantity\": 111,\n \"BrandName\": \"Brand 1\",\n \"CategoryFullPath\": \"Category 1\",\n \"EAN\": \"EAN123\",\n \"Height\": 1,\n \"Images\": [\n {\n \"imageName\": \"Principal\",\n \"imageUrl\": \"https://i.pinimg.com/originals/2d/96/4a/2d964a6bf37d9224d0615dc85fccdd62.jpg\"\n }\n ],\n \"Length\": 1,\n \"MeasurementUnit\": \"un\",\n \"NameComplete\": \"Complete product name\",\n \"Pricing\": {\n \"Currency\": \"BRL\",\n \"CurrencySymbol\": \"R$\",\n \"SalePrice\": 399\n },\n \"ProductDescription\": \"sample\",\n \"ProductId\": \"321\",\n \"ProductName\": \"Product sample\",\n \"ProductSpecifications\": [\n {\n \"fieldName\": \"Fabric\",\n \"fieldValues\": [\n \"Cotton\",\n \"Velvet\"\n ]\n }\n ],\n \"RefId\": \"REFID123\",\n \"SellerId\": \"string\",\n \"SellerStockKeepingUnitId\": 567,\n \"SkuName\": \"Sku sample\",\n \"SkuSpecifications\": [\n {\n \"fieldName\": \"Color\",\n \"fieldValues\": [\n \"Red\",\n \"Blue\"\n ]\n }\n ],\n \"UnitMultiplier\": 1,\n \"Updated\": null,\n \"Weight\": 1,\n \"Width\": 1\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/suggestions/:sellerId/:sellerSkuId?accountName="))
.header("accept", "")
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("{\n \"AvailableQuantity\": 111,\n \"BrandName\": \"Brand 1\",\n \"CategoryFullPath\": \"Category 1\",\n \"EAN\": \"EAN123\",\n \"Height\": 1,\n \"Images\": [\n {\n \"imageName\": \"Principal\",\n \"imageUrl\": \"https://i.pinimg.com/originals/2d/96/4a/2d964a6bf37d9224d0615dc85fccdd62.jpg\"\n }\n ],\n \"Length\": 1,\n \"MeasurementUnit\": \"un\",\n \"NameComplete\": \"Complete product name\",\n \"Pricing\": {\n \"Currency\": \"BRL\",\n \"CurrencySymbol\": \"R$\",\n \"SalePrice\": 399\n },\n \"ProductDescription\": \"sample\",\n \"ProductId\": \"321\",\n \"ProductName\": \"Product sample\",\n \"ProductSpecifications\": [\n {\n \"fieldName\": \"Fabric\",\n \"fieldValues\": [\n \"Cotton\",\n \"Velvet\"\n ]\n }\n ],\n \"RefId\": \"REFID123\",\n \"SellerId\": \"string\",\n \"SellerStockKeepingUnitId\": 567,\n \"SkuName\": \"Sku sample\",\n \"SkuSpecifications\": [\n {\n \"fieldName\": \"Color\",\n \"fieldValues\": [\n \"Red\",\n \"Blue\"\n ]\n }\n ],\n \"UnitMultiplier\": 1,\n \"Updated\": null,\n \"Weight\": 1,\n \"Width\": 1\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 \"AvailableQuantity\": 111,\n \"BrandName\": \"Brand 1\",\n \"CategoryFullPath\": \"Category 1\",\n \"EAN\": \"EAN123\",\n \"Height\": 1,\n \"Images\": [\n {\n \"imageName\": \"Principal\",\n \"imageUrl\": \"https://i.pinimg.com/originals/2d/96/4a/2d964a6bf37d9224d0615dc85fccdd62.jpg\"\n }\n ],\n \"Length\": 1,\n \"MeasurementUnit\": \"un\",\n \"NameComplete\": \"Complete product name\",\n \"Pricing\": {\n \"Currency\": \"BRL\",\n \"CurrencySymbol\": \"R$\",\n \"SalePrice\": 399\n },\n \"ProductDescription\": \"sample\",\n \"ProductId\": \"321\",\n \"ProductName\": \"Product sample\",\n \"ProductSpecifications\": [\n {\n \"fieldName\": \"Fabric\",\n \"fieldValues\": [\n \"Cotton\",\n \"Velvet\"\n ]\n }\n ],\n \"RefId\": \"REFID123\",\n \"SellerId\": \"string\",\n \"SellerStockKeepingUnitId\": 567,\n \"SkuName\": \"Sku sample\",\n \"SkuSpecifications\": [\n {\n \"fieldName\": \"Color\",\n \"fieldValues\": [\n \"Red\",\n \"Blue\"\n ]\n }\n ],\n \"UnitMultiplier\": 1,\n \"Updated\": null,\n \"Weight\": 1,\n \"Width\": 1\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/suggestions/:sellerId/:sellerSkuId?accountName=")
.put(body)
.addHeader("accept", "")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/suggestions/:sellerId/:sellerSkuId?accountName=")
.header("accept", "")
.header("content-type", "application/json")
.body("{\n \"AvailableQuantity\": 111,\n \"BrandName\": \"Brand 1\",\n \"CategoryFullPath\": \"Category 1\",\n \"EAN\": \"EAN123\",\n \"Height\": 1,\n \"Images\": [\n {\n \"imageName\": \"Principal\",\n \"imageUrl\": \"https://i.pinimg.com/originals/2d/96/4a/2d964a6bf37d9224d0615dc85fccdd62.jpg\"\n }\n ],\n \"Length\": 1,\n \"MeasurementUnit\": \"un\",\n \"NameComplete\": \"Complete product name\",\n \"Pricing\": {\n \"Currency\": \"BRL\",\n \"CurrencySymbol\": \"R$\",\n \"SalePrice\": 399\n },\n \"ProductDescription\": \"sample\",\n \"ProductId\": \"321\",\n \"ProductName\": \"Product sample\",\n \"ProductSpecifications\": [\n {\n \"fieldName\": \"Fabric\",\n \"fieldValues\": [\n \"Cotton\",\n \"Velvet\"\n ]\n }\n ],\n \"RefId\": \"REFID123\",\n \"SellerId\": \"string\",\n \"SellerStockKeepingUnitId\": 567,\n \"SkuName\": \"Sku sample\",\n \"SkuSpecifications\": [\n {\n \"fieldName\": \"Color\",\n \"fieldValues\": [\n \"Red\",\n \"Blue\"\n ]\n }\n ],\n \"UnitMultiplier\": 1,\n \"Updated\": null,\n \"Weight\": 1,\n \"Width\": 1\n}")
.asString();
const data = JSON.stringify({
AvailableQuantity: 111,
BrandName: 'Brand 1',
CategoryFullPath: 'Category 1',
EAN: 'EAN123',
Height: 1,
Images: [
{
imageName: 'Principal',
imageUrl: 'https://i.pinimg.com/originals/2d/96/4a/2d964a6bf37d9224d0615dc85fccdd62.jpg'
}
],
Length: 1,
MeasurementUnit: 'un',
NameComplete: 'Complete product name',
Pricing: {
Currency: 'BRL',
CurrencySymbol: 'R$',
SalePrice: 399
},
ProductDescription: 'sample',
ProductId: '321',
ProductName: 'Product sample',
ProductSpecifications: [
{
fieldName: 'Fabric',
fieldValues: [
'Cotton',
'Velvet'
]
}
],
RefId: 'REFID123',
SellerId: 'string',
SellerStockKeepingUnitId: 567,
SkuName: 'Sku sample',
SkuSpecifications: [
{
fieldName: 'Color',
fieldValues: [
'Red',
'Blue'
]
}
],
UnitMultiplier: 1,
Updated: null,
Weight: 1,
Width: 1
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/suggestions/:sellerId/:sellerSkuId?accountName=');
xhr.setRequestHeader('accept', '');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/suggestions/:sellerId/:sellerSkuId',
params: {accountName: ''},
headers: {accept: '', 'content-type': 'application/json'},
data: {
AvailableQuantity: 111,
BrandName: 'Brand 1',
CategoryFullPath: 'Category 1',
EAN: 'EAN123',
Height: 1,
Images: [
{
imageName: 'Principal',
imageUrl: 'https://i.pinimg.com/originals/2d/96/4a/2d964a6bf37d9224d0615dc85fccdd62.jpg'
}
],
Length: 1,
MeasurementUnit: 'un',
NameComplete: 'Complete product name',
Pricing: {Currency: 'BRL', CurrencySymbol: 'R$', SalePrice: 399},
ProductDescription: 'sample',
ProductId: '321',
ProductName: 'Product sample',
ProductSpecifications: [{fieldName: 'Fabric', fieldValues: ['Cotton', 'Velvet']}],
RefId: 'REFID123',
SellerId: 'string',
SellerStockKeepingUnitId: 567,
SkuName: 'Sku sample',
SkuSpecifications: [{fieldName: 'Color', fieldValues: ['Red', 'Blue']}],
UnitMultiplier: 1,
Updated: null,
Weight: 1,
Width: 1
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/suggestions/:sellerId/:sellerSkuId?accountName=';
const options = {
method: 'PUT',
headers: {accept: '', 'content-type': 'application/json'},
body: '{"AvailableQuantity":111,"BrandName":"Brand 1","CategoryFullPath":"Category 1","EAN":"EAN123","Height":1,"Images":[{"imageName":"Principal","imageUrl":"https://i.pinimg.com/originals/2d/96/4a/2d964a6bf37d9224d0615dc85fccdd62.jpg"}],"Length":1,"MeasurementUnit":"un","NameComplete":"Complete product name","Pricing":{"Currency":"BRL","CurrencySymbol":"R$","SalePrice":399},"ProductDescription":"sample","ProductId":"321","ProductName":"Product sample","ProductSpecifications":[{"fieldName":"Fabric","fieldValues":["Cotton","Velvet"]}],"RefId":"REFID123","SellerId":"string","SellerStockKeepingUnitId":567,"SkuName":"Sku sample","SkuSpecifications":[{"fieldName":"Color","fieldValues":["Red","Blue"]}],"UnitMultiplier":1,"Updated":null,"Weight":1,"Width":1}'
};
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}}/suggestions/:sellerId/:sellerSkuId?accountName=',
method: 'PUT',
headers: {
accept: '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "AvailableQuantity": 111,\n "BrandName": "Brand 1",\n "CategoryFullPath": "Category 1",\n "EAN": "EAN123",\n "Height": 1,\n "Images": [\n {\n "imageName": "Principal",\n "imageUrl": "https://i.pinimg.com/originals/2d/96/4a/2d964a6bf37d9224d0615dc85fccdd62.jpg"\n }\n ],\n "Length": 1,\n "MeasurementUnit": "un",\n "NameComplete": "Complete product name",\n "Pricing": {\n "Currency": "BRL",\n "CurrencySymbol": "R$",\n "SalePrice": 399\n },\n "ProductDescription": "sample",\n "ProductId": "321",\n "ProductName": "Product sample",\n "ProductSpecifications": [\n {\n "fieldName": "Fabric",\n "fieldValues": [\n "Cotton",\n "Velvet"\n ]\n }\n ],\n "RefId": "REFID123",\n "SellerId": "string",\n "SellerStockKeepingUnitId": 567,\n "SkuName": "Sku sample",\n "SkuSpecifications": [\n {\n "fieldName": "Color",\n "fieldValues": [\n "Red",\n "Blue"\n ]\n }\n ],\n "UnitMultiplier": 1,\n "Updated": null,\n "Weight": 1,\n "Width": 1\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"AvailableQuantity\": 111,\n \"BrandName\": \"Brand 1\",\n \"CategoryFullPath\": \"Category 1\",\n \"EAN\": \"EAN123\",\n \"Height\": 1,\n \"Images\": [\n {\n \"imageName\": \"Principal\",\n \"imageUrl\": \"https://i.pinimg.com/originals/2d/96/4a/2d964a6bf37d9224d0615dc85fccdd62.jpg\"\n }\n ],\n \"Length\": 1,\n \"MeasurementUnit\": \"un\",\n \"NameComplete\": \"Complete product name\",\n \"Pricing\": {\n \"Currency\": \"BRL\",\n \"CurrencySymbol\": \"R$\",\n \"SalePrice\": 399\n },\n \"ProductDescription\": \"sample\",\n \"ProductId\": \"321\",\n \"ProductName\": \"Product sample\",\n \"ProductSpecifications\": [\n {\n \"fieldName\": \"Fabric\",\n \"fieldValues\": [\n \"Cotton\",\n \"Velvet\"\n ]\n }\n ],\n \"RefId\": \"REFID123\",\n \"SellerId\": \"string\",\n \"SellerStockKeepingUnitId\": 567,\n \"SkuName\": \"Sku sample\",\n \"SkuSpecifications\": [\n {\n \"fieldName\": \"Color\",\n \"fieldValues\": [\n \"Red\",\n \"Blue\"\n ]\n }\n ],\n \"UnitMultiplier\": 1,\n \"Updated\": null,\n \"Weight\": 1,\n \"Width\": 1\n}")
val request = Request.Builder()
.url("{{baseUrl}}/suggestions/:sellerId/:sellerSkuId?accountName=")
.put(body)
.addHeader("accept", "")
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PUT',
hostname: 'example.com',
port: null,
path: '/baseUrl/suggestions/:sellerId/:sellerSkuId?accountName=',
headers: {
accept: '',
'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({
AvailableQuantity: 111,
BrandName: 'Brand 1',
CategoryFullPath: 'Category 1',
EAN: 'EAN123',
Height: 1,
Images: [
{
imageName: 'Principal',
imageUrl: 'https://i.pinimg.com/originals/2d/96/4a/2d964a6bf37d9224d0615dc85fccdd62.jpg'
}
],
Length: 1,
MeasurementUnit: 'un',
NameComplete: 'Complete product name',
Pricing: {Currency: 'BRL', CurrencySymbol: 'R$', SalePrice: 399},
ProductDescription: 'sample',
ProductId: '321',
ProductName: 'Product sample',
ProductSpecifications: [{fieldName: 'Fabric', fieldValues: ['Cotton', 'Velvet']}],
RefId: 'REFID123',
SellerId: 'string',
SellerStockKeepingUnitId: 567,
SkuName: 'Sku sample',
SkuSpecifications: [{fieldName: 'Color', fieldValues: ['Red', 'Blue']}],
UnitMultiplier: 1,
Updated: null,
Weight: 1,
Width: 1
}));
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/suggestions/:sellerId/:sellerSkuId',
qs: {accountName: ''},
headers: {accept: '', 'content-type': 'application/json'},
body: {
AvailableQuantity: 111,
BrandName: 'Brand 1',
CategoryFullPath: 'Category 1',
EAN: 'EAN123',
Height: 1,
Images: [
{
imageName: 'Principal',
imageUrl: 'https://i.pinimg.com/originals/2d/96/4a/2d964a6bf37d9224d0615dc85fccdd62.jpg'
}
],
Length: 1,
MeasurementUnit: 'un',
NameComplete: 'Complete product name',
Pricing: {Currency: 'BRL', CurrencySymbol: 'R$', SalePrice: 399},
ProductDescription: 'sample',
ProductId: '321',
ProductName: 'Product sample',
ProductSpecifications: [{fieldName: 'Fabric', fieldValues: ['Cotton', 'Velvet']}],
RefId: 'REFID123',
SellerId: 'string',
SellerStockKeepingUnitId: 567,
SkuName: 'Sku sample',
SkuSpecifications: [{fieldName: 'Color', fieldValues: ['Red', 'Blue']}],
UnitMultiplier: 1,
Updated: null,
Weight: 1,
Width: 1
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PUT', '{{baseUrl}}/suggestions/:sellerId/:sellerSkuId');
req.query({
accountName: ''
});
req.headers({
accept: '',
'content-type': 'application/json'
});
req.type('json');
req.send({
AvailableQuantity: 111,
BrandName: 'Brand 1',
CategoryFullPath: 'Category 1',
EAN: 'EAN123',
Height: 1,
Images: [
{
imageName: 'Principal',
imageUrl: 'https://i.pinimg.com/originals/2d/96/4a/2d964a6bf37d9224d0615dc85fccdd62.jpg'
}
],
Length: 1,
MeasurementUnit: 'un',
NameComplete: 'Complete product name',
Pricing: {
Currency: 'BRL',
CurrencySymbol: 'R$',
SalePrice: 399
},
ProductDescription: 'sample',
ProductId: '321',
ProductName: 'Product sample',
ProductSpecifications: [
{
fieldName: 'Fabric',
fieldValues: [
'Cotton',
'Velvet'
]
}
],
RefId: 'REFID123',
SellerId: 'string',
SellerStockKeepingUnitId: 567,
SkuName: 'Sku sample',
SkuSpecifications: [
{
fieldName: 'Color',
fieldValues: [
'Red',
'Blue'
]
}
],
UnitMultiplier: 1,
Updated: null,
Weight: 1,
Width: 1
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PUT',
url: '{{baseUrl}}/suggestions/:sellerId/:sellerSkuId',
params: {accountName: ''},
headers: {accept: '', 'content-type': 'application/json'},
data: {
AvailableQuantity: 111,
BrandName: 'Brand 1',
CategoryFullPath: 'Category 1',
EAN: 'EAN123',
Height: 1,
Images: [
{
imageName: 'Principal',
imageUrl: 'https://i.pinimg.com/originals/2d/96/4a/2d964a6bf37d9224d0615dc85fccdd62.jpg'
}
],
Length: 1,
MeasurementUnit: 'un',
NameComplete: 'Complete product name',
Pricing: {Currency: 'BRL', CurrencySymbol: 'R$', SalePrice: 399},
ProductDescription: 'sample',
ProductId: '321',
ProductName: 'Product sample',
ProductSpecifications: [{fieldName: 'Fabric', fieldValues: ['Cotton', 'Velvet']}],
RefId: 'REFID123',
SellerId: 'string',
SellerStockKeepingUnitId: 567,
SkuName: 'Sku sample',
SkuSpecifications: [{fieldName: 'Color', fieldValues: ['Red', 'Blue']}],
UnitMultiplier: 1,
Updated: null,
Weight: 1,
Width: 1
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/suggestions/:sellerId/:sellerSkuId?accountName=';
const options = {
method: 'PUT',
headers: {accept: '', 'content-type': 'application/json'},
body: '{"AvailableQuantity":111,"BrandName":"Brand 1","CategoryFullPath":"Category 1","EAN":"EAN123","Height":1,"Images":[{"imageName":"Principal","imageUrl":"https://i.pinimg.com/originals/2d/96/4a/2d964a6bf37d9224d0615dc85fccdd62.jpg"}],"Length":1,"MeasurementUnit":"un","NameComplete":"Complete product name","Pricing":{"Currency":"BRL","CurrencySymbol":"R$","SalePrice":399},"ProductDescription":"sample","ProductId":"321","ProductName":"Product sample","ProductSpecifications":[{"fieldName":"Fabric","fieldValues":["Cotton","Velvet"]}],"RefId":"REFID123","SellerId":"string","SellerStockKeepingUnitId":567,"SkuName":"Sku sample","SkuSpecifications":[{"fieldName":"Color","fieldValues":["Red","Blue"]}],"UnitMultiplier":1,"Updated":null,"Weight":1,"Width":1}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"accept": @"",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"AvailableQuantity": @111,
@"BrandName": @"Brand 1",
@"CategoryFullPath": @"Category 1",
@"EAN": @"EAN123",
@"Height": @1,
@"Images": @[ @{ @"imageName": @"Principal", @"imageUrl": @"https://i.pinimg.com/originals/2d/96/4a/2d964a6bf37d9224d0615dc85fccdd62.jpg" } ],
@"Length": @1,
@"MeasurementUnit": @"un",
@"NameComplete": @"Complete product name",
@"Pricing": @{ @"Currency": @"BRL", @"CurrencySymbol": @"R$", @"SalePrice": @399 },
@"ProductDescription": @"sample",
@"ProductId": @"321",
@"ProductName": @"Product sample",
@"ProductSpecifications": @[ @{ @"fieldName": @"Fabric", @"fieldValues": @[ @"Cotton", @"Velvet" ] } ],
@"RefId": @"REFID123",
@"SellerId": @"string",
@"SellerStockKeepingUnitId": @567,
@"SkuName": @"Sku sample",
@"SkuSpecifications": @[ @{ @"fieldName": @"Color", @"fieldValues": @[ @"Red", @"Blue" ] } ],
@"UnitMultiplier": @1,
@"Updated": ,
@"Weight": @1,
@"Width": @1 };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/suggestions/:sellerId/:sellerSkuId?accountName="]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PUT"];
[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}}/suggestions/:sellerId/:sellerSkuId?accountName=" in
let headers = Header.add_list (Header.init ()) [
("accept", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"AvailableQuantity\": 111,\n \"BrandName\": \"Brand 1\",\n \"CategoryFullPath\": \"Category 1\",\n \"EAN\": \"EAN123\",\n \"Height\": 1,\n \"Images\": [\n {\n \"imageName\": \"Principal\",\n \"imageUrl\": \"https://i.pinimg.com/originals/2d/96/4a/2d964a6bf37d9224d0615dc85fccdd62.jpg\"\n }\n ],\n \"Length\": 1,\n \"MeasurementUnit\": \"un\",\n \"NameComplete\": \"Complete product name\",\n \"Pricing\": {\n \"Currency\": \"BRL\",\n \"CurrencySymbol\": \"R$\",\n \"SalePrice\": 399\n },\n \"ProductDescription\": \"sample\",\n \"ProductId\": \"321\",\n \"ProductName\": \"Product sample\",\n \"ProductSpecifications\": [\n {\n \"fieldName\": \"Fabric\",\n \"fieldValues\": [\n \"Cotton\",\n \"Velvet\"\n ]\n }\n ],\n \"RefId\": \"REFID123\",\n \"SellerId\": \"string\",\n \"SellerStockKeepingUnitId\": 567,\n \"SkuName\": \"Sku sample\",\n \"SkuSpecifications\": [\n {\n \"fieldName\": \"Color\",\n \"fieldValues\": [\n \"Red\",\n \"Blue\"\n ]\n }\n ],\n \"UnitMultiplier\": 1,\n \"Updated\": null,\n \"Weight\": 1,\n \"Width\": 1\n}" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/suggestions/:sellerId/:sellerSkuId?accountName=",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'AvailableQuantity' => 111,
'BrandName' => 'Brand 1',
'CategoryFullPath' => 'Category 1',
'EAN' => 'EAN123',
'Height' => 1,
'Images' => [
[
'imageName' => 'Principal',
'imageUrl' => 'https://i.pinimg.com/originals/2d/96/4a/2d964a6bf37d9224d0615dc85fccdd62.jpg'
]
],
'Length' => 1,
'MeasurementUnit' => 'un',
'NameComplete' => 'Complete product name',
'Pricing' => [
'Currency' => 'BRL',
'CurrencySymbol' => 'R$',
'SalePrice' => 399
],
'ProductDescription' => 'sample',
'ProductId' => '321',
'ProductName' => 'Product sample',
'ProductSpecifications' => [
[
'fieldName' => 'Fabric',
'fieldValues' => [
'Cotton',
'Velvet'
]
]
],
'RefId' => 'REFID123',
'SellerId' => 'string',
'SellerStockKeepingUnitId' => 567,
'SkuName' => 'Sku sample',
'SkuSpecifications' => [
[
'fieldName' => 'Color',
'fieldValues' => [
'Red',
'Blue'
]
]
],
'UnitMultiplier' => 1,
'Updated' => null,
'Weight' => 1,
'Width' => 1
]),
CURLOPT_HTTPHEADER => [
"accept: ",
"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('PUT', '{{baseUrl}}/suggestions/:sellerId/:sellerSkuId?accountName=', [
'body' => '{
"AvailableQuantity": 111,
"BrandName": "Brand 1",
"CategoryFullPath": "Category 1",
"EAN": "EAN123",
"Height": 1,
"Images": [
{
"imageName": "Principal",
"imageUrl": "https://i.pinimg.com/originals/2d/96/4a/2d964a6bf37d9224d0615dc85fccdd62.jpg"
}
],
"Length": 1,
"MeasurementUnit": "un",
"NameComplete": "Complete product name",
"Pricing": {
"Currency": "BRL",
"CurrencySymbol": "R$",
"SalePrice": 399
},
"ProductDescription": "sample",
"ProductId": "321",
"ProductName": "Product sample",
"ProductSpecifications": [
{
"fieldName": "Fabric",
"fieldValues": [
"Cotton",
"Velvet"
]
}
],
"RefId": "REFID123",
"SellerId": "string",
"SellerStockKeepingUnitId": 567,
"SkuName": "Sku sample",
"SkuSpecifications": [
{
"fieldName": "Color",
"fieldValues": [
"Red",
"Blue"
]
}
],
"UnitMultiplier": 1,
"Updated": null,
"Weight": 1,
"Width": 1
}',
'headers' => [
'accept' => '',
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/suggestions/:sellerId/:sellerSkuId');
$request->setMethod(HTTP_METH_PUT);
$request->setQueryData([
'accountName' => ''
]);
$request->setHeaders([
'accept' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'AvailableQuantity' => 111,
'BrandName' => 'Brand 1',
'CategoryFullPath' => 'Category 1',
'EAN' => 'EAN123',
'Height' => 1,
'Images' => [
[
'imageName' => 'Principal',
'imageUrl' => 'https://i.pinimg.com/originals/2d/96/4a/2d964a6bf37d9224d0615dc85fccdd62.jpg'
]
],
'Length' => 1,
'MeasurementUnit' => 'un',
'NameComplete' => 'Complete product name',
'Pricing' => [
'Currency' => 'BRL',
'CurrencySymbol' => 'R$',
'SalePrice' => 399
],
'ProductDescription' => 'sample',
'ProductId' => '321',
'ProductName' => 'Product sample',
'ProductSpecifications' => [
[
'fieldName' => 'Fabric',
'fieldValues' => [
'Cotton',
'Velvet'
]
]
],
'RefId' => 'REFID123',
'SellerId' => 'string',
'SellerStockKeepingUnitId' => 567,
'SkuName' => 'Sku sample',
'SkuSpecifications' => [
[
'fieldName' => 'Color',
'fieldValues' => [
'Red',
'Blue'
]
]
],
'UnitMultiplier' => 1,
'Updated' => null,
'Weight' => 1,
'Width' => 1
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'AvailableQuantity' => 111,
'BrandName' => 'Brand 1',
'CategoryFullPath' => 'Category 1',
'EAN' => 'EAN123',
'Height' => 1,
'Images' => [
[
'imageName' => 'Principal',
'imageUrl' => 'https://i.pinimg.com/originals/2d/96/4a/2d964a6bf37d9224d0615dc85fccdd62.jpg'
]
],
'Length' => 1,
'MeasurementUnit' => 'un',
'NameComplete' => 'Complete product name',
'Pricing' => [
'Currency' => 'BRL',
'CurrencySymbol' => 'R$',
'SalePrice' => 399
],
'ProductDescription' => 'sample',
'ProductId' => '321',
'ProductName' => 'Product sample',
'ProductSpecifications' => [
[
'fieldName' => 'Fabric',
'fieldValues' => [
'Cotton',
'Velvet'
]
]
],
'RefId' => 'REFID123',
'SellerId' => 'string',
'SellerStockKeepingUnitId' => 567,
'SkuName' => 'Sku sample',
'SkuSpecifications' => [
[
'fieldName' => 'Color',
'fieldValues' => [
'Red',
'Blue'
]
]
],
'UnitMultiplier' => 1,
'Updated' => null,
'Weight' => 1,
'Width' => 1
]));
$request->setRequestUrl('{{baseUrl}}/suggestions/:sellerId/:sellerSkuId');
$request->setRequestMethod('PUT');
$request->setBody($body);
$request->setQuery(new http\QueryString([
'accountName' => ''
]));
$request->setHeaders([
'accept' => '',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("accept", "")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/suggestions/:sellerId/:sellerSkuId?accountName=' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"AvailableQuantity": 111,
"BrandName": "Brand 1",
"CategoryFullPath": "Category 1",
"EAN": "EAN123",
"Height": 1,
"Images": [
{
"imageName": "Principal",
"imageUrl": "https://i.pinimg.com/originals/2d/96/4a/2d964a6bf37d9224d0615dc85fccdd62.jpg"
}
],
"Length": 1,
"MeasurementUnit": "un",
"NameComplete": "Complete product name",
"Pricing": {
"Currency": "BRL",
"CurrencySymbol": "R$",
"SalePrice": 399
},
"ProductDescription": "sample",
"ProductId": "321",
"ProductName": "Product sample",
"ProductSpecifications": [
{
"fieldName": "Fabric",
"fieldValues": [
"Cotton",
"Velvet"
]
}
],
"RefId": "REFID123",
"SellerId": "string",
"SellerStockKeepingUnitId": 567,
"SkuName": "Sku sample",
"SkuSpecifications": [
{
"fieldName": "Color",
"fieldValues": [
"Red",
"Blue"
]
}
],
"UnitMultiplier": 1,
"Updated": null,
"Weight": 1,
"Width": 1
}'
$headers=@{}
$headers.Add("accept", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/suggestions/:sellerId/:sellerSkuId?accountName=' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"AvailableQuantity": 111,
"BrandName": "Brand 1",
"CategoryFullPath": "Category 1",
"EAN": "EAN123",
"Height": 1,
"Images": [
{
"imageName": "Principal",
"imageUrl": "https://i.pinimg.com/originals/2d/96/4a/2d964a6bf37d9224d0615dc85fccdd62.jpg"
}
],
"Length": 1,
"MeasurementUnit": "un",
"NameComplete": "Complete product name",
"Pricing": {
"Currency": "BRL",
"CurrencySymbol": "R$",
"SalePrice": 399
},
"ProductDescription": "sample",
"ProductId": "321",
"ProductName": "Product sample",
"ProductSpecifications": [
{
"fieldName": "Fabric",
"fieldValues": [
"Cotton",
"Velvet"
]
}
],
"RefId": "REFID123",
"SellerId": "string",
"SellerStockKeepingUnitId": 567,
"SkuName": "Sku sample",
"SkuSpecifications": [
{
"fieldName": "Color",
"fieldValues": [
"Red",
"Blue"
]
}
],
"UnitMultiplier": 1,
"Updated": null,
"Weight": 1,
"Width": 1
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"AvailableQuantity\": 111,\n \"BrandName\": \"Brand 1\",\n \"CategoryFullPath\": \"Category 1\",\n \"EAN\": \"EAN123\",\n \"Height\": 1,\n \"Images\": [\n {\n \"imageName\": \"Principal\",\n \"imageUrl\": \"https://i.pinimg.com/originals/2d/96/4a/2d964a6bf37d9224d0615dc85fccdd62.jpg\"\n }\n ],\n \"Length\": 1,\n \"MeasurementUnit\": \"un\",\n \"NameComplete\": \"Complete product name\",\n \"Pricing\": {\n \"Currency\": \"BRL\",\n \"CurrencySymbol\": \"R$\",\n \"SalePrice\": 399\n },\n \"ProductDescription\": \"sample\",\n \"ProductId\": \"321\",\n \"ProductName\": \"Product sample\",\n \"ProductSpecifications\": [\n {\n \"fieldName\": \"Fabric\",\n \"fieldValues\": [\n \"Cotton\",\n \"Velvet\"\n ]\n }\n ],\n \"RefId\": \"REFID123\",\n \"SellerId\": \"string\",\n \"SellerStockKeepingUnitId\": 567,\n \"SkuName\": \"Sku sample\",\n \"SkuSpecifications\": [\n {\n \"fieldName\": \"Color\",\n \"fieldValues\": [\n \"Red\",\n \"Blue\"\n ]\n }\n ],\n \"UnitMultiplier\": 1,\n \"Updated\": null,\n \"Weight\": 1,\n \"Width\": 1\n}"
headers = {
'accept': "",
'content-type': "application/json"
}
conn.request("PUT", "/baseUrl/suggestions/:sellerId/:sellerSkuId?accountName=", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/suggestions/:sellerId/:sellerSkuId"
querystring = {"accountName":""}
payload = {
"AvailableQuantity": 111,
"BrandName": "Brand 1",
"CategoryFullPath": "Category 1",
"EAN": "EAN123",
"Height": 1,
"Images": [
{
"imageName": "Principal",
"imageUrl": "https://i.pinimg.com/originals/2d/96/4a/2d964a6bf37d9224d0615dc85fccdd62.jpg"
}
],
"Length": 1,
"MeasurementUnit": "un",
"NameComplete": "Complete product name",
"Pricing": {
"Currency": "BRL",
"CurrencySymbol": "R$",
"SalePrice": 399
},
"ProductDescription": "sample",
"ProductId": "321",
"ProductName": "Product sample",
"ProductSpecifications": [
{
"fieldName": "Fabric",
"fieldValues": ["Cotton", "Velvet"]
}
],
"RefId": "REFID123",
"SellerId": "string",
"SellerStockKeepingUnitId": 567,
"SkuName": "Sku sample",
"SkuSpecifications": [
{
"fieldName": "Color",
"fieldValues": ["Red", "Blue"]
}
],
"UnitMultiplier": 1,
"Updated": None,
"Weight": 1,
"Width": 1
}
headers = {
"accept": "",
"content-type": "application/json"
}
response = requests.put(url, json=payload, headers=headers, params=querystring)
print(response.json())
library(httr)
url <- "{{baseUrl}}/suggestions/:sellerId/:sellerSkuId"
queryString <- list(accountName = "")
payload <- "{\n \"AvailableQuantity\": 111,\n \"BrandName\": \"Brand 1\",\n \"CategoryFullPath\": \"Category 1\",\n \"EAN\": \"EAN123\",\n \"Height\": 1,\n \"Images\": [\n {\n \"imageName\": \"Principal\",\n \"imageUrl\": \"https://i.pinimg.com/originals/2d/96/4a/2d964a6bf37d9224d0615dc85fccdd62.jpg\"\n }\n ],\n \"Length\": 1,\n \"MeasurementUnit\": \"un\",\n \"NameComplete\": \"Complete product name\",\n \"Pricing\": {\n \"Currency\": \"BRL\",\n \"CurrencySymbol\": \"R$\",\n \"SalePrice\": 399\n },\n \"ProductDescription\": \"sample\",\n \"ProductId\": \"321\",\n \"ProductName\": \"Product sample\",\n \"ProductSpecifications\": [\n {\n \"fieldName\": \"Fabric\",\n \"fieldValues\": [\n \"Cotton\",\n \"Velvet\"\n ]\n }\n ],\n \"RefId\": \"REFID123\",\n \"SellerId\": \"string\",\n \"SellerStockKeepingUnitId\": 567,\n \"SkuName\": \"Sku sample\",\n \"SkuSpecifications\": [\n {\n \"fieldName\": \"Color\",\n \"fieldValues\": [\n \"Red\",\n \"Blue\"\n ]\n }\n ],\n \"UnitMultiplier\": 1,\n \"Updated\": null,\n \"Weight\": 1,\n \"Width\": 1\n}"
encode <- "json"
response <- VERB("PUT", url, body = payload, query = queryString, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/suggestions/:sellerId/:sellerSkuId?accountName=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["accept"] = ''
request["content-type"] = 'application/json'
request.body = "{\n \"AvailableQuantity\": 111,\n \"BrandName\": \"Brand 1\",\n \"CategoryFullPath\": \"Category 1\",\n \"EAN\": \"EAN123\",\n \"Height\": 1,\n \"Images\": [\n {\n \"imageName\": \"Principal\",\n \"imageUrl\": \"https://i.pinimg.com/originals/2d/96/4a/2d964a6bf37d9224d0615dc85fccdd62.jpg\"\n }\n ],\n \"Length\": 1,\n \"MeasurementUnit\": \"un\",\n \"NameComplete\": \"Complete product name\",\n \"Pricing\": {\n \"Currency\": \"BRL\",\n \"CurrencySymbol\": \"R$\",\n \"SalePrice\": 399\n },\n \"ProductDescription\": \"sample\",\n \"ProductId\": \"321\",\n \"ProductName\": \"Product sample\",\n \"ProductSpecifications\": [\n {\n \"fieldName\": \"Fabric\",\n \"fieldValues\": [\n \"Cotton\",\n \"Velvet\"\n ]\n }\n ],\n \"RefId\": \"REFID123\",\n \"SellerId\": \"string\",\n \"SellerStockKeepingUnitId\": 567,\n \"SkuName\": \"Sku sample\",\n \"SkuSpecifications\": [\n {\n \"fieldName\": \"Color\",\n \"fieldValues\": [\n \"Red\",\n \"Blue\"\n ]\n }\n ],\n \"UnitMultiplier\": 1,\n \"Updated\": null,\n \"Weight\": 1,\n \"Width\": 1\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.put('/baseUrl/suggestions/:sellerId/:sellerSkuId') do |req|
req.headers['accept'] = ''
req.params['accountName'] = ''
req.body = "{\n \"AvailableQuantity\": 111,\n \"BrandName\": \"Brand 1\",\n \"CategoryFullPath\": \"Category 1\",\n \"EAN\": \"EAN123\",\n \"Height\": 1,\n \"Images\": [\n {\n \"imageName\": \"Principal\",\n \"imageUrl\": \"https://i.pinimg.com/originals/2d/96/4a/2d964a6bf37d9224d0615dc85fccdd62.jpg\"\n }\n ],\n \"Length\": 1,\n \"MeasurementUnit\": \"un\",\n \"NameComplete\": \"Complete product name\",\n \"Pricing\": {\n \"Currency\": \"BRL\",\n \"CurrencySymbol\": \"R$\",\n \"SalePrice\": 399\n },\n \"ProductDescription\": \"sample\",\n \"ProductId\": \"321\",\n \"ProductName\": \"Product sample\",\n \"ProductSpecifications\": [\n {\n \"fieldName\": \"Fabric\",\n \"fieldValues\": [\n \"Cotton\",\n \"Velvet\"\n ]\n }\n ],\n \"RefId\": \"REFID123\",\n \"SellerId\": \"string\",\n \"SellerStockKeepingUnitId\": 567,\n \"SkuName\": \"Sku sample\",\n \"SkuSpecifications\": [\n {\n \"fieldName\": \"Color\",\n \"fieldValues\": [\n \"Red\",\n \"Blue\"\n ]\n }\n ],\n \"UnitMultiplier\": 1,\n \"Updated\": null,\n \"Weight\": 1,\n \"Width\": 1\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}}/suggestions/:sellerId/:sellerSkuId";
let querystring = [
("accountName", ""),
];
let payload = json!({
"AvailableQuantity": 111,
"BrandName": "Brand 1",
"CategoryFullPath": "Category 1",
"EAN": "EAN123",
"Height": 1,
"Images": (
json!({
"imageName": "Principal",
"imageUrl": "https://i.pinimg.com/originals/2d/96/4a/2d964a6bf37d9224d0615dc85fccdd62.jpg"
})
),
"Length": 1,
"MeasurementUnit": "un",
"NameComplete": "Complete product name",
"Pricing": json!({
"Currency": "BRL",
"CurrencySymbol": "R$",
"SalePrice": 399
}),
"ProductDescription": "sample",
"ProductId": "321",
"ProductName": "Product sample",
"ProductSpecifications": (
json!({
"fieldName": "Fabric",
"fieldValues": ("Cotton", "Velvet")
})
),
"RefId": "REFID123",
"SellerId": "string",
"SellerStockKeepingUnitId": 567,
"SkuName": "Sku sample",
"SkuSpecifications": (
json!({
"fieldName": "Color",
"fieldValues": ("Red", "Blue")
})
),
"UnitMultiplier": 1,
"Updated": json!(null),
"Weight": 1,
"Width": 1
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("accept", "".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PUT").unwrap(), url)
.query(&querystring)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url '{{baseUrl}}/suggestions/:sellerId/:sellerSkuId?accountName=' \
--header 'accept: ' \
--header 'content-type: application/json' \
--data '{
"AvailableQuantity": 111,
"BrandName": "Brand 1",
"CategoryFullPath": "Category 1",
"EAN": "EAN123",
"Height": 1,
"Images": [
{
"imageName": "Principal",
"imageUrl": "https://i.pinimg.com/originals/2d/96/4a/2d964a6bf37d9224d0615dc85fccdd62.jpg"
}
],
"Length": 1,
"MeasurementUnit": "un",
"NameComplete": "Complete product name",
"Pricing": {
"Currency": "BRL",
"CurrencySymbol": "R$",
"SalePrice": 399
},
"ProductDescription": "sample",
"ProductId": "321",
"ProductName": "Product sample",
"ProductSpecifications": [
{
"fieldName": "Fabric",
"fieldValues": [
"Cotton",
"Velvet"
]
}
],
"RefId": "REFID123",
"SellerId": "string",
"SellerStockKeepingUnitId": 567,
"SkuName": "Sku sample",
"SkuSpecifications": [
{
"fieldName": "Color",
"fieldValues": [
"Red",
"Blue"
]
}
],
"UnitMultiplier": 1,
"Updated": null,
"Weight": 1,
"Width": 1
}'
echo '{
"AvailableQuantity": 111,
"BrandName": "Brand 1",
"CategoryFullPath": "Category 1",
"EAN": "EAN123",
"Height": 1,
"Images": [
{
"imageName": "Principal",
"imageUrl": "https://i.pinimg.com/originals/2d/96/4a/2d964a6bf37d9224d0615dc85fccdd62.jpg"
}
],
"Length": 1,
"MeasurementUnit": "un",
"NameComplete": "Complete product name",
"Pricing": {
"Currency": "BRL",
"CurrencySymbol": "R$",
"SalePrice": 399
},
"ProductDescription": "sample",
"ProductId": "321",
"ProductName": "Product sample",
"ProductSpecifications": [
{
"fieldName": "Fabric",
"fieldValues": [
"Cotton",
"Velvet"
]
}
],
"RefId": "REFID123",
"SellerId": "string",
"SellerStockKeepingUnitId": 567,
"SkuName": "Sku sample",
"SkuSpecifications": [
{
"fieldName": "Color",
"fieldValues": [
"Red",
"Blue"
]
}
],
"UnitMultiplier": 1,
"Updated": null,
"Weight": 1,
"Width": 1
}' | \
http PUT '{{baseUrl}}/suggestions/:sellerId/:sellerSkuId?accountName=' \
accept:'' \
content-type:application/json
wget --quiet \
--method PUT \
--header 'accept: ' \
--header 'content-type: application/json' \
--body-data '{\n "AvailableQuantity": 111,\n "BrandName": "Brand 1",\n "CategoryFullPath": "Category 1",\n "EAN": "EAN123",\n "Height": 1,\n "Images": [\n {\n "imageName": "Principal",\n "imageUrl": "https://i.pinimg.com/originals/2d/96/4a/2d964a6bf37d9224d0615dc85fccdd62.jpg"\n }\n ],\n "Length": 1,\n "MeasurementUnit": "un",\n "NameComplete": "Complete product name",\n "Pricing": {\n "Currency": "BRL",\n "CurrencySymbol": "R$",\n "SalePrice": 399\n },\n "ProductDescription": "sample",\n "ProductId": "321",\n "ProductName": "Product sample",\n "ProductSpecifications": [\n {\n "fieldName": "Fabric",\n "fieldValues": [\n "Cotton",\n "Velvet"\n ]\n }\n ],\n "RefId": "REFID123",\n "SellerId": "string",\n "SellerStockKeepingUnitId": 567,\n "SkuName": "Sku sample",\n "SkuSpecifications": [\n {\n "fieldName": "Color",\n "fieldValues": [\n "Red",\n "Blue"\n ]\n }\n ],\n "UnitMultiplier": 1,\n "Updated": null,\n "Weight": 1,\n "Width": 1\n}' \
--output-document \
- '{{baseUrl}}/suggestions/:sellerId/:sellerSkuId?accountName='
import Foundation
let headers = [
"accept": "",
"content-type": "application/json"
]
let parameters = [
"AvailableQuantity": 111,
"BrandName": "Brand 1",
"CategoryFullPath": "Category 1",
"EAN": "EAN123",
"Height": 1,
"Images": [
[
"imageName": "Principal",
"imageUrl": "https://i.pinimg.com/originals/2d/96/4a/2d964a6bf37d9224d0615dc85fccdd62.jpg"
]
],
"Length": 1,
"MeasurementUnit": "un",
"NameComplete": "Complete product name",
"Pricing": [
"Currency": "BRL",
"CurrencySymbol": "R$",
"SalePrice": 399
],
"ProductDescription": "sample",
"ProductId": "321",
"ProductName": "Product sample",
"ProductSpecifications": [
[
"fieldName": "Fabric",
"fieldValues": ["Cotton", "Velvet"]
]
],
"RefId": "REFID123",
"SellerId": "string",
"SellerStockKeepingUnitId": 567,
"SkuName": "Sku sample",
"SkuSpecifications": [
[
"fieldName": "Color",
"fieldValues": ["Red", "Blue"]
]
],
"UnitMultiplier": 1,
"Updated": ,
"Weight": 1,
"Width": 1
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/suggestions/:sellerId/:sellerSkuId?accountName=")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PUT"
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()
PUT
Match Multiple Received SKUs
{{baseUrl}}/suggestions/matches/action/:actionName
HEADERS
Content-Type
Accept
QUERY PARAMS
accountName
actionName
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/suggestions/matches/action/:actionName?accountName=");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: ");
headers = curl_slist_append(headers, "accept: ");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/suggestions/matches/action/:actionName" {:headers {:content-type ""
:accept ""}
:query-params {:accountName ""}})
require "http/client"
url = "{{baseUrl}}/suggestions/matches/action/:actionName?accountName="
headers = HTTP::Headers{
"content-type" => ""
"accept" => ""
}
response = HTTP::Client.put url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Put,
RequestUri = new Uri("{{baseUrl}}/suggestions/matches/action/:actionName?accountName="),
Headers =
{
{ "accept", "" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/suggestions/matches/action/:actionName?accountName=");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "");
request.AddHeader("accept", "");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/suggestions/matches/action/:actionName?accountName="
req, _ := http.NewRequest("PUT", url, nil)
req.Header.Add("content-type", "")
req.Header.Add("accept", "")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
PUT /baseUrl/suggestions/matches/action/:actionName?accountName= HTTP/1.1
Content-Type:
Accept:
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/suggestions/matches/action/:actionName?accountName=")
.setHeader("content-type", "")
.setHeader("accept", "")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/suggestions/matches/action/:actionName?accountName="))
.header("content-type", "")
.header("accept", "")
.method("PUT", 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}}/suggestions/matches/action/:actionName?accountName=")
.put(null)
.addHeader("content-type", "")
.addHeader("accept", "")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/suggestions/matches/action/:actionName?accountName=")
.header("content-type", "")
.header("accept", "")
.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('PUT', '{{baseUrl}}/suggestions/matches/action/:actionName?accountName=');
xhr.setRequestHeader('content-type', '');
xhr.setRequestHeader('accept', '');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/suggestions/matches/action/:actionName',
params: {accountName: ''},
headers: {'content-type': '', accept: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/suggestions/matches/action/:actionName?accountName=';
const options = {method: 'PUT', headers: {'content-type': '', accept: ''}};
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}}/suggestions/matches/action/:actionName?accountName=',
method: 'PUT',
headers: {
'content-type': '',
accept: ''
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/suggestions/matches/action/:actionName?accountName=")
.put(null)
.addHeader("content-type", "")
.addHeader("accept", "")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PUT',
hostname: 'example.com',
port: null,
path: '/baseUrl/suggestions/matches/action/:actionName?accountName=',
headers: {
'content-type': '',
accept: ''
}
};
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: 'PUT',
url: '{{baseUrl}}/suggestions/matches/action/:actionName',
qs: {accountName: ''},
headers: {'content-type': '', accept: ''}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PUT', '{{baseUrl}}/suggestions/matches/action/:actionName');
req.query({
accountName: ''
});
req.headers({
'content-type': '',
accept: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PUT',
url: '{{baseUrl}}/suggestions/matches/action/:actionName',
params: {accountName: ''},
headers: {'content-type': '', accept: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/suggestions/matches/action/:actionName?accountName=';
const options = {method: 'PUT', headers: {'content-type': '', accept: ''}};
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": @"",
@"accept": @"" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/suggestions/matches/action/:actionName?accountName="]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PUT"];
[request setAllHTTPHeaderFields:headers];
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}}/suggestions/matches/action/:actionName?accountName=" in
let headers = Header.add_list (Header.init ()) [
("content-type", "");
("accept", "");
] in
Client.call ~headers `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/suggestions/matches/action/:actionName?accountName=",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_HTTPHEADER => [
"accept: ",
"content-type: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('PUT', '{{baseUrl}}/suggestions/matches/action/:actionName?accountName=', [
'headers' => [
'accept' => '',
'content-type' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/suggestions/matches/action/:actionName');
$request->setMethod(HTTP_METH_PUT);
$request->setQueryData([
'accountName' => ''
]);
$request->setHeaders([
'content-type' => '',
'accept' => ''
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/suggestions/matches/action/:actionName');
$request->setRequestMethod('PUT');
$request->setQuery(new http\QueryString([
'accountName' => ''
]));
$request->setHeaders([
'content-type' => '',
'accept' => ''
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "")
$headers.Add("accept", "")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/suggestions/matches/action/:actionName?accountName=' -Method PUT -Headers $headers
$headers=@{}
$headers.Add("content-type", "")
$headers.Add("accept", "")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/suggestions/matches/action/:actionName?accountName=' -Method PUT -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = {
'content-type': "",
'accept': ""
}
conn.request("PUT", "/baseUrl/suggestions/matches/action/:actionName?accountName=", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/suggestions/matches/action/:actionName"
querystring = {"accountName":""}
headers = {
"content-type": "",
"accept": ""
}
response = requests.put(url, headers=headers, params=querystring)
print(response.json())
library(httr)
url <- "{{baseUrl}}/suggestions/matches/action/:actionName"
queryString <- list(accountName = "")
response <- VERB("PUT", url, query = queryString, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/suggestions/matches/action/:actionName?accountName=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["content-type"] = ''
request["accept"] = ''
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.put('/baseUrl/suggestions/matches/action/:actionName') do |req|
req.headers['accept'] = ''
req.params['accountName'] = ''
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/suggestions/matches/action/:actionName";
let querystring = [
("accountName", ""),
];
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "".parse().unwrap());
headers.insert("accept", "".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PUT").unwrap(), url)
.query(&querystring)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url '{{baseUrl}}/suggestions/matches/action/:actionName?accountName=' \
--header 'accept: ' \
--header 'content-type: '
http PUT '{{baseUrl}}/suggestions/matches/action/:actionName?accountName=' \
accept:'' \
content-type:''
wget --quiet \
--method PUT \
--header 'content-type: ' \
--header 'accept: ' \
--output-document \
- '{{baseUrl}}/suggestions/matches/action/:actionName?accountName='
import Foundation
let headers = [
"content-type": "",
"accept": ""
]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/suggestions/matches/action/:actionName?accountName=")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
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()
PUT
Match Received SKUs individually
{{baseUrl}}/suggestions/:sellerId/:sellerskuid/versions/:version/matches/:matchid
HEADERS
Accept
Content-Type
QUERY PARAMS
accountName
sellerId
sellerskuid
version
matchid
BODY json
{
"matchType": "",
"matcherId": "",
"product": {
"brandId": 0,
"categoryId": 0,
"description": "",
"name": "",
"specifications": ""
},
"productRef": "",
"score": "",
"sku": {
"eans": [],
"height": 0,
"images": [],
"length": 0,
"measurementUnit": "",
"name": "",
"refId": "",
"specifications": {
"Embalagem": ""
},
"unitMultiplier": 0,
"weight": 0,
"width": 0
},
"skuRef": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/suggestions/:sellerId/:sellerskuid/versions/:version/matches/:matchid?accountName=");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "accept: ");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"matchType\": \"itemMatch\",\n \"matcherId\": \"{{matcherid}}\",\n \"product\": {\n \"brandId\": 1234567,\n \"categoryId\": 12,\n \"description\": \"Book description\",\n \"matchType\": \"itemMatch\",\n \"name\": \"Book A\",\n \"specifications\": null\n },\n \"productRef\": \"{{productRef}}(should be specified when match is a product match)\",\n \"score\": \"{{score}} (must be decimal)\",\n \"sku\": {\n \"eans\": [\n \"12345678901213\"\n ],\n \"height\": 1,\n \"images\": [\n {\n \"imagem1.jpg\": {\n \"imagem1.jpg\": \"https://imageurl.example\"\n }\n }\n ],\n \"length\": 1,\n \"measurementUnit\": \"un\",\n \"name\": \"Sku exemplo\",\n \"refId\": null,\n \"specifications\": {\n \"Embalagem\": \"3 k g\"\n },\n \"unitMultiplier\": 1,\n \"weight\": 1,\n \"width\": 1\n },\n \"skuRef\": \"{{skuid}}(should be specifed when match is a sku match)\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/suggestions/:sellerId/:sellerskuid/versions/:version/matches/:matchid" {:headers {:accept ""}
:query-params {:accountName ""}
:content-type :json
:form-params {:matchType "itemMatch"
:matcherId "{{matcherid}}"
:product {:brandId 1234567
:categoryId 12
:description "Book description"
:matchType "itemMatch"
:name "Book A"
:specifications nil}
:productRef "{{productRef}}(should be specified when match is a product match)"
:score "{{score}} (must be decimal)"
:sku {:eans ["12345678901213"]
:height 1
:images [{:imagem1.jpg {:imagem1.jpg "https://imageurl.example"}}]
:length 1
:measurementUnit "un"
:name "Sku exemplo"
:refId nil
:specifications {:Embalagem "3 k g"}
:unitMultiplier 1
:weight 1
:width 1}
:skuRef "{{skuid}}(should be specifed when match is a sku match)"}})
require "http/client"
url = "{{baseUrl}}/suggestions/:sellerId/:sellerskuid/versions/:version/matches/:matchid?accountName="
headers = HTTP::Headers{
"accept" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"matchType\": \"itemMatch\",\n \"matcherId\": \"{{matcherid}}\",\n \"product\": {\n \"brandId\": 1234567,\n \"categoryId\": 12,\n \"description\": \"Book description\",\n \"matchType\": \"itemMatch\",\n \"name\": \"Book A\",\n \"specifications\": null\n },\n \"productRef\": \"{{productRef}}(should be specified when match is a product match)\",\n \"score\": \"{{score}} (must be decimal)\",\n \"sku\": {\n \"eans\": [\n \"12345678901213\"\n ],\n \"height\": 1,\n \"images\": [\n {\n \"imagem1.jpg\": {\n \"imagem1.jpg\": \"https://imageurl.example\"\n }\n }\n ],\n \"length\": 1,\n \"measurementUnit\": \"un\",\n \"name\": \"Sku exemplo\",\n \"refId\": null,\n \"specifications\": {\n \"Embalagem\": \"3 k g\"\n },\n \"unitMultiplier\": 1,\n \"weight\": 1,\n \"width\": 1\n },\n \"skuRef\": \"{{skuid}}(should be specifed when match is a sku match)\"\n}"
response = HTTP::Client.put url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Put,
RequestUri = new Uri("{{baseUrl}}/suggestions/:sellerId/:sellerskuid/versions/:version/matches/:matchid?accountName="),
Headers =
{
{ "accept", "" },
},
Content = new StringContent("{\n \"matchType\": \"itemMatch\",\n \"matcherId\": \"{{matcherid}}\",\n \"product\": {\n \"brandId\": 1234567,\n \"categoryId\": 12,\n \"description\": \"Book description\",\n \"matchType\": \"itemMatch\",\n \"name\": \"Book A\",\n \"specifications\": null\n },\n \"productRef\": \"{{productRef}}(should be specified when match is a product match)\",\n \"score\": \"{{score}} (must be decimal)\",\n \"sku\": {\n \"eans\": [\n \"12345678901213\"\n ],\n \"height\": 1,\n \"images\": [\n {\n \"imagem1.jpg\": {\n \"imagem1.jpg\": \"https://imageurl.example\"\n }\n }\n ],\n \"length\": 1,\n \"measurementUnit\": \"un\",\n \"name\": \"Sku exemplo\",\n \"refId\": null,\n \"specifications\": {\n \"Embalagem\": \"3 k g\"\n },\n \"unitMultiplier\": 1,\n \"weight\": 1,\n \"width\": 1\n },\n \"skuRef\": \"{{skuid}}(should be specifed when match is a sku match)\"\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}}/suggestions/:sellerId/:sellerskuid/versions/:version/matches/:matchid?accountName=");
var request = new RestRequest("", Method.Put);
request.AddHeader("accept", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"matchType\": \"itemMatch\",\n \"matcherId\": \"{{matcherid}}\",\n \"product\": {\n \"brandId\": 1234567,\n \"categoryId\": 12,\n \"description\": \"Book description\",\n \"matchType\": \"itemMatch\",\n \"name\": \"Book A\",\n \"specifications\": null\n },\n \"productRef\": \"{{productRef}}(should be specified when match is a product match)\",\n \"score\": \"{{score}} (must be decimal)\",\n \"sku\": {\n \"eans\": [\n \"12345678901213\"\n ],\n \"height\": 1,\n \"images\": [\n {\n \"imagem1.jpg\": {\n \"imagem1.jpg\": \"https://imageurl.example\"\n }\n }\n ],\n \"length\": 1,\n \"measurementUnit\": \"un\",\n \"name\": \"Sku exemplo\",\n \"refId\": null,\n \"specifications\": {\n \"Embalagem\": \"3 k g\"\n },\n \"unitMultiplier\": 1,\n \"weight\": 1,\n \"width\": 1\n },\n \"skuRef\": \"{{skuid}}(should be specifed when match is a sku match)\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/suggestions/:sellerId/:sellerskuid/versions/:version/matches/:matchid?accountName="
payload := strings.NewReader("{\n \"matchType\": \"itemMatch\",\n \"matcherId\": \"{{matcherid}}\",\n \"product\": {\n \"brandId\": 1234567,\n \"categoryId\": 12,\n \"description\": \"Book description\",\n \"matchType\": \"itemMatch\",\n \"name\": \"Book A\",\n \"specifications\": null\n },\n \"productRef\": \"{{productRef}}(should be specified when match is a product match)\",\n \"score\": \"{{score}} (must be decimal)\",\n \"sku\": {\n \"eans\": [\n \"12345678901213\"\n ],\n \"height\": 1,\n \"images\": [\n {\n \"imagem1.jpg\": {\n \"imagem1.jpg\": \"https://imageurl.example\"\n }\n }\n ],\n \"length\": 1,\n \"measurementUnit\": \"un\",\n \"name\": \"Sku exemplo\",\n \"refId\": null,\n \"specifications\": {\n \"Embalagem\": \"3 k g\"\n },\n \"unitMultiplier\": 1,\n \"weight\": 1,\n \"width\": 1\n },\n \"skuRef\": \"{{skuid}}(should be specifed when match is a sku match)\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("accept", "")
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))
}
PUT /baseUrl/suggestions/:sellerId/:sellerskuid/versions/:version/matches/:matchid?accountName= HTTP/1.1
Accept:
Content-Type: application/json
Host: example.com
Content-Length: 856
{
"matchType": "itemMatch",
"matcherId": "{{matcherid}}",
"product": {
"brandId": 1234567,
"categoryId": 12,
"description": "Book description",
"matchType": "itemMatch",
"name": "Book A",
"specifications": null
},
"productRef": "{{productRef}}(should be specified when match is a product match)",
"score": "{{score}} (must be decimal)",
"sku": {
"eans": [
"12345678901213"
],
"height": 1,
"images": [
{
"imagem1.jpg": {
"imagem1.jpg": "https://imageurl.example"
}
}
],
"length": 1,
"measurementUnit": "un",
"name": "Sku exemplo",
"refId": null,
"specifications": {
"Embalagem": "3 k g"
},
"unitMultiplier": 1,
"weight": 1,
"width": 1
},
"skuRef": "{{skuid}}(should be specifed when match is a sku match)"
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/suggestions/:sellerId/:sellerskuid/versions/:version/matches/:matchid?accountName=")
.setHeader("accept", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"matchType\": \"itemMatch\",\n \"matcherId\": \"{{matcherid}}\",\n \"product\": {\n \"brandId\": 1234567,\n \"categoryId\": 12,\n \"description\": \"Book description\",\n \"matchType\": \"itemMatch\",\n \"name\": \"Book A\",\n \"specifications\": null\n },\n \"productRef\": \"{{productRef}}(should be specified when match is a product match)\",\n \"score\": \"{{score}} (must be decimal)\",\n \"sku\": {\n \"eans\": [\n \"12345678901213\"\n ],\n \"height\": 1,\n \"images\": [\n {\n \"imagem1.jpg\": {\n \"imagem1.jpg\": \"https://imageurl.example\"\n }\n }\n ],\n \"length\": 1,\n \"measurementUnit\": \"un\",\n \"name\": \"Sku exemplo\",\n \"refId\": null,\n \"specifications\": {\n \"Embalagem\": \"3 k g\"\n },\n \"unitMultiplier\": 1,\n \"weight\": 1,\n \"width\": 1\n },\n \"skuRef\": \"{{skuid}}(should be specifed when match is a sku match)\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/suggestions/:sellerId/:sellerskuid/versions/:version/matches/:matchid?accountName="))
.header("accept", "")
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("{\n \"matchType\": \"itemMatch\",\n \"matcherId\": \"{{matcherid}}\",\n \"product\": {\n \"brandId\": 1234567,\n \"categoryId\": 12,\n \"description\": \"Book description\",\n \"matchType\": \"itemMatch\",\n \"name\": \"Book A\",\n \"specifications\": null\n },\n \"productRef\": \"{{productRef}}(should be specified when match is a product match)\",\n \"score\": \"{{score}} (must be decimal)\",\n \"sku\": {\n \"eans\": [\n \"12345678901213\"\n ],\n \"height\": 1,\n \"images\": [\n {\n \"imagem1.jpg\": {\n \"imagem1.jpg\": \"https://imageurl.example\"\n }\n }\n ],\n \"length\": 1,\n \"measurementUnit\": \"un\",\n \"name\": \"Sku exemplo\",\n \"refId\": null,\n \"specifications\": {\n \"Embalagem\": \"3 k g\"\n },\n \"unitMultiplier\": 1,\n \"weight\": 1,\n \"width\": 1\n },\n \"skuRef\": \"{{skuid}}(should be specifed when match is a sku match)\"\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 \"matchType\": \"itemMatch\",\n \"matcherId\": \"{{matcherid}}\",\n \"product\": {\n \"brandId\": 1234567,\n \"categoryId\": 12,\n \"description\": \"Book description\",\n \"matchType\": \"itemMatch\",\n \"name\": \"Book A\",\n \"specifications\": null\n },\n \"productRef\": \"{{productRef}}(should be specified when match is a product match)\",\n \"score\": \"{{score}} (must be decimal)\",\n \"sku\": {\n \"eans\": [\n \"12345678901213\"\n ],\n \"height\": 1,\n \"images\": [\n {\n \"imagem1.jpg\": {\n \"imagem1.jpg\": \"https://imageurl.example\"\n }\n }\n ],\n \"length\": 1,\n \"measurementUnit\": \"un\",\n \"name\": \"Sku exemplo\",\n \"refId\": null,\n \"specifications\": {\n \"Embalagem\": \"3 k g\"\n },\n \"unitMultiplier\": 1,\n \"weight\": 1,\n \"width\": 1\n },\n \"skuRef\": \"{{skuid}}(should be specifed when match is a sku match)\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/suggestions/:sellerId/:sellerskuid/versions/:version/matches/:matchid?accountName=")
.put(body)
.addHeader("accept", "")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/suggestions/:sellerId/:sellerskuid/versions/:version/matches/:matchid?accountName=")
.header("accept", "")
.header("content-type", "application/json")
.body("{\n \"matchType\": \"itemMatch\",\n \"matcherId\": \"{{matcherid}}\",\n \"product\": {\n \"brandId\": 1234567,\n \"categoryId\": 12,\n \"description\": \"Book description\",\n \"matchType\": \"itemMatch\",\n \"name\": \"Book A\",\n \"specifications\": null\n },\n \"productRef\": \"{{productRef}}(should be specified when match is a product match)\",\n \"score\": \"{{score}} (must be decimal)\",\n \"sku\": {\n \"eans\": [\n \"12345678901213\"\n ],\n \"height\": 1,\n \"images\": [\n {\n \"imagem1.jpg\": {\n \"imagem1.jpg\": \"https://imageurl.example\"\n }\n }\n ],\n \"length\": 1,\n \"measurementUnit\": \"un\",\n \"name\": \"Sku exemplo\",\n \"refId\": null,\n \"specifications\": {\n \"Embalagem\": \"3 k g\"\n },\n \"unitMultiplier\": 1,\n \"weight\": 1,\n \"width\": 1\n },\n \"skuRef\": \"{{skuid}}(should be specifed when match is a sku match)\"\n}")
.asString();
const data = JSON.stringify({
matchType: 'itemMatch',
matcherId: '{{matcherid}}',
product: {
brandId: 1234567,
categoryId: 12,
description: 'Book description',
matchType: 'itemMatch',
name: 'Book A',
specifications: null
},
productRef: '{{productRef}}(should be specified when match is a product match)',
score: '{{score}} (must be decimal)',
sku: {
eans: [
'12345678901213'
],
height: 1,
images: [
{
'imagem1.jpg': {
'imagem1.jpg': 'https://imageurl.example'
}
}
],
length: 1,
measurementUnit: 'un',
name: 'Sku exemplo',
refId: null,
specifications: {
Embalagem: '3 k g'
},
unitMultiplier: 1,
weight: 1,
width: 1
},
skuRef: '{{skuid}}(should be specifed when match is a sku match)'
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/suggestions/:sellerId/:sellerskuid/versions/:version/matches/:matchid?accountName=');
xhr.setRequestHeader('accept', '');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/suggestions/:sellerId/:sellerskuid/versions/:version/matches/:matchid',
params: {accountName: ''},
headers: {accept: '', 'content-type': 'application/json'},
data: {
matchType: 'itemMatch',
matcherId: '{{matcherid}}',
product: {
brandId: 1234567,
categoryId: 12,
description: 'Book description',
matchType: 'itemMatch',
name: 'Book A',
specifications: null
},
productRef: '{{productRef}}(should be specified when match is a product match)',
score: '{{score}} (must be decimal)',
sku: {
eans: ['12345678901213'],
height: 1,
images: [{'imagem1.jpg': {'imagem1.jpg': 'https://imageurl.example'}}],
length: 1,
measurementUnit: 'un',
name: 'Sku exemplo',
refId: null,
specifications: {Embalagem: '3 k g'},
unitMultiplier: 1,
weight: 1,
width: 1
},
skuRef: '{{skuid}}(should be specifed when match is a sku match)'
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/suggestions/:sellerId/:sellerskuid/versions/:version/matches/:matchid?accountName=';
const options = {
method: 'PUT',
headers: {accept: '', 'content-type': 'application/json'},
body: '{"matchType":"itemMatch","matcherId":"{{matcherid}}","product":{"brandId":1234567,"categoryId":12,"description":"Book description","matchType":"itemMatch","name":"Book A","specifications":null},"productRef":"{{productRef}}(should be specified when match is a product match)","score":"{{score}} (must be decimal)","sku":{"eans":["12345678901213"],"height":1,"images":[{"imagem1.jpg":{"imagem1.jpg":"https://imageurl.example"}}],"length":1,"measurementUnit":"un","name":"Sku exemplo","refId":null,"specifications":{"Embalagem":"3 k g"},"unitMultiplier":1,"weight":1,"width":1},"skuRef":"{{skuid}}(should be specifed when match is a sku match)"}'
};
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}}/suggestions/:sellerId/:sellerskuid/versions/:version/matches/:matchid?accountName=',
method: 'PUT',
headers: {
accept: '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "matchType": "itemMatch",\n "matcherId": "{{matcherid}}",\n "product": {\n "brandId": 1234567,\n "categoryId": 12,\n "description": "Book description",\n "matchType": "itemMatch",\n "name": "Book A",\n "specifications": null\n },\n "productRef": "{{productRef}}(should be specified when match is a product match)",\n "score": "{{score}} (must be decimal)",\n "sku": {\n "eans": [\n "12345678901213"\n ],\n "height": 1,\n "images": [\n {\n "imagem1.jpg": {\n "imagem1.jpg": "https://imageurl.example"\n }\n }\n ],\n "length": 1,\n "measurementUnit": "un",\n "name": "Sku exemplo",\n "refId": null,\n "specifications": {\n "Embalagem": "3 k g"\n },\n "unitMultiplier": 1,\n "weight": 1,\n "width": 1\n },\n "skuRef": "{{skuid}}(should be specifed when match is a sku match)"\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"matchType\": \"itemMatch\",\n \"matcherId\": \"{{matcherid}}\",\n \"product\": {\n \"brandId\": 1234567,\n \"categoryId\": 12,\n \"description\": \"Book description\",\n \"matchType\": \"itemMatch\",\n \"name\": \"Book A\",\n \"specifications\": null\n },\n \"productRef\": \"{{productRef}}(should be specified when match is a product match)\",\n \"score\": \"{{score}} (must be decimal)\",\n \"sku\": {\n \"eans\": [\n \"12345678901213\"\n ],\n \"height\": 1,\n \"images\": [\n {\n \"imagem1.jpg\": {\n \"imagem1.jpg\": \"https://imageurl.example\"\n }\n }\n ],\n \"length\": 1,\n \"measurementUnit\": \"un\",\n \"name\": \"Sku exemplo\",\n \"refId\": null,\n \"specifications\": {\n \"Embalagem\": \"3 k g\"\n },\n \"unitMultiplier\": 1,\n \"weight\": 1,\n \"width\": 1\n },\n \"skuRef\": \"{{skuid}}(should be specifed when match is a sku match)\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/suggestions/:sellerId/:sellerskuid/versions/:version/matches/:matchid?accountName=")
.put(body)
.addHeader("accept", "")
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PUT',
hostname: 'example.com',
port: null,
path: '/baseUrl/suggestions/:sellerId/:sellerskuid/versions/:version/matches/:matchid?accountName=',
headers: {
accept: '',
'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({
matchType: 'itemMatch',
matcherId: '{{matcherid}}',
product: {
brandId: 1234567,
categoryId: 12,
description: 'Book description',
matchType: 'itemMatch',
name: 'Book A',
specifications: null
},
productRef: '{{productRef}}(should be specified when match is a product match)',
score: '{{score}} (must be decimal)',
sku: {
eans: ['12345678901213'],
height: 1,
images: [{'imagem1.jpg': {'imagem1.jpg': 'https://imageurl.example'}}],
length: 1,
measurementUnit: 'un',
name: 'Sku exemplo',
refId: null,
specifications: {Embalagem: '3 k g'},
unitMultiplier: 1,
weight: 1,
width: 1
},
skuRef: '{{skuid}}(should be specifed when match is a sku match)'
}));
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/suggestions/:sellerId/:sellerskuid/versions/:version/matches/:matchid',
qs: {accountName: ''},
headers: {accept: '', 'content-type': 'application/json'},
body: {
matchType: 'itemMatch',
matcherId: '{{matcherid}}',
product: {
brandId: 1234567,
categoryId: 12,
description: 'Book description',
matchType: 'itemMatch',
name: 'Book A',
specifications: null
},
productRef: '{{productRef}}(should be specified when match is a product match)',
score: '{{score}} (must be decimal)',
sku: {
eans: ['12345678901213'],
height: 1,
images: [{'imagem1.jpg': {'imagem1.jpg': 'https://imageurl.example'}}],
length: 1,
measurementUnit: 'un',
name: 'Sku exemplo',
refId: null,
specifications: {Embalagem: '3 k g'},
unitMultiplier: 1,
weight: 1,
width: 1
},
skuRef: '{{skuid}}(should be specifed when match is a sku match)'
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PUT', '{{baseUrl}}/suggestions/:sellerId/:sellerskuid/versions/:version/matches/:matchid');
req.query({
accountName: ''
});
req.headers({
accept: '',
'content-type': 'application/json'
});
req.type('json');
req.send({
matchType: 'itemMatch',
matcherId: '{{matcherid}}',
product: {
brandId: 1234567,
categoryId: 12,
description: 'Book description',
matchType: 'itemMatch',
name: 'Book A',
specifications: null
},
productRef: '{{productRef}}(should be specified when match is a product match)',
score: '{{score}} (must be decimal)',
sku: {
eans: [
'12345678901213'
],
height: 1,
images: [
{
'imagem1.jpg': {
'imagem1.jpg': 'https://imageurl.example'
}
}
],
length: 1,
measurementUnit: 'un',
name: 'Sku exemplo',
refId: null,
specifications: {
Embalagem: '3 k g'
},
unitMultiplier: 1,
weight: 1,
width: 1
},
skuRef: '{{skuid}}(should be specifed when match is a sku match)'
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PUT',
url: '{{baseUrl}}/suggestions/:sellerId/:sellerskuid/versions/:version/matches/:matchid',
params: {accountName: ''},
headers: {accept: '', 'content-type': 'application/json'},
data: {
matchType: 'itemMatch',
matcherId: '{{matcherid}}',
product: {
brandId: 1234567,
categoryId: 12,
description: 'Book description',
matchType: 'itemMatch',
name: 'Book A',
specifications: null
},
productRef: '{{productRef}}(should be specified when match is a product match)',
score: '{{score}} (must be decimal)',
sku: {
eans: ['12345678901213'],
height: 1,
images: [{'imagem1.jpg': {'imagem1.jpg': 'https://imageurl.example'}}],
length: 1,
measurementUnit: 'un',
name: 'Sku exemplo',
refId: null,
specifications: {Embalagem: '3 k g'},
unitMultiplier: 1,
weight: 1,
width: 1
},
skuRef: '{{skuid}}(should be specifed when match is a sku match)'
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/suggestions/:sellerId/:sellerskuid/versions/:version/matches/:matchid?accountName=';
const options = {
method: 'PUT',
headers: {accept: '', 'content-type': 'application/json'},
body: '{"matchType":"itemMatch","matcherId":"{{matcherid}}","product":{"brandId":1234567,"categoryId":12,"description":"Book description","matchType":"itemMatch","name":"Book A","specifications":null},"productRef":"{{productRef}}(should be specified when match is a product match)","score":"{{score}} (must be decimal)","sku":{"eans":["12345678901213"],"height":1,"images":[{"imagem1.jpg":{"imagem1.jpg":"https://imageurl.example"}}],"length":1,"measurementUnit":"un","name":"Sku exemplo","refId":null,"specifications":{"Embalagem":"3 k g"},"unitMultiplier":1,"weight":1,"width":1},"skuRef":"{{skuid}}(should be specifed when match is a sku match)"}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"accept": @"",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"matchType": @"itemMatch",
@"matcherId": @"{{matcherid}}",
@"product": @{ @"brandId": @1234567, @"categoryId": @12, @"description": @"Book description", @"matchType": @"itemMatch", @"name": @"Book A", @"specifications": },
@"productRef": @"{{productRef}}(should be specified when match is a product match)",
@"score": @"{{score}} (must be decimal)",
@"sku": @{ @"eans": @[ @"12345678901213" ], @"height": @1, @"images": @[ @{ @"imagem1.jpg": @{ @"imagem1.jpg": @"https://imageurl.example" } } ], @"length": @1, @"measurementUnit": @"un", @"name": @"Sku exemplo", @"refId": , @"specifications": @{ @"Embalagem": @"3 k g" }, @"unitMultiplier": @1, @"weight": @1, @"width": @1 },
@"skuRef": @"{{skuid}}(should be specifed when match is a sku match)" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/suggestions/:sellerId/:sellerskuid/versions/:version/matches/:matchid?accountName="]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PUT"];
[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}}/suggestions/:sellerId/:sellerskuid/versions/:version/matches/:matchid?accountName=" in
let headers = Header.add_list (Header.init ()) [
("accept", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"matchType\": \"itemMatch\",\n \"matcherId\": \"{{matcherid}}\",\n \"product\": {\n \"brandId\": 1234567,\n \"categoryId\": 12,\n \"description\": \"Book description\",\n \"matchType\": \"itemMatch\",\n \"name\": \"Book A\",\n \"specifications\": null\n },\n \"productRef\": \"{{productRef}}(should be specified when match is a product match)\",\n \"score\": \"{{score}} (must be decimal)\",\n \"sku\": {\n \"eans\": [\n \"12345678901213\"\n ],\n \"height\": 1,\n \"images\": [\n {\n \"imagem1.jpg\": {\n \"imagem1.jpg\": \"https://imageurl.example\"\n }\n }\n ],\n \"length\": 1,\n \"measurementUnit\": \"un\",\n \"name\": \"Sku exemplo\",\n \"refId\": null,\n \"specifications\": {\n \"Embalagem\": \"3 k g\"\n },\n \"unitMultiplier\": 1,\n \"weight\": 1,\n \"width\": 1\n },\n \"skuRef\": \"{{skuid}}(should be specifed when match is a sku match)\"\n}" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/suggestions/:sellerId/:sellerskuid/versions/:version/matches/:matchid?accountName=",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'matchType' => 'itemMatch',
'matcherId' => '{{matcherid}}',
'product' => [
'brandId' => 1234567,
'categoryId' => 12,
'description' => 'Book description',
'matchType' => 'itemMatch',
'name' => 'Book A',
'specifications' => null
],
'productRef' => '{{productRef}}(should be specified when match is a product match)',
'score' => '{{score}} (must be decimal)',
'sku' => [
'eans' => [
'12345678901213'
],
'height' => 1,
'images' => [
[
'imagem1.jpg' => [
'imagem1.jpg' => 'https://imageurl.example'
]
]
],
'length' => 1,
'measurementUnit' => 'un',
'name' => 'Sku exemplo',
'refId' => null,
'specifications' => [
'Embalagem' => '3 k g'
],
'unitMultiplier' => 1,
'weight' => 1,
'width' => 1
],
'skuRef' => '{{skuid}}(should be specifed when match is a sku match)'
]),
CURLOPT_HTTPHEADER => [
"accept: ",
"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('PUT', '{{baseUrl}}/suggestions/:sellerId/:sellerskuid/versions/:version/matches/:matchid?accountName=', [
'body' => '{
"matchType": "itemMatch",
"matcherId": "{{matcherid}}",
"product": {
"brandId": 1234567,
"categoryId": 12,
"description": "Book description",
"matchType": "itemMatch",
"name": "Book A",
"specifications": null
},
"productRef": "{{productRef}}(should be specified when match is a product match)",
"score": "{{score}} (must be decimal)",
"sku": {
"eans": [
"12345678901213"
],
"height": 1,
"images": [
{
"imagem1.jpg": {
"imagem1.jpg": "https://imageurl.example"
}
}
],
"length": 1,
"measurementUnit": "un",
"name": "Sku exemplo",
"refId": null,
"specifications": {
"Embalagem": "3 k g"
},
"unitMultiplier": 1,
"weight": 1,
"width": 1
},
"skuRef": "{{skuid}}(should be specifed when match is a sku match)"
}',
'headers' => [
'accept' => '',
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/suggestions/:sellerId/:sellerskuid/versions/:version/matches/:matchid');
$request->setMethod(HTTP_METH_PUT);
$request->setQueryData([
'accountName' => ''
]);
$request->setHeaders([
'accept' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'matchType' => 'itemMatch',
'matcherId' => '{{matcherid}}',
'product' => [
'brandId' => 1234567,
'categoryId' => 12,
'description' => 'Book description',
'matchType' => 'itemMatch',
'name' => 'Book A',
'specifications' => null
],
'productRef' => '{{productRef}}(should be specified when match is a product match)',
'score' => '{{score}} (must be decimal)',
'sku' => [
'eans' => [
'12345678901213'
],
'height' => 1,
'images' => [
[
'imagem1.jpg' => [
'imagem1.jpg' => 'https://imageurl.example'
]
]
],
'length' => 1,
'measurementUnit' => 'un',
'name' => 'Sku exemplo',
'refId' => null,
'specifications' => [
'Embalagem' => '3 k g'
],
'unitMultiplier' => 1,
'weight' => 1,
'width' => 1
],
'skuRef' => '{{skuid}}(should be specifed when match is a sku match)'
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'matchType' => 'itemMatch',
'matcherId' => '{{matcherid}}',
'product' => [
'brandId' => 1234567,
'categoryId' => 12,
'description' => 'Book description',
'matchType' => 'itemMatch',
'name' => 'Book A',
'specifications' => null
],
'productRef' => '{{productRef}}(should be specified when match is a product match)',
'score' => '{{score}} (must be decimal)',
'sku' => [
'eans' => [
'12345678901213'
],
'height' => 1,
'images' => [
[
'imagem1.jpg' => [
'imagem1.jpg' => 'https://imageurl.example'
]
]
],
'length' => 1,
'measurementUnit' => 'un',
'name' => 'Sku exemplo',
'refId' => null,
'specifications' => [
'Embalagem' => '3 k g'
],
'unitMultiplier' => 1,
'weight' => 1,
'width' => 1
],
'skuRef' => '{{skuid}}(should be specifed when match is a sku match)'
]));
$request->setRequestUrl('{{baseUrl}}/suggestions/:sellerId/:sellerskuid/versions/:version/matches/:matchid');
$request->setRequestMethod('PUT');
$request->setBody($body);
$request->setQuery(new http\QueryString([
'accountName' => ''
]));
$request->setHeaders([
'accept' => '',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("accept", "")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/suggestions/:sellerId/:sellerskuid/versions/:version/matches/:matchid?accountName=' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"matchType": "itemMatch",
"matcherId": "{{matcherid}}",
"product": {
"brandId": 1234567,
"categoryId": 12,
"description": "Book description",
"matchType": "itemMatch",
"name": "Book A",
"specifications": null
},
"productRef": "{{productRef}}(should be specified when match is a product match)",
"score": "{{score}} (must be decimal)",
"sku": {
"eans": [
"12345678901213"
],
"height": 1,
"images": [
{
"imagem1.jpg": {
"imagem1.jpg": "https://imageurl.example"
}
}
],
"length": 1,
"measurementUnit": "un",
"name": "Sku exemplo",
"refId": null,
"specifications": {
"Embalagem": "3 k g"
},
"unitMultiplier": 1,
"weight": 1,
"width": 1
},
"skuRef": "{{skuid}}(should be specifed when match is a sku match)"
}'
$headers=@{}
$headers.Add("accept", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/suggestions/:sellerId/:sellerskuid/versions/:version/matches/:matchid?accountName=' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"matchType": "itemMatch",
"matcherId": "{{matcherid}}",
"product": {
"brandId": 1234567,
"categoryId": 12,
"description": "Book description",
"matchType": "itemMatch",
"name": "Book A",
"specifications": null
},
"productRef": "{{productRef}}(should be specified when match is a product match)",
"score": "{{score}} (must be decimal)",
"sku": {
"eans": [
"12345678901213"
],
"height": 1,
"images": [
{
"imagem1.jpg": {
"imagem1.jpg": "https://imageurl.example"
}
}
],
"length": 1,
"measurementUnit": "un",
"name": "Sku exemplo",
"refId": null,
"specifications": {
"Embalagem": "3 k g"
},
"unitMultiplier": 1,
"weight": 1,
"width": 1
},
"skuRef": "{{skuid}}(should be specifed when match is a sku match)"
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"matchType\": \"itemMatch\",\n \"matcherId\": \"{{matcherid}}\",\n \"product\": {\n \"brandId\": 1234567,\n \"categoryId\": 12,\n \"description\": \"Book description\",\n \"matchType\": \"itemMatch\",\n \"name\": \"Book A\",\n \"specifications\": null\n },\n \"productRef\": \"{{productRef}}(should be specified when match is a product match)\",\n \"score\": \"{{score}} (must be decimal)\",\n \"sku\": {\n \"eans\": [\n \"12345678901213\"\n ],\n \"height\": 1,\n \"images\": [\n {\n \"imagem1.jpg\": {\n \"imagem1.jpg\": \"https://imageurl.example\"\n }\n }\n ],\n \"length\": 1,\n \"measurementUnit\": \"un\",\n \"name\": \"Sku exemplo\",\n \"refId\": null,\n \"specifications\": {\n \"Embalagem\": \"3 k g\"\n },\n \"unitMultiplier\": 1,\n \"weight\": 1,\n \"width\": 1\n },\n \"skuRef\": \"{{skuid}}(should be specifed when match is a sku match)\"\n}"
headers = {
'accept': "",
'content-type': "application/json"
}
conn.request("PUT", "/baseUrl/suggestions/:sellerId/:sellerskuid/versions/:version/matches/:matchid?accountName=", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/suggestions/:sellerId/:sellerskuid/versions/:version/matches/:matchid"
querystring = {"accountName":""}
payload = {
"matchType": "itemMatch",
"matcherId": "{{matcherid}}",
"product": {
"brandId": 1234567,
"categoryId": 12,
"description": "Book description",
"matchType": "itemMatch",
"name": "Book A",
"specifications": None
},
"productRef": "{{productRef}}(should be specified when match is a product match)",
"score": "{{score}} (must be decimal)",
"sku": {
"eans": ["12345678901213"],
"height": 1,
"images": [{ "imagem1.jpg": { "imagem1.jpg": "https://imageurl.example" } }],
"length": 1,
"measurementUnit": "un",
"name": "Sku exemplo",
"refId": None,
"specifications": { "Embalagem": "3 k g" },
"unitMultiplier": 1,
"weight": 1,
"width": 1
},
"skuRef": "{{skuid}}(should be specifed when match is a sku match)"
}
headers = {
"accept": "",
"content-type": "application/json"
}
response = requests.put(url, json=payload, headers=headers, params=querystring)
print(response.json())
library(httr)
url <- "{{baseUrl}}/suggestions/:sellerId/:sellerskuid/versions/:version/matches/:matchid"
queryString <- list(accountName = "")
payload <- "{\n \"matchType\": \"itemMatch\",\n \"matcherId\": \"{{matcherid}}\",\n \"product\": {\n \"brandId\": 1234567,\n \"categoryId\": 12,\n \"description\": \"Book description\",\n \"matchType\": \"itemMatch\",\n \"name\": \"Book A\",\n \"specifications\": null\n },\n \"productRef\": \"{{productRef}}(should be specified when match is a product match)\",\n \"score\": \"{{score}} (must be decimal)\",\n \"sku\": {\n \"eans\": [\n \"12345678901213\"\n ],\n \"height\": 1,\n \"images\": [\n {\n \"imagem1.jpg\": {\n \"imagem1.jpg\": \"https://imageurl.example\"\n }\n }\n ],\n \"length\": 1,\n \"measurementUnit\": \"un\",\n \"name\": \"Sku exemplo\",\n \"refId\": null,\n \"specifications\": {\n \"Embalagem\": \"3 k g\"\n },\n \"unitMultiplier\": 1,\n \"weight\": 1,\n \"width\": 1\n },\n \"skuRef\": \"{{skuid}}(should be specifed when match is a sku match)\"\n}"
encode <- "json"
response <- VERB("PUT", url, body = payload, query = queryString, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/suggestions/:sellerId/:sellerskuid/versions/:version/matches/:matchid?accountName=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["accept"] = ''
request["content-type"] = 'application/json'
request.body = "{\n \"matchType\": \"itemMatch\",\n \"matcherId\": \"{{matcherid}}\",\n \"product\": {\n \"brandId\": 1234567,\n \"categoryId\": 12,\n \"description\": \"Book description\",\n \"matchType\": \"itemMatch\",\n \"name\": \"Book A\",\n \"specifications\": null\n },\n \"productRef\": \"{{productRef}}(should be specified when match is a product match)\",\n \"score\": \"{{score}} (must be decimal)\",\n \"sku\": {\n \"eans\": [\n \"12345678901213\"\n ],\n \"height\": 1,\n \"images\": [\n {\n \"imagem1.jpg\": {\n \"imagem1.jpg\": \"https://imageurl.example\"\n }\n }\n ],\n \"length\": 1,\n \"measurementUnit\": \"un\",\n \"name\": \"Sku exemplo\",\n \"refId\": null,\n \"specifications\": {\n \"Embalagem\": \"3 k g\"\n },\n \"unitMultiplier\": 1,\n \"weight\": 1,\n \"width\": 1\n },\n \"skuRef\": \"{{skuid}}(should be specifed when match is a sku match)\"\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.put('/baseUrl/suggestions/:sellerId/:sellerskuid/versions/:version/matches/:matchid') do |req|
req.headers['accept'] = ''
req.params['accountName'] = ''
req.body = "{\n \"matchType\": \"itemMatch\",\n \"matcherId\": \"{{matcherid}}\",\n \"product\": {\n \"brandId\": 1234567,\n \"categoryId\": 12,\n \"description\": \"Book description\",\n \"matchType\": \"itemMatch\",\n \"name\": \"Book A\",\n \"specifications\": null\n },\n \"productRef\": \"{{productRef}}(should be specified when match is a product match)\",\n \"score\": \"{{score}} (must be decimal)\",\n \"sku\": {\n \"eans\": [\n \"12345678901213\"\n ],\n \"height\": 1,\n \"images\": [\n {\n \"imagem1.jpg\": {\n \"imagem1.jpg\": \"https://imageurl.example\"\n }\n }\n ],\n \"length\": 1,\n \"measurementUnit\": \"un\",\n \"name\": \"Sku exemplo\",\n \"refId\": null,\n \"specifications\": {\n \"Embalagem\": \"3 k g\"\n },\n \"unitMultiplier\": 1,\n \"weight\": 1,\n \"width\": 1\n },\n \"skuRef\": \"{{skuid}}(should be specifed when match is a sku match)\"\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}}/suggestions/:sellerId/:sellerskuid/versions/:version/matches/:matchid";
let querystring = [
("accountName", ""),
];
let payload = json!({
"matchType": "itemMatch",
"matcherId": "{{matcherid}}",
"product": json!({
"brandId": 1234567,
"categoryId": 12,
"description": "Book description",
"matchType": "itemMatch",
"name": "Book A",
"specifications": json!(null)
}),
"productRef": "{{productRef}}(should be specified when match is a product match)",
"score": "{{score}} (must be decimal)",
"sku": json!({
"eans": ("12345678901213"),
"height": 1,
"images": (json!({"imagem1.jpg": json!({"imagem1.jpg": "https://imageurl.example"})})),
"length": 1,
"measurementUnit": "un",
"name": "Sku exemplo",
"refId": json!(null),
"specifications": json!({"Embalagem": "3 k g"}),
"unitMultiplier": 1,
"weight": 1,
"width": 1
}),
"skuRef": "{{skuid}}(should be specifed when match is a sku match)"
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("accept", "".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PUT").unwrap(), url)
.query(&querystring)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url '{{baseUrl}}/suggestions/:sellerId/:sellerskuid/versions/:version/matches/:matchid?accountName=' \
--header 'accept: ' \
--header 'content-type: application/json' \
--data '{
"matchType": "itemMatch",
"matcherId": "{{matcherid}}",
"product": {
"brandId": 1234567,
"categoryId": 12,
"description": "Book description",
"matchType": "itemMatch",
"name": "Book A",
"specifications": null
},
"productRef": "{{productRef}}(should be specified when match is a product match)",
"score": "{{score}} (must be decimal)",
"sku": {
"eans": [
"12345678901213"
],
"height": 1,
"images": [
{
"imagem1.jpg": {
"imagem1.jpg": "https://imageurl.example"
}
}
],
"length": 1,
"measurementUnit": "un",
"name": "Sku exemplo",
"refId": null,
"specifications": {
"Embalagem": "3 k g"
},
"unitMultiplier": 1,
"weight": 1,
"width": 1
},
"skuRef": "{{skuid}}(should be specifed when match is a sku match)"
}'
echo '{
"matchType": "itemMatch",
"matcherId": "{{matcherid}}",
"product": {
"brandId": 1234567,
"categoryId": 12,
"description": "Book description",
"matchType": "itemMatch",
"name": "Book A",
"specifications": null
},
"productRef": "{{productRef}}(should be specified when match is a product match)",
"score": "{{score}} (must be decimal)",
"sku": {
"eans": [
"12345678901213"
],
"height": 1,
"images": [
{
"imagem1.jpg": {
"imagem1.jpg": "https://imageurl.example"
}
}
],
"length": 1,
"measurementUnit": "un",
"name": "Sku exemplo",
"refId": null,
"specifications": {
"Embalagem": "3 k g"
},
"unitMultiplier": 1,
"weight": 1,
"width": 1
},
"skuRef": "{{skuid}}(should be specifed when match is a sku match)"
}' | \
http PUT '{{baseUrl}}/suggestions/:sellerId/:sellerskuid/versions/:version/matches/:matchid?accountName=' \
accept:'' \
content-type:application/json
wget --quiet \
--method PUT \
--header 'accept: ' \
--header 'content-type: application/json' \
--body-data '{\n "matchType": "itemMatch",\n "matcherId": "{{matcherid}}",\n "product": {\n "brandId": 1234567,\n "categoryId": 12,\n "description": "Book description",\n "matchType": "itemMatch",\n "name": "Book A",\n "specifications": null\n },\n "productRef": "{{productRef}}(should be specified when match is a product match)",\n "score": "{{score}} (must be decimal)",\n "sku": {\n "eans": [\n "12345678901213"\n ],\n "height": 1,\n "images": [\n {\n "imagem1.jpg": {\n "imagem1.jpg": "https://imageurl.example"\n }\n }\n ],\n "length": 1,\n "measurementUnit": "un",\n "name": "Sku exemplo",\n "refId": null,\n "specifications": {\n "Embalagem": "3 k g"\n },\n "unitMultiplier": 1,\n "weight": 1,\n "width": 1\n },\n "skuRef": "{{skuid}}(should be specifed when match is a sku match)"\n}' \
--output-document \
- '{{baseUrl}}/suggestions/:sellerId/:sellerskuid/versions/:version/matches/:matchid?accountName='
import Foundation
let headers = [
"accept": "",
"content-type": "application/json"
]
let parameters = [
"matchType": "itemMatch",
"matcherId": "{{matcherid}}",
"product": [
"brandId": 1234567,
"categoryId": 12,
"description": "Book description",
"matchType": "itemMatch",
"name": "Book A",
"specifications":
],
"productRef": "{{productRef}}(should be specified when match is a product match)",
"score": "{{score}} (must be decimal)",
"sku": [
"eans": ["12345678901213"],
"height": 1,
"images": [["imagem1.jpg": ["imagem1.jpg": "https://imageurl.example"]]],
"length": 1,
"measurementUnit": "un",
"name": "Sku exemplo",
"refId": ,
"specifications": ["Embalagem": "3 k g"],
"unitMultiplier": 1,
"weight": 1,
"width": 1
],
"skuRef": "{{skuid}}(should be specifed when match is a sku match)"
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/suggestions/:sellerId/:sellerskuid/versions/:version/matches/:matchid?accountName=")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PUT"
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()
PUT
Activate autoApprove Setting for a Seller
{{baseUrl}}/suggestions/configuration/autoapproval/toggle/seller/:sellerId
HEADERS
Accept
Content-Type
QUERY PARAMS
accountName
sellerId
BODY json
{
"Enabled": false
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/suggestions/configuration/autoapproval/toggle/seller/:sellerId?accountName=");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "accept: ");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"Enabled\": true\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/suggestions/configuration/autoapproval/toggle/seller/:sellerId" {:headers {:accept ""}
:query-params {:accountName ""}
:content-type :json
:form-params {:Enabled true}})
require "http/client"
url = "{{baseUrl}}/suggestions/configuration/autoapproval/toggle/seller/:sellerId?accountName="
headers = HTTP::Headers{
"accept" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"Enabled\": true\n}"
response = HTTP::Client.put url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Put,
RequestUri = new Uri("{{baseUrl}}/suggestions/configuration/autoapproval/toggle/seller/:sellerId?accountName="),
Headers =
{
{ "accept", "" },
},
Content = new StringContent("{\n \"Enabled\": true\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}}/suggestions/configuration/autoapproval/toggle/seller/:sellerId?accountName=");
var request = new RestRequest("", Method.Put);
request.AddHeader("accept", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"Enabled\": true\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/suggestions/configuration/autoapproval/toggle/seller/:sellerId?accountName="
payload := strings.NewReader("{\n \"Enabled\": true\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("accept", "")
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))
}
PUT /baseUrl/suggestions/configuration/autoapproval/toggle/seller/:sellerId?accountName= HTTP/1.1
Accept:
Content-Type: application/json
Host: example.com
Content-Length: 21
{
"Enabled": true
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/suggestions/configuration/autoapproval/toggle/seller/:sellerId?accountName=")
.setHeader("accept", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"Enabled\": true\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/suggestions/configuration/autoapproval/toggle/seller/:sellerId?accountName="))
.header("accept", "")
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("{\n \"Enabled\": true\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 \"Enabled\": true\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/suggestions/configuration/autoapproval/toggle/seller/:sellerId?accountName=")
.put(body)
.addHeader("accept", "")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/suggestions/configuration/autoapproval/toggle/seller/:sellerId?accountName=")
.header("accept", "")
.header("content-type", "application/json")
.body("{\n \"Enabled\": true\n}")
.asString();
const data = JSON.stringify({
Enabled: true
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/suggestions/configuration/autoapproval/toggle/seller/:sellerId?accountName=');
xhr.setRequestHeader('accept', '');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/suggestions/configuration/autoapproval/toggle/seller/:sellerId',
params: {accountName: ''},
headers: {accept: '', 'content-type': 'application/json'},
data: {Enabled: true}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/suggestions/configuration/autoapproval/toggle/seller/:sellerId?accountName=';
const options = {
method: 'PUT',
headers: {accept: '', 'content-type': 'application/json'},
body: '{"Enabled":true}'
};
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}}/suggestions/configuration/autoapproval/toggle/seller/:sellerId?accountName=',
method: 'PUT',
headers: {
accept: '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "Enabled": true\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"Enabled\": true\n}")
val request = Request.Builder()
.url("{{baseUrl}}/suggestions/configuration/autoapproval/toggle/seller/:sellerId?accountName=")
.put(body)
.addHeader("accept", "")
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PUT',
hostname: 'example.com',
port: null,
path: '/baseUrl/suggestions/configuration/autoapproval/toggle/seller/:sellerId?accountName=',
headers: {
accept: '',
'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({Enabled: true}));
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/suggestions/configuration/autoapproval/toggle/seller/:sellerId',
qs: {accountName: ''},
headers: {accept: '', 'content-type': 'application/json'},
body: {Enabled: true},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PUT', '{{baseUrl}}/suggestions/configuration/autoapproval/toggle/seller/:sellerId');
req.query({
accountName: ''
});
req.headers({
accept: '',
'content-type': 'application/json'
});
req.type('json');
req.send({
Enabled: true
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PUT',
url: '{{baseUrl}}/suggestions/configuration/autoapproval/toggle/seller/:sellerId',
params: {accountName: ''},
headers: {accept: '', 'content-type': 'application/json'},
data: {Enabled: true}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/suggestions/configuration/autoapproval/toggle/seller/:sellerId?accountName=';
const options = {
method: 'PUT',
headers: {accept: '', 'content-type': 'application/json'},
body: '{"Enabled":true}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"accept": @"",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"Enabled": @YES };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/suggestions/configuration/autoapproval/toggle/seller/:sellerId?accountName="]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PUT"];
[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}}/suggestions/configuration/autoapproval/toggle/seller/:sellerId?accountName=" in
let headers = Header.add_list (Header.init ()) [
("accept", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"Enabled\": true\n}" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/suggestions/configuration/autoapproval/toggle/seller/:sellerId?accountName=",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'Enabled' => null
]),
CURLOPT_HTTPHEADER => [
"accept: ",
"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('PUT', '{{baseUrl}}/suggestions/configuration/autoapproval/toggle/seller/:sellerId?accountName=', [
'body' => '{
"Enabled": true
}',
'headers' => [
'accept' => '',
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/suggestions/configuration/autoapproval/toggle/seller/:sellerId');
$request->setMethod(HTTP_METH_PUT);
$request->setQueryData([
'accountName' => ''
]);
$request->setHeaders([
'accept' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'Enabled' => null
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'Enabled' => null
]));
$request->setRequestUrl('{{baseUrl}}/suggestions/configuration/autoapproval/toggle/seller/:sellerId');
$request->setRequestMethod('PUT');
$request->setBody($body);
$request->setQuery(new http\QueryString([
'accountName' => ''
]));
$request->setHeaders([
'accept' => '',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("accept", "")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/suggestions/configuration/autoapproval/toggle/seller/:sellerId?accountName=' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"Enabled": true
}'
$headers=@{}
$headers.Add("accept", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/suggestions/configuration/autoapproval/toggle/seller/:sellerId?accountName=' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"Enabled": true
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"Enabled\": true\n}"
headers = {
'accept': "",
'content-type': "application/json"
}
conn.request("PUT", "/baseUrl/suggestions/configuration/autoapproval/toggle/seller/:sellerId?accountName=", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/suggestions/configuration/autoapproval/toggle/seller/:sellerId"
querystring = {"accountName":""}
payload = { "Enabled": True }
headers = {
"accept": "",
"content-type": "application/json"
}
response = requests.put(url, json=payload, headers=headers, params=querystring)
print(response.json())
library(httr)
url <- "{{baseUrl}}/suggestions/configuration/autoapproval/toggle/seller/:sellerId"
queryString <- list(accountName = "")
payload <- "{\n \"Enabled\": true\n}"
encode <- "json"
response <- VERB("PUT", url, body = payload, query = queryString, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/suggestions/configuration/autoapproval/toggle/seller/:sellerId?accountName=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["accept"] = ''
request["content-type"] = 'application/json'
request.body = "{\n \"Enabled\": true\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.put('/baseUrl/suggestions/configuration/autoapproval/toggle/seller/:sellerId') do |req|
req.headers['accept'] = ''
req.params['accountName'] = ''
req.body = "{\n \"Enabled\": true\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}}/suggestions/configuration/autoapproval/toggle/seller/:sellerId";
let querystring = [
("accountName", ""),
];
let payload = json!({"Enabled": true});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("accept", "".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PUT").unwrap(), url)
.query(&querystring)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url '{{baseUrl}}/suggestions/configuration/autoapproval/toggle/seller/:sellerId?accountName=' \
--header 'accept: ' \
--header 'content-type: application/json' \
--data '{
"Enabled": true
}'
echo '{
"Enabled": true
}' | \
http PUT '{{baseUrl}}/suggestions/configuration/autoapproval/toggle/seller/:sellerId?accountName=' \
accept:'' \
content-type:application/json
wget --quiet \
--method PUT \
--header 'accept: ' \
--header 'content-type: application/json' \
--body-data '{\n "Enabled": true\n}' \
--output-document \
- '{{baseUrl}}/suggestions/configuration/autoapproval/toggle/seller/:sellerId?accountName='
import Foundation
let headers = [
"accept": "",
"content-type": "application/json"
]
let parameters = ["Enabled": true] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/suggestions/configuration/autoapproval/toggle/seller/:sellerId?accountName=")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PUT"
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()
PUT
Activate autoApprove in Marketplace's Account
{{baseUrl}}/suggestions/configuration/autoapproval/toggle
HEADERS
Accept
Content-Type
QUERY PARAMS
accountName
BODY json
{
"Enabled": false
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/suggestions/configuration/autoapproval/toggle?accountName=");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "accept: ");
headers = curl_slist_append(headers, "content-type: ");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"Enabled\": false\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/suggestions/configuration/autoapproval/toggle" {:headers {:accept ""}
:query-params {:accountName ""}
:content-type :json
:form-params {:Enabled false}})
require "http/client"
url = "{{baseUrl}}/suggestions/configuration/autoapproval/toggle?accountName="
headers = HTTP::Headers{
"accept" => ""
"content-type" => ""
}
reqBody = "{\n \"Enabled\": false\n}"
response = HTTP::Client.put url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Put,
RequestUri = new Uri("{{baseUrl}}/suggestions/configuration/autoapproval/toggle?accountName="),
Headers =
{
{ "accept", "" },
},
Content = new StringContent("{\n \"Enabled\": false\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}}/suggestions/configuration/autoapproval/toggle?accountName=");
var request = new RestRequest("", Method.Put);
request.AddHeader("accept", "");
request.AddHeader("content-type", "");
request.AddParameter("", "{\n \"Enabled\": false\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/suggestions/configuration/autoapproval/toggle?accountName="
payload := strings.NewReader("{\n \"Enabled\": false\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("accept", "")
req.Header.Add("content-type", "")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
PUT /baseUrl/suggestions/configuration/autoapproval/toggle?accountName= HTTP/1.1
Accept:
Content-Type:
Host: example.com
Content-Length: 22
{
"Enabled": false
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/suggestions/configuration/autoapproval/toggle?accountName=")
.setHeader("accept", "")
.setHeader("content-type", "")
.setBody("{\n \"Enabled\": false\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/suggestions/configuration/autoapproval/toggle?accountName="))
.header("accept", "")
.header("content-type", "")
.method("PUT", HttpRequest.BodyPublishers.ofString("{\n \"Enabled\": false\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 \"Enabled\": false\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/suggestions/configuration/autoapproval/toggle?accountName=")
.put(body)
.addHeader("accept", "")
.addHeader("content-type", "")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/suggestions/configuration/autoapproval/toggle?accountName=")
.header("accept", "")
.header("content-type", "")
.body("{\n \"Enabled\": false\n}")
.asString();
const data = JSON.stringify({
Enabled: false
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/suggestions/configuration/autoapproval/toggle?accountName=');
xhr.setRequestHeader('accept', '');
xhr.setRequestHeader('content-type', '');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/suggestions/configuration/autoapproval/toggle',
params: {accountName: ''},
headers: {accept: '', 'content-type': ''},
data: {Enabled: false}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/suggestions/configuration/autoapproval/toggle?accountName=';
const options = {
method: 'PUT',
headers: {accept: '', 'content-type': ''},
body: '{"Enabled":false}'
};
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}}/suggestions/configuration/autoapproval/toggle?accountName=',
method: 'PUT',
headers: {
accept: '',
'content-type': ''
},
processData: false,
data: '{\n "Enabled": false\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"Enabled\": false\n}")
val request = Request.Builder()
.url("{{baseUrl}}/suggestions/configuration/autoapproval/toggle?accountName=")
.put(body)
.addHeader("accept", "")
.addHeader("content-type", "")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PUT',
hostname: 'example.com',
port: null,
path: '/baseUrl/suggestions/configuration/autoapproval/toggle?accountName=',
headers: {
accept: '',
'content-type': ''
}
};
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({Enabled: false}));
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/suggestions/configuration/autoapproval/toggle',
qs: {accountName: ''},
headers: {accept: '', 'content-type': ''},
body: {Enabled: false},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PUT', '{{baseUrl}}/suggestions/configuration/autoapproval/toggle');
req.query({
accountName: ''
});
req.headers({
accept: '',
'content-type': ''
});
req.type('json');
req.send({
Enabled: false
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PUT',
url: '{{baseUrl}}/suggestions/configuration/autoapproval/toggle',
params: {accountName: ''},
headers: {accept: '', 'content-type': ''},
data: {Enabled: false}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/suggestions/configuration/autoapproval/toggle?accountName=';
const options = {
method: 'PUT',
headers: {accept: '', 'content-type': ''},
body: '{"Enabled":false}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"accept": @"",
@"content-type": @"" };
NSDictionary *parameters = @{ @"Enabled": @NO };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/suggestions/configuration/autoapproval/toggle?accountName="]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PUT"];
[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}}/suggestions/configuration/autoapproval/toggle?accountName=" in
let headers = Header.add_list (Header.init ()) [
("accept", "");
("content-type", "");
] in
let body = Cohttp_lwt_body.of_string "{\n \"Enabled\": false\n}" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/suggestions/configuration/autoapproval/toggle?accountName=",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'Enabled' => null
]),
CURLOPT_HTTPHEADER => [
"accept: ",
"content-type: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('PUT', '{{baseUrl}}/suggestions/configuration/autoapproval/toggle?accountName=', [
'body' => '{
"Enabled": false
}',
'headers' => [
'accept' => '',
'content-type' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/suggestions/configuration/autoapproval/toggle');
$request->setMethod(HTTP_METH_PUT);
$request->setQueryData([
'accountName' => ''
]);
$request->setHeaders([
'accept' => '',
'content-type' => ''
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'Enabled' => null
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'Enabled' => null
]));
$request->setRequestUrl('{{baseUrl}}/suggestions/configuration/autoapproval/toggle');
$request->setRequestMethod('PUT');
$request->setBody($body);
$request->setQuery(new http\QueryString([
'accountName' => ''
]));
$request->setHeaders([
'accept' => '',
'content-type' => ''
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("accept", "")
$headers.Add("content-type", "")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/suggestions/configuration/autoapproval/toggle?accountName=' -Method PUT -Headers $headers -ContentType '' -Body '{
"Enabled": false
}'
$headers=@{}
$headers.Add("accept", "")
$headers.Add("content-type", "")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/suggestions/configuration/autoapproval/toggle?accountName=' -Method PUT -Headers $headers -ContentType '' -Body '{
"Enabled": false
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"Enabled\": false\n}"
headers = {
'accept': "",
'content-type': ""
}
conn.request("PUT", "/baseUrl/suggestions/configuration/autoapproval/toggle?accountName=", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/suggestions/configuration/autoapproval/toggle"
querystring = {"accountName":""}
payload = { "Enabled": False }
headers = {
"accept": "",
"content-type": ""
}
response = requests.put(url, json=payload, headers=headers, params=querystring)
print(response.json())
library(httr)
url <- "{{baseUrl}}/suggestions/configuration/autoapproval/toggle"
queryString <- list(accountName = "")
payload <- "{\n \"Enabled\": false\n}"
encode <- "json"
response <- VERB("PUT", url, body = payload, query = queryString, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/suggestions/configuration/autoapproval/toggle?accountName=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["accept"] = ''
request["content-type"] = ''
request.body = "{\n \"Enabled\": false\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.put('/baseUrl/suggestions/configuration/autoapproval/toggle') do |req|
req.headers['accept'] = ''
req.params['accountName'] = ''
req.body = "{\n \"Enabled\": false\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}}/suggestions/configuration/autoapproval/toggle";
let querystring = [
("accountName", ""),
];
let payload = json!({"Enabled": false});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("accept", "".parse().unwrap());
headers.insert("content-type", "".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PUT").unwrap(), url)
.query(&querystring)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url '{{baseUrl}}/suggestions/configuration/autoapproval/toggle?accountName=' \
--header 'accept: ' \
--header 'content-type: ' \
--data '{
"Enabled": false
}'
echo '{
"Enabled": false
}' | \
http PUT '{{baseUrl}}/suggestions/configuration/autoapproval/toggle?accountName=' \
accept:'' \
content-type:''
wget --quiet \
--method PUT \
--header 'accept: ' \
--header 'content-type: ' \
--body-data '{\n "Enabled": false\n}' \
--output-document \
- '{{baseUrl}}/suggestions/configuration/autoapproval/toggle?accountName='
import Foundation
let headers = [
"accept": "",
"content-type": ""
]
let parameters = ["Enabled": false] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/suggestions/configuration/autoapproval/toggle?accountName=")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PUT"
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()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"Enabled": false
}
GET
Get Account's Approval Settings
{{baseUrl}}/suggestions/configuration
HEADERS
Accept
Content-Type
QUERY PARAMS
accountName
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/suggestions/configuration?accountName=");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "accept: ");
headers = curl_slist_append(headers, "content-type: ");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/suggestions/configuration" {:headers {:accept ""
:content-type ""}
:query-params {:accountName ""}})
require "http/client"
url = "{{baseUrl}}/suggestions/configuration?accountName="
headers = HTTP::Headers{
"accept" => ""
"content-type" => ""
}
response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/suggestions/configuration?accountName="),
Headers =
{
{ "accept", "" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/suggestions/configuration?accountName=");
var request = new RestRequest("", Method.Get);
request.AddHeader("accept", "");
request.AddHeader("content-type", "");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/suggestions/configuration?accountName="
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("accept", "")
req.Header.Add("content-type", "")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/suggestions/configuration?accountName= HTTP/1.1
Accept:
Content-Type:
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/suggestions/configuration?accountName=")
.setHeader("accept", "")
.setHeader("content-type", "")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/suggestions/configuration?accountName="))
.header("accept", "")
.header("content-type", "")
.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}}/suggestions/configuration?accountName=")
.get()
.addHeader("accept", "")
.addHeader("content-type", "")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/suggestions/configuration?accountName=")
.header("accept", "")
.header("content-type", "")
.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}}/suggestions/configuration?accountName=');
xhr.setRequestHeader('accept', '');
xhr.setRequestHeader('content-type', '');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/suggestions/configuration',
params: {accountName: ''},
headers: {accept: '', 'content-type': ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/suggestions/configuration?accountName=';
const options = {method: 'GET', headers: {accept: '', 'content-type': ''}};
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}}/suggestions/configuration?accountName=',
method: 'GET',
headers: {
accept: '',
'content-type': ''
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/suggestions/configuration?accountName=")
.get()
.addHeader("accept", "")
.addHeader("content-type", "")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/suggestions/configuration?accountName=',
headers: {
accept: '',
'content-type': ''
}
};
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}}/suggestions/configuration',
qs: {accountName: ''},
headers: {accept: '', 'content-type': ''}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/suggestions/configuration');
req.query({
accountName: ''
});
req.headers({
accept: '',
'content-type': ''
});
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}}/suggestions/configuration',
params: {accountName: ''},
headers: {accept: '', 'content-type': ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/suggestions/configuration?accountName=';
const options = {method: 'GET', headers: {accept: '', 'content-type': ''}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"accept": @"",
@"content-type": @"" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/suggestions/configuration?accountName="]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];
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}}/suggestions/configuration?accountName=" in
let headers = Header.add_list (Header.init ()) [
("accept", "");
("content-type", "");
] in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/suggestions/configuration?accountName=",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"accept: ",
"content-type: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/suggestions/configuration?accountName=', [
'headers' => [
'accept' => '',
'content-type' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/suggestions/configuration');
$request->setMethod(HTTP_METH_GET);
$request->setQueryData([
'accountName' => ''
]);
$request->setHeaders([
'accept' => '',
'content-type' => ''
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/suggestions/configuration');
$request->setRequestMethod('GET');
$request->setQuery(new http\QueryString([
'accountName' => ''
]));
$request->setHeaders([
'accept' => '',
'content-type' => ''
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("accept", "")
$headers.Add("content-type", "")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/suggestions/configuration?accountName=' -Method GET -Headers $headers
$headers=@{}
$headers.Add("accept", "")
$headers.Add("content-type", "")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/suggestions/configuration?accountName=' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = {
'accept': "",
'content-type': ""
}
conn.request("GET", "/baseUrl/suggestions/configuration?accountName=", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/suggestions/configuration"
querystring = {"accountName":""}
headers = {
"accept": "",
"content-type": ""
}
response = requests.get(url, headers=headers, params=querystring)
print(response.json())
library(httr)
url <- "{{baseUrl}}/suggestions/configuration"
queryString <- list(accountName = "")
response <- VERB("GET", url, query = queryString, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/suggestions/configuration?accountName=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["accept"] = ''
request["content-type"] = ''
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/suggestions/configuration') do |req|
req.headers['accept'] = ''
req.params['accountName'] = ''
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/suggestions/configuration";
let querystring = [
("accountName", ""),
];
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("accept", "".parse().unwrap());
headers.insert("content-type", "".parse().unwrap());
let client = reqwest::Client::new();
let response = client.get(url)
.query(&querystring)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url '{{baseUrl}}/suggestions/configuration?accountName=' \
--header 'accept: ' \
--header 'content-type: '
http GET '{{baseUrl}}/suggestions/configuration?accountName=' \
accept:'' \
content-type:''
wget --quiet \
--method GET \
--header 'accept: ' \
--header 'content-type: ' \
--output-document \
- '{{baseUrl}}/suggestions/configuration?accountName='
import Foundation
let headers = [
"accept": "",
"content-type": ""
]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/suggestions/configuration?accountName=")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
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()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"MatchFlux": "Default",
"Matchers": [
{
"Description": null,
"IsActive": true,
"MatcherId": "vtex-matcher",
"UpdatesNotificationEndpoint": null,
"hook-base-address": "http://portal.vtexinternal.com/api/ssm/hooks"
}
],
"Rules": {
"Item": [],
"Product": []
},
"Score": {
"Approve": 80,
"Reject": 30
},
"SpecificationsMapping": []
}
GET
Get Seller's Approval Settings
{{baseUrl}}/suggestions/configuration/seller/:sellerId
HEADERS
Accept
Content-Type
QUERY PARAMS
accountName
sellerId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/suggestions/configuration/seller/:sellerId?accountName=");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "accept: ");
headers = curl_slist_append(headers, "content-type: ");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/suggestions/configuration/seller/:sellerId" {:headers {:accept ""
:content-type ""}
:query-params {:accountName ""}})
require "http/client"
url = "{{baseUrl}}/suggestions/configuration/seller/:sellerId?accountName="
headers = HTTP::Headers{
"accept" => ""
"content-type" => ""
}
response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/suggestions/configuration/seller/:sellerId?accountName="),
Headers =
{
{ "accept", "" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/suggestions/configuration/seller/:sellerId?accountName=");
var request = new RestRequest("", Method.Get);
request.AddHeader("accept", "");
request.AddHeader("content-type", "");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/suggestions/configuration/seller/:sellerId?accountName="
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("accept", "")
req.Header.Add("content-type", "")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/suggestions/configuration/seller/:sellerId?accountName= HTTP/1.1
Accept:
Content-Type:
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/suggestions/configuration/seller/:sellerId?accountName=")
.setHeader("accept", "")
.setHeader("content-type", "")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/suggestions/configuration/seller/:sellerId?accountName="))
.header("accept", "")
.header("content-type", "")
.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}}/suggestions/configuration/seller/:sellerId?accountName=")
.get()
.addHeader("accept", "")
.addHeader("content-type", "")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/suggestions/configuration/seller/:sellerId?accountName=")
.header("accept", "")
.header("content-type", "")
.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}}/suggestions/configuration/seller/:sellerId?accountName=');
xhr.setRequestHeader('accept', '');
xhr.setRequestHeader('content-type', '');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/suggestions/configuration/seller/:sellerId',
params: {accountName: ''},
headers: {accept: '', 'content-type': ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/suggestions/configuration/seller/:sellerId?accountName=';
const options = {method: 'GET', headers: {accept: '', 'content-type': ''}};
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}}/suggestions/configuration/seller/:sellerId?accountName=',
method: 'GET',
headers: {
accept: '',
'content-type': ''
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/suggestions/configuration/seller/:sellerId?accountName=")
.get()
.addHeader("accept", "")
.addHeader("content-type", "")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/suggestions/configuration/seller/:sellerId?accountName=',
headers: {
accept: '',
'content-type': ''
}
};
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}}/suggestions/configuration/seller/:sellerId',
qs: {accountName: ''},
headers: {accept: '', 'content-type': ''}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/suggestions/configuration/seller/:sellerId');
req.query({
accountName: ''
});
req.headers({
accept: '',
'content-type': ''
});
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}}/suggestions/configuration/seller/:sellerId',
params: {accountName: ''},
headers: {accept: '', 'content-type': ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/suggestions/configuration/seller/:sellerId?accountName=';
const options = {method: 'GET', headers: {accept: '', 'content-type': ''}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"accept": @"",
@"content-type": @"" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/suggestions/configuration/seller/:sellerId?accountName="]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];
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}}/suggestions/configuration/seller/:sellerId?accountName=" in
let headers = Header.add_list (Header.init ()) [
("accept", "");
("content-type", "");
] in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/suggestions/configuration/seller/:sellerId?accountName=",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"accept: ",
"content-type: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/suggestions/configuration/seller/:sellerId?accountName=', [
'headers' => [
'accept' => '',
'content-type' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/suggestions/configuration/seller/:sellerId');
$request->setMethod(HTTP_METH_GET);
$request->setQueryData([
'accountName' => ''
]);
$request->setHeaders([
'accept' => '',
'content-type' => ''
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/suggestions/configuration/seller/:sellerId');
$request->setRequestMethod('GET');
$request->setQuery(new http\QueryString([
'accountName' => ''
]));
$request->setHeaders([
'accept' => '',
'content-type' => ''
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("accept", "")
$headers.Add("content-type", "")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/suggestions/configuration/seller/:sellerId?accountName=' -Method GET -Headers $headers
$headers=@{}
$headers.Add("accept", "")
$headers.Add("content-type", "")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/suggestions/configuration/seller/:sellerId?accountName=' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = {
'accept': "",
'content-type': ""
}
conn.request("GET", "/baseUrl/suggestions/configuration/seller/:sellerId?accountName=", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/suggestions/configuration/seller/:sellerId"
querystring = {"accountName":""}
headers = {
"accept": "",
"content-type": ""
}
response = requests.get(url, headers=headers, params=querystring)
print(response.json())
library(httr)
url <- "{{baseUrl}}/suggestions/configuration/seller/:sellerId"
queryString <- list(accountName = "")
response <- VERB("GET", url, query = queryString, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/suggestions/configuration/seller/:sellerId?accountName=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["accept"] = ''
request["content-type"] = ''
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/suggestions/configuration/seller/:sellerId') do |req|
req.headers['accept'] = ''
req.params['accountName'] = ''
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/suggestions/configuration/seller/:sellerId";
let querystring = [
("accountName", ""),
];
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("accept", "".parse().unwrap());
headers.insert("content-type", "".parse().unwrap());
let client = reqwest::Client::new();
let response = client.get(url)
.query(&querystring)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url '{{baseUrl}}/suggestions/configuration/seller/:sellerId?accountName=' \
--header 'accept: ' \
--header 'content-type: '
http GET '{{baseUrl}}/suggestions/configuration/seller/:sellerId?accountName=' \
accept:'' \
content-type:''
wget --quiet \
--method GET \
--header 'accept: ' \
--header 'content-type: ' \
--output-document \
- '{{baseUrl}}/suggestions/configuration/seller/:sellerId?accountName='
import Foundation
let headers = [
"accept": "",
"content-type": ""
]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/suggestions/configuration/seller/:sellerId?accountName=")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
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
Get autoApprove Status in Account Settings
{{baseUrl}}/suggestions/configuration/autoapproval/toggle
HEADERS
Accept
Content-Type
QUERY PARAMS
sellerId
accountName
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/suggestions/configuration/autoapproval/toggle?sellerId=&accountName=");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "accept: ");
headers = curl_slist_append(headers, "content-type: ");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/suggestions/configuration/autoapproval/toggle" {:headers {:accept ""
:content-type ""}
:query-params {:sellerId ""
:accountName ""}})
require "http/client"
url = "{{baseUrl}}/suggestions/configuration/autoapproval/toggle?sellerId=&accountName="
headers = HTTP::Headers{
"accept" => ""
"content-type" => ""
}
response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/suggestions/configuration/autoapproval/toggle?sellerId=&accountName="),
Headers =
{
{ "accept", "" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/suggestions/configuration/autoapproval/toggle?sellerId=&accountName=");
var request = new RestRequest("", Method.Get);
request.AddHeader("accept", "");
request.AddHeader("content-type", "");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/suggestions/configuration/autoapproval/toggle?sellerId=&accountName="
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("accept", "")
req.Header.Add("content-type", "")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/suggestions/configuration/autoapproval/toggle?sellerId=&accountName= HTTP/1.1
Accept:
Content-Type:
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/suggestions/configuration/autoapproval/toggle?sellerId=&accountName=")
.setHeader("accept", "")
.setHeader("content-type", "")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/suggestions/configuration/autoapproval/toggle?sellerId=&accountName="))
.header("accept", "")
.header("content-type", "")
.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}}/suggestions/configuration/autoapproval/toggle?sellerId=&accountName=")
.get()
.addHeader("accept", "")
.addHeader("content-type", "")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/suggestions/configuration/autoapproval/toggle?sellerId=&accountName=")
.header("accept", "")
.header("content-type", "")
.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}}/suggestions/configuration/autoapproval/toggle?sellerId=&accountName=');
xhr.setRequestHeader('accept', '');
xhr.setRequestHeader('content-type', '');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/suggestions/configuration/autoapproval/toggle',
params: {sellerId: '', accountName: ''},
headers: {accept: '', 'content-type': ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/suggestions/configuration/autoapproval/toggle?sellerId=&accountName=';
const options = {method: 'GET', headers: {accept: '', 'content-type': ''}};
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}}/suggestions/configuration/autoapproval/toggle?sellerId=&accountName=',
method: 'GET',
headers: {
accept: '',
'content-type': ''
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/suggestions/configuration/autoapproval/toggle?sellerId=&accountName=")
.get()
.addHeader("accept", "")
.addHeader("content-type", "")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/suggestions/configuration/autoapproval/toggle?sellerId=&accountName=',
headers: {
accept: '',
'content-type': ''
}
};
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}}/suggestions/configuration/autoapproval/toggle',
qs: {sellerId: '', accountName: ''},
headers: {accept: '', 'content-type': ''}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/suggestions/configuration/autoapproval/toggle');
req.query({
sellerId: '',
accountName: ''
});
req.headers({
accept: '',
'content-type': ''
});
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}}/suggestions/configuration/autoapproval/toggle',
params: {sellerId: '', accountName: ''},
headers: {accept: '', 'content-type': ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/suggestions/configuration/autoapproval/toggle?sellerId=&accountName=';
const options = {method: 'GET', headers: {accept: '', 'content-type': ''}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"accept": @"",
@"content-type": @"" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/suggestions/configuration/autoapproval/toggle?sellerId=&accountName="]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];
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}}/suggestions/configuration/autoapproval/toggle?sellerId=&accountName=" in
let headers = Header.add_list (Header.init ()) [
("accept", "");
("content-type", "");
] in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/suggestions/configuration/autoapproval/toggle?sellerId=&accountName=",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"accept: ",
"content-type: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/suggestions/configuration/autoapproval/toggle?sellerId=&accountName=', [
'headers' => [
'accept' => '',
'content-type' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/suggestions/configuration/autoapproval/toggle');
$request->setMethod(HTTP_METH_GET);
$request->setQueryData([
'sellerId' => '',
'accountName' => ''
]);
$request->setHeaders([
'accept' => '',
'content-type' => ''
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/suggestions/configuration/autoapproval/toggle');
$request->setRequestMethod('GET');
$request->setQuery(new http\QueryString([
'sellerId' => '',
'accountName' => ''
]));
$request->setHeaders([
'accept' => '',
'content-type' => ''
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("accept", "")
$headers.Add("content-type", "")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/suggestions/configuration/autoapproval/toggle?sellerId=&accountName=' -Method GET -Headers $headers
$headers=@{}
$headers.Add("accept", "")
$headers.Add("content-type", "")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/suggestions/configuration/autoapproval/toggle?sellerId=&accountName=' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = {
'accept': "",
'content-type': ""
}
conn.request("GET", "/baseUrl/suggestions/configuration/autoapproval/toggle?sellerId=&accountName=", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/suggestions/configuration/autoapproval/toggle"
querystring = {"sellerId":"","accountName":""}
headers = {
"accept": "",
"content-type": ""
}
response = requests.get(url, headers=headers, params=querystring)
print(response.json())
library(httr)
url <- "{{baseUrl}}/suggestions/configuration/autoapproval/toggle"
queryString <- list(
sellerId = "",
accountName = ""
)
response <- VERB("GET", url, query = queryString, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/suggestions/configuration/autoapproval/toggle?sellerId=&accountName=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["accept"] = ''
request["content-type"] = ''
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/suggestions/configuration/autoapproval/toggle') do |req|
req.headers['accept'] = ''
req.params['sellerId'] = ''
req.params['accountName'] = ''
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/suggestions/configuration/autoapproval/toggle";
let querystring = [
("sellerId", ""),
("accountName", ""),
];
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("accept", "".parse().unwrap());
headers.insert("content-type", "".parse().unwrap());
let client = reqwest::Client::new();
let response = client.get(url)
.query(&querystring)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url '{{baseUrl}}/suggestions/configuration/autoapproval/toggle?sellerId=&accountName=' \
--header 'accept: ' \
--header 'content-type: '
http GET '{{baseUrl}}/suggestions/configuration/autoapproval/toggle?sellerId=&accountName=' \
accept:'' \
content-type:''
wget --quiet \
--method GET \
--header 'accept: ' \
--header 'content-type: ' \
--output-document \
- '{{baseUrl}}/suggestions/configuration/autoapproval/toggle?sellerId=&accountName='
import Foundation
let headers = [
"accept": "",
"content-type": ""
]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/suggestions/configuration/autoapproval/toggle?sellerId=&accountName=")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
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()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"Enabled": false
}
PUT
Save Account's Approval Settings
{{baseUrl}}/suggestions/configuration
HEADERS
Accept
Content-Type
QUERY PARAMS
accountName
BODY json
{
"MatchFlux": "",
"Matchers": [
{
"Description": "",
"IsActive": false,
"MatcherId": "",
"UpdatesNotificationEndpoint": "",
"hook-base-address": ""
}
],
"Score": {
"Approve": 0,
"Reject": 0
},
"SpecificationsMapping": []
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/suggestions/configuration?accountName=");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "accept: ");
headers = curl_slist_append(headers, "content-type: ");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"MatchFlux\": \"\",\n \"Matchers\": [\n {\n \"Description\": \"\",\n \"IsActive\": false,\n \"MatcherId\": \"\",\n \"UpdatesNotificationEndpoint\": \"\",\n \"hook-base-address\": \"\"\n }\n ],\n \"Score\": {\n \"Approve\": 0,\n \"Reject\": 0\n },\n \"SpecificationsMapping\": []\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/suggestions/configuration" {:headers {:accept ""}
:query-params {:accountName ""}
:content-type :json
:form-params {:MatchFlux ""
:Matchers [{:Description ""
:IsActive false
:MatcherId ""
:UpdatesNotificationEndpoint ""
:hook-base-address ""}]
:Score {:Approve 0
:Reject 0}
:SpecificationsMapping []}})
require "http/client"
url = "{{baseUrl}}/suggestions/configuration?accountName="
headers = HTTP::Headers{
"accept" => ""
"content-type" => ""
}
reqBody = "{\n \"MatchFlux\": \"\",\n \"Matchers\": [\n {\n \"Description\": \"\",\n \"IsActive\": false,\n \"MatcherId\": \"\",\n \"UpdatesNotificationEndpoint\": \"\",\n \"hook-base-address\": \"\"\n }\n ],\n \"Score\": {\n \"Approve\": 0,\n \"Reject\": 0\n },\n \"SpecificationsMapping\": []\n}"
response = HTTP::Client.put url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Put,
RequestUri = new Uri("{{baseUrl}}/suggestions/configuration?accountName="),
Headers =
{
{ "accept", "" },
},
Content = new StringContent("{\n \"MatchFlux\": \"\",\n \"Matchers\": [\n {\n \"Description\": \"\",\n \"IsActive\": false,\n \"MatcherId\": \"\",\n \"UpdatesNotificationEndpoint\": \"\",\n \"hook-base-address\": \"\"\n }\n ],\n \"Score\": {\n \"Approve\": 0,\n \"Reject\": 0\n },\n \"SpecificationsMapping\": []\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}}/suggestions/configuration?accountName=");
var request = new RestRequest("", Method.Put);
request.AddHeader("accept", "");
request.AddHeader("content-type", "");
request.AddParameter("", "{\n \"MatchFlux\": \"\",\n \"Matchers\": [\n {\n \"Description\": \"\",\n \"IsActive\": false,\n \"MatcherId\": \"\",\n \"UpdatesNotificationEndpoint\": \"\",\n \"hook-base-address\": \"\"\n }\n ],\n \"Score\": {\n \"Approve\": 0,\n \"Reject\": 0\n },\n \"SpecificationsMapping\": []\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/suggestions/configuration?accountName="
payload := strings.NewReader("{\n \"MatchFlux\": \"\",\n \"Matchers\": [\n {\n \"Description\": \"\",\n \"IsActive\": false,\n \"MatcherId\": \"\",\n \"UpdatesNotificationEndpoint\": \"\",\n \"hook-base-address\": \"\"\n }\n ],\n \"Score\": {\n \"Approve\": 0,\n \"Reject\": 0\n },\n \"SpecificationsMapping\": []\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("accept", "")
req.Header.Add("content-type", "")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
PUT /baseUrl/suggestions/configuration?accountName= HTTP/1.1
Accept:
Content-Type:
Host: example.com
Content-Length: 281
{
"MatchFlux": "",
"Matchers": [
{
"Description": "",
"IsActive": false,
"MatcherId": "",
"UpdatesNotificationEndpoint": "",
"hook-base-address": ""
}
],
"Score": {
"Approve": 0,
"Reject": 0
},
"SpecificationsMapping": []
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/suggestions/configuration?accountName=")
.setHeader("accept", "")
.setHeader("content-type", "")
.setBody("{\n \"MatchFlux\": \"\",\n \"Matchers\": [\n {\n \"Description\": \"\",\n \"IsActive\": false,\n \"MatcherId\": \"\",\n \"UpdatesNotificationEndpoint\": \"\",\n \"hook-base-address\": \"\"\n }\n ],\n \"Score\": {\n \"Approve\": 0,\n \"Reject\": 0\n },\n \"SpecificationsMapping\": []\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/suggestions/configuration?accountName="))
.header("accept", "")
.header("content-type", "")
.method("PUT", HttpRequest.BodyPublishers.ofString("{\n \"MatchFlux\": \"\",\n \"Matchers\": [\n {\n \"Description\": \"\",\n \"IsActive\": false,\n \"MatcherId\": \"\",\n \"UpdatesNotificationEndpoint\": \"\",\n \"hook-base-address\": \"\"\n }\n ],\n \"Score\": {\n \"Approve\": 0,\n \"Reject\": 0\n },\n \"SpecificationsMapping\": []\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 \"MatchFlux\": \"\",\n \"Matchers\": [\n {\n \"Description\": \"\",\n \"IsActive\": false,\n \"MatcherId\": \"\",\n \"UpdatesNotificationEndpoint\": \"\",\n \"hook-base-address\": \"\"\n }\n ],\n \"Score\": {\n \"Approve\": 0,\n \"Reject\": 0\n },\n \"SpecificationsMapping\": []\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/suggestions/configuration?accountName=")
.put(body)
.addHeader("accept", "")
.addHeader("content-type", "")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/suggestions/configuration?accountName=")
.header("accept", "")
.header("content-type", "")
.body("{\n \"MatchFlux\": \"\",\n \"Matchers\": [\n {\n \"Description\": \"\",\n \"IsActive\": false,\n \"MatcherId\": \"\",\n \"UpdatesNotificationEndpoint\": \"\",\n \"hook-base-address\": \"\"\n }\n ],\n \"Score\": {\n \"Approve\": 0,\n \"Reject\": 0\n },\n \"SpecificationsMapping\": []\n}")
.asString();
const data = JSON.stringify({
MatchFlux: '',
Matchers: [
{
Description: '',
IsActive: false,
MatcherId: '',
UpdatesNotificationEndpoint: '',
'hook-base-address': ''
}
],
Score: {
Approve: 0,
Reject: 0
},
SpecificationsMapping: []
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/suggestions/configuration?accountName=');
xhr.setRequestHeader('accept', '');
xhr.setRequestHeader('content-type', '');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/suggestions/configuration',
params: {accountName: ''},
headers: {accept: '', 'content-type': ''},
data: {
MatchFlux: '',
Matchers: [
{
Description: '',
IsActive: false,
MatcherId: '',
UpdatesNotificationEndpoint: '',
'hook-base-address': ''
}
],
Score: {Approve: 0, Reject: 0},
SpecificationsMapping: []
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/suggestions/configuration?accountName=';
const options = {
method: 'PUT',
headers: {accept: '', 'content-type': ''},
body: '{"MatchFlux":"","Matchers":[{"Description":"","IsActive":false,"MatcherId":"","UpdatesNotificationEndpoint":"","hook-base-address":""}],"Score":{"Approve":0,"Reject":0},"SpecificationsMapping":[]}'
};
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}}/suggestions/configuration?accountName=',
method: 'PUT',
headers: {
accept: '',
'content-type': ''
},
processData: false,
data: '{\n "MatchFlux": "",\n "Matchers": [\n {\n "Description": "",\n "IsActive": false,\n "MatcherId": "",\n "UpdatesNotificationEndpoint": "",\n "hook-base-address": ""\n }\n ],\n "Score": {\n "Approve": 0,\n "Reject": 0\n },\n "SpecificationsMapping": []\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"MatchFlux\": \"\",\n \"Matchers\": [\n {\n \"Description\": \"\",\n \"IsActive\": false,\n \"MatcherId\": \"\",\n \"UpdatesNotificationEndpoint\": \"\",\n \"hook-base-address\": \"\"\n }\n ],\n \"Score\": {\n \"Approve\": 0,\n \"Reject\": 0\n },\n \"SpecificationsMapping\": []\n}")
val request = Request.Builder()
.url("{{baseUrl}}/suggestions/configuration?accountName=")
.put(body)
.addHeader("accept", "")
.addHeader("content-type", "")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PUT',
hostname: 'example.com',
port: null,
path: '/baseUrl/suggestions/configuration?accountName=',
headers: {
accept: '',
'content-type': ''
}
};
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({
MatchFlux: '',
Matchers: [
{
Description: '',
IsActive: false,
MatcherId: '',
UpdatesNotificationEndpoint: '',
'hook-base-address': ''
}
],
Score: {Approve: 0, Reject: 0},
SpecificationsMapping: []
}));
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/suggestions/configuration',
qs: {accountName: ''},
headers: {accept: '', 'content-type': ''},
body: {
MatchFlux: '',
Matchers: [
{
Description: '',
IsActive: false,
MatcherId: '',
UpdatesNotificationEndpoint: '',
'hook-base-address': ''
}
],
Score: {Approve: 0, Reject: 0},
SpecificationsMapping: []
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PUT', '{{baseUrl}}/suggestions/configuration');
req.query({
accountName: ''
});
req.headers({
accept: '',
'content-type': ''
});
req.type('json');
req.send({
MatchFlux: '',
Matchers: [
{
Description: '',
IsActive: false,
MatcherId: '',
UpdatesNotificationEndpoint: '',
'hook-base-address': ''
}
],
Score: {
Approve: 0,
Reject: 0
},
SpecificationsMapping: []
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PUT',
url: '{{baseUrl}}/suggestions/configuration',
params: {accountName: ''},
headers: {accept: '', 'content-type': ''},
data: {
MatchFlux: '',
Matchers: [
{
Description: '',
IsActive: false,
MatcherId: '',
UpdatesNotificationEndpoint: '',
'hook-base-address': ''
}
],
Score: {Approve: 0, Reject: 0},
SpecificationsMapping: []
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/suggestions/configuration?accountName=';
const options = {
method: 'PUT',
headers: {accept: '', 'content-type': ''},
body: '{"MatchFlux":"","Matchers":[{"Description":"","IsActive":false,"MatcherId":"","UpdatesNotificationEndpoint":"","hook-base-address":""}],"Score":{"Approve":0,"Reject":0},"SpecificationsMapping":[]}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"accept": @"",
@"content-type": @"" };
NSDictionary *parameters = @{ @"MatchFlux": @"",
@"Matchers": @[ @{ @"Description": @"", @"IsActive": @NO, @"MatcherId": @"", @"UpdatesNotificationEndpoint": @"", @"hook-base-address": @"" } ],
@"Score": @{ @"Approve": @0, @"Reject": @0 },
@"SpecificationsMapping": @[ ] };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/suggestions/configuration?accountName="]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PUT"];
[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}}/suggestions/configuration?accountName=" in
let headers = Header.add_list (Header.init ()) [
("accept", "");
("content-type", "");
] in
let body = Cohttp_lwt_body.of_string "{\n \"MatchFlux\": \"\",\n \"Matchers\": [\n {\n \"Description\": \"\",\n \"IsActive\": false,\n \"MatcherId\": \"\",\n \"UpdatesNotificationEndpoint\": \"\",\n \"hook-base-address\": \"\"\n }\n ],\n \"Score\": {\n \"Approve\": 0,\n \"Reject\": 0\n },\n \"SpecificationsMapping\": []\n}" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/suggestions/configuration?accountName=",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'MatchFlux' => '',
'Matchers' => [
[
'Description' => '',
'IsActive' => null,
'MatcherId' => '',
'UpdatesNotificationEndpoint' => '',
'hook-base-address' => ''
]
],
'Score' => [
'Approve' => 0,
'Reject' => 0
],
'SpecificationsMapping' => [
]
]),
CURLOPT_HTTPHEADER => [
"accept: ",
"content-type: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('PUT', '{{baseUrl}}/suggestions/configuration?accountName=', [
'body' => '{
"MatchFlux": "",
"Matchers": [
{
"Description": "",
"IsActive": false,
"MatcherId": "",
"UpdatesNotificationEndpoint": "",
"hook-base-address": ""
}
],
"Score": {
"Approve": 0,
"Reject": 0
},
"SpecificationsMapping": []
}',
'headers' => [
'accept' => '',
'content-type' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/suggestions/configuration');
$request->setMethod(HTTP_METH_PUT);
$request->setQueryData([
'accountName' => ''
]);
$request->setHeaders([
'accept' => '',
'content-type' => ''
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'MatchFlux' => '',
'Matchers' => [
[
'Description' => '',
'IsActive' => null,
'MatcherId' => '',
'UpdatesNotificationEndpoint' => '',
'hook-base-address' => ''
]
],
'Score' => [
'Approve' => 0,
'Reject' => 0
],
'SpecificationsMapping' => [
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'MatchFlux' => '',
'Matchers' => [
[
'Description' => '',
'IsActive' => null,
'MatcherId' => '',
'UpdatesNotificationEndpoint' => '',
'hook-base-address' => ''
]
],
'Score' => [
'Approve' => 0,
'Reject' => 0
],
'SpecificationsMapping' => [
]
]));
$request->setRequestUrl('{{baseUrl}}/suggestions/configuration');
$request->setRequestMethod('PUT');
$request->setBody($body);
$request->setQuery(new http\QueryString([
'accountName' => ''
]));
$request->setHeaders([
'accept' => '',
'content-type' => ''
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("accept", "")
$headers.Add("content-type", "")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/suggestions/configuration?accountName=' -Method PUT -Headers $headers -ContentType '' -Body '{
"MatchFlux": "",
"Matchers": [
{
"Description": "",
"IsActive": false,
"MatcherId": "",
"UpdatesNotificationEndpoint": "",
"hook-base-address": ""
}
],
"Score": {
"Approve": 0,
"Reject": 0
},
"SpecificationsMapping": []
}'
$headers=@{}
$headers.Add("accept", "")
$headers.Add("content-type", "")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/suggestions/configuration?accountName=' -Method PUT -Headers $headers -ContentType '' -Body '{
"MatchFlux": "",
"Matchers": [
{
"Description": "",
"IsActive": false,
"MatcherId": "",
"UpdatesNotificationEndpoint": "",
"hook-base-address": ""
}
],
"Score": {
"Approve": 0,
"Reject": 0
},
"SpecificationsMapping": []
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"MatchFlux\": \"\",\n \"Matchers\": [\n {\n \"Description\": \"\",\n \"IsActive\": false,\n \"MatcherId\": \"\",\n \"UpdatesNotificationEndpoint\": \"\",\n \"hook-base-address\": \"\"\n }\n ],\n \"Score\": {\n \"Approve\": 0,\n \"Reject\": 0\n },\n \"SpecificationsMapping\": []\n}"
headers = {
'accept': "",
'content-type': ""
}
conn.request("PUT", "/baseUrl/suggestions/configuration?accountName=", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/suggestions/configuration"
querystring = {"accountName":""}
payload = {
"MatchFlux": "",
"Matchers": [
{
"Description": "",
"IsActive": False,
"MatcherId": "",
"UpdatesNotificationEndpoint": "",
"hook-base-address": ""
}
],
"Score": {
"Approve": 0,
"Reject": 0
},
"SpecificationsMapping": []
}
headers = {
"accept": "",
"content-type": ""
}
response = requests.put(url, json=payload, headers=headers, params=querystring)
print(response.json())
library(httr)
url <- "{{baseUrl}}/suggestions/configuration"
queryString <- list(accountName = "")
payload <- "{\n \"MatchFlux\": \"\",\n \"Matchers\": [\n {\n \"Description\": \"\",\n \"IsActive\": false,\n \"MatcherId\": \"\",\n \"UpdatesNotificationEndpoint\": \"\",\n \"hook-base-address\": \"\"\n }\n ],\n \"Score\": {\n \"Approve\": 0,\n \"Reject\": 0\n },\n \"SpecificationsMapping\": []\n}"
encode <- "json"
response <- VERB("PUT", url, body = payload, query = queryString, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/suggestions/configuration?accountName=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["accept"] = ''
request["content-type"] = ''
request.body = "{\n \"MatchFlux\": \"\",\n \"Matchers\": [\n {\n \"Description\": \"\",\n \"IsActive\": false,\n \"MatcherId\": \"\",\n \"UpdatesNotificationEndpoint\": \"\",\n \"hook-base-address\": \"\"\n }\n ],\n \"Score\": {\n \"Approve\": 0,\n \"Reject\": 0\n },\n \"SpecificationsMapping\": []\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.put('/baseUrl/suggestions/configuration') do |req|
req.headers['accept'] = ''
req.params['accountName'] = ''
req.body = "{\n \"MatchFlux\": \"\",\n \"Matchers\": [\n {\n \"Description\": \"\",\n \"IsActive\": false,\n \"MatcherId\": \"\",\n \"UpdatesNotificationEndpoint\": \"\",\n \"hook-base-address\": \"\"\n }\n ],\n \"Score\": {\n \"Approve\": 0,\n \"Reject\": 0\n },\n \"SpecificationsMapping\": []\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}}/suggestions/configuration";
let querystring = [
("accountName", ""),
];
let payload = json!({
"MatchFlux": "",
"Matchers": (
json!({
"Description": "",
"IsActive": false,
"MatcherId": "",
"UpdatesNotificationEndpoint": "",
"hook-base-address": ""
})
),
"Score": json!({
"Approve": 0,
"Reject": 0
}),
"SpecificationsMapping": ()
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("accept", "".parse().unwrap());
headers.insert("content-type", "".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PUT").unwrap(), url)
.query(&querystring)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url '{{baseUrl}}/suggestions/configuration?accountName=' \
--header 'accept: ' \
--header 'content-type: ' \
--data '{
"MatchFlux": "",
"Matchers": [
{
"Description": "",
"IsActive": false,
"MatcherId": "",
"UpdatesNotificationEndpoint": "",
"hook-base-address": ""
}
],
"Score": {
"Approve": 0,
"Reject": 0
},
"SpecificationsMapping": []
}'
echo '{
"MatchFlux": "",
"Matchers": [
{
"Description": "",
"IsActive": false,
"MatcherId": "",
"UpdatesNotificationEndpoint": "",
"hook-base-address": ""
}
],
"Score": {
"Approve": 0,
"Reject": 0
},
"SpecificationsMapping": []
}' | \
http PUT '{{baseUrl}}/suggestions/configuration?accountName=' \
accept:'' \
content-type:''
wget --quiet \
--method PUT \
--header 'accept: ' \
--header 'content-type: ' \
--body-data '{\n "MatchFlux": "",\n "Matchers": [\n {\n "Description": "",\n "IsActive": false,\n "MatcherId": "",\n "UpdatesNotificationEndpoint": "",\n "hook-base-address": ""\n }\n ],\n "Score": {\n "Approve": 0,\n "Reject": 0\n },\n "SpecificationsMapping": []\n}' \
--output-document \
- '{{baseUrl}}/suggestions/configuration?accountName='
import Foundation
let headers = [
"accept": "",
"content-type": ""
]
let parameters = [
"MatchFlux": "",
"Matchers": [
[
"Description": "",
"IsActive": false,
"MatcherId": "",
"UpdatesNotificationEndpoint": "",
"hook-base-address": ""
]
],
"Score": [
"Approve": 0,
"Reject": 0
],
"SpecificationsMapping": []
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/suggestions/configuration?accountName=")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PUT"
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()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"MatchFlux": "AutoApprove",
"Matchers": [
{
"Description": "Note",
"IsActive": true,
"MatcherId": "vtex-matcher",
"UpdatesNotificationEndpoint": "notification.endpoint",
"hook-base-address": "http://simple-suggestion-matcher.vtex.com.br"
}
],
"Rules": {
"Item": [
1
],
"Product": [
"Shirt"
]
},
"Score": {
"Approve": 80,
"Reject": 30
},
"SpecificationsMapping": [
{
"Mapping": {
"Yellow": "Light yellow"
},
"SellerId": "Store1"
}
]
}
PUT
Save Seller's Approval Settings
{{baseUrl}}/suggestions/configuration/seller/:sellerId
HEADERS
Accept
Content-Type
QUERY PARAMS
accountName
sellerId
BODY json
{
"mapping": {},
"matchFlux": "",
"sellerId": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/suggestions/configuration/seller/:sellerId?accountName=");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "accept: ");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"mapping\": null,\n \"matchFlux\": \"Default\",\n \"sellerId\": \"1a\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/suggestions/configuration/seller/:sellerId" {:headers {:accept ""}
:query-params {:accountName ""}
:content-type :json
:form-params {:mapping nil
:matchFlux "Default"
:sellerId "1a"}})
require "http/client"
url = "{{baseUrl}}/suggestions/configuration/seller/:sellerId?accountName="
headers = HTTP::Headers{
"accept" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"mapping\": null,\n \"matchFlux\": \"Default\",\n \"sellerId\": \"1a\"\n}"
response = HTTP::Client.put url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Put,
RequestUri = new Uri("{{baseUrl}}/suggestions/configuration/seller/:sellerId?accountName="),
Headers =
{
{ "accept", "" },
},
Content = new StringContent("{\n \"mapping\": null,\n \"matchFlux\": \"Default\",\n \"sellerId\": \"1a\"\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}}/suggestions/configuration/seller/:sellerId?accountName=");
var request = new RestRequest("", Method.Put);
request.AddHeader("accept", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"mapping\": null,\n \"matchFlux\": \"Default\",\n \"sellerId\": \"1a\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/suggestions/configuration/seller/:sellerId?accountName="
payload := strings.NewReader("{\n \"mapping\": null,\n \"matchFlux\": \"Default\",\n \"sellerId\": \"1a\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("accept", "")
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))
}
PUT /baseUrl/suggestions/configuration/seller/:sellerId?accountName= HTTP/1.1
Accept:
Content-Type: application/json
Host: example.com
Content-Length: 67
{
"mapping": null,
"matchFlux": "Default",
"sellerId": "1a"
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/suggestions/configuration/seller/:sellerId?accountName=")
.setHeader("accept", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"mapping\": null,\n \"matchFlux\": \"Default\",\n \"sellerId\": \"1a\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/suggestions/configuration/seller/:sellerId?accountName="))
.header("accept", "")
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("{\n \"mapping\": null,\n \"matchFlux\": \"Default\",\n \"sellerId\": \"1a\"\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 \"mapping\": null,\n \"matchFlux\": \"Default\",\n \"sellerId\": \"1a\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/suggestions/configuration/seller/:sellerId?accountName=")
.put(body)
.addHeader("accept", "")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/suggestions/configuration/seller/:sellerId?accountName=")
.header("accept", "")
.header("content-type", "application/json")
.body("{\n \"mapping\": null,\n \"matchFlux\": \"Default\",\n \"sellerId\": \"1a\"\n}")
.asString();
const data = JSON.stringify({
mapping: null,
matchFlux: 'Default',
sellerId: '1a'
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/suggestions/configuration/seller/:sellerId?accountName=');
xhr.setRequestHeader('accept', '');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/suggestions/configuration/seller/:sellerId',
params: {accountName: ''},
headers: {accept: '', 'content-type': 'application/json'},
data: {mapping: null, matchFlux: 'Default', sellerId: '1a'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/suggestions/configuration/seller/:sellerId?accountName=';
const options = {
method: 'PUT',
headers: {accept: '', 'content-type': 'application/json'},
body: '{"mapping":null,"matchFlux":"Default","sellerId":"1a"}'
};
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}}/suggestions/configuration/seller/:sellerId?accountName=',
method: 'PUT',
headers: {
accept: '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "mapping": null,\n "matchFlux": "Default",\n "sellerId": "1a"\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"mapping\": null,\n \"matchFlux\": \"Default\",\n \"sellerId\": \"1a\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/suggestions/configuration/seller/:sellerId?accountName=")
.put(body)
.addHeader("accept", "")
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PUT',
hostname: 'example.com',
port: null,
path: '/baseUrl/suggestions/configuration/seller/:sellerId?accountName=',
headers: {
accept: '',
'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({mapping: null, matchFlux: 'Default', sellerId: '1a'}));
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/suggestions/configuration/seller/:sellerId',
qs: {accountName: ''},
headers: {accept: '', 'content-type': 'application/json'},
body: {mapping: null, matchFlux: 'Default', sellerId: '1a'},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PUT', '{{baseUrl}}/suggestions/configuration/seller/:sellerId');
req.query({
accountName: ''
});
req.headers({
accept: '',
'content-type': 'application/json'
});
req.type('json');
req.send({
mapping: null,
matchFlux: 'Default',
sellerId: '1a'
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PUT',
url: '{{baseUrl}}/suggestions/configuration/seller/:sellerId',
params: {accountName: ''},
headers: {accept: '', 'content-type': 'application/json'},
data: {mapping: null, matchFlux: 'Default', sellerId: '1a'}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/suggestions/configuration/seller/:sellerId?accountName=';
const options = {
method: 'PUT',
headers: {accept: '', 'content-type': 'application/json'},
body: '{"mapping":null,"matchFlux":"Default","sellerId":"1a"}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"accept": @"",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"mapping": ,
@"matchFlux": @"Default",
@"sellerId": @"1a" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/suggestions/configuration/seller/:sellerId?accountName="]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PUT"];
[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}}/suggestions/configuration/seller/:sellerId?accountName=" in
let headers = Header.add_list (Header.init ()) [
("accept", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"mapping\": null,\n \"matchFlux\": \"Default\",\n \"sellerId\": \"1a\"\n}" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/suggestions/configuration/seller/:sellerId?accountName=",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'mapping' => null,
'matchFlux' => 'Default',
'sellerId' => '1a'
]),
CURLOPT_HTTPHEADER => [
"accept: ",
"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('PUT', '{{baseUrl}}/suggestions/configuration/seller/:sellerId?accountName=', [
'body' => '{
"mapping": null,
"matchFlux": "Default",
"sellerId": "1a"
}',
'headers' => [
'accept' => '',
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/suggestions/configuration/seller/:sellerId');
$request->setMethod(HTTP_METH_PUT);
$request->setQueryData([
'accountName' => ''
]);
$request->setHeaders([
'accept' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'mapping' => null,
'matchFlux' => 'Default',
'sellerId' => '1a'
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'mapping' => null,
'matchFlux' => 'Default',
'sellerId' => '1a'
]));
$request->setRequestUrl('{{baseUrl}}/suggestions/configuration/seller/:sellerId');
$request->setRequestMethod('PUT');
$request->setBody($body);
$request->setQuery(new http\QueryString([
'accountName' => ''
]));
$request->setHeaders([
'accept' => '',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("accept", "")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/suggestions/configuration/seller/:sellerId?accountName=' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"mapping": null,
"matchFlux": "Default",
"sellerId": "1a"
}'
$headers=@{}
$headers.Add("accept", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/suggestions/configuration/seller/:sellerId?accountName=' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"mapping": null,
"matchFlux": "Default",
"sellerId": "1a"
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"mapping\": null,\n \"matchFlux\": \"Default\",\n \"sellerId\": \"1a\"\n}"
headers = {
'accept': "",
'content-type': "application/json"
}
conn.request("PUT", "/baseUrl/suggestions/configuration/seller/:sellerId?accountName=", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/suggestions/configuration/seller/:sellerId"
querystring = {"accountName":""}
payload = {
"mapping": None,
"matchFlux": "Default",
"sellerId": "1a"
}
headers = {
"accept": "",
"content-type": "application/json"
}
response = requests.put(url, json=payload, headers=headers, params=querystring)
print(response.json())
library(httr)
url <- "{{baseUrl}}/suggestions/configuration/seller/:sellerId"
queryString <- list(accountName = "")
payload <- "{\n \"mapping\": null,\n \"matchFlux\": \"Default\",\n \"sellerId\": \"1a\"\n}"
encode <- "json"
response <- VERB("PUT", url, body = payload, query = queryString, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/suggestions/configuration/seller/:sellerId?accountName=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["accept"] = ''
request["content-type"] = 'application/json'
request.body = "{\n \"mapping\": null,\n \"matchFlux\": \"Default\",\n \"sellerId\": \"1a\"\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.put('/baseUrl/suggestions/configuration/seller/:sellerId') do |req|
req.headers['accept'] = ''
req.params['accountName'] = ''
req.body = "{\n \"mapping\": null,\n \"matchFlux\": \"Default\",\n \"sellerId\": \"1a\"\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}}/suggestions/configuration/seller/:sellerId";
let querystring = [
("accountName", ""),
];
let payload = json!({
"mapping": json!(null),
"matchFlux": "Default",
"sellerId": "1a"
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("accept", "".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PUT").unwrap(), url)
.query(&querystring)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url '{{baseUrl}}/suggestions/configuration/seller/:sellerId?accountName=' \
--header 'accept: ' \
--header 'content-type: application/json' \
--data '{
"mapping": null,
"matchFlux": "Default",
"sellerId": "1a"
}'
echo '{
"mapping": null,
"matchFlux": "Default",
"sellerId": "1a"
}' | \
http PUT '{{baseUrl}}/suggestions/configuration/seller/:sellerId?accountName=' \
accept:'' \
content-type:application/json
wget --quiet \
--method PUT \
--header 'accept: ' \
--header 'content-type: application/json' \
--body-data '{\n "mapping": null,\n "matchFlux": "Default",\n "sellerId": "1a"\n}' \
--output-document \
- '{{baseUrl}}/suggestions/configuration/seller/:sellerId?accountName='
import Foundation
let headers = [
"accept": "",
"content-type": "application/json"
]
let parameters = [
"mapping": ,
"matchFlux": "Default",
"sellerId": "1a"
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/suggestions/configuration/seller/:sellerId?accountName=")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PUT"
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()