Account API
GET
getAdvertisingEligibility
{{baseUrl}}/advertising_eligibility
HEADERS
X-EBAY-C-MARKETPLACE-ID
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/advertising_eligibility");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-ebay-c-marketplace-id: ");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/advertising_eligibility" {:headers {:x-ebay-c-marketplace-id ""}})
require "http/client"
url = "{{baseUrl}}/advertising_eligibility"
headers = HTTP::Headers{
"x-ebay-c-marketplace-id" => ""
}
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}}/advertising_eligibility"),
Headers =
{
{ "x-ebay-c-marketplace-id", "" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/advertising_eligibility");
var request = new RestRequest("", Method.Get);
request.AddHeader("x-ebay-c-marketplace-id", "");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/advertising_eligibility"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-ebay-c-marketplace-id", "")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/advertising_eligibility HTTP/1.1
X-Ebay-C-Marketplace-Id:
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/advertising_eligibility")
.setHeader("x-ebay-c-marketplace-id", "")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/advertising_eligibility"))
.header("x-ebay-c-marketplace-id", "")
.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}}/advertising_eligibility")
.get()
.addHeader("x-ebay-c-marketplace-id", "")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/advertising_eligibility")
.header("x-ebay-c-marketplace-id", "")
.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}}/advertising_eligibility');
xhr.setRequestHeader('x-ebay-c-marketplace-id', '');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/advertising_eligibility',
headers: {'x-ebay-c-marketplace-id': ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/advertising_eligibility';
const options = {method: 'GET', headers: {'x-ebay-c-marketplace-id': ''}};
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}}/advertising_eligibility',
method: 'GET',
headers: {
'x-ebay-c-marketplace-id': ''
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/advertising_eligibility")
.get()
.addHeader("x-ebay-c-marketplace-id", "")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/advertising_eligibility',
headers: {
'x-ebay-c-marketplace-id': ''
}
};
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}}/advertising_eligibility',
headers: {'x-ebay-c-marketplace-id': ''}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/advertising_eligibility');
req.headers({
'x-ebay-c-marketplace-id': ''
});
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}}/advertising_eligibility',
headers: {'x-ebay-c-marketplace-id': ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/advertising_eligibility';
const options = {method: 'GET', headers: {'x-ebay-c-marketplace-id': ''}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"x-ebay-c-marketplace-id": @"" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/advertising_eligibility"]
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}}/advertising_eligibility" in
let headers = Header.add (Header.init ()) "x-ebay-c-marketplace-id" "" in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/advertising_eligibility",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-ebay-c-marketplace-id: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/advertising_eligibility', [
'headers' => [
'x-ebay-c-marketplace-id' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/advertising_eligibility');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'x-ebay-c-marketplace-id' => ''
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/advertising_eligibility');
$request->setRequestMethod('GET');
$request->setHeaders([
'x-ebay-c-marketplace-id' => ''
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("x-ebay-c-marketplace-id", "")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/advertising_eligibility' -Method GET -Headers $headers
$headers=@{}
$headers.Add("x-ebay-c-marketplace-id", "")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/advertising_eligibility' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'x-ebay-c-marketplace-id': "" }
conn.request("GET", "/baseUrl/advertising_eligibility", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/advertising_eligibility"
headers = {"x-ebay-c-marketplace-id": ""}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/advertising_eligibility"
response <- VERB("GET", url, add_headers('x-ebay-c-marketplace-id' = ''), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/advertising_eligibility")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-ebay-c-marketplace-id"] = ''
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/advertising_eligibility') do |req|
req.headers['x-ebay-c-marketplace-id'] = ''
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/advertising_eligibility";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("x-ebay-c-marketplace-id", "".parse().unwrap());
let client = reqwest::Client::new();
let response = client.get(url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/advertising_eligibility \
--header 'x-ebay-c-marketplace-id: '
http GET {{baseUrl}}/advertising_eligibility \
x-ebay-c-marketplace-id:''
wget --quiet \
--method GET \
--header 'x-ebay-c-marketplace-id: ' \
--output-document \
- {{baseUrl}}/advertising_eligibility
import Foundation
let headers = ["x-ebay-c-marketplace-id": ""]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/advertising_eligibility")! 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()
POST
createCustomPolicy
{{baseUrl}}/custom_policy/
HEADERS
X-EBAY-C-MARKETPLACE-ID
BODY json
{
"description": "",
"label": "",
"name": "",
"policyType": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/custom_policy/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-ebay-c-marketplace-id: ");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"description\": \"\",\n \"label\": \"\",\n \"name\": \"\",\n \"policyType\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/custom_policy/" {:headers {:x-ebay-c-marketplace-id ""}
:content-type :json
:form-params {:description ""
:label ""
:name ""
:policyType ""}})
require "http/client"
url = "{{baseUrl}}/custom_policy/"
headers = HTTP::Headers{
"x-ebay-c-marketplace-id" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"description\": \"\",\n \"label\": \"\",\n \"name\": \"\",\n \"policyType\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/custom_policy/"),
Headers =
{
{ "x-ebay-c-marketplace-id", "" },
},
Content = new StringContent("{\n \"description\": \"\",\n \"label\": \"\",\n \"name\": \"\",\n \"policyType\": \"\"\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}}/custom_policy/");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-ebay-c-marketplace-id", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"description\": \"\",\n \"label\": \"\",\n \"name\": \"\",\n \"policyType\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/custom_policy/"
payload := strings.NewReader("{\n \"description\": \"\",\n \"label\": \"\",\n \"name\": \"\",\n \"policyType\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-ebay-c-marketplace-id", "")
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/custom_policy/ HTTP/1.1
X-Ebay-C-Marketplace-Id:
Content-Type: application/json
Host: example.com
Content-Length: 72
{
"description": "",
"label": "",
"name": "",
"policyType": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/custom_policy/")
.setHeader("x-ebay-c-marketplace-id", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"description\": \"\",\n \"label\": \"\",\n \"name\": \"\",\n \"policyType\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/custom_policy/"))
.header("x-ebay-c-marketplace-id", "")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"description\": \"\",\n \"label\": \"\",\n \"name\": \"\",\n \"policyType\": \"\"\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 \"description\": \"\",\n \"label\": \"\",\n \"name\": \"\",\n \"policyType\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/custom_policy/")
.post(body)
.addHeader("x-ebay-c-marketplace-id", "")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/custom_policy/")
.header("x-ebay-c-marketplace-id", "")
.header("content-type", "application/json")
.body("{\n \"description\": \"\",\n \"label\": \"\",\n \"name\": \"\",\n \"policyType\": \"\"\n}")
.asString();
const data = JSON.stringify({
description: '',
label: '',
name: '',
policyType: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/custom_policy/');
xhr.setRequestHeader('x-ebay-c-marketplace-id', '');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/custom_policy/',
headers: {'x-ebay-c-marketplace-id': '', 'content-type': 'application/json'},
data: {description: '', label: '', name: '', policyType: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/custom_policy/';
const options = {
method: 'POST',
headers: {'x-ebay-c-marketplace-id': '', 'content-type': 'application/json'},
body: '{"description":"","label":"","name":"","policyType":""}'
};
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}}/custom_policy/',
method: 'POST',
headers: {
'x-ebay-c-marketplace-id': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "description": "",\n "label": "",\n "name": "",\n "policyType": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"description\": \"\",\n \"label\": \"\",\n \"name\": \"\",\n \"policyType\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/custom_policy/")
.post(body)
.addHeader("x-ebay-c-marketplace-id", "")
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/custom_policy/',
headers: {
'x-ebay-c-marketplace-id': '',
'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({description: '', label: '', name: '', policyType: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/custom_policy/',
headers: {'x-ebay-c-marketplace-id': '', 'content-type': 'application/json'},
body: {description: '', label: '', name: '', policyType: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/custom_policy/');
req.headers({
'x-ebay-c-marketplace-id': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
description: '',
label: '',
name: '',
policyType: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/custom_policy/',
headers: {'x-ebay-c-marketplace-id': '', 'content-type': 'application/json'},
data: {description: '', label: '', name: '', policyType: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/custom_policy/';
const options = {
method: 'POST',
headers: {'x-ebay-c-marketplace-id': '', 'content-type': 'application/json'},
body: '{"description":"","label":"","name":"","policyType":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"x-ebay-c-marketplace-id": @"",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"description": @"",
@"label": @"",
@"name": @"",
@"policyType": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/custom_policy/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/custom_policy/" in
let headers = Header.add_list (Header.init ()) [
("x-ebay-c-marketplace-id", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"description\": \"\",\n \"label\": \"\",\n \"name\": \"\",\n \"policyType\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/custom_policy/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'description' => '',
'label' => '',
'name' => '',
'policyType' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json",
"x-ebay-c-marketplace-id: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/custom_policy/', [
'body' => '{
"description": "",
"label": "",
"name": "",
"policyType": ""
}',
'headers' => [
'content-type' => 'application/json',
'x-ebay-c-marketplace-id' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/custom_policy/');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'x-ebay-c-marketplace-id' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'description' => '',
'label' => '',
'name' => '',
'policyType' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'description' => '',
'label' => '',
'name' => '',
'policyType' => ''
]));
$request->setRequestUrl('{{baseUrl}}/custom_policy/');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'x-ebay-c-marketplace-id' => '',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("x-ebay-c-marketplace-id", "")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/custom_policy/' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"description": "",
"label": "",
"name": "",
"policyType": ""
}'
$headers=@{}
$headers.Add("x-ebay-c-marketplace-id", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/custom_policy/' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"description": "",
"label": "",
"name": "",
"policyType": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"description\": \"\",\n \"label\": \"\",\n \"name\": \"\",\n \"policyType\": \"\"\n}"
headers = {
'x-ebay-c-marketplace-id': "",
'content-type': "application/json"
}
conn.request("POST", "/baseUrl/custom_policy/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/custom_policy/"
payload = {
"description": "",
"label": "",
"name": "",
"policyType": ""
}
headers = {
"x-ebay-c-marketplace-id": "",
"content-type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/custom_policy/"
payload <- "{\n \"description\": \"\",\n \"label\": \"\",\n \"name\": \"\",\n \"policyType\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, add_headers('x-ebay-c-marketplace-id' = ''), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/custom_policy/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-ebay-c-marketplace-id"] = ''
request["content-type"] = 'application/json'
request.body = "{\n \"description\": \"\",\n \"label\": \"\",\n \"name\": \"\",\n \"policyType\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/custom_policy/') do |req|
req.headers['x-ebay-c-marketplace-id'] = ''
req.body = "{\n \"description\": \"\",\n \"label\": \"\",\n \"name\": \"\",\n \"policyType\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/custom_policy/";
let payload = json!({
"description": "",
"label": "",
"name": "",
"policyType": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("x-ebay-c-marketplace-id", "".parse().unwrap());
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/custom_policy/ \
--header 'content-type: application/json' \
--header 'x-ebay-c-marketplace-id: ' \
--data '{
"description": "",
"label": "",
"name": "",
"policyType": ""
}'
echo '{
"description": "",
"label": "",
"name": "",
"policyType": ""
}' | \
http POST {{baseUrl}}/custom_policy/ \
content-type:application/json \
x-ebay-c-marketplace-id:''
wget --quiet \
--method POST \
--header 'x-ebay-c-marketplace-id: ' \
--header 'content-type: application/json' \
--body-data '{\n "description": "",\n "label": "",\n "name": "",\n "policyType": ""\n}' \
--output-document \
- {{baseUrl}}/custom_policy/
import Foundation
let headers = [
"x-ebay-c-marketplace-id": "",
"content-type": "application/json"
]
let parameters = [
"description": "",
"label": "",
"name": "",
"policyType": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/custom_policy/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
getCustomPolicies
{{baseUrl}}/custom_policy/
HEADERS
X-EBAY-C-MARKETPLACE-ID
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/custom_policy/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-ebay-c-marketplace-id: ");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/custom_policy/" {:headers {:x-ebay-c-marketplace-id ""}})
require "http/client"
url = "{{baseUrl}}/custom_policy/"
headers = HTTP::Headers{
"x-ebay-c-marketplace-id" => ""
}
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}}/custom_policy/"),
Headers =
{
{ "x-ebay-c-marketplace-id", "" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/custom_policy/");
var request = new RestRequest("", Method.Get);
request.AddHeader("x-ebay-c-marketplace-id", "");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/custom_policy/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-ebay-c-marketplace-id", "")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/custom_policy/ HTTP/1.1
X-Ebay-C-Marketplace-Id:
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/custom_policy/")
.setHeader("x-ebay-c-marketplace-id", "")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/custom_policy/"))
.header("x-ebay-c-marketplace-id", "")
.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}}/custom_policy/")
.get()
.addHeader("x-ebay-c-marketplace-id", "")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/custom_policy/")
.header("x-ebay-c-marketplace-id", "")
.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}}/custom_policy/');
xhr.setRequestHeader('x-ebay-c-marketplace-id', '');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/custom_policy/',
headers: {'x-ebay-c-marketplace-id': ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/custom_policy/';
const options = {method: 'GET', headers: {'x-ebay-c-marketplace-id': ''}};
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}}/custom_policy/',
method: 'GET',
headers: {
'x-ebay-c-marketplace-id': ''
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/custom_policy/")
.get()
.addHeader("x-ebay-c-marketplace-id", "")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/custom_policy/',
headers: {
'x-ebay-c-marketplace-id': ''
}
};
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}}/custom_policy/',
headers: {'x-ebay-c-marketplace-id': ''}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/custom_policy/');
req.headers({
'x-ebay-c-marketplace-id': ''
});
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}}/custom_policy/',
headers: {'x-ebay-c-marketplace-id': ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/custom_policy/';
const options = {method: 'GET', headers: {'x-ebay-c-marketplace-id': ''}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"x-ebay-c-marketplace-id": @"" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/custom_policy/"]
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}}/custom_policy/" in
let headers = Header.add (Header.init ()) "x-ebay-c-marketplace-id" "" in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/custom_policy/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-ebay-c-marketplace-id: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/custom_policy/', [
'headers' => [
'x-ebay-c-marketplace-id' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/custom_policy/');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'x-ebay-c-marketplace-id' => ''
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/custom_policy/');
$request->setRequestMethod('GET');
$request->setHeaders([
'x-ebay-c-marketplace-id' => ''
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("x-ebay-c-marketplace-id", "")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/custom_policy/' -Method GET -Headers $headers
$headers=@{}
$headers.Add("x-ebay-c-marketplace-id", "")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/custom_policy/' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'x-ebay-c-marketplace-id': "" }
conn.request("GET", "/baseUrl/custom_policy/", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/custom_policy/"
headers = {"x-ebay-c-marketplace-id": ""}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/custom_policy/"
response <- VERB("GET", url, add_headers('x-ebay-c-marketplace-id' = ''), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/custom_policy/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-ebay-c-marketplace-id"] = ''
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/custom_policy/') do |req|
req.headers['x-ebay-c-marketplace-id'] = ''
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/custom_policy/";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("x-ebay-c-marketplace-id", "".parse().unwrap());
let client = reqwest::Client::new();
let response = client.get(url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/custom_policy/ \
--header 'x-ebay-c-marketplace-id: '
http GET {{baseUrl}}/custom_policy/ \
x-ebay-c-marketplace-id:''
wget --quiet \
--method GET \
--header 'x-ebay-c-marketplace-id: ' \
--output-document \
- {{baseUrl}}/custom_policy/
import Foundation
let headers = ["x-ebay-c-marketplace-id": ""]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/custom_policy/")! 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
getCustomPolicy
{{baseUrl}}/custom_policy/:custom_policy_id
HEADERS
X-EBAY-C-MARKETPLACE-ID
QUERY PARAMS
custom_policy_id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/custom_policy/:custom_policy_id");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-ebay-c-marketplace-id: ");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/custom_policy/:custom_policy_id" {:headers {:x-ebay-c-marketplace-id ""}})
require "http/client"
url = "{{baseUrl}}/custom_policy/:custom_policy_id"
headers = HTTP::Headers{
"x-ebay-c-marketplace-id" => ""
}
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}}/custom_policy/:custom_policy_id"),
Headers =
{
{ "x-ebay-c-marketplace-id", "" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/custom_policy/:custom_policy_id");
var request = new RestRequest("", Method.Get);
request.AddHeader("x-ebay-c-marketplace-id", "");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/custom_policy/:custom_policy_id"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-ebay-c-marketplace-id", "")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/custom_policy/:custom_policy_id HTTP/1.1
X-Ebay-C-Marketplace-Id:
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/custom_policy/:custom_policy_id")
.setHeader("x-ebay-c-marketplace-id", "")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/custom_policy/:custom_policy_id"))
.header("x-ebay-c-marketplace-id", "")
.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}}/custom_policy/:custom_policy_id")
.get()
.addHeader("x-ebay-c-marketplace-id", "")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/custom_policy/:custom_policy_id")
.header("x-ebay-c-marketplace-id", "")
.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}}/custom_policy/:custom_policy_id');
xhr.setRequestHeader('x-ebay-c-marketplace-id', '');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/custom_policy/:custom_policy_id',
headers: {'x-ebay-c-marketplace-id': ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/custom_policy/:custom_policy_id';
const options = {method: 'GET', headers: {'x-ebay-c-marketplace-id': ''}};
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}}/custom_policy/:custom_policy_id',
method: 'GET',
headers: {
'x-ebay-c-marketplace-id': ''
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/custom_policy/:custom_policy_id")
.get()
.addHeader("x-ebay-c-marketplace-id", "")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/custom_policy/:custom_policy_id',
headers: {
'x-ebay-c-marketplace-id': ''
}
};
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}}/custom_policy/:custom_policy_id',
headers: {'x-ebay-c-marketplace-id': ''}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/custom_policy/:custom_policy_id');
req.headers({
'x-ebay-c-marketplace-id': ''
});
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}}/custom_policy/:custom_policy_id',
headers: {'x-ebay-c-marketplace-id': ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/custom_policy/:custom_policy_id';
const options = {method: 'GET', headers: {'x-ebay-c-marketplace-id': ''}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"x-ebay-c-marketplace-id": @"" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/custom_policy/:custom_policy_id"]
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}}/custom_policy/:custom_policy_id" in
let headers = Header.add (Header.init ()) "x-ebay-c-marketplace-id" "" in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/custom_policy/:custom_policy_id",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-ebay-c-marketplace-id: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/custom_policy/:custom_policy_id', [
'headers' => [
'x-ebay-c-marketplace-id' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/custom_policy/:custom_policy_id');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'x-ebay-c-marketplace-id' => ''
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/custom_policy/:custom_policy_id');
$request->setRequestMethod('GET');
$request->setHeaders([
'x-ebay-c-marketplace-id' => ''
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("x-ebay-c-marketplace-id", "")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/custom_policy/:custom_policy_id' -Method GET -Headers $headers
$headers=@{}
$headers.Add("x-ebay-c-marketplace-id", "")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/custom_policy/:custom_policy_id' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'x-ebay-c-marketplace-id': "" }
conn.request("GET", "/baseUrl/custom_policy/:custom_policy_id", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/custom_policy/:custom_policy_id"
headers = {"x-ebay-c-marketplace-id": ""}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/custom_policy/:custom_policy_id"
response <- VERB("GET", url, add_headers('x-ebay-c-marketplace-id' = ''), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/custom_policy/:custom_policy_id")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-ebay-c-marketplace-id"] = ''
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/custom_policy/:custom_policy_id') do |req|
req.headers['x-ebay-c-marketplace-id'] = ''
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/custom_policy/:custom_policy_id";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("x-ebay-c-marketplace-id", "".parse().unwrap());
let client = reqwest::Client::new();
let response = client.get(url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/custom_policy/:custom_policy_id \
--header 'x-ebay-c-marketplace-id: '
http GET {{baseUrl}}/custom_policy/:custom_policy_id \
x-ebay-c-marketplace-id:''
wget --quiet \
--method GET \
--header 'x-ebay-c-marketplace-id: ' \
--output-document \
- {{baseUrl}}/custom_policy/:custom_policy_id
import Foundation
let headers = ["x-ebay-c-marketplace-id": ""]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/custom_policy/:custom_policy_id")! 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()
PUT
updateCustomPolicy
{{baseUrl}}/custom_policy/:custom_policy_id
HEADERS
X-EBAY-C-MARKETPLACE-ID
QUERY PARAMS
custom_policy_id
BODY json
{
"description": "",
"label": "",
"name": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/custom_policy/:custom_policy_id");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-ebay-c-marketplace-id: ");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"description\": \"\",\n \"label\": \"\",\n \"name\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/custom_policy/:custom_policy_id" {:headers {:x-ebay-c-marketplace-id ""}
:content-type :json
:form-params {:description ""
:label ""
:name ""}})
require "http/client"
url = "{{baseUrl}}/custom_policy/:custom_policy_id"
headers = HTTP::Headers{
"x-ebay-c-marketplace-id" => ""
"content-type" => "application/json"
}
reqBody = "{\n \"description\": \"\",\n \"label\": \"\",\n \"name\": \"\"\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}}/custom_policy/:custom_policy_id"),
Headers =
{
{ "x-ebay-c-marketplace-id", "" },
},
Content = new StringContent("{\n \"description\": \"\",\n \"label\": \"\",\n \"name\": \"\"\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}}/custom_policy/:custom_policy_id");
var request = new RestRequest("", Method.Put);
request.AddHeader("x-ebay-c-marketplace-id", "");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"description\": \"\",\n \"label\": \"\",\n \"name\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/custom_policy/:custom_policy_id"
payload := strings.NewReader("{\n \"description\": \"\",\n \"label\": \"\",\n \"name\": \"\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("x-ebay-c-marketplace-id", "")
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/custom_policy/:custom_policy_id HTTP/1.1
X-Ebay-C-Marketplace-Id:
Content-Type: application/json
Host: example.com
Content-Length: 52
{
"description": "",
"label": "",
"name": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/custom_policy/:custom_policy_id")
.setHeader("x-ebay-c-marketplace-id", "")
.setHeader("content-type", "application/json")
.setBody("{\n \"description\": \"\",\n \"label\": \"\",\n \"name\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/custom_policy/:custom_policy_id"))
.header("x-ebay-c-marketplace-id", "")
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("{\n \"description\": \"\",\n \"label\": \"\",\n \"name\": \"\"\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 \"description\": \"\",\n \"label\": \"\",\n \"name\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/custom_policy/:custom_policy_id")
.put(body)
.addHeader("x-ebay-c-marketplace-id", "")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/custom_policy/:custom_policy_id")
.header("x-ebay-c-marketplace-id", "")
.header("content-type", "application/json")
.body("{\n \"description\": \"\",\n \"label\": \"\",\n \"name\": \"\"\n}")
.asString();
const data = JSON.stringify({
description: '',
label: '',
name: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/custom_policy/:custom_policy_id');
xhr.setRequestHeader('x-ebay-c-marketplace-id', '');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/custom_policy/:custom_policy_id',
headers: {'x-ebay-c-marketplace-id': '', 'content-type': 'application/json'},
data: {description: '', label: '', name: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/custom_policy/:custom_policy_id';
const options = {
method: 'PUT',
headers: {'x-ebay-c-marketplace-id': '', 'content-type': 'application/json'},
body: '{"description":"","label":"","name":""}'
};
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}}/custom_policy/:custom_policy_id',
method: 'PUT',
headers: {
'x-ebay-c-marketplace-id': '',
'content-type': 'application/json'
},
processData: false,
data: '{\n "description": "",\n "label": "",\n "name": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"description\": \"\",\n \"label\": \"\",\n \"name\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/custom_policy/:custom_policy_id")
.put(body)
.addHeader("x-ebay-c-marketplace-id", "")
.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/custom_policy/:custom_policy_id',
headers: {
'x-ebay-c-marketplace-id': '',
'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({description: '', label: '', name: ''}));
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/custom_policy/:custom_policy_id',
headers: {'x-ebay-c-marketplace-id': '', 'content-type': 'application/json'},
body: {description: '', label: '', name: ''},
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}}/custom_policy/:custom_policy_id');
req.headers({
'x-ebay-c-marketplace-id': '',
'content-type': 'application/json'
});
req.type('json');
req.send({
description: '',
label: '',
name: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PUT',
url: '{{baseUrl}}/custom_policy/:custom_policy_id',
headers: {'x-ebay-c-marketplace-id': '', 'content-type': 'application/json'},
data: {description: '', label: '', name: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/custom_policy/:custom_policy_id';
const options = {
method: 'PUT',
headers: {'x-ebay-c-marketplace-id': '', 'content-type': 'application/json'},
body: '{"description":"","label":"","name":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"x-ebay-c-marketplace-id": @"",
@"content-type": @"application/json" };
NSDictionary *parameters = @{ @"description": @"",
@"label": @"",
@"name": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/custom_policy/:custom_policy_id"]
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}}/custom_policy/:custom_policy_id" in
let headers = Header.add_list (Header.init ()) [
("x-ebay-c-marketplace-id", "");
("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n \"description\": \"\",\n \"label\": \"\",\n \"name\": \"\"\n}" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/custom_policy/:custom_policy_id",
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([
'description' => '',
'label' => '',
'name' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json",
"x-ebay-c-marketplace-id: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('PUT', '{{baseUrl}}/custom_policy/:custom_policy_id', [
'body' => '{
"description": "",
"label": "",
"name": ""
}',
'headers' => [
'content-type' => 'application/json',
'x-ebay-c-marketplace-id' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/custom_policy/:custom_policy_id');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'x-ebay-c-marketplace-id' => '',
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'description' => '',
'label' => '',
'name' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'description' => '',
'label' => '',
'name' => ''
]));
$request->setRequestUrl('{{baseUrl}}/custom_policy/:custom_policy_id');
$request->setRequestMethod('PUT');
$request->setBody($body);
$request->setHeaders([
'x-ebay-c-marketplace-id' => '',
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("x-ebay-c-marketplace-id", "")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/custom_policy/:custom_policy_id' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"description": "",
"label": "",
"name": ""
}'
$headers=@{}
$headers.Add("x-ebay-c-marketplace-id", "")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/custom_policy/:custom_policy_id' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"description": "",
"label": "",
"name": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"description\": \"\",\n \"label\": \"\",\n \"name\": \"\"\n}"
headers = {
'x-ebay-c-marketplace-id': "",
'content-type': "application/json"
}
conn.request("PUT", "/baseUrl/custom_policy/:custom_policy_id", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/custom_policy/:custom_policy_id"
payload = {
"description": "",
"label": "",
"name": ""
}
headers = {
"x-ebay-c-marketplace-id": "",
"content-type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/custom_policy/:custom_policy_id"
payload <- "{\n \"description\": \"\",\n \"label\": \"\",\n \"name\": \"\"\n}"
encode <- "json"
response <- VERB("PUT", url, body = payload, add_headers('x-ebay-c-marketplace-id' = ''), content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/custom_policy/:custom_policy_id")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["x-ebay-c-marketplace-id"] = ''
request["content-type"] = 'application/json'
request.body = "{\n \"description\": \"\",\n \"label\": \"\",\n \"name\": \"\"\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/custom_policy/:custom_policy_id') do |req|
req.headers['x-ebay-c-marketplace-id'] = ''
req.body = "{\n \"description\": \"\",\n \"label\": \"\",\n \"name\": \"\"\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}}/custom_policy/:custom_policy_id";
let payload = json!({
"description": "",
"label": "",
"name": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("x-ebay-c-marketplace-id", "".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)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/custom_policy/:custom_policy_id \
--header 'content-type: application/json' \
--header 'x-ebay-c-marketplace-id: ' \
--data '{
"description": "",
"label": "",
"name": ""
}'
echo '{
"description": "",
"label": "",
"name": ""
}' | \
http PUT {{baseUrl}}/custom_policy/:custom_policy_id \
content-type:application/json \
x-ebay-c-marketplace-id:''
wget --quiet \
--method PUT \
--header 'x-ebay-c-marketplace-id: ' \
--header 'content-type: application/json' \
--body-data '{\n "description": "",\n "label": "",\n "name": ""\n}' \
--output-document \
- {{baseUrl}}/custom_policy/:custom_policy_id
import Foundation
let headers = [
"x-ebay-c-marketplace-id": "",
"content-type": "application/json"
]
let parameters = [
"description": "",
"label": "",
"name": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/custom_policy/:custom_policy_id")! 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()
POST
createFulfillmentPolicy
{{baseUrl}}/fulfillment_policy/
BODY json
{
"categoryTypes": [
{
"default": false,
"name": ""
}
],
"description": "",
"freightShipping": false,
"globalShipping": false,
"handlingTime": {
"unit": "",
"value": 0
},
"localPickup": false,
"marketplaceId": "",
"name": "",
"pickupDropOff": false,
"shipToLocations": {
"regionExcluded": [
{
"regionName": "",
"regionType": ""
}
],
"regionIncluded": [
{}
]
},
"shippingOptions": [
{
"costType": "",
"insuranceFee": {
"currency": "",
"value": ""
},
"insuranceOffered": false,
"optionType": "",
"packageHandlingCost": {},
"rateTableId": "",
"shippingDiscountProfileId": "",
"shippingPromotionOffered": false,
"shippingServices": [
{
"additionalShippingCost": {},
"buyerResponsibleForPickup": false,
"buyerResponsibleForShipping": false,
"cashOnDeliveryFee": {},
"freeShipping": false,
"shipToLocations": {},
"shippingCarrierCode": "",
"shippingCost": {},
"shippingServiceCode": "",
"sortOrder": 0,
"surcharge": {}
}
]
}
]
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/fulfillment_policy/");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"categoryTypes\": [\n {\n \"default\": false,\n \"name\": \"\"\n }\n ],\n \"description\": \"\",\n \"freightShipping\": false,\n \"globalShipping\": false,\n \"handlingTime\": {\n \"unit\": \"\",\n \"value\": 0\n },\n \"localPickup\": false,\n \"marketplaceId\": \"\",\n \"name\": \"\",\n \"pickupDropOff\": false,\n \"shipToLocations\": {\n \"regionExcluded\": [\n {\n \"regionName\": \"\",\n \"regionType\": \"\"\n }\n ],\n \"regionIncluded\": [\n {}\n ]\n },\n \"shippingOptions\": [\n {\n \"costType\": \"\",\n \"insuranceFee\": {\n \"currency\": \"\",\n \"value\": \"\"\n },\n \"insuranceOffered\": false,\n \"optionType\": \"\",\n \"packageHandlingCost\": {},\n \"rateTableId\": \"\",\n \"shippingDiscountProfileId\": \"\",\n \"shippingPromotionOffered\": false,\n \"shippingServices\": [\n {\n \"additionalShippingCost\": {},\n \"buyerResponsibleForPickup\": false,\n \"buyerResponsibleForShipping\": false,\n \"cashOnDeliveryFee\": {},\n \"freeShipping\": false,\n \"shipToLocations\": {},\n \"shippingCarrierCode\": \"\",\n \"shippingCost\": {},\n \"shippingServiceCode\": \"\",\n \"sortOrder\": 0,\n \"surcharge\": {}\n }\n ]\n }\n ]\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/fulfillment_policy/" {:content-type :json
:form-params {:categoryTypes [{:default false
:name ""}]
:description ""
:freightShipping false
:globalShipping false
:handlingTime {:unit ""
:value 0}
:localPickup false
:marketplaceId ""
:name ""
:pickupDropOff false
:shipToLocations {:regionExcluded [{:regionName ""
:regionType ""}]
:regionIncluded [{}]}
:shippingOptions [{:costType ""
:insuranceFee {:currency ""
:value ""}
:insuranceOffered false
:optionType ""
:packageHandlingCost {}
:rateTableId ""
:shippingDiscountProfileId ""
:shippingPromotionOffered false
:shippingServices [{:additionalShippingCost {}
:buyerResponsibleForPickup false
:buyerResponsibleForShipping false
:cashOnDeliveryFee {}
:freeShipping false
:shipToLocations {}
:shippingCarrierCode ""
:shippingCost {}
:shippingServiceCode ""
:sortOrder 0
:surcharge {}}]}]}})
require "http/client"
url = "{{baseUrl}}/fulfillment_policy/"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"categoryTypes\": [\n {\n \"default\": false,\n \"name\": \"\"\n }\n ],\n \"description\": \"\",\n \"freightShipping\": false,\n \"globalShipping\": false,\n \"handlingTime\": {\n \"unit\": \"\",\n \"value\": 0\n },\n \"localPickup\": false,\n \"marketplaceId\": \"\",\n \"name\": \"\",\n \"pickupDropOff\": false,\n \"shipToLocations\": {\n \"regionExcluded\": [\n {\n \"regionName\": \"\",\n \"regionType\": \"\"\n }\n ],\n \"regionIncluded\": [\n {}\n ]\n },\n \"shippingOptions\": [\n {\n \"costType\": \"\",\n \"insuranceFee\": {\n \"currency\": \"\",\n \"value\": \"\"\n },\n \"insuranceOffered\": false,\n \"optionType\": \"\",\n \"packageHandlingCost\": {},\n \"rateTableId\": \"\",\n \"shippingDiscountProfileId\": \"\",\n \"shippingPromotionOffered\": false,\n \"shippingServices\": [\n {\n \"additionalShippingCost\": {},\n \"buyerResponsibleForPickup\": false,\n \"buyerResponsibleForShipping\": false,\n \"cashOnDeliveryFee\": {},\n \"freeShipping\": false,\n \"shipToLocations\": {},\n \"shippingCarrierCode\": \"\",\n \"shippingCost\": {},\n \"shippingServiceCode\": \"\",\n \"sortOrder\": 0,\n \"surcharge\": {}\n }\n ]\n }\n ]\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/fulfillment_policy/"),
Content = new StringContent("{\n \"categoryTypes\": [\n {\n \"default\": false,\n \"name\": \"\"\n }\n ],\n \"description\": \"\",\n \"freightShipping\": false,\n \"globalShipping\": false,\n \"handlingTime\": {\n \"unit\": \"\",\n \"value\": 0\n },\n \"localPickup\": false,\n \"marketplaceId\": \"\",\n \"name\": \"\",\n \"pickupDropOff\": false,\n \"shipToLocations\": {\n \"regionExcluded\": [\n {\n \"regionName\": \"\",\n \"regionType\": \"\"\n }\n ],\n \"regionIncluded\": [\n {}\n ]\n },\n \"shippingOptions\": [\n {\n \"costType\": \"\",\n \"insuranceFee\": {\n \"currency\": \"\",\n \"value\": \"\"\n },\n \"insuranceOffered\": false,\n \"optionType\": \"\",\n \"packageHandlingCost\": {},\n \"rateTableId\": \"\",\n \"shippingDiscountProfileId\": \"\",\n \"shippingPromotionOffered\": false,\n \"shippingServices\": [\n {\n \"additionalShippingCost\": {},\n \"buyerResponsibleForPickup\": false,\n \"buyerResponsibleForShipping\": false,\n \"cashOnDeliveryFee\": {},\n \"freeShipping\": false,\n \"shipToLocations\": {},\n \"shippingCarrierCode\": \"\",\n \"shippingCost\": {},\n \"shippingServiceCode\": \"\",\n \"sortOrder\": 0,\n \"surcharge\": {}\n }\n ]\n }\n ]\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/fulfillment_policy/");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"categoryTypes\": [\n {\n \"default\": false,\n \"name\": \"\"\n }\n ],\n \"description\": \"\",\n \"freightShipping\": false,\n \"globalShipping\": false,\n \"handlingTime\": {\n \"unit\": \"\",\n \"value\": 0\n },\n \"localPickup\": false,\n \"marketplaceId\": \"\",\n \"name\": \"\",\n \"pickupDropOff\": false,\n \"shipToLocations\": {\n \"regionExcluded\": [\n {\n \"regionName\": \"\",\n \"regionType\": \"\"\n }\n ],\n \"regionIncluded\": [\n {}\n ]\n },\n \"shippingOptions\": [\n {\n \"costType\": \"\",\n \"insuranceFee\": {\n \"currency\": \"\",\n \"value\": \"\"\n },\n \"insuranceOffered\": false,\n \"optionType\": \"\",\n \"packageHandlingCost\": {},\n \"rateTableId\": \"\",\n \"shippingDiscountProfileId\": \"\",\n \"shippingPromotionOffered\": false,\n \"shippingServices\": [\n {\n \"additionalShippingCost\": {},\n \"buyerResponsibleForPickup\": false,\n \"buyerResponsibleForShipping\": false,\n \"cashOnDeliveryFee\": {},\n \"freeShipping\": false,\n \"shipToLocations\": {},\n \"shippingCarrierCode\": \"\",\n \"shippingCost\": {},\n \"shippingServiceCode\": \"\",\n \"sortOrder\": 0,\n \"surcharge\": {}\n }\n ]\n }\n ]\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/fulfillment_policy/"
payload := strings.NewReader("{\n \"categoryTypes\": [\n {\n \"default\": false,\n \"name\": \"\"\n }\n ],\n \"description\": \"\",\n \"freightShipping\": false,\n \"globalShipping\": false,\n \"handlingTime\": {\n \"unit\": \"\",\n \"value\": 0\n },\n \"localPickup\": false,\n \"marketplaceId\": \"\",\n \"name\": \"\",\n \"pickupDropOff\": false,\n \"shipToLocations\": {\n \"regionExcluded\": [\n {\n \"regionName\": \"\",\n \"regionType\": \"\"\n }\n ],\n \"regionIncluded\": [\n {}\n ]\n },\n \"shippingOptions\": [\n {\n \"costType\": \"\",\n \"insuranceFee\": {\n \"currency\": \"\",\n \"value\": \"\"\n },\n \"insuranceOffered\": false,\n \"optionType\": \"\",\n \"packageHandlingCost\": {},\n \"rateTableId\": \"\",\n \"shippingDiscountProfileId\": \"\",\n \"shippingPromotionOffered\": false,\n \"shippingServices\": [\n {\n \"additionalShippingCost\": {},\n \"buyerResponsibleForPickup\": false,\n \"buyerResponsibleForShipping\": false,\n \"cashOnDeliveryFee\": {},\n \"freeShipping\": false,\n \"shipToLocations\": {},\n \"shippingCarrierCode\": \"\",\n \"shippingCost\": {},\n \"shippingServiceCode\": \"\",\n \"sortOrder\": 0,\n \"surcharge\": {}\n }\n ]\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/fulfillment_policy/ HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 1246
{
"categoryTypes": [
{
"default": false,
"name": ""
}
],
"description": "",
"freightShipping": false,
"globalShipping": false,
"handlingTime": {
"unit": "",
"value": 0
},
"localPickup": false,
"marketplaceId": "",
"name": "",
"pickupDropOff": false,
"shipToLocations": {
"regionExcluded": [
{
"regionName": "",
"regionType": ""
}
],
"regionIncluded": [
{}
]
},
"shippingOptions": [
{
"costType": "",
"insuranceFee": {
"currency": "",
"value": ""
},
"insuranceOffered": false,
"optionType": "",
"packageHandlingCost": {},
"rateTableId": "",
"shippingDiscountProfileId": "",
"shippingPromotionOffered": false,
"shippingServices": [
{
"additionalShippingCost": {},
"buyerResponsibleForPickup": false,
"buyerResponsibleForShipping": false,
"cashOnDeliveryFee": {},
"freeShipping": false,
"shipToLocations": {},
"shippingCarrierCode": "",
"shippingCost": {},
"shippingServiceCode": "",
"sortOrder": 0,
"surcharge": {}
}
]
}
]
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/fulfillment_policy/")
.setHeader("content-type", "application/json")
.setBody("{\n \"categoryTypes\": [\n {\n \"default\": false,\n \"name\": \"\"\n }\n ],\n \"description\": \"\",\n \"freightShipping\": false,\n \"globalShipping\": false,\n \"handlingTime\": {\n \"unit\": \"\",\n \"value\": 0\n },\n \"localPickup\": false,\n \"marketplaceId\": \"\",\n \"name\": \"\",\n \"pickupDropOff\": false,\n \"shipToLocations\": {\n \"regionExcluded\": [\n {\n \"regionName\": \"\",\n \"regionType\": \"\"\n }\n ],\n \"regionIncluded\": [\n {}\n ]\n },\n \"shippingOptions\": [\n {\n \"costType\": \"\",\n \"insuranceFee\": {\n \"currency\": \"\",\n \"value\": \"\"\n },\n \"insuranceOffered\": false,\n \"optionType\": \"\",\n \"packageHandlingCost\": {},\n \"rateTableId\": \"\",\n \"shippingDiscountProfileId\": \"\",\n \"shippingPromotionOffered\": false,\n \"shippingServices\": [\n {\n \"additionalShippingCost\": {},\n \"buyerResponsibleForPickup\": false,\n \"buyerResponsibleForShipping\": false,\n \"cashOnDeliveryFee\": {},\n \"freeShipping\": false,\n \"shipToLocations\": {},\n \"shippingCarrierCode\": \"\",\n \"shippingCost\": {},\n \"shippingServiceCode\": \"\",\n \"sortOrder\": 0,\n \"surcharge\": {}\n }\n ]\n }\n ]\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/fulfillment_policy/"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"categoryTypes\": [\n {\n \"default\": false,\n \"name\": \"\"\n }\n ],\n \"description\": \"\",\n \"freightShipping\": false,\n \"globalShipping\": false,\n \"handlingTime\": {\n \"unit\": \"\",\n \"value\": 0\n },\n \"localPickup\": false,\n \"marketplaceId\": \"\",\n \"name\": \"\",\n \"pickupDropOff\": false,\n \"shipToLocations\": {\n \"regionExcluded\": [\n {\n \"regionName\": \"\",\n \"regionType\": \"\"\n }\n ],\n \"regionIncluded\": [\n {}\n ]\n },\n \"shippingOptions\": [\n {\n \"costType\": \"\",\n \"insuranceFee\": {\n \"currency\": \"\",\n \"value\": \"\"\n },\n \"insuranceOffered\": false,\n \"optionType\": \"\",\n \"packageHandlingCost\": {},\n \"rateTableId\": \"\",\n \"shippingDiscountProfileId\": \"\",\n \"shippingPromotionOffered\": false,\n \"shippingServices\": [\n {\n \"additionalShippingCost\": {},\n \"buyerResponsibleForPickup\": false,\n \"buyerResponsibleForShipping\": false,\n \"cashOnDeliveryFee\": {},\n \"freeShipping\": false,\n \"shipToLocations\": {},\n \"shippingCarrierCode\": \"\",\n \"shippingCost\": {},\n \"shippingServiceCode\": \"\",\n \"sortOrder\": 0,\n \"surcharge\": {}\n }\n ]\n }\n ]\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"categoryTypes\": [\n {\n \"default\": false,\n \"name\": \"\"\n }\n ],\n \"description\": \"\",\n \"freightShipping\": false,\n \"globalShipping\": false,\n \"handlingTime\": {\n \"unit\": \"\",\n \"value\": 0\n },\n \"localPickup\": false,\n \"marketplaceId\": \"\",\n \"name\": \"\",\n \"pickupDropOff\": false,\n \"shipToLocations\": {\n \"regionExcluded\": [\n {\n \"regionName\": \"\",\n \"regionType\": \"\"\n }\n ],\n \"regionIncluded\": [\n {}\n ]\n },\n \"shippingOptions\": [\n {\n \"costType\": \"\",\n \"insuranceFee\": {\n \"currency\": \"\",\n \"value\": \"\"\n },\n \"insuranceOffered\": false,\n \"optionType\": \"\",\n \"packageHandlingCost\": {},\n \"rateTableId\": \"\",\n \"shippingDiscountProfileId\": \"\",\n \"shippingPromotionOffered\": false,\n \"shippingServices\": [\n {\n \"additionalShippingCost\": {},\n \"buyerResponsibleForPickup\": false,\n \"buyerResponsibleForShipping\": false,\n \"cashOnDeliveryFee\": {},\n \"freeShipping\": false,\n \"shipToLocations\": {},\n \"shippingCarrierCode\": \"\",\n \"shippingCost\": {},\n \"shippingServiceCode\": \"\",\n \"sortOrder\": 0,\n \"surcharge\": {}\n }\n ]\n }\n ]\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/fulfillment_policy/")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/fulfillment_policy/")
.header("content-type", "application/json")
.body("{\n \"categoryTypes\": [\n {\n \"default\": false,\n \"name\": \"\"\n }\n ],\n \"description\": \"\",\n \"freightShipping\": false,\n \"globalShipping\": false,\n \"handlingTime\": {\n \"unit\": \"\",\n \"value\": 0\n },\n \"localPickup\": false,\n \"marketplaceId\": \"\",\n \"name\": \"\",\n \"pickupDropOff\": false,\n \"shipToLocations\": {\n \"regionExcluded\": [\n {\n \"regionName\": \"\",\n \"regionType\": \"\"\n }\n ],\n \"regionIncluded\": [\n {}\n ]\n },\n \"shippingOptions\": [\n {\n \"costType\": \"\",\n \"insuranceFee\": {\n \"currency\": \"\",\n \"value\": \"\"\n },\n \"insuranceOffered\": false,\n \"optionType\": \"\",\n \"packageHandlingCost\": {},\n \"rateTableId\": \"\",\n \"shippingDiscountProfileId\": \"\",\n \"shippingPromotionOffered\": false,\n \"shippingServices\": [\n {\n \"additionalShippingCost\": {},\n \"buyerResponsibleForPickup\": false,\n \"buyerResponsibleForShipping\": false,\n \"cashOnDeliveryFee\": {},\n \"freeShipping\": false,\n \"shipToLocations\": {},\n \"shippingCarrierCode\": \"\",\n \"shippingCost\": {},\n \"shippingServiceCode\": \"\",\n \"sortOrder\": 0,\n \"surcharge\": {}\n }\n ]\n }\n ]\n}")
.asString();
const data = JSON.stringify({
categoryTypes: [
{
default: false,
name: ''
}
],
description: '',
freightShipping: false,
globalShipping: false,
handlingTime: {
unit: '',
value: 0
},
localPickup: false,
marketplaceId: '',
name: '',
pickupDropOff: false,
shipToLocations: {
regionExcluded: [
{
regionName: '',
regionType: ''
}
],
regionIncluded: [
{}
]
},
shippingOptions: [
{
costType: '',
insuranceFee: {
currency: '',
value: ''
},
insuranceOffered: false,
optionType: '',
packageHandlingCost: {},
rateTableId: '',
shippingDiscountProfileId: '',
shippingPromotionOffered: false,
shippingServices: [
{
additionalShippingCost: {},
buyerResponsibleForPickup: false,
buyerResponsibleForShipping: false,
cashOnDeliveryFee: {},
freeShipping: false,
shipToLocations: {},
shippingCarrierCode: '',
shippingCost: {},
shippingServiceCode: '',
sortOrder: 0,
surcharge: {}
}
]
}
]
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/fulfillment_policy/');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/fulfillment_policy/',
headers: {'content-type': 'application/json'},
data: {
categoryTypes: [{default: false, name: ''}],
description: '',
freightShipping: false,
globalShipping: false,
handlingTime: {unit: '', value: 0},
localPickup: false,
marketplaceId: '',
name: '',
pickupDropOff: false,
shipToLocations: {regionExcluded: [{regionName: '', regionType: ''}], regionIncluded: [{}]},
shippingOptions: [
{
costType: '',
insuranceFee: {currency: '', value: ''},
insuranceOffered: false,
optionType: '',
packageHandlingCost: {},
rateTableId: '',
shippingDiscountProfileId: '',
shippingPromotionOffered: false,
shippingServices: [
{
additionalShippingCost: {},
buyerResponsibleForPickup: false,
buyerResponsibleForShipping: false,
cashOnDeliveryFee: {},
freeShipping: false,
shipToLocations: {},
shippingCarrierCode: '',
shippingCost: {},
shippingServiceCode: '',
sortOrder: 0,
surcharge: {}
}
]
}
]
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/fulfillment_policy/';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"categoryTypes":[{"default":false,"name":""}],"description":"","freightShipping":false,"globalShipping":false,"handlingTime":{"unit":"","value":0},"localPickup":false,"marketplaceId":"","name":"","pickupDropOff":false,"shipToLocations":{"regionExcluded":[{"regionName":"","regionType":""}],"regionIncluded":[{}]},"shippingOptions":[{"costType":"","insuranceFee":{"currency":"","value":""},"insuranceOffered":false,"optionType":"","packageHandlingCost":{},"rateTableId":"","shippingDiscountProfileId":"","shippingPromotionOffered":false,"shippingServices":[{"additionalShippingCost":{},"buyerResponsibleForPickup":false,"buyerResponsibleForShipping":false,"cashOnDeliveryFee":{},"freeShipping":false,"shipToLocations":{},"shippingCarrierCode":"","shippingCost":{},"shippingServiceCode":"","sortOrder":0,"surcharge":{}}]}]}'
};
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}}/fulfillment_policy/',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "categoryTypes": [\n {\n "default": false,\n "name": ""\n }\n ],\n "description": "",\n "freightShipping": false,\n "globalShipping": false,\n "handlingTime": {\n "unit": "",\n "value": 0\n },\n "localPickup": false,\n "marketplaceId": "",\n "name": "",\n "pickupDropOff": false,\n "shipToLocations": {\n "regionExcluded": [\n {\n "regionName": "",\n "regionType": ""\n }\n ],\n "regionIncluded": [\n {}\n ]\n },\n "shippingOptions": [\n {\n "costType": "",\n "insuranceFee": {\n "currency": "",\n "value": ""\n },\n "insuranceOffered": false,\n "optionType": "",\n "packageHandlingCost": {},\n "rateTableId": "",\n "shippingDiscountProfileId": "",\n "shippingPromotionOffered": false,\n "shippingServices": [\n {\n "additionalShippingCost": {},\n "buyerResponsibleForPickup": false,\n "buyerResponsibleForShipping": false,\n "cashOnDeliveryFee": {},\n "freeShipping": false,\n "shipToLocations": {},\n "shippingCarrierCode": "",\n "shippingCost": {},\n "shippingServiceCode": "",\n "sortOrder": 0,\n "surcharge": {}\n }\n ]\n }\n ]\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"categoryTypes\": [\n {\n \"default\": false,\n \"name\": \"\"\n }\n ],\n \"description\": \"\",\n \"freightShipping\": false,\n \"globalShipping\": false,\n \"handlingTime\": {\n \"unit\": \"\",\n \"value\": 0\n },\n \"localPickup\": false,\n \"marketplaceId\": \"\",\n \"name\": \"\",\n \"pickupDropOff\": false,\n \"shipToLocations\": {\n \"regionExcluded\": [\n {\n \"regionName\": \"\",\n \"regionType\": \"\"\n }\n ],\n \"regionIncluded\": [\n {}\n ]\n },\n \"shippingOptions\": [\n {\n \"costType\": \"\",\n \"insuranceFee\": {\n \"currency\": \"\",\n \"value\": \"\"\n },\n \"insuranceOffered\": false,\n \"optionType\": \"\",\n \"packageHandlingCost\": {},\n \"rateTableId\": \"\",\n \"shippingDiscountProfileId\": \"\",\n \"shippingPromotionOffered\": false,\n \"shippingServices\": [\n {\n \"additionalShippingCost\": {},\n \"buyerResponsibleForPickup\": false,\n \"buyerResponsibleForShipping\": false,\n \"cashOnDeliveryFee\": {},\n \"freeShipping\": false,\n \"shipToLocations\": {},\n \"shippingCarrierCode\": \"\",\n \"shippingCost\": {},\n \"shippingServiceCode\": \"\",\n \"sortOrder\": 0,\n \"surcharge\": {}\n }\n ]\n }\n ]\n}")
val request = Request.Builder()
.url("{{baseUrl}}/fulfillment_policy/")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/fulfillment_policy/',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
categoryTypes: [{default: false, name: ''}],
description: '',
freightShipping: false,
globalShipping: false,
handlingTime: {unit: '', value: 0},
localPickup: false,
marketplaceId: '',
name: '',
pickupDropOff: false,
shipToLocations: {regionExcluded: [{regionName: '', regionType: ''}], regionIncluded: [{}]},
shippingOptions: [
{
costType: '',
insuranceFee: {currency: '', value: ''},
insuranceOffered: false,
optionType: '',
packageHandlingCost: {},
rateTableId: '',
shippingDiscountProfileId: '',
shippingPromotionOffered: false,
shippingServices: [
{
additionalShippingCost: {},
buyerResponsibleForPickup: false,
buyerResponsibleForShipping: false,
cashOnDeliveryFee: {},
freeShipping: false,
shipToLocations: {},
shippingCarrierCode: '',
shippingCost: {},
shippingServiceCode: '',
sortOrder: 0,
surcharge: {}
}
]
}
]
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/fulfillment_policy/',
headers: {'content-type': 'application/json'},
body: {
categoryTypes: [{default: false, name: ''}],
description: '',
freightShipping: false,
globalShipping: false,
handlingTime: {unit: '', value: 0},
localPickup: false,
marketplaceId: '',
name: '',
pickupDropOff: false,
shipToLocations: {regionExcluded: [{regionName: '', regionType: ''}], regionIncluded: [{}]},
shippingOptions: [
{
costType: '',
insuranceFee: {currency: '', value: ''},
insuranceOffered: false,
optionType: '',
packageHandlingCost: {},
rateTableId: '',
shippingDiscountProfileId: '',
shippingPromotionOffered: false,
shippingServices: [
{
additionalShippingCost: {},
buyerResponsibleForPickup: false,
buyerResponsibleForShipping: false,
cashOnDeliveryFee: {},
freeShipping: false,
shipToLocations: {},
shippingCarrierCode: '',
shippingCost: {},
shippingServiceCode: '',
sortOrder: 0,
surcharge: {}
}
]
}
]
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/fulfillment_policy/');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
categoryTypes: [
{
default: false,
name: ''
}
],
description: '',
freightShipping: false,
globalShipping: false,
handlingTime: {
unit: '',
value: 0
},
localPickup: false,
marketplaceId: '',
name: '',
pickupDropOff: false,
shipToLocations: {
regionExcluded: [
{
regionName: '',
regionType: ''
}
],
regionIncluded: [
{}
]
},
shippingOptions: [
{
costType: '',
insuranceFee: {
currency: '',
value: ''
},
insuranceOffered: false,
optionType: '',
packageHandlingCost: {},
rateTableId: '',
shippingDiscountProfileId: '',
shippingPromotionOffered: false,
shippingServices: [
{
additionalShippingCost: {},
buyerResponsibleForPickup: false,
buyerResponsibleForShipping: false,
cashOnDeliveryFee: {},
freeShipping: false,
shipToLocations: {},
shippingCarrierCode: '',
shippingCost: {},
shippingServiceCode: '',
sortOrder: 0,
surcharge: {}
}
]
}
]
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/fulfillment_policy/',
headers: {'content-type': 'application/json'},
data: {
categoryTypes: [{default: false, name: ''}],
description: '',
freightShipping: false,
globalShipping: false,
handlingTime: {unit: '', value: 0},
localPickup: false,
marketplaceId: '',
name: '',
pickupDropOff: false,
shipToLocations: {regionExcluded: [{regionName: '', regionType: ''}], regionIncluded: [{}]},
shippingOptions: [
{
costType: '',
insuranceFee: {currency: '', value: ''},
insuranceOffered: false,
optionType: '',
packageHandlingCost: {},
rateTableId: '',
shippingDiscountProfileId: '',
shippingPromotionOffered: false,
shippingServices: [
{
additionalShippingCost: {},
buyerResponsibleForPickup: false,
buyerResponsibleForShipping: false,
cashOnDeliveryFee: {},
freeShipping: false,
shipToLocations: {},
shippingCarrierCode: '',
shippingCost: {},
shippingServiceCode: '',
sortOrder: 0,
surcharge: {}
}
]
}
]
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/fulfillment_policy/';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"categoryTypes":[{"default":false,"name":""}],"description":"","freightShipping":false,"globalShipping":false,"handlingTime":{"unit":"","value":0},"localPickup":false,"marketplaceId":"","name":"","pickupDropOff":false,"shipToLocations":{"regionExcluded":[{"regionName":"","regionType":""}],"regionIncluded":[{}]},"shippingOptions":[{"costType":"","insuranceFee":{"currency":"","value":""},"insuranceOffered":false,"optionType":"","packageHandlingCost":{},"rateTableId":"","shippingDiscountProfileId":"","shippingPromotionOffered":false,"shippingServices":[{"additionalShippingCost":{},"buyerResponsibleForPickup":false,"buyerResponsibleForShipping":false,"cashOnDeliveryFee":{},"freeShipping":false,"shipToLocations":{},"shippingCarrierCode":"","shippingCost":{},"shippingServiceCode":"","sortOrder":0,"surcharge":{}}]}]}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"categoryTypes": @[ @{ @"default": @NO, @"name": @"" } ],
@"description": @"",
@"freightShipping": @NO,
@"globalShipping": @NO,
@"handlingTime": @{ @"unit": @"", @"value": @0 },
@"localPickup": @NO,
@"marketplaceId": @"",
@"name": @"",
@"pickupDropOff": @NO,
@"shipToLocations": @{ @"regionExcluded": @[ @{ @"regionName": @"", @"regionType": @"" } ], @"regionIncluded": @[ @{ } ] },
@"shippingOptions": @[ @{ @"costType": @"", @"insuranceFee": @{ @"currency": @"", @"value": @"" }, @"insuranceOffered": @NO, @"optionType": @"", @"packageHandlingCost": @{ }, @"rateTableId": @"", @"shippingDiscountProfileId": @"", @"shippingPromotionOffered": @NO, @"shippingServices": @[ @{ @"additionalShippingCost": @{ }, @"buyerResponsibleForPickup": @NO, @"buyerResponsibleForShipping": @NO, @"cashOnDeliveryFee": @{ }, @"freeShipping": @NO, @"shipToLocations": @{ }, @"shippingCarrierCode": @"", @"shippingCost": @{ }, @"shippingServiceCode": @"", @"sortOrder": @0, @"surcharge": @{ } } ] } ] };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/fulfillment_policy/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/fulfillment_policy/" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"categoryTypes\": [\n {\n \"default\": false,\n \"name\": \"\"\n }\n ],\n \"description\": \"\",\n \"freightShipping\": false,\n \"globalShipping\": false,\n \"handlingTime\": {\n \"unit\": \"\",\n \"value\": 0\n },\n \"localPickup\": false,\n \"marketplaceId\": \"\",\n \"name\": \"\",\n \"pickupDropOff\": false,\n \"shipToLocations\": {\n \"regionExcluded\": [\n {\n \"regionName\": \"\",\n \"regionType\": \"\"\n }\n ],\n \"regionIncluded\": [\n {}\n ]\n },\n \"shippingOptions\": [\n {\n \"costType\": \"\",\n \"insuranceFee\": {\n \"currency\": \"\",\n \"value\": \"\"\n },\n \"insuranceOffered\": false,\n \"optionType\": \"\",\n \"packageHandlingCost\": {},\n \"rateTableId\": \"\",\n \"shippingDiscountProfileId\": \"\",\n \"shippingPromotionOffered\": false,\n \"shippingServices\": [\n {\n \"additionalShippingCost\": {},\n \"buyerResponsibleForPickup\": false,\n \"buyerResponsibleForShipping\": false,\n \"cashOnDeliveryFee\": {},\n \"freeShipping\": false,\n \"shipToLocations\": {},\n \"shippingCarrierCode\": \"\",\n \"shippingCost\": {},\n \"shippingServiceCode\": \"\",\n \"sortOrder\": 0,\n \"surcharge\": {}\n }\n ]\n }\n ]\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/fulfillment_policy/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'categoryTypes' => [
[
'default' => null,
'name' => ''
]
],
'description' => '',
'freightShipping' => null,
'globalShipping' => null,
'handlingTime' => [
'unit' => '',
'value' => 0
],
'localPickup' => null,
'marketplaceId' => '',
'name' => '',
'pickupDropOff' => null,
'shipToLocations' => [
'regionExcluded' => [
[
'regionName' => '',
'regionType' => ''
]
],
'regionIncluded' => [
[
]
]
],
'shippingOptions' => [
[
'costType' => '',
'insuranceFee' => [
'currency' => '',
'value' => ''
],
'insuranceOffered' => null,
'optionType' => '',
'packageHandlingCost' => [
],
'rateTableId' => '',
'shippingDiscountProfileId' => '',
'shippingPromotionOffered' => null,
'shippingServices' => [
[
'additionalShippingCost' => [
],
'buyerResponsibleForPickup' => null,
'buyerResponsibleForShipping' => null,
'cashOnDeliveryFee' => [
],
'freeShipping' => null,
'shipToLocations' => [
],
'shippingCarrierCode' => '',
'shippingCost' => [
],
'shippingServiceCode' => '',
'sortOrder' => 0,
'surcharge' => [
]
]
]
]
]
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/fulfillment_policy/', [
'body' => '{
"categoryTypes": [
{
"default": false,
"name": ""
}
],
"description": "",
"freightShipping": false,
"globalShipping": false,
"handlingTime": {
"unit": "",
"value": 0
},
"localPickup": false,
"marketplaceId": "",
"name": "",
"pickupDropOff": false,
"shipToLocations": {
"regionExcluded": [
{
"regionName": "",
"regionType": ""
}
],
"regionIncluded": [
{}
]
},
"shippingOptions": [
{
"costType": "",
"insuranceFee": {
"currency": "",
"value": ""
},
"insuranceOffered": false,
"optionType": "",
"packageHandlingCost": {},
"rateTableId": "",
"shippingDiscountProfileId": "",
"shippingPromotionOffered": false,
"shippingServices": [
{
"additionalShippingCost": {},
"buyerResponsibleForPickup": false,
"buyerResponsibleForShipping": false,
"cashOnDeliveryFee": {},
"freeShipping": false,
"shipToLocations": {},
"shippingCarrierCode": "",
"shippingCost": {},
"shippingServiceCode": "",
"sortOrder": 0,
"surcharge": {}
}
]
}
]
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/fulfillment_policy/');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'categoryTypes' => [
[
'default' => null,
'name' => ''
]
],
'description' => '',
'freightShipping' => null,
'globalShipping' => null,
'handlingTime' => [
'unit' => '',
'value' => 0
],
'localPickup' => null,
'marketplaceId' => '',
'name' => '',
'pickupDropOff' => null,
'shipToLocations' => [
'regionExcluded' => [
[
'regionName' => '',
'regionType' => ''
]
],
'regionIncluded' => [
[
]
]
],
'shippingOptions' => [
[
'costType' => '',
'insuranceFee' => [
'currency' => '',
'value' => ''
],
'insuranceOffered' => null,
'optionType' => '',
'packageHandlingCost' => [
],
'rateTableId' => '',
'shippingDiscountProfileId' => '',
'shippingPromotionOffered' => null,
'shippingServices' => [
[
'additionalShippingCost' => [
],
'buyerResponsibleForPickup' => null,
'buyerResponsibleForShipping' => null,
'cashOnDeliveryFee' => [
],
'freeShipping' => null,
'shipToLocations' => [
],
'shippingCarrierCode' => '',
'shippingCost' => [
],
'shippingServiceCode' => '',
'sortOrder' => 0,
'surcharge' => [
]
]
]
]
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'categoryTypes' => [
[
'default' => null,
'name' => ''
]
],
'description' => '',
'freightShipping' => null,
'globalShipping' => null,
'handlingTime' => [
'unit' => '',
'value' => 0
],
'localPickup' => null,
'marketplaceId' => '',
'name' => '',
'pickupDropOff' => null,
'shipToLocations' => [
'regionExcluded' => [
[
'regionName' => '',
'regionType' => ''
]
],
'regionIncluded' => [
[
]
]
],
'shippingOptions' => [
[
'costType' => '',
'insuranceFee' => [
'currency' => '',
'value' => ''
],
'insuranceOffered' => null,
'optionType' => '',
'packageHandlingCost' => [
],
'rateTableId' => '',
'shippingDiscountProfileId' => '',
'shippingPromotionOffered' => null,
'shippingServices' => [
[
'additionalShippingCost' => [
],
'buyerResponsibleForPickup' => null,
'buyerResponsibleForShipping' => null,
'cashOnDeliveryFee' => [
],
'freeShipping' => null,
'shipToLocations' => [
],
'shippingCarrierCode' => '',
'shippingCost' => [
],
'shippingServiceCode' => '',
'sortOrder' => 0,
'surcharge' => [
]
]
]
]
]
]));
$request->setRequestUrl('{{baseUrl}}/fulfillment_policy/');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/fulfillment_policy/' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"categoryTypes": [
{
"default": false,
"name": ""
}
],
"description": "",
"freightShipping": false,
"globalShipping": false,
"handlingTime": {
"unit": "",
"value": 0
},
"localPickup": false,
"marketplaceId": "",
"name": "",
"pickupDropOff": false,
"shipToLocations": {
"regionExcluded": [
{
"regionName": "",
"regionType": ""
}
],
"regionIncluded": [
{}
]
},
"shippingOptions": [
{
"costType": "",
"insuranceFee": {
"currency": "",
"value": ""
},
"insuranceOffered": false,
"optionType": "",
"packageHandlingCost": {},
"rateTableId": "",
"shippingDiscountProfileId": "",
"shippingPromotionOffered": false,
"shippingServices": [
{
"additionalShippingCost": {},
"buyerResponsibleForPickup": false,
"buyerResponsibleForShipping": false,
"cashOnDeliveryFee": {},
"freeShipping": false,
"shipToLocations": {},
"shippingCarrierCode": "",
"shippingCost": {},
"shippingServiceCode": "",
"sortOrder": 0,
"surcharge": {}
}
]
}
]
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/fulfillment_policy/' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"categoryTypes": [
{
"default": false,
"name": ""
}
],
"description": "",
"freightShipping": false,
"globalShipping": false,
"handlingTime": {
"unit": "",
"value": 0
},
"localPickup": false,
"marketplaceId": "",
"name": "",
"pickupDropOff": false,
"shipToLocations": {
"regionExcluded": [
{
"regionName": "",
"regionType": ""
}
],
"regionIncluded": [
{}
]
},
"shippingOptions": [
{
"costType": "",
"insuranceFee": {
"currency": "",
"value": ""
},
"insuranceOffered": false,
"optionType": "",
"packageHandlingCost": {},
"rateTableId": "",
"shippingDiscountProfileId": "",
"shippingPromotionOffered": false,
"shippingServices": [
{
"additionalShippingCost": {},
"buyerResponsibleForPickup": false,
"buyerResponsibleForShipping": false,
"cashOnDeliveryFee": {},
"freeShipping": false,
"shipToLocations": {},
"shippingCarrierCode": "",
"shippingCost": {},
"shippingServiceCode": "",
"sortOrder": 0,
"surcharge": {}
}
]
}
]
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"categoryTypes\": [\n {\n \"default\": false,\n \"name\": \"\"\n }\n ],\n \"description\": \"\",\n \"freightShipping\": false,\n \"globalShipping\": false,\n \"handlingTime\": {\n \"unit\": \"\",\n \"value\": 0\n },\n \"localPickup\": false,\n \"marketplaceId\": \"\",\n \"name\": \"\",\n \"pickupDropOff\": false,\n \"shipToLocations\": {\n \"regionExcluded\": [\n {\n \"regionName\": \"\",\n \"regionType\": \"\"\n }\n ],\n \"regionIncluded\": [\n {}\n ]\n },\n \"shippingOptions\": [\n {\n \"costType\": \"\",\n \"insuranceFee\": {\n \"currency\": \"\",\n \"value\": \"\"\n },\n \"insuranceOffered\": false,\n \"optionType\": \"\",\n \"packageHandlingCost\": {},\n \"rateTableId\": \"\",\n \"shippingDiscountProfileId\": \"\",\n \"shippingPromotionOffered\": false,\n \"shippingServices\": [\n {\n \"additionalShippingCost\": {},\n \"buyerResponsibleForPickup\": false,\n \"buyerResponsibleForShipping\": false,\n \"cashOnDeliveryFee\": {},\n \"freeShipping\": false,\n \"shipToLocations\": {},\n \"shippingCarrierCode\": \"\",\n \"shippingCost\": {},\n \"shippingServiceCode\": \"\",\n \"sortOrder\": 0,\n \"surcharge\": {}\n }\n ]\n }\n ]\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/fulfillment_policy/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/fulfillment_policy/"
payload = {
"categoryTypes": [
{
"default": False,
"name": ""
}
],
"description": "",
"freightShipping": False,
"globalShipping": False,
"handlingTime": {
"unit": "",
"value": 0
},
"localPickup": False,
"marketplaceId": "",
"name": "",
"pickupDropOff": False,
"shipToLocations": {
"regionExcluded": [
{
"regionName": "",
"regionType": ""
}
],
"regionIncluded": [{}]
},
"shippingOptions": [
{
"costType": "",
"insuranceFee": {
"currency": "",
"value": ""
},
"insuranceOffered": False,
"optionType": "",
"packageHandlingCost": {},
"rateTableId": "",
"shippingDiscountProfileId": "",
"shippingPromotionOffered": False,
"shippingServices": [
{
"additionalShippingCost": {},
"buyerResponsibleForPickup": False,
"buyerResponsibleForShipping": False,
"cashOnDeliveryFee": {},
"freeShipping": False,
"shipToLocations": {},
"shippingCarrierCode": "",
"shippingCost": {},
"shippingServiceCode": "",
"sortOrder": 0,
"surcharge": {}
}
]
}
]
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/fulfillment_policy/"
payload <- "{\n \"categoryTypes\": [\n {\n \"default\": false,\n \"name\": \"\"\n }\n ],\n \"description\": \"\",\n \"freightShipping\": false,\n \"globalShipping\": false,\n \"handlingTime\": {\n \"unit\": \"\",\n \"value\": 0\n },\n \"localPickup\": false,\n \"marketplaceId\": \"\",\n \"name\": \"\",\n \"pickupDropOff\": false,\n \"shipToLocations\": {\n \"regionExcluded\": [\n {\n \"regionName\": \"\",\n \"regionType\": \"\"\n }\n ],\n \"regionIncluded\": [\n {}\n ]\n },\n \"shippingOptions\": [\n {\n \"costType\": \"\",\n \"insuranceFee\": {\n \"currency\": \"\",\n \"value\": \"\"\n },\n \"insuranceOffered\": false,\n \"optionType\": \"\",\n \"packageHandlingCost\": {},\n \"rateTableId\": \"\",\n \"shippingDiscountProfileId\": \"\",\n \"shippingPromotionOffered\": false,\n \"shippingServices\": [\n {\n \"additionalShippingCost\": {},\n \"buyerResponsibleForPickup\": false,\n \"buyerResponsibleForShipping\": false,\n \"cashOnDeliveryFee\": {},\n \"freeShipping\": false,\n \"shipToLocations\": {},\n \"shippingCarrierCode\": \"\",\n \"shippingCost\": {},\n \"shippingServiceCode\": \"\",\n \"sortOrder\": 0,\n \"surcharge\": {}\n }\n ]\n }\n ]\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/fulfillment_policy/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"categoryTypes\": [\n {\n \"default\": false,\n \"name\": \"\"\n }\n ],\n \"description\": \"\",\n \"freightShipping\": false,\n \"globalShipping\": false,\n \"handlingTime\": {\n \"unit\": \"\",\n \"value\": 0\n },\n \"localPickup\": false,\n \"marketplaceId\": \"\",\n \"name\": \"\",\n \"pickupDropOff\": false,\n \"shipToLocations\": {\n \"regionExcluded\": [\n {\n \"regionName\": \"\",\n \"regionType\": \"\"\n }\n ],\n \"regionIncluded\": [\n {}\n ]\n },\n \"shippingOptions\": [\n {\n \"costType\": \"\",\n \"insuranceFee\": {\n \"currency\": \"\",\n \"value\": \"\"\n },\n \"insuranceOffered\": false,\n \"optionType\": \"\",\n \"packageHandlingCost\": {},\n \"rateTableId\": \"\",\n \"shippingDiscountProfileId\": \"\",\n \"shippingPromotionOffered\": false,\n \"shippingServices\": [\n {\n \"additionalShippingCost\": {},\n \"buyerResponsibleForPickup\": false,\n \"buyerResponsibleForShipping\": false,\n \"cashOnDeliveryFee\": {},\n \"freeShipping\": false,\n \"shipToLocations\": {},\n \"shippingCarrierCode\": \"\",\n \"shippingCost\": {},\n \"shippingServiceCode\": \"\",\n \"sortOrder\": 0,\n \"surcharge\": {}\n }\n ]\n }\n ]\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/fulfillment_policy/') do |req|
req.body = "{\n \"categoryTypes\": [\n {\n \"default\": false,\n \"name\": \"\"\n }\n ],\n \"description\": \"\",\n \"freightShipping\": false,\n \"globalShipping\": false,\n \"handlingTime\": {\n \"unit\": \"\",\n \"value\": 0\n },\n \"localPickup\": false,\n \"marketplaceId\": \"\",\n \"name\": \"\",\n \"pickupDropOff\": false,\n \"shipToLocations\": {\n \"regionExcluded\": [\n {\n \"regionName\": \"\",\n \"regionType\": \"\"\n }\n ],\n \"regionIncluded\": [\n {}\n ]\n },\n \"shippingOptions\": [\n {\n \"costType\": \"\",\n \"insuranceFee\": {\n \"currency\": \"\",\n \"value\": \"\"\n },\n \"insuranceOffered\": false,\n \"optionType\": \"\",\n \"packageHandlingCost\": {},\n \"rateTableId\": \"\",\n \"shippingDiscountProfileId\": \"\",\n \"shippingPromotionOffered\": false,\n \"shippingServices\": [\n {\n \"additionalShippingCost\": {},\n \"buyerResponsibleForPickup\": false,\n \"buyerResponsibleForShipping\": false,\n \"cashOnDeliveryFee\": {},\n \"freeShipping\": false,\n \"shipToLocations\": {},\n \"shippingCarrierCode\": \"\",\n \"shippingCost\": {},\n \"shippingServiceCode\": \"\",\n \"sortOrder\": 0,\n \"surcharge\": {}\n }\n ]\n }\n ]\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/fulfillment_policy/";
let payload = json!({
"categoryTypes": (
json!({
"default": false,
"name": ""
})
),
"description": "",
"freightShipping": false,
"globalShipping": false,
"handlingTime": json!({
"unit": "",
"value": 0
}),
"localPickup": false,
"marketplaceId": "",
"name": "",
"pickupDropOff": false,
"shipToLocations": json!({
"regionExcluded": (
json!({
"regionName": "",
"regionType": ""
})
),
"regionIncluded": (json!({}))
}),
"shippingOptions": (
json!({
"costType": "",
"insuranceFee": json!({
"currency": "",
"value": ""
}),
"insuranceOffered": false,
"optionType": "",
"packageHandlingCost": json!({}),
"rateTableId": "",
"shippingDiscountProfileId": "",
"shippingPromotionOffered": false,
"shippingServices": (
json!({
"additionalShippingCost": json!({}),
"buyerResponsibleForPickup": false,
"buyerResponsibleForShipping": false,
"cashOnDeliveryFee": json!({}),
"freeShipping": false,
"shipToLocations": json!({}),
"shippingCarrierCode": "",
"shippingCost": json!({}),
"shippingServiceCode": "",
"sortOrder": 0,
"surcharge": json!({})
})
)
})
)
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/fulfillment_policy/ \
--header 'content-type: application/json' \
--data '{
"categoryTypes": [
{
"default": false,
"name": ""
}
],
"description": "",
"freightShipping": false,
"globalShipping": false,
"handlingTime": {
"unit": "",
"value": 0
},
"localPickup": false,
"marketplaceId": "",
"name": "",
"pickupDropOff": false,
"shipToLocations": {
"regionExcluded": [
{
"regionName": "",
"regionType": ""
}
],
"regionIncluded": [
{}
]
},
"shippingOptions": [
{
"costType": "",
"insuranceFee": {
"currency": "",
"value": ""
},
"insuranceOffered": false,
"optionType": "",
"packageHandlingCost": {},
"rateTableId": "",
"shippingDiscountProfileId": "",
"shippingPromotionOffered": false,
"shippingServices": [
{
"additionalShippingCost": {},
"buyerResponsibleForPickup": false,
"buyerResponsibleForShipping": false,
"cashOnDeliveryFee": {},
"freeShipping": false,
"shipToLocations": {},
"shippingCarrierCode": "",
"shippingCost": {},
"shippingServiceCode": "",
"sortOrder": 0,
"surcharge": {}
}
]
}
]
}'
echo '{
"categoryTypes": [
{
"default": false,
"name": ""
}
],
"description": "",
"freightShipping": false,
"globalShipping": false,
"handlingTime": {
"unit": "",
"value": 0
},
"localPickup": false,
"marketplaceId": "",
"name": "",
"pickupDropOff": false,
"shipToLocations": {
"regionExcluded": [
{
"regionName": "",
"regionType": ""
}
],
"regionIncluded": [
{}
]
},
"shippingOptions": [
{
"costType": "",
"insuranceFee": {
"currency": "",
"value": ""
},
"insuranceOffered": false,
"optionType": "",
"packageHandlingCost": {},
"rateTableId": "",
"shippingDiscountProfileId": "",
"shippingPromotionOffered": false,
"shippingServices": [
{
"additionalShippingCost": {},
"buyerResponsibleForPickup": false,
"buyerResponsibleForShipping": false,
"cashOnDeliveryFee": {},
"freeShipping": false,
"shipToLocations": {},
"shippingCarrierCode": "",
"shippingCost": {},
"shippingServiceCode": "",
"sortOrder": 0,
"surcharge": {}
}
]
}
]
}' | \
http POST {{baseUrl}}/fulfillment_policy/ \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "categoryTypes": [\n {\n "default": false,\n "name": ""\n }\n ],\n "description": "",\n "freightShipping": false,\n "globalShipping": false,\n "handlingTime": {\n "unit": "",\n "value": 0\n },\n "localPickup": false,\n "marketplaceId": "",\n "name": "",\n "pickupDropOff": false,\n "shipToLocations": {\n "regionExcluded": [\n {\n "regionName": "",\n "regionType": ""\n }\n ],\n "regionIncluded": [\n {}\n ]\n },\n "shippingOptions": [\n {\n "costType": "",\n "insuranceFee": {\n "currency": "",\n "value": ""\n },\n "insuranceOffered": false,\n "optionType": "",\n "packageHandlingCost": {},\n "rateTableId": "",\n "shippingDiscountProfileId": "",\n "shippingPromotionOffered": false,\n "shippingServices": [\n {\n "additionalShippingCost": {},\n "buyerResponsibleForPickup": false,\n "buyerResponsibleForShipping": false,\n "cashOnDeliveryFee": {},\n "freeShipping": false,\n "shipToLocations": {},\n "shippingCarrierCode": "",\n "shippingCost": {},\n "shippingServiceCode": "",\n "sortOrder": 0,\n "surcharge": {}\n }\n ]\n }\n ]\n}' \
--output-document \
- {{baseUrl}}/fulfillment_policy/
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"categoryTypes": [
[
"default": false,
"name": ""
]
],
"description": "",
"freightShipping": false,
"globalShipping": false,
"handlingTime": [
"unit": "",
"value": 0
],
"localPickup": false,
"marketplaceId": "",
"name": "",
"pickupDropOff": false,
"shipToLocations": [
"regionExcluded": [
[
"regionName": "",
"regionType": ""
]
],
"regionIncluded": [[]]
],
"shippingOptions": [
[
"costType": "",
"insuranceFee": [
"currency": "",
"value": ""
],
"insuranceOffered": false,
"optionType": "",
"packageHandlingCost": [],
"rateTableId": "",
"shippingDiscountProfileId": "",
"shippingPromotionOffered": false,
"shippingServices": [
[
"additionalShippingCost": [],
"buyerResponsibleForPickup": false,
"buyerResponsibleForShipping": false,
"cashOnDeliveryFee": [],
"freeShipping": false,
"shipToLocations": [],
"shippingCarrierCode": "",
"shippingCost": [],
"shippingServiceCode": "",
"sortOrder": 0,
"surcharge": []
]
]
]
]
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/fulfillment_policy/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
DELETE
deleteFulfillmentPolicy
{{baseUrl}}/fulfillment_policy/:fulfillmentPolicyId
QUERY PARAMS
fulfillmentPolicyId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/fulfillment_policy/:fulfillmentPolicyId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/delete "{{baseUrl}}/fulfillment_policy/:fulfillmentPolicyId")
require "http/client"
url = "{{baseUrl}}/fulfillment_policy/:fulfillmentPolicyId"
response = HTTP::Client.delete url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Delete,
RequestUri = new Uri("{{baseUrl}}/fulfillment_policy/:fulfillmentPolicyId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/fulfillment_policy/:fulfillmentPolicyId");
var request = new RestRequest("", Method.Delete);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/fulfillment_policy/:fulfillmentPolicyId"
req, _ := http.NewRequest("DELETE", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
DELETE /baseUrl/fulfillment_policy/:fulfillmentPolicyId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/fulfillment_policy/:fulfillmentPolicyId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/fulfillment_policy/:fulfillmentPolicyId"))
.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}}/fulfillment_policy/:fulfillmentPolicyId")
.delete(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/fulfillment_policy/:fulfillmentPolicyId")
.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}}/fulfillment_policy/:fulfillmentPolicyId');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'DELETE',
url: '{{baseUrl}}/fulfillment_policy/:fulfillmentPolicyId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/fulfillment_policy/:fulfillmentPolicyId';
const options = {method: 'DELETE'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/fulfillment_policy/:fulfillmentPolicyId',
method: 'DELETE',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/fulfillment_policy/:fulfillmentPolicyId")
.delete(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'DELETE',
hostname: 'example.com',
port: null,
path: '/baseUrl/fulfillment_policy/:fulfillmentPolicyId',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'DELETE',
url: '{{baseUrl}}/fulfillment_policy/:fulfillmentPolicyId'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('DELETE', '{{baseUrl}}/fulfillment_policy/:fulfillmentPolicyId');
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}}/fulfillment_policy/:fulfillmentPolicyId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/fulfillment_policy/:fulfillmentPolicyId';
const options = {method: 'DELETE'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/fulfillment_policy/:fulfillmentPolicyId"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"DELETE"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/fulfillment_policy/:fulfillmentPolicyId" in
Client.call `DELETE uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/fulfillment_policy/:fulfillmentPolicyId",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('DELETE', '{{baseUrl}}/fulfillment_policy/:fulfillmentPolicyId');
echo $response->getBody();
setUrl('{{baseUrl}}/fulfillment_policy/:fulfillmentPolicyId');
$request->setMethod(HTTP_METH_DELETE);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/fulfillment_policy/:fulfillmentPolicyId');
$request->setRequestMethod('DELETE');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/fulfillment_policy/:fulfillmentPolicyId' -Method DELETE
$response = Invoke-RestMethod -Uri '{{baseUrl}}/fulfillment_policy/:fulfillmentPolicyId' -Method DELETE
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("DELETE", "/baseUrl/fulfillment_policy/:fulfillmentPolicyId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/fulfillment_policy/:fulfillmentPolicyId"
response = requests.delete(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/fulfillment_policy/:fulfillmentPolicyId"
response <- VERB("DELETE", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/fulfillment_policy/:fulfillmentPolicyId")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.delete('/baseUrl/fulfillment_policy/:fulfillmentPolicyId') do |req|
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/fulfillment_policy/:fulfillmentPolicyId";
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("DELETE").unwrap(), url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request DELETE \
--url {{baseUrl}}/fulfillment_policy/:fulfillmentPolicyId
http DELETE {{baseUrl}}/fulfillment_policy/:fulfillmentPolicyId
wget --quiet \
--method DELETE \
--output-document \
- {{baseUrl}}/fulfillment_policy/:fulfillmentPolicyId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/fulfillment_policy/:fulfillmentPolicyId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "DELETE"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
getFulfillmentPolicies
{{baseUrl}}/fulfillment_policy
QUERY PARAMS
marketplace_id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/fulfillment_policy?marketplace_id=");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/fulfillment_policy" {:query-params {:marketplace_id ""}})
require "http/client"
url = "{{baseUrl}}/fulfillment_policy?marketplace_id="
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/fulfillment_policy?marketplace_id="),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/fulfillment_policy?marketplace_id=");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/fulfillment_policy?marketplace_id="
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/fulfillment_policy?marketplace_id= HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/fulfillment_policy?marketplace_id=")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/fulfillment_policy?marketplace_id="))
.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}}/fulfillment_policy?marketplace_id=")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/fulfillment_policy?marketplace_id=")
.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}}/fulfillment_policy?marketplace_id=');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/fulfillment_policy',
params: {marketplace_id: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/fulfillment_policy?marketplace_id=';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/fulfillment_policy?marketplace_id=',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/fulfillment_policy?marketplace_id=")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/fulfillment_policy?marketplace_id=',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'GET',
url: '{{baseUrl}}/fulfillment_policy',
qs: {marketplace_id: ''}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/fulfillment_policy');
req.query({
marketplace_id: ''
});
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}}/fulfillment_policy',
params: {marketplace_id: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/fulfillment_policy?marketplace_id=';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/fulfillment_policy?marketplace_id="]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/fulfillment_policy?marketplace_id=" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/fulfillment_policy?marketplace_id=",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/fulfillment_policy?marketplace_id=');
echo $response->getBody();
setUrl('{{baseUrl}}/fulfillment_policy');
$request->setMethod(HTTP_METH_GET);
$request->setQueryData([
'marketplace_id' => ''
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/fulfillment_policy');
$request->setRequestMethod('GET');
$request->setQuery(new http\QueryString([
'marketplace_id' => ''
]));
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/fulfillment_policy?marketplace_id=' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/fulfillment_policy?marketplace_id=' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/fulfillment_policy?marketplace_id=")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/fulfillment_policy"
querystring = {"marketplace_id":""}
response = requests.get(url, params=querystring)
print(response.json())
library(httr)
url <- "{{baseUrl}}/fulfillment_policy"
queryString <- list(marketplace_id = "")
response <- VERB("GET", url, query = queryString, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/fulfillment_policy?marketplace_id=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/fulfillment_policy') do |req|
req.params['marketplace_id'] = ''
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/fulfillment_policy";
let querystring = [
("marketplace_id", ""),
];
let client = reqwest::Client::new();
let response = client.get(url)
.query(&querystring)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url '{{baseUrl}}/fulfillment_policy?marketplace_id='
http GET '{{baseUrl}}/fulfillment_policy?marketplace_id='
wget --quiet \
--method GET \
--output-document \
- '{{baseUrl}}/fulfillment_policy?marketplace_id='
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/fulfillment_policy?marketplace_id=")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
getFulfillmentPolicy
{{baseUrl}}/fulfillment_policy/:fulfillmentPolicyId
QUERY PARAMS
fulfillmentPolicyId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/fulfillment_policy/:fulfillmentPolicyId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/fulfillment_policy/:fulfillmentPolicyId")
require "http/client"
url = "{{baseUrl}}/fulfillment_policy/:fulfillmentPolicyId"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/fulfillment_policy/:fulfillmentPolicyId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/fulfillment_policy/:fulfillmentPolicyId");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/fulfillment_policy/:fulfillmentPolicyId"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/fulfillment_policy/:fulfillmentPolicyId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/fulfillment_policy/:fulfillmentPolicyId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/fulfillment_policy/:fulfillmentPolicyId"))
.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}}/fulfillment_policy/:fulfillmentPolicyId")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/fulfillment_policy/:fulfillmentPolicyId")
.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}}/fulfillment_policy/:fulfillmentPolicyId');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/fulfillment_policy/:fulfillmentPolicyId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/fulfillment_policy/:fulfillmentPolicyId';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/fulfillment_policy/:fulfillmentPolicyId',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/fulfillment_policy/:fulfillmentPolicyId")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/fulfillment_policy/:fulfillmentPolicyId',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'GET',
url: '{{baseUrl}}/fulfillment_policy/:fulfillmentPolicyId'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/fulfillment_policy/:fulfillmentPolicyId');
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}}/fulfillment_policy/:fulfillmentPolicyId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/fulfillment_policy/:fulfillmentPolicyId';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/fulfillment_policy/:fulfillmentPolicyId"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/fulfillment_policy/:fulfillmentPolicyId" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/fulfillment_policy/:fulfillmentPolicyId",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/fulfillment_policy/:fulfillmentPolicyId');
echo $response->getBody();
setUrl('{{baseUrl}}/fulfillment_policy/:fulfillmentPolicyId');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/fulfillment_policy/:fulfillmentPolicyId');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/fulfillment_policy/:fulfillmentPolicyId' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/fulfillment_policy/:fulfillmentPolicyId' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/fulfillment_policy/:fulfillmentPolicyId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/fulfillment_policy/:fulfillmentPolicyId"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/fulfillment_policy/:fulfillmentPolicyId"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/fulfillment_policy/:fulfillmentPolicyId")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/fulfillment_policy/:fulfillmentPolicyId') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/fulfillment_policy/:fulfillmentPolicyId";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/fulfillment_policy/:fulfillmentPolicyId
http GET {{baseUrl}}/fulfillment_policy/:fulfillmentPolicyId
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/fulfillment_policy/:fulfillmentPolicyId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/fulfillment_policy/:fulfillmentPolicyId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
getFulfillmentPolicyByName
{{baseUrl}}/fulfillment_policy/get_by_policy_name
QUERY PARAMS
marketplace_id
name
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/fulfillment_policy/get_by_policy_name?marketplace_id=&name=");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/fulfillment_policy/get_by_policy_name" {:query-params {:marketplace_id ""
:name ""}})
require "http/client"
url = "{{baseUrl}}/fulfillment_policy/get_by_policy_name?marketplace_id=&name="
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/fulfillment_policy/get_by_policy_name?marketplace_id=&name="),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/fulfillment_policy/get_by_policy_name?marketplace_id=&name=");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/fulfillment_policy/get_by_policy_name?marketplace_id=&name="
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/fulfillment_policy/get_by_policy_name?marketplace_id=&name= HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/fulfillment_policy/get_by_policy_name?marketplace_id=&name=")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/fulfillment_policy/get_by_policy_name?marketplace_id=&name="))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/fulfillment_policy/get_by_policy_name?marketplace_id=&name=")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/fulfillment_policy/get_by_policy_name?marketplace_id=&name=")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/fulfillment_policy/get_by_policy_name?marketplace_id=&name=');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/fulfillment_policy/get_by_policy_name',
params: {marketplace_id: '', name: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/fulfillment_policy/get_by_policy_name?marketplace_id=&name=';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/fulfillment_policy/get_by_policy_name?marketplace_id=&name=',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/fulfillment_policy/get_by_policy_name?marketplace_id=&name=")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/fulfillment_policy/get_by_policy_name?marketplace_id=&name=',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'GET',
url: '{{baseUrl}}/fulfillment_policy/get_by_policy_name',
qs: {marketplace_id: '', name: ''}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/fulfillment_policy/get_by_policy_name');
req.query({
marketplace_id: '',
name: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'GET',
url: '{{baseUrl}}/fulfillment_policy/get_by_policy_name',
params: {marketplace_id: '', name: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/fulfillment_policy/get_by_policy_name?marketplace_id=&name=';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/fulfillment_policy/get_by_policy_name?marketplace_id=&name="]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/fulfillment_policy/get_by_policy_name?marketplace_id=&name=" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/fulfillment_policy/get_by_policy_name?marketplace_id=&name=",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/fulfillment_policy/get_by_policy_name?marketplace_id=&name=');
echo $response->getBody();
setUrl('{{baseUrl}}/fulfillment_policy/get_by_policy_name');
$request->setMethod(HTTP_METH_GET);
$request->setQueryData([
'marketplace_id' => '',
'name' => ''
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/fulfillment_policy/get_by_policy_name');
$request->setRequestMethod('GET');
$request->setQuery(new http\QueryString([
'marketplace_id' => '',
'name' => ''
]));
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/fulfillment_policy/get_by_policy_name?marketplace_id=&name=' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/fulfillment_policy/get_by_policy_name?marketplace_id=&name=' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/fulfillment_policy/get_by_policy_name?marketplace_id=&name=")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/fulfillment_policy/get_by_policy_name"
querystring = {"marketplace_id":"","name":""}
response = requests.get(url, params=querystring)
print(response.json())
library(httr)
url <- "{{baseUrl}}/fulfillment_policy/get_by_policy_name"
queryString <- list(
marketplace_id = "",
name = ""
)
response <- VERB("GET", url, query = queryString, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/fulfillment_policy/get_by_policy_name?marketplace_id=&name=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/fulfillment_policy/get_by_policy_name') do |req|
req.params['marketplace_id'] = ''
req.params['name'] = ''
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/fulfillment_policy/get_by_policy_name";
let querystring = [
("marketplace_id", ""),
("name", ""),
];
let client = reqwest::Client::new();
let response = client.get(url)
.query(&querystring)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url '{{baseUrl}}/fulfillment_policy/get_by_policy_name?marketplace_id=&name='
http GET '{{baseUrl}}/fulfillment_policy/get_by_policy_name?marketplace_id=&name='
wget --quiet \
--method GET \
--output-document \
- '{{baseUrl}}/fulfillment_policy/get_by_policy_name?marketplace_id=&name='
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/fulfillment_policy/get_by_policy_name?marketplace_id=&name=")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PUT
updateFulfillmentPolicy
{{baseUrl}}/fulfillment_policy/:fulfillmentPolicyId
QUERY PARAMS
fulfillmentPolicyId
BODY json
{
"categoryTypes": [
{
"default": false,
"name": ""
}
],
"description": "",
"freightShipping": false,
"globalShipping": false,
"handlingTime": {
"unit": "",
"value": 0
},
"localPickup": false,
"marketplaceId": "",
"name": "",
"pickupDropOff": false,
"shipToLocations": {
"regionExcluded": [
{
"regionName": "",
"regionType": ""
}
],
"regionIncluded": [
{}
]
},
"shippingOptions": [
{
"costType": "",
"insuranceFee": {
"currency": "",
"value": ""
},
"insuranceOffered": false,
"optionType": "",
"packageHandlingCost": {},
"rateTableId": "",
"shippingDiscountProfileId": "",
"shippingPromotionOffered": false,
"shippingServices": [
{
"additionalShippingCost": {},
"buyerResponsibleForPickup": false,
"buyerResponsibleForShipping": false,
"cashOnDeliveryFee": {},
"freeShipping": false,
"shipToLocations": {},
"shippingCarrierCode": "",
"shippingCost": {},
"shippingServiceCode": "",
"sortOrder": 0,
"surcharge": {}
}
]
}
]
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/fulfillment_policy/:fulfillmentPolicyId");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"categoryTypes\": [\n {\n \"default\": false,\n \"name\": \"\"\n }\n ],\n \"description\": \"\",\n \"freightShipping\": false,\n \"globalShipping\": false,\n \"handlingTime\": {\n \"unit\": \"\",\n \"value\": 0\n },\n \"localPickup\": false,\n \"marketplaceId\": \"\",\n \"name\": \"\",\n \"pickupDropOff\": false,\n \"shipToLocations\": {\n \"regionExcluded\": [\n {\n \"regionName\": \"\",\n \"regionType\": \"\"\n }\n ],\n \"regionIncluded\": [\n {}\n ]\n },\n \"shippingOptions\": [\n {\n \"costType\": \"\",\n \"insuranceFee\": {\n \"currency\": \"\",\n \"value\": \"\"\n },\n \"insuranceOffered\": false,\n \"optionType\": \"\",\n \"packageHandlingCost\": {},\n \"rateTableId\": \"\",\n \"shippingDiscountProfileId\": \"\",\n \"shippingPromotionOffered\": false,\n \"shippingServices\": [\n {\n \"additionalShippingCost\": {},\n \"buyerResponsibleForPickup\": false,\n \"buyerResponsibleForShipping\": false,\n \"cashOnDeliveryFee\": {},\n \"freeShipping\": false,\n \"shipToLocations\": {},\n \"shippingCarrierCode\": \"\",\n \"shippingCost\": {},\n \"shippingServiceCode\": \"\",\n \"sortOrder\": 0,\n \"surcharge\": {}\n }\n ]\n }\n ]\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/fulfillment_policy/:fulfillmentPolicyId" {:content-type :json
:form-params {:categoryTypes [{:default false
:name ""}]
:description ""
:freightShipping false
:globalShipping false
:handlingTime {:unit ""
:value 0}
:localPickup false
:marketplaceId ""
:name ""
:pickupDropOff false
:shipToLocations {:regionExcluded [{:regionName ""
:regionType ""}]
:regionIncluded [{}]}
:shippingOptions [{:costType ""
:insuranceFee {:currency ""
:value ""}
:insuranceOffered false
:optionType ""
:packageHandlingCost {}
:rateTableId ""
:shippingDiscountProfileId ""
:shippingPromotionOffered false
:shippingServices [{:additionalShippingCost {}
:buyerResponsibleForPickup false
:buyerResponsibleForShipping false
:cashOnDeliveryFee {}
:freeShipping false
:shipToLocations {}
:shippingCarrierCode ""
:shippingCost {}
:shippingServiceCode ""
:sortOrder 0
:surcharge {}}]}]}})
require "http/client"
url = "{{baseUrl}}/fulfillment_policy/:fulfillmentPolicyId"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"categoryTypes\": [\n {\n \"default\": false,\n \"name\": \"\"\n }\n ],\n \"description\": \"\",\n \"freightShipping\": false,\n \"globalShipping\": false,\n \"handlingTime\": {\n \"unit\": \"\",\n \"value\": 0\n },\n \"localPickup\": false,\n \"marketplaceId\": \"\",\n \"name\": \"\",\n \"pickupDropOff\": false,\n \"shipToLocations\": {\n \"regionExcluded\": [\n {\n \"regionName\": \"\",\n \"regionType\": \"\"\n }\n ],\n \"regionIncluded\": [\n {}\n ]\n },\n \"shippingOptions\": [\n {\n \"costType\": \"\",\n \"insuranceFee\": {\n \"currency\": \"\",\n \"value\": \"\"\n },\n \"insuranceOffered\": false,\n \"optionType\": \"\",\n \"packageHandlingCost\": {},\n \"rateTableId\": \"\",\n \"shippingDiscountProfileId\": \"\",\n \"shippingPromotionOffered\": false,\n \"shippingServices\": [\n {\n \"additionalShippingCost\": {},\n \"buyerResponsibleForPickup\": false,\n \"buyerResponsibleForShipping\": false,\n \"cashOnDeliveryFee\": {},\n \"freeShipping\": false,\n \"shipToLocations\": {},\n \"shippingCarrierCode\": \"\",\n \"shippingCost\": {},\n \"shippingServiceCode\": \"\",\n \"sortOrder\": 0,\n \"surcharge\": {}\n }\n ]\n }\n ]\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}}/fulfillment_policy/:fulfillmentPolicyId"),
Content = new StringContent("{\n \"categoryTypes\": [\n {\n \"default\": false,\n \"name\": \"\"\n }\n ],\n \"description\": \"\",\n \"freightShipping\": false,\n \"globalShipping\": false,\n \"handlingTime\": {\n \"unit\": \"\",\n \"value\": 0\n },\n \"localPickup\": false,\n \"marketplaceId\": \"\",\n \"name\": \"\",\n \"pickupDropOff\": false,\n \"shipToLocations\": {\n \"regionExcluded\": [\n {\n \"regionName\": \"\",\n \"regionType\": \"\"\n }\n ],\n \"regionIncluded\": [\n {}\n ]\n },\n \"shippingOptions\": [\n {\n \"costType\": \"\",\n \"insuranceFee\": {\n \"currency\": \"\",\n \"value\": \"\"\n },\n \"insuranceOffered\": false,\n \"optionType\": \"\",\n \"packageHandlingCost\": {},\n \"rateTableId\": \"\",\n \"shippingDiscountProfileId\": \"\",\n \"shippingPromotionOffered\": false,\n \"shippingServices\": [\n {\n \"additionalShippingCost\": {},\n \"buyerResponsibleForPickup\": false,\n \"buyerResponsibleForShipping\": false,\n \"cashOnDeliveryFee\": {},\n \"freeShipping\": false,\n \"shipToLocations\": {},\n \"shippingCarrierCode\": \"\",\n \"shippingCost\": {},\n \"shippingServiceCode\": \"\",\n \"sortOrder\": 0,\n \"surcharge\": {}\n }\n ]\n }\n ]\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/fulfillment_policy/:fulfillmentPolicyId");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"categoryTypes\": [\n {\n \"default\": false,\n \"name\": \"\"\n }\n ],\n \"description\": \"\",\n \"freightShipping\": false,\n \"globalShipping\": false,\n \"handlingTime\": {\n \"unit\": \"\",\n \"value\": 0\n },\n \"localPickup\": false,\n \"marketplaceId\": \"\",\n \"name\": \"\",\n \"pickupDropOff\": false,\n \"shipToLocations\": {\n \"regionExcluded\": [\n {\n \"regionName\": \"\",\n \"regionType\": \"\"\n }\n ],\n \"regionIncluded\": [\n {}\n ]\n },\n \"shippingOptions\": [\n {\n \"costType\": \"\",\n \"insuranceFee\": {\n \"currency\": \"\",\n \"value\": \"\"\n },\n \"insuranceOffered\": false,\n \"optionType\": \"\",\n \"packageHandlingCost\": {},\n \"rateTableId\": \"\",\n \"shippingDiscountProfileId\": \"\",\n \"shippingPromotionOffered\": false,\n \"shippingServices\": [\n {\n \"additionalShippingCost\": {},\n \"buyerResponsibleForPickup\": false,\n \"buyerResponsibleForShipping\": false,\n \"cashOnDeliveryFee\": {},\n \"freeShipping\": false,\n \"shipToLocations\": {},\n \"shippingCarrierCode\": \"\",\n \"shippingCost\": {},\n \"shippingServiceCode\": \"\",\n \"sortOrder\": 0,\n \"surcharge\": {}\n }\n ]\n }\n ]\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/fulfillment_policy/:fulfillmentPolicyId"
payload := strings.NewReader("{\n \"categoryTypes\": [\n {\n \"default\": false,\n \"name\": \"\"\n }\n ],\n \"description\": \"\",\n \"freightShipping\": false,\n \"globalShipping\": false,\n \"handlingTime\": {\n \"unit\": \"\",\n \"value\": 0\n },\n \"localPickup\": false,\n \"marketplaceId\": \"\",\n \"name\": \"\",\n \"pickupDropOff\": false,\n \"shipToLocations\": {\n \"regionExcluded\": [\n {\n \"regionName\": \"\",\n \"regionType\": \"\"\n }\n ],\n \"regionIncluded\": [\n {}\n ]\n },\n \"shippingOptions\": [\n {\n \"costType\": \"\",\n \"insuranceFee\": {\n \"currency\": \"\",\n \"value\": \"\"\n },\n \"insuranceOffered\": false,\n \"optionType\": \"\",\n \"packageHandlingCost\": {},\n \"rateTableId\": \"\",\n \"shippingDiscountProfileId\": \"\",\n \"shippingPromotionOffered\": false,\n \"shippingServices\": [\n {\n \"additionalShippingCost\": {},\n \"buyerResponsibleForPickup\": false,\n \"buyerResponsibleForShipping\": false,\n \"cashOnDeliveryFee\": {},\n \"freeShipping\": false,\n \"shipToLocations\": {},\n \"shippingCarrierCode\": \"\",\n \"shippingCost\": {},\n \"shippingServiceCode\": \"\",\n \"sortOrder\": 0,\n \"surcharge\": {}\n }\n ]\n }\n ]\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
PUT /baseUrl/fulfillment_policy/:fulfillmentPolicyId HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 1246
{
"categoryTypes": [
{
"default": false,
"name": ""
}
],
"description": "",
"freightShipping": false,
"globalShipping": false,
"handlingTime": {
"unit": "",
"value": 0
},
"localPickup": false,
"marketplaceId": "",
"name": "",
"pickupDropOff": false,
"shipToLocations": {
"regionExcluded": [
{
"regionName": "",
"regionType": ""
}
],
"regionIncluded": [
{}
]
},
"shippingOptions": [
{
"costType": "",
"insuranceFee": {
"currency": "",
"value": ""
},
"insuranceOffered": false,
"optionType": "",
"packageHandlingCost": {},
"rateTableId": "",
"shippingDiscountProfileId": "",
"shippingPromotionOffered": false,
"shippingServices": [
{
"additionalShippingCost": {},
"buyerResponsibleForPickup": false,
"buyerResponsibleForShipping": false,
"cashOnDeliveryFee": {},
"freeShipping": false,
"shipToLocations": {},
"shippingCarrierCode": "",
"shippingCost": {},
"shippingServiceCode": "",
"sortOrder": 0,
"surcharge": {}
}
]
}
]
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/fulfillment_policy/:fulfillmentPolicyId")
.setHeader("content-type", "application/json")
.setBody("{\n \"categoryTypes\": [\n {\n \"default\": false,\n \"name\": \"\"\n }\n ],\n \"description\": \"\",\n \"freightShipping\": false,\n \"globalShipping\": false,\n \"handlingTime\": {\n \"unit\": \"\",\n \"value\": 0\n },\n \"localPickup\": false,\n \"marketplaceId\": \"\",\n \"name\": \"\",\n \"pickupDropOff\": false,\n \"shipToLocations\": {\n \"regionExcluded\": [\n {\n \"regionName\": \"\",\n \"regionType\": \"\"\n }\n ],\n \"regionIncluded\": [\n {}\n ]\n },\n \"shippingOptions\": [\n {\n \"costType\": \"\",\n \"insuranceFee\": {\n \"currency\": \"\",\n \"value\": \"\"\n },\n \"insuranceOffered\": false,\n \"optionType\": \"\",\n \"packageHandlingCost\": {},\n \"rateTableId\": \"\",\n \"shippingDiscountProfileId\": \"\",\n \"shippingPromotionOffered\": false,\n \"shippingServices\": [\n {\n \"additionalShippingCost\": {},\n \"buyerResponsibleForPickup\": false,\n \"buyerResponsibleForShipping\": false,\n \"cashOnDeliveryFee\": {},\n \"freeShipping\": false,\n \"shipToLocations\": {},\n \"shippingCarrierCode\": \"\",\n \"shippingCost\": {},\n \"shippingServiceCode\": \"\",\n \"sortOrder\": 0,\n \"surcharge\": {}\n }\n ]\n }\n ]\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/fulfillment_policy/:fulfillmentPolicyId"))
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("{\n \"categoryTypes\": [\n {\n \"default\": false,\n \"name\": \"\"\n }\n ],\n \"description\": \"\",\n \"freightShipping\": false,\n \"globalShipping\": false,\n \"handlingTime\": {\n \"unit\": \"\",\n \"value\": 0\n },\n \"localPickup\": false,\n \"marketplaceId\": \"\",\n \"name\": \"\",\n \"pickupDropOff\": false,\n \"shipToLocations\": {\n \"regionExcluded\": [\n {\n \"regionName\": \"\",\n \"regionType\": \"\"\n }\n ],\n \"regionIncluded\": [\n {}\n ]\n },\n \"shippingOptions\": [\n {\n \"costType\": \"\",\n \"insuranceFee\": {\n \"currency\": \"\",\n \"value\": \"\"\n },\n \"insuranceOffered\": false,\n \"optionType\": \"\",\n \"packageHandlingCost\": {},\n \"rateTableId\": \"\",\n \"shippingDiscountProfileId\": \"\",\n \"shippingPromotionOffered\": false,\n \"shippingServices\": [\n {\n \"additionalShippingCost\": {},\n \"buyerResponsibleForPickup\": false,\n \"buyerResponsibleForShipping\": false,\n \"cashOnDeliveryFee\": {},\n \"freeShipping\": false,\n \"shipToLocations\": {},\n \"shippingCarrierCode\": \"\",\n \"shippingCost\": {},\n \"shippingServiceCode\": \"\",\n \"sortOrder\": 0,\n \"surcharge\": {}\n }\n ]\n }\n ]\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"categoryTypes\": [\n {\n \"default\": false,\n \"name\": \"\"\n }\n ],\n \"description\": \"\",\n \"freightShipping\": false,\n \"globalShipping\": false,\n \"handlingTime\": {\n \"unit\": \"\",\n \"value\": 0\n },\n \"localPickup\": false,\n \"marketplaceId\": \"\",\n \"name\": \"\",\n \"pickupDropOff\": false,\n \"shipToLocations\": {\n \"regionExcluded\": [\n {\n \"regionName\": \"\",\n \"regionType\": \"\"\n }\n ],\n \"regionIncluded\": [\n {}\n ]\n },\n \"shippingOptions\": [\n {\n \"costType\": \"\",\n \"insuranceFee\": {\n \"currency\": \"\",\n \"value\": \"\"\n },\n \"insuranceOffered\": false,\n \"optionType\": \"\",\n \"packageHandlingCost\": {},\n \"rateTableId\": \"\",\n \"shippingDiscountProfileId\": \"\",\n \"shippingPromotionOffered\": false,\n \"shippingServices\": [\n {\n \"additionalShippingCost\": {},\n \"buyerResponsibleForPickup\": false,\n \"buyerResponsibleForShipping\": false,\n \"cashOnDeliveryFee\": {},\n \"freeShipping\": false,\n \"shipToLocations\": {},\n \"shippingCarrierCode\": \"\",\n \"shippingCost\": {},\n \"shippingServiceCode\": \"\",\n \"sortOrder\": 0,\n \"surcharge\": {}\n }\n ]\n }\n ]\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/fulfillment_policy/:fulfillmentPolicyId")
.put(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/fulfillment_policy/:fulfillmentPolicyId")
.header("content-type", "application/json")
.body("{\n \"categoryTypes\": [\n {\n \"default\": false,\n \"name\": \"\"\n }\n ],\n \"description\": \"\",\n \"freightShipping\": false,\n \"globalShipping\": false,\n \"handlingTime\": {\n \"unit\": \"\",\n \"value\": 0\n },\n \"localPickup\": false,\n \"marketplaceId\": \"\",\n \"name\": \"\",\n \"pickupDropOff\": false,\n \"shipToLocations\": {\n \"regionExcluded\": [\n {\n \"regionName\": \"\",\n \"regionType\": \"\"\n }\n ],\n \"regionIncluded\": [\n {}\n ]\n },\n \"shippingOptions\": [\n {\n \"costType\": \"\",\n \"insuranceFee\": {\n \"currency\": \"\",\n \"value\": \"\"\n },\n \"insuranceOffered\": false,\n \"optionType\": \"\",\n \"packageHandlingCost\": {},\n \"rateTableId\": \"\",\n \"shippingDiscountProfileId\": \"\",\n \"shippingPromotionOffered\": false,\n \"shippingServices\": [\n {\n \"additionalShippingCost\": {},\n \"buyerResponsibleForPickup\": false,\n \"buyerResponsibleForShipping\": false,\n \"cashOnDeliveryFee\": {},\n \"freeShipping\": false,\n \"shipToLocations\": {},\n \"shippingCarrierCode\": \"\",\n \"shippingCost\": {},\n \"shippingServiceCode\": \"\",\n \"sortOrder\": 0,\n \"surcharge\": {}\n }\n ]\n }\n ]\n}")
.asString();
const data = JSON.stringify({
categoryTypes: [
{
default: false,
name: ''
}
],
description: '',
freightShipping: false,
globalShipping: false,
handlingTime: {
unit: '',
value: 0
},
localPickup: false,
marketplaceId: '',
name: '',
pickupDropOff: false,
shipToLocations: {
regionExcluded: [
{
regionName: '',
regionType: ''
}
],
regionIncluded: [
{}
]
},
shippingOptions: [
{
costType: '',
insuranceFee: {
currency: '',
value: ''
},
insuranceOffered: false,
optionType: '',
packageHandlingCost: {},
rateTableId: '',
shippingDiscountProfileId: '',
shippingPromotionOffered: false,
shippingServices: [
{
additionalShippingCost: {},
buyerResponsibleForPickup: false,
buyerResponsibleForShipping: false,
cashOnDeliveryFee: {},
freeShipping: false,
shipToLocations: {},
shippingCarrierCode: '',
shippingCost: {},
shippingServiceCode: '',
sortOrder: 0,
surcharge: {}
}
]
}
]
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/fulfillment_policy/:fulfillmentPolicyId');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/fulfillment_policy/:fulfillmentPolicyId',
headers: {'content-type': 'application/json'},
data: {
categoryTypes: [{default: false, name: ''}],
description: '',
freightShipping: false,
globalShipping: false,
handlingTime: {unit: '', value: 0},
localPickup: false,
marketplaceId: '',
name: '',
pickupDropOff: false,
shipToLocations: {regionExcluded: [{regionName: '', regionType: ''}], regionIncluded: [{}]},
shippingOptions: [
{
costType: '',
insuranceFee: {currency: '', value: ''},
insuranceOffered: false,
optionType: '',
packageHandlingCost: {},
rateTableId: '',
shippingDiscountProfileId: '',
shippingPromotionOffered: false,
shippingServices: [
{
additionalShippingCost: {},
buyerResponsibleForPickup: false,
buyerResponsibleForShipping: false,
cashOnDeliveryFee: {},
freeShipping: false,
shipToLocations: {},
shippingCarrierCode: '',
shippingCost: {},
shippingServiceCode: '',
sortOrder: 0,
surcharge: {}
}
]
}
]
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/fulfillment_policy/:fulfillmentPolicyId';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"categoryTypes":[{"default":false,"name":""}],"description":"","freightShipping":false,"globalShipping":false,"handlingTime":{"unit":"","value":0},"localPickup":false,"marketplaceId":"","name":"","pickupDropOff":false,"shipToLocations":{"regionExcluded":[{"regionName":"","regionType":""}],"regionIncluded":[{}]},"shippingOptions":[{"costType":"","insuranceFee":{"currency":"","value":""},"insuranceOffered":false,"optionType":"","packageHandlingCost":{},"rateTableId":"","shippingDiscountProfileId":"","shippingPromotionOffered":false,"shippingServices":[{"additionalShippingCost":{},"buyerResponsibleForPickup":false,"buyerResponsibleForShipping":false,"cashOnDeliveryFee":{},"freeShipping":false,"shipToLocations":{},"shippingCarrierCode":"","shippingCost":{},"shippingServiceCode":"","sortOrder":0,"surcharge":{}}]}]}'
};
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}}/fulfillment_policy/:fulfillmentPolicyId',
method: 'PUT',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "categoryTypes": [\n {\n "default": false,\n "name": ""\n }\n ],\n "description": "",\n "freightShipping": false,\n "globalShipping": false,\n "handlingTime": {\n "unit": "",\n "value": 0\n },\n "localPickup": false,\n "marketplaceId": "",\n "name": "",\n "pickupDropOff": false,\n "shipToLocations": {\n "regionExcluded": [\n {\n "regionName": "",\n "regionType": ""\n }\n ],\n "regionIncluded": [\n {}\n ]\n },\n "shippingOptions": [\n {\n "costType": "",\n "insuranceFee": {\n "currency": "",\n "value": ""\n },\n "insuranceOffered": false,\n "optionType": "",\n "packageHandlingCost": {},\n "rateTableId": "",\n "shippingDiscountProfileId": "",\n "shippingPromotionOffered": false,\n "shippingServices": [\n {\n "additionalShippingCost": {},\n "buyerResponsibleForPickup": false,\n "buyerResponsibleForShipping": false,\n "cashOnDeliveryFee": {},\n "freeShipping": false,\n "shipToLocations": {},\n "shippingCarrierCode": "",\n "shippingCost": {},\n "shippingServiceCode": "",\n "sortOrder": 0,\n "surcharge": {}\n }\n ]\n }\n ]\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"categoryTypes\": [\n {\n \"default\": false,\n \"name\": \"\"\n }\n ],\n \"description\": \"\",\n \"freightShipping\": false,\n \"globalShipping\": false,\n \"handlingTime\": {\n \"unit\": \"\",\n \"value\": 0\n },\n \"localPickup\": false,\n \"marketplaceId\": \"\",\n \"name\": \"\",\n \"pickupDropOff\": false,\n \"shipToLocations\": {\n \"regionExcluded\": [\n {\n \"regionName\": \"\",\n \"regionType\": \"\"\n }\n ],\n \"regionIncluded\": [\n {}\n ]\n },\n \"shippingOptions\": [\n {\n \"costType\": \"\",\n \"insuranceFee\": {\n \"currency\": \"\",\n \"value\": \"\"\n },\n \"insuranceOffered\": false,\n \"optionType\": \"\",\n \"packageHandlingCost\": {},\n \"rateTableId\": \"\",\n \"shippingDiscountProfileId\": \"\",\n \"shippingPromotionOffered\": false,\n \"shippingServices\": [\n {\n \"additionalShippingCost\": {},\n \"buyerResponsibleForPickup\": false,\n \"buyerResponsibleForShipping\": false,\n \"cashOnDeliveryFee\": {},\n \"freeShipping\": false,\n \"shipToLocations\": {},\n \"shippingCarrierCode\": \"\",\n \"shippingCost\": {},\n \"shippingServiceCode\": \"\",\n \"sortOrder\": 0,\n \"surcharge\": {}\n }\n ]\n }\n ]\n}")
val request = Request.Builder()
.url("{{baseUrl}}/fulfillment_policy/:fulfillmentPolicyId")
.put(body)
.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/fulfillment_policy/:fulfillmentPolicyId',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
categoryTypes: [{default: false, name: ''}],
description: '',
freightShipping: false,
globalShipping: false,
handlingTime: {unit: '', value: 0},
localPickup: false,
marketplaceId: '',
name: '',
pickupDropOff: false,
shipToLocations: {regionExcluded: [{regionName: '', regionType: ''}], regionIncluded: [{}]},
shippingOptions: [
{
costType: '',
insuranceFee: {currency: '', value: ''},
insuranceOffered: false,
optionType: '',
packageHandlingCost: {},
rateTableId: '',
shippingDiscountProfileId: '',
shippingPromotionOffered: false,
shippingServices: [
{
additionalShippingCost: {},
buyerResponsibleForPickup: false,
buyerResponsibleForShipping: false,
cashOnDeliveryFee: {},
freeShipping: false,
shipToLocations: {},
shippingCarrierCode: '',
shippingCost: {},
shippingServiceCode: '',
sortOrder: 0,
surcharge: {}
}
]
}
]
}));
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/fulfillment_policy/:fulfillmentPolicyId',
headers: {'content-type': 'application/json'},
body: {
categoryTypes: [{default: false, name: ''}],
description: '',
freightShipping: false,
globalShipping: false,
handlingTime: {unit: '', value: 0},
localPickup: false,
marketplaceId: '',
name: '',
pickupDropOff: false,
shipToLocations: {regionExcluded: [{regionName: '', regionType: ''}], regionIncluded: [{}]},
shippingOptions: [
{
costType: '',
insuranceFee: {currency: '', value: ''},
insuranceOffered: false,
optionType: '',
packageHandlingCost: {},
rateTableId: '',
shippingDiscountProfileId: '',
shippingPromotionOffered: false,
shippingServices: [
{
additionalShippingCost: {},
buyerResponsibleForPickup: false,
buyerResponsibleForShipping: false,
cashOnDeliveryFee: {},
freeShipping: false,
shipToLocations: {},
shippingCarrierCode: '',
shippingCost: {},
shippingServiceCode: '',
sortOrder: 0,
surcharge: {}
}
]
}
]
},
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}}/fulfillment_policy/:fulfillmentPolicyId');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
categoryTypes: [
{
default: false,
name: ''
}
],
description: '',
freightShipping: false,
globalShipping: false,
handlingTime: {
unit: '',
value: 0
},
localPickup: false,
marketplaceId: '',
name: '',
pickupDropOff: false,
shipToLocations: {
regionExcluded: [
{
regionName: '',
regionType: ''
}
],
regionIncluded: [
{}
]
},
shippingOptions: [
{
costType: '',
insuranceFee: {
currency: '',
value: ''
},
insuranceOffered: false,
optionType: '',
packageHandlingCost: {},
rateTableId: '',
shippingDiscountProfileId: '',
shippingPromotionOffered: false,
shippingServices: [
{
additionalShippingCost: {},
buyerResponsibleForPickup: false,
buyerResponsibleForShipping: false,
cashOnDeliveryFee: {},
freeShipping: false,
shipToLocations: {},
shippingCarrierCode: '',
shippingCost: {},
shippingServiceCode: '',
sortOrder: 0,
surcharge: {}
}
]
}
]
});
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}}/fulfillment_policy/:fulfillmentPolicyId',
headers: {'content-type': 'application/json'},
data: {
categoryTypes: [{default: false, name: ''}],
description: '',
freightShipping: false,
globalShipping: false,
handlingTime: {unit: '', value: 0},
localPickup: false,
marketplaceId: '',
name: '',
pickupDropOff: false,
shipToLocations: {regionExcluded: [{regionName: '', regionType: ''}], regionIncluded: [{}]},
shippingOptions: [
{
costType: '',
insuranceFee: {currency: '', value: ''},
insuranceOffered: false,
optionType: '',
packageHandlingCost: {},
rateTableId: '',
shippingDiscountProfileId: '',
shippingPromotionOffered: false,
shippingServices: [
{
additionalShippingCost: {},
buyerResponsibleForPickup: false,
buyerResponsibleForShipping: false,
cashOnDeliveryFee: {},
freeShipping: false,
shipToLocations: {},
shippingCarrierCode: '',
shippingCost: {},
shippingServiceCode: '',
sortOrder: 0,
surcharge: {}
}
]
}
]
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/fulfillment_policy/:fulfillmentPolicyId';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"categoryTypes":[{"default":false,"name":""}],"description":"","freightShipping":false,"globalShipping":false,"handlingTime":{"unit":"","value":0},"localPickup":false,"marketplaceId":"","name":"","pickupDropOff":false,"shipToLocations":{"regionExcluded":[{"regionName":"","regionType":""}],"regionIncluded":[{}]},"shippingOptions":[{"costType":"","insuranceFee":{"currency":"","value":""},"insuranceOffered":false,"optionType":"","packageHandlingCost":{},"rateTableId":"","shippingDiscountProfileId":"","shippingPromotionOffered":false,"shippingServices":[{"additionalShippingCost":{},"buyerResponsibleForPickup":false,"buyerResponsibleForShipping":false,"cashOnDeliveryFee":{},"freeShipping":false,"shipToLocations":{},"shippingCarrierCode":"","shippingCost":{},"shippingServiceCode":"","sortOrder":0,"surcharge":{}}]}]}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"categoryTypes": @[ @{ @"default": @NO, @"name": @"" } ],
@"description": @"",
@"freightShipping": @NO,
@"globalShipping": @NO,
@"handlingTime": @{ @"unit": @"", @"value": @0 },
@"localPickup": @NO,
@"marketplaceId": @"",
@"name": @"",
@"pickupDropOff": @NO,
@"shipToLocations": @{ @"regionExcluded": @[ @{ @"regionName": @"", @"regionType": @"" } ], @"regionIncluded": @[ @{ } ] },
@"shippingOptions": @[ @{ @"costType": @"", @"insuranceFee": @{ @"currency": @"", @"value": @"" }, @"insuranceOffered": @NO, @"optionType": @"", @"packageHandlingCost": @{ }, @"rateTableId": @"", @"shippingDiscountProfileId": @"", @"shippingPromotionOffered": @NO, @"shippingServices": @[ @{ @"additionalShippingCost": @{ }, @"buyerResponsibleForPickup": @NO, @"buyerResponsibleForShipping": @NO, @"cashOnDeliveryFee": @{ }, @"freeShipping": @NO, @"shipToLocations": @{ }, @"shippingCarrierCode": @"", @"shippingCost": @{ }, @"shippingServiceCode": @"", @"sortOrder": @0, @"surcharge": @{ } } ] } ] };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/fulfillment_policy/:fulfillmentPolicyId"]
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}}/fulfillment_policy/:fulfillmentPolicyId" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"categoryTypes\": [\n {\n \"default\": false,\n \"name\": \"\"\n }\n ],\n \"description\": \"\",\n \"freightShipping\": false,\n \"globalShipping\": false,\n \"handlingTime\": {\n \"unit\": \"\",\n \"value\": 0\n },\n \"localPickup\": false,\n \"marketplaceId\": \"\",\n \"name\": \"\",\n \"pickupDropOff\": false,\n \"shipToLocations\": {\n \"regionExcluded\": [\n {\n \"regionName\": \"\",\n \"regionType\": \"\"\n }\n ],\n \"regionIncluded\": [\n {}\n ]\n },\n \"shippingOptions\": [\n {\n \"costType\": \"\",\n \"insuranceFee\": {\n \"currency\": \"\",\n \"value\": \"\"\n },\n \"insuranceOffered\": false,\n \"optionType\": \"\",\n \"packageHandlingCost\": {},\n \"rateTableId\": \"\",\n \"shippingDiscountProfileId\": \"\",\n \"shippingPromotionOffered\": false,\n \"shippingServices\": [\n {\n \"additionalShippingCost\": {},\n \"buyerResponsibleForPickup\": false,\n \"buyerResponsibleForShipping\": false,\n \"cashOnDeliveryFee\": {},\n \"freeShipping\": false,\n \"shipToLocations\": {},\n \"shippingCarrierCode\": \"\",\n \"shippingCost\": {},\n \"shippingServiceCode\": \"\",\n \"sortOrder\": 0,\n \"surcharge\": {}\n }\n ]\n }\n ]\n}" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/fulfillment_policy/:fulfillmentPolicyId",
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([
'categoryTypes' => [
[
'default' => null,
'name' => ''
]
],
'description' => '',
'freightShipping' => null,
'globalShipping' => null,
'handlingTime' => [
'unit' => '',
'value' => 0
],
'localPickup' => null,
'marketplaceId' => '',
'name' => '',
'pickupDropOff' => null,
'shipToLocations' => [
'regionExcluded' => [
[
'regionName' => '',
'regionType' => ''
]
],
'regionIncluded' => [
[
]
]
],
'shippingOptions' => [
[
'costType' => '',
'insuranceFee' => [
'currency' => '',
'value' => ''
],
'insuranceOffered' => null,
'optionType' => '',
'packageHandlingCost' => [
],
'rateTableId' => '',
'shippingDiscountProfileId' => '',
'shippingPromotionOffered' => null,
'shippingServices' => [
[
'additionalShippingCost' => [
],
'buyerResponsibleForPickup' => null,
'buyerResponsibleForShipping' => null,
'cashOnDeliveryFee' => [
],
'freeShipping' => null,
'shipToLocations' => [
],
'shippingCarrierCode' => '',
'shippingCost' => [
],
'shippingServiceCode' => '',
'sortOrder' => 0,
'surcharge' => [
]
]
]
]
]
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('PUT', '{{baseUrl}}/fulfillment_policy/:fulfillmentPolicyId', [
'body' => '{
"categoryTypes": [
{
"default": false,
"name": ""
}
],
"description": "",
"freightShipping": false,
"globalShipping": false,
"handlingTime": {
"unit": "",
"value": 0
},
"localPickup": false,
"marketplaceId": "",
"name": "",
"pickupDropOff": false,
"shipToLocations": {
"regionExcluded": [
{
"regionName": "",
"regionType": ""
}
],
"regionIncluded": [
{}
]
},
"shippingOptions": [
{
"costType": "",
"insuranceFee": {
"currency": "",
"value": ""
},
"insuranceOffered": false,
"optionType": "",
"packageHandlingCost": {},
"rateTableId": "",
"shippingDiscountProfileId": "",
"shippingPromotionOffered": false,
"shippingServices": [
{
"additionalShippingCost": {},
"buyerResponsibleForPickup": false,
"buyerResponsibleForShipping": false,
"cashOnDeliveryFee": {},
"freeShipping": false,
"shipToLocations": {},
"shippingCarrierCode": "",
"shippingCost": {},
"shippingServiceCode": "",
"sortOrder": 0,
"surcharge": {}
}
]
}
]
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/fulfillment_policy/:fulfillmentPolicyId');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'categoryTypes' => [
[
'default' => null,
'name' => ''
]
],
'description' => '',
'freightShipping' => null,
'globalShipping' => null,
'handlingTime' => [
'unit' => '',
'value' => 0
],
'localPickup' => null,
'marketplaceId' => '',
'name' => '',
'pickupDropOff' => null,
'shipToLocations' => [
'regionExcluded' => [
[
'regionName' => '',
'regionType' => ''
]
],
'regionIncluded' => [
[
]
]
],
'shippingOptions' => [
[
'costType' => '',
'insuranceFee' => [
'currency' => '',
'value' => ''
],
'insuranceOffered' => null,
'optionType' => '',
'packageHandlingCost' => [
],
'rateTableId' => '',
'shippingDiscountProfileId' => '',
'shippingPromotionOffered' => null,
'shippingServices' => [
[
'additionalShippingCost' => [
],
'buyerResponsibleForPickup' => null,
'buyerResponsibleForShipping' => null,
'cashOnDeliveryFee' => [
],
'freeShipping' => null,
'shipToLocations' => [
],
'shippingCarrierCode' => '',
'shippingCost' => [
],
'shippingServiceCode' => '',
'sortOrder' => 0,
'surcharge' => [
]
]
]
]
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'categoryTypes' => [
[
'default' => null,
'name' => ''
]
],
'description' => '',
'freightShipping' => null,
'globalShipping' => null,
'handlingTime' => [
'unit' => '',
'value' => 0
],
'localPickup' => null,
'marketplaceId' => '',
'name' => '',
'pickupDropOff' => null,
'shipToLocations' => [
'regionExcluded' => [
[
'regionName' => '',
'regionType' => ''
]
],
'regionIncluded' => [
[
]
]
],
'shippingOptions' => [
[
'costType' => '',
'insuranceFee' => [
'currency' => '',
'value' => ''
],
'insuranceOffered' => null,
'optionType' => '',
'packageHandlingCost' => [
],
'rateTableId' => '',
'shippingDiscountProfileId' => '',
'shippingPromotionOffered' => null,
'shippingServices' => [
[
'additionalShippingCost' => [
],
'buyerResponsibleForPickup' => null,
'buyerResponsibleForShipping' => null,
'cashOnDeliveryFee' => [
],
'freeShipping' => null,
'shipToLocations' => [
],
'shippingCarrierCode' => '',
'shippingCost' => [
],
'shippingServiceCode' => '',
'sortOrder' => 0,
'surcharge' => [
]
]
]
]
]
]));
$request->setRequestUrl('{{baseUrl}}/fulfillment_policy/:fulfillmentPolicyId');
$request->setRequestMethod('PUT');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/fulfillment_policy/:fulfillmentPolicyId' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"categoryTypes": [
{
"default": false,
"name": ""
}
],
"description": "",
"freightShipping": false,
"globalShipping": false,
"handlingTime": {
"unit": "",
"value": 0
},
"localPickup": false,
"marketplaceId": "",
"name": "",
"pickupDropOff": false,
"shipToLocations": {
"regionExcluded": [
{
"regionName": "",
"regionType": ""
}
],
"regionIncluded": [
{}
]
},
"shippingOptions": [
{
"costType": "",
"insuranceFee": {
"currency": "",
"value": ""
},
"insuranceOffered": false,
"optionType": "",
"packageHandlingCost": {},
"rateTableId": "",
"shippingDiscountProfileId": "",
"shippingPromotionOffered": false,
"shippingServices": [
{
"additionalShippingCost": {},
"buyerResponsibleForPickup": false,
"buyerResponsibleForShipping": false,
"cashOnDeliveryFee": {},
"freeShipping": false,
"shipToLocations": {},
"shippingCarrierCode": "",
"shippingCost": {},
"shippingServiceCode": "",
"sortOrder": 0,
"surcharge": {}
}
]
}
]
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/fulfillment_policy/:fulfillmentPolicyId' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"categoryTypes": [
{
"default": false,
"name": ""
}
],
"description": "",
"freightShipping": false,
"globalShipping": false,
"handlingTime": {
"unit": "",
"value": 0
},
"localPickup": false,
"marketplaceId": "",
"name": "",
"pickupDropOff": false,
"shipToLocations": {
"regionExcluded": [
{
"regionName": "",
"regionType": ""
}
],
"regionIncluded": [
{}
]
},
"shippingOptions": [
{
"costType": "",
"insuranceFee": {
"currency": "",
"value": ""
},
"insuranceOffered": false,
"optionType": "",
"packageHandlingCost": {},
"rateTableId": "",
"shippingDiscountProfileId": "",
"shippingPromotionOffered": false,
"shippingServices": [
{
"additionalShippingCost": {},
"buyerResponsibleForPickup": false,
"buyerResponsibleForShipping": false,
"cashOnDeliveryFee": {},
"freeShipping": false,
"shipToLocations": {},
"shippingCarrierCode": "",
"shippingCost": {},
"shippingServiceCode": "",
"sortOrder": 0,
"surcharge": {}
}
]
}
]
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"categoryTypes\": [\n {\n \"default\": false,\n \"name\": \"\"\n }\n ],\n \"description\": \"\",\n \"freightShipping\": false,\n \"globalShipping\": false,\n \"handlingTime\": {\n \"unit\": \"\",\n \"value\": 0\n },\n \"localPickup\": false,\n \"marketplaceId\": \"\",\n \"name\": \"\",\n \"pickupDropOff\": false,\n \"shipToLocations\": {\n \"regionExcluded\": [\n {\n \"regionName\": \"\",\n \"regionType\": \"\"\n }\n ],\n \"regionIncluded\": [\n {}\n ]\n },\n \"shippingOptions\": [\n {\n \"costType\": \"\",\n \"insuranceFee\": {\n \"currency\": \"\",\n \"value\": \"\"\n },\n \"insuranceOffered\": false,\n \"optionType\": \"\",\n \"packageHandlingCost\": {},\n \"rateTableId\": \"\",\n \"shippingDiscountProfileId\": \"\",\n \"shippingPromotionOffered\": false,\n \"shippingServices\": [\n {\n \"additionalShippingCost\": {},\n \"buyerResponsibleForPickup\": false,\n \"buyerResponsibleForShipping\": false,\n \"cashOnDeliveryFee\": {},\n \"freeShipping\": false,\n \"shipToLocations\": {},\n \"shippingCarrierCode\": \"\",\n \"shippingCost\": {},\n \"shippingServiceCode\": \"\",\n \"sortOrder\": 0,\n \"surcharge\": {}\n }\n ]\n }\n ]\n}"
headers = { 'content-type': "application/json" }
conn.request("PUT", "/baseUrl/fulfillment_policy/:fulfillmentPolicyId", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/fulfillment_policy/:fulfillmentPolicyId"
payload = {
"categoryTypes": [
{
"default": False,
"name": ""
}
],
"description": "",
"freightShipping": False,
"globalShipping": False,
"handlingTime": {
"unit": "",
"value": 0
},
"localPickup": False,
"marketplaceId": "",
"name": "",
"pickupDropOff": False,
"shipToLocations": {
"regionExcluded": [
{
"regionName": "",
"regionType": ""
}
],
"regionIncluded": [{}]
},
"shippingOptions": [
{
"costType": "",
"insuranceFee": {
"currency": "",
"value": ""
},
"insuranceOffered": False,
"optionType": "",
"packageHandlingCost": {},
"rateTableId": "",
"shippingDiscountProfileId": "",
"shippingPromotionOffered": False,
"shippingServices": [
{
"additionalShippingCost": {},
"buyerResponsibleForPickup": False,
"buyerResponsibleForShipping": False,
"cashOnDeliveryFee": {},
"freeShipping": False,
"shipToLocations": {},
"shippingCarrierCode": "",
"shippingCost": {},
"shippingServiceCode": "",
"sortOrder": 0,
"surcharge": {}
}
]
}
]
}
headers = {"content-type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/fulfillment_policy/:fulfillmentPolicyId"
payload <- "{\n \"categoryTypes\": [\n {\n \"default\": false,\n \"name\": \"\"\n }\n ],\n \"description\": \"\",\n \"freightShipping\": false,\n \"globalShipping\": false,\n \"handlingTime\": {\n \"unit\": \"\",\n \"value\": 0\n },\n \"localPickup\": false,\n \"marketplaceId\": \"\",\n \"name\": \"\",\n \"pickupDropOff\": false,\n \"shipToLocations\": {\n \"regionExcluded\": [\n {\n \"regionName\": \"\",\n \"regionType\": \"\"\n }\n ],\n \"regionIncluded\": [\n {}\n ]\n },\n \"shippingOptions\": [\n {\n \"costType\": \"\",\n \"insuranceFee\": {\n \"currency\": \"\",\n \"value\": \"\"\n },\n \"insuranceOffered\": false,\n \"optionType\": \"\",\n \"packageHandlingCost\": {},\n \"rateTableId\": \"\",\n \"shippingDiscountProfileId\": \"\",\n \"shippingPromotionOffered\": false,\n \"shippingServices\": [\n {\n \"additionalShippingCost\": {},\n \"buyerResponsibleForPickup\": false,\n \"buyerResponsibleForShipping\": false,\n \"cashOnDeliveryFee\": {},\n \"freeShipping\": false,\n \"shipToLocations\": {},\n \"shippingCarrierCode\": \"\",\n \"shippingCost\": {},\n \"shippingServiceCode\": \"\",\n \"sortOrder\": 0,\n \"surcharge\": {}\n }\n ]\n }\n ]\n}"
encode <- "json"
response <- VERB("PUT", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/fulfillment_policy/:fulfillmentPolicyId")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"categoryTypes\": [\n {\n \"default\": false,\n \"name\": \"\"\n }\n ],\n \"description\": \"\",\n \"freightShipping\": false,\n \"globalShipping\": false,\n \"handlingTime\": {\n \"unit\": \"\",\n \"value\": 0\n },\n \"localPickup\": false,\n \"marketplaceId\": \"\",\n \"name\": \"\",\n \"pickupDropOff\": false,\n \"shipToLocations\": {\n \"regionExcluded\": [\n {\n \"regionName\": \"\",\n \"regionType\": \"\"\n }\n ],\n \"regionIncluded\": [\n {}\n ]\n },\n \"shippingOptions\": [\n {\n \"costType\": \"\",\n \"insuranceFee\": {\n \"currency\": \"\",\n \"value\": \"\"\n },\n \"insuranceOffered\": false,\n \"optionType\": \"\",\n \"packageHandlingCost\": {},\n \"rateTableId\": \"\",\n \"shippingDiscountProfileId\": \"\",\n \"shippingPromotionOffered\": false,\n \"shippingServices\": [\n {\n \"additionalShippingCost\": {},\n \"buyerResponsibleForPickup\": false,\n \"buyerResponsibleForShipping\": false,\n \"cashOnDeliveryFee\": {},\n \"freeShipping\": false,\n \"shipToLocations\": {},\n \"shippingCarrierCode\": \"\",\n \"shippingCost\": {},\n \"shippingServiceCode\": \"\",\n \"sortOrder\": 0,\n \"surcharge\": {}\n }\n ]\n }\n ]\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.put('/baseUrl/fulfillment_policy/:fulfillmentPolicyId') do |req|
req.body = "{\n \"categoryTypes\": [\n {\n \"default\": false,\n \"name\": \"\"\n }\n ],\n \"description\": \"\",\n \"freightShipping\": false,\n \"globalShipping\": false,\n \"handlingTime\": {\n \"unit\": \"\",\n \"value\": 0\n },\n \"localPickup\": false,\n \"marketplaceId\": \"\",\n \"name\": \"\",\n \"pickupDropOff\": false,\n \"shipToLocations\": {\n \"regionExcluded\": [\n {\n \"regionName\": \"\",\n \"regionType\": \"\"\n }\n ],\n \"regionIncluded\": [\n {}\n ]\n },\n \"shippingOptions\": [\n {\n \"costType\": \"\",\n \"insuranceFee\": {\n \"currency\": \"\",\n \"value\": \"\"\n },\n \"insuranceOffered\": false,\n \"optionType\": \"\",\n \"packageHandlingCost\": {},\n \"rateTableId\": \"\",\n \"shippingDiscountProfileId\": \"\",\n \"shippingPromotionOffered\": false,\n \"shippingServices\": [\n {\n \"additionalShippingCost\": {},\n \"buyerResponsibleForPickup\": false,\n \"buyerResponsibleForShipping\": false,\n \"cashOnDeliveryFee\": {},\n \"freeShipping\": false,\n \"shipToLocations\": {},\n \"shippingCarrierCode\": \"\",\n \"shippingCost\": {},\n \"shippingServiceCode\": \"\",\n \"sortOrder\": 0,\n \"surcharge\": {}\n }\n ]\n }\n ]\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}}/fulfillment_policy/:fulfillmentPolicyId";
let payload = json!({
"categoryTypes": (
json!({
"default": false,
"name": ""
})
),
"description": "",
"freightShipping": false,
"globalShipping": false,
"handlingTime": json!({
"unit": "",
"value": 0
}),
"localPickup": false,
"marketplaceId": "",
"name": "",
"pickupDropOff": false,
"shipToLocations": json!({
"regionExcluded": (
json!({
"regionName": "",
"regionType": ""
})
),
"regionIncluded": (json!({}))
}),
"shippingOptions": (
json!({
"costType": "",
"insuranceFee": json!({
"currency": "",
"value": ""
}),
"insuranceOffered": false,
"optionType": "",
"packageHandlingCost": json!({}),
"rateTableId": "",
"shippingDiscountProfileId": "",
"shippingPromotionOffered": false,
"shippingServices": (
json!({
"additionalShippingCost": json!({}),
"buyerResponsibleForPickup": false,
"buyerResponsibleForShipping": false,
"cashOnDeliveryFee": json!({}),
"freeShipping": false,
"shipToLocations": json!({}),
"shippingCarrierCode": "",
"shippingCost": json!({}),
"shippingServiceCode": "",
"sortOrder": 0,
"surcharge": json!({})
})
)
})
)
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PUT").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/fulfillment_policy/:fulfillmentPolicyId \
--header 'content-type: application/json' \
--data '{
"categoryTypes": [
{
"default": false,
"name": ""
}
],
"description": "",
"freightShipping": false,
"globalShipping": false,
"handlingTime": {
"unit": "",
"value": 0
},
"localPickup": false,
"marketplaceId": "",
"name": "",
"pickupDropOff": false,
"shipToLocations": {
"regionExcluded": [
{
"regionName": "",
"regionType": ""
}
],
"regionIncluded": [
{}
]
},
"shippingOptions": [
{
"costType": "",
"insuranceFee": {
"currency": "",
"value": ""
},
"insuranceOffered": false,
"optionType": "",
"packageHandlingCost": {},
"rateTableId": "",
"shippingDiscountProfileId": "",
"shippingPromotionOffered": false,
"shippingServices": [
{
"additionalShippingCost": {},
"buyerResponsibleForPickup": false,
"buyerResponsibleForShipping": false,
"cashOnDeliveryFee": {},
"freeShipping": false,
"shipToLocations": {},
"shippingCarrierCode": "",
"shippingCost": {},
"shippingServiceCode": "",
"sortOrder": 0,
"surcharge": {}
}
]
}
]
}'
echo '{
"categoryTypes": [
{
"default": false,
"name": ""
}
],
"description": "",
"freightShipping": false,
"globalShipping": false,
"handlingTime": {
"unit": "",
"value": 0
},
"localPickup": false,
"marketplaceId": "",
"name": "",
"pickupDropOff": false,
"shipToLocations": {
"regionExcluded": [
{
"regionName": "",
"regionType": ""
}
],
"regionIncluded": [
{}
]
},
"shippingOptions": [
{
"costType": "",
"insuranceFee": {
"currency": "",
"value": ""
},
"insuranceOffered": false,
"optionType": "",
"packageHandlingCost": {},
"rateTableId": "",
"shippingDiscountProfileId": "",
"shippingPromotionOffered": false,
"shippingServices": [
{
"additionalShippingCost": {},
"buyerResponsibleForPickup": false,
"buyerResponsibleForShipping": false,
"cashOnDeliveryFee": {},
"freeShipping": false,
"shipToLocations": {},
"shippingCarrierCode": "",
"shippingCost": {},
"shippingServiceCode": "",
"sortOrder": 0,
"surcharge": {}
}
]
}
]
}' | \
http PUT {{baseUrl}}/fulfillment_policy/:fulfillmentPolicyId \
content-type:application/json
wget --quiet \
--method PUT \
--header 'content-type: application/json' \
--body-data '{\n "categoryTypes": [\n {\n "default": false,\n "name": ""\n }\n ],\n "description": "",\n "freightShipping": false,\n "globalShipping": false,\n "handlingTime": {\n "unit": "",\n "value": 0\n },\n "localPickup": false,\n "marketplaceId": "",\n "name": "",\n "pickupDropOff": false,\n "shipToLocations": {\n "regionExcluded": [\n {\n "regionName": "",\n "regionType": ""\n }\n ],\n "regionIncluded": [\n {}\n ]\n },\n "shippingOptions": [\n {\n "costType": "",\n "insuranceFee": {\n "currency": "",\n "value": ""\n },\n "insuranceOffered": false,\n "optionType": "",\n "packageHandlingCost": {},\n "rateTableId": "",\n "shippingDiscountProfileId": "",\n "shippingPromotionOffered": false,\n "shippingServices": [\n {\n "additionalShippingCost": {},\n "buyerResponsibleForPickup": false,\n "buyerResponsibleForShipping": false,\n "cashOnDeliveryFee": {},\n "freeShipping": false,\n "shipToLocations": {},\n "shippingCarrierCode": "",\n "shippingCost": {},\n "shippingServiceCode": "",\n "sortOrder": 0,\n "surcharge": {}\n }\n ]\n }\n ]\n}' \
--output-document \
- {{baseUrl}}/fulfillment_policy/:fulfillmentPolicyId
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"categoryTypes": [
[
"default": false,
"name": ""
]
],
"description": "",
"freightShipping": false,
"globalShipping": false,
"handlingTime": [
"unit": "",
"value": 0
],
"localPickup": false,
"marketplaceId": "",
"name": "",
"pickupDropOff": false,
"shipToLocations": [
"regionExcluded": [
[
"regionName": "",
"regionType": ""
]
],
"regionIncluded": [[]]
],
"shippingOptions": [
[
"costType": "",
"insuranceFee": [
"currency": "",
"value": ""
],
"insuranceOffered": false,
"optionType": "",
"packageHandlingCost": [],
"rateTableId": "",
"shippingDiscountProfileId": "",
"shippingPromotionOffered": false,
"shippingServices": [
[
"additionalShippingCost": [],
"buyerResponsibleForPickup": false,
"buyerResponsibleForShipping": false,
"cashOnDeliveryFee": [],
"freeShipping": false,
"shipToLocations": [],
"shippingCarrierCode": "",
"shippingCost": [],
"shippingServiceCode": "",
"sortOrder": 0,
"surcharge": []
]
]
]
]
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/fulfillment_policy/:fulfillmentPolicyId")! 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()
GET
getKYC
{{baseUrl}}/kyc
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/kyc");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/kyc")
require "http/client"
url = "{{baseUrl}}/kyc"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/kyc"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/kyc");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/kyc"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/kyc HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/kyc")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/kyc"))
.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}}/kyc")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/kyc")
.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}}/kyc');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/kyc'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/kyc';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/kyc',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/kyc")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/kyc',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {method: 'GET', url: '{{baseUrl}}/kyc'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/kyc');
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}}/kyc'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/kyc';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/kyc"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/kyc" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/kyc",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/kyc');
echo $response->getBody();
setUrl('{{baseUrl}}/kyc');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/kyc');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/kyc' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/kyc' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/kyc")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/kyc"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/kyc"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/kyc")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/kyc') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/kyc";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/kyc
http GET {{baseUrl}}/kyc
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/kyc
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/kyc")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
getPaymentsProgramOnboarding
{{baseUrl}}/payments_program/:marketplace_id/:payments_program_type/onboarding
QUERY PARAMS
marketplace_id
payments_program_type
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/payments_program/:marketplace_id/:payments_program_type/onboarding");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/payments_program/:marketplace_id/:payments_program_type/onboarding")
require "http/client"
url = "{{baseUrl}}/payments_program/:marketplace_id/:payments_program_type/onboarding"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/payments_program/:marketplace_id/:payments_program_type/onboarding"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/payments_program/:marketplace_id/:payments_program_type/onboarding");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/payments_program/:marketplace_id/:payments_program_type/onboarding"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/payments_program/:marketplace_id/:payments_program_type/onboarding HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/payments_program/:marketplace_id/:payments_program_type/onboarding")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/payments_program/:marketplace_id/:payments_program_type/onboarding"))
.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}}/payments_program/:marketplace_id/:payments_program_type/onboarding")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/payments_program/:marketplace_id/:payments_program_type/onboarding")
.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}}/payments_program/:marketplace_id/:payments_program_type/onboarding');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/payments_program/:marketplace_id/:payments_program_type/onboarding'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/payments_program/:marketplace_id/:payments_program_type/onboarding';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/payments_program/:marketplace_id/:payments_program_type/onboarding',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/payments_program/:marketplace_id/:payments_program_type/onboarding")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/payments_program/:marketplace_id/:payments_program_type/onboarding',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'GET',
url: '{{baseUrl}}/payments_program/:marketplace_id/:payments_program_type/onboarding'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/payments_program/:marketplace_id/:payments_program_type/onboarding');
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}}/payments_program/:marketplace_id/:payments_program_type/onboarding'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/payments_program/:marketplace_id/:payments_program_type/onboarding';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/payments_program/:marketplace_id/:payments_program_type/onboarding"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/payments_program/:marketplace_id/:payments_program_type/onboarding" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/payments_program/:marketplace_id/:payments_program_type/onboarding",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/payments_program/:marketplace_id/:payments_program_type/onboarding');
echo $response->getBody();
setUrl('{{baseUrl}}/payments_program/:marketplace_id/:payments_program_type/onboarding');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/payments_program/:marketplace_id/:payments_program_type/onboarding');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/payments_program/:marketplace_id/:payments_program_type/onboarding' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/payments_program/:marketplace_id/:payments_program_type/onboarding' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/payments_program/:marketplace_id/:payments_program_type/onboarding")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/payments_program/:marketplace_id/:payments_program_type/onboarding"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/payments_program/:marketplace_id/:payments_program_type/onboarding"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/payments_program/:marketplace_id/:payments_program_type/onboarding")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/payments_program/:marketplace_id/:payments_program_type/onboarding') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/payments_program/:marketplace_id/:payments_program_type/onboarding";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/payments_program/:marketplace_id/:payments_program_type/onboarding
http GET {{baseUrl}}/payments_program/:marketplace_id/:payments_program_type/onboarding
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/payments_program/:marketplace_id/:payments_program_type/onboarding
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/payments_program/:marketplace_id/:payments_program_type/onboarding")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
createPaymentPolicy
{{baseUrl}}/payment_policy
BODY json
{
"categoryTypes": [
{
"default": false,
"name": ""
}
],
"deposit": {
"amount": {
"currency": "",
"value": ""
},
"dueIn": {
"unit": "",
"value": 0
},
"paymentMethods": [
{
"brands": [],
"paymentMethodType": "",
"recipientAccountReference": {
"referenceId": "",
"referenceType": ""
}
}
]
},
"description": "",
"fullPaymentDueIn": {},
"immediatePay": false,
"marketplaceId": "",
"name": "",
"paymentInstructions": "",
"paymentMethods": [
{}
]
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/payment_policy");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"categoryTypes\": [\n {\n \"default\": false,\n \"name\": \"\"\n }\n ],\n \"deposit\": {\n \"amount\": {\n \"currency\": \"\",\n \"value\": \"\"\n },\n \"dueIn\": {\n \"unit\": \"\",\n \"value\": 0\n },\n \"paymentMethods\": [\n {\n \"brands\": [],\n \"paymentMethodType\": \"\",\n \"recipientAccountReference\": {\n \"referenceId\": \"\",\n \"referenceType\": \"\"\n }\n }\n ]\n },\n \"description\": \"\",\n \"fullPaymentDueIn\": {},\n \"immediatePay\": false,\n \"marketplaceId\": \"\",\n \"name\": \"\",\n \"paymentInstructions\": \"\",\n \"paymentMethods\": [\n {}\n ]\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/payment_policy" {:content-type :json
:form-params {:categoryTypes [{:default false
:name ""}]
:deposit {:amount {:currency ""
:value ""}
:dueIn {:unit ""
:value 0}
:paymentMethods [{:brands []
:paymentMethodType ""
:recipientAccountReference {:referenceId ""
:referenceType ""}}]}
:description ""
:fullPaymentDueIn {}
:immediatePay false
:marketplaceId ""
:name ""
:paymentInstructions ""
:paymentMethods [{}]}})
require "http/client"
url = "{{baseUrl}}/payment_policy"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"categoryTypes\": [\n {\n \"default\": false,\n \"name\": \"\"\n }\n ],\n \"deposit\": {\n \"amount\": {\n \"currency\": \"\",\n \"value\": \"\"\n },\n \"dueIn\": {\n \"unit\": \"\",\n \"value\": 0\n },\n \"paymentMethods\": [\n {\n \"brands\": [],\n \"paymentMethodType\": \"\",\n \"recipientAccountReference\": {\n \"referenceId\": \"\",\n \"referenceType\": \"\"\n }\n }\n ]\n },\n \"description\": \"\",\n \"fullPaymentDueIn\": {},\n \"immediatePay\": false,\n \"marketplaceId\": \"\",\n \"name\": \"\",\n \"paymentInstructions\": \"\",\n \"paymentMethods\": [\n {}\n ]\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/payment_policy"),
Content = new StringContent("{\n \"categoryTypes\": [\n {\n \"default\": false,\n \"name\": \"\"\n }\n ],\n \"deposit\": {\n \"amount\": {\n \"currency\": \"\",\n \"value\": \"\"\n },\n \"dueIn\": {\n \"unit\": \"\",\n \"value\": 0\n },\n \"paymentMethods\": [\n {\n \"brands\": [],\n \"paymentMethodType\": \"\",\n \"recipientAccountReference\": {\n \"referenceId\": \"\",\n \"referenceType\": \"\"\n }\n }\n ]\n },\n \"description\": \"\",\n \"fullPaymentDueIn\": {},\n \"immediatePay\": false,\n \"marketplaceId\": \"\",\n \"name\": \"\",\n \"paymentInstructions\": \"\",\n \"paymentMethods\": [\n {}\n ]\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/payment_policy");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"categoryTypes\": [\n {\n \"default\": false,\n \"name\": \"\"\n }\n ],\n \"deposit\": {\n \"amount\": {\n \"currency\": \"\",\n \"value\": \"\"\n },\n \"dueIn\": {\n \"unit\": \"\",\n \"value\": 0\n },\n \"paymentMethods\": [\n {\n \"brands\": [],\n \"paymentMethodType\": \"\",\n \"recipientAccountReference\": {\n \"referenceId\": \"\",\n \"referenceType\": \"\"\n }\n }\n ]\n },\n \"description\": \"\",\n \"fullPaymentDueIn\": {},\n \"immediatePay\": false,\n \"marketplaceId\": \"\",\n \"name\": \"\",\n \"paymentInstructions\": \"\",\n \"paymentMethods\": [\n {}\n ]\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/payment_policy"
payload := strings.NewReader("{\n \"categoryTypes\": [\n {\n \"default\": false,\n \"name\": \"\"\n }\n ],\n \"deposit\": {\n \"amount\": {\n \"currency\": \"\",\n \"value\": \"\"\n },\n \"dueIn\": {\n \"unit\": \"\",\n \"value\": 0\n },\n \"paymentMethods\": [\n {\n \"brands\": [],\n \"paymentMethodType\": \"\",\n \"recipientAccountReference\": {\n \"referenceId\": \"\",\n \"referenceType\": \"\"\n }\n }\n ]\n },\n \"description\": \"\",\n \"fullPaymentDueIn\": {},\n \"immediatePay\": false,\n \"marketplaceId\": \"\",\n \"name\": \"\",\n \"paymentInstructions\": \"\",\n \"paymentMethods\": [\n {}\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/payment_policy HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 602
{
"categoryTypes": [
{
"default": false,
"name": ""
}
],
"deposit": {
"amount": {
"currency": "",
"value": ""
},
"dueIn": {
"unit": "",
"value": 0
},
"paymentMethods": [
{
"brands": [],
"paymentMethodType": "",
"recipientAccountReference": {
"referenceId": "",
"referenceType": ""
}
}
]
},
"description": "",
"fullPaymentDueIn": {},
"immediatePay": false,
"marketplaceId": "",
"name": "",
"paymentInstructions": "",
"paymentMethods": [
{}
]
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/payment_policy")
.setHeader("content-type", "application/json")
.setBody("{\n \"categoryTypes\": [\n {\n \"default\": false,\n \"name\": \"\"\n }\n ],\n \"deposit\": {\n \"amount\": {\n \"currency\": \"\",\n \"value\": \"\"\n },\n \"dueIn\": {\n \"unit\": \"\",\n \"value\": 0\n },\n \"paymentMethods\": [\n {\n \"brands\": [],\n \"paymentMethodType\": \"\",\n \"recipientAccountReference\": {\n \"referenceId\": \"\",\n \"referenceType\": \"\"\n }\n }\n ]\n },\n \"description\": \"\",\n \"fullPaymentDueIn\": {},\n \"immediatePay\": false,\n \"marketplaceId\": \"\",\n \"name\": \"\",\n \"paymentInstructions\": \"\",\n \"paymentMethods\": [\n {}\n ]\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/payment_policy"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"categoryTypes\": [\n {\n \"default\": false,\n \"name\": \"\"\n }\n ],\n \"deposit\": {\n \"amount\": {\n \"currency\": \"\",\n \"value\": \"\"\n },\n \"dueIn\": {\n \"unit\": \"\",\n \"value\": 0\n },\n \"paymentMethods\": [\n {\n \"brands\": [],\n \"paymentMethodType\": \"\",\n \"recipientAccountReference\": {\n \"referenceId\": \"\",\n \"referenceType\": \"\"\n }\n }\n ]\n },\n \"description\": \"\",\n \"fullPaymentDueIn\": {},\n \"immediatePay\": false,\n \"marketplaceId\": \"\",\n \"name\": \"\",\n \"paymentInstructions\": \"\",\n \"paymentMethods\": [\n {}\n ]\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"categoryTypes\": [\n {\n \"default\": false,\n \"name\": \"\"\n }\n ],\n \"deposit\": {\n \"amount\": {\n \"currency\": \"\",\n \"value\": \"\"\n },\n \"dueIn\": {\n \"unit\": \"\",\n \"value\": 0\n },\n \"paymentMethods\": [\n {\n \"brands\": [],\n \"paymentMethodType\": \"\",\n \"recipientAccountReference\": {\n \"referenceId\": \"\",\n \"referenceType\": \"\"\n }\n }\n ]\n },\n \"description\": \"\",\n \"fullPaymentDueIn\": {},\n \"immediatePay\": false,\n \"marketplaceId\": \"\",\n \"name\": \"\",\n \"paymentInstructions\": \"\",\n \"paymentMethods\": [\n {}\n ]\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/payment_policy")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/payment_policy")
.header("content-type", "application/json")
.body("{\n \"categoryTypes\": [\n {\n \"default\": false,\n \"name\": \"\"\n }\n ],\n \"deposit\": {\n \"amount\": {\n \"currency\": \"\",\n \"value\": \"\"\n },\n \"dueIn\": {\n \"unit\": \"\",\n \"value\": 0\n },\n \"paymentMethods\": [\n {\n \"brands\": [],\n \"paymentMethodType\": \"\",\n \"recipientAccountReference\": {\n \"referenceId\": \"\",\n \"referenceType\": \"\"\n }\n }\n ]\n },\n \"description\": \"\",\n \"fullPaymentDueIn\": {},\n \"immediatePay\": false,\n \"marketplaceId\": \"\",\n \"name\": \"\",\n \"paymentInstructions\": \"\",\n \"paymentMethods\": [\n {}\n ]\n}")
.asString();
const data = JSON.stringify({
categoryTypes: [
{
default: false,
name: ''
}
],
deposit: {
amount: {
currency: '',
value: ''
},
dueIn: {
unit: '',
value: 0
},
paymentMethods: [
{
brands: [],
paymentMethodType: '',
recipientAccountReference: {
referenceId: '',
referenceType: ''
}
}
]
},
description: '',
fullPaymentDueIn: {},
immediatePay: false,
marketplaceId: '',
name: '',
paymentInstructions: '',
paymentMethods: [
{}
]
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/payment_policy');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/payment_policy',
headers: {'content-type': 'application/json'},
data: {
categoryTypes: [{default: false, name: ''}],
deposit: {
amount: {currency: '', value: ''},
dueIn: {unit: '', value: 0},
paymentMethods: [
{
brands: [],
paymentMethodType: '',
recipientAccountReference: {referenceId: '', referenceType: ''}
}
]
},
description: '',
fullPaymentDueIn: {},
immediatePay: false,
marketplaceId: '',
name: '',
paymentInstructions: '',
paymentMethods: [{}]
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/payment_policy';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"categoryTypes":[{"default":false,"name":""}],"deposit":{"amount":{"currency":"","value":""},"dueIn":{"unit":"","value":0},"paymentMethods":[{"brands":[],"paymentMethodType":"","recipientAccountReference":{"referenceId":"","referenceType":""}}]},"description":"","fullPaymentDueIn":{},"immediatePay":false,"marketplaceId":"","name":"","paymentInstructions":"","paymentMethods":[{}]}'
};
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}}/payment_policy',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "categoryTypes": [\n {\n "default": false,\n "name": ""\n }\n ],\n "deposit": {\n "amount": {\n "currency": "",\n "value": ""\n },\n "dueIn": {\n "unit": "",\n "value": 0\n },\n "paymentMethods": [\n {\n "brands": [],\n "paymentMethodType": "",\n "recipientAccountReference": {\n "referenceId": "",\n "referenceType": ""\n }\n }\n ]\n },\n "description": "",\n "fullPaymentDueIn": {},\n "immediatePay": false,\n "marketplaceId": "",\n "name": "",\n "paymentInstructions": "",\n "paymentMethods": [\n {}\n ]\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"categoryTypes\": [\n {\n \"default\": false,\n \"name\": \"\"\n }\n ],\n \"deposit\": {\n \"amount\": {\n \"currency\": \"\",\n \"value\": \"\"\n },\n \"dueIn\": {\n \"unit\": \"\",\n \"value\": 0\n },\n \"paymentMethods\": [\n {\n \"brands\": [],\n \"paymentMethodType\": \"\",\n \"recipientAccountReference\": {\n \"referenceId\": \"\",\n \"referenceType\": \"\"\n }\n }\n ]\n },\n \"description\": \"\",\n \"fullPaymentDueIn\": {},\n \"immediatePay\": false,\n \"marketplaceId\": \"\",\n \"name\": \"\",\n \"paymentInstructions\": \"\",\n \"paymentMethods\": [\n {}\n ]\n}")
val request = Request.Builder()
.url("{{baseUrl}}/payment_policy")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/payment_policy',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
categoryTypes: [{default: false, name: ''}],
deposit: {
amount: {currency: '', value: ''},
dueIn: {unit: '', value: 0},
paymentMethods: [
{
brands: [],
paymentMethodType: '',
recipientAccountReference: {referenceId: '', referenceType: ''}
}
]
},
description: '',
fullPaymentDueIn: {},
immediatePay: false,
marketplaceId: '',
name: '',
paymentInstructions: '',
paymentMethods: [{}]
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/payment_policy',
headers: {'content-type': 'application/json'},
body: {
categoryTypes: [{default: false, name: ''}],
deposit: {
amount: {currency: '', value: ''},
dueIn: {unit: '', value: 0},
paymentMethods: [
{
brands: [],
paymentMethodType: '',
recipientAccountReference: {referenceId: '', referenceType: ''}
}
]
},
description: '',
fullPaymentDueIn: {},
immediatePay: false,
marketplaceId: '',
name: '',
paymentInstructions: '',
paymentMethods: [{}]
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/payment_policy');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
categoryTypes: [
{
default: false,
name: ''
}
],
deposit: {
amount: {
currency: '',
value: ''
},
dueIn: {
unit: '',
value: 0
},
paymentMethods: [
{
brands: [],
paymentMethodType: '',
recipientAccountReference: {
referenceId: '',
referenceType: ''
}
}
]
},
description: '',
fullPaymentDueIn: {},
immediatePay: false,
marketplaceId: '',
name: '',
paymentInstructions: '',
paymentMethods: [
{}
]
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/payment_policy',
headers: {'content-type': 'application/json'},
data: {
categoryTypes: [{default: false, name: ''}],
deposit: {
amount: {currency: '', value: ''},
dueIn: {unit: '', value: 0},
paymentMethods: [
{
brands: [],
paymentMethodType: '',
recipientAccountReference: {referenceId: '', referenceType: ''}
}
]
},
description: '',
fullPaymentDueIn: {},
immediatePay: false,
marketplaceId: '',
name: '',
paymentInstructions: '',
paymentMethods: [{}]
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/payment_policy';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"categoryTypes":[{"default":false,"name":""}],"deposit":{"amount":{"currency":"","value":""},"dueIn":{"unit":"","value":0},"paymentMethods":[{"brands":[],"paymentMethodType":"","recipientAccountReference":{"referenceId":"","referenceType":""}}]},"description":"","fullPaymentDueIn":{},"immediatePay":false,"marketplaceId":"","name":"","paymentInstructions":"","paymentMethods":[{}]}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"categoryTypes": @[ @{ @"default": @NO, @"name": @"" } ],
@"deposit": @{ @"amount": @{ @"currency": @"", @"value": @"" }, @"dueIn": @{ @"unit": @"", @"value": @0 }, @"paymentMethods": @[ @{ @"brands": @[ ], @"paymentMethodType": @"", @"recipientAccountReference": @{ @"referenceId": @"", @"referenceType": @"" } } ] },
@"description": @"",
@"fullPaymentDueIn": @{ },
@"immediatePay": @NO,
@"marketplaceId": @"",
@"name": @"",
@"paymentInstructions": @"",
@"paymentMethods": @[ @{ } ] };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/payment_policy"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/payment_policy" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"categoryTypes\": [\n {\n \"default\": false,\n \"name\": \"\"\n }\n ],\n \"deposit\": {\n \"amount\": {\n \"currency\": \"\",\n \"value\": \"\"\n },\n \"dueIn\": {\n \"unit\": \"\",\n \"value\": 0\n },\n \"paymentMethods\": [\n {\n \"brands\": [],\n \"paymentMethodType\": \"\",\n \"recipientAccountReference\": {\n \"referenceId\": \"\",\n \"referenceType\": \"\"\n }\n }\n ]\n },\n \"description\": \"\",\n \"fullPaymentDueIn\": {},\n \"immediatePay\": false,\n \"marketplaceId\": \"\",\n \"name\": \"\",\n \"paymentInstructions\": \"\",\n \"paymentMethods\": [\n {}\n ]\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/payment_policy",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'categoryTypes' => [
[
'default' => null,
'name' => ''
]
],
'deposit' => [
'amount' => [
'currency' => '',
'value' => ''
],
'dueIn' => [
'unit' => '',
'value' => 0
],
'paymentMethods' => [
[
'brands' => [
],
'paymentMethodType' => '',
'recipientAccountReference' => [
'referenceId' => '',
'referenceType' => ''
]
]
]
],
'description' => '',
'fullPaymentDueIn' => [
],
'immediatePay' => null,
'marketplaceId' => '',
'name' => '',
'paymentInstructions' => '',
'paymentMethods' => [
[
]
]
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/payment_policy', [
'body' => '{
"categoryTypes": [
{
"default": false,
"name": ""
}
],
"deposit": {
"amount": {
"currency": "",
"value": ""
},
"dueIn": {
"unit": "",
"value": 0
},
"paymentMethods": [
{
"brands": [],
"paymentMethodType": "",
"recipientAccountReference": {
"referenceId": "",
"referenceType": ""
}
}
]
},
"description": "",
"fullPaymentDueIn": {},
"immediatePay": false,
"marketplaceId": "",
"name": "",
"paymentInstructions": "",
"paymentMethods": [
{}
]
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/payment_policy');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'categoryTypes' => [
[
'default' => null,
'name' => ''
]
],
'deposit' => [
'amount' => [
'currency' => '',
'value' => ''
],
'dueIn' => [
'unit' => '',
'value' => 0
],
'paymentMethods' => [
[
'brands' => [
],
'paymentMethodType' => '',
'recipientAccountReference' => [
'referenceId' => '',
'referenceType' => ''
]
]
]
],
'description' => '',
'fullPaymentDueIn' => [
],
'immediatePay' => null,
'marketplaceId' => '',
'name' => '',
'paymentInstructions' => '',
'paymentMethods' => [
[
]
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'categoryTypes' => [
[
'default' => null,
'name' => ''
]
],
'deposit' => [
'amount' => [
'currency' => '',
'value' => ''
],
'dueIn' => [
'unit' => '',
'value' => 0
],
'paymentMethods' => [
[
'brands' => [
],
'paymentMethodType' => '',
'recipientAccountReference' => [
'referenceId' => '',
'referenceType' => ''
]
]
]
],
'description' => '',
'fullPaymentDueIn' => [
],
'immediatePay' => null,
'marketplaceId' => '',
'name' => '',
'paymentInstructions' => '',
'paymentMethods' => [
[
]
]
]));
$request->setRequestUrl('{{baseUrl}}/payment_policy');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/payment_policy' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"categoryTypes": [
{
"default": false,
"name": ""
}
],
"deposit": {
"amount": {
"currency": "",
"value": ""
},
"dueIn": {
"unit": "",
"value": 0
},
"paymentMethods": [
{
"brands": [],
"paymentMethodType": "",
"recipientAccountReference": {
"referenceId": "",
"referenceType": ""
}
}
]
},
"description": "",
"fullPaymentDueIn": {},
"immediatePay": false,
"marketplaceId": "",
"name": "",
"paymentInstructions": "",
"paymentMethods": [
{}
]
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/payment_policy' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"categoryTypes": [
{
"default": false,
"name": ""
}
],
"deposit": {
"amount": {
"currency": "",
"value": ""
},
"dueIn": {
"unit": "",
"value": 0
},
"paymentMethods": [
{
"brands": [],
"paymentMethodType": "",
"recipientAccountReference": {
"referenceId": "",
"referenceType": ""
}
}
]
},
"description": "",
"fullPaymentDueIn": {},
"immediatePay": false,
"marketplaceId": "",
"name": "",
"paymentInstructions": "",
"paymentMethods": [
{}
]
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"categoryTypes\": [\n {\n \"default\": false,\n \"name\": \"\"\n }\n ],\n \"deposit\": {\n \"amount\": {\n \"currency\": \"\",\n \"value\": \"\"\n },\n \"dueIn\": {\n \"unit\": \"\",\n \"value\": 0\n },\n \"paymentMethods\": [\n {\n \"brands\": [],\n \"paymentMethodType\": \"\",\n \"recipientAccountReference\": {\n \"referenceId\": \"\",\n \"referenceType\": \"\"\n }\n }\n ]\n },\n \"description\": \"\",\n \"fullPaymentDueIn\": {},\n \"immediatePay\": false,\n \"marketplaceId\": \"\",\n \"name\": \"\",\n \"paymentInstructions\": \"\",\n \"paymentMethods\": [\n {}\n ]\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/payment_policy", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/payment_policy"
payload = {
"categoryTypes": [
{
"default": False,
"name": ""
}
],
"deposit": {
"amount": {
"currency": "",
"value": ""
},
"dueIn": {
"unit": "",
"value": 0
},
"paymentMethods": [
{
"brands": [],
"paymentMethodType": "",
"recipientAccountReference": {
"referenceId": "",
"referenceType": ""
}
}
]
},
"description": "",
"fullPaymentDueIn": {},
"immediatePay": False,
"marketplaceId": "",
"name": "",
"paymentInstructions": "",
"paymentMethods": [{}]
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/payment_policy"
payload <- "{\n \"categoryTypes\": [\n {\n \"default\": false,\n \"name\": \"\"\n }\n ],\n \"deposit\": {\n \"amount\": {\n \"currency\": \"\",\n \"value\": \"\"\n },\n \"dueIn\": {\n \"unit\": \"\",\n \"value\": 0\n },\n \"paymentMethods\": [\n {\n \"brands\": [],\n \"paymentMethodType\": \"\",\n \"recipientAccountReference\": {\n \"referenceId\": \"\",\n \"referenceType\": \"\"\n }\n }\n ]\n },\n \"description\": \"\",\n \"fullPaymentDueIn\": {},\n \"immediatePay\": false,\n \"marketplaceId\": \"\",\n \"name\": \"\",\n \"paymentInstructions\": \"\",\n \"paymentMethods\": [\n {}\n ]\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/payment_policy")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"categoryTypes\": [\n {\n \"default\": false,\n \"name\": \"\"\n }\n ],\n \"deposit\": {\n \"amount\": {\n \"currency\": \"\",\n \"value\": \"\"\n },\n \"dueIn\": {\n \"unit\": \"\",\n \"value\": 0\n },\n \"paymentMethods\": [\n {\n \"brands\": [],\n \"paymentMethodType\": \"\",\n \"recipientAccountReference\": {\n \"referenceId\": \"\",\n \"referenceType\": \"\"\n }\n }\n ]\n },\n \"description\": \"\",\n \"fullPaymentDueIn\": {},\n \"immediatePay\": false,\n \"marketplaceId\": \"\",\n \"name\": \"\",\n \"paymentInstructions\": \"\",\n \"paymentMethods\": [\n {}\n ]\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/payment_policy') do |req|
req.body = "{\n \"categoryTypes\": [\n {\n \"default\": false,\n \"name\": \"\"\n }\n ],\n \"deposit\": {\n \"amount\": {\n \"currency\": \"\",\n \"value\": \"\"\n },\n \"dueIn\": {\n \"unit\": \"\",\n \"value\": 0\n },\n \"paymentMethods\": [\n {\n \"brands\": [],\n \"paymentMethodType\": \"\",\n \"recipientAccountReference\": {\n \"referenceId\": \"\",\n \"referenceType\": \"\"\n }\n }\n ]\n },\n \"description\": \"\",\n \"fullPaymentDueIn\": {},\n \"immediatePay\": false,\n \"marketplaceId\": \"\",\n \"name\": \"\",\n \"paymentInstructions\": \"\",\n \"paymentMethods\": [\n {}\n ]\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/payment_policy";
let payload = json!({
"categoryTypes": (
json!({
"default": false,
"name": ""
})
),
"deposit": json!({
"amount": json!({
"currency": "",
"value": ""
}),
"dueIn": json!({
"unit": "",
"value": 0
}),
"paymentMethods": (
json!({
"brands": (),
"paymentMethodType": "",
"recipientAccountReference": json!({
"referenceId": "",
"referenceType": ""
})
})
)
}),
"description": "",
"fullPaymentDueIn": json!({}),
"immediatePay": false,
"marketplaceId": "",
"name": "",
"paymentInstructions": "",
"paymentMethods": (json!({}))
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/payment_policy \
--header 'content-type: application/json' \
--data '{
"categoryTypes": [
{
"default": false,
"name": ""
}
],
"deposit": {
"amount": {
"currency": "",
"value": ""
},
"dueIn": {
"unit": "",
"value": 0
},
"paymentMethods": [
{
"brands": [],
"paymentMethodType": "",
"recipientAccountReference": {
"referenceId": "",
"referenceType": ""
}
}
]
},
"description": "",
"fullPaymentDueIn": {},
"immediatePay": false,
"marketplaceId": "",
"name": "",
"paymentInstructions": "",
"paymentMethods": [
{}
]
}'
echo '{
"categoryTypes": [
{
"default": false,
"name": ""
}
],
"deposit": {
"amount": {
"currency": "",
"value": ""
},
"dueIn": {
"unit": "",
"value": 0
},
"paymentMethods": [
{
"brands": [],
"paymentMethodType": "",
"recipientAccountReference": {
"referenceId": "",
"referenceType": ""
}
}
]
},
"description": "",
"fullPaymentDueIn": {},
"immediatePay": false,
"marketplaceId": "",
"name": "",
"paymentInstructions": "",
"paymentMethods": [
{}
]
}' | \
http POST {{baseUrl}}/payment_policy \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "categoryTypes": [\n {\n "default": false,\n "name": ""\n }\n ],\n "deposit": {\n "amount": {\n "currency": "",\n "value": ""\n },\n "dueIn": {\n "unit": "",\n "value": 0\n },\n "paymentMethods": [\n {\n "brands": [],\n "paymentMethodType": "",\n "recipientAccountReference": {\n "referenceId": "",\n "referenceType": ""\n }\n }\n ]\n },\n "description": "",\n "fullPaymentDueIn": {},\n "immediatePay": false,\n "marketplaceId": "",\n "name": "",\n "paymentInstructions": "",\n "paymentMethods": [\n {}\n ]\n}' \
--output-document \
- {{baseUrl}}/payment_policy
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"categoryTypes": [
[
"default": false,
"name": ""
]
],
"deposit": [
"amount": [
"currency": "",
"value": ""
],
"dueIn": [
"unit": "",
"value": 0
],
"paymentMethods": [
[
"brands": [],
"paymentMethodType": "",
"recipientAccountReference": [
"referenceId": "",
"referenceType": ""
]
]
]
],
"description": "",
"fullPaymentDueIn": [],
"immediatePay": false,
"marketplaceId": "",
"name": "",
"paymentInstructions": "",
"paymentMethods": [[]]
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/payment_policy")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
DELETE
deletePaymentPolicy
{{baseUrl}}/payment_policy/:payment_policy_id
QUERY PARAMS
payment_policy_id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/payment_policy/:payment_policy_id");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/delete "{{baseUrl}}/payment_policy/:payment_policy_id")
require "http/client"
url = "{{baseUrl}}/payment_policy/:payment_policy_id"
response = HTTP::Client.delete url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Delete,
RequestUri = new Uri("{{baseUrl}}/payment_policy/:payment_policy_id"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/payment_policy/:payment_policy_id");
var request = new RestRequest("", Method.Delete);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/payment_policy/:payment_policy_id"
req, _ := http.NewRequest("DELETE", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
DELETE /baseUrl/payment_policy/:payment_policy_id HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/payment_policy/:payment_policy_id")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/payment_policy/:payment_policy_id"))
.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}}/payment_policy/:payment_policy_id")
.delete(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/payment_policy/:payment_policy_id")
.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}}/payment_policy/:payment_policy_id');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'DELETE',
url: '{{baseUrl}}/payment_policy/:payment_policy_id'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/payment_policy/:payment_policy_id';
const options = {method: 'DELETE'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/payment_policy/:payment_policy_id',
method: 'DELETE',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/payment_policy/:payment_policy_id")
.delete(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'DELETE',
hostname: 'example.com',
port: null,
path: '/baseUrl/payment_policy/:payment_policy_id',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'DELETE',
url: '{{baseUrl}}/payment_policy/:payment_policy_id'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('DELETE', '{{baseUrl}}/payment_policy/:payment_policy_id');
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}}/payment_policy/:payment_policy_id'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/payment_policy/:payment_policy_id';
const options = {method: 'DELETE'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/payment_policy/:payment_policy_id"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"DELETE"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/payment_policy/:payment_policy_id" in
Client.call `DELETE uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/payment_policy/:payment_policy_id",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('DELETE', '{{baseUrl}}/payment_policy/:payment_policy_id');
echo $response->getBody();
setUrl('{{baseUrl}}/payment_policy/:payment_policy_id');
$request->setMethod(HTTP_METH_DELETE);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/payment_policy/:payment_policy_id');
$request->setRequestMethod('DELETE');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/payment_policy/:payment_policy_id' -Method DELETE
$response = Invoke-RestMethod -Uri '{{baseUrl}}/payment_policy/:payment_policy_id' -Method DELETE
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("DELETE", "/baseUrl/payment_policy/:payment_policy_id")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/payment_policy/:payment_policy_id"
response = requests.delete(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/payment_policy/:payment_policy_id"
response <- VERB("DELETE", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/payment_policy/:payment_policy_id")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.delete('/baseUrl/payment_policy/:payment_policy_id') do |req|
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/payment_policy/:payment_policy_id";
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("DELETE").unwrap(), url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request DELETE \
--url {{baseUrl}}/payment_policy/:payment_policy_id
http DELETE {{baseUrl}}/payment_policy/:payment_policy_id
wget --quiet \
--method DELETE \
--output-document \
- {{baseUrl}}/payment_policy/:payment_policy_id
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/payment_policy/:payment_policy_id")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "DELETE"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
getPaymentPolicies
{{baseUrl}}/payment_policy
QUERY PARAMS
marketplace_id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/payment_policy?marketplace_id=");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/payment_policy" {:query-params {:marketplace_id ""}})
require "http/client"
url = "{{baseUrl}}/payment_policy?marketplace_id="
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/payment_policy?marketplace_id="),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/payment_policy?marketplace_id=");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/payment_policy?marketplace_id="
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/payment_policy?marketplace_id= HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/payment_policy?marketplace_id=")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/payment_policy?marketplace_id="))
.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}}/payment_policy?marketplace_id=")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/payment_policy?marketplace_id=")
.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}}/payment_policy?marketplace_id=');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/payment_policy',
params: {marketplace_id: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/payment_policy?marketplace_id=';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/payment_policy?marketplace_id=',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/payment_policy?marketplace_id=")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/payment_policy?marketplace_id=',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'GET',
url: '{{baseUrl}}/payment_policy',
qs: {marketplace_id: ''}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/payment_policy');
req.query({
marketplace_id: ''
});
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}}/payment_policy',
params: {marketplace_id: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/payment_policy?marketplace_id=';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/payment_policy?marketplace_id="]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/payment_policy?marketplace_id=" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/payment_policy?marketplace_id=",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/payment_policy?marketplace_id=');
echo $response->getBody();
setUrl('{{baseUrl}}/payment_policy');
$request->setMethod(HTTP_METH_GET);
$request->setQueryData([
'marketplace_id' => ''
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/payment_policy');
$request->setRequestMethod('GET');
$request->setQuery(new http\QueryString([
'marketplace_id' => ''
]));
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/payment_policy?marketplace_id=' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/payment_policy?marketplace_id=' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/payment_policy?marketplace_id=")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/payment_policy"
querystring = {"marketplace_id":""}
response = requests.get(url, params=querystring)
print(response.json())
library(httr)
url <- "{{baseUrl}}/payment_policy"
queryString <- list(marketplace_id = "")
response <- VERB("GET", url, query = queryString, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/payment_policy?marketplace_id=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/payment_policy') do |req|
req.params['marketplace_id'] = ''
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/payment_policy";
let querystring = [
("marketplace_id", ""),
];
let client = reqwest::Client::new();
let response = client.get(url)
.query(&querystring)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url '{{baseUrl}}/payment_policy?marketplace_id='
http GET '{{baseUrl}}/payment_policy?marketplace_id='
wget --quiet \
--method GET \
--output-document \
- '{{baseUrl}}/payment_policy?marketplace_id='
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/payment_policy?marketplace_id=")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
getPaymentPolicy
{{baseUrl}}/payment_policy/:payment_policy_id
QUERY PARAMS
payment_policy_id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/payment_policy/:payment_policy_id");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/payment_policy/:payment_policy_id")
require "http/client"
url = "{{baseUrl}}/payment_policy/:payment_policy_id"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/payment_policy/:payment_policy_id"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/payment_policy/:payment_policy_id");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/payment_policy/:payment_policy_id"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/payment_policy/:payment_policy_id HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/payment_policy/:payment_policy_id")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/payment_policy/:payment_policy_id"))
.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}}/payment_policy/:payment_policy_id")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/payment_policy/:payment_policy_id")
.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}}/payment_policy/:payment_policy_id');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/payment_policy/:payment_policy_id'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/payment_policy/:payment_policy_id';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/payment_policy/:payment_policy_id',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/payment_policy/:payment_policy_id")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/payment_policy/:payment_policy_id',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'GET',
url: '{{baseUrl}}/payment_policy/:payment_policy_id'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/payment_policy/:payment_policy_id');
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}}/payment_policy/:payment_policy_id'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/payment_policy/:payment_policy_id';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/payment_policy/:payment_policy_id"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/payment_policy/:payment_policy_id" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/payment_policy/:payment_policy_id",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/payment_policy/:payment_policy_id');
echo $response->getBody();
setUrl('{{baseUrl}}/payment_policy/:payment_policy_id');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/payment_policy/:payment_policy_id');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/payment_policy/:payment_policy_id' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/payment_policy/:payment_policy_id' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/payment_policy/:payment_policy_id")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/payment_policy/:payment_policy_id"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/payment_policy/:payment_policy_id"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/payment_policy/:payment_policy_id")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/payment_policy/:payment_policy_id') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/payment_policy/:payment_policy_id";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/payment_policy/:payment_policy_id
http GET {{baseUrl}}/payment_policy/:payment_policy_id
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/payment_policy/:payment_policy_id
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/payment_policy/:payment_policy_id")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
getPaymentPolicyByName
{{baseUrl}}/payment_policy/get_by_policy_name
QUERY PARAMS
marketplace_id
name
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/payment_policy/get_by_policy_name?marketplace_id=&name=");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/payment_policy/get_by_policy_name" {:query-params {:marketplace_id ""
:name ""}})
require "http/client"
url = "{{baseUrl}}/payment_policy/get_by_policy_name?marketplace_id=&name="
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/payment_policy/get_by_policy_name?marketplace_id=&name="),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/payment_policy/get_by_policy_name?marketplace_id=&name=");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/payment_policy/get_by_policy_name?marketplace_id=&name="
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/payment_policy/get_by_policy_name?marketplace_id=&name= HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/payment_policy/get_by_policy_name?marketplace_id=&name=")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/payment_policy/get_by_policy_name?marketplace_id=&name="))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/payment_policy/get_by_policy_name?marketplace_id=&name=")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/payment_policy/get_by_policy_name?marketplace_id=&name=")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/payment_policy/get_by_policy_name?marketplace_id=&name=');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/payment_policy/get_by_policy_name',
params: {marketplace_id: '', name: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/payment_policy/get_by_policy_name?marketplace_id=&name=';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/payment_policy/get_by_policy_name?marketplace_id=&name=',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/payment_policy/get_by_policy_name?marketplace_id=&name=")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/payment_policy/get_by_policy_name?marketplace_id=&name=',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'GET',
url: '{{baseUrl}}/payment_policy/get_by_policy_name',
qs: {marketplace_id: '', name: ''}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/payment_policy/get_by_policy_name');
req.query({
marketplace_id: '',
name: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'GET',
url: '{{baseUrl}}/payment_policy/get_by_policy_name',
params: {marketplace_id: '', name: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/payment_policy/get_by_policy_name?marketplace_id=&name=';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/payment_policy/get_by_policy_name?marketplace_id=&name="]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/payment_policy/get_by_policy_name?marketplace_id=&name=" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/payment_policy/get_by_policy_name?marketplace_id=&name=",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/payment_policy/get_by_policy_name?marketplace_id=&name=');
echo $response->getBody();
setUrl('{{baseUrl}}/payment_policy/get_by_policy_name');
$request->setMethod(HTTP_METH_GET);
$request->setQueryData([
'marketplace_id' => '',
'name' => ''
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/payment_policy/get_by_policy_name');
$request->setRequestMethod('GET');
$request->setQuery(new http\QueryString([
'marketplace_id' => '',
'name' => ''
]));
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/payment_policy/get_by_policy_name?marketplace_id=&name=' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/payment_policy/get_by_policy_name?marketplace_id=&name=' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/payment_policy/get_by_policy_name?marketplace_id=&name=")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/payment_policy/get_by_policy_name"
querystring = {"marketplace_id":"","name":""}
response = requests.get(url, params=querystring)
print(response.json())
library(httr)
url <- "{{baseUrl}}/payment_policy/get_by_policy_name"
queryString <- list(
marketplace_id = "",
name = ""
)
response <- VERB("GET", url, query = queryString, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/payment_policy/get_by_policy_name?marketplace_id=&name=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/payment_policy/get_by_policy_name') do |req|
req.params['marketplace_id'] = ''
req.params['name'] = ''
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/payment_policy/get_by_policy_name";
let querystring = [
("marketplace_id", ""),
("name", ""),
];
let client = reqwest::Client::new();
let response = client.get(url)
.query(&querystring)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url '{{baseUrl}}/payment_policy/get_by_policy_name?marketplace_id=&name='
http GET '{{baseUrl}}/payment_policy/get_by_policy_name?marketplace_id=&name='
wget --quiet \
--method GET \
--output-document \
- '{{baseUrl}}/payment_policy/get_by_policy_name?marketplace_id=&name='
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/payment_policy/get_by_policy_name?marketplace_id=&name=")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PUT
updatePaymentPolicy
{{baseUrl}}/payment_policy/:payment_policy_id
QUERY PARAMS
payment_policy_id
BODY json
{
"categoryTypes": [
{
"default": false,
"name": ""
}
],
"deposit": {
"amount": {
"currency": "",
"value": ""
},
"dueIn": {
"unit": "",
"value": 0
},
"paymentMethods": [
{
"brands": [],
"paymentMethodType": "",
"recipientAccountReference": {
"referenceId": "",
"referenceType": ""
}
}
]
},
"description": "",
"fullPaymentDueIn": {},
"immediatePay": false,
"marketplaceId": "",
"name": "",
"paymentInstructions": "",
"paymentMethods": [
{}
]
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/payment_policy/:payment_policy_id");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"categoryTypes\": [\n {\n \"default\": false,\n \"name\": \"\"\n }\n ],\n \"deposit\": {\n \"amount\": {\n \"currency\": \"\",\n \"value\": \"\"\n },\n \"dueIn\": {\n \"unit\": \"\",\n \"value\": 0\n },\n \"paymentMethods\": [\n {\n \"brands\": [],\n \"paymentMethodType\": \"\",\n \"recipientAccountReference\": {\n \"referenceId\": \"\",\n \"referenceType\": \"\"\n }\n }\n ]\n },\n \"description\": \"\",\n \"fullPaymentDueIn\": {},\n \"immediatePay\": false,\n \"marketplaceId\": \"\",\n \"name\": \"\",\n \"paymentInstructions\": \"\",\n \"paymentMethods\": [\n {}\n ]\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/payment_policy/:payment_policy_id" {:content-type :json
:form-params {:categoryTypes [{:default false
:name ""}]
:deposit {:amount {:currency ""
:value ""}
:dueIn {:unit ""
:value 0}
:paymentMethods [{:brands []
:paymentMethodType ""
:recipientAccountReference {:referenceId ""
:referenceType ""}}]}
:description ""
:fullPaymentDueIn {}
:immediatePay false
:marketplaceId ""
:name ""
:paymentInstructions ""
:paymentMethods [{}]}})
require "http/client"
url = "{{baseUrl}}/payment_policy/:payment_policy_id"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"categoryTypes\": [\n {\n \"default\": false,\n \"name\": \"\"\n }\n ],\n \"deposit\": {\n \"amount\": {\n \"currency\": \"\",\n \"value\": \"\"\n },\n \"dueIn\": {\n \"unit\": \"\",\n \"value\": 0\n },\n \"paymentMethods\": [\n {\n \"brands\": [],\n \"paymentMethodType\": \"\",\n \"recipientAccountReference\": {\n \"referenceId\": \"\",\n \"referenceType\": \"\"\n }\n }\n ]\n },\n \"description\": \"\",\n \"fullPaymentDueIn\": {},\n \"immediatePay\": false,\n \"marketplaceId\": \"\",\n \"name\": \"\",\n \"paymentInstructions\": \"\",\n \"paymentMethods\": [\n {}\n ]\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}}/payment_policy/:payment_policy_id"),
Content = new StringContent("{\n \"categoryTypes\": [\n {\n \"default\": false,\n \"name\": \"\"\n }\n ],\n \"deposit\": {\n \"amount\": {\n \"currency\": \"\",\n \"value\": \"\"\n },\n \"dueIn\": {\n \"unit\": \"\",\n \"value\": 0\n },\n \"paymentMethods\": [\n {\n \"brands\": [],\n \"paymentMethodType\": \"\",\n \"recipientAccountReference\": {\n \"referenceId\": \"\",\n \"referenceType\": \"\"\n }\n }\n ]\n },\n \"description\": \"\",\n \"fullPaymentDueIn\": {},\n \"immediatePay\": false,\n \"marketplaceId\": \"\",\n \"name\": \"\",\n \"paymentInstructions\": \"\",\n \"paymentMethods\": [\n {}\n ]\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/payment_policy/:payment_policy_id");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"categoryTypes\": [\n {\n \"default\": false,\n \"name\": \"\"\n }\n ],\n \"deposit\": {\n \"amount\": {\n \"currency\": \"\",\n \"value\": \"\"\n },\n \"dueIn\": {\n \"unit\": \"\",\n \"value\": 0\n },\n \"paymentMethods\": [\n {\n \"brands\": [],\n \"paymentMethodType\": \"\",\n \"recipientAccountReference\": {\n \"referenceId\": \"\",\n \"referenceType\": \"\"\n }\n }\n ]\n },\n \"description\": \"\",\n \"fullPaymentDueIn\": {},\n \"immediatePay\": false,\n \"marketplaceId\": \"\",\n \"name\": \"\",\n \"paymentInstructions\": \"\",\n \"paymentMethods\": [\n {}\n ]\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/payment_policy/:payment_policy_id"
payload := strings.NewReader("{\n \"categoryTypes\": [\n {\n \"default\": false,\n \"name\": \"\"\n }\n ],\n \"deposit\": {\n \"amount\": {\n \"currency\": \"\",\n \"value\": \"\"\n },\n \"dueIn\": {\n \"unit\": \"\",\n \"value\": 0\n },\n \"paymentMethods\": [\n {\n \"brands\": [],\n \"paymentMethodType\": \"\",\n \"recipientAccountReference\": {\n \"referenceId\": \"\",\n \"referenceType\": \"\"\n }\n }\n ]\n },\n \"description\": \"\",\n \"fullPaymentDueIn\": {},\n \"immediatePay\": false,\n \"marketplaceId\": \"\",\n \"name\": \"\",\n \"paymentInstructions\": \"\",\n \"paymentMethods\": [\n {}\n ]\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
PUT /baseUrl/payment_policy/:payment_policy_id HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 602
{
"categoryTypes": [
{
"default": false,
"name": ""
}
],
"deposit": {
"amount": {
"currency": "",
"value": ""
},
"dueIn": {
"unit": "",
"value": 0
},
"paymentMethods": [
{
"brands": [],
"paymentMethodType": "",
"recipientAccountReference": {
"referenceId": "",
"referenceType": ""
}
}
]
},
"description": "",
"fullPaymentDueIn": {},
"immediatePay": false,
"marketplaceId": "",
"name": "",
"paymentInstructions": "",
"paymentMethods": [
{}
]
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/payment_policy/:payment_policy_id")
.setHeader("content-type", "application/json")
.setBody("{\n \"categoryTypes\": [\n {\n \"default\": false,\n \"name\": \"\"\n }\n ],\n \"deposit\": {\n \"amount\": {\n \"currency\": \"\",\n \"value\": \"\"\n },\n \"dueIn\": {\n \"unit\": \"\",\n \"value\": 0\n },\n \"paymentMethods\": [\n {\n \"brands\": [],\n \"paymentMethodType\": \"\",\n \"recipientAccountReference\": {\n \"referenceId\": \"\",\n \"referenceType\": \"\"\n }\n }\n ]\n },\n \"description\": \"\",\n \"fullPaymentDueIn\": {},\n \"immediatePay\": false,\n \"marketplaceId\": \"\",\n \"name\": \"\",\n \"paymentInstructions\": \"\",\n \"paymentMethods\": [\n {}\n ]\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/payment_policy/:payment_policy_id"))
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("{\n \"categoryTypes\": [\n {\n \"default\": false,\n \"name\": \"\"\n }\n ],\n \"deposit\": {\n \"amount\": {\n \"currency\": \"\",\n \"value\": \"\"\n },\n \"dueIn\": {\n \"unit\": \"\",\n \"value\": 0\n },\n \"paymentMethods\": [\n {\n \"brands\": [],\n \"paymentMethodType\": \"\",\n \"recipientAccountReference\": {\n \"referenceId\": \"\",\n \"referenceType\": \"\"\n }\n }\n ]\n },\n \"description\": \"\",\n \"fullPaymentDueIn\": {},\n \"immediatePay\": false,\n \"marketplaceId\": \"\",\n \"name\": \"\",\n \"paymentInstructions\": \"\",\n \"paymentMethods\": [\n {}\n ]\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"categoryTypes\": [\n {\n \"default\": false,\n \"name\": \"\"\n }\n ],\n \"deposit\": {\n \"amount\": {\n \"currency\": \"\",\n \"value\": \"\"\n },\n \"dueIn\": {\n \"unit\": \"\",\n \"value\": 0\n },\n \"paymentMethods\": [\n {\n \"brands\": [],\n \"paymentMethodType\": \"\",\n \"recipientAccountReference\": {\n \"referenceId\": \"\",\n \"referenceType\": \"\"\n }\n }\n ]\n },\n \"description\": \"\",\n \"fullPaymentDueIn\": {},\n \"immediatePay\": false,\n \"marketplaceId\": \"\",\n \"name\": \"\",\n \"paymentInstructions\": \"\",\n \"paymentMethods\": [\n {}\n ]\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/payment_policy/:payment_policy_id")
.put(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/payment_policy/:payment_policy_id")
.header("content-type", "application/json")
.body("{\n \"categoryTypes\": [\n {\n \"default\": false,\n \"name\": \"\"\n }\n ],\n \"deposit\": {\n \"amount\": {\n \"currency\": \"\",\n \"value\": \"\"\n },\n \"dueIn\": {\n \"unit\": \"\",\n \"value\": 0\n },\n \"paymentMethods\": [\n {\n \"brands\": [],\n \"paymentMethodType\": \"\",\n \"recipientAccountReference\": {\n \"referenceId\": \"\",\n \"referenceType\": \"\"\n }\n }\n ]\n },\n \"description\": \"\",\n \"fullPaymentDueIn\": {},\n \"immediatePay\": false,\n \"marketplaceId\": \"\",\n \"name\": \"\",\n \"paymentInstructions\": \"\",\n \"paymentMethods\": [\n {}\n ]\n}")
.asString();
const data = JSON.stringify({
categoryTypes: [
{
default: false,
name: ''
}
],
deposit: {
amount: {
currency: '',
value: ''
},
dueIn: {
unit: '',
value: 0
},
paymentMethods: [
{
brands: [],
paymentMethodType: '',
recipientAccountReference: {
referenceId: '',
referenceType: ''
}
}
]
},
description: '',
fullPaymentDueIn: {},
immediatePay: false,
marketplaceId: '',
name: '',
paymentInstructions: '',
paymentMethods: [
{}
]
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/payment_policy/:payment_policy_id');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/payment_policy/:payment_policy_id',
headers: {'content-type': 'application/json'},
data: {
categoryTypes: [{default: false, name: ''}],
deposit: {
amount: {currency: '', value: ''},
dueIn: {unit: '', value: 0},
paymentMethods: [
{
brands: [],
paymentMethodType: '',
recipientAccountReference: {referenceId: '', referenceType: ''}
}
]
},
description: '',
fullPaymentDueIn: {},
immediatePay: false,
marketplaceId: '',
name: '',
paymentInstructions: '',
paymentMethods: [{}]
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/payment_policy/:payment_policy_id';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"categoryTypes":[{"default":false,"name":""}],"deposit":{"amount":{"currency":"","value":""},"dueIn":{"unit":"","value":0},"paymentMethods":[{"brands":[],"paymentMethodType":"","recipientAccountReference":{"referenceId":"","referenceType":""}}]},"description":"","fullPaymentDueIn":{},"immediatePay":false,"marketplaceId":"","name":"","paymentInstructions":"","paymentMethods":[{}]}'
};
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}}/payment_policy/:payment_policy_id',
method: 'PUT',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "categoryTypes": [\n {\n "default": false,\n "name": ""\n }\n ],\n "deposit": {\n "amount": {\n "currency": "",\n "value": ""\n },\n "dueIn": {\n "unit": "",\n "value": 0\n },\n "paymentMethods": [\n {\n "brands": [],\n "paymentMethodType": "",\n "recipientAccountReference": {\n "referenceId": "",\n "referenceType": ""\n }\n }\n ]\n },\n "description": "",\n "fullPaymentDueIn": {},\n "immediatePay": false,\n "marketplaceId": "",\n "name": "",\n "paymentInstructions": "",\n "paymentMethods": [\n {}\n ]\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"categoryTypes\": [\n {\n \"default\": false,\n \"name\": \"\"\n }\n ],\n \"deposit\": {\n \"amount\": {\n \"currency\": \"\",\n \"value\": \"\"\n },\n \"dueIn\": {\n \"unit\": \"\",\n \"value\": 0\n },\n \"paymentMethods\": [\n {\n \"brands\": [],\n \"paymentMethodType\": \"\",\n \"recipientAccountReference\": {\n \"referenceId\": \"\",\n \"referenceType\": \"\"\n }\n }\n ]\n },\n \"description\": \"\",\n \"fullPaymentDueIn\": {},\n \"immediatePay\": false,\n \"marketplaceId\": \"\",\n \"name\": \"\",\n \"paymentInstructions\": \"\",\n \"paymentMethods\": [\n {}\n ]\n}")
val request = Request.Builder()
.url("{{baseUrl}}/payment_policy/:payment_policy_id")
.put(body)
.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/payment_policy/:payment_policy_id',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
categoryTypes: [{default: false, name: ''}],
deposit: {
amount: {currency: '', value: ''},
dueIn: {unit: '', value: 0},
paymentMethods: [
{
brands: [],
paymentMethodType: '',
recipientAccountReference: {referenceId: '', referenceType: ''}
}
]
},
description: '',
fullPaymentDueIn: {},
immediatePay: false,
marketplaceId: '',
name: '',
paymentInstructions: '',
paymentMethods: [{}]
}));
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/payment_policy/:payment_policy_id',
headers: {'content-type': 'application/json'},
body: {
categoryTypes: [{default: false, name: ''}],
deposit: {
amount: {currency: '', value: ''},
dueIn: {unit: '', value: 0},
paymentMethods: [
{
brands: [],
paymentMethodType: '',
recipientAccountReference: {referenceId: '', referenceType: ''}
}
]
},
description: '',
fullPaymentDueIn: {},
immediatePay: false,
marketplaceId: '',
name: '',
paymentInstructions: '',
paymentMethods: [{}]
},
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}}/payment_policy/:payment_policy_id');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
categoryTypes: [
{
default: false,
name: ''
}
],
deposit: {
amount: {
currency: '',
value: ''
},
dueIn: {
unit: '',
value: 0
},
paymentMethods: [
{
brands: [],
paymentMethodType: '',
recipientAccountReference: {
referenceId: '',
referenceType: ''
}
}
]
},
description: '',
fullPaymentDueIn: {},
immediatePay: false,
marketplaceId: '',
name: '',
paymentInstructions: '',
paymentMethods: [
{}
]
});
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}}/payment_policy/:payment_policy_id',
headers: {'content-type': 'application/json'},
data: {
categoryTypes: [{default: false, name: ''}],
deposit: {
amount: {currency: '', value: ''},
dueIn: {unit: '', value: 0},
paymentMethods: [
{
brands: [],
paymentMethodType: '',
recipientAccountReference: {referenceId: '', referenceType: ''}
}
]
},
description: '',
fullPaymentDueIn: {},
immediatePay: false,
marketplaceId: '',
name: '',
paymentInstructions: '',
paymentMethods: [{}]
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/payment_policy/:payment_policy_id';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"categoryTypes":[{"default":false,"name":""}],"deposit":{"amount":{"currency":"","value":""},"dueIn":{"unit":"","value":0},"paymentMethods":[{"brands":[],"paymentMethodType":"","recipientAccountReference":{"referenceId":"","referenceType":""}}]},"description":"","fullPaymentDueIn":{},"immediatePay":false,"marketplaceId":"","name":"","paymentInstructions":"","paymentMethods":[{}]}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"categoryTypes": @[ @{ @"default": @NO, @"name": @"" } ],
@"deposit": @{ @"amount": @{ @"currency": @"", @"value": @"" }, @"dueIn": @{ @"unit": @"", @"value": @0 }, @"paymentMethods": @[ @{ @"brands": @[ ], @"paymentMethodType": @"", @"recipientAccountReference": @{ @"referenceId": @"", @"referenceType": @"" } } ] },
@"description": @"",
@"fullPaymentDueIn": @{ },
@"immediatePay": @NO,
@"marketplaceId": @"",
@"name": @"",
@"paymentInstructions": @"",
@"paymentMethods": @[ @{ } ] };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/payment_policy/:payment_policy_id"]
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}}/payment_policy/:payment_policy_id" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"categoryTypes\": [\n {\n \"default\": false,\n \"name\": \"\"\n }\n ],\n \"deposit\": {\n \"amount\": {\n \"currency\": \"\",\n \"value\": \"\"\n },\n \"dueIn\": {\n \"unit\": \"\",\n \"value\": 0\n },\n \"paymentMethods\": [\n {\n \"brands\": [],\n \"paymentMethodType\": \"\",\n \"recipientAccountReference\": {\n \"referenceId\": \"\",\n \"referenceType\": \"\"\n }\n }\n ]\n },\n \"description\": \"\",\n \"fullPaymentDueIn\": {},\n \"immediatePay\": false,\n \"marketplaceId\": \"\",\n \"name\": \"\",\n \"paymentInstructions\": \"\",\n \"paymentMethods\": [\n {}\n ]\n}" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/payment_policy/:payment_policy_id",
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([
'categoryTypes' => [
[
'default' => null,
'name' => ''
]
],
'deposit' => [
'amount' => [
'currency' => '',
'value' => ''
],
'dueIn' => [
'unit' => '',
'value' => 0
],
'paymentMethods' => [
[
'brands' => [
],
'paymentMethodType' => '',
'recipientAccountReference' => [
'referenceId' => '',
'referenceType' => ''
]
]
]
],
'description' => '',
'fullPaymentDueIn' => [
],
'immediatePay' => null,
'marketplaceId' => '',
'name' => '',
'paymentInstructions' => '',
'paymentMethods' => [
[
]
]
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('PUT', '{{baseUrl}}/payment_policy/:payment_policy_id', [
'body' => '{
"categoryTypes": [
{
"default": false,
"name": ""
}
],
"deposit": {
"amount": {
"currency": "",
"value": ""
},
"dueIn": {
"unit": "",
"value": 0
},
"paymentMethods": [
{
"brands": [],
"paymentMethodType": "",
"recipientAccountReference": {
"referenceId": "",
"referenceType": ""
}
}
]
},
"description": "",
"fullPaymentDueIn": {},
"immediatePay": false,
"marketplaceId": "",
"name": "",
"paymentInstructions": "",
"paymentMethods": [
{}
]
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/payment_policy/:payment_policy_id');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'categoryTypes' => [
[
'default' => null,
'name' => ''
]
],
'deposit' => [
'amount' => [
'currency' => '',
'value' => ''
],
'dueIn' => [
'unit' => '',
'value' => 0
],
'paymentMethods' => [
[
'brands' => [
],
'paymentMethodType' => '',
'recipientAccountReference' => [
'referenceId' => '',
'referenceType' => ''
]
]
]
],
'description' => '',
'fullPaymentDueIn' => [
],
'immediatePay' => null,
'marketplaceId' => '',
'name' => '',
'paymentInstructions' => '',
'paymentMethods' => [
[
]
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'categoryTypes' => [
[
'default' => null,
'name' => ''
]
],
'deposit' => [
'amount' => [
'currency' => '',
'value' => ''
],
'dueIn' => [
'unit' => '',
'value' => 0
],
'paymentMethods' => [
[
'brands' => [
],
'paymentMethodType' => '',
'recipientAccountReference' => [
'referenceId' => '',
'referenceType' => ''
]
]
]
],
'description' => '',
'fullPaymentDueIn' => [
],
'immediatePay' => null,
'marketplaceId' => '',
'name' => '',
'paymentInstructions' => '',
'paymentMethods' => [
[
]
]
]));
$request->setRequestUrl('{{baseUrl}}/payment_policy/:payment_policy_id');
$request->setRequestMethod('PUT');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/payment_policy/:payment_policy_id' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"categoryTypes": [
{
"default": false,
"name": ""
}
],
"deposit": {
"amount": {
"currency": "",
"value": ""
},
"dueIn": {
"unit": "",
"value": 0
},
"paymentMethods": [
{
"brands": [],
"paymentMethodType": "",
"recipientAccountReference": {
"referenceId": "",
"referenceType": ""
}
}
]
},
"description": "",
"fullPaymentDueIn": {},
"immediatePay": false,
"marketplaceId": "",
"name": "",
"paymentInstructions": "",
"paymentMethods": [
{}
]
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/payment_policy/:payment_policy_id' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"categoryTypes": [
{
"default": false,
"name": ""
}
],
"deposit": {
"amount": {
"currency": "",
"value": ""
},
"dueIn": {
"unit": "",
"value": 0
},
"paymentMethods": [
{
"brands": [],
"paymentMethodType": "",
"recipientAccountReference": {
"referenceId": "",
"referenceType": ""
}
}
]
},
"description": "",
"fullPaymentDueIn": {},
"immediatePay": false,
"marketplaceId": "",
"name": "",
"paymentInstructions": "",
"paymentMethods": [
{}
]
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"categoryTypes\": [\n {\n \"default\": false,\n \"name\": \"\"\n }\n ],\n \"deposit\": {\n \"amount\": {\n \"currency\": \"\",\n \"value\": \"\"\n },\n \"dueIn\": {\n \"unit\": \"\",\n \"value\": 0\n },\n \"paymentMethods\": [\n {\n \"brands\": [],\n \"paymentMethodType\": \"\",\n \"recipientAccountReference\": {\n \"referenceId\": \"\",\n \"referenceType\": \"\"\n }\n }\n ]\n },\n \"description\": \"\",\n \"fullPaymentDueIn\": {},\n \"immediatePay\": false,\n \"marketplaceId\": \"\",\n \"name\": \"\",\n \"paymentInstructions\": \"\",\n \"paymentMethods\": [\n {}\n ]\n}"
headers = { 'content-type': "application/json" }
conn.request("PUT", "/baseUrl/payment_policy/:payment_policy_id", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/payment_policy/:payment_policy_id"
payload = {
"categoryTypes": [
{
"default": False,
"name": ""
}
],
"deposit": {
"amount": {
"currency": "",
"value": ""
},
"dueIn": {
"unit": "",
"value": 0
},
"paymentMethods": [
{
"brands": [],
"paymentMethodType": "",
"recipientAccountReference": {
"referenceId": "",
"referenceType": ""
}
}
]
},
"description": "",
"fullPaymentDueIn": {},
"immediatePay": False,
"marketplaceId": "",
"name": "",
"paymentInstructions": "",
"paymentMethods": [{}]
}
headers = {"content-type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/payment_policy/:payment_policy_id"
payload <- "{\n \"categoryTypes\": [\n {\n \"default\": false,\n \"name\": \"\"\n }\n ],\n \"deposit\": {\n \"amount\": {\n \"currency\": \"\",\n \"value\": \"\"\n },\n \"dueIn\": {\n \"unit\": \"\",\n \"value\": 0\n },\n \"paymentMethods\": [\n {\n \"brands\": [],\n \"paymentMethodType\": \"\",\n \"recipientAccountReference\": {\n \"referenceId\": \"\",\n \"referenceType\": \"\"\n }\n }\n ]\n },\n \"description\": \"\",\n \"fullPaymentDueIn\": {},\n \"immediatePay\": false,\n \"marketplaceId\": \"\",\n \"name\": \"\",\n \"paymentInstructions\": \"\",\n \"paymentMethods\": [\n {}\n ]\n}"
encode <- "json"
response <- VERB("PUT", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/payment_policy/:payment_policy_id")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"categoryTypes\": [\n {\n \"default\": false,\n \"name\": \"\"\n }\n ],\n \"deposit\": {\n \"amount\": {\n \"currency\": \"\",\n \"value\": \"\"\n },\n \"dueIn\": {\n \"unit\": \"\",\n \"value\": 0\n },\n \"paymentMethods\": [\n {\n \"brands\": [],\n \"paymentMethodType\": \"\",\n \"recipientAccountReference\": {\n \"referenceId\": \"\",\n \"referenceType\": \"\"\n }\n }\n ]\n },\n \"description\": \"\",\n \"fullPaymentDueIn\": {},\n \"immediatePay\": false,\n \"marketplaceId\": \"\",\n \"name\": \"\",\n \"paymentInstructions\": \"\",\n \"paymentMethods\": [\n {}\n ]\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.put('/baseUrl/payment_policy/:payment_policy_id') do |req|
req.body = "{\n \"categoryTypes\": [\n {\n \"default\": false,\n \"name\": \"\"\n }\n ],\n \"deposit\": {\n \"amount\": {\n \"currency\": \"\",\n \"value\": \"\"\n },\n \"dueIn\": {\n \"unit\": \"\",\n \"value\": 0\n },\n \"paymentMethods\": [\n {\n \"brands\": [],\n \"paymentMethodType\": \"\",\n \"recipientAccountReference\": {\n \"referenceId\": \"\",\n \"referenceType\": \"\"\n }\n }\n ]\n },\n \"description\": \"\",\n \"fullPaymentDueIn\": {},\n \"immediatePay\": false,\n \"marketplaceId\": \"\",\n \"name\": \"\",\n \"paymentInstructions\": \"\",\n \"paymentMethods\": [\n {}\n ]\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}}/payment_policy/:payment_policy_id";
let payload = json!({
"categoryTypes": (
json!({
"default": false,
"name": ""
})
),
"deposit": json!({
"amount": json!({
"currency": "",
"value": ""
}),
"dueIn": json!({
"unit": "",
"value": 0
}),
"paymentMethods": (
json!({
"brands": (),
"paymentMethodType": "",
"recipientAccountReference": json!({
"referenceId": "",
"referenceType": ""
})
})
)
}),
"description": "",
"fullPaymentDueIn": json!({}),
"immediatePay": false,
"marketplaceId": "",
"name": "",
"paymentInstructions": "",
"paymentMethods": (json!({}))
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PUT").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/payment_policy/:payment_policy_id \
--header 'content-type: application/json' \
--data '{
"categoryTypes": [
{
"default": false,
"name": ""
}
],
"deposit": {
"amount": {
"currency": "",
"value": ""
},
"dueIn": {
"unit": "",
"value": 0
},
"paymentMethods": [
{
"brands": [],
"paymentMethodType": "",
"recipientAccountReference": {
"referenceId": "",
"referenceType": ""
}
}
]
},
"description": "",
"fullPaymentDueIn": {},
"immediatePay": false,
"marketplaceId": "",
"name": "",
"paymentInstructions": "",
"paymentMethods": [
{}
]
}'
echo '{
"categoryTypes": [
{
"default": false,
"name": ""
}
],
"deposit": {
"amount": {
"currency": "",
"value": ""
},
"dueIn": {
"unit": "",
"value": 0
},
"paymentMethods": [
{
"brands": [],
"paymentMethodType": "",
"recipientAccountReference": {
"referenceId": "",
"referenceType": ""
}
}
]
},
"description": "",
"fullPaymentDueIn": {},
"immediatePay": false,
"marketplaceId": "",
"name": "",
"paymentInstructions": "",
"paymentMethods": [
{}
]
}' | \
http PUT {{baseUrl}}/payment_policy/:payment_policy_id \
content-type:application/json
wget --quiet \
--method PUT \
--header 'content-type: application/json' \
--body-data '{\n "categoryTypes": [\n {\n "default": false,\n "name": ""\n }\n ],\n "deposit": {\n "amount": {\n "currency": "",\n "value": ""\n },\n "dueIn": {\n "unit": "",\n "value": 0\n },\n "paymentMethods": [\n {\n "brands": [],\n "paymentMethodType": "",\n "recipientAccountReference": {\n "referenceId": "",\n "referenceType": ""\n }\n }\n ]\n },\n "description": "",\n "fullPaymentDueIn": {},\n "immediatePay": false,\n "marketplaceId": "",\n "name": "",\n "paymentInstructions": "",\n "paymentMethods": [\n {}\n ]\n}' \
--output-document \
- {{baseUrl}}/payment_policy/:payment_policy_id
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"categoryTypes": [
[
"default": false,
"name": ""
]
],
"deposit": [
"amount": [
"currency": "",
"value": ""
],
"dueIn": [
"unit": "",
"value": 0
],
"paymentMethods": [
[
"brands": [],
"paymentMethodType": "",
"recipientAccountReference": [
"referenceId": "",
"referenceType": ""
]
]
]
],
"description": "",
"fullPaymentDueIn": [],
"immediatePay": false,
"marketplaceId": "",
"name": "",
"paymentInstructions": "",
"paymentMethods": [[]]
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/payment_policy/:payment_policy_id")! 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()
GET
getPaymentsProgram
{{baseUrl}}/payments_program/:marketplace_id/:payments_program_type
QUERY PARAMS
marketplace_id
payments_program_type
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/payments_program/:marketplace_id/:payments_program_type");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/payments_program/:marketplace_id/:payments_program_type")
require "http/client"
url = "{{baseUrl}}/payments_program/:marketplace_id/:payments_program_type"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/payments_program/:marketplace_id/:payments_program_type"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/payments_program/:marketplace_id/:payments_program_type");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/payments_program/:marketplace_id/:payments_program_type"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/payments_program/:marketplace_id/:payments_program_type HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/payments_program/:marketplace_id/:payments_program_type")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/payments_program/:marketplace_id/:payments_program_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}}/payments_program/:marketplace_id/:payments_program_type")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/payments_program/:marketplace_id/:payments_program_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}}/payments_program/:marketplace_id/:payments_program_type');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/payments_program/:marketplace_id/:payments_program_type'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/payments_program/:marketplace_id/:payments_program_type';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/payments_program/:marketplace_id/:payments_program_type',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/payments_program/:marketplace_id/:payments_program_type")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/payments_program/:marketplace_id/:payments_program_type',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'GET',
url: '{{baseUrl}}/payments_program/:marketplace_id/:payments_program_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}}/payments_program/:marketplace_id/:payments_program_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}}/payments_program/:marketplace_id/:payments_program_type'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/payments_program/:marketplace_id/:payments_program_type';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/payments_program/:marketplace_id/:payments_program_type"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/payments_program/:marketplace_id/:payments_program_type" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/payments_program/:marketplace_id/:payments_program_type",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/payments_program/:marketplace_id/:payments_program_type');
echo $response->getBody();
setUrl('{{baseUrl}}/payments_program/:marketplace_id/:payments_program_type');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/payments_program/:marketplace_id/:payments_program_type');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/payments_program/:marketplace_id/:payments_program_type' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/payments_program/:marketplace_id/:payments_program_type' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/payments_program/:marketplace_id/:payments_program_type")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/payments_program/:marketplace_id/:payments_program_type"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/payments_program/:marketplace_id/:payments_program_type"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/payments_program/:marketplace_id/:payments_program_type")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/payments_program/:marketplace_id/:payments_program_type') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/payments_program/:marketplace_id/:payments_program_type";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/payments_program/:marketplace_id/:payments_program_type
http GET {{baseUrl}}/payments_program/:marketplace_id/:payments_program_type
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/payments_program/:marketplace_id/:payments_program_type
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/payments_program/:marketplace_id/:payments_program_type")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
getPrivileges
{{baseUrl}}/privilege
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/privilege");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/privilege")
require "http/client"
url = "{{baseUrl}}/privilege"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/privilege"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/privilege");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/privilege"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/privilege HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/privilege")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/privilege"))
.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}}/privilege")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/privilege")
.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}}/privilege');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/privilege'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/privilege';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/privilege',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/privilege")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/privilege',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {method: 'GET', url: '{{baseUrl}}/privilege'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/privilege');
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}}/privilege'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/privilege';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/privilege"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/privilege" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/privilege",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/privilege');
echo $response->getBody();
setUrl('{{baseUrl}}/privilege');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/privilege');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/privilege' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/privilege' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/privilege")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/privilege"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/privilege"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/privilege")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/privilege') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/privilege";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/privilege
http GET {{baseUrl}}/privilege
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/privilege
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/privilege")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
getOptedInPrograms
{{baseUrl}}/program/get_opted_in_programs
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/program/get_opted_in_programs");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/program/get_opted_in_programs")
require "http/client"
url = "{{baseUrl}}/program/get_opted_in_programs"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/program/get_opted_in_programs"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/program/get_opted_in_programs");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/program/get_opted_in_programs"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/program/get_opted_in_programs HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/program/get_opted_in_programs")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/program/get_opted_in_programs"))
.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}}/program/get_opted_in_programs")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/program/get_opted_in_programs")
.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}}/program/get_opted_in_programs');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/program/get_opted_in_programs'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/program/get_opted_in_programs';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/program/get_opted_in_programs',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/program/get_opted_in_programs")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/program/get_opted_in_programs',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'GET',
url: '{{baseUrl}}/program/get_opted_in_programs'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/program/get_opted_in_programs');
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}}/program/get_opted_in_programs'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/program/get_opted_in_programs';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/program/get_opted_in_programs"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/program/get_opted_in_programs" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/program/get_opted_in_programs",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/program/get_opted_in_programs');
echo $response->getBody();
setUrl('{{baseUrl}}/program/get_opted_in_programs');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/program/get_opted_in_programs');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/program/get_opted_in_programs' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/program/get_opted_in_programs' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/program/get_opted_in_programs")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/program/get_opted_in_programs"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/program/get_opted_in_programs"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/program/get_opted_in_programs")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/program/get_opted_in_programs') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/program/get_opted_in_programs";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/program/get_opted_in_programs
http GET {{baseUrl}}/program/get_opted_in_programs
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/program/get_opted_in_programs
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/program/get_opted_in_programs")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
optInToProgram
{{baseUrl}}/program/opt_in
BODY json
{
"programType": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/program/opt_in");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"programType\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/program/opt_in" {:content-type :json
:form-params {:programType ""}})
require "http/client"
url = "{{baseUrl}}/program/opt_in"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"programType\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/program/opt_in"),
Content = new StringContent("{\n \"programType\": \"\"\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}}/program/opt_in");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"programType\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/program/opt_in"
payload := strings.NewReader("{\n \"programType\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/program/opt_in HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 23
{
"programType": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/program/opt_in")
.setHeader("content-type", "application/json")
.setBody("{\n \"programType\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/program/opt_in"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"programType\": \"\"\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 \"programType\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/program/opt_in")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/program/opt_in")
.header("content-type", "application/json")
.body("{\n \"programType\": \"\"\n}")
.asString();
const data = JSON.stringify({
programType: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/program/opt_in');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/program/opt_in',
headers: {'content-type': 'application/json'},
data: {programType: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/program/opt_in';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"programType":""}'
};
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}}/program/opt_in',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "programType": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"programType\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/program/opt_in")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/program/opt_in',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({programType: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/program/opt_in',
headers: {'content-type': 'application/json'},
body: {programType: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/program/opt_in');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
programType: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/program/opt_in',
headers: {'content-type': 'application/json'},
data: {programType: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/program/opt_in';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"programType":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"programType": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/program/opt_in"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/program/opt_in" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"programType\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/program/opt_in",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'programType' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/program/opt_in', [
'body' => '{
"programType": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/program/opt_in');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'programType' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'programType' => ''
]));
$request->setRequestUrl('{{baseUrl}}/program/opt_in');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/program/opt_in' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"programType": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/program/opt_in' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"programType": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"programType\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/program/opt_in", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/program/opt_in"
payload = { "programType": "" }
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/program/opt_in"
payload <- "{\n \"programType\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/program/opt_in")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"programType\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/program/opt_in') do |req|
req.body = "{\n \"programType\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/program/opt_in";
let payload = json!({"programType": ""});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/program/opt_in \
--header 'content-type: application/json' \
--data '{
"programType": ""
}'
echo '{
"programType": ""
}' | \
http POST {{baseUrl}}/program/opt_in \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "programType": ""\n}' \
--output-document \
- {{baseUrl}}/program/opt_in
import Foundation
let headers = ["content-type": "application/json"]
let parameters = ["programType": ""] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/program/opt_in")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
optOutOfProgram
{{baseUrl}}/program/opt_out
BODY json
{
"programType": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/program/opt_out");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"programType\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/program/opt_out" {:content-type :json
:form-params {:programType ""}})
require "http/client"
url = "{{baseUrl}}/program/opt_out"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"programType\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/program/opt_out"),
Content = new StringContent("{\n \"programType\": \"\"\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}}/program/opt_out");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"programType\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/program/opt_out"
payload := strings.NewReader("{\n \"programType\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/program/opt_out HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 23
{
"programType": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/program/opt_out")
.setHeader("content-type", "application/json")
.setBody("{\n \"programType\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/program/opt_out"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"programType\": \"\"\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 \"programType\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/program/opt_out")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/program/opt_out")
.header("content-type", "application/json")
.body("{\n \"programType\": \"\"\n}")
.asString();
const data = JSON.stringify({
programType: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/program/opt_out');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/program/opt_out',
headers: {'content-type': 'application/json'},
data: {programType: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/program/opt_out';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"programType":""}'
};
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}}/program/opt_out',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "programType": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"programType\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/program/opt_out")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/program/opt_out',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({programType: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/program/opt_out',
headers: {'content-type': 'application/json'},
body: {programType: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/program/opt_out');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
programType: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/program/opt_out',
headers: {'content-type': 'application/json'},
data: {programType: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/program/opt_out';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"programType":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"programType": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/program/opt_out"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/program/opt_out" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"programType\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/program/opt_out",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'programType' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/program/opt_out', [
'body' => '{
"programType": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/program/opt_out');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'programType' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'programType' => ''
]));
$request->setRequestUrl('{{baseUrl}}/program/opt_out');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/program/opt_out' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"programType": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/program/opt_out' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"programType": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"programType\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/program/opt_out", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/program/opt_out"
payload = { "programType": "" }
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/program/opt_out"
payload <- "{\n \"programType\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/program/opt_out")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"programType\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/program/opt_out') do |req|
req.body = "{\n \"programType\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/program/opt_out";
let payload = json!({"programType": ""});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/program/opt_out \
--header 'content-type: application/json' \
--data '{
"programType": ""
}'
echo '{
"programType": ""
}' | \
http POST {{baseUrl}}/program/opt_out \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "programType": ""\n}' \
--output-document \
- {{baseUrl}}/program/opt_out
import Foundation
let headers = ["content-type": "application/json"]
let parameters = ["programType": ""] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/program/opt_out")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
getRateTables
{{baseUrl}}/rate_table
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/rate_table");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/rate_table")
require "http/client"
url = "{{baseUrl}}/rate_table"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/rate_table"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/rate_table");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/rate_table"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/rate_table HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/rate_table")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/rate_table"))
.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}}/rate_table")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/rate_table")
.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}}/rate_table');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/rate_table'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/rate_table';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/rate_table',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/rate_table")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/rate_table',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {method: 'GET', url: '{{baseUrl}}/rate_table'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/rate_table');
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}}/rate_table'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/rate_table';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/rate_table"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/rate_table" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/rate_table",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/rate_table');
echo $response->getBody();
setUrl('{{baseUrl}}/rate_table');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/rate_table');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/rate_table' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/rate_table' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/rate_table")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/rate_table"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/rate_table"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/rate_table")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/rate_table') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/rate_table";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/rate_table
http GET {{baseUrl}}/rate_table
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/rate_table
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/rate_table")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
createReturnPolicy
{{baseUrl}}/return_policy
BODY json
{
"categoryTypes": [
{
"default": false,
"name": ""
}
],
"description": "",
"extendedHolidayReturnsOffered": false,
"internationalOverride": {
"returnMethod": "",
"returnPeriod": {
"unit": "",
"value": 0
},
"returnShippingCostPayer": "",
"returnsAccepted": false
},
"marketplaceId": "",
"name": "",
"refundMethod": "",
"restockingFeePercentage": "",
"returnInstructions": "",
"returnMethod": "",
"returnPeriod": {},
"returnShippingCostPayer": "",
"returnsAccepted": false
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/return_policy");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"categoryTypes\": [\n {\n \"default\": false,\n \"name\": \"\"\n }\n ],\n \"description\": \"\",\n \"extendedHolidayReturnsOffered\": false,\n \"internationalOverride\": {\n \"returnMethod\": \"\",\n \"returnPeriod\": {\n \"unit\": \"\",\n \"value\": 0\n },\n \"returnShippingCostPayer\": \"\",\n \"returnsAccepted\": false\n },\n \"marketplaceId\": \"\",\n \"name\": \"\",\n \"refundMethod\": \"\",\n \"restockingFeePercentage\": \"\",\n \"returnInstructions\": \"\",\n \"returnMethod\": \"\",\n \"returnPeriod\": {},\n \"returnShippingCostPayer\": \"\",\n \"returnsAccepted\": false\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/return_policy" {:content-type :json
:form-params {:categoryTypes [{:default false
:name ""}]
:description ""
:extendedHolidayReturnsOffered false
:internationalOverride {:returnMethod ""
:returnPeriod {:unit ""
:value 0}
:returnShippingCostPayer ""
:returnsAccepted false}
:marketplaceId ""
:name ""
:refundMethod ""
:restockingFeePercentage ""
:returnInstructions ""
:returnMethod ""
:returnPeriod {}
:returnShippingCostPayer ""
:returnsAccepted false}})
require "http/client"
url = "{{baseUrl}}/return_policy"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"categoryTypes\": [\n {\n \"default\": false,\n \"name\": \"\"\n }\n ],\n \"description\": \"\",\n \"extendedHolidayReturnsOffered\": false,\n \"internationalOverride\": {\n \"returnMethod\": \"\",\n \"returnPeriod\": {\n \"unit\": \"\",\n \"value\": 0\n },\n \"returnShippingCostPayer\": \"\",\n \"returnsAccepted\": false\n },\n \"marketplaceId\": \"\",\n \"name\": \"\",\n \"refundMethod\": \"\",\n \"restockingFeePercentage\": \"\",\n \"returnInstructions\": \"\",\n \"returnMethod\": \"\",\n \"returnPeriod\": {},\n \"returnShippingCostPayer\": \"\",\n \"returnsAccepted\": false\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/return_policy"),
Content = new StringContent("{\n \"categoryTypes\": [\n {\n \"default\": false,\n \"name\": \"\"\n }\n ],\n \"description\": \"\",\n \"extendedHolidayReturnsOffered\": false,\n \"internationalOverride\": {\n \"returnMethod\": \"\",\n \"returnPeriod\": {\n \"unit\": \"\",\n \"value\": 0\n },\n \"returnShippingCostPayer\": \"\",\n \"returnsAccepted\": false\n },\n \"marketplaceId\": \"\",\n \"name\": \"\",\n \"refundMethod\": \"\",\n \"restockingFeePercentage\": \"\",\n \"returnInstructions\": \"\",\n \"returnMethod\": \"\",\n \"returnPeriod\": {},\n \"returnShippingCostPayer\": \"\",\n \"returnsAccepted\": 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}}/return_policy");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"categoryTypes\": [\n {\n \"default\": false,\n \"name\": \"\"\n }\n ],\n \"description\": \"\",\n \"extendedHolidayReturnsOffered\": false,\n \"internationalOverride\": {\n \"returnMethod\": \"\",\n \"returnPeriod\": {\n \"unit\": \"\",\n \"value\": 0\n },\n \"returnShippingCostPayer\": \"\",\n \"returnsAccepted\": false\n },\n \"marketplaceId\": \"\",\n \"name\": \"\",\n \"refundMethod\": \"\",\n \"restockingFeePercentage\": \"\",\n \"returnInstructions\": \"\",\n \"returnMethod\": \"\",\n \"returnPeriod\": {},\n \"returnShippingCostPayer\": \"\",\n \"returnsAccepted\": false\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/return_policy"
payload := strings.NewReader("{\n \"categoryTypes\": [\n {\n \"default\": false,\n \"name\": \"\"\n }\n ],\n \"description\": \"\",\n \"extendedHolidayReturnsOffered\": false,\n \"internationalOverride\": {\n \"returnMethod\": \"\",\n \"returnPeriod\": {\n \"unit\": \"\",\n \"value\": 0\n },\n \"returnShippingCostPayer\": \"\",\n \"returnsAccepted\": false\n },\n \"marketplaceId\": \"\",\n \"name\": \"\",\n \"refundMethod\": \"\",\n \"restockingFeePercentage\": \"\",\n \"returnInstructions\": \"\",\n \"returnMethod\": \"\",\n \"returnPeriod\": {},\n \"returnShippingCostPayer\": \"\",\n \"returnsAccepted\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/return_policy HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 555
{
"categoryTypes": [
{
"default": false,
"name": ""
}
],
"description": "",
"extendedHolidayReturnsOffered": false,
"internationalOverride": {
"returnMethod": "",
"returnPeriod": {
"unit": "",
"value": 0
},
"returnShippingCostPayer": "",
"returnsAccepted": false
},
"marketplaceId": "",
"name": "",
"refundMethod": "",
"restockingFeePercentage": "",
"returnInstructions": "",
"returnMethod": "",
"returnPeriod": {},
"returnShippingCostPayer": "",
"returnsAccepted": false
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/return_policy")
.setHeader("content-type", "application/json")
.setBody("{\n \"categoryTypes\": [\n {\n \"default\": false,\n \"name\": \"\"\n }\n ],\n \"description\": \"\",\n \"extendedHolidayReturnsOffered\": false,\n \"internationalOverride\": {\n \"returnMethod\": \"\",\n \"returnPeriod\": {\n \"unit\": \"\",\n \"value\": 0\n },\n \"returnShippingCostPayer\": \"\",\n \"returnsAccepted\": false\n },\n \"marketplaceId\": \"\",\n \"name\": \"\",\n \"refundMethod\": \"\",\n \"restockingFeePercentage\": \"\",\n \"returnInstructions\": \"\",\n \"returnMethod\": \"\",\n \"returnPeriod\": {},\n \"returnShippingCostPayer\": \"\",\n \"returnsAccepted\": false\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/return_policy"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"categoryTypes\": [\n {\n \"default\": false,\n \"name\": \"\"\n }\n ],\n \"description\": \"\",\n \"extendedHolidayReturnsOffered\": false,\n \"internationalOverride\": {\n \"returnMethod\": \"\",\n \"returnPeriod\": {\n \"unit\": \"\",\n \"value\": 0\n },\n \"returnShippingCostPayer\": \"\",\n \"returnsAccepted\": false\n },\n \"marketplaceId\": \"\",\n \"name\": \"\",\n \"refundMethod\": \"\",\n \"restockingFeePercentage\": \"\",\n \"returnInstructions\": \"\",\n \"returnMethod\": \"\",\n \"returnPeriod\": {},\n \"returnShippingCostPayer\": \"\",\n \"returnsAccepted\": 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 \"categoryTypes\": [\n {\n \"default\": false,\n \"name\": \"\"\n }\n ],\n \"description\": \"\",\n \"extendedHolidayReturnsOffered\": false,\n \"internationalOverride\": {\n \"returnMethod\": \"\",\n \"returnPeriod\": {\n \"unit\": \"\",\n \"value\": 0\n },\n \"returnShippingCostPayer\": \"\",\n \"returnsAccepted\": false\n },\n \"marketplaceId\": \"\",\n \"name\": \"\",\n \"refundMethod\": \"\",\n \"restockingFeePercentage\": \"\",\n \"returnInstructions\": \"\",\n \"returnMethod\": \"\",\n \"returnPeriod\": {},\n \"returnShippingCostPayer\": \"\",\n \"returnsAccepted\": false\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/return_policy")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/return_policy")
.header("content-type", "application/json")
.body("{\n \"categoryTypes\": [\n {\n \"default\": false,\n \"name\": \"\"\n }\n ],\n \"description\": \"\",\n \"extendedHolidayReturnsOffered\": false,\n \"internationalOverride\": {\n \"returnMethod\": \"\",\n \"returnPeriod\": {\n \"unit\": \"\",\n \"value\": 0\n },\n \"returnShippingCostPayer\": \"\",\n \"returnsAccepted\": false\n },\n \"marketplaceId\": \"\",\n \"name\": \"\",\n \"refundMethod\": \"\",\n \"restockingFeePercentage\": \"\",\n \"returnInstructions\": \"\",\n \"returnMethod\": \"\",\n \"returnPeriod\": {},\n \"returnShippingCostPayer\": \"\",\n \"returnsAccepted\": false\n}")
.asString();
const data = JSON.stringify({
categoryTypes: [
{
default: false,
name: ''
}
],
description: '',
extendedHolidayReturnsOffered: false,
internationalOverride: {
returnMethod: '',
returnPeriod: {
unit: '',
value: 0
},
returnShippingCostPayer: '',
returnsAccepted: false
},
marketplaceId: '',
name: '',
refundMethod: '',
restockingFeePercentage: '',
returnInstructions: '',
returnMethod: '',
returnPeriod: {},
returnShippingCostPayer: '',
returnsAccepted: false
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/return_policy');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/return_policy',
headers: {'content-type': 'application/json'},
data: {
categoryTypes: [{default: false, name: ''}],
description: '',
extendedHolidayReturnsOffered: false,
internationalOverride: {
returnMethod: '',
returnPeriod: {unit: '', value: 0},
returnShippingCostPayer: '',
returnsAccepted: false
},
marketplaceId: '',
name: '',
refundMethod: '',
restockingFeePercentage: '',
returnInstructions: '',
returnMethod: '',
returnPeriod: {},
returnShippingCostPayer: '',
returnsAccepted: false
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/return_policy';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"categoryTypes":[{"default":false,"name":""}],"description":"","extendedHolidayReturnsOffered":false,"internationalOverride":{"returnMethod":"","returnPeriod":{"unit":"","value":0},"returnShippingCostPayer":"","returnsAccepted":false},"marketplaceId":"","name":"","refundMethod":"","restockingFeePercentage":"","returnInstructions":"","returnMethod":"","returnPeriod":{},"returnShippingCostPayer":"","returnsAccepted":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}}/return_policy',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "categoryTypes": [\n {\n "default": false,\n "name": ""\n }\n ],\n "description": "",\n "extendedHolidayReturnsOffered": false,\n "internationalOverride": {\n "returnMethod": "",\n "returnPeriod": {\n "unit": "",\n "value": 0\n },\n "returnShippingCostPayer": "",\n "returnsAccepted": false\n },\n "marketplaceId": "",\n "name": "",\n "refundMethod": "",\n "restockingFeePercentage": "",\n "returnInstructions": "",\n "returnMethod": "",\n "returnPeriod": {},\n "returnShippingCostPayer": "",\n "returnsAccepted": 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 \"categoryTypes\": [\n {\n \"default\": false,\n \"name\": \"\"\n }\n ],\n \"description\": \"\",\n \"extendedHolidayReturnsOffered\": false,\n \"internationalOverride\": {\n \"returnMethod\": \"\",\n \"returnPeriod\": {\n \"unit\": \"\",\n \"value\": 0\n },\n \"returnShippingCostPayer\": \"\",\n \"returnsAccepted\": false\n },\n \"marketplaceId\": \"\",\n \"name\": \"\",\n \"refundMethod\": \"\",\n \"restockingFeePercentage\": \"\",\n \"returnInstructions\": \"\",\n \"returnMethod\": \"\",\n \"returnPeriod\": {},\n \"returnShippingCostPayer\": \"\",\n \"returnsAccepted\": false\n}")
val request = Request.Builder()
.url("{{baseUrl}}/return_policy")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/return_policy',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
categoryTypes: [{default: false, name: ''}],
description: '',
extendedHolidayReturnsOffered: false,
internationalOverride: {
returnMethod: '',
returnPeriod: {unit: '', value: 0},
returnShippingCostPayer: '',
returnsAccepted: false
},
marketplaceId: '',
name: '',
refundMethod: '',
restockingFeePercentage: '',
returnInstructions: '',
returnMethod: '',
returnPeriod: {},
returnShippingCostPayer: '',
returnsAccepted: false
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/return_policy',
headers: {'content-type': 'application/json'},
body: {
categoryTypes: [{default: false, name: ''}],
description: '',
extendedHolidayReturnsOffered: false,
internationalOverride: {
returnMethod: '',
returnPeriod: {unit: '', value: 0},
returnShippingCostPayer: '',
returnsAccepted: false
},
marketplaceId: '',
name: '',
refundMethod: '',
restockingFeePercentage: '',
returnInstructions: '',
returnMethod: '',
returnPeriod: {},
returnShippingCostPayer: '',
returnsAccepted: 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('POST', '{{baseUrl}}/return_policy');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
categoryTypes: [
{
default: false,
name: ''
}
],
description: '',
extendedHolidayReturnsOffered: false,
internationalOverride: {
returnMethod: '',
returnPeriod: {
unit: '',
value: 0
},
returnShippingCostPayer: '',
returnsAccepted: false
},
marketplaceId: '',
name: '',
refundMethod: '',
restockingFeePercentage: '',
returnInstructions: '',
returnMethod: '',
returnPeriod: {},
returnShippingCostPayer: '',
returnsAccepted: 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: 'POST',
url: '{{baseUrl}}/return_policy',
headers: {'content-type': 'application/json'},
data: {
categoryTypes: [{default: false, name: ''}],
description: '',
extendedHolidayReturnsOffered: false,
internationalOverride: {
returnMethod: '',
returnPeriod: {unit: '', value: 0},
returnShippingCostPayer: '',
returnsAccepted: false
},
marketplaceId: '',
name: '',
refundMethod: '',
restockingFeePercentage: '',
returnInstructions: '',
returnMethod: '',
returnPeriod: {},
returnShippingCostPayer: '',
returnsAccepted: false
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/return_policy';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"categoryTypes":[{"default":false,"name":""}],"description":"","extendedHolidayReturnsOffered":false,"internationalOverride":{"returnMethod":"","returnPeriod":{"unit":"","value":0},"returnShippingCostPayer":"","returnsAccepted":false},"marketplaceId":"","name":"","refundMethod":"","restockingFeePercentage":"","returnInstructions":"","returnMethod":"","returnPeriod":{},"returnShippingCostPayer":"","returnsAccepted":false}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"categoryTypes": @[ @{ @"default": @NO, @"name": @"" } ],
@"description": @"",
@"extendedHolidayReturnsOffered": @NO,
@"internationalOverride": @{ @"returnMethod": @"", @"returnPeriod": @{ @"unit": @"", @"value": @0 }, @"returnShippingCostPayer": @"", @"returnsAccepted": @NO },
@"marketplaceId": @"",
@"name": @"",
@"refundMethod": @"",
@"restockingFeePercentage": @"",
@"returnInstructions": @"",
@"returnMethod": @"",
@"returnPeriod": @{ },
@"returnShippingCostPayer": @"",
@"returnsAccepted": @NO };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/return_policy"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/return_policy" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"categoryTypes\": [\n {\n \"default\": false,\n \"name\": \"\"\n }\n ],\n \"description\": \"\",\n \"extendedHolidayReturnsOffered\": false,\n \"internationalOverride\": {\n \"returnMethod\": \"\",\n \"returnPeriod\": {\n \"unit\": \"\",\n \"value\": 0\n },\n \"returnShippingCostPayer\": \"\",\n \"returnsAccepted\": false\n },\n \"marketplaceId\": \"\",\n \"name\": \"\",\n \"refundMethod\": \"\",\n \"restockingFeePercentage\": \"\",\n \"returnInstructions\": \"\",\n \"returnMethod\": \"\",\n \"returnPeriod\": {},\n \"returnShippingCostPayer\": \"\",\n \"returnsAccepted\": false\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/return_policy",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'categoryTypes' => [
[
'default' => null,
'name' => ''
]
],
'description' => '',
'extendedHolidayReturnsOffered' => null,
'internationalOverride' => [
'returnMethod' => '',
'returnPeriod' => [
'unit' => '',
'value' => 0
],
'returnShippingCostPayer' => '',
'returnsAccepted' => null
],
'marketplaceId' => '',
'name' => '',
'refundMethod' => '',
'restockingFeePercentage' => '',
'returnInstructions' => '',
'returnMethod' => '',
'returnPeriod' => [
],
'returnShippingCostPayer' => '',
'returnsAccepted' => null
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/return_policy', [
'body' => '{
"categoryTypes": [
{
"default": false,
"name": ""
}
],
"description": "",
"extendedHolidayReturnsOffered": false,
"internationalOverride": {
"returnMethod": "",
"returnPeriod": {
"unit": "",
"value": 0
},
"returnShippingCostPayer": "",
"returnsAccepted": false
},
"marketplaceId": "",
"name": "",
"refundMethod": "",
"restockingFeePercentage": "",
"returnInstructions": "",
"returnMethod": "",
"returnPeriod": {},
"returnShippingCostPayer": "",
"returnsAccepted": false
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/return_policy');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'categoryTypes' => [
[
'default' => null,
'name' => ''
]
],
'description' => '',
'extendedHolidayReturnsOffered' => null,
'internationalOverride' => [
'returnMethod' => '',
'returnPeriod' => [
'unit' => '',
'value' => 0
],
'returnShippingCostPayer' => '',
'returnsAccepted' => null
],
'marketplaceId' => '',
'name' => '',
'refundMethod' => '',
'restockingFeePercentage' => '',
'returnInstructions' => '',
'returnMethod' => '',
'returnPeriod' => [
],
'returnShippingCostPayer' => '',
'returnsAccepted' => null
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'categoryTypes' => [
[
'default' => null,
'name' => ''
]
],
'description' => '',
'extendedHolidayReturnsOffered' => null,
'internationalOverride' => [
'returnMethod' => '',
'returnPeriod' => [
'unit' => '',
'value' => 0
],
'returnShippingCostPayer' => '',
'returnsAccepted' => null
],
'marketplaceId' => '',
'name' => '',
'refundMethod' => '',
'restockingFeePercentage' => '',
'returnInstructions' => '',
'returnMethod' => '',
'returnPeriod' => [
],
'returnShippingCostPayer' => '',
'returnsAccepted' => null
]));
$request->setRequestUrl('{{baseUrl}}/return_policy');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/return_policy' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"categoryTypes": [
{
"default": false,
"name": ""
}
],
"description": "",
"extendedHolidayReturnsOffered": false,
"internationalOverride": {
"returnMethod": "",
"returnPeriod": {
"unit": "",
"value": 0
},
"returnShippingCostPayer": "",
"returnsAccepted": false
},
"marketplaceId": "",
"name": "",
"refundMethod": "",
"restockingFeePercentage": "",
"returnInstructions": "",
"returnMethod": "",
"returnPeriod": {},
"returnShippingCostPayer": "",
"returnsAccepted": false
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/return_policy' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"categoryTypes": [
{
"default": false,
"name": ""
}
],
"description": "",
"extendedHolidayReturnsOffered": false,
"internationalOverride": {
"returnMethod": "",
"returnPeriod": {
"unit": "",
"value": 0
},
"returnShippingCostPayer": "",
"returnsAccepted": false
},
"marketplaceId": "",
"name": "",
"refundMethod": "",
"restockingFeePercentage": "",
"returnInstructions": "",
"returnMethod": "",
"returnPeriod": {},
"returnShippingCostPayer": "",
"returnsAccepted": false
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"categoryTypes\": [\n {\n \"default\": false,\n \"name\": \"\"\n }\n ],\n \"description\": \"\",\n \"extendedHolidayReturnsOffered\": false,\n \"internationalOverride\": {\n \"returnMethod\": \"\",\n \"returnPeriod\": {\n \"unit\": \"\",\n \"value\": 0\n },\n \"returnShippingCostPayer\": \"\",\n \"returnsAccepted\": false\n },\n \"marketplaceId\": \"\",\n \"name\": \"\",\n \"refundMethod\": \"\",\n \"restockingFeePercentage\": \"\",\n \"returnInstructions\": \"\",\n \"returnMethod\": \"\",\n \"returnPeriod\": {},\n \"returnShippingCostPayer\": \"\",\n \"returnsAccepted\": false\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/return_policy", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/return_policy"
payload = {
"categoryTypes": [
{
"default": False,
"name": ""
}
],
"description": "",
"extendedHolidayReturnsOffered": False,
"internationalOverride": {
"returnMethod": "",
"returnPeriod": {
"unit": "",
"value": 0
},
"returnShippingCostPayer": "",
"returnsAccepted": False
},
"marketplaceId": "",
"name": "",
"refundMethod": "",
"restockingFeePercentage": "",
"returnInstructions": "",
"returnMethod": "",
"returnPeriod": {},
"returnShippingCostPayer": "",
"returnsAccepted": False
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/return_policy"
payload <- "{\n \"categoryTypes\": [\n {\n \"default\": false,\n \"name\": \"\"\n }\n ],\n \"description\": \"\",\n \"extendedHolidayReturnsOffered\": false,\n \"internationalOverride\": {\n \"returnMethod\": \"\",\n \"returnPeriod\": {\n \"unit\": \"\",\n \"value\": 0\n },\n \"returnShippingCostPayer\": \"\",\n \"returnsAccepted\": false\n },\n \"marketplaceId\": \"\",\n \"name\": \"\",\n \"refundMethod\": \"\",\n \"restockingFeePercentage\": \"\",\n \"returnInstructions\": \"\",\n \"returnMethod\": \"\",\n \"returnPeriod\": {},\n \"returnShippingCostPayer\": \"\",\n \"returnsAccepted\": false\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/return_policy")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"categoryTypes\": [\n {\n \"default\": false,\n \"name\": \"\"\n }\n ],\n \"description\": \"\",\n \"extendedHolidayReturnsOffered\": false,\n \"internationalOverride\": {\n \"returnMethod\": \"\",\n \"returnPeriod\": {\n \"unit\": \"\",\n \"value\": 0\n },\n \"returnShippingCostPayer\": \"\",\n \"returnsAccepted\": false\n },\n \"marketplaceId\": \"\",\n \"name\": \"\",\n \"refundMethod\": \"\",\n \"restockingFeePercentage\": \"\",\n \"returnInstructions\": \"\",\n \"returnMethod\": \"\",\n \"returnPeriod\": {},\n \"returnShippingCostPayer\": \"\",\n \"returnsAccepted\": false\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/return_policy') do |req|
req.body = "{\n \"categoryTypes\": [\n {\n \"default\": false,\n \"name\": \"\"\n }\n ],\n \"description\": \"\",\n \"extendedHolidayReturnsOffered\": false,\n \"internationalOverride\": {\n \"returnMethod\": \"\",\n \"returnPeriod\": {\n \"unit\": \"\",\n \"value\": 0\n },\n \"returnShippingCostPayer\": \"\",\n \"returnsAccepted\": false\n },\n \"marketplaceId\": \"\",\n \"name\": \"\",\n \"refundMethod\": \"\",\n \"restockingFeePercentage\": \"\",\n \"returnInstructions\": \"\",\n \"returnMethod\": \"\",\n \"returnPeriod\": {},\n \"returnShippingCostPayer\": \"\",\n \"returnsAccepted\": false\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/return_policy";
let payload = json!({
"categoryTypes": (
json!({
"default": false,
"name": ""
})
),
"description": "",
"extendedHolidayReturnsOffered": false,
"internationalOverride": json!({
"returnMethod": "",
"returnPeriod": json!({
"unit": "",
"value": 0
}),
"returnShippingCostPayer": "",
"returnsAccepted": false
}),
"marketplaceId": "",
"name": "",
"refundMethod": "",
"restockingFeePercentage": "",
"returnInstructions": "",
"returnMethod": "",
"returnPeriod": json!({}),
"returnShippingCostPayer": "",
"returnsAccepted": false
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/return_policy \
--header 'content-type: application/json' \
--data '{
"categoryTypes": [
{
"default": false,
"name": ""
}
],
"description": "",
"extendedHolidayReturnsOffered": false,
"internationalOverride": {
"returnMethod": "",
"returnPeriod": {
"unit": "",
"value": 0
},
"returnShippingCostPayer": "",
"returnsAccepted": false
},
"marketplaceId": "",
"name": "",
"refundMethod": "",
"restockingFeePercentage": "",
"returnInstructions": "",
"returnMethod": "",
"returnPeriod": {},
"returnShippingCostPayer": "",
"returnsAccepted": false
}'
echo '{
"categoryTypes": [
{
"default": false,
"name": ""
}
],
"description": "",
"extendedHolidayReturnsOffered": false,
"internationalOverride": {
"returnMethod": "",
"returnPeriod": {
"unit": "",
"value": 0
},
"returnShippingCostPayer": "",
"returnsAccepted": false
},
"marketplaceId": "",
"name": "",
"refundMethod": "",
"restockingFeePercentage": "",
"returnInstructions": "",
"returnMethod": "",
"returnPeriod": {},
"returnShippingCostPayer": "",
"returnsAccepted": false
}' | \
http POST {{baseUrl}}/return_policy \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "categoryTypes": [\n {\n "default": false,\n "name": ""\n }\n ],\n "description": "",\n "extendedHolidayReturnsOffered": false,\n "internationalOverride": {\n "returnMethod": "",\n "returnPeriod": {\n "unit": "",\n "value": 0\n },\n "returnShippingCostPayer": "",\n "returnsAccepted": false\n },\n "marketplaceId": "",\n "name": "",\n "refundMethod": "",\n "restockingFeePercentage": "",\n "returnInstructions": "",\n "returnMethod": "",\n "returnPeriod": {},\n "returnShippingCostPayer": "",\n "returnsAccepted": false\n}' \
--output-document \
- {{baseUrl}}/return_policy
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"categoryTypes": [
[
"default": false,
"name": ""
]
],
"description": "",
"extendedHolidayReturnsOffered": false,
"internationalOverride": [
"returnMethod": "",
"returnPeriod": [
"unit": "",
"value": 0
],
"returnShippingCostPayer": "",
"returnsAccepted": false
],
"marketplaceId": "",
"name": "",
"refundMethod": "",
"restockingFeePercentage": "",
"returnInstructions": "",
"returnMethod": "",
"returnPeriod": [],
"returnShippingCostPayer": "",
"returnsAccepted": false
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/return_policy")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
DELETE
deleteReturnPolicy
{{baseUrl}}/return_policy/:return_policy_id
QUERY PARAMS
return_policy_id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/return_policy/:return_policy_id");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/delete "{{baseUrl}}/return_policy/:return_policy_id")
require "http/client"
url = "{{baseUrl}}/return_policy/:return_policy_id"
response = HTTP::Client.delete url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Delete,
RequestUri = new Uri("{{baseUrl}}/return_policy/:return_policy_id"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/return_policy/:return_policy_id");
var request = new RestRequest("", Method.Delete);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/return_policy/:return_policy_id"
req, _ := http.NewRequest("DELETE", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
DELETE /baseUrl/return_policy/:return_policy_id HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/return_policy/:return_policy_id")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/return_policy/:return_policy_id"))
.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}}/return_policy/:return_policy_id")
.delete(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/return_policy/:return_policy_id")
.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}}/return_policy/:return_policy_id');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'DELETE',
url: '{{baseUrl}}/return_policy/:return_policy_id'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/return_policy/:return_policy_id';
const options = {method: 'DELETE'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/return_policy/:return_policy_id',
method: 'DELETE',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/return_policy/:return_policy_id")
.delete(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'DELETE',
hostname: 'example.com',
port: null,
path: '/baseUrl/return_policy/:return_policy_id',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'DELETE',
url: '{{baseUrl}}/return_policy/:return_policy_id'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('DELETE', '{{baseUrl}}/return_policy/:return_policy_id');
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}}/return_policy/:return_policy_id'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/return_policy/:return_policy_id';
const options = {method: 'DELETE'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/return_policy/:return_policy_id"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"DELETE"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/return_policy/:return_policy_id" in
Client.call `DELETE uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/return_policy/:return_policy_id",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('DELETE', '{{baseUrl}}/return_policy/:return_policy_id');
echo $response->getBody();
setUrl('{{baseUrl}}/return_policy/:return_policy_id');
$request->setMethod(HTTP_METH_DELETE);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/return_policy/:return_policy_id');
$request->setRequestMethod('DELETE');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/return_policy/:return_policy_id' -Method DELETE
$response = Invoke-RestMethod -Uri '{{baseUrl}}/return_policy/:return_policy_id' -Method DELETE
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("DELETE", "/baseUrl/return_policy/:return_policy_id")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/return_policy/:return_policy_id"
response = requests.delete(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/return_policy/:return_policy_id"
response <- VERB("DELETE", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/return_policy/:return_policy_id")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.delete('/baseUrl/return_policy/:return_policy_id') do |req|
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/return_policy/:return_policy_id";
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("DELETE").unwrap(), url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request DELETE \
--url {{baseUrl}}/return_policy/:return_policy_id
http DELETE {{baseUrl}}/return_policy/:return_policy_id
wget --quiet \
--method DELETE \
--output-document \
- {{baseUrl}}/return_policy/:return_policy_id
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/return_policy/:return_policy_id")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "DELETE"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
getReturnPolicies
{{baseUrl}}/return_policy
QUERY PARAMS
marketplace_id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/return_policy?marketplace_id=");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/return_policy" {:query-params {:marketplace_id ""}})
require "http/client"
url = "{{baseUrl}}/return_policy?marketplace_id="
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/return_policy?marketplace_id="),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/return_policy?marketplace_id=");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/return_policy?marketplace_id="
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/return_policy?marketplace_id= HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/return_policy?marketplace_id=")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/return_policy?marketplace_id="))
.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}}/return_policy?marketplace_id=")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/return_policy?marketplace_id=")
.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}}/return_policy?marketplace_id=');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/return_policy',
params: {marketplace_id: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/return_policy?marketplace_id=';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/return_policy?marketplace_id=',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/return_policy?marketplace_id=")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/return_policy?marketplace_id=',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'GET',
url: '{{baseUrl}}/return_policy',
qs: {marketplace_id: ''}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/return_policy');
req.query({
marketplace_id: ''
});
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}}/return_policy',
params: {marketplace_id: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/return_policy?marketplace_id=';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/return_policy?marketplace_id="]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/return_policy?marketplace_id=" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/return_policy?marketplace_id=",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/return_policy?marketplace_id=');
echo $response->getBody();
setUrl('{{baseUrl}}/return_policy');
$request->setMethod(HTTP_METH_GET);
$request->setQueryData([
'marketplace_id' => ''
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/return_policy');
$request->setRequestMethod('GET');
$request->setQuery(new http\QueryString([
'marketplace_id' => ''
]));
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/return_policy?marketplace_id=' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/return_policy?marketplace_id=' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/return_policy?marketplace_id=")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/return_policy"
querystring = {"marketplace_id":""}
response = requests.get(url, params=querystring)
print(response.json())
library(httr)
url <- "{{baseUrl}}/return_policy"
queryString <- list(marketplace_id = "")
response <- VERB("GET", url, query = queryString, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/return_policy?marketplace_id=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/return_policy') do |req|
req.params['marketplace_id'] = ''
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/return_policy";
let querystring = [
("marketplace_id", ""),
];
let client = reqwest::Client::new();
let response = client.get(url)
.query(&querystring)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url '{{baseUrl}}/return_policy?marketplace_id='
http GET '{{baseUrl}}/return_policy?marketplace_id='
wget --quiet \
--method GET \
--output-document \
- '{{baseUrl}}/return_policy?marketplace_id='
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/return_policy?marketplace_id=")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
getReturnPolicy
{{baseUrl}}/return_policy/:return_policy_id
QUERY PARAMS
return_policy_id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/return_policy/:return_policy_id");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/return_policy/:return_policy_id")
require "http/client"
url = "{{baseUrl}}/return_policy/:return_policy_id"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/return_policy/:return_policy_id"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/return_policy/:return_policy_id");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/return_policy/:return_policy_id"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/return_policy/:return_policy_id HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/return_policy/:return_policy_id")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/return_policy/:return_policy_id"))
.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}}/return_policy/:return_policy_id")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/return_policy/:return_policy_id")
.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}}/return_policy/:return_policy_id');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/return_policy/:return_policy_id'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/return_policy/:return_policy_id';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/return_policy/:return_policy_id',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/return_policy/:return_policy_id")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/return_policy/:return_policy_id',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'GET',
url: '{{baseUrl}}/return_policy/:return_policy_id'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/return_policy/:return_policy_id');
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}}/return_policy/:return_policy_id'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/return_policy/:return_policy_id';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/return_policy/:return_policy_id"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/return_policy/:return_policy_id" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/return_policy/:return_policy_id",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/return_policy/:return_policy_id');
echo $response->getBody();
setUrl('{{baseUrl}}/return_policy/:return_policy_id');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/return_policy/:return_policy_id');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/return_policy/:return_policy_id' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/return_policy/:return_policy_id' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/return_policy/:return_policy_id")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/return_policy/:return_policy_id"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/return_policy/:return_policy_id"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/return_policy/:return_policy_id")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/return_policy/:return_policy_id') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/return_policy/:return_policy_id";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/return_policy/:return_policy_id
http GET {{baseUrl}}/return_policy/:return_policy_id
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/return_policy/:return_policy_id
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/return_policy/:return_policy_id")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
getReturnPolicyByName
{{baseUrl}}/return_policy/get_by_policy_name
QUERY PARAMS
marketplace_id
name
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/return_policy/get_by_policy_name?marketplace_id=&name=");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/return_policy/get_by_policy_name" {:query-params {:marketplace_id ""
:name ""}})
require "http/client"
url = "{{baseUrl}}/return_policy/get_by_policy_name?marketplace_id=&name="
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/return_policy/get_by_policy_name?marketplace_id=&name="),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/return_policy/get_by_policy_name?marketplace_id=&name=");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/return_policy/get_by_policy_name?marketplace_id=&name="
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/return_policy/get_by_policy_name?marketplace_id=&name= HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/return_policy/get_by_policy_name?marketplace_id=&name=")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/return_policy/get_by_policy_name?marketplace_id=&name="))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/return_policy/get_by_policy_name?marketplace_id=&name=")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/return_policy/get_by_policy_name?marketplace_id=&name=")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/return_policy/get_by_policy_name?marketplace_id=&name=');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/return_policy/get_by_policy_name',
params: {marketplace_id: '', name: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/return_policy/get_by_policy_name?marketplace_id=&name=';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/return_policy/get_by_policy_name?marketplace_id=&name=',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/return_policy/get_by_policy_name?marketplace_id=&name=")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/return_policy/get_by_policy_name?marketplace_id=&name=',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'GET',
url: '{{baseUrl}}/return_policy/get_by_policy_name',
qs: {marketplace_id: '', name: ''}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/return_policy/get_by_policy_name');
req.query({
marketplace_id: '',
name: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'GET',
url: '{{baseUrl}}/return_policy/get_by_policy_name',
params: {marketplace_id: '', name: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/return_policy/get_by_policy_name?marketplace_id=&name=';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/return_policy/get_by_policy_name?marketplace_id=&name="]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/return_policy/get_by_policy_name?marketplace_id=&name=" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/return_policy/get_by_policy_name?marketplace_id=&name=",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/return_policy/get_by_policy_name?marketplace_id=&name=');
echo $response->getBody();
setUrl('{{baseUrl}}/return_policy/get_by_policy_name');
$request->setMethod(HTTP_METH_GET);
$request->setQueryData([
'marketplace_id' => '',
'name' => ''
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/return_policy/get_by_policy_name');
$request->setRequestMethod('GET');
$request->setQuery(new http\QueryString([
'marketplace_id' => '',
'name' => ''
]));
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/return_policy/get_by_policy_name?marketplace_id=&name=' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/return_policy/get_by_policy_name?marketplace_id=&name=' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/return_policy/get_by_policy_name?marketplace_id=&name=")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/return_policy/get_by_policy_name"
querystring = {"marketplace_id":"","name":""}
response = requests.get(url, params=querystring)
print(response.json())
library(httr)
url <- "{{baseUrl}}/return_policy/get_by_policy_name"
queryString <- list(
marketplace_id = "",
name = ""
)
response <- VERB("GET", url, query = queryString, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/return_policy/get_by_policy_name?marketplace_id=&name=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/return_policy/get_by_policy_name') do |req|
req.params['marketplace_id'] = ''
req.params['name'] = ''
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/return_policy/get_by_policy_name";
let querystring = [
("marketplace_id", ""),
("name", ""),
];
let client = reqwest::Client::new();
let response = client.get(url)
.query(&querystring)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url '{{baseUrl}}/return_policy/get_by_policy_name?marketplace_id=&name='
http GET '{{baseUrl}}/return_policy/get_by_policy_name?marketplace_id=&name='
wget --quiet \
--method GET \
--output-document \
- '{{baseUrl}}/return_policy/get_by_policy_name?marketplace_id=&name='
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/return_policy/get_by_policy_name?marketplace_id=&name=")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PUT
updateReturnPolicy
{{baseUrl}}/return_policy/:return_policy_id
QUERY PARAMS
return_policy_id
BODY json
{
"categoryTypes": [
{
"default": false,
"name": ""
}
],
"description": "",
"extendedHolidayReturnsOffered": false,
"internationalOverride": {
"returnMethod": "",
"returnPeriod": {
"unit": "",
"value": 0
},
"returnShippingCostPayer": "",
"returnsAccepted": false
},
"marketplaceId": "",
"name": "",
"refundMethod": "",
"restockingFeePercentage": "",
"returnInstructions": "",
"returnMethod": "",
"returnPeriod": {},
"returnShippingCostPayer": "",
"returnsAccepted": false
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/return_policy/:return_policy_id");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"categoryTypes\": [\n {\n \"default\": false,\n \"name\": \"\"\n }\n ],\n \"description\": \"\",\n \"extendedHolidayReturnsOffered\": false,\n \"internationalOverride\": {\n \"returnMethod\": \"\",\n \"returnPeriod\": {\n \"unit\": \"\",\n \"value\": 0\n },\n \"returnShippingCostPayer\": \"\",\n \"returnsAccepted\": false\n },\n \"marketplaceId\": \"\",\n \"name\": \"\",\n \"refundMethod\": \"\",\n \"restockingFeePercentage\": \"\",\n \"returnInstructions\": \"\",\n \"returnMethod\": \"\",\n \"returnPeriod\": {},\n \"returnShippingCostPayer\": \"\",\n \"returnsAccepted\": false\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/return_policy/:return_policy_id" {:content-type :json
:form-params {:categoryTypes [{:default false
:name ""}]
:description ""
:extendedHolidayReturnsOffered false
:internationalOverride {:returnMethod ""
:returnPeriod {:unit ""
:value 0}
:returnShippingCostPayer ""
:returnsAccepted false}
:marketplaceId ""
:name ""
:refundMethod ""
:restockingFeePercentage ""
:returnInstructions ""
:returnMethod ""
:returnPeriod {}
:returnShippingCostPayer ""
:returnsAccepted false}})
require "http/client"
url = "{{baseUrl}}/return_policy/:return_policy_id"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"categoryTypes\": [\n {\n \"default\": false,\n \"name\": \"\"\n }\n ],\n \"description\": \"\",\n \"extendedHolidayReturnsOffered\": false,\n \"internationalOverride\": {\n \"returnMethod\": \"\",\n \"returnPeriod\": {\n \"unit\": \"\",\n \"value\": 0\n },\n \"returnShippingCostPayer\": \"\",\n \"returnsAccepted\": false\n },\n \"marketplaceId\": \"\",\n \"name\": \"\",\n \"refundMethod\": \"\",\n \"restockingFeePercentage\": \"\",\n \"returnInstructions\": \"\",\n \"returnMethod\": \"\",\n \"returnPeriod\": {},\n \"returnShippingCostPayer\": \"\",\n \"returnsAccepted\": 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}}/return_policy/:return_policy_id"),
Content = new StringContent("{\n \"categoryTypes\": [\n {\n \"default\": false,\n \"name\": \"\"\n }\n ],\n \"description\": \"\",\n \"extendedHolidayReturnsOffered\": false,\n \"internationalOverride\": {\n \"returnMethod\": \"\",\n \"returnPeriod\": {\n \"unit\": \"\",\n \"value\": 0\n },\n \"returnShippingCostPayer\": \"\",\n \"returnsAccepted\": false\n },\n \"marketplaceId\": \"\",\n \"name\": \"\",\n \"refundMethod\": \"\",\n \"restockingFeePercentage\": \"\",\n \"returnInstructions\": \"\",\n \"returnMethod\": \"\",\n \"returnPeriod\": {},\n \"returnShippingCostPayer\": \"\",\n \"returnsAccepted\": 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}}/return_policy/:return_policy_id");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"categoryTypes\": [\n {\n \"default\": false,\n \"name\": \"\"\n }\n ],\n \"description\": \"\",\n \"extendedHolidayReturnsOffered\": false,\n \"internationalOverride\": {\n \"returnMethod\": \"\",\n \"returnPeriod\": {\n \"unit\": \"\",\n \"value\": 0\n },\n \"returnShippingCostPayer\": \"\",\n \"returnsAccepted\": false\n },\n \"marketplaceId\": \"\",\n \"name\": \"\",\n \"refundMethod\": \"\",\n \"restockingFeePercentage\": \"\",\n \"returnInstructions\": \"\",\n \"returnMethod\": \"\",\n \"returnPeriod\": {},\n \"returnShippingCostPayer\": \"\",\n \"returnsAccepted\": false\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/return_policy/:return_policy_id"
payload := strings.NewReader("{\n \"categoryTypes\": [\n {\n \"default\": false,\n \"name\": \"\"\n }\n ],\n \"description\": \"\",\n \"extendedHolidayReturnsOffered\": false,\n \"internationalOverride\": {\n \"returnMethod\": \"\",\n \"returnPeriod\": {\n \"unit\": \"\",\n \"value\": 0\n },\n \"returnShippingCostPayer\": \"\",\n \"returnsAccepted\": false\n },\n \"marketplaceId\": \"\",\n \"name\": \"\",\n \"refundMethod\": \"\",\n \"restockingFeePercentage\": \"\",\n \"returnInstructions\": \"\",\n \"returnMethod\": \"\",\n \"returnPeriod\": {},\n \"returnShippingCostPayer\": \"\",\n \"returnsAccepted\": false\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
PUT /baseUrl/return_policy/:return_policy_id HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 555
{
"categoryTypes": [
{
"default": false,
"name": ""
}
],
"description": "",
"extendedHolidayReturnsOffered": false,
"internationalOverride": {
"returnMethod": "",
"returnPeriod": {
"unit": "",
"value": 0
},
"returnShippingCostPayer": "",
"returnsAccepted": false
},
"marketplaceId": "",
"name": "",
"refundMethod": "",
"restockingFeePercentage": "",
"returnInstructions": "",
"returnMethod": "",
"returnPeriod": {},
"returnShippingCostPayer": "",
"returnsAccepted": false
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/return_policy/:return_policy_id")
.setHeader("content-type", "application/json")
.setBody("{\n \"categoryTypes\": [\n {\n \"default\": false,\n \"name\": \"\"\n }\n ],\n \"description\": \"\",\n \"extendedHolidayReturnsOffered\": false,\n \"internationalOverride\": {\n \"returnMethod\": \"\",\n \"returnPeriod\": {\n \"unit\": \"\",\n \"value\": 0\n },\n \"returnShippingCostPayer\": \"\",\n \"returnsAccepted\": false\n },\n \"marketplaceId\": \"\",\n \"name\": \"\",\n \"refundMethod\": \"\",\n \"restockingFeePercentage\": \"\",\n \"returnInstructions\": \"\",\n \"returnMethod\": \"\",\n \"returnPeriod\": {},\n \"returnShippingCostPayer\": \"\",\n \"returnsAccepted\": false\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/return_policy/:return_policy_id"))
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("{\n \"categoryTypes\": [\n {\n \"default\": false,\n \"name\": \"\"\n }\n ],\n \"description\": \"\",\n \"extendedHolidayReturnsOffered\": false,\n \"internationalOverride\": {\n \"returnMethod\": \"\",\n \"returnPeriod\": {\n \"unit\": \"\",\n \"value\": 0\n },\n \"returnShippingCostPayer\": \"\",\n \"returnsAccepted\": false\n },\n \"marketplaceId\": \"\",\n \"name\": \"\",\n \"refundMethod\": \"\",\n \"restockingFeePercentage\": \"\",\n \"returnInstructions\": \"\",\n \"returnMethod\": \"\",\n \"returnPeriod\": {},\n \"returnShippingCostPayer\": \"\",\n \"returnsAccepted\": 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 \"categoryTypes\": [\n {\n \"default\": false,\n \"name\": \"\"\n }\n ],\n \"description\": \"\",\n \"extendedHolidayReturnsOffered\": false,\n \"internationalOverride\": {\n \"returnMethod\": \"\",\n \"returnPeriod\": {\n \"unit\": \"\",\n \"value\": 0\n },\n \"returnShippingCostPayer\": \"\",\n \"returnsAccepted\": false\n },\n \"marketplaceId\": \"\",\n \"name\": \"\",\n \"refundMethod\": \"\",\n \"restockingFeePercentage\": \"\",\n \"returnInstructions\": \"\",\n \"returnMethod\": \"\",\n \"returnPeriod\": {},\n \"returnShippingCostPayer\": \"\",\n \"returnsAccepted\": false\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/return_policy/:return_policy_id")
.put(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/return_policy/:return_policy_id")
.header("content-type", "application/json")
.body("{\n \"categoryTypes\": [\n {\n \"default\": false,\n \"name\": \"\"\n }\n ],\n \"description\": \"\",\n \"extendedHolidayReturnsOffered\": false,\n \"internationalOverride\": {\n \"returnMethod\": \"\",\n \"returnPeriod\": {\n \"unit\": \"\",\n \"value\": 0\n },\n \"returnShippingCostPayer\": \"\",\n \"returnsAccepted\": false\n },\n \"marketplaceId\": \"\",\n \"name\": \"\",\n \"refundMethod\": \"\",\n \"restockingFeePercentage\": \"\",\n \"returnInstructions\": \"\",\n \"returnMethod\": \"\",\n \"returnPeriod\": {},\n \"returnShippingCostPayer\": \"\",\n \"returnsAccepted\": false\n}")
.asString();
const data = JSON.stringify({
categoryTypes: [
{
default: false,
name: ''
}
],
description: '',
extendedHolidayReturnsOffered: false,
internationalOverride: {
returnMethod: '',
returnPeriod: {
unit: '',
value: 0
},
returnShippingCostPayer: '',
returnsAccepted: false
},
marketplaceId: '',
name: '',
refundMethod: '',
restockingFeePercentage: '',
returnInstructions: '',
returnMethod: '',
returnPeriod: {},
returnShippingCostPayer: '',
returnsAccepted: 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}}/return_policy/:return_policy_id');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/return_policy/:return_policy_id',
headers: {'content-type': 'application/json'},
data: {
categoryTypes: [{default: false, name: ''}],
description: '',
extendedHolidayReturnsOffered: false,
internationalOverride: {
returnMethod: '',
returnPeriod: {unit: '', value: 0},
returnShippingCostPayer: '',
returnsAccepted: false
},
marketplaceId: '',
name: '',
refundMethod: '',
restockingFeePercentage: '',
returnInstructions: '',
returnMethod: '',
returnPeriod: {},
returnShippingCostPayer: '',
returnsAccepted: false
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/return_policy/:return_policy_id';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"categoryTypes":[{"default":false,"name":""}],"description":"","extendedHolidayReturnsOffered":false,"internationalOverride":{"returnMethod":"","returnPeriod":{"unit":"","value":0},"returnShippingCostPayer":"","returnsAccepted":false},"marketplaceId":"","name":"","refundMethod":"","restockingFeePercentage":"","returnInstructions":"","returnMethod":"","returnPeriod":{},"returnShippingCostPayer":"","returnsAccepted":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}}/return_policy/:return_policy_id',
method: 'PUT',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "categoryTypes": [\n {\n "default": false,\n "name": ""\n }\n ],\n "description": "",\n "extendedHolidayReturnsOffered": false,\n "internationalOverride": {\n "returnMethod": "",\n "returnPeriod": {\n "unit": "",\n "value": 0\n },\n "returnShippingCostPayer": "",\n "returnsAccepted": false\n },\n "marketplaceId": "",\n "name": "",\n "refundMethod": "",\n "restockingFeePercentage": "",\n "returnInstructions": "",\n "returnMethod": "",\n "returnPeriod": {},\n "returnShippingCostPayer": "",\n "returnsAccepted": 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 \"categoryTypes\": [\n {\n \"default\": false,\n \"name\": \"\"\n }\n ],\n \"description\": \"\",\n \"extendedHolidayReturnsOffered\": false,\n \"internationalOverride\": {\n \"returnMethod\": \"\",\n \"returnPeriod\": {\n \"unit\": \"\",\n \"value\": 0\n },\n \"returnShippingCostPayer\": \"\",\n \"returnsAccepted\": false\n },\n \"marketplaceId\": \"\",\n \"name\": \"\",\n \"refundMethod\": \"\",\n \"restockingFeePercentage\": \"\",\n \"returnInstructions\": \"\",\n \"returnMethod\": \"\",\n \"returnPeriod\": {},\n \"returnShippingCostPayer\": \"\",\n \"returnsAccepted\": false\n}")
val request = Request.Builder()
.url("{{baseUrl}}/return_policy/:return_policy_id")
.put(body)
.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/return_policy/:return_policy_id',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
categoryTypes: [{default: false, name: ''}],
description: '',
extendedHolidayReturnsOffered: false,
internationalOverride: {
returnMethod: '',
returnPeriod: {unit: '', value: 0},
returnShippingCostPayer: '',
returnsAccepted: false
},
marketplaceId: '',
name: '',
refundMethod: '',
restockingFeePercentage: '',
returnInstructions: '',
returnMethod: '',
returnPeriod: {},
returnShippingCostPayer: '',
returnsAccepted: false
}));
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/return_policy/:return_policy_id',
headers: {'content-type': 'application/json'},
body: {
categoryTypes: [{default: false, name: ''}],
description: '',
extendedHolidayReturnsOffered: false,
internationalOverride: {
returnMethod: '',
returnPeriod: {unit: '', value: 0},
returnShippingCostPayer: '',
returnsAccepted: false
},
marketplaceId: '',
name: '',
refundMethod: '',
restockingFeePercentage: '',
returnInstructions: '',
returnMethod: '',
returnPeriod: {},
returnShippingCostPayer: '',
returnsAccepted: 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}}/return_policy/:return_policy_id');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
categoryTypes: [
{
default: false,
name: ''
}
],
description: '',
extendedHolidayReturnsOffered: false,
internationalOverride: {
returnMethod: '',
returnPeriod: {
unit: '',
value: 0
},
returnShippingCostPayer: '',
returnsAccepted: false
},
marketplaceId: '',
name: '',
refundMethod: '',
restockingFeePercentage: '',
returnInstructions: '',
returnMethod: '',
returnPeriod: {},
returnShippingCostPayer: '',
returnsAccepted: 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}}/return_policy/:return_policy_id',
headers: {'content-type': 'application/json'},
data: {
categoryTypes: [{default: false, name: ''}],
description: '',
extendedHolidayReturnsOffered: false,
internationalOverride: {
returnMethod: '',
returnPeriod: {unit: '', value: 0},
returnShippingCostPayer: '',
returnsAccepted: false
},
marketplaceId: '',
name: '',
refundMethod: '',
restockingFeePercentage: '',
returnInstructions: '',
returnMethod: '',
returnPeriod: {},
returnShippingCostPayer: '',
returnsAccepted: false
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/return_policy/:return_policy_id';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"categoryTypes":[{"default":false,"name":""}],"description":"","extendedHolidayReturnsOffered":false,"internationalOverride":{"returnMethod":"","returnPeriod":{"unit":"","value":0},"returnShippingCostPayer":"","returnsAccepted":false},"marketplaceId":"","name":"","refundMethod":"","restockingFeePercentage":"","returnInstructions":"","returnMethod":"","returnPeriod":{},"returnShippingCostPayer":"","returnsAccepted":false}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"categoryTypes": @[ @{ @"default": @NO, @"name": @"" } ],
@"description": @"",
@"extendedHolidayReturnsOffered": @NO,
@"internationalOverride": @{ @"returnMethod": @"", @"returnPeriod": @{ @"unit": @"", @"value": @0 }, @"returnShippingCostPayer": @"", @"returnsAccepted": @NO },
@"marketplaceId": @"",
@"name": @"",
@"refundMethod": @"",
@"restockingFeePercentage": @"",
@"returnInstructions": @"",
@"returnMethod": @"",
@"returnPeriod": @{ },
@"returnShippingCostPayer": @"",
@"returnsAccepted": @NO };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/return_policy/:return_policy_id"]
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}}/return_policy/:return_policy_id" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"categoryTypes\": [\n {\n \"default\": false,\n \"name\": \"\"\n }\n ],\n \"description\": \"\",\n \"extendedHolidayReturnsOffered\": false,\n \"internationalOverride\": {\n \"returnMethod\": \"\",\n \"returnPeriod\": {\n \"unit\": \"\",\n \"value\": 0\n },\n \"returnShippingCostPayer\": \"\",\n \"returnsAccepted\": false\n },\n \"marketplaceId\": \"\",\n \"name\": \"\",\n \"refundMethod\": \"\",\n \"restockingFeePercentage\": \"\",\n \"returnInstructions\": \"\",\n \"returnMethod\": \"\",\n \"returnPeriod\": {},\n \"returnShippingCostPayer\": \"\",\n \"returnsAccepted\": false\n}" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/return_policy/:return_policy_id",
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([
'categoryTypes' => [
[
'default' => null,
'name' => ''
]
],
'description' => '',
'extendedHolidayReturnsOffered' => null,
'internationalOverride' => [
'returnMethod' => '',
'returnPeriod' => [
'unit' => '',
'value' => 0
],
'returnShippingCostPayer' => '',
'returnsAccepted' => null
],
'marketplaceId' => '',
'name' => '',
'refundMethod' => '',
'restockingFeePercentage' => '',
'returnInstructions' => '',
'returnMethod' => '',
'returnPeriod' => [
],
'returnShippingCostPayer' => '',
'returnsAccepted' => null
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('PUT', '{{baseUrl}}/return_policy/:return_policy_id', [
'body' => '{
"categoryTypes": [
{
"default": false,
"name": ""
}
],
"description": "",
"extendedHolidayReturnsOffered": false,
"internationalOverride": {
"returnMethod": "",
"returnPeriod": {
"unit": "",
"value": 0
},
"returnShippingCostPayer": "",
"returnsAccepted": false
},
"marketplaceId": "",
"name": "",
"refundMethod": "",
"restockingFeePercentage": "",
"returnInstructions": "",
"returnMethod": "",
"returnPeriod": {},
"returnShippingCostPayer": "",
"returnsAccepted": false
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/return_policy/:return_policy_id');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'categoryTypes' => [
[
'default' => null,
'name' => ''
]
],
'description' => '',
'extendedHolidayReturnsOffered' => null,
'internationalOverride' => [
'returnMethod' => '',
'returnPeriod' => [
'unit' => '',
'value' => 0
],
'returnShippingCostPayer' => '',
'returnsAccepted' => null
],
'marketplaceId' => '',
'name' => '',
'refundMethod' => '',
'restockingFeePercentage' => '',
'returnInstructions' => '',
'returnMethod' => '',
'returnPeriod' => [
],
'returnShippingCostPayer' => '',
'returnsAccepted' => null
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'categoryTypes' => [
[
'default' => null,
'name' => ''
]
],
'description' => '',
'extendedHolidayReturnsOffered' => null,
'internationalOverride' => [
'returnMethod' => '',
'returnPeriod' => [
'unit' => '',
'value' => 0
],
'returnShippingCostPayer' => '',
'returnsAccepted' => null
],
'marketplaceId' => '',
'name' => '',
'refundMethod' => '',
'restockingFeePercentage' => '',
'returnInstructions' => '',
'returnMethod' => '',
'returnPeriod' => [
],
'returnShippingCostPayer' => '',
'returnsAccepted' => null
]));
$request->setRequestUrl('{{baseUrl}}/return_policy/:return_policy_id');
$request->setRequestMethod('PUT');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/return_policy/:return_policy_id' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"categoryTypes": [
{
"default": false,
"name": ""
}
],
"description": "",
"extendedHolidayReturnsOffered": false,
"internationalOverride": {
"returnMethod": "",
"returnPeriod": {
"unit": "",
"value": 0
},
"returnShippingCostPayer": "",
"returnsAccepted": false
},
"marketplaceId": "",
"name": "",
"refundMethod": "",
"restockingFeePercentage": "",
"returnInstructions": "",
"returnMethod": "",
"returnPeriod": {},
"returnShippingCostPayer": "",
"returnsAccepted": false
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/return_policy/:return_policy_id' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"categoryTypes": [
{
"default": false,
"name": ""
}
],
"description": "",
"extendedHolidayReturnsOffered": false,
"internationalOverride": {
"returnMethod": "",
"returnPeriod": {
"unit": "",
"value": 0
},
"returnShippingCostPayer": "",
"returnsAccepted": false
},
"marketplaceId": "",
"name": "",
"refundMethod": "",
"restockingFeePercentage": "",
"returnInstructions": "",
"returnMethod": "",
"returnPeriod": {},
"returnShippingCostPayer": "",
"returnsAccepted": false
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"categoryTypes\": [\n {\n \"default\": false,\n \"name\": \"\"\n }\n ],\n \"description\": \"\",\n \"extendedHolidayReturnsOffered\": false,\n \"internationalOverride\": {\n \"returnMethod\": \"\",\n \"returnPeriod\": {\n \"unit\": \"\",\n \"value\": 0\n },\n \"returnShippingCostPayer\": \"\",\n \"returnsAccepted\": false\n },\n \"marketplaceId\": \"\",\n \"name\": \"\",\n \"refundMethod\": \"\",\n \"restockingFeePercentage\": \"\",\n \"returnInstructions\": \"\",\n \"returnMethod\": \"\",\n \"returnPeriod\": {},\n \"returnShippingCostPayer\": \"\",\n \"returnsAccepted\": false\n}"
headers = { 'content-type': "application/json" }
conn.request("PUT", "/baseUrl/return_policy/:return_policy_id", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/return_policy/:return_policy_id"
payload = {
"categoryTypes": [
{
"default": False,
"name": ""
}
],
"description": "",
"extendedHolidayReturnsOffered": False,
"internationalOverride": {
"returnMethod": "",
"returnPeriod": {
"unit": "",
"value": 0
},
"returnShippingCostPayer": "",
"returnsAccepted": False
},
"marketplaceId": "",
"name": "",
"refundMethod": "",
"restockingFeePercentage": "",
"returnInstructions": "",
"returnMethod": "",
"returnPeriod": {},
"returnShippingCostPayer": "",
"returnsAccepted": False
}
headers = {"content-type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/return_policy/:return_policy_id"
payload <- "{\n \"categoryTypes\": [\n {\n \"default\": false,\n \"name\": \"\"\n }\n ],\n \"description\": \"\",\n \"extendedHolidayReturnsOffered\": false,\n \"internationalOverride\": {\n \"returnMethod\": \"\",\n \"returnPeriod\": {\n \"unit\": \"\",\n \"value\": 0\n },\n \"returnShippingCostPayer\": \"\",\n \"returnsAccepted\": false\n },\n \"marketplaceId\": \"\",\n \"name\": \"\",\n \"refundMethod\": \"\",\n \"restockingFeePercentage\": \"\",\n \"returnInstructions\": \"\",\n \"returnMethod\": \"\",\n \"returnPeriod\": {},\n \"returnShippingCostPayer\": \"\",\n \"returnsAccepted\": false\n}"
encode <- "json"
response <- VERB("PUT", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/return_policy/:return_policy_id")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"categoryTypes\": [\n {\n \"default\": false,\n \"name\": \"\"\n }\n ],\n \"description\": \"\",\n \"extendedHolidayReturnsOffered\": false,\n \"internationalOverride\": {\n \"returnMethod\": \"\",\n \"returnPeriod\": {\n \"unit\": \"\",\n \"value\": 0\n },\n \"returnShippingCostPayer\": \"\",\n \"returnsAccepted\": false\n },\n \"marketplaceId\": \"\",\n \"name\": \"\",\n \"refundMethod\": \"\",\n \"restockingFeePercentage\": \"\",\n \"returnInstructions\": \"\",\n \"returnMethod\": \"\",\n \"returnPeriod\": {},\n \"returnShippingCostPayer\": \"\",\n \"returnsAccepted\": false\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/return_policy/:return_policy_id') do |req|
req.body = "{\n \"categoryTypes\": [\n {\n \"default\": false,\n \"name\": \"\"\n }\n ],\n \"description\": \"\",\n \"extendedHolidayReturnsOffered\": false,\n \"internationalOverride\": {\n \"returnMethod\": \"\",\n \"returnPeriod\": {\n \"unit\": \"\",\n \"value\": 0\n },\n \"returnShippingCostPayer\": \"\",\n \"returnsAccepted\": false\n },\n \"marketplaceId\": \"\",\n \"name\": \"\",\n \"refundMethod\": \"\",\n \"restockingFeePercentage\": \"\",\n \"returnInstructions\": \"\",\n \"returnMethod\": \"\",\n \"returnPeriod\": {},\n \"returnShippingCostPayer\": \"\",\n \"returnsAccepted\": 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}}/return_policy/:return_policy_id";
let payload = json!({
"categoryTypes": (
json!({
"default": false,
"name": ""
})
),
"description": "",
"extendedHolidayReturnsOffered": false,
"internationalOverride": json!({
"returnMethod": "",
"returnPeriod": json!({
"unit": "",
"value": 0
}),
"returnShippingCostPayer": "",
"returnsAccepted": false
}),
"marketplaceId": "",
"name": "",
"refundMethod": "",
"restockingFeePercentage": "",
"returnInstructions": "",
"returnMethod": "",
"returnPeriod": json!({}),
"returnShippingCostPayer": "",
"returnsAccepted": false
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PUT").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/return_policy/:return_policy_id \
--header 'content-type: application/json' \
--data '{
"categoryTypes": [
{
"default": false,
"name": ""
}
],
"description": "",
"extendedHolidayReturnsOffered": false,
"internationalOverride": {
"returnMethod": "",
"returnPeriod": {
"unit": "",
"value": 0
},
"returnShippingCostPayer": "",
"returnsAccepted": false
},
"marketplaceId": "",
"name": "",
"refundMethod": "",
"restockingFeePercentage": "",
"returnInstructions": "",
"returnMethod": "",
"returnPeriod": {},
"returnShippingCostPayer": "",
"returnsAccepted": false
}'
echo '{
"categoryTypes": [
{
"default": false,
"name": ""
}
],
"description": "",
"extendedHolidayReturnsOffered": false,
"internationalOverride": {
"returnMethod": "",
"returnPeriod": {
"unit": "",
"value": 0
},
"returnShippingCostPayer": "",
"returnsAccepted": false
},
"marketplaceId": "",
"name": "",
"refundMethod": "",
"restockingFeePercentage": "",
"returnInstructions": "",
"returnMethod": "",
"returnPeriod": {},
"returnShippingCostPayer": "",
"returnsAccepted": false
}' | \
http PUT {{baseUrl}}/return_policy/:return_policy_id \
content-type:application/json
wget --quiet \
--method PUT \
--header 'content-type: application/json' \
--body-data '{\n "categoryTypes": [\n {\n "default": false,\n "name": ""\n }\n ],\n "description": "",\n "extendedHolidayReturnsOffered": false,\n "internationalOverride": {\n "returnMethod": "",\n "returnPeriod": {\n "unit": "",\n "value": 0\n },\n "returnShippingCostPayer": "",\n "returnsAccepted": false\n },\n "marketplaceId": "",\n "name": "",\n "refundMethod": "",\n "restockingFeePercentage": "",\n "returnInstructions": "",\n "returnMethod": "",\n "returnPeriod": {},\n "returnShippingCostPayer": "",\n "returnsAccepted": false\n}' \
--output-document \
- {{baseUrl}}/return_policy/:return_policy_id
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"categoryTypes": [
[
"default": false,
"name": ""
]
],
"description": "",
"extendedHolidayReturnsOffered": false,
"internationalOverride": [
"returnMethod": "",
"returnPeriod": [
"unit": "",
"value": 0
],
"returnShippingCostPayer": "",
"returnsAccepted": false
],
"marketplaceId": "",
"name": "",
"refundMethod": "",
"restockingFeePercentage": "",
"returnInstructions": "",
"returnMethod": "",
"returnPeriod": [],
"returnShippingCostPayer": "",
"returnsAccepted": false
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/return_policy/:return_policy_id")! 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
createOrReplaceSalesTax
{{baseUrl}}/sales_tax/:countryCode/:jurisdictionId
QUERY PARAMS
countryCode
jurisdictionId
BODY json
{
"salesTaxPercentage": "",
"shippingAndHandlingTaxed": false
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/sales_tax/:countryCode/:jurisdictionId");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"salesTaxPercentage\": \"\",\n \"shippingAndHandlingTaxed\": false\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/sales_tax/:countryCode/:jurisdictionId" {:content-type :json
:form-params {:salesTaxPercentage ""
:shippingAndHandlingTaxed false}})
require "http/client"
url = "{{baseUrl}}/sales_tax/:countryCode/:jurisdictionId"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"salesTaxPercentage\": \"\",\n \"shippingAndHandlingTaxed\": 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}}/sales_tax/:countryCode/:jurisdictionId"),
Content = new StringContent("{\n \"salesTaxPercentage\": \"\",\n \"shippingAndHandlingTaxed\": 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}}/sales_tax/:countryCode/:jurisdictionId");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"salesTaxPercentage\": \"\",\n \"shippingAndHandlingTaxed\": false\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/sales_tax/:countryCode/:jurisdictionId"
payload := strings.NewReader("{\n \"salesTaxPercentage\": \"\",\n \"shippingAndHandlingTaxed\": false\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
PUT /baseUrl/sales_tax/:countryCode/:jurisdictionId HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 67
{
"salesTaxPercentage": "",
"shippingAndHandlingTaxed": false
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/sales_tax/:countryCode/:jurisdictionId")
.setHeader("content-type", "application/json")
.setBody("{\n \"salesTaxPercentage\": \"\",\n \"shippingAndHandlingTaxed\": false\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/sales_tax/:countryCode/:jurisdictionId"))
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("{\n \"salesTaxPercentage\": \"\",\n \"shippingAndHandlingTaxed\": 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 \"salesTaxPercentage\": \"\",\n \"shippingAndHandlingTaxed\": false\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/sales_tax/:countryCode/:jurisdictionId")
.put(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/sales_tax/:countryCode/:jurisdictionId")
.header("content-type", "application/json")
.body("{\n \"salesTaxPercentage\": \"\",\n \"shippingAndHandlingTaxed\": false\n}")
.asString();
const data = JSON.stringify({
salesTaxPercentage: '',
shippingAndHandlingTaxed: 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}}/sales_tax/:countryCode/:jurisdictionId');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/sales_tax/:countryCode/:jurisdictionId',
headers: {'content-type': 'application/json'},
data: {salesTaxPercentage: '', shippingAndHandlingTaxed: false}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/sales_tax/:countryCode/:jurisdictionId';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"salesTaxPercentage":"","shippingAndHandlingTaxed":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}}/sales_tax/:countryCode/:jurisdictionId',
method: 'PUT',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "salesTaxPercentage": "",\n "shippingAndHandlingTaxed": 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 \"salesTaxPercentage\": \"\",\n \"shippingAndHandlingTaxed\": false\n}")
val request = Request.Builder()
.url("{{baseUrl}}/sales_tax/:countryCode/:jurisdictionId")
.put(body)
.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/sales_tax/:countryCode/:jurisdictionId',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({salesTaxPercentage: '', shippingAndHandlingTaxed: false}));
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/sales_tax/:countryCode/:jurisdictionId',
headers: {'content-type': 'application/json'},
body: {salesTaxPercentage: '', shippingAndHandlingTaxed: 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}}/sales_tax/:countryCode/:jurisdictionId');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
salesTaxPercentage: '',
shippingAndHandlingTaxed: 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}}/sales_tax/:countryCode/:jurisdictionId',
headers: {'content-type': 'application/json'},
data: {salesTaxPercentage: '', shippingAndHandlingTaxed: false}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/sales_tax/:countryCode/:jurisdictionId';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"salesTaxPercentage":"","shippingAndHandlingTaxed":false}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"salesTaxPercentage": @"",
@"shippingAndHandlingTaxed": @NO };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/sales_tax/:countryCode/:jurisdictionId"]
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}}/sales_tax/:countryCode/:jurisdictionId" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"salesTaxPercentage\": \"\",\n \"shippingAndHandlingTaxed\": false\n}" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/sales_tax/:countryCode/:jurisdictionId",
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([
'salesTaxPercentage' => '',
'shippingAndHandlingTaxed' => null
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('PUT', '{{baseUrl}}/sales_tax/:countryCode/:jurisdictionId', [
'body' => '{
"salesTaxPercentage": "",
"shippingAndHandlingTaxed": false
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/sales_tax/:countryCode/:jurisdictionId');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'salesTaxPercentage' => '',
'shippingAndHandlingTaxed' => null
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'salesTaxPercentage' => '',
'shippingAndHandlingTaxed' => null
]));
$request->setRequestUrl('{{baseUrl}}/sales_tax/:countryCode/:jurisdictionId');
$request->setRequestMethod('PUT');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/sales_tax/:countryCode/:jurisdictionId' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"salesTaxPercentage": "",
"shippingAndHandlingTaxed": false
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/sales_tax/:countryCode/:jurisdictionId' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"salesTaxPercentage": "",
"shippingAndHandlingTaxed": false
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"salesTaxPercentage\": \"\",\n \"shippingAndHandlingTaxed\": false\n}"
headers = { 'content-type': "application/json" }
conn.request("PUT", "/baseUrl/sales_tax/:countryCode/:jurisdictionId", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/sales_tax/:countryCode/:jurisdictionId"
payload = {
"salesTaxPercentage": "",
"shippingAndHandlingTaxed": False
}
headers = {"content-type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/sales_tax/:countryCode/:jurisdictionId"
payload <- "{\n \"salesTaxPercentage\": \"\",\n \"shippingAndHandlingTaxed\": false\n}"
encode <- "json"
response <- VERB("PUT", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/sales_tax/:countryCode/:jurisdictionId")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"salesTaxPercentage\": \"\",\n \"shippingAndHandlingTaxed\": false\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/sales_tax/:countryCode/:jurisdictionId') do |req|
req.body = "{\n \"salesTaxPercentage\": \"\",\n \"shippingAndHandlingTaxed\": 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}}/sales_tax/:countryCode/:jurisdictionId";
let payload = json!({
"salesTaxPercentage": "",
"shippingAndHandlingTaxed": false
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PUT").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/sales_tax/:countryCode/:jurisdictionId \
--header 'content-type: application/json' \
--data '{
"salesTaxPercentage": "",
"shippingAndHandlingTaxed": false
}'
echo '{
"salesTaxPercentage": "",
"shippingAndHandlingTaxed": false
}' | \
http PUT {{baseUrl}}/sales_tax/:countryCode/:jurisdictionId \
content-type:application/json
wget --quiet \
--method PUT \
--header 'content-type: application/json' \
--body-data '{\n "salesTaxPercentage": "",\n "shippingAndHandlingTaxed": false\n}' \
--output-document \
- {{baseUrl}}/sales_tax/:countryCode/:jurisdictionId
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"salesTaxPercentage": "",
"shippingAndHandlingTaxed": false
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/sales_tax/:countryCode/:jurisdictionId")! 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()
DELETE
deleteSalesTax
{{baseUrl}}/sales_tax/:countryCode/:jurisdictionId
QUERY PARAMS
countryCode
jurisdictionId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/sales_tax/:countryCode/:jurisdictionId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/delete "{{baseUrl}}/sales_tax/:countryCode/:jurisdictionId")
require "http/client"
url = "{{baseUrl}}/sales_tax/:countryCode/:jurisdictionId"
response = HTTP::Client.delete url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Delete,
RequestUri = new Uri("{{baseUrl}}/sales_tax/:countryCode/:jurisdictionId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/sales_tax/:countryCode/:jurisdictionId");
var request = new RestRequest("", Method.Delete);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/sales_tax/:countryCode/:jurisdictionId"
req, _ := http.NewRequest("DELETE", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
DELETE /baseUrl/sales_tax/:countryCode/:jurisdictionId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/sales_tax/:countryCode/:jurisdictionId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/sales_tax/:countryCode/:jurisdictionId"))
.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}}/sales_tax/:countryCode/:jurisdictionId")
.delete(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/sales_tax/:countryCode/:jurisdictionId")
.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}}/sales_tax/:countryCode/:jurisdictionId');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'DELETE',
url: '{{baseUrl}}/sales_tax/:countryCode/:jurisdictionId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/sales_tax/:countryCode/:jurisdictionId';
const options = {method: 'DELETE'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/sales_tax/:countryCode/:jurisdictionId',
method: 'DELETE',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/sales_tax/:countryCode/:jurisdictionId")
.delete(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'DELETE',
hostname: 'example.com',
port: null,
path: '/baseUrl/sales_tax/:countryCode/:jurisdictionId',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'DELETE',
url: '{{baseUrl}}/sales_tax/:countryCode/:jurisdictionId'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('DELETE', '{{baseUrl}}/sales_tax/:countryCode/:jurisdictionId');
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}}/sales_tax/:countryCode/:jurisdictionId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/sales_tax/:countryCode/:jurisdictionId';
const options = {method: 'DELETE'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/sales_tax/:countryCode/:jurisdictionId"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"DELETE"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/sales_tax/:countryCode/:jurisdictionId" in
Client.call `DELETE uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/sales_tax/:countryCode/:jurisdictionId",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('DELETE', '{{baseUrl}}/sales_tax/:countryCode/:jurisdictionId');
echo $response->getBody();
setUrl('{{baseUrl}}/sales_tax/:countryCode/:jurisdictionId');
$request->setMethod(HTTP_METH_DELETE);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/sales_tax/:countryCode/:jurisdictionId');
$request->setRequestMethod('DELETE');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/sales_tax/:countryCode/:jurisdictionId' -Method DELETE
$response = Invoke-RestMethod -Uri '{{baseUrl}}/sales_tax/:countryCode/:jurisdictionId' -Method DELETE
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("DELETE", "/baseUrl/sales_tax/:countryCode/:jurisdictionId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/sales_tax/:countryCode/:jurisdictionId"
response = requests.delete(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/sales_tax/:countryCode/:jurisdictionId"
response <- VERB("DELETE", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/sales_tax/:countryCode/:jurisdictionId")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.delete('/baseUrl/sales_tax/:countryCode/:jurisdictionId') do |req|
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/sales_tax/:countryCode/:jurisdictionId";
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("DELETE").unwrap(), url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request DELETE \
--url {{baseUrl}}/sales_tax/:countryCode/:jurisdictionId
http DELETE {{baseUrl}}/sales_tax/:countryCode/:jurisdictionId
wget --quiet \
--method DELETE \
--output-document \
- {{baseUrl}}/sales_tax/:countryCode/:jurisdictionId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/sales_tax/:countryCode/:jurisdictionId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "DELETE"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
getSalesTax
{{baseUrl}}/sales_tax/:countryCode/:jurisdictionId
QUERY PARAMS
countryCode
jurisdictionId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/sales_tax/:countryCode/:jurisdictionId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/sales_tax/:countryCode/:jurisdictionId")
require "http/client"
url = "{{baseUrl}}/sales_tax/:countryCode/:jurisdictionId"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/sales_tax/:countryCode/:jurisdictionId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/sales_tax/:countryCode/:jurisdictionId");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/sales_tax/:countryCode/:jurisdictionId"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/sales_tax/:countryCode/:jurisdictionId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/sales_tax/:countryCode/:jurisdictionId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/sales_tax/:countryCode/:jurisdictionId"))
.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}}/sales_tax/:countryCode/:jurisdictionId")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/sales_tax/:countryCode/:jurisdictionId")
.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}}/sales_tax/:countryCode/:jurisdictionId');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/sales_tax/:countryCode/:jurisdictionId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/sales_tax/:countryCode/:jurisdictionId';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/sales_tax/:countryCode/:jurisdictionId',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/sales_tax/:countryCode/:jurisdictionId")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/sales_tax/:countryCode/:jurisdictionId',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'GET',
url: '{{baseUrl}}/sales_tax/:countryCode/:jurisdictionId'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/sales_tax/:countryCode/:jurisdictionId');
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}}/sales_tax/:countryCode/:jurisdictionId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/sales_tax/:countryCode/:jurisdictionId';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/sales_tax/:countryCode/:jurisdictionId"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/sales_tax/:countryCode/:jurisdictionId" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/sales_tax/:countryCode/:jurisdictionId",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/sales_tax/:countryCode/:jurisdictionId');
echo $response->getBody();
setUrl('{{baseUrl}}/sales_tax/:countryCode/:jurisdictionId');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/sales_tax/:countryCode/:jurisdictionId');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/sales_tax/:countryCode/:jurisdictionId' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/sales_tax/:countryCode/:jurisdictionId' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/sales_tax/:countryCode/:jurisdictionId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/sales_tax/:countryCode/:jurisdictionId"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/sales_tax/:countryCode/:jurisdictionId"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/sales_tax/:countryCode/:jurisdictionId")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/sales_tax/:countryCode/:jurisdictionId') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/sales_tax/:countryCode/:jurisdictionId";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/sales_tax/:countryCode/:jurisdictionId
http GET {{baseUrl}}/sales_tax/:countryCode/:jurisdictionId
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/sales_tax/:countryCode/:jurisdictionId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/sales_tax/:countryCode/:jurisdictionId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
getSalesTaxes
{{baseUrl}}/sales_tax
QUERY PARAMS
country_code
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/sales_tax?country_code=");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/sales_tax" {:query-params {:country_code ""}})
require "http/client"
url = "{{baseUrl}}/sales_tax?country_code="
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/sales_tax?country_code="),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/sales_tax?country_code=");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/sales_tax?country_code="
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/sales_tax?country_code= HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/sales_tax?country_code=")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/sales_tax?country_code="))
.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}}/sales_tax?country_code=")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/sales_tax?country_code=")
.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}}/sales_tax?country_code=');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/sales_tax',
params: {country_code: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/sales_tax?country_code=';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/sales_tax?country_code=',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/sales_tax?country_code=")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/sales_tax?country_code=',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'GET',
url: '{{baseUrl}}/sales_tax',
qs: {country_code: ''}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/sales_tax');
req.query({
country_code: ''
});
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}}/sales_tax',
params: {country_code: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/sales_tax?country_code=';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/sales_tax?country_code="]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/sales_tax?country_code=" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/sales_tax?country_code=",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/sales_tax?country_code=');
echo $response->getBody();
setUrl('{{baseUrl}}/sales_tax');
$request->setMethod(HTTP_METH_GET);
$request->setQueryData([
'country_code' => ''
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/sales_tax');
$request->setRequestMethod('GET');
$request->setQuery(new http\QueryString([
'country_code' => ''
]));
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/sales_tax?country_code=' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/sales_tax?country_code=' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/sales_tax?country_code=")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/sales_tax"
querystring = {"country_code":""}
response = requests.get(url, params=querystring)
print(response.json())
library(httr)
url <- "{{baseUrl}}/sales_tax"
queryString <- list(country_code = "")
response <- VERB("GET", url, query = queryString, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/sales_tax?country_code=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/sales_tax') do |req|
req.params['country_code'] = ''
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/sales_tax";
let querystring = [
("country_code", ""),
];
let client = reqwest::Client::new();
let response = client.get(url)
.query(&querystring)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url '{{baseUrl}}/sales_tax?country_code='
http GET '{{baseUrl}}/sales_tax?country_code='
wget --quiet \
--method GET \
--output-document \
- '{{baseUrl}}/sales_tax?country_code='
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/sales_tax?country_code=")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
getSubscription
{{baseUrl}}/subscription
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/subscription");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/subscription")
require "http/client"
url = "{{baseUrl}}/subscription"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/subscription"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/subscription");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/subscription"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/subscription HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/subscription")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/subscription"))
.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}}/subscription")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/subscription")
.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}}/subscription');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/subscription'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/subscription';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/subscription',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/subscription")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/subscription',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {method: 'GET', url: '{{baseUrl}}/subscription'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/subscription');
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}}/subscription'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/subscription';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/subscription"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/subscription" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/subscription",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/subscription');
echo $response->getBody();
setUrl('{{baseUrl}}/subscription');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/subscription');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/subscription' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/subscription' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/subscription")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/subscription"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/subscription"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/subscription")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/subscription') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/subscription";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/subscription
http GET {{baseUrl}}/subscription
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/subscription
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/subscription")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()