Billbee API
GET
Gets a list of all connected cloud storage devices
{{baseUrl}}/api/v1/cloudstorages
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/v1/cloudstorages");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/api/v1/cloudstorages")
require "http/client"
url = "{{baseUrl}}/api/v1/cloudstorages"
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}}/api/v1/cloudstorages"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/api/v1/cloudstorages");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/v1/cloudstorages"
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/api/v1/cloudstorages HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/api/v1/cloudstorages")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/v1/cloudstorages"))
.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}}/api/v1/cloudstorages")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/api/v1/cloudstorages")
.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}}/api/v1/cloudstorages');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/api/v1/cloudstorages'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/v1/cloudstorages';
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}}/api/v1/cloudstorages',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/api/v1/cloudstorages")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/api/v1/cloudstorages',
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}}/api/v1/cloudstorages'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/api/v1/cloudstorages');
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}}/api/v1/cloudstorages'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/v1/cloudstorages';
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}}/api/v1/cloudstorages"]
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}}/api/v1/cloudstorages" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/v1/cloudstorages",
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}}/api/v1/cloudstorages');
echo $response->getBody();
setUrl('{{baseUrl}}/api/v1/cloudstorages');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/api/v1/cloudstorages');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/api/v1/cloudstorages' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/v1/cloudstorages' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/api/v1/cloudstorages")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/v1/cloudstorages"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/v1/cloudstorages"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/api/v1/cloudstorages")
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/api/v1/cloudstorages') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/api/v1/cloudstorages";
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}}/api/v1/cloudstorages
http GET {{baseUrl}}/api/v1/cloudstorages
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/api/v1/cloudstorages
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/v1/cloudstorages")! 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
Creates a new customer address
{{baseUrl}}/api/v1/customer-addresses
BODY json
{
"AddressAddition": "",
"AddressType": 0,
"ArchivedAt": "",
"City": "",
"Company": "",
"CountryCode": "",
"CustomerId": 0,
"Email": "",
"Fax": "",
"FirstName": "",
"Housenumber": "",
"Id": 0,
"LastName": "",
"Name2": "",
"RestoredAt": "",
"State": "",
"Street": "",
"Tel1": "",
"Tel2": "",
"Zip": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/v1/customer-addresses");
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 \"AddressAddition\": \"\",\n \"AddressType\": 0,\n \"ArchivedAt\": \"\",\n \"City\": \"\",\n \"Company\": \"\",\n \"CountryCode\": \"\",\n \"CustomerId\": 0,\n \"Email\": \"\",\n \"Fax\": \"\",\n \"FirstName\": \"\",\n \"Housenumber\": \"\",\n \"Id\": 0,\n \"LastName\": \"\",\n \"Name2\": \"\",\n \"RestoredAt\": \"\",\n \"State\": \"\",\n \"Street\": \"\",\n \"Tel1\": \"\",\n \"Tel2\": \"\",\n \"Zip\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/api/v1/customer-addresses" {:content-type :json
:form-params {:AddressAddition ""
:AddressType 0
:ArchivedAt ""
:City ""
:Company ""
:CountryCode ""
:CustomerId 0
:Email ""
:Fax ""
:FirstName ""
:Housenumber ""
:Id 0
:LastName ""
:Name2 ""
:RestoredAt ""
:State ""
:Street ""
:Tel1 ""
:Tel2 ""
:Zip ""}})
require "http/client"
url = "{{baseUrl}}/api/v1/customer-addresses"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"AddressAddition\": \"\",\n \"AddressType\": 0,\n \"ArchivedAt\": \"\",\n \"City\": \"\",\n \"Company\": \"\",\n \"CountryCode\": \"\",\n \"CustomerId\": 0,\n \"Email\": \"\",\n \"Fax\": \"\",\n \"FirstName\": \"\",\n \"Housenumber\": \"\",\n \"Id\": 0,\n \"LastName\": \"\",\n \"Name2\": \"\",\n \"RestoredAt\": \"\",\n \"State\": \"\",\n \"Street\": \"\",\n \"Tel1\": \"\",\n \"Tel2\": \"\",\n \"Zip\": \"\"\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}}/api/v1/customer-addresses"),
Content = new StringContent("{\n \"AddressAddition\": \"\",\n \"AddressType\": 0,\n \"ArchivedAt\": \"\",\n \"City\": \"\",\n \"Company\": \"\",\n \"CountryCode\": \"\",\n \"CustomerId\": 0,\n \"Email\": \"\",\n \"Fax\": \"\",\n \"FirstName\": \"\",\n \"Housenumber\": \"\",\n \"Id\": 0,\n \"LastName\": \"\",\n \"Name2\": \"\",\n \"RestoredAt\": \"\",\n \"State\": \"\",\n \"Street\": \"\",\n \"Tel1\": \"\",\n \"Tel2\": \"\",\n \"Zip\": \"\"\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}}/api/v1/customer-addresses");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"AddressAddition\": \"\",\n \"AddressType\": 0,\n \"ArchivedAt\": \"\",\n \"City\": \"\",\n \"Company\": \"\",\n \"CountryCode\": \"\",\n \"CustomerId\": 0,\n \"Email\": \"\",\n \"Fax\": \"\",\n \"FirstName\": \"\",\n \"Housenumber\": \"\",\n \"Id\": 0,\n \"LastName\": \"\",\n \"Name2\": \"\",\n \"RestoredAt\": \"\",\n \"State\": \"\",\n \"Street\": \"\",\n \"Tel1\": \"\",\n \"Tel2\": \"\",\n \"Zip\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/v1/customer-addresses"
payload := strings.NewReader("{\n \"AddressAddition\": \"\",\n \"AddressType\": 0,\n \"ArchivedAt\": \"\",\n \"City\": \"\",\n \"Company\": \"\",\n \"CountryCode\": \"\",\n \"CustomerId\": 0,\n \"Email\": \"\",\n \"Fax\": \"\",\n \"FirstName\": \"\",\n \"Housenumber\": \"\",\n \"Id\": 0,\n \"LastName\": \"\",\n \"Name2\": \"\",\n \"RestoredAt\": \"\",\n \"State\": \"\",\n \"Street\": \"\",\n \"Tel1\": \"\",\n \"Tel2\": \"\",\n \"Zip\": \"\"\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/api/v1/customer-addresses HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 342
{
"AddressAddition": "",
"AddressType": 0,
"ArchivedAt": "",
"City": "",
"Company": "",
"CountryCode": "",
"CustomerId": 0,
"Email": "",
"Fax": "",
"FirstName": "",
"Housenumber": "",
"Id": 0,
"LastName": "",
"Name2": "",
"RestoredAt": "",
"State": "",
"Street": "",
"Tel1": "",
"Tel2": "",
"Zip": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/api/v1/customer-addresses")
.setHeader("content-type", "application/json")
.setBody("{\n \"AddressAddition\": \"\",\n \"AddressType\": 0,\n \"ArchivedAt\": \"\",\n \"City\": \"\",\n \"Company\": \"\",\n \"CountryCode\": \"\",\n \"CustomerId\": 0,\n \"Email\": \"\",\n \"Fax\": \"\",\n \"FirstName\": \"\",\n \"Housenumber\": \"\",\n \"Id\": 0,\n \"LastName\": \"\",\n \"Name2\": \"\",\n \"RestoredAt\": \"\",\n \"State\": \"\",\n \"Street\": \"\",\n \"Tel1\": \"\",\n \"Tel2\": \"\",\n \"Zip\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/v1/customer-addresses"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"AddressAddition\": \"\",\n \"AddressType\": 0,\n \"ArchivedAt\": \"\",\n \"City\": \"\",\n \"Company\": \"\",\n \"CountryCode\": \"\",\n \"CustomerId\": 0,\n \"Email\": \"\",\n \"Fax\": \"\",\n \"FirstName\": \"\",\n \"Housenumber\": \"\",\n \"Id\": 0,\n \"LastName\": \"\",\n \"Name2\": \"\",\n \"RestoredAt\": \"\",\n \"State\": \"\",\n \"Street\": \"\",\n \"Tel1\": \"\",\n \"Tel2\": \"\",\n \"Zip\": \"\"\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 \"AddressAddition\": \"\",\n \"AddressType\": 0,\n \"ArchivedAt\": \"\",\n \"City\": \"\",\n \"Company\": \"\",\n \"CountryCode\": \"\",\n \"CustomerId\": 0,\n \"Email\": \"\",\n \"Fax\": \"\",\n \"FirstName\": \"\",\n \"Housenumber\": \"\",\n \"Id\": 0,\n \"LastName\": \"\",\n \"Name2\": \"\",\n \"RestoredAt\": \"\",\n \"State\": \"\",\n \"Street\": \"\",\n \"Tel1\": \"\",\n \"Tel2\": \"\",\n \"Zip\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/api/v1/customer-addresses")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/api/v1/customer-addresses")
.header("content-type", "application/json")
.body("{\n \"AddressAddition\": \"\",\n \"AddressType\": 0,\n \"ArchivedAt\": \"\",\n \"City\": \"\",\n \"Company\": \"\",\n \"CountryCode\": \"\",\n \"CustomerId\": 0,\n \"Email\": \"\",\n \"Fax\": \"\",\n \"FirstName\": \"\",\n \"Housenumber\": \"\",\n \"Id\": 0,\n \"LastName\": \"\",\n \"Name2\": \"\",\n \"RestoredAt\": \"\",\n \"State\": \"\",\n \"Street\": \"\",\n \"Tel1\": \"\",\n \"Tel2\": \"\",\n \"Zip\": \"\"\n}")
.asString();
const data = JSON.stringify({
AddressAddition: '',
AddressType: 0,
ArchivedAt: '',
City: '',
Company: '',
CountryCode: '',
CustomerId: 0,
Email: '',
Fax: '',
FirstName: '',
Housenumber: '',
Id: 0,
LastName: '',
Name2: '',
RestoredAt: '',
State: '',
Street: '',
Tel1: '',
Tel2: '',
Zip: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/api/v1/customer-addresses');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/api/v1/customer-addresses',
headers: {'content-type': 'application/json'},
data: {
AddressAddition: '',
AddressType: 0,
ArchivedAt: '',
City: '',
Company: '',
CountryCode: '',
CustomerId: 0,
Email: '',
Fax: '',
FirstName: '',
Housenumber: '',
Id: 0,
LastName: '',
Name2: '',
RestoredAt: '',
State: '',
Street: '',
Tel1: '',
Tel2: '',
Zip: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/v1/customer-addresses';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"AddressAddition":"","AddressType":0,"ArchivedAt":"","City":"","Company":"","CountryCode":"","CustomerId":0,"Email":"","Fax":"","FirstName":"","Housenumber":"","Id":0,"LastName":"","Name2":"","RestoredAt":"","State":"","Street":"","Tel1":"","Tel2":"","Zip":""}'
};
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}}/api/v1/customer-addresses',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "AddressAddition": "",\n "AddressType": 0,\n "ArchivedAt": "",\n "City": "",\n "Company": "",\n "CountryCode": "",\n "CustomerId": 0,\n "Email": "",\n "Fax": "",\n "FirstName": "",\n "Housenumber": "",\n "Id": 0,\n "LastName": "",\n "Name2": "",\n "RestoredAt": "",\n "State": "",\n "Street": "",\n "Tel1": "",\n "Tel2": "",\n "Zip": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"AddressAddition\": \"\",\n \"AddressType\": 0,\n \"ArchivedAt\": \"\",\n \"City\": \"\",\n \"Company\": \"\",\n \"CountryCode\": \"\",\n \"CustomerId\": 0,\n \"Email\": \"\",\n \"Fax\": \"\",\n \"FirstName\": \"\",\n \"Housenumber\": \"\",\n \"Id\": 0,\n \"LastName\": \"\",\n \"Name2\": \"\",\n \"RestoredAt\": \"\",\n \"State\": \"\",\n \"Street\": \"\",\n \"Tel1\": \"\",\n \"Tel2\": \"\",\n \"Zip\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/api/v1/customer-addresses")
.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/api/v1/customer-addresses',
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({
AddressAddition: '',
AddressType: 0,
ArchivedAt: '',
City: '',
Company: '',
CountryCode: '',
CustomerId: 0,
Email: '',
Fax: '',
FirstName: '',
Housenumber: '',
Id: 0,
LastName: '',
Name2: '',
RestoredAt: '',
State: '',
Street: '',
Tel1: '',
Tel2: '',
Zip: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/api/v1/customer-addresses',
headers: {'content-type': 'application/json'},
body: {
AddressAddition: '',
AddressType: 0,
ArchivedAt: '',
City: '',
Company: '',
CountryCode: '',
CustomerId: 0,
Email: '',
Fax: '',
FirstName: '',
Housenumber: '',
Id: 0,
LastName: '',
Name2: '',
RestoredAt: '',
State: '',
Street: '',
Tel1: '',
Tel2: '',
Zip: ''
},
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}}/api/v1/customer-addresses');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
AddressAddition: '',
AddressType: 0,
ArchivedAt: '',
City: '',
Company: '',
CountryCode: '',
CustomerId: 0,
Email: '',
Fax: '',
FirstName: '',
Housenumber: '',
Id: 0,
LastName: '',
Name2: '',
RestoredAt: '',
State: '',
Street: '',
Tel1: '',
Tel2: '',
Zip: ''
});
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}}/api/v1/customer-addresses',
headers: {'content-type': 'application/json'},
data: {
AddressAddition: '',
AddressType: 0,
ArchivedAt: '',
City: '',
Company: '',
CountryCode: '',
CustomerId: 0,
Email: '',
Fax: '',
FirstName: '',
Housenumber: '',
Id: 0,
LastName: '',
Name2: '',
RestoredAt: '',
State: '',
Street: '',
Tel1: '',
Tel2: '',
Zip: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/v1/customer-addresses';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"AddressAddition":"","AddressType":0,"ArchivedAt":"","City":"","Company":"","CountryCode":"","CustomerId":0,"Email":"","Fax":"","FirstName":"","Housenumber":"","Id":0,"LastName":"","Name2":"","RestoredAt":"","State":"","Street":"","Tel1":"","Tel2":"","Zip":""}'
};
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 = @{ @"AddressAddition": @"",
@"AddressType": @0,
@"ArchivedAt": @"",
@"City": @"",
@"Company": @"",
@"CountryCode": @"",
@"CustomerId": @0,
@"Email": @"",
@"Fax": @"",
@"FirstName": @"",
@"Housenumber": @"",
@"Id": @0,
@"LastName": @"",
@"Name2": @"",
@"RestoredAt": @"",
@"State": @"",
@"Street": @"",
@"Tel1": @"",
@"Tel2": @"",
@"Zip": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/api/v1/customer-addresses"]
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}}/api/v1/customer-addresses" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"AddressAddition\": \"\",\n \"AddressType\": 0,\n \"ArchivedAt\": \"\",\n \"City\": \"\",\n \"Company\": \"\",\n \"CountryCode\": \"\",\n \"CustomerId\": 0,\n \"Email\": \"\",\n \"Fax\": \"\",\n \"FirstName\": \"\",\n \"Housenumber\": \"\",\n \"Id\": 0,\n \"LastName\": \"\",\n \"Name2\": \"\",\n \"RestoredAt\": \"\",\n \"State\": \"\",\n \"Street\": \"\",\n \"Tel1\": \"\",\n \"Tel2\": \"\",\n \"Zip\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/v1/customer-addresses",
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([
'AddressAddition' => '',
'AddressType' => 0,
'ArchivedAt' => '',
'City' => '',
'Company' => '',
'CountryCode' => '',
'CustomerId' => 0,
'Email' => '',
'Fax' => '',
'FirstName' => '',
'Housenumber' => '',
'Id' => 0,
'LastName' => '',
'Name2' => '',
'RestoredAt' => '',
'State' => '',
'Street' => '',
'Tel1' => '',
'Tel2' => '',
'Zip' => ''
]),
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}}/api/v1/customer-addresses', [
'body' => '{
"AddressAddition": "",
"AddressType": 0,
"ArchivedAt": "",
"City": "",
"Company": "",
"CountryCode": "",
"CustomerId": 0,
"Email": "",
"Fax": "",
"FirstName": "",
"Housenumber": "",
"Id": 0,
"LastName": "",
"Name2": "",
"RestoredAt": "",
"State": "",
"Street": "",
"Tel1": "",
"Tel2": "",
"Zip": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/api/v1/customer-addresses');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'AddressAddition' => '',
'AddressType' => 0,
'ArchivedAt' => '',
'City' => '',
'Company' => '',
'CountryCode' => '',
'CustomerId' => 0,
'Email' => '',
'Fax' => '',
'FirstName' => '',
'Housenumber' => '',
'Id' => 0,
'LastName' => '',
'Name2' => '',
'RestoredAt' => '',
'State' => '',
'Street' => '',
'Tel1' => '',
'Tel2' => '',
'Zip' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'AddressAddition' => '',
'AddressType' => 0,
'ArchivedAt' => '',
'City' => '',
'Company' => '',
'CountryCode' => '',
'CustomerId' => 0,
'Email' => '',
'Fax' => '',
'FirstName' => '',
'Housenumber' => '',
'Id' => 0,
'LastName' => '',
'Name2' => '',
'RestoredAt' => '',
'State' => '',
'Street' => '',
'Tel1' => '',
'Tel2' => '',
'Zip' => ''
]));
$request->setRequestUrl('{{baseUrl}}/api/v1/customer-addresses');
$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}}/api/v1/customer-addresses' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"AddressAddition": "",
"AddressType": 0,
"ArchivedAt": "",
"City": "",
"Company": "",
"CountryCode": "",
"CustomerId": 0,
"Email": "",
"Fax": "",
"FirstName": "",
"Housenumber": "",
"Id": 0,
"LastName": "",
"Name2": "",
"RestoredAt": "",
"State": "",
"Street": "",
"Tel1": "",
"Tel2": "",
"Zip": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/v1/customer-addresses' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"AddressAddition": "",
"AddressType": 0,
"ArchivedAt": "",
"City": "",
"Company": "",
"CountryCode": "",
"CustomerId": 0,
"Email": "",
"Fax": "",
"FirstName": "",
"Housenumber": "",
"Id": 0,
"LastName": "",
"Name2": "",
"RestoredAt": "",
"State": "",
"Street": "",
"Tel1": "",
"Tel2": "",
"Zip": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"AddressAddition\": \"\",\n \"AddressType\": 0,\n \"ArchivedAt\": \"\",\n \"City\": \"\",\n \"Company\": \"\",\n \"CountryCode\": \"\",\n \"CustomerId\": 0,\n \"Email\": \"\",\n \"Fax\": \"\",\n \"FirstName\": \"\",\n \"Housenumber\": \"\",\n \"Id\": 0,\n \"LastName\": \"\",\n \"Name2\": \"\",\n \"RestoredAt\": \"\",\n \"State\": \"\",\n \"Street\": \"\",\n \"Tel1\": \"\",\n \"Tel2\": \"\",\n \"Zip\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/api/v1/customer-addresses", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/v1/customer-addresses"
payload = {
"AddressAddition": "",
"AddressType": 0,
"ArchivedAt": "",
"City": "",
"Company": "",
"CountryCode": "",
"CustomerId": 0,
"Email": "",
"Fax": "",
"FirstName": "",
"Housenumber": "",
"Id": 0,
"LastName": "",
"Name2": "",
"RestoredAt": "",
"State": "",
"Street": "",
"Tel1": "",
"Tel2": "",
"Zip": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/v1/customer-addresses"
payload <- "{\n \"AddressAddition\": \"\",\n \"AddressType\": 0,\n \"ArchivedAt\": \"\",\n \"City\": \"\",\n \"Company\": \"\",\n \"CountryCode\": \"\",\n \"CustomerId\": 0,\n \"Email\": \"\",\n \"Fax\": \"\",\n \"FirstName\": \"\",\n \"Housenumber\": \"\",\n \"Id\": 0,\n \"LastName\": \"\",\n \"Name2\": \"\",\n \"RestoredAt\": \"\",\n \"State\": \"\",\n \"Street\": \"\",\n \"Tel1\": \"\",\n \"Tel2\": \"\",\n \"Zip\": \"\"\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}}/api/v1/customer-addresses")
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 \"AddressAddition\": \"\",\n \"AddressType\": 0,\n \"ArchivedAt\": \"\",\n \"City\": \"\",\n \"Company\": \"\",\n \"CountryCode\": \"\",\n \"CustomerId\": 0,\n \"Email\": \"\",\n \"Fax\": \"\",\n \"FirstName\": \"\",\n \"Housenumber\": \"\",\n \"Id\": 0,\n \"LastName\": \"\",\n \"Name2\": \"\",\n \"RestoredAt\": \"\",\n \"State\": \"\",\n \"Street\": \"\",\n \"Tel1\": \"\",\n \"Tel2\": \"\",\n \"Zip\": \"\"\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/api/v1/customer-addresses') do |req|
req.body = "{\n \"AddressAddition\": \"\",\n \"AddressType\": 0,\n \"ArchivedAt\": \"\",\n \"City\": \"\",\n \"Company\": \"\",\n \"CountryCode\": \"\",\n \"CustomerId\": 0,\n \"Email\": \"\",\n \"Fax\": \"\",\n \"FirstName\": \"\",\n \"Housenumber\": \"\",\n \"Id\": 0,\n \"LastName\": \"\",\n \"Name2\": \"\",\n \"RestoredAt\": \"\",\n \"State\": \"\",\n \"Street\": \"\",\n \"Tel1\": \"\",\n \"Tel2\": \"\",\n \"Zip\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/api/v1/customer-addresses";
let payload = json!({
"AddressAddition": "",
"AddressType": 0,
"ArchivedAt": "",
"City": "",
"Company": "",
"CountryCode": "",
"CustomerId": 0,
"Email": "",
"Fax": "",
"FirstName": "",
"Housenumber": "",
"Id": 0,
"LastName": "",
"Name2": "",
"RestoredAt": "",
"State": "",
"Street": "",
"Tel1": "",
"Tel2": "",
"Zip": ""
});
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}}/api/v1/customer-addresses \
--header 'content-type: application/json' \
--data '{
"AddressAddition": "",
"AddressType": 0,
"ArchivedAt": "",
"City": "",
"Company": "",
"CountryCode": "",
"CustomerId": 0,
"Email": "",
"Fax": "",
"FirstName": "",
"Housenumber": "",
"Id": 0,
"LastName": "",
"Name2": "",
"RestoredAt": "",
"State": "",
"Street": "",
"Tel1": "",
"Tel2": "",
"Zip": ""
}'
echo '{
"AddressAddition": "",
"AddressType": 0,
"ArchivedAt": "",
"City": "",
"Company": "",
"CountryCode": "",
"CustomerId": 0,
"Email": "",
"Fax": "",
"FirstName": "",
"Housenumber": "",
"Id": 0,
"LastName": "",
"Name2": "",
"RestoredAt": "",
"State": "",
"Street": "",
"Tel1": "",
"Tel2": "",
"Zip": ""
}' | \
http POST {{baseUrl}}/api/v1/customer-addresses \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "AddressAddition": "",\n "AddressType": 0,\n "ArchivedAt": "",\n "City": "",\n "Company": "",\n "CountryCode": "",\n "CustomerId": 0,\n "Email": "",\n "Fax": "",\n "FirstName": "",\n "Housenumber": "",\n "Id": 0,\n "LastName": "",\n "Name2": "",\n "RestoredAt": "",\n "State": "",\n "Street": "",\n "Tel1": "",\n "Tel2": "",\n "Zip": ""\n}' \
--output-document \
- {{baseUrl}}/api/v1/customer-addresses
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"AddressAddition": "",
"AddressType": 0,
"ArchivedAt": "",
"City": "",
"Company": "",
"CountryCode": "",
"CustomerId": 0,
"Email": "",
"Fax": "",
"FirstName": "",
"Housenumber": "",
"Id": 0,
"LastName": "",
"Name2": "",
"RestoredAt": "",
"State": "",
"Street": "",
"Tel1": "",
"Tel2": "",
"Zip": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/v1/customer-addresses")! 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
Get a list of all customer addresses
{{baseUrl}}/api/v1/customer-addresses
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/v1/customer-addresses");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/api/v1/customer-addresses")
require "http/client"
url = "{{baseUrl}}/api/v1/customer-addresses"
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}}/api/v1/customer-addresses"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/api/v1/customer-addresses");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/v1/customer-addresses"
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/api/v1/customer-addresses HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/api/v1/customer-addresses")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/v1/customer-addresses"))
.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}}/api/v1/customer-addresses")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/api/v1/customer-addresses")
.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}}/api/v1/customer-addresses');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/api/v1/customer-addresses'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/v1/customer-addresses';
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}}/api/v1/customer-addresses',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/api/v1/customer-addresses")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/api/v1/customer-addresses',
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}}/api/v1/customer-addresses'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/api/v1/customer-addresses');
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}}/api/v1/customer-addresses'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/v1/customer-addresses';
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}}/api/v1/customer-addresses"]
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}}/api/v1/customer-addresses" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/v1/customer-addresses",
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}}/api/v1/customer-addresses');
echo $response->getBody();
setUrl('{{baseUrl}}/api/v1/customer-addresses');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/api/v1/customer-addresses');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/api/v1/customer-addresses' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/v1/customer-addresses' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/api/v1/customer-addresses")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/v1/customer-addresses"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/v1/customer-addresses"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/api/v1/customer-addresses")
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/api/v1/customer-addresses') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/api/v1/customer-addresses";
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}}/api/v1/customer-addresses
http GET {{baseUrl}}/api/v1/customer-addresses
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/api/v1/customer-addresses
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/v1/customer-addresses")! 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
Queries a single customer address by id
{{baseUrl}}/api/v1/customer-addresses/:id
QUERY PARAMS
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/v1/customer-addresses/:id");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/api/v1/customer-addresses/:id")
require "http/client"
url = "{{baseUrl}}/api/v1/customer-addresses/: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}}/api/v1/customer-addresses/:id"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/api/v1/customer-addresses/:id");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/v1/customer-addresses/: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/api/v1/customer-addresses/:id HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/api/v1/customer-addresses/:id")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/v1/customer-addresses/: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}}/api/v1/customer-addresses/:id")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/api/v1/customer-addresses/: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}}/api/v1/customer-addresses/:id');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/api/v1/customer-addresses/:id'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/v1/customer-addresses/: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}}/api/v1/customer-addresses/:id',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/api/v1/customer-addresses/:id")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/api/v1/customer-addresses/: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}}/api/v1/customer-addresses/: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}}/api/v1/customer-addresses/: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}}/api/v1/customer-addresses/:id'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/v1/customer-addresses/: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}}/api/v1/customer-addresses/: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}}/api/v1/customer-addresses/:id" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/v1/customer-addresses/: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}}/api/v1/customer-addresses/:id');
echo $response->getBody();
setUrl('{{baseUrl}}/api/v1/customer-addresses/:id');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/api/v1/customer-addresses/:id');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/api/v1/customer-addresses/:id' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/v1/customer-addresses/:id' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/api/v1/customer-addresses/:id")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/v1/customer-addresses/:id"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/v1/customer-addresses/:id"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/api/v1/customer-addresses/: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/api/v1/customer-addresses/:id') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/api/v1/customer-addresses/: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}}/api/v1/customer-addresses/:id
http GET {{baseUrl}}/api/v1/customer-addresses/:id
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/api/v1/customer-addresses/:id
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/v1/customer-addresses/: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()
PUT
Updates a customer address by id
{{baseUrl}}/api/v1/customer-addresses/:id
QUERY PARAMS
id
BODY json
{
"AddressAddition": "",
"AddressType": 0,
"ArchivedAt": "",
"City": "",
"Company": "",
"CountryCode": "",
"CustomerId": 0,
"Email": "",
"Fax": "",
"FirstName": "",
"Housenumber": "",
"Id": 0,
"LastName": "",
"Name2": "",
"RestoredAt": "",
"State": "",
"Street": "",
"Tel1": "",
"Tel2": "",
"Zip": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/v1/customer-addresses/: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 \"AddressAddition\": \"\",\n \"AddressType\": 0,\n \"ArchivedAt\": \"\",\n \"City\": \"\",\n \"Company\": \"\",\n \"CountryCode\": \"\",\n \"CustomerId\": 0,\n \"Email\": \"\",\n \"Fax\": \"\",\n \"FirstName\": \"\",\n \"Housenumber\": \"\",\n \"Id\": 0,\n \"LastName\": \"\",\n \"Name2\": \"\",\n \"RestoredAt\": \"\",\n \"State\": \"\",\n \"Street\": \"\",\n \"Tel1\": \"\",\n \"Tel2\": \"\",\n \"Zip\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/api/v1/customer-addresses/:id" {:content-type :json
:form-params {:AddressAddition ""
:AddressType 0
:ArchivedAt ""
:City ""
:Company ""
:CountryCode ""
:CustomerId 0
:Email ""
:Fax ""
:FirstName ""
:Housenumber ""
:Id 0
:LastName ""
:Name2 ""
:RestoredAt ""
:State ""
:Street ""
:Tel1 ""
:Tel2 ""
:Zip ""}})
require "http/client"
url = "{{baseUrl}}/api/v1/customer-addresses/:id"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"AddressAddition\": \"\",\n \"AddressType\": 0,\n \"ArchivedAt\": \"\",\n \"City\": \"\",\n \"Company\": \"\",\n \"CountryCode\": \"\",\n \"CustomerId\": 0,\n \"Email\": \"\",\n \"Fax\": \"\",\n \"FirstName\": \"\",\n \"Housenumber\": \"\",\n \"Id\": 0,\n \"LastName\": \"\",\n \"Name2\": \"\",\n \"RestoredAt\": \"\",\n \"State\": \"\",\n \"Street\": \"\",\n \"Tel1\": \"\",\n \"Tel2\": \"\",\n \"Zip\": \"\"\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}}/api/v1/customer-addresses/:id"),
Content = new StringContent("{\n \"AddressAddition\": \"\",\n \"AddressType\": 0,\n \"ArchivedAt\": \"\",\n \"City\": \"\",\n \"Company\": \"\",\n \"CountryCode\": \"\",\n \"CustomerId\": 0,\n \"Email\": \"\",\n \"Fax\": \"\",\n \"FirstName\": \"\",\n \"Housenumber\": \"\",\n \"Id\": 0,\n \"LastName\": \"\",\n \"Name2\": \"\",\n \"RestoredAt\": \"\",\n \"State\": \"\",\n \"Street\": \"\",\n \"Tel1\": \"\",\n \"Tel2\": \"\",\n \"Zip\": \"\"\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}}/api/v1/customer-addresses/:id");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"AddressAddition\": \"\",\n \"AddressType\": 0,\n \"ArchivedAt\": \"\",\n \"City\": \"\",\n \"Company\": \"\",\n \"CountryCode\": \"\",\n \"CustomerId\": 0,\n \"Email\": \"\",\n \"Fax\": \"\",\n \"FirstName\": \"\",\n \"Housenumber\": \"\",\n \"Id\": 0,\n \"LastName\": \"\",\n \"Name2\": \"\",\n \"RestoredAt\": \"\",\n \"State\": \"\",\n \"Street\": \"\",\n \"Tel1\": \"\",\n \"Tel2\": \"\",\n \"Zip\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/v1/customer-addresses/:id"
payload := strings.NewReader("{\n \"AddressAddition\": \"\",\n \"AddressType\": 0,\n \"ArchivedAt\": \"\",\n \"City\": \"\",\n \"Company\": \"\",\n \"CountryCode\": \"\",\n \"CustomerId\": 0,\n \"Email\": \"\",\n \"Fax\": \"\",\n \"FirstName\": \"\",\n \"Housenumber\": \"\",\n \"Id\": 0,\n \"LastName\": \"\",\n \"Name2\": \"\",\n \"RestoredAt\": \"\",\n \"State\": \"\",\n \"Street\": \"\",\n \"Tel1\": \"\",\n \"Tel2\": \"\",\n \"Zip\": \"\"\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/api/v1/customer-addresses/:id HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 342
{
"AddressAddition": "",
"AddressType": 0,
"ArchivedAt": "",
"City": "",
"Company": "",
"CountryCode": "",
"CustomerId": 0,
"Email": "",
"Fax": "",
"FirstName": "",
"Housenumber": "",
"Id": 0,
"LastName": "",
"Name2": "",
"RestoredAt": "",
"State": "",
"Street": "",
"Tel1": "",
"Tel2": "",
"Zip": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/api/v1/customer-addresses/:id")
.setHeader("content-type", "application/json")
.setBody("{\n \"AddressAddition\": \"\",\n \"AddressType\": 0,\n \"ArchivedAt\": \"\",\n \"City\": \"\",\n \"Company\": \"\",\n \"CountryCode\": \"\",\n \"CustomerId\": 0,\n \"Email\": \"\",\n \"Fax\": \"\",\n \"FirstName\": \"\",\n \"Housenumber\": \"\",\n \"Id\": 0,\n \"LastName\": \"\",\n \"Name2\": \"\",\n \"RestoredAt\": \"\",\n \"State\": \"\",\n \"Street\": \"\",\n \"Tel1\": \"\",\n \"Tel2\": \"\",\n \"Zip\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/v1/customer-addresses/:id"))
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("{\n \"AddressAddition\": \"\",\n \"AddressType\": 0,\n \"ArchivedAt\": \"\",\n \"City\": \"\",\n \"Company\": \"\",\n \"CountryCode\": \"\",\n \"CustomerId\": 0,\n \"Email\": \"\",\n \"Fax\": \"\",\n \"FirstName\": \"\",\n \"Housenumber\": \"\",\n \"Id\": 0,\n \"LastName\": \"\",\n \"Name2\": \"\",\n \"RestoredAt\": \"\",\n \"State\": \"\",\n \"Street\": \"\",\n \"Tel1\": \"\",\n \"Tel2\": \"\",\n \"Zip\": \"\"\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 \"AddressAddition\": \"\",\n \"AddressType\": 0,\n \"ArchivedAt\": \"\",\n \"City\": \"\",\n \"Company\": \"\",\n \"CountryCode\": \"\",\n \"CustomerId\": 0,\n \"Email\": \"\",\n \"Fax\": \"\",\n \"FirstName\": \"\",\n \"Housenumber\": \"\",\n \"Id\": 0,\n \"LastName\": \"\",\n \"Name2\": \"\",\n \"RestoredAt\": \"\",\n \"State\": \"\",\n \"Street\": \"\",\n \"Tel1\": \"\",\n \"Tel2\": \"\",\n \"Zip\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/api/v1/customer-addresses/:id")
.put(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/api/v1/customer-addresses/:id")
.header("content-type", "application/json")
.body("{\n \"AddressAddition\": \"\",\n \"AddressType\": 0,\n \"ArchivedAt\": \"\",\n \"City\": \"\",\n \"Company\": \"\",\n \"CountryCode\": \"\",\n \"CustomerId\": 0,\n \"Email\": \"\",\n \"Fax\": \"\",\n \"FirstName\": \"\",\n \"Housenumber\": \"\",\n \"Id\": 0,\n \"LastName\": \"\",\n \"Name2\": \"\",\n \"RestoredAt\": \"\",\n \"State\": \"\",\n \"Street\": \"\",\n \"Tel1\": \"\",\n \"Tel2\": \"\",\n \"Zip\": \"\"\n}")
.asString();
const data = JSON.stringify({
AddressAddition: '',
AddressType: 0,
ArchivedAt: '',
City: '',
Company: '',
CountryCode: '',
CustomerId: 0,
Email: '',
Fax: '',
FirstName: '',
Housenumber: '',
Id: 0,
LastName: '',
Name2: '',
RestoredAt: '',
State: '',
Street: '',
Tel1: '',
Tel2: '',
Zip: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/api/v1/customer-addresses/:id');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/api/v1/customer-addresses/:id',
headers: {'content-type': 'application/json'},
data: {
AddressAddition: '',
AddressType: 0,
ArchivedAt: '',
City: '',
Company: '',
CountryCode: '',
CustomerId: 0,
Email: '',
Fax: '',
FirstName: '',
Housenumber: '',
Id: 0,
LastName: '',
Name2: '',
RestoredAt: '',
State: '',
Street: '',
Tel1: '',
Tel2: '',
Zip: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/v1/customer-addresses/:id';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"AddressAddition":"","AddressType":0,"ArchivedAt":"","City":"","Company":"","CountryCode":"","CustomerId":0,"Email":"","Fax":"","FirstName":"","Housenumber":"","Id":0,"LastName":"","Name2":"","RestoredAt":"","State":"","Street":"","Tel1":"","Tel2":"","Zip":""}'
};
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}}/api/v1/customer-addresses/:id',
method: 'PUT',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "AddressAddition": "",\n "AddressType": 0,\n "ArchivedAt": "",\n "City": "",\n "Company": "",\n "CountryCode": "",\n "CustomerId": 0,\n "Email": "",\n "Fax": "",\n "FirstName": "",\n "Housenumber": "",\n "Id": 0,\n "LastName": "",\n "Name2": "",\n "RestoredAt": "",\n "State": "",\n "Street": "",\n "Tel1": "",\n "Tel2": "",\n "Zip": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"AddressAddition\": \"\",\n \"AddressType\": 0,\n \"ArchivedAt\": \"\",\n \"City\": \"\",\n \"Company\": \"\",\n \"CountryCode\": \"\",\n \"CustomerId\": 0,\n \"Email\": \"\",\n \"Fax\": \"\",\n \"FirstName\": \"\",\n \"Housenumber\": \"\",\n \"Id\": 0,\n \"LastName\": \"\",\n \"Name2\": \"\",\n \"RestoredAt\": \"\",\n \"State\": \"\",\n \"Street\": \"\",\n \"Tel1\": \"\",\n \"Tel2\": \"\",\n \"Zip\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/api/v1/customer-addresses/: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/api/v1/customer-addresses/: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({
AddressAddition: '',
AddressType: 0,
ArchivedAt: '',
City: '',
Company: '',
CountryCode: '',
CustomerId: 0,
Email: '',
Fax: '',
FirstName: '',
Housenumber: '',
Id: 0,
LastName: '',
Name2: '',
RestoredAt: '',
State: '',
Street: '',
Tel1: '',
Tel2: '',
Zip: ''
}));
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/api/v1/customer-addresses/:id',
headers: {'content-type': 'application/json'},
body: {
AddressAddition: '',
AddressType: 0,
ArchivedAt: '',
City: '',
Company: '',
CountryCode: '',
CustomerId: 0,
Email: '',
Fax: '',
FirstName: '',
Housenumber: '',
Id: 0,
LastName: '',
Name2: '',
RestoredAt: '',
State: '',
Street: '',
Tel1: '',
Tel2: '',
Zip: ''
},
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}}/api/v1/customer-addresses/:id');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
AddressAddition: '',
AddressType: 0,
ArchivedAt: '',
City: '',
Company: '',
CountryCode: '',
CustomerId: 0,
Email: '',
Fax: '',
FirstName: '',
Housenumber: '',
Id: 0,
LastName: '',
Name2: '',
RestoredAt: '',
State: '',
Street: '',
Tel1: '',
Tel2: '',
Zip: ''
});
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}}/api/v1/customer-addresses/:id',
headers: {'content-type': 'application/json'},
data: {
AddressAddition: '',
AddressType: 0,
ArchivedAt: '',
City: '',
Company: '',
CountryCode: '',
CustomerId: 0,
Email: '',
Fax: '',
FirstName: '',
Housenumber: '',
Id: 0,
LastName: '',
Name2: '',
RestoredAt: '',
State: '',
Street: '',
Tel1: '',
Tel2: '',
Zip: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/v1/customer-addresses/:id';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"AddressAddition":"","AddressType":0,"ArchivedAt":"","City":"","Company":"","CountryCode":"","CustomerId":0,"Email":"","Fax":"","FirstName":"","Housenumber":"","Id":0,"LastName":"","Name2":"","RestoredAt":"","State":"","Street":"","Tel1":"","Tel2":"","Zip":""}'
};
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 = @{ @"AddressAddition": @"",
@"AddressType": @0,
@"ArchivedAt": @"",
@"City": @"",
@"Company": @"",
@"CountryCode": @"",
@"CustomerId": @0,
@"Email": @"",
@"Fax": @"",
@"FirstName": @"",
@"Housenumber": @"",
@"Id": @0,
@"LastName": @"",
@"Name2": @"",
@"RestoredAt": @"",
@"State": @"",
@"Street": @"",
@"Tel1": @"",
@"Tel2": @"",
@"Zip": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/api/v1/customer-addresses/: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}}/api/v1/customer-addresses/:id" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"AddressAddition\": \"\",\n \"AddressType\": 0,\n \"ArchivedAt\": \"\",\n \"City\": \"\",\n \"Company\": \"\",\n \"CountryCode\": \"\",\n \"CustomerId\": 0,\n \"Email\": \"\",\n \"Fax\": \"\",\n \"FirstName\": \"\",\n \"Housenumber\": \"\",\n \"Id\": 0,\n \"LastName\": \"\",\n \"Name2\": \"\",\n \"RestoredAt\": \"\",\n \"State\": \"\",\n \"Street\": \"\",\n \"Tel1\": \"\",\n \"Tel2\": \"\",\n \"Zip\": \"\"\n}" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/v1/customer-addresses/: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([
'AddressAddition' => '',
'AddressType' => 0,
'ArchivedAt' => '',
'City' => '',
'Company' => '',
'CountryCode' => '',
'CustomerId' => 0,
'Email' => '',
'Fax' => '',
'FirstName' => '',
'Housenumber' => '',
'Id' => 0,
'LastName' => '',
'Name2' => '',
'RestoredAt' => '',
'State' => '',
'Street' => '',
'Tel1' => '',
'Tel2' => '',
'Zip' => ''
]),
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}}/api/v1/customer-addresses/:id', [
'body' => '{
"AddressAddition": "",
"AddressType": 0,
"ArchivedAt": "",
"City": "",
"Company": "",
"CountryCode": "",
"CustomerId": 0,
"Email": "",
"Fax": "",
"FirstName": "",
"Housenumber": "",
"Id": 0,
"LastName": "",
"Name2": "",
"RestoredAt": "",
"State": "",
"Street": "",
"Tel1": "",
"Tel2": "",
"Zip": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/api/v1/customer-addresses/:id');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'AddressAddition' => '',
'AddressType' => 0,
'ArchivedAt' => '',
'City' => '',
'Company' => '',
'CountryCode' => '',
'CustomerId' => 0,
'Email' => '',
'Fax' => '',
'FirstName' => '',
'Housenumber' => '',
'Id' => 0,
'LastName' => '',
'Name2' => '',
'RestoredAt' => '',
'State' => '',
'Street' => '',
'Tel1' => '',
'Tel2' => '',
'Zip' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'AddressAddition' => '',
'AddressType' => 0,
'ArchivedAt' => '',
'City' => '',
'Company' => '',
'CountryCode' => '',
'CustomerId' => 0,
'Email' => '',
'Fax' => '',
'FirstName' => '',
'Housenumber' => '',
'Id' => 0,
'LastName' => '',
'Name2' => '',
'RestoredAt' => '',
'State' => '',
'Street' => '',
'Tel1' => '',
'Tel2' => '',
'Zip' => ''
]));
$request->setRequestUrl('{{baseUrl}}/api/v1/customer-addresses/: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}}/api/v1/customer-addresses/:id' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"AddressAddition": "",
"AddressType": 0,
"ArchivedAt": "",
"City": "",
"Company": "",
"CountryCode": "",
"CustomerId": 0,
"Email": "",
"Fax": "",
"FirstName": "",
"Housenumber": "",
"Id": 0,
"LastName": "",
"Name2": "",
"RestoredAt": "",
"State": "",
"Street": "",
"Tel1": "",
"Tel2": "",
"Zip": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/v1/customer-addresses/:id' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"AddressAddition": "",
"AddressType": 0,
"ArchivedAt": "",
"City": "",
"Company": "",
"CountryCode": "",
"CustomerId": 0,
"Email": "",
"Fax": "",
"FirstName": "",
"Housenumber": "",
"Id": 0,
"LastName": "",
"Name2": "",
"RestoredAt": "",
"State": "",
"Street": "",
"Tel1": "",
"Tel2": "",
"Zip": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"AddressAddition\": \"\",\n \"AddressType\": 0,\n \"ArchivedAt\": \"\",\n \"City\": \"\",\n \"Company\": \"\",\n \"CountryCode\": \"\",\n \"CustomerId\": 0,\n \"Email\": \"\",\n \"Fax\": \"\",\n \"FirstName\": \"\",\n \"Housenumber\": \"\",\n \"Id\": 0,\n \"LastName\": \"\",\n \"Name2\": \"\",\n \"RestoredAt\": \"\",\n \"State\": \"\",\n \"Street\": \"\",\n \"Tel1\": \"\",\n \"Tel2\": \"\",\n \"Zip\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("PUT", "/baseUrl/api/v1/customer-addresses/:id", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/v1/customer-addresses/:id"
payload = {
"AddressAddition": "",
"AddressType": 0,
"ArchivedAt": "",
"City": "",
"Company": "",
"CountryCode": "",
"CustomerId": 0,
"Email": "",
"Fax": "",
"FirstName": "",
"Housenumber": "",
"Id": 0,
"LastName": "",
"Name2": "",
"RestoredAt": "",
"State": "",
"Street": "",
"Tel1": "",
"Tel2": "",
"Zip": ""
}
headers = {"content-type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/v1/customer-addresses/:id"
payload <- "{\n \"AddressAddition\": \"\",\n \"AddressType\": 0,\n \"ArchivedAt\": \"\",\n \"City\": \"\",\n \"Company\": \"\",\n \"CountryCode\": \"\",\n \"CustomerId\": 0,\n \"Email\": \"\",\n \"Fax\": \"\",\n \"FirstName\": \"\",\n \"Housenumber\": \"\",\n \"Id\": 0,\n \"LastName\": \"\",\n \"Name2\": \"\",\n \"RestoredAt\": \"\",\n \"State\": \"\",\n \"Street\": \"\",\n \"Tel1\": \"\",\n \"Tel2\": \"\",\n \"Zip\": \"\"\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}}/api/v1/customer-addresses/: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 \"AddressAddition\": \"\",\n \"AddressType\": 0,\n \"ArchivedAt\": \"\",\n \"City\": \"\",\n \"Company\": \"\",\n \"CountryCode\": \"\",\n \"CustomerId\": 0,\n \"Email\": \"\",\n \"Fax\": \"\",\n \"FirstName\": \"\",\n \"Housenumber\": \"\",\n \"Id\": 0,\n \"LastName\": \"\",\n \"Name2\": \"\",\n \"RestoredAt\": \"\",\n \"State\": \"\",\n \"Street\": \"\",\n \"Tel1\": \"\",\n \"Tel2\": \"\",\n \"Zip\": \"\"\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/api/v1/customer-addresses/:id') do |req|
req.body = "{\n \"AddressAddition\": \"\",\n \"AddressType\": 0,\n \"ArchivedAt\": \"\",\n \"City\": \"\",\n \"Company\": \"\",\n \"CountryCode\": \"\",\n \"CustomerId\": 0,\n \"Email\": \"\",\n \"Fax\": \"\",\n \"FirstName\": \"\",\n \"Housenumber\": \"\",\n \"Id\": 0,\n \"LastName\": \"\",\n \"Name2\": \"\",\n \"RestoredAt\": \"\",\n \"State\": \"\",\n \"Street\": \"\",\n \"Tel1\": \"\",\n \"Tel2\": \"\",\n \"Zip\": \"\"\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}}/api/v1/customer-addresses/:id";
let payload = json!({
"AddressAddition": "",
"AddressType": 0,
"ArchivedAt": "",
"City": "",
"Company": "",
"CountryCode": "",
"CustomerId": 0,
"Email": "",
"Fax": "",
"FirstName": "",
"Housenumber": "",
"Id": 0,
"LastName": "",
"Name2": "",
"RestoredAt": "",
"State": "",
"Street": "",
"Tel1": "",
"Tel2": "",
"Zip": ""
});
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}}/api/v1/customer-addresses/:id \
--header 'content-type: application/json' \
--data '{
"AddressAddition": "",
"AddressType": 0,
"ArchivedAt": "",
"City": "",
"Company": "",
"CountryCode": "",
"CustomerId": 0,
"Email": "",
"Fax": "",
"FirstName": "",
"Housenumber": "",
"Id": 0,
"LastName": "",
"Name2": "",
"RestoredAt": "",
"State": "",
"Street": "",
"Tel1": "",
"Tel2": "",
"Zip": ""
}'
echo '{
"AddressAddition": "",
"AddressType": 0,
"ArchivedAt": "",
"City": "",
"Company": "",
"CountryCode": "",
"CustomerId": 0,
"Email": "",
"Fax": "",
"FirstName": "",
"Housenumber": "",
"Id": 0,
"LastName": "",
"Name2": "",
"RestoredAt": "",
"State": "",
"Street": "",
"Tel1": "",
"Tel2": "",
"Zip": ""
}' | \
http PUT {{baseUrl}}/api/v1/customer-addresses/:id \
content-type:application/json
wget --quiet \
--method PUT \
--header 'content-type: application/json' \
--body-data '{\n "AddressAddition": "",\n "AddressType": 0,\n "ArchivedAt": "",\n "City": "",\n "Company": "",\n "CountryCode": "",\n "CustomerId": 0,\n "Email": "",\n "Fax": "",\n "FirstName": "",\n "Housenumber": "",\n "Id": 0,\n "LastName": "",\n "Name2": "",\n "RestoredAt": "",\n "State": "",\n "Street": "",\n "Tel1": "",\n "Tel2": "",\n "Zip": ""\n}' \
--output-document \
- {{baseUrl}}/api/v1/customer-addresses/:id
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"AddressAddition": "",
"AddressType": 0,
"ArchivedAt": "",
"City": "",
"Company": "",
"CountryCode": "",
"CustomerId": 0,
"Email": "",
"Fax": "",
"FirstName": "",
"Housenumber": "",
"Id": 0,
"LastName": "",
"Name2": "",
"RestoredAt": "",
"State": "",
"Street": "",
"Tel1": "",
"Tel2": "",
"Zip": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/v1/customer-addresses/: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
Adds a new address to a customer
{{baseUrl}}/api/v1/customers/:id/addresses
QUERY PARAMS
id
BODY json
{
"AddressAddition": "",
"AddressType": 0,
"ArchivedAt": "",
"City": "",
"Company": "",
"CountryCode": "",
"CustomerId": 0,
"Email": "",
"Fax": "",
"FirstName": "",
"Housenumber": "",
"Id": 0,
"LastName": "",
"Name2": "",
"RestoredAt": "",
"State": "",
"Street": "",
"Tel1": "",
"Tel2": "",
"Zip": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/v1/customers/:id/addresses");
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 \"AddressAddition\": \"\",\n \"AddressType\": 0,\n \"ArchivedAt\": \"\",\n \"City\": \"\",\n \"Company\": \"\",\n \"CountryCode\": \"\",\n \"CustomerId\": 0,\n \"Email\": \"\",\n \"Fax\": \"\",\n \"FirstName\": \"\",\n \"Housenumber\": \"\",\n \"Id\": 0,\n \"LastName\": \"\",\n \"Name2\": \"\",\n \"RestoredAt\": \"\",\n \"State\": \"\",\n \"Street\": \"\",\n \"Tel1\": \"\",\n \"Tel2\": \"\",\n \"Zip\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/api/v1/customers/:id/addresses" {:content-type :json
:form-params {:AddressAddition ""
:AddressType 0
:ArchivedAt ""
:City ""
:Company ""
:CountryCode ""
:CustomerId 0
:Email ""
:Fax ""
:FirstName ""
:Housenumber ""
:Id 0
:LastName ""
:Name2 ""
:RestoredAt ""
:State ""
:Street ""
:Tel1 ""
:Tel2 ""
:Zip ""}})
require "http/client"
url = "{{baseUrl}}/api/v1/customers/:id/addresses"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"AddressAddition\": \"\",\n \"AddressType\": 0,\n \"ArchivedAt\": \"\",\n \"City\": \"\",\n \"Company\": \"\",\n \"CountryCode\": \"\",\n \"CustomerId\": 0,\n \"Email\": \"\",\n \"Fax\": \"\",\n \"FirstName\": \"\",\n \"Housenumber\": \"\",\n \"Id\": 0,\n \"LastName\": \"\",\n \"Name2\": \"\",\n \"RestoredAt\": \"\",\n \"State\": \"\",\n \"Street\": \"\",\n \"Tel1\": \"\",\n \"Tel2\": \"\",\n \"Zip\": \"\"\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}}/api/v1/customers/:id/addresses"),
Content = new StringContent("{\n \"AddressAddition\": \"\",\n \"AddressType\": 0,\n \"ArchivedAt\": \"\",\n \"City\": \"\",\n \"Company\": \"\",\n \"CountryCode\": \"\",\n \"CustomerId\": 0,\n \"Email\": \"\",\n \"Fax\": \"\",\n \"FirstName\": \"\",\n \"Housenumber\": \"\",\n \"Id\": 0,\n \"LastName\": \"\",\n \"Name2\": \"\",\n \"RestoredAt\": \"\",\n \"State\": \"\",\n \"Street\": \"\",\n \"Tel1\": \"\",\n \"Tel2\": \"\",\n \"Zip\": \"\"\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}}/api/v1/customers/:id/addresses");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"AddressAddition\": \"\",\n \"AddressType\": 0,\n \"ArchivedAt\": \"\",\n \"City\": \"\",\n \"Company\": \"\",\n \"CountryCode\": \"\",\n \"CustomerId\": 0,\n \"Email\": \"\",\n \"Fax\": \"\",\n \"FirstName\": \"\",\n \"Housenumber\": \"\",\n \"Id\": 0,\n \"LastName\": \"\",\n \"Name2\": \"\",\n \"RestoredAt\": \"\",\n \"State\": \"\",\n \"Street\": \"\",\n \"Tel1\": \"\",\n \"Tel2\": \"\",\n \"Zip\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/v1/customers/:id/addresses"
payload := strings.NewReader("{\n \"AddressAddition\": \"\",\n \"AddressType\": 0,\n \"ArchivedAt\": \"\",\n \"City\": \"\",\n \"Company\": \"\",\n \"CountryCode\": \"\",\n \"CustomerId\": 0,\n \"Email\": \"\",\n \"Fax\": \"\",\n \"FirstName\": \"\",\n \"Housenumber\": \"\",\n \"Id\": 0,\n \"LastName\": \"\",\n \"Name2\": \"\",\n \"RestoredAt\": \"\",\n \"State\": \"\",\n \"Street\": \"\",\n \"Tel1\": \"\",\n \"Tel2\": \"\",\n \"Zip\": \"\"\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/api/v1/customers/:id/addresses HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 342
{
"AddressAddition": "",
"AddressType": 0,
"ArchivedAt": "",
"City": "",
"Company": "",
"CountryCode": "",
"CustomerId": 0,
"Email": "",
"Fax": "",
"FirstName": "",
"Housenumber": "",
"Id": 0,
"LastName": "",
"Name2": "",
"RestoredAt": "",
"State": "",
"Street": "",
"Tel1": "",
"Tel2": "",
"Zip": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/api/v1/customers/:id/addresses")
.setHeader("content-type", "application/json")
.setBody("{\n \"AddressAddition\": \"\",\n \"AddressType\": 0,\n \"ArchivedAt\": \"\",\n \"City\": \"\",\n \"Company\": \"\",\n \"CountryCode\": \"\",\n \"CustomerId\": 0,\n \"Email\": \"\",\n \"Fax\": \"\",\n \"FirstName\": \"\",\n \"Housenumber\": \"\",\n \"Id\": 0,\n \"LastName\": \"\",\n \"Name2\": \"\",\n \"RestoredAt\": \"\",\n \"State\": \"\",\n \"Street\": \"\",\n \"Tel1\": \"\",\n \"Tel2\": \"\",\n \"Zip\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/v1/customers/:id/addresses"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"AddressAddition\": \"\",\n \"AddressType\": 0,\n \"ArchivedAt\": \"\",\n \"City\": \"\",\n \"Company\": \"\",\n \"CountryCode\": \"\",\n \"CustomerId\": 0,\n \"Email\": \"\",\n \"Fax\": \"\",\n \"FirstName\": \"\",\n \"Housenumber\": \"\",\n \"Id\": 0,\n \"LastName\": \"\",\n \"Name2\": \"\",\n \"RestoredAt\": \"\",\n \"State\": \"\",\n \"Street\": \"\",\n \"Tel1\": \"\",\n \"Tel2\": \"\",\n \"Zip\": \"\"\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 \"AddressAddition\": \"\",\n \"AddressType\": 0,\n \"ArchivedAt\": \"\",\n \"City\": \"\",\n \"Company\": \"\",\n \"CountryCode\": \"\",\n \"CustomerId\": 0,\n \"Email\": \"\",\n \"Fax\": \"\",\n \"FirstName\": \"\",\n \"Housenumber\": \"\",\n \"Id\": 0,\n \"LastName\": \"\",\n \"Name2\": \"\",\n \"RestoredAt\": \"\",\n \"State\": \"\",\n \"Street\": \"\",\n \"Tel1\": \"\",\n \"Tel2\": \"\",\n \"Zip\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/api/v1/customers/:id/addresses")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/api/v1/customers/:id/addresses")
.header("content-type", "application/json")
.body("{\n \"AddressAddition\": \"\",\n \"AddressType\": 0,\n \"ArchivedAt\": \"\",\n \"City\": \"\",\n \"Company\": \"\",\n \"CountryCode\": \"\",\n \"CustomerId\": 0,\n \"Email\": \"\",\n \"Fax\": \"\",\n \"FirstName\": \"\",\n \"Housenumber\": \"\",\n \"Id\": 0,\n \"LastName\": \"\",\n \"Name2\": \"\",\n \"RestoredAt\": \"\",\n \"State\": \"\",\n \"Street\": \"\",\n \"Tel1\": \"\",\n \"Tel2\": \"\",\n \"Zip\": \"\"\n}")
.asString();
const data = JSON.stringify({
AddressAddition: '',
AddressType: 0,
ArchivedAt: '',
City: '',
Company: '',
CountryCode: '',
CustomerId: 0,
Email: '',
Fax: '',
FirstName: '',
Housenumber: '',
Id: 0,
LastName: '',
Name2: '',
RestoredAt: '',
State: '',
Street: '',
Tel1: '',
Tel2: '',
Zip: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/api/v1/customers/:id/addresses');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/api/v1/customers/:id/addresses',
headers: {'content-type': 'application/json'},
data: {
AddressAddition: '',
AddressType: 0,
ArchivedAt: '',
City: '',
Company: '',
CountryCode: '',
CustomerId: 0,
Email: '',
Fax: '',
FirstName: '',
Housenumber: '',
Id: 0,
LastName: '',
Name2: '',
RestoredAt: '',
State: '',
Street: '',
Tel1: '',
Tel2: '',
Zip: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/v1/customers/:id/addresses';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"AddressAddition":"","AddressType":0,"ArchivedAt":"","City":"","Company":"","CountryCode":"","CustomerId":0,"Email":"","Fax":"","FirstName":"","Housenumber":"","Id":0,"LastName":"","Name2":"","RestoredAt":"","State":"","Street":"","Tel1":"","Tel2":"","Zip":""}'
};
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}}/api/v1/customers/:id/addresses',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "AddressAddition": "",\n "AddressType": 0,\n "ArchivedAt": "",\n "City": "",\n "Company": "",\n "CountryCode": "",\n "CustomerId": 0,\n "Email": "",\n "Fax": "",\n "FirstName": "",\n "Housenumber": "",\n "Id": 0,\n "LastName": "",\n "Name2": "",\n "RestoredAt": "",\n "State": "",\n "Street": "",\n "Tel1": "",\n "Tel2": "",\n "Zip": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"AddressAddition\": \"\",\n \"AddressType\": 0,\n \"ArchivedAt\": \"\",\n \"City\": \"\",\n \"Company\": \"\",\n \"CountryCode\": \"\",\n \"CustomerId\": 0,\n \"Email\": \"\",\n \"Fax\": \"\",\n \"FirstName\": \"\",\n \"Housenumber\": \"\",\n \"Id\": 0,\n \"LastName\": \"\",\n \"Name2\": \"\",\n \"RestoredAt\": \"\",\n \"State\": \"\",\n \"Street\": \"\",\n \"Tel1\": \"\",\n \"Tel2\": \"\",\n \"Zip\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/api/v1/customers/:id/addresses")
.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/api/v1/customers/:id/addresses',
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({
AddressAddition: '',
AddressType: 0,
ArchivedAt: '',
City: '',
Company: '',
CountryCode: '',
CustomerId: 0,
Email: '',
Fax: '',
FirstName: '',
Housenumber: '',
Id: 0,
LastName: '',
Name2: '',
RestoredAt: '',
State: '',
Street: '',
Tel1: '',
Tel2: '',
Zip: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/api/v1/customers/:id/addresses',
headers: {'content-type': 'application/json'},
body: {
AddressAddition: '',
AddressType: 0,
ArchivedAt: '',
City: '',
Company: '',
CountryCode: '',
CustomerId: 0,
Email: '',
Fax: '',
FirstName: '',
Housenumber: '',
Id: 0,
LastName: '',
Name2: '',
RestoredAt: '',
State: '',
Street: '',
Tel1: '',
Tel2: '',
Zip: ''
},
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}}/api/v1/customers/:id/addresses');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
AddressAddition: '',
AddressType: 0,
ArchivedAt: '',
City: '',
Company: '',
CountryCode: '',
CustomerId: 0,
Email: '',
Fax: '',
FirstName: '',
Housenumber: '',
Id: 0,
LastName: '',
Name2: '',
RestoredAt: '',
State: '',
Street: '',
Tel1: '',
Tel2: '',
Zip: ''
});
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}}/api/v1/customers/:id/addresses',
headers: {'content-type': 'application/json'},
data: {
AddressAddition: '',
AddressType: 0,
ArchivedAt: '',
City: '',
Company: '',
CountryCode: '',
CustomerId: 0,
Email: '',
Fax: '',
FirstName: '',
Housenumber: '',
Id: 0,
LastName: '',
Name2: '',
RestoredAt: '',
State: '',
Street: '',
Tel1: '',
Tel2: '',
Zip: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/v1/customers/:id/addresses';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"AddressAddition":"","AddressType":0,"ArchivedAt":"","City":"","Company":"","CountryCode":"","CustomerId":0,"Email":"","Fax":"","FirstName":"","Housenumber":"","Id":0,"LastName":"","Name2":"","RestoredAt":"","State":"","Street":"","Tel1":"","Tel2":"","Zip":""}'
};
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 = @{ @"AddressAddition": @"",
@"AddressType": @0,
@"ArchivedAt": @"",
@"City": @"",
@"Company": @"",
@"CountryCode": @"",
@"CustomerId": @0,
@"Email": @"",
@"Fax": @"",
@"FirstName": @"",
@"Housenumber": @"",
@"Id": @0,
@"LastName": @"",
@"Name2": @"",
@"RestoredAt": @"",
@"State": @"",
@"Street": @"",
@"Tel1": @"",
@"Tel2": @"",
@"Zip": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/api/v1/customers/:id/addresses"]
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}}/api/v1/customers/:id/addresses" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"AddressAddition\": \"\",\n \"AddressType\": 0,\n \"ArchivedAt\": \"\",\n \"City\": \"\",\n \"Company\": \"\",\n \"CountryCode\": \"\",\n \"CustomerId\": 0,\n \"Email\": \"\",\n \"Fax\": \"\",\n \"FirstName\": \"\",\n \"Housenumber\": \"\",\n \"Id\": 0,\n \"LastName\": \"\",\n \"Name2\": \"\",\n \"RestoredAt\": \"\",\n \"State\": \"\",\n \"Street\": \"\",\n \"Tel1\": \"\",\n \"Tel2\": \"\",\n \"Zip\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/v1/customers/:id/addresses",
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([
'AddressAddition' => '',
'AddressType' => 0,
'ArchivedAt' => '',
'City' => '',
'Company' => '',
'CountryCode' => '',
'CustomerId' => 0,
'Email' => '',
'Fax' => '',
'FirstName' => '',
'Housenumber' => '',
'Id' => 0,
'LastName' => '',
'Name2' => '',
'RestoredAt' => '',
'State' => '',
'Street' => '',
'Tel1' => '',
'Tel2' => '',
'Zip' => ''
]),
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}}/api/v1/customers/:id/addresses', [
'body' => '{
"AddressAddition": "",
"AddressType": 0,
"ArchivedAt": "",
"City": "",
"Company": "",
"CountryCode": "",
"CustomerId": 0,
"Email": "",
"Fax": "",
"FirstName": "",
"Housenumber": "",
"Id": 0,
"LastName": "",
"Name2": "",
"RestoredAt": "",
"State": "",
"Street": "",
"Tel1": "",
"Tel2": "",
"Zip": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/api/v1/customers/:id/addresses');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'AddressAddition' => '',
'AddressType' => 0,
'ArchivedAt' => '',
'City' => '',
'Company' => '',
'CountryCode' => '',
'CustomerId' => 0,
'Email' => '',
'Fax' => '',
'FirstName' => '',
'Housenumber' => '',
'Id' => 0,
'LastName' => '',
'Name2' => '',
'RestoredAt' => '',
'State' => '',
'Street' => '',
'Tel1' => '',
'Tel2' => '',
'Zip' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'AddressAddition' => '',
'AddressType' => 0,
'ArchivedAt' => '',
'City' => '',
'Company' => '',
'CountryCode' => '',
'CustomerId' => 0,
'Email' => '',
'Fax' => '',
'FirstName' => '',
'Housenumber' => '',
'Id' => 0,
'LastName' => '',
'Name2' => '',
'RestoredAt' => '',
'State' => '',
'Street' => '',
'Tel1' => '',
'Tel2' => '',
'Zip' => ''
]));
$request->setRequestUrl('{{baseUrl}}/api/v1/customers/:id/addresses');
$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}}/api/v1/customers/:id/addresses' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"AddressAddition": "",
"AddressType": 0,
"ArchivedAt": "",
"City": "",
"Company": "",
"CountryCode": "",
"CustomerId": 0,
"Email": "",
"Fax": "",
"FirstName": "",
"Housenumber": "",
"Id": 0,
"LastName": "",
"Name2": "",
"RestoredAt": "",
"State": "",
"Street": "",
"Tel1": "",
"Tel2": "",
"Zip": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/v1/customers/:id/addresses' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"AddressAddition": "",
"AddressType": 0,
"ArchivedAt": "",
"City": "",
"Company": "",
"CountryCode": "",
"CustomerId": 0,
"Email": "",
"Fax": "",
"FirstName": "",
"Housenumber": "",
"Id": 0,
"LastName": "",
"Name2": "",
"RestoredAt": "",
"State": "",
"Street": "",
"Tel1": "",
"Tel2": "",
"Zip": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"AddressAddition\": \"\",\n \"AddressType\": 0,\n \"ArchivedAt\": \"\",\n \"City\": \"\",\n \"Company\": \"\",\n \"CountryCode\": \"\",\n \"CustomerId\": 0,\n \"Email\": \"\",\n \"Fax\": \"\",\n \"FirstName\": \"\",\n \"Housenumber\": \"\",\n \"Id\": 0,\n \"LastName\": \"\",\n \"Name2\": \"\",\n \"RestoredAt\": \"\",\n \"State\": \"\",\n \"Street\": \"\",\n \"Tel1\": \"\",\n \"Tel2\": \"\",\n \"Zip\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/api/v1/customers/:id/addresses", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/v1/customers/:id/addresses"
payload = {
"AddressAddition": "",
"AddressType": 0,
"ArchivedAt": "",
"City": "",
"Company": "",
"CountryCode": "",
"CustomerId": 0,
"Email": "",
"Fax": "",
"FirstName": "",
"Housenumber": "",
"Id": 0,
"LastName": "",
"Name2": "",
"RestoredAt": "",
"State": "",
"Street": "",
"Tel1": "",
"Tel2": "",
"Zip": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/v1/customers/:id/addresses"
payload <- "{\n \"AddressAddition\": \"\",\n \"AddressType\": 0,\n \"ArchivedAt\": \"\",\n \"City\": \"\",\n \"Company\": \"\",\n \"CountryCode\": \"\",\n \"CustomerId\": 0,\n \"Email\": \"\",\n \"Fax\": \"\",\n \"FirstName\": \"\",\n \"Housenumber\": \"\",\n \"Id\": 0,\n \"LastName\": \"\",\n \"Name2\": \"\",\n \"RestoredAt\": \"\",\n \"State\": \"\",\n \"Street\": \"\",\n \"Tel1\": \"\",\n \"Tel2\": \"\",\n \"Zip\": \"\"\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}}/api/v1/customers/:id/addresses")
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 \"AddressAddition\": \"\",\n \"AddressType\": 0,\n \"ArchivedAt\": \"\",\n \"City\": \"\",\n \"Company\": \"\",\n \"CountryCode\": \"\",\n \"CustomerId\": 0,\n \"Email\": \"\",\n \"Fax\": \"\",\n \"FirstName\": \"\",\n \"Housenumber\": \"\",\n \"Id\": 0,\n \"LastName\": \"\",\n \"Name2\": \"\",\n \"RestoredAt\": \"\",\n \"State\": \"\",\n \"Street\": \"\",\n \"Tel1\": \"\",\n \"Tel2\": \"\",\n \"Zip\": \"\"\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/api/v1/customers/:id/addresses') do |req|
req.body = "{\n \"AddressAddition\": \"\",\n \"AddressType\": 0,\n \"ArchivedAt\": \"\",\n \"City\": \"\",\n \"Company\": \"\",\n \"CountryCode\": \"\",\n \"CustomerId\": 0,\n \"Email\": \"\",\n \"Fax\": \"\",\n \"FirstName\": \"\",\n \"Housenumber\": \"\",\n \"Id\": 0,\n \"LastName\": \"\",\n \"Name2\": \"\",\n \"RestoredAt\": \"\",\n \"State\": \"\",\n \"Street\": \"\",\n \"Tel1\": \"\",\n \"Tel2\": \"\",\n \"Zip\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/api/v1/customers/:id/addresses";
let payload = json!({
"AddressAddition": "",
"AddressType": 0,
"ArchivedAt": "",
"City": "",
"Company": "",
"CountryCode": "",
"CustomerId": 0,
"Email": "",
"Fax": "",
"FirstName": "",
"Housenumber": "",
"Id": 0,
"LastName": "",
"Name2": "",
"RestoredAt": "",
"State": "",
"Street": "",
"Tel1": "",
"Tel2": "",
"Zip": ""
});
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}}/api/v1/customers/:id/addresses \
--header 'content-type: application/json' \
--data '{
"AddressAddition": "",
"AddressType": 0,
"ArchivedAt": "",
"City": "",
"Company": "",
"CountryCode": "",
"CustomerId": 0,
"Email": "",
"Fax": "",
"FirstName": "",
"Housenumber": "",
"Id": 0,
"LastName": "",
"Name2": "",
"RestoredAt": "",
"State": "",
"Street": "",
"Tel1": "",
"Tel2": "",
"Zip": ""
}'
echo '{
"AddressAddition": "",
"AddressType": 0,
"ArchivedAt": "",
"City": "",
"Company": "",
"CountryCode": "",
"CustomerId": 0,
"Email": "",
"Fax": "",
"FirstName": "",
"Housenumber": "",
"Id": 0,
"LastName": "",
"Name2": "",
"RestoredAt": "",
"State": "",
"Street": "",
"Tel1": "",
"Tel2": "",
"Zip": ""
}' | \
http POST {{baseUrl}}/api/v1/customers/:id/addresses \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "AddressAddition": "",\n "AddressType": 0,\n "ArchivedAt": "",\n "City": "",\n "Company": "",\n "CountryCode": "",\n "CustomerId": 0,\n "Email": "",\n "Fax": "",\n "FirstName": "",\n "Housenumber": "",\n "Id": 0,\n "LastName": "",\n "Name2": "",\n "RestoredAt": "",\n "State": "",\n "Street": "",\n "Tel1": "",\n "Tel2": "",\n "Zip": ""\n}' \
--output-document \
- {{baseUrl}}/api/v1/customers/:id/addresses
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"AddressAddition": "",
"AddressType": 0,
"ArchivedAt": "",
"City": "",
"Company": "",
"CountryCode": "",
"CustomerId": 0,
"Email": "",
"Fax": "",
"FirstName": "",
"Housenumber": "",
"Id": 0,
"LastName": "",
"Name2": "",
"RestoredAt": "",
"State": "",
"Street": "",
"Tel1": "",
"Tel2": "",
"Zip": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/v1/customers/:id/addresses")! 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
Creates a new customer
{{baseUrl}}/api/v1/customers
BODY json
{
"Address": {
"AddressAddition": "",
"AddressType": 0,
"ArchivedAt": "",
"City": "",
"Company": "",
"CountryCode": "",
"CustomerId": 0,
"Email": "",
"Fax": "",
"FirstName": "",
"Housenumber": "",
"Id": 0,
"LastName": "",
"Name2": "",
"RestoredAt": "",
"State": "",
"Street": "",
"Tel1": "",
"Tel2": "",
"Zip": ""
},
"ArchivedAt": "",
"DefaultCommercialMailAddress": {
"Id": 0,
"SubType": "",
"TypeId": 0,
"TypeName": "",
"Value": ""
},
"DefaultFax": {},
"DefaultMailAddress": {},
"DefaultPhone1": {},
"DefaultPhone2": {},
"DefaultStatusUpdatesMailAddress": {},
"Email": "",
"Id": 0,
"LanguageId": 0,
"MetaData": [
{}
],
"Name": "",
"Number": 0,
"PriceGroupId": 0,
"RestoredAt": "",
"Tel1": "",
"Tel2": "",
"Type": 0,
"VatId": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/v1/customers");
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 \"Address\": {\n \"AddressAddition\": \"\",\n \"AddressType\": 0,\n \"ArchivedAt\": \"\",\n \"City\": \"\",\n \"Company\": \"\",\n \"CountryCode\": \"\",\n \"CustomerId\": 0,\n \"Email\": \"\",\n \"Fax\": \"\",\n \"FirstName\": \"\",\n \"Housenumber\": \"\",\n \"Id\": 0,\n \"LastName\": \"\",\n \"Name2\": \"\",\n \"RestoredAt\": \"\",\n \"State\": \"\",\n \"Street\": \"\",\n \"Tel1\": \"\",\n \"Tel2\": \"\",\n \"Zip\": \"\"\n },\n \"ArchivedAt\": \"\",\n \"DefaultCommercialMailAddress\": {\n \"Id\": 0,\n \"SubType\": \"\",\n \"TypeId\": 0,\n \"TypeName\": \"\",\n \"Value\": \"\"\n },\n \"DefaultFax\": {},\n \"DefaultMailAddress\": {},\n \"DefaultPhone1\": {},\n \"DefaultPhone2\": {},\n \"DefaultStatusUpdatesMailAddress\": {},\n \"Email\": \"\",\n \"Id\": 0,\n \"LanguageId\": 0,\n \"MetaData\": [\n {}\n ],\n \"Name\": \"\",\n \"Number\": 0,\n \"PriceGroupId\": 0,\n \"RestoredAt\": \"\",\n \"Tel1\": \"\",\n \"Tel2\": \"\",\n \"Type\": 0,\n \"VatId\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/api/v1/customers" {:content-type :json
:form-params {:Address {:AddressAddition ""
:AddressType 0
:ArchivedAt ""
:City ""
:Company ""
:CountryCode ""
:CustomerId 0
:Email ""
:Fax ""
:FirstName ""
:Housenumber ""
:Id 0
:LastName ""
:Name2 ""
:RestoredAt ""
:State ""
:Street ""
:Tel1 ""
:Tel2 ""
:Zip ""}
:ArchivedAt ""
:DefaultCommercialMailAddress {:Id 0
:SubType ""
:TypeId 0
:TypeName ""
:Value ""}
:DefaultFax {}
:DefaultMailAddress {}
:DefaultPhone1 {}
:DefaultPhone2 {}
:DefaultStatusUpdatesMailAddress {}
:Email ""
:Id 0
:LanguageId 0
:MetaData [{}]
:Name ""
:Number 0
:PriceGroupId 0
:RestoredAt ""
:Tel1 ""
:Tel2 ""
:Type 0
:VatId ""}})
require "http/client"
url = "{{baseUrl}}/api/v1/customers"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"Address\": {\n \"AddressAddition\": \"\",\n \"AddressType\": 0,\n \"ArchivedAt\": \"\",\n \"City\": \"\",\n \"Company\": \"\",\n \"CountryCode\": \"\",\n \"CustomerId\": 0,\n \"Email\": \"\",\n \"Fax\": \"\",\n \"FirstName\": \"\",\n \"Housenumber\": \"\",\n \"Id\": 0,\n \"LastName\": \"\",\n \"Name2\": \"\",\n \"RestoredAt\": \"\",\n \"State\": \"\",\n \"Street\": \"\",\n \"Tel1\": \"\",\n \"Tel2\": \"\",\n \"Zip\": \"\"\n },\n \"ArchivedAt\": \"\",\n \"DefaultCommercialMailAddress\": {\n \"Id\": 0,\n \"SubType\": \"\",\n \"TypeId\": 0,\n \"TypeName\": \"\",\n \"Value\": \"\"\n },\n \"DefaultFax\": {},\n \"DefaultMailAddress\": {},\n \"DefaultPhone1\": {},\n \"DefaultPhone2\": {},\n \"DefaultStatusUpdatesMailAddress\": {},\n \"Email\": \"\",\n \"Id\": 0,\n \"LanguageId\": 0,\n \"MetaData\": [\n {}\n ],\n \"Name\": \"\",\n \"Number\": 0,\n \"PriceGroupId\": 0,\n \"RestoredAt\": \"\",\n \"Tel1\": \"\",\n \"Tel2\": \"\",\n \"Type\": 0,\n \"VatId\": \"\"\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}}/api/v1/customers"),
Content = new StringContent("{\n \"Address\": {\n \"AddressAddition\": \"\",\n \"AddressType\": 0,\n \"ArchivedAt\": \"\",\n \"City\": \"\",\n \"Company\": \"\",\n \"CountryCode\": \"\",\n \"CustomerId\": 0,\n \"Email\": \"\",\n \"Fax\": \"\",\n \"FirstName\": \"\",\n \"Housenumber\": \"\",\n \"Id\": 0,\n \"LastName\": \"\",\n \"Name2\": \"\",\n \"RestoredAt\": \"\",\n \"State\": \"\",\n \"Street\": \"\",\n \"Tel1\": \"\",\n \"Tel2\": \"\",\n \"Zip\": \"\"\n },\n \"ArchivedAt\": \"\",\n \"DefaultCommercialMailAddress\": {\n \"Id\": 0,\n \"SubType\": \"\",\n \"TypeId\": 0,\n \"TypeName\": \"\",\n \"Value\": \"\"\n },\n \"DefaultFax\": {},\n \"DefaultMailAddress\": {},\n \"DefaultPhone1\": {},\n \"DefaultPhone2\": {},\n \"DefaultStatusUpdatesMailAddress\": {},\n \"Email\": \"\",\n \"Id\": 0,\n \"LanguageId\": 0,\n \"MetaData\": [\n {}\n ],\n \"Name\": \"\",\n \"Number\": 0,\n \"PriceGroupId\": 0,\n \"RestoredAt\": \"\",\n \"Tel1\": \"\",\n \"Tel2\": \"\",\n \"Type\": 0,\n \"VatId\": \"\"\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}}/api/v1/customers");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"Address\": {\n \"AddressAddition\": \"\",\n \"AddressType\": 0,\n \"ArchivedAt\": \"\",\n \"City\": \"\",\n \"Company\": \"\",\n \"CountryCode\": \"\",\n \"CustomerId\": 0,\n \"Email\": \"\",\n \"Fax\": \"\",\n \"FirstName\": \"\",\n \"Housenumber\": \"\",\n \"Id\": 0,\n \"LastName\": \"\",\n \"Name2\": \"\",\n \"RestoredAt\": \"\",\n \"State\": \"\",\n \"Street\": \"\",\n \"Tel1\": \"\",\n \"Tel2\": \"\",\n \"Zip\": \"\"\n },\n \"ArchivedAt\": \"\",\n \"DefaultCommercialMailAddress\": {\n \"Id\": 0,\n \"SubType\": \"\",\n \"TypeId\": 0,\n \"TypeName\": \"\",\n \"Value\": \"\"\n },\n \"DefaultFax\": {},\n \"DefaultMailAddress\": {},\n \"DefaultPhone1\": {},\n \"DefaultPhone2\": {},\n \"DefaultStatusUpdatesMailAddress\": {},\n \"Email\": \"\",\n \"Id\": 0,\n \"LanguageId\": 0,\n \"MetaData\": [\n {}\n ],\n \"Name\": \"\",\n \"Number\": 0,\n \"PriceGroupId\": 0,\n \"RestoredAt\": \"\",\n \"Tel1\": \"\",\n \"Tel2\": \"\",\n \"Type\": 0,\n \"VatId\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/v1/customers"
payload := strings.NewReader("{\n \"Address\": {\n \"AddressAddition\": \"\",\n \"AddressType\": 0,\n \"ArchivedAt\": \"\",\n \"City\": \"\",\n \"Company\": \"\",\n \"CountryCode\": \"\",\n \"CustomerId\": 0,\n \"Email\": \"\",\n \"Fax\": \"\",\n \"FirstName\": \"\",\n \"Housenumber\": \"\",\n \"Id\": 0,\n \"LastName\": \"\",\n \"Name2\": \"\",\n \"RestoredAt\": \"\",\n \"State\": \"\",\n \"Street\": \"\",\n \"Tel1\": \"\",\n \"Tel2\": \"\",\n \"Zip\": \"\"\n },\n \"ArchivedAt\": \"\",\n \"DefaultCommercialMailAddress\": {\n \"Id\": 0,\n \"SubType\": \"\",\n \"TypeId\": 0,\n \"TypeName\": \"\",\n \"Value\": \"\"\n },\n \"DefaultFax\": {},\n \"DefaultMailAddress\": {},\n \"DefaultPhone1\": {},\n \"DefaultPhone2\": {},\n \"DefaultStatusUpdatesMailAddress\": {},\n \"Email\": \"\",\n \"Id\": 0,\n \"LanguageId\": 0,\n \"MetaData\": [\n {}\n ],\n \"Name\": \"\",\n \"Number\": 0,\n \"PriceGroupId\": 0,\n \"RestoredAt\": \"\",\n \"Tel1\": \"\",\n \"Tel2\": \"\",\n \"Type\": 0,\n \"VatId\": \"\"\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/api/v1/customers HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 881
{
"Address": {
"AddressAddition": "",
"AddressType": 0,
"ArchivedAt": "",
"City": "",
"Company": "",
"CountryCode": "",
"CustomerId": 0,
"Email": "",
"Fax": "",
"FirstName": "",
"Housenumber": "",
"Id": 0,
"LastName": "",
"Name2": "",
"RestoredAt": "",
"State": "",
"Street": "",
"Tel1": "",
"Tel2": "",
"Zip": ""
},
"ArchivedAt": "",
"DefaultCommercialMailAddress": {
"Id": 0,
"SubType": "",
"TypeId": 0,
"TypeName": "",
"Value": ""
},
"DefaultFax": {},
"DefaultMailAddress": {},
"DefaultPhone1": {},
"DefaultPhone2": {},
"DefaultStatusUpdatesMailAddress": {},
"Email": "",
"Id": 0,
"LanguageId": 0,
"MetaData": [
{}
],
"Name": "",
"Number": 0,
"PriceGroupId": 0,
"RestoredAt": "",
"Tel1": "",
"Tel2": "",
"Type": 0,
"VatId": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/api/v1/customers")
.setHeader("content-type", "application/json")
.setBody("{\n \"Address\": {\n \"AddressAddition\": \"\",\n \"AddressType\": 0,\n \"ArchivedAt\": \"\",\n \"City\": \"\",\n \"Company\": \"\",\n \"CountryCode\": \"\",\n \"CustomerId\": 0,\n \"Email\": \"\",\n \"Fax\": \"\",\n \"FirstName\": \"\",\n \"Housenumber\": \"\",\n \"Id\": 0,\n \"LastName\": \"\",\n \"Name2\": \"\",\n \"RestoredAt\": \"\",\n \"State\": \"\",\n \"Street\": \"\",\n \"Tel1\": \"\",\n \"Tel2\": \"\",\n \"Zip\": \"\"\n },\n \"ArchivedAt\": \"\",\n \"DefaultCommercialMailAddress\": {\n \"Id\": 0,\n \"SubType\": \"\",\n \"TypeId\": 0,\n \"TypeName\": \"\",\n \"Value\": \"\"\n },\n \"DefaultFax\": {},\n \"DefaultMailAddress\": {},\n \"DefaultPhone1\": {},\n \"DefaultPhone2\": {},\n \"DefaultStatusUpdatesMailAddress\": {},\n \"Email\": \"\",\n \"Id\": 0,\n \"LanguageId\": 0,\n \"MetaData\": [\n {}\n ],\n \"Name\": \"\",\n \"Number\": 0,\n \"PriceGroupId\": 0,\n \"RestoredAt\": \"\",\n \"Tel1\": \"\",\n \"Tel2\": \"\",\n \"Type\": 0,\n \"VatId\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/v1/customers"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"Address\": {\n \"AddressAddition\": \"\",\n \"AddressType\": 0,\n \"ArchivedAt\": \"\",\n \"City\": \"\",\n \"Company\": \"\",\n \"CountryCode\": \"\",\n \"CustomerId\": 0,\n \"Email\": \"\",\n \"Fax\": \"\",\n \"FirstName\": \"\",\n \"Housenumber\": \"\",\n \"Id\": 0,\n \"LastName\": \"\",\n \"Name2\": \"\",\n \"RestoredAt\": \"\",\n \"State\": \"\",\n \"Street\": \"\",\n \"Tel1\": \"\",\n \"Tel2\": \"\",\n \"Zip\": \"\"\n },\n \"ArchivedAt\": \"\",\n \"DefaultCommercialMailAddress\": {\n \"Id\": 0,\n \"SubType\": \"\",\n \"TypeId\": 0,\n \"TypeName\": \"\",\n \"Value\": \"\"\n },\n \"DefaultFax\": {},\n \"DefaultMailAddress\": {},\n \"DefaultPhone1\": {},\n \"DefaultPhone2\": {},\n \"DefaultStatusUpdatesMailAddress\": {},\n \"Email\": \"\",\n \"Id\": 0,\n \"LanguageId\": 0,\n \"MetaData\": [\n {}\n ],\n \"Name\": \"\",\n \"Number\": 0,\n \"PriceGroupId\": 0,\n \"RestoredAt\": \"\",\n \"Tel1\": \"\",\n \"Tel2\": \"\",\n \"Type\": 0,\n \"VatId\": \"\"\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 \"Address\": {\n \"AddressAddition\": \"\",\n \"AddressType\": 0,\n \"ArchivedAt\": \"\",\n \"City\": \"\",\n \"Company\": \"\",\n \"CountryCode\": \"\",\n \"CustomerId\": 0,\n \"Email\": \"\",\n \"Fax\": \"\",\n \"FirstName\": \"\",\n \"Housenumber\": \"\",\n \"Id\": 0,\n \"LastName\": \"\",\n \"Name2\": \"\",\n \"RestoredAt\": \"\",\n \"State\": \"\",\n \"Street\": \"\",\n \"Tel1\": \"\",\n \"Tel2\": \"\",\n \"Zip\": \"\"\n },\n \"ArchivedAt\": \"\",\n \"DefaultCommercialMailAddress\": {\n \"Id\": 0,\n \"SubType\": \"\",\n \"TypeId\": 0,\n \"TypeName\": \"\",\n \"Value\": \"\"\n },\n \"DefaultFax\": {},\n \"DefaultMailAddress\": {},\n \"DefaultPhone1\": {},\n \"DefaultPhone2\": {},\n \"DefaultStatusUpdatesMailAddress\": {},\n \"Email\": \"\",\n \"Id\": 0,\n \"LanguageId\": 0,\n \"MetaData\": [\n {}\n ],\n \"Name\": \"\",\n \"Number\": 0,\n \"PriceGroupId\": 0,\n \"RestoredAt\": \"\",\n \"Tel1\": \"\",\n \"Tel2\": \"\",\n \"Type\": 0,\n \"VatId\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/api/v1/customers")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/api/v1/customers")
.header("content-type", "application/json")
.body("{\n \"Address\": {\n \"AddressAddition\": \"\",\n \"AddressType\": 0,\n \"ArchivedAt\": \"\",\n \"City\": \"\",\n \"Company\": \"\",\n \"CountryCode\": \"\",\n \"CustomerId\": 0,\n \"Email\": \"\",\n \"Fax\": \"\",\n \"FirstName\": \"\",\n \"Housenumber\": \"\",\n \"Id\": 0,\n \"LastName\": \"\",\n \"Name2\": \"\",\n \"RestoredAt\": \"\",\n \"State\": \"\",\n \"Street\": \"\",\n \"Tel1\": \"\",\n \"Tel2\": \"\",\n \"Zip\": \"\"\n },\n \"ArchivedAt\": \"\",\n \"DefaultCommercialMailAddress\": {\n \"Id\": 0,\n \"SubType\": \"\",\n \"TypeId\": 0,\n \"TypeName\": \"\",\n \"Value\": \"\"\n },\n \"DefaultFax\": {},\n \"DefaultMailAddress\": {},\n \"DefaultPhone1\": {},\n \"DefaultPhone2\": {},\n \"DefaultStatusUpdatesMailAddress\": {},\n \"Email\": \"\",\n \"Id\": 0,\n \"LanguageId\": 0,\n \"MetaData\": [\n {}\n ],\n \"Name\": \"\",\n \"Number\": 0,\n \"PriceGroupId\": 0,\n \"RestoredAt\": \"\",\n \"Tel1\": \"\",\n \"Tel2\": \"\",\n \"Type\": 0,\n \"VatId\": \"\"\n}")
.asString();
const data = JSON.stringify({
Address: {
AddressAddition: '',
AddressType: 0,
ArchivedAt: '',
City: '',
Company: '',
CountryCode: '',
CustomerId: 0,
Email: '',
Fax: '',
FirstName: '',
Housenumber: '',
Id: 0,
LastName: '',
Name2: '',
RestoredAt: '',
State: '',
Street: '',
Tel1: '',
Tel2: '',
Zip: ''
},
ArchivedAt: '',
DefaultCommercialMailAddress: {
Id: 0,
SubType: '',
TypeId: 0,
TypeName: '',
Value: ''
},
DefaultFax: {},
DefaultMailAddress: {},
DefaultPhone1: {},
DefaultPhone2: {},
DefaultStatusUpdatesMailAddress: {},
Email: '',
Id: 0,
LanguageId: 0,
MetaData: [
{}
],
Name: '',
Number: 0,
PriceGroupId: 0,
RestoredAt: '',
Tel1: '',
Tel2: '',
Type: 0,
VatId: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/api/v1/customers');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/api/v1/customers',
headers: {'content-type': 'application/json'},
data: {
Address: {
AddressAddition: '',
AddressType: 0,
ArchivedAt: '',
City: '',
Company: '',
CountryCode: '',
CustomerId: 0,
Email: '',
Fax: '',
FirstName: '',
Housenumber: '',
Id: 0,
LastName: '',
Name2: '',
RestoredAt: '',
State: '',
Street: '',
Tel1: '',
Tel2: '',
Zip: ''
},
ArchivedAt: '',
DefaultCommercialMailAddress: {Id: 0, SubType: '', TypeId: 0, TypeName: '', Value: ''},
DefaultFax: {},
DefaultMailAddress: {},
DefaultPhone1: {},
DefaultPhone2: {},
DefaultStatusUpdatesMailAddress: {},
Email: '',
Id: 0,
LanguageId: 0,
MetaData: [{}],
Name: '',
Number: 0,
PriceGroupId: 0,
RestoredAt: '',
Tel1: '',
Tel2: '',
Type: 0,
VatId: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/v1/customers';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"Address":{"AddressAddition":"","AddressType":0,"ArchivedAt":"","City":"","Company":"","CountryCode":"","CustomerId":0,"Email":"","Fax":"","FirstName":"","Housenumber":"","Id":0,"LastName":"","Name2":"","RestoredAt":"","State":"","Street":"","Tel1":"","Tel2":"","Zip":""},"ArchivedAt":"","DefaultCommercialMailAddress":{"Id":0,"SubType":"","TypeId":0,"TypeName":"","Value":""},"DefaultFax":{},"DefaultMailAddress":{},"DefaultPhone1":{},"DefaultPhone2":{},"DefaultStatusUpdatesMailAddress":{},"Email":"","Id":0,"LanguageId":0,"MetaData":[{}],"Name":"","Number":0,"PriceGroupId":0,"RestoredAt":"","Tel1":"","Tel2":"","Type":0,"VatId":""}'
};
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}}/api/v1/customers',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "Address": {\n "AddressAddition": "",\n "AddressType": 0,\n "ArchivedAt": "",\n "City": "",\n "Company": "",\n "CountryCode": "",\n "CustomerId": 0,\n "Email": "",\n "Fax": "",\n "FirstName": "",\n "Housenumber": "",\n "Id": 0,\n "LastName": "",\n "Name2": "",\n "RestoredAt": "",\n "State": "",\n "Street": "",\n "Tel1": "",\n "Tel2": "",\n "Zip": ""\n },\n "ArchivedAt": "",\n "DefaultCommercialMailAddress": {\n "Id": 0,\n "SubType": "",\n "TypeId": 0,\n "TypeName": "",\n "Value": ""\n },\n "DefaultFax": {},\n "DefaultMailAddress": {},\n "DefaultPhone1": {},\n "DefaultPhone2": {},\n "DefaultStatusUpdatesMailAddress": {},\n "Email": "",\n "Id": 0,\n "LanguageId": 0,\n "MetaData": [\n {}\n ],\n "Name": "",\n "Number": 0,\n "PriceGroupId": 0,\n "RestoredAt": "",\n "Tel1": "",\n "Tel2": "",\n "Type": 0,\n "VatId": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"Address\": {\n \"AddressAddition\": \"\",\n \"AddressType\": 0,\n \"ArchivedAt\": \"\",\n \"City\": \"\",\n \"Company\": \"\",\n \"CountryCode\": \"\",\n \"CustomerId\": 0,\n \"Email\": \"\",\n \"Fax\": \"\",\n \"FirstName\": \"\",\n \"Housenumber\": \"\",\n \"Id\": 0,\n \"LastName\": \"\",\n \"Name2\": \"\",\n \"RestoredAt\": \"\",\n \"State\": \"\",\n \"Street\": \"\",\n \"Tel1\": \"\",\n \"Tel2\": \"\",\n \"Zip\": \"\"\n },\n \"ArchivedAt\": \"\",\n \"DefaultCommercialMailAddress\": {\n \"Id\": 0,\n \"SubType\": \"\",\n \"TypeId\": 0,\n \"TypeName\": \"\",\n \"Value\": \"\"\n },\n \"DefaultFax\": {},\n \"DefaultMailAddress\": {},\n \"DefaultPhone1\": {},\n \"DefaultPhone2\": {},\n \"DefaultStatusUpdatesMailAddress\": {},\n \"Email\": \"\",\n \"Id\": 0,\n \"LanguageId\": 0,\n \"MetaData\": [\n {}\n ],\n \"Name\": \"\",\n \"Number\": 0,\n \"PriceGroupId\": 0,\n \"RestoredAt\": \"\",\n \"Tel1\": \"\",\n \"Tel2\": \"\",\n \"Type\": 0,\n \"VatId\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/api/v1/customers")
.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/api/v1/customers',
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({
Address: {
AddressAddition: '',
AddressType: 0,
ArchivedAt: '',
City: '',
Company: '',
CountryCode: '',
CustomerId: 0,
Email: '',
Fax: '',
FirstName: '',
Housenumber: '',
Id: 0,
LastName: '',
Name2: '',
RestoredAt: '',
State: '',
Street: '',
Tel1: '',
Tel2: '',
Zip: ''
},
ArchivedAt: '',
DefaultCommercialMailAddress: {Id: 0, SubType: '', TypeId: 0, TypeName: '', Value: ''},
DefaultFax: {},
DefaultMailAddress: {},
DefaultPhone1: {},
DefaultPhone2: {},
DefaultStatusUpdatesMailAddress: {},
Email: '',
Id: 0,
LanguageId: 0,
MetaData: [{}],
Name: '',
Number: 0,
PriceGroupId: 0,
RestoredAt: '',
Tel1: '',
Tel2: '',
Type: 0,
VatId: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/api/v1/customers',
headers: {'content-type': 'application/json'},
body: {
Address: {
AddressAddition: '',
AddressType: 0,
ArchivedAt: '',
City: '',
Company: '',
CountryCode: '',
CustomerId: 0,
Email: '',
Fax: '',
FirstName: '',
Housenumber: '',
Id: 0,
LastName: '',
Name2: '',
RestoredAt: '',
State: '',
Street: '',
Tel1: '',
Tel2: '',
Zip: ''
},
ArchivedAt: '',
DefaultCommercialMailAddress: {Id: 0, SubType: '', TypeId: 0, TypeName: '', Value: ''},
DefaultFax: {},
DefaultMailAddress: {},
DefaultPhone1: {},
DefaultPhone2: {},
DefaultStatusUpdatesMailAddress: {},
Email: '',
Id: 0,
LanguageId: 0,
MetaData: [{}],
Name: '',
Number: 0,
PriceGroupId: 0,
RestoredAt: '',
Tel1: '',
Tel2: '',
Type: 0,
VatId: ''
},
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}}/api/v1/customers');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
Address: {
AddressAddition: '',
AddressType: 0,
ArchivedAt: '',
City: '',
Company: '',
CountryCode: '',
CustomerId: 0,
Email: '',
Fax: '',
FirstName: '',
Housenumber: '',
Id: 0,
LastName: '',
Name2: '',
RestoredAt: '',
State: '',
Street: '',
Tel1: '',
Tel2: '',
Zip: ''
},
ArchivedAt: '',
DefaultCommercialMailAddress: {
Id: 0,
SubType: '',
TypeId: 0,
TypeName: '',
Value: ''
},
DefaultFax: {},
DefaultMailAddress: {},
DefaultPhone1: {},
DefaultPhone2: {},
DefaultStatusUpdatesMailAddress: {},
Email: '',
Id: 0,
LanguageId: 0,
MetaData: [
{}
],
Name: '',
Number: 0,
PriceGroupId: 0,
RestoredAt: '',
Tel1: '',
Tel2: '',
Type: 0,
VatId: ''
});
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}}/api/v1/customers',
headers: {'content-type': 'application/json'},
data: {
Address: {
AddressAddition: '',
AddressType: 0,
ArchivedAt: '',
City: '',
Company: '',
CountryCode: '',
CustomerId: 0,
Email: '',
Fax: '',
FirstName: '',
Housenumber: '',
Id: 0,
LastName: '',
Name2: '',
RestoredAt: '',
State: '',
Street: '',
Tel1: '',
Tel2: '',
Zip: ''
},
ArchivedAt: '',
DefaultCommercialMailAddress: {Id: 0, SubType: '', TypeId: 0, TypeName: '', Value: ''},
DefaultFax: {},
DefaultMailAddress: {},
DefaultPhone1: {},
DefaultPhone2: {},
DefaultStatusUpdatesMailAddress: {},
Email: '',
Id: 0,
LanguageId: 0,
MetaData: [{}],
Name: '',
Number: 0,
PriceGroupId: 0,
RestoredAt: '',
Tel1: '',
Tel2: '',
Type: 0,
VatId: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/v1/customers';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"Address":{"AddressAddition":"","AddressType":0,"ArchivedAt":"","City":"","Company":"","CountryCode":"","CustomerId":0,"Email":"","Fax":"","FirstName":"","Housenumber":"","Id":0,"LastName":"","Name2":"","RestoredAt":"","State":"","Street":"","Tel1":"","Tel2":"","Zip":""},"ArchivedAt":"","DefaultCommercialMailAddress":{"Id":0,"SubType":"","TypeId":0,"TypeName":"","Value":""},"DefaultFax":{},"DefaultMailAddress":{},"DefaultPhone1":{},"DefaultPhone2":{},"DefaultStatusUpdatesMailAddress":{},"Email":"","Id":0,"LanguageId":0,"MetaData":[{}],"Name":"","Number":0,"PriceGroupId":0,"RestoredAt":"","Tel1":"","Tel2":"","Type":0,"VatId":""}'
};
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 = @{ @"Address": @{ @"AddressAddition": @"", @"AddressType": @0, @"ArchivedAt": @"", @"City": @"", @"Company": @"", @"CountryCode": @"", @"CustomerId": @0, @"Email": @"", @"Fax": @"", @"FirstName": @"", @"Housenumber": @"", @"Id": @0, @"LastName": @"", @"Name2": @"", @"RestoredAt": @"", @"State": @"", @"Street": @"", @"Tel1": @"", @"Tel2": @"", @"Zip": @"" },
@"ArchivedAt": @"",
@"DefaultCommercialMailAddress": @{ @"Id": @0, @"SubType": @"", @"TypeId": @0, @"TypeName": @"", @"Value": @"" },
@"DefaultFax": @{ },
@"DefaultMailAddress": @{ },
@"DefaultPhone1": @{ },
@"DefaultPhone2": @{ },
@"DefaultStatusUpdatesMailAddress": @{ },
@"Email": @"",
@"Id": @0,
@"LanguageId": @0,
@"MetaData": @[ @{ } ],
@"Name": @"",
@"Number": @0,
@"PriceGroupId": @0,
@"RestoredAt": @"",
@"Tel1": @"",
@"Tel2": @"",
@"Type": @0,
@"VatId": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/api/v1/customers"]
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}}/api/v1/customers" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"Address\": {\n \"AddressAddition\": \"\",\n \"AddressType\": 0,\n \"ArchivedAt\": \"\",\n \"City\": \"\",\n \"Company\": \"\",\n \"CountryCode\": \"\",\n \"CustomerId\": 0,\n \"Email\": \"\",\n \"Fax\": \"\",\n \"FirstName\": \"\",\n \"Housenumber\": \"\",\n \"Id\": 0,\n \"LastName\": \"\",\n \"Name2\": \"\",\n \"RestoredAt\": \"\",\n \"State\": \"\",\n \"Street\": \"\",\n \"Tel1\": \"\",\n \"Tel2\": \"\",\n \"Zip\": \"\"\n },\n \"ArchivedAt\": \"\",\n \"DefaultCommercialMailAddress\": {\n \"Id\": 0,\n \"SubType\": \"\",\n \"TypeId\": 0,\n \"TypeName\": \"\",\n \"Value\": \"\"\n },\n \"DefaultFax\": {},\n \"DefaultMailAddress\": {},\n \"DefaultPhone1\": {},\n \"DefaultPhone2\": {},\n \"DefaultStatusUpdatesMailAddress\": {},\n \"Email\": \"\",\n \"Id\": 0,\n \"LanguageId\": 0,\n \"MetaData\": [\n {}\n ],\n \"Name\": \"\",\n \"Number\": 0,\n \"PriceGroupId\": 0,\n \"RestoredAt\": \"\",\n \"Tel1\": \"\",\n \"Tel2\": \"\",\n \"Type\": 0,\n \"VatId\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/v1/customers",
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([
'Address' => [
'AddressAddition' => '',
'AddressType' => 0,
'ArchivedAt' => '',
'City' => '',
'Company' => '',
'CountryCode' => '',
'CustomerId' => 0,
'Email' => '',
'Fax' => '',
'FirstName' => '',
'Housenumber' => '',
'Id' => 0,
'LastName' => '',
'Name2' => '',
'RestoredAt' => '',
'State' => '',
'Street' => '',
'Tel1' => '',
'Tel2' => '',
'Zip' => ''
],
'ArchivedAt' => '',
'DefaultCommercialMailAddress' => [
'Id' => 0,
'SubType' => '',
'TypeId' => 0,
'TypeName' => '',
'Value' => ''
],
'DefaultFax' => [
],
'DefaultMailAddress' => [
],
'DefaultPhone1' => [
],
'DefaultPhone2' => [
],
'DefaultStatusUpdatesMailAddress' => [
],
'Email' => '',
'Id' => 0,
'LanguageId' => 0,
'MetaData' => [
[
]
],
'Name' => '',
'Number' => 0,
'PriceGroupId' => 0,
'RestoredAt' => '',
'Tel1' => '',
'Tel2' => '',
'Type' => 0,
'VatId' => ''
]),
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}}/api/v1/customers', [
'body' => '{
"Address": {
"AddressAddition": "",
"AddressType": 0,
"ArchivedAt": "",
"City": "",
"Company": "",
"CountryCode": "",
"CustomerId": 0,
"Email": "",
"Fax": "",
"FirstName": "",
"Housenumber": "",
"Id": 0,
"LastName": "",
"Name2": "",
"RestoredAt": "",
"State": "",
"Street": "",
"Tel1": "",
"Tel2": "",
"Zip": ""
},
"ArchivedAt": "",
"DefaultCommercialMailAddress": {
"Id": 0,
"SubType": "",
"TypeId": 0,
"TypeName": "",
"Value": ""
},
"DefaultFax": {},
"DefaultMailAddress": {},
"DefaultPhone1": {},
"DefaultPhone2": {},
"DefaultStatusUpdatesMailAddress": {},
"Email": "",
"Id": 0,
"LanguageId": 0,
"MetaData": [
{}
],
"Name": "",
"Number": 0,
"PriceGroupId": 0,
"RestoredAt": "",
"Tel1": "",
"Tel2": "",
"Type": 0,
"VatId": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/api/v1/customers');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'Address' => [
'AddressAddition' => '',
'AddressType' => 0,
'ArchivedAt' => '',
'City' => '',
'Company' => '',
'CountryCode' => '',
'CustomerId' => 0,
'Email' => '',
'Fax' => '',
'FirstName' => '',
'Housenumber' => '',
'Id' => 0,
'LastName' => '',
'Name2' => '',
'RestoredAt' => '',
'State' => '',
'Street' => '',
'Tel1' => '',
'Tel2' => '',
'Zip' => ''
],
'ArchivedAt' => '',
'DefaultCommercialMailAddress' => [
'Id' => 0,
'SubType' => '',
'TypeId' => 0,
'TypeName' => '',
'Value' => ''
],
'DefaultFax' => [
],
'DefaultMailAddress' => [
],
'DefaultPhone1' => [
],
'DefaultPhone2' => [
],
'DefaultStatusUpdatesMailAddress' => [
],
'Email' => '',
'Id' => 0,
'LanguageId' => 0,
'MetaData' => [
[
]
],
'Name' => '',
'Number' => 0,
'PriceGroupId' => 0,
'RestoredAt' => '',
'Tel1' => '',
'Tel2' => '',
'Type' => 0,
'VatId' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'Address' => [
'AddressAddition' => '',
'AddressType' => 0,
'ArchivedAt' => '',
'City' => '',
'Company' => '',
'CountryCode' => '',
'CustomerId' => 0,
'Email' => '',
'Fax' => '',
'FirstName' => '',
'Housenumber' => '',
'Id' => 0,
'LastName' => '',
'Name2' => '',
'RestoredAt' => '',
'State' => '',
'Street' => '',
'Tel1' => '',
'Tel2' => '',
'Zip' => ''
],
'ArchivedAt' => '',
'DefaultCommercialMailAddress' => [
'Id' => 0,
'SubType' => '',
'TypeId' => 0,
'TypeName' => '',
'Value' => ''
],
'DefaultFax' => [
],
'DefaultMailAddress' => [
],
'DefaultPhone1' => [
],
'DefaultPhone2' => [
],
'DefaultStatusUpdatesMailAddress' => [
],
'Email' => '',
'Id' => 0,
'LanguageId' => 0,
'MetaData' => [
[
]
],
'Name' => '',
'Number' => 0,
'PriceGroupId' => 0,
'RestoredAt' => '',
'Tel1' => '',
'Tel2' => '',
'Type' => 0,
'VatId' => ''
]));
$request->setRequestUrl('{{baseUrl}}/api/v1/customers');
$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}}/api/v1/customers' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"Address": {
"AddressAddition": "",
"AddressType": 0,
"ArchivedAt": "",
"City": "",
"Company": "",
"CountryCode": "",
"CustomerId": 0,
"Email": "",
"Fax": "",
"FirstName": "",
"Housenumber": "",
"Id": 0,
"LastName": "",
"Name2": "",
"RestoredAt": "",
"State": "",
"Street": "",
"Tel1": "",
"Tel2": "",
"Zip": ""
},
"ArchivedAt": "",
"DefaultCommercialMailAddress": {
"Id": 0,
"SubType": "",
"TypeId": 0,
"TypeName": "",
"Value": ""
},
"DefaultFax": {},
"DefaultMailAddress": {},
"DefaultPhone1": {},
"DefaultPhone2": {},
"DefaultStatusUpdatesMailAddress": {},
"Email": "",
"Id": 0,
"LanguageId": 0,
"MetaData": [
{}
],
"Name": "",
"Number": 0,
"PriceGroupId": 0,
"RestoredAt": "",
"Tel1": "",
"Tel2": "",
"Type": 0,
"VatId": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/v1/customers' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"Address": {
"AddressAddition": "",
"AddressType": 0,
"ArchivedAt": "",
"City": "",
"Company": "",
"CountryCode": "",
"CustomerId": 0,
"Email": "",
"Fax": "",
"FirstName": "",
"Housenumber": "",
"Id": 0,
"LastName": "",
"Name2": "",
"RestoredAt": "",
"State": "",
"Street": "",
"Tel1": "",
"Tel2": "",
"Zip": ""
},
"ArchivedAt": "",
"DefaultCommercialMailAddress": {
"Id": 0,
"SubType": "",
"TypeId": 0,
"TypeName": "",
"Value": ""
},
"DefaultFax": {},
"DefaultMailAddress": {},
"DefaultPhone1": {},
"DefaultPhone2": {},
"DefaultStatusUpdatesMailAddress": {},
"Email": "",
"Id": 0,
"LanguageId": 0,
"MetaData": [
{}
],
"Name": "",
"Number": 0,
"PriceGroupId": 0,
"RestoredAt": "",
"Tel1": "",
"Tel2": "",
"Type": 0,
"VatId": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"Address\": {\n \"AddressAddition\": \"\",\n \"AddressType\": 0,\n \"ArchivedAt\": \"\",\n \"City\": \"\",\n \"Company\": \"\",\n \"CountryCode\": \"\",\n \"CustomerId\": 0,\n \"Email\": \"\",\n \"Fax\": \"\",\n \"FirstName\": \"\",\n \"Housenumber\": \"\",\n \"Id\": 0,\n \"LastName\": \"\",\n \"Name2\": \"\",\n \"RestoredAt\": \"\",\n \"State\": \"\",\n \"Street\": \"\",\n \"Tel1\": \"\",\n \"Tel2\": \"\",\n \"Zip\": \"\"\n },\n \"ArchivedAt\": \"\",\n \"DefaultCommercialMailAddress\": {\n \"Id\": 0,\n \"SubType\": \"\",\n \"TypeId\": 0,\n \"TypeName\": \"\",\n \"Value\": \"\"\n },\n \"DefaultFax\": {},\n \"DefaultMailAddress\": {},\n \"DefaultPhone1\": {},\n \"DefaultPhone2\": {},\n \"DefaultStatusUpdatesMailAddress\": {},\n \"Email\": \"\",\n \"Id\": 0,\n \"LanguageId\": 0,\n \"MetaData\": [\n {}\n ],\n \"Name\": \"\",\n \"Number\": 0,\n \"PriceGroupId\": 0,\n \"RestoredAt\": \"\",\n \"Tel1\": \"\",\n \"Tel2\": \"\",\n \"Type\": 0,\n \"VatId\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/api/v1/customers", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/v1/customers"
payload = {
"Address": {
"AddressAddition": "",
"AddressType": 0,
"ArchivedAt": "",
"City": "",
"Company": "",
"CountryCode": "",
"CustomerId": 0,
"Email": "",
"Fax": "",
"FirstName": "",
"Housenumber": "",
"Id": 0,
"LastName": "",
"Name2": "",
"RestoredAt": "",
"State": "",
"Street": "",
"Tel1": "",
"Tel2": "",
"Zip": ""
},
"ArchivedAt": "",
"DefaultCommercialMailAddress": {
"Id": 0,
"SubType": "",
"TypeId": 0,
"TypeName": "",
"Value": ""
},
"DefaultFax": {},
"DefaultMailAddress": {},
"DefaultPhone1": {},
"DefaultPhone2": {},
"DefaultStatusUpdatesMailAddress": {},
"Email": "",
"Id": 0,
"LanguageId": 0,
"MetaData": [{}],
"Name": "",
"Number": 0,
"PriceGroupId": 0,
"RestoredAt": "",
"Tel1": "",
"Tel2": "",
"Type": 0,
"VatId": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/v1/customers"
payload <- "{\n \"Address\": {\n \"AddressAddition\": \"\",\n \"AddressType\": 0,\n \"ArchivedAt\": \"\",\n \"City\": \"\",\n \"Company\": \"\",\n \"CountryCode\": \"\",\n \"CustomerId\": 0,\n \"Email\": \"\",\n \"Fax\": \"\",\n \"FirstName\": \"\",\n \"Housenumber\": \"\",\n \"Id\": 0,\n \"LastName\": \"\",\n \"Name2\": \"\",\n \"RestoredAt\": \"\",\n \"State\": \"\",\n \"Street\": \"\",\n \"Tel1\": \"\",\n \"Tel2\": \"\",\n \"Zip\": \"\"\n },\n \"ArchivedAt\": \"\",\n \"DefaultCommercialMailAddress\": {\n \"Id\": 0,\n \"SubType\": \"\",\n \"TypeId\": 0,\n \"TypeName\": \"\",\n \"Value\": \"\"\n },\n \"DefaultFax\": {},\n \"DefaultMailAddress\": {},\n \"DefaultPhone1\": {},\n \"DefaultPhone2\": {},\n \"DefaultStatusUpdatesMailAddress\": {},\n \"Email\": \"\",\n \"Id\": 0,\n \"LanguageId\": 0,\n \"MetaData\": [\n {}\n ],\n \"Name\": \"\",\n \"Number\": 0,\n \"PriceGroupId\": 0,\n \"RestoredAt\": \"\",\n \"Tel1\": \"\",\n \"Tel2\": \"\",\n \"Type\": 0,\n \"VatId\": \"\"\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}}/api/v1/customers")
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 \"Address\": {\n \"AddressAddition\": \"\",\n \"AddressType\": 0,\n \"ArchivedAt\": \"\",\n \"City\": \"\",\n \"Company\": \"\",\n \"CountryCode\": \"\",\n \"CustomerId\": 0,\n \"Email\": \"\",\n \"Fax\": \"\",\n \"FirstName\": \"\",\n \"Housenumber\": \"\",\n \"Id\": 0,\n \"LastName\": \"\",\n \"Name2\": \"\",\n \"RestoredAt\": \"\",\n \"State\": \"\",\n \"Street\": \"\",\n \"Tel1\": \"\",\n \"Tel2\": \"\",\n \"Zip\": \"\"\n },\n \"ArchivedAt\": \"\",\n \"DefaultCommercialMailAddress\": {\n \"Id\": 0,\n \"SubType\": \"\",\n \"TypeId\": 0,\n \"TypeName\": \"\",\n \"Value\": \"\"\n },\n \"DefaultFax\": {},\n \"DefaultMailAddress\": {},\n \"DefaultPhone1\": {},\n \"DefaultPhone2\": {},\n \"DefaultStatusUpdatesMailAddress\": {},\n \"Email\": \"\",\n \"Id\": 0,\n \"LanguageId\": 0,\n \"MetaData\": [\n {}\n ],\n \"Name\": \"\",\n \"Number\": 0,\n \"PriceGroupId\": 0,\n \"RestoredAt\": \"\",\n \"Tel1\": \"\",\n \"Tel2\": \"\",\n \"Type\": 0,\n \"VatId\": \"\"\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/api/v1/customers') do |req|
req.body = "{\n \"Address\": {\n \"AddressAddition\": \"\",\n \"AddressType\": 0,\n \"ArchivedAt\": \"\",\n \"City\": \"\",\n \"Company\": \"\",\n \"CountryCode\": \"\",\n \"CustomerId\": 0,\n \"Email\": \"\",\n \"Fax\": \"\",\n \"FirstName\": \"\",\n \"Housenumber\": \"\",\n \"Id\": 0,\n \"LastName\": \"\",\n \"Name2\": \"\",\n \"RestoredAt\": \"\",\n \"State\": \"\",\n \"Street\": \"\",\n \"Tel1\": \"\",\n \"Tel2\": \"\",\n \"Zip\": \"\"\n },\n \"ArchivedAt\": \"\",\n \"DefaultCommercialMailAddress\": {\n \"Id\": 0,\n \"SubType\": \"\",\n \"TypeId\": 0,\n \"TypeName\": \"\",\n \"Value\": \"\"\n },\n \"DefaultFax\": {},\n \"DefaultMailAddress\": {},\n \"DefaultPhone1\": {},\n \"DefaultPhone2\": {},\n \"DefaultStatusUpdatesMailAddress\": {},\n \"Email\": \"\",\n \"Id\": 0,\n \"LanguageId\": 0,\n \"MetaData\": [\n {}\n ],\n \"Name\": \"\",\n \"Number\": 0,\n \"PriceGroupId\": 0,\n \"RestoredAt\": \"\",\n \"Tel1\": \"\",\n \"Tel2\": \"\",\n \"Type\": 0,\n \"VatId\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/api/v1/customers";
let payload = json!({
"Address": json!({
"AddressAddition": "",
"AddressType": 0,
"ArchivedAt": "",
"City": "",
"Company": "",
"CountryCode": "",
"CustomerId": 0,
"Email": "",
"Fax": "",
"FirstName": "",
"Housenumber": "",
"Id": 0,
"LastName": "",
"Name2": "",
"RestoredAt": "",
"State": "",
"Street": "",
"Tel1": "",
"Tel2": "",
"Zip": ""
}),
"ArchivedAt": "",
"DefaultCommercialMailAddress": json!({
"Id": 0,
"SubType": "",
"TypeId": 0,
"TypeName": "",
"Value": ""
}),
"DefaultFax": json!({}),
"DefaultMailAddress": json!({}),
"DefaultPhone1": json!({}),
"DefaultPhone2": json!({}),
"DefaultStatusUpdatesMailAddress": json!({}),
"Email": "",
"Id": 0,
"LanguageId": 0,
"MetaData": (json!({})),
"Name": "",
"Number": 0,
"PriceGroupId": 0,
"RestoredAt": "",
"Tel1": "",
"Tel2": "",
"Type": 0,
"VatId": ""
});
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}}/api/v1/customers \
--header 'content-type: application/json' \
--data '{
"Address": {
"AddressAddition": "",
"AddressType": 0,
"ArchivedAt": "",
"City": "",
"Company": "",
"CountryCode": "",
"CustomerId": 0,
"Email": "",
"Fax": "",
"FirstName": "",
"Housenumber": "",
"Id": 0,
"LastName": "",
"Name2": "",
"RestoredAt": "",
"State": "",
"Street": "",
"Tel1": "",
"Tel2": "",
"Zip": ""
},
"ArchivedAt": "",
"DefaultCommercialMailAddress": {
"Id": 0,
"SubType": "",
"TypeId": 0,
"TypeName": "",
"Value": ""
},
"DefaultFax": {},
"DefaultMailAddress": {},
"DefaultPhone1": {},
"DefaultPhone2": {},
"DefaultStatusUpdatesMailAddress": {},
"Email": "",
"Id": 0,
"LanguageId": 0,
"MetaData": [
{}
],
"Name": "",
"Number": 0,
"PriceGroupId": 0,
"RestoredAt": "",
"Tel1": "",
"Tel2": "",
"Type": 0,
"VatId": ""
}'
echo '{
"Address": {
"AddressAddition": "",
"AddressType": 0,
"ArchivedAt": "",
"City": "",
"Company": "",
"CountryCode": "",
"CustomerId": 0,
"Email": "",
"Fax": "",
"FirstName": "",
"Housenumber": "",
"Id": 0,
"LastName": "",
"Name2": "",
"RestoredAt": "",
"State": "",
"Street": "",
"Tel1": "",
"Tel2": "",
"Zip": ""
},
"ArchivedAt": "",
"DefaultCommercialMailAddress": {
"Id": 0,
"SubType": "",
"TypeId": 0,
"TypeName": "",
"Value": ""
},
"DefaultFax": {},
"DefaultMailAddress": {},
"DefaultPhone1": {},
"DefaultPhone2": {},
"DefaultStatusUpdatesMailAddress": {},
"Email": "",
"Id": 0,
"LanguageId": 0,
"MetaData": [
{}
],
"Name": "",
"Number": 0,
"PriceGroupId": 0,
"RestoredAt": "",
"Tel1": "",
"Tel2": "",
"Type": 0,
"VatId": ""
}' | \
http POST {{baseUrl}}/api/v1/customers \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "Address": {\n "AddressAddition": "",\n "AddressType": 0,\n "ArchivedAt": "",\n "City": "",\n "Company": "",\n "CountryCode": "",\n "CustomerId": 0,\n "Email": "",\n "Fax": "",\n "FirstName": "",\n "Housenumber": "",\n "Id": 0,\n "LastName": "",\n "Name2": "",\n "RestoredAt": "",\n "State": "",\n "Street": "",\n "Tel1": "",\n "Tel2": "",\n "Zip": ""\n },\n "ArchivedAt": "",\n "DefaultCommercialMailAddress": {\n "Id": 0,\n "SubType": "",\n "TypeId": 0,\n "TypeName": "",\n "Value": ""\n },\n "DefaultFax": {},\n "DefaultMailAddress": {},\n "DefaultPhone1": {},\n "DefaultPhone2": {},\n "DefaultStatusUpdatesMailAddress": {},\n "Email": "",\n "Id": 0,\n "LanguageId": 0,\n "MetaData": [\n {}\n ],\n "Name": "",\n "Number": 0,\n "PriceGroupId": 0,\n "RestoredAt": "",\n "Tel1": "",\n "Tel2": "",\n "Type": 0,\n "VatId": ""\n}' \
--output-document \
- {{baseUrl}}/api/v1/customers
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"Address": [
"AddressAddition": "",
"AddressType": 0,
"ArchivedAt": "",
"City": "",
"Company": "",
"CountryCode": "",
"CustomerId": 0,
"Email": "",
"Fax": "",
"FirstName": "",
"Housenumber": "",
"Id": 0,
"LastName": "",
"Name2": "",
"RestoredAt": "",
"State": "",
"Street": "",
"Tel1": "",
"Tel2": "",
"Zip": ""
],
"ArchivedAt": "",
"DefaultCommercialMailAddress": [
"Id": 0,
"SubType": "",
"TypeId": 0,
"TypeName": "",
"Value": ""
],
"DefaultFax": [],
"DefaultMailAddress": [],
"DefaultPhone1": [],
"DefaultPhone2": [],
"DefaultStatusUpdatesMailAddress": [],
"Email": "",
"Id": 0,
"LanguageId": 0,
"MetaData": [[]],
"Name": "",
"Number": 0,
"PriceGroupId": 0,
"RestoredAt": "",
"Tel1": "",
"Tel2": "",
"Type": 0,
"VatId": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/v1/customers")! 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
Get a list of all customers
{{baseUrl}}/api/v1/customers
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/v1/customers");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/api/v1/customers")
require "http/client"
url = "{{baseUrl}}/api/v1/customers"
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}}/api/v1/customers"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/api/v1/customers");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/v1/customers"
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/api/v1/customers HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/api/v1/customers")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/v1/customers"))
.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}}/api/v1/customers")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/api/v1/customers")
.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}}/api/v1/customers');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/api/v1/customers'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/v1/customers';
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}}/api/v1/customers',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/api/v1/customers")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/api/v1/customers',
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}}/api/v1/customers'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/api/v1/customers');
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}}/api/v1/customers'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/v1/customers';
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}}/api/v1/customers"]
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}}/api/v1/customers" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/v1/customers",
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}}/api/v1/customers');
echo $response->getBody();
setUrl('{{baseUrl}}/api/v1/customers');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/api/v1/customers');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/api/v1/customers' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/v1/customers' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/api/v1/customers")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/v1/customers"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/v1/customers"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/api/v1/customers")
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/api/v1/customers') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/api/v1/customers";
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}}/api/v1/customers
http GET {{baseUrl}}/api/v1/customers
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/api/v1/customers
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/v1/customers")! 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
Queries a list of addresses from a customer
{{baseUrl}}/api/v1/customers/:id/addresses
QUERY PARAMS
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/v1/customers/:id/addresses");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/api/v1/customers/:id/addresses")
require "http/client"
url = "{{baseUrl}}/api/v1/customers/:id/addresses"
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}}/api/v1/customers/:id/addresses"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/api/v1/customers/:id/addresses");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/v1/customers/:id/addresses"
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/api/v1/customers/:id/addresses HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/api/v1/customers/:id/addresses")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/v1/customers/:id/addresses"))
.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}}/api/v1/customers/:id/addresses")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/api/v1/customers/:id/addresses")
.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}}/api/v1/customers/:id/addresses');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/api/v1/customers/:id/addresses'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/v1/customers/:id/addresses';
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}}/api/v1/customers/:id/addresses',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/api/v1/customers/:id/addresses")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/api/v1/customers/:id/addresses',
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}}/api/v1/customers/:id/addresses'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/api/v1/customers/:id/addresses');
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}}/api/v1/customers/:id/addresses'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/v1/customers/:id/addresses';
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}}/api/v1/customers/:id/addresses"]
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}}/api/v1/customers/:id/addresses" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/v1/customers/:id/addresses",
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}}/api/v1/customers/:id/addresses');
echo $response->getBody();
setUrl('{{baseUrl}}/api/v1/customers/:id/addresses');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/api/v1/customers/:id/addresses');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/api/v1/customers/:id/addresses' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/v1/customers/:id/addresses' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/api/v1/customers/:id/addresses")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/v1/customers/:id/addresses"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/v1/customers/:id/addresses"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/api/v1/customers/:id/addresses")
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/api/v1/customers/:id/addresses') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/api/v1/customers/:id/addresses";
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}}/api/v1/customers/:id/addresses
http GET {{baseUrl}}/api/v1/customers/:id/addresses
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/api/v1/customers/:id/addresses
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/v1/customers/:id/addresses")! 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
Queries a list of orders from a customer
{{baseUrl}}/api/v1/customers/:id/orders
QUERY PARAMS
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/v1/customers/:id/orders");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/api/v1/customers/:id/orders")
require "http/client"
url = "{{baseUrl}}/api/v1/customers/:id/orders"
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}}/api/v1/customers/:id/orders"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/api/v1/customers/:id/orders");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/v1/customers/:id/orders"
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/api/v1/customers/:id/orders HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/api/v1/customers/:id/orders")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/v1/customers/:id/orders"))
.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}}/api/v1/customers/:id/orders")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/api/v1/customers/:id/orders")
.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}}/api/v1/customers/:id/orders');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/api/v1/customers/:id/orders'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/v1/customers/:id/orders';
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}}/api/v1/customers/:id/orders',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/api/v1/customers/:id/orders")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/api/v1/customers/:id/orders',
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}}/api/v1/customers/:id/orders'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/api/v1/customers/:id/orders');
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}}/api/v1/customers/:id/orders'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/v1/customers/:id/orders';
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}}/api/v1/customers/:id/orders"]
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}}/api/v1/customers/:id/orders" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/v1/customers/:id/orders",
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}}/api/v1/customers/:id/orders');
echo $response->getBody();
setUrl('{{baseUrl}}/api/v1/customers/:id/orders');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/api/v1/customers/:id/orders');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/api/v1/customers/:id/orders' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/v1/customers/:id/orders' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/api/v1/customers/:id/orders")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/v1/customers/:id/orders"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/v1/customers/:id/orders"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/api/v1/customers/:id/orders")
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/api/v1/customers/:id/orders') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/api/v1/customers/:id/orders";
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}}/api/v1/customers/:id/orders
http GET {{baseUrl}}/api/v1/customers/:id/orders
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/api/v1/customers/:id/orders
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/v1/customers/:id/orders")! 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
Queries a single address from a customer
{{baseUrl}}/api/v1/customers/addresses/:id
QUERY PARAMS
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/v1/customers/addresses/:id");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/api/v1/customers/addresses/:id")
require "http/client"
url = "{{baseUrl}}/api/v1/customers/addresses/: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}}/api/v1/customers/addresses/:id"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/api/v1/customers/addresses/:id");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/v1/customers/addresses/: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/api/v1/customers/addresses/:id HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/api/v1/customers/addresses/:id")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/v1/customers/addresses/: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}}/api/v1/customers/addresses/:id")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/api/v1/customers/addresses/: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}}/api/v1/customers/addresses/:id');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/api/v1/customers/addresses/:id'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/v1/customers/addresses/: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}}/api/v1/customers/addresses/:id',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/api/v1/customers/addresses/:id")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/api/v1/customers/addresses/: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}}/api/v1/customers/addresses/: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}}/api/v1/customers/addresses/: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}}/api/v1/customers/addresses/:id'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/v1/customers/addresses/: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}}/api/v1/customers/addresses/: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}}/api/v1/customers/addresses/:id" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/v1/customers/addresses/: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}}/api/v1/customers/addresses/:id');
echo $response->getBody();
setUrl('{{baseUrl}}/api/v1/customers/addresses/:id');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/api/v1/customers/addresses/:id');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/api/v1/customers/addresses/:id' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/v1/customers/addresses/:id' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/api/v1/customers/addresses/:id")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/v1/customers/addresses/:id"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/v1/customers/addresses/:id"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/api/v1/customers/addresses/: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/api/v1/customers/addresses/:id') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/api/v1/customers/addresses/: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}}/api/v1/customers/addresses/:id
http GET {{baseUrl}}/api/v1/customers/addresses/:id
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/api/v1/customers/addresses/:id
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/v1/customers/addresses/: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
Queries a single customer by id
{{baseUrl}}/api/v1/customers/:id
QUERY PARAMS
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/v1/customers/:id");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/api/v1/customers/:id")
require "http/client"
url = "{{baseUrl}}/api/v1/customers/: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}}/api/v1/customers/:id"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/api/v1/customers/:id");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/v1/customers/: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/api/v1/customers/:id HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/api/v1/customers/:id")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/v1/customers/: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}}/api/v1/customers/:id")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/api/v1/customers/: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}}/api/v1/customers/:id');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/api/v1/customers/:id'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/v1/customers/: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}}/api/v1/customers/:id',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/api/v1/customers/:id")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/api/v1/customers/: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}}/api/v1/customers/: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}}/api/v1/customers/: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}}/api/v1/customers/:id'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/v1/customers/: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}}/api/v1/customers/: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}}/api/v1/customers/:id" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/v1/customers/: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}}/api/v1/customers/:id');
echo $response->getBody();
setUrl('{{baseUrl}}/api/v1/customers/:id');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/api/v1/customers/:id');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/api/v1/customers/:id' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/v1/customers/:id' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/api/v1/customers/:id")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/v1/customers/:id"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/v1/customers/:id"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/api/v1/customers/: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/api/v1/customers/:id') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/api/v1/customers/: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}}/api/v1/customers/:id
http GET {{baseUrl}}/api/v1/customers/:id
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/api/v1/customers/:id
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/v1/customers/: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()
PUT
Updates a customer by id
{{baseUrl}}/api/v1/customers/:id
QUERY PARAMS
id
BODY json
{
"ArchivedAt": "",
"DefaultCommercialMailAddress": {
"Id": 0,
"SubType": "",
"TypeId": 0,
"TypeName": "",
"Value": ""
},
"DefaultFax": {},
"DefaultMailAddress": {},
"DefaultPhone1": {},
"DefaultPhone2": {},
"DefaultStatusUpdatesMailAddress": {},
"Email": "",
"Id": 0,
"LanguageId": 0,
"MetaData": [
{}
],
"Name": "",
"Number": 0,
"PriceGroupId": 0,
"RestoredAt": "",
"Tel1": "",
"Tel2": "",
"Type": 0,
"VatId": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/v1/customers/: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 \"ArchivedAt\": \"\",\n \"DefaultCommercialMailAddress\": {\n \"Id\": 0,\n \"SubType\": \"\",\n \"TypeId\": 0,\n \"TypeName\": \"\",\n \"Value\": \"\"\n },\n \"DefaultFax\": {},\n \"DefaultMailAddress\": {},\n \"DefaultPhone1\": {},\n \"DefaultPhone2\": {},\n \"DefaultStatusUpdatesMailAddress\": {},\n \"Email\": \"\",\n \"Id\": 0,\n \"LanguageId\": 0,\n \"MetaData\": [\n {}\n ],\n \"Name\": \"\",\n \"Number\": 0,\n \"PriceGroupId\": 0,\n \"RestoredAt\": \"\",\n \"Tel1\": \"\",\n \"Tel2\": \"\",\n \"Type\": 0,\n \"VatId\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/api/v1/customers/:id" {:content-type :json
:form-params {:ArchivedAt ""
:DefaultCommercialMailAddress {:Id 0
:SubType ""
:TypeId 0
:TypeName ""
:Value ""}
:DefaultFax {}
:DefaultMailAddress {}
:DefaultPhone1 {}
:DefaultPhone2 {}
:DefaultStatusUpdatesMailAddress {}
:Email ""
:Id 0
:LanguageId 0
:MetaData [{}]
:Name ""
:Number 0
:PriceGroupId 0
:RestoredAt ""
:Tel1 ""
:Tel2 ""
:Type 0
:VatId ""}})
require "http/client"
url = "{{baseUrl}}/api/v1/customers/:id"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"ArchivedAt\": \"\",\n \"DefaultCommercialMailAddress\": {\n \"Id\": 0,\n \"SubType\": \"\",\n \"TypeId\": 0,\n \"TypeName\": \"\",\n \"Value\": \"\"\n },\n \"DefaultFax\": {},\n \"DefaultMailAddress\": {},\n \"DefaultPhone1\": {},\n \"DefaultPhone2\": {},\n \"DefaultStatusUpdatesMailAddress\": {},\n \"Email\": \"\",\n \"Id\": 0,\n \"LanguageId\": 0,\n \"MetaData\": [\n {}\n ],\n \"Name\": \"\",\n \"Number\": 0,\n \"PriceGroupId\": 0,\n \"RestoredAt\": \"\",\n \"Tel1\": \"\",\n \"Tel2\": \"\",\n \"Type\": 0,\n \"VatId\": \"\"\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}}/api/v1/customers/:id"),
Content = new StringContent("{\n \"ArchivedAt\": \"\",\n \"DefaultCommercialMailAddress\": {\n \"Id\": 0,\n \"SubType\": \"\",\n \"TypeId\": 0,\n \"TypeName\": \"\",\n \"Value\": \"\"\n },\n \"DefaultFax\": {},\n \"DefaultMailAddress\": {},\n \"DefaultPhone1\": {},\n \"DefaultPhone2\": {},\n \"DefaultStatusUpdatesMailAddress\": {},\n \"Email\": \"\",\n \"Id\": 0,\n \"LanguageId\": 0,\n \"MetaData\": [\n {}\n ],\n \"Name\": \"\",\n \"Number\": 0,\n \"PriceGroupId\": 0,\n \"RestoredAt\": \"\",\n \"Tel1\": \"\",\n \"Tel2\": \"\",\n \"Type\": 0,\n \"VatId\": \"\"\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}}/api/v1/customers/:id");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"ArchivedAt\": \"\",\n \"DefaultCommercialMailAddress\": {\n \"Id\": 0,\n \"SubType\": \"\",\n \"TypeId\": 0,\n \"TypeName\": \"\",\n \"Value\": \"\"\n },\n \"DefaultFax\": {},\n \"DefaultMailAddress\": {},\n \"DefaultPhone1\": {},\n \"DefaultPhone2\": {},\n \"DefaultStatusUpdatesMailAddress\": {},\n \"Email\": \"\",\n \"Id\": 0,\n \"LanguageId\": 0,\n \"MetaData\": [\n {}\n ],\n \"Name\": \"\",\n \"Number\": 0,\n \"PriceGroupId\": 0,\n \"RestoredAt\": \"\",\n \"Tel1\": \"\",\n \"Tel2\": \"\",\n \"Type\": 0,\n \"VatId\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/v1/customers/:id"
payload := strings.NewReader("{\n \"ArchivedAt\": \"\",\n \"DefaultCommercialMailAddress\": {\n \"Id\": 0,\n \"SubType\": \"\",\n \"TypeId\": 0,\n \"TypeName\": \"\",\n \"Value\": \"\"\n },\n \"DefaultFax\": {},\n \"DefaultMailAddress\": {},\n \"DefaultPhone1\": {},\n \"DefaultPhone2\": {},\n \"DefaultStatusUpdatesMailAddress\": {},\n \"Email\": \"\",\n \"Id\": 0,\n \"LanguageId\": 0,\n \"MetaData\": [\n {}\n ],\n \"Name\": \"\",\n \"Number\": 0,\n \"PriceGroupId\": 0,\n \"RestoredAt\": \"\",\n \"Tel1\": \"\",\n \"Tel2\": \"\",\n \"Type\": 0,\n \"VatId\": \"\"\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/api/v1/customers/:id HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 482
{
"ArchivedAt": "",
"DefaultCommercialMailAddress": {
"Id": 0,
"SubType": "",
"TypeId": 0,
"TypeName": "",
"Value": ""
},
"DefaultFax": {},
"DefaultMailAddress": {},
"DefaultPhone1": {},
"DefaultPhone2": {},
"DefaultStatusUpdatesMailAddress": {},
"Email": "",
"Id": 0,
"LanguageId": 0,
"MetaData": [
{}
],
"Name": "",
"Number": 0,
"PriceGroupId": 0,
"RestoredAt": "",
"Tel1": "",
"Tel2": "",
"Type": 0,
"VatId": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/api/v1/customers/:id")
.setHeader("content-type", "application/json")
.setBody("{\n \"ArchivedAt\": \"\",\n \"DefaultCommercialMailAddress\": {\n \"Id\": 0,\n \"SubType\": \"\",\n \"TypeId\": 0,\n \"TypeName\": \"\",\n \"Value\": \"\"\n },\n \"DefaultFax\": {},\n \"DefaultMailAddress\": {},\n \"DefaultPhone1\": {},\n \"DefaultPhone2\": {},\n \"DefaultStatusUpdatesMailAddress\": {},\n \"Email\": \"\",\n \"Id\": 0,\n \"LanguageId\": 0,\n \"MetaData\": [\n {}\n ],\n \"Name\": \"\",\n \"Number\": 0,\n \"PriceGroupId\": 0,\n \"RestoredAt\": \"\",\n \"Tel1\": \"\",\n \"Tel2\": \"\",\n \"Type\": 0,\n \"VatId\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/v1/customers/:id"))
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("{\n \"ArchivedAt\": \"\",\n \"DefaultCommercialMailAddress\": {\n \"Id\": 0,\n \"SubType\": \"\",\n \"TypeId\": 0,\n \"TypeName\": \"\",\n \"Value\": \"\"\n },\n \"DefaultFax\": {},\n \"DefaultMailAddress\": {},\n \"DefaultPhone1\": {},\n \"DefaultPhone2\": {},\n \"DefaultStatusUpdatesMailAddress\": {},\n \"Email\": \"\",\n \"Id\": 0,\n \"LanguageId\": 0,\n \"MetaData\": [\n {}\n ],\n \"Name\": \"\",\n \"Number\": 0,\n \"PriceGroupId\": 0,\n \"RestoredAt\": \"\",\n \"Tel1\": \"\",\n \"Tel2\": \"\",\n \"Type\": 0,\n \"VatId\": \"\"\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 \"ArchivedAt\": \"\",\n \"DefaultCommercialMailAddress\": {\n \"Id\": 0,\n \"SubType\": \"\",\n \"TypeId\": 0,\n \"TypeName\": \"\",\n \"Value\": \"\"\n },\n \"DefaultFax\": {},\n \"DefaultMailAddress\": {},\n \"DefaultPhone1\": {},\n \"DefaultPhone2\": {},\n \"DefaultStatusUpdatesMailAddress\": {},\n \"Email\": \"\",\n \"Id\": 0,\n \"LanguageId\": 0,\n \"MetaData\": [\n {}\n ],\n \"Name\": \"\",\n \"Number\": 0,\n \"PriceGroupId\": 0,\n \"RestoredAt\": \"\",\n \"Tel1\": \"\",\n \"Tel2\": \"\",\n \"Type\": 0,\n \"VatId\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/api/v1/customers/:id")
.put(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/api/v1/customers/:id")
.header("content-type", "application/json")
.body("{\n \"ArchivedAt\": \"\",\n \"DefaultCommercialMailAddress\": {\n \"Id\": 0,\n \"SubType\": \"\",\n \"TypeId\": 0,\n \"TypeName\": \"\",\n \"Value\": \"\"\n },\n \"DefaultFax\": {},\n \"DefaultMailAddress\": {},\n \"DefaultPhone1\": {},\n \"DefaultPhone2\": {},\n \"DefaultStatusUpdatesMailAddress\": {},\n \"Email\": \"\",\n \"Id\": 0,\n \"LanguageId\": 0,\n \"MetaData\": [\n {}\n ],\n \"Name\": \"\",\n \"Number\": 0,\n \"PriceGroupId\": 0,\n \"RestoredAt\": \"\",\n \"Tel1\": \"\",\n \"Tel2\": \"\",\n \"Type\": 0,\n \"VatId\": \"\"\n}")
.asString();
const data = JSON.stringify({
ArchivedAt: '',
DefaultCommercialMailAddress: {
Id: 0,
SubType: '',
TypeId: 0,
TypeName: '',
Value: ''
},
DefaultFax: {},
DefaultMailAddress: {},
DefaultPhone1: {},
DefaultPhone2: {},
DefaultStatusUpdatesMailAddress: {},
Email: '',
Id: 0,
LanguageId: 0,
MetaData: [
{}
],
Name: '',
Number: 0,
PriceGroupId: 0,
RestoredAt: '',
Tel1: '',
Tel2: '',
Type: 0,
VatId: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/api/v1/customers/:id');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/api/v1/customers/:id',
headers: {'content-type': 'application/json'},
data: {
ArchivedAt: '',
DefaultCommercialMailAddress: {Id: 0, SubType: '', TypeId: 0, TypeName: '', Value: ''},
DefaultFax: {},
DefaultMailAddress: {},
DefaultPhone1: {},
DefaultPhone2: {},
DefaultStatusUpdatesMailAddress: {},
Email: '',
Id: 0,
LanguageId: 0,
MetaData: [{}],
Name: '',
Number: 0,
PriceGroupId: 0,
RestoredAt: '',
Tel1: '',
Tel2: '',
Type: 0,
VatId: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/v1/customers/:id';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"ArchivedAt":"","DefaultCommercialMailAddress":{"Id":0,"SubType":"","TypeId":0,"TypeName":"","Value":""},"DefaultFax":{},"DefaultMailAddress":{},"DefaultPhone1":{},"DefaultPhone2":{},"DefaultStatusUpdatesMailAddress":{},"Email":"","Id":0,"LanguageId":0,"MetaData":[{}],"Name":"","Number":0,"PriceGroupId":0,"RestoredAt":"","Tel1":"","Tel2":"","Type":0,"VatId":""}'
};
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}}/api/v1/customers/:id',
method: 'PUT',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "ArchivedAt": "",\n "DefaultCommercialMailAddress": {\n "Id": 0,\n "SubType": "",\n "TypeId": 0,\n "TypeName": "",\n "Value": ""\n },\n "DefaultFax": {},\n "DefaultMailAddress": {},\n "DefaultPhone1": {},\n "DefaultPhone2": {},\n "DefaultStatusUpdatesMailAddress": {},\n "Email": "",\n "Id": 0,\n "LanguageId": 0,\n "MetaData": [\n {}\n ],\n "Name": "",\n "Number": 0,\n "PriceGroupId": 0,\n "RestoredAt": "",\n "Tel1": "",\n "Tel2": "",\n "Type": 0,\n "VatId": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"ArchivedAt\": \"\",\n \"DefaultCommercialMailAddress\": {\n \"Id\": 0,\n \"SubType\": \"\",\n \"TypeId\": 0,\n \"TypeName\": \"\",\n \"Value\": \"\"\n },\n \"DefaultFax\": {},\n \"DefaultMailAddress\": {},\n \"DefaultPhone1\": {},\n \"DefaultPhone2\": {},\n \"DefaultStatusUpdatesMailAddress\": {},\n \"Email\": \"\",\n \"Id\": 0,\n \"LanguageId\": 0,\n \"MetaData\": [\n {}\n ],\n \"Name\": \"\",\n \"Number\": 0,\n \"PriceGroupId\": 0,\n \"RestoredAt\": \"\",\n \"Tel1\": \"\",\n \"Tel2\": \"\",\n \"Type\": 0,\n \"VatId\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/api/v1/customers/: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/api/v1/customers/: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({
ArchivedAt: '',
DefaultCommercialMailAddress: {Id: 0, SubType: '', TypeId: 0, TypeName: '', Value: ''},
DefaultFax: {},
DefaultMailAddress: {},
DefaultPhone1: {},
DefaultPhone2: {},
DefaultStatusUpdatesMailAddress: {},
Email: '',
Id: 0,
LanguageId: 0,
MetaData: [{}],
Name: '',
Number: 0,
PriceGroupId: 0,
RestoredAt: '',
Tel1: '',
Tel2: '',
Type: 0,
VatId: ''
}));
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/api/v1/customers/:id',
headers: {'content-type': 'application/json'},
body: {
ArchivedAt: '',
DefaultCommercialMailAddress: {Id: 0, SubType: '', TypeId: 0, TypeName: '', Value: ''},
DefaultFax: {},
DefaultMailAddress: {},
DefaultPhone1: {},
DefaultPhone2: {},
DefaultStatusUpdatesMailAddress: {},
Email: '',
Id: 0,
LanguageId: 0,
MetaData: [{}],
Name: '',
Number: 0,
PriceGroupId: 0,
RestoredAt: '',
Tel1: '',
Tel2: '',
Type: 0,
VatId: ''
},
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}}/api/v1/customers/:id');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
ArchivedAt: '',
DefaultCommercialMailAddress: {
Id: 0,
SubType: '',
TypeId: 0,
TypeName: '',
Value: ''
},
DefaultFax: {},
DefaultMailAddress: {},
DefaultPhone1: {},
DefaultPhone2: {},
DefaultStatusUpdatesMailAddress: {},
Email: '',
Id: 0,
LanguageId: 0,
MetaData: [
{}
],
Name: '',
Number: 0,
PriceGroupId: 0,
RestoredAt: '',
Tel1: '',
Tel2: '',
Type: 0,
VatId: ''
});
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}}/api/v1/customers/:id',
headers: {'content-type': 'application/json'},
data: {
ArchivedAt: '',
DefaultCommercialMailAddress: {Id: 0, SubType: '', TypeId: 0, TypeName: '', Value: ''},
DefaultFax: {},
DefaultMailAddress: {},
DefaultPhone1: {},
DefaultPhone2: {},
DefaultStatusUpdatesMailAddress: {},
Email: '',
Id: 0,
LanguageId: 0,
MetaData: [{}],
Name: '',
Number: 0,
PriceGroupId: 0,
RestoredAt: '',
Tel1: '',
Tel2: '',
Type: 0,
VatId: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/v1/customers/:id';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"ArchivedAt":"","DefaultCommercialMailAddress":{"Id":0,"SubType":"","TypeId":0,"TypeName":"","Value":""},"DefaultFax":{},"DefaultMailAddress":{},"DefaultPhone1":{},"DefaultPhone2":{},"DefaultStatusUpdatesMailAddress":{},"Email":"","Id":0,"LanguageId":0,"MetaData":[{}],"Name":"","Number":0,"PriceGroupId":0,"RestoredAt":"","Tel1":"","Tel2":"","Type":0,"VatId":""}'
};
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 = @{ @"ArchivedAt": @"",
@"DefaultCommercialMailAddress": @{ @"Id": @0, @"SubType": @"", @"TypeId": @0, @"TypeName": @"", @"Value": @"" },
@"DefaultFax": @{ },
@"DefaultMailAddress": @{ },
@"DefaultPhone1": @{ },
@"DefaultPhone2": @{ },
@"DefaultStatusUpdatesMailAddress": @{ },
@"Email": @"",
@"Id": @0,
@"LanguageId": @0,
@"MetaData": @[ @{ } ],
@"Name": @"",
@"Number": @0,
@"PriceGroupId": @0,
@"RestoredAt": @"",
@"Tel1": @"",
@"Tel2": @"",
@"Type": @0,
@"VatId": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/api/v1/customers/: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}}/api/v1/customers/:id" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"ArchivedAt\": \"\",\n \"DefaultCommercialMailAddress\": {\n \"Id\": 0,\n \"SubType\": \"\",\n \"TypeId\": 0,\n \"TypeName\": \"\",\n \"Value\": \"\"\n },\n \"DefaultFax\": {},\n \"DefaultMailAddress\": {},\n \"DefaultPhone1\": {},\n \"DefaultPhone2\": {},\n \"DefaultStatusUpdatesMailAddress\": {},\n \"Email\": \"\",\n \"Id\": 0,\n \"LanguageId\": 0,\n \"MetaData\": [\n {}\n ],\n \"Name\": \"\",\n \"Number\": 0,\n \"PriceGroupId\": 0,\n \"RestoredAt\": \"\",\n \"Tel1\": \"\",\n \"Tel2\": \"\",\n \"Type\": 0,\n \"VatId\": \"\"\n}" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/v1/customers/: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([
'ArchivedAt' => '',
'DefaultCommercialMailAddress' => [
'Id' => 0,
'SubType' => '',
'TypeId' => 0,
'TypeName' => '',
'Value' => ''
],
'DefaultFax' => [
],
'DefaultMailAddress' => [
],
'DefaultPhone1' => [
],
'DefaultPhone2' => [
],
'DefaultStatusUpdatesMailAddress' => [
],
'Email' => '',
'Id' => 0,
'LanguageId' => 0,
'MetaData' => [
[
]
],
'Name' => '',
'Number' => 0,
'PriceGroupId' => 0,
'RestoredAt' => '',
'Tel1' => '',
'Tel2' => '',
'Type' => 0,
'VatId' => ''
]),
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}}/api/v1/customers/:id', [
'body' => '{
"ArchivedAt": "",
"DefaultCommercialMailAddress": {
"Id": 0,
"SubType": "",
"TypeId": 0,
"TypeName": "",
"Value": ""
},
"DefaultFax": {},
"DefaultMailAddress": {},
"DefaultPhone1": {},
"DefaultPhone2": {},
"DefaultStatusUpdatesMailAddress": {},
"Email": "",
"Id": 0,
"LanguageId": 0,
"MetaData": [
{}
],
"Name": "",
"Number": 0,
"PriceGroupId": 0,
"RestoredAt": "",
"Tel1": "",
"Tel2": "",
"Type": 0,
"VatId": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/api/v1/customers/:id');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'ArchivedAt' => '',
'DefaultCommercialMailAddress' => [
'Id' => 0,
'SubType' => '',
'TypeId' => 0,
'TypeName' => '',
'Value' => ''
],
'DefaultFax' => [
],
'DefaultMailAddress' => [
],
'DefaultPhone1' => [
],
'DefaultPhone2' => [
],
'DefaultStatusUpdatesMailAddress' => [
],
'Email' => '',
'Id' => 0,
'LanguageId' => 0,
'MetaData' => [
[
]
],
'Name' => '',
'Number' => 0,
'PriceGroupId' => 0,
'RestoredAt' => '',
'Tel1' => '',
'Tel2' => '',
'Type' => 0,
'VatId' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'ArchivedAt' => '',
'DefaultCommercialMailAddress' => [
'Id' => 0,
'SubType' => '',
'TypeId' => 0,
'TypeName' => '',
'Value' => ''
],
'DefaultFax' => [
],
'DefaultMailAddress' => [
],
'DefaultPhone1' => [
],
'DefaultPhone2' => [
],
'DefaultStatusUpdatesMailAddress' => [
],
'Email' => '',
'Id' => 0,
'LanguageId' => 0,
'MetaData' => [
[
]
],
'Name' => '',
'Number' => 0,
'PriceGroupId' => 0,
'RestoredAt' => '',
'Tel1' => '',
'Tel2' => '',
'Type' => 0,
'VatId' => ''
]));
$request->setRequestUrl('{{baseUrl}}/api/v1/customers/: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}}/api/v1/customers/:id' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"ArchivedAt": "",
"DefaultCommercialMailAddress": {
"Id": 0,
"SubType": "",
"TypeId": 0,
"TypeName": "",
"Value": ""
},
"DefaultFax": {},
"DefaultMailAddress": {},
"DefaultPhone1": {},
"DefaultPhone2": {},
"DefaultStatusUpdatesMailAddress": {},
"Email": "",
"Id": 0,
"LanguageId": 0,
"MetaData": [
{}
],
"Name": "",
"Number": 0,
"PriceGroupId": 0,
"RestoredAt": "",
"Tel1": "",
"Tel2": "",
"Type": 0,
"VatId": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/v1/customers/:id' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"ArchivedAt": "",
"DefaultCommercialMailAddress": {
"Id": 0,
"SubType": "",
"TypeId": 0,
"TypeName": "",
"Value": ""
},
"DefaultFax": {},
"DefaultMailAddress": {},
"DefaultPhone1": {},
"DefaultPhone2": {},
"DefaultStatusUpdatesMailAddress": {},
"Email": "",
"Id": 0,
"LanguageId": 0,
"MetaData": [
{}
],
"Name": "",
"Number": 0,
"PriceGroupId": 0,
"RestoredAt": "",
"Tel1": "",
"Tel2": "",
"Type": 0,
"VatId": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"ArchivedAt\": \"\",\n \"DefaultCommercialMailAddress\": {\n \"Id\": 0,\n \"SubType\": \"\",\n \"TypeId\": 0,\n \"TypeName\": \"\",\n \"Value\": \"\"\n },\n \"DefaultFax\": {},\n \"DefaultMailAddress\": {},\n \"DefaultPhone1\": {},\n \"DefaultPhone2\": {},\n \"DefaultStatusUpdatesMailAddress\": {},\n \"Email\": \"\",\n \"Id\": 0,\n \"LanguageId\": 0,\n \"MetaData\": [\n {}\n ],\n \"Name\": \"\",\n \"Number\": 0,\n \"PriceGroupId\": 0,\n \"RestoredAt\": \"\",\n \"Tel1\": \"\",\n \"Tel2\": \"\",\n \"Type\": 0,\n \"VatId\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("PUT", "/baseUrl/api/v1/customers/:id", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/v1/customers/:id"
payload = {
"ArchivedAt": "",
"DefaultCommercialMailAddress": {
"Id": 0,
"SubType": "",
"TypeId": 0,
"TypeName": "",
"Value": ""
},
"DefaultFax": {},
"DefaultMailAddress": {},
"DefaultPhone1": {},
"DefaultPhone2": {},
"DefaultStatusUpdatesMailAddress": {},
"Email": "",
"Id": 0,
"LanguageId": 0,
"MetaData": [{}],
"Name": "",
"Number": 0,
"PriceGroupId": 0,
"RestoredAt": "",
"Tel1": "",
"Tel2": "",
"Type": 0,
"VatId": ""
}
headers = {"content-type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/v1/customers/:id"
payload <- "{\n \"ArchivedAt\": \"\",\n \"DefaultCommercialMailAddress\": {\n \"Id\": 0,\n \"SubType\": \"\",\n \"TypeId\": 0,\n \"TypeName\": \"\",\n \"Value\": \"\"\n },\n \"DefaultFax\": {},\n \"DefaultMailAddress\": {},\n \"DefaultPhone1\": {},\n \"DefaultPhone2\": {},\n \"DefaultStatusUpdatesMailAddress\": {},\n \"Email\": \"\",\n \"Id\": 0,\n \"LanguageId\": 0,\n \"MetaData\": [\n {}\n ],\n \"Name\": \"\",\n \"Number\": 0,\n \"PriceGroupId\": 0,\n \"RestoredAt\": \"\",\n \"Tel1\": \"\",\n \"Tel2\": \"\",\n \"Type\": 0,\n \"VatId\": \"\"\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}}/api/v1/customers/: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 \"ArchivedAt\": \"\",\n \"DefaultCommercialMailAddress\": {\n \"Id\": 0,\n \"SubType\": \"\",\n \"TypeId\": 0,\n \"TypeName\": \"\",\n \"Value\": \"\"\n },\n \"DefaultFax\": {},\n \"DefaultMailAddress\": {},\n \"DefaultPhone1\": {},\n \"DefaultPhone2\": {},\n \"DefaultStatusUpdatesMailAddress\": {},\n \"Email\": \"\",\n \"Id\": 0,\n \"LanguageId\": 0,\n \"MetaData\": [\n {}\n ],\n \"Name\": \"\",\n \"Number\": 0,\n \"PriceGroupId\": 0,\n \"RestoredAt\": \"\",\n \"Tel1\": \"\",\n \"Tel2\": \"\",\n \"Type\": 0,\n \"VatId\": \"\"\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/api/v1/customers/:id') do |req|
req.body = "{\n \"ArchivedAt\": \"\",\n \"DefaultCommercialMailAddress\": {\n \"Id\": 0,\n \"SubType\": \"\",\n \"TypeId\": 0,\n \"TypeName\": \"\",\n \"Value\": \"\"\n },\n \"DefaultFax\": {},\n \"DefaultMailAddress\": {},\n \"DefaultPhone1\": {},\n \"DefaultPhone2\": {},\n \"DefaultStatusUpdatesMailAddress\": {},\n \"Email\": \"\",\n \"Id\": 0,\n \"LanguageId\": 0,\n \"MetaData\": [\n {}\n ],\n \"Name\": \"\",\n \"Number\": 0,\n \"PriceGroupId\": 0,\n \"RestoredAt\": \"\",\n \"Tel1\": \"\",\n \"Tel2\": \"\",\n \"Type\": 0,\n \"VatId\": \"\"\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}}/api/v1/customers/:id";
let payload = json!({
"ArchivedAt": "",
"DefaultCommercialMailAddress": json!({
"Id": 0,
"SubType": "",
"TypeId": 0,
"TypeName": "",
"Value": ""
}),
"DefaultFax": json!({}),
"DefaultMailAddress": json!({}),
"DefaultPhone1": json!({}),
"DefaultPhone2": json!({}),
"DefaultStatusUpdatesMailAddress": json!({}),
"Email": "",
"Id": 0,
"LanguageId": 0,
"MetaData": (json!({})),
"Name": "",
"Number": 0,
"PriceGroupId": 0,
"RestoredAt": "",
"Tel1": "",
"Tel2": "",
"Type": 0,
"VatId": ""
});
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}}/api/v1/customers/:id \
--header 'content-type: application/json' \
--data '{
"ArchivedAt": "",
"DefaultCommercialMailAddress": {
"Id": 0,
"SubType": "",
"TypeId": 0,
"TypeName": "",
"Value": ""
},
"DefaultFax": {},
"DefaultMailAddress": {},
"DefaultPhone1": {},
"DefaultPhone2": {},
"DefaultStatusUpdatesMailAddress": {},
"Email": "",
"Id": 0,
"LanguageId": 0,
"MetaData": [
{}
],
"Name": "",
"Number": 0,
"PriceGroupId": 0,
"RestoredAt": "",
"Tel1": "",
"Tel2": "",
"Type": 0,
"VatId": ""
}'
echo '{
"ArchivedAt": "",
"DefaultCommercialMailAddress": {
"Id": 0,
"SubType": "",
"TypeId": 0,
"TypeName": "",
"Value": ""
},
"DefaultFax": {},
"DefaultMailAddress": {},
"DefaultPhone1": {},
"DefaultPhone2": {},
"DefaultStatusUpdatesMailAddress": {},
"Email": "",
"Id": 0,
"LanguageId": 0,
"MetaData": [
{}
],
"Name": "",
"Number": 0,
"PriceGroupId": 0,
"RestoredAt": "",
"Tel1": "",
"Tel2": "",
"Type": 0,
"VatId": ""
}' | \
http PUT {{baseUrl}}/api/v1/customers/:id \
content-type:application/json
wget --quiet \
--method PUT \
--header 'content-type: application/json' \
--body-data '{\n "ArchivedAt": "",\n "DefaultCommercialMailAddress": {\n "Id": 0,\n "SubType": "",\n "TypeId": 0,\n "TypeName": "",\n "Value": ""\n },\n "DefaultFax": {},\n "DefaultMailAddress": {},\n "DefaultPhone1": {},\n "DefaultPhone2": {},\n "DefaultStatusUpdatesMailAddress": {},\n "Email": "",\n "Id": 0,\n "LanguageId": 0,\n "MetaData": [\n {}\n ],\n "Name": "",\n "Number": 0,\n "PriceGroupId": 0,\n "RestoredAt": "",\n "Tel1": "",\n "Tel2": "",\n "Type": 0,\n "VatId": ""\n}' \
--output-document \
- {{baseUrl}}/api/v1/customers/:id
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"ArchivedAt": "",
"DefaultCommercialMailAddress": [
"Id": 0,
"SubType": "",
"TypeId": 0,
"TypeName": "",
"Value": ""
],
"DefaultFax": [],
"DefaultMailAddress": [],
"DefaultPhone1": [],
"DefaultPhone2": [],
"DefaultStatusUpdatesMailAddress": [],
"Email": "",
"Id": 0,
"LanguageId": 0,
"MetaData": [[]],
"Name": "",
"Number": 0,
"PriceGroupId": 0,
"RestoredAt": "",
"Tel1": "",
"Tel2": "",
"Type": 0,
"VatId": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/v1/customers/: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
Updates all fields of an address
{{baseUrl}}/api/v1/customers/addresses/:id
QUERY PARAMS
id
BODY json
{
"AddressAddition": "",
"AddressType": 0,
"ArchivedAt": "",
"City": "",
"Company": "",
"CountryCode": "",
"CustomerId": 0,
"Email": "",
"Fax": "",
"FirstName": "",
"Housenumber": "",
"Id": 0,
"LastName": "",
"Name2": "",
"RestoredAt": "",
"State": "",
"Street": "",
"Tel1": "",
"Tel2": "",
"Zip": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/v1/customers/addresses/: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 \"AddressAddition\": \"\",\n \"AddressType\": 0,\n \"ArchivedAt\": \"\",\n \"City\": \"\",\n \"Company\": \"\",\n \"CountryCode\": \"\",\n \"CustomerId\": 0,\n \"Email\": \"\",\n \"Fax\": \"\",\n \"FirstName\": \"\",\n \"Housenumber\": \"\",\n \"Id\": 0,\n \"LastName\": \"\",\n \"Name2\": \"\",\n \"RestoredAt\": \"\",\n \"State\": \"\",\n \"Street\": \"\",\n \"Tel1\": \"\",\n \"Tel2\": \"\",\n \"Zip\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/api/v1/customers/addresses/:id" {:content-type :json
:form-params {:AddressAddition ""
:AddressType 0
:ArchivedAt ""
:City ""
:Company ""
:CountryCode ""
:CustomerId 0
:Email ""
:Fax ""
:FirstName ""
:Housenumber ""
:Id 0
:LastName ""
:Name2 ""
:RestoredAt ""
:State ""
:Street ""
:Tel1 ""
:Tel2 ""
:Zip ""}})
require "http/client"
url = "{{baseUrl}}/api/v1/customers/addresses/:id"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"AddressAddition\": \"\",\n \"AddressType\": 0,\n \"ArchivedAt\": \"\",\n \"City\": \"\",\n \"Company\": \"\",\n \"CountryCode\": \"\",\n \"CustomerId\": 0,\n \"Email\": \"\",\n \"Fax\": \"\",\n \"FirstName\": \"\",\n \"Housenumber\": \"\",\n \"Id\": 0,\n \"LastName\": \"\",\n \"Name2\": \"\",\n \"RestoredAt\": \"\",\n \"State\": \"\",\n \"Street\": \"\",\n \"Tel1\": \"\",\n \"Tel2\": \"\",\n \"Zip\": \"\"\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}}/api/v1/customers/addresses/:id"),
Content = new StringContent("{\n \"AddressAddition\": \"\",\n \"AddressType\": 0,\n \"ArchivedAt\": \"\",\n \"City\": \"\",\n \"Company\": \"\",\n \"CountryCode\": \"\",\n \"CustomerId\": 0,\n \"Email\": \"\",\n \"Fax\": \"\",\n \"FirstName\": \"\",\n \"Housenumber\": \"\",\n \"Id\": 0,\n \"LastName\": \"\",\n \"Name2\": \"\",\n \"RestoredAt\": \"\",\n \"State\": \"\",\n \"Street\": \"\",\n \"Tel1\": \"\",\n \"Tel2\": \"\",\n \"Zip\": \"\"\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}}/api/v1/customers/addresses/:id");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"AddressAddition\": \"\",\n \"AddressType\": 0,\n \"ArchivedAt\": \"\",\n \"City\": \"\",\n \"Company\": \"\",\n \"CountryCode\": \"\",\n \"CustomerId\": 0,\n \"Email\": \"\",\n \"Fax\": \"\",\n \"FirstName\": \"\",\n \"Housenumber\": \"\",\n \"Id\": 0,\n \"LastName\": \"\",\n \"Name2\": \"\",\n \"RestoredAt\": \"\",\n \"State\": \"\",\n \"Street\": \"\",\n \"Tel1\": \"\",\n \"Tel2\": \"\",\n \"Zip\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/v1/customers/addresses/:id"
payload := strings.NewReader("{\n \"AddressAddition\": \"\",\n \"AddressType\": 0,\n \"ArchivedAt\": \"\",\n \"City\": \"\",\n \"Company\": \"\",\n \"CountryCode\": \"\",\n \"CustomerId\": 0,\n \"Email\": \"\",\n \"Fax\": \"\",\n \"FirstName\": \"\",\n \"Housenumber\": \"\",\n \"Id\": 0,\n \"LastName\": \"\",\n \"Name2\": \"\",\n \"RestoredAt\": \"\",\n \"State\": \"\",\n \"Street\": \"\",\n \"Tel1\": \"\",\n \"Tel2\": \"\",\n \"Zip\": \"\"\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/api/v1/customers/addresses/:id HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 342
{
"AddressAddition": "",
"AddressType": 0,
"ArchivedAt": "",
"City": "",
"Company": "",
"CountryCode": "",
"CustomerId": 0,
"Email": "",
"Fax": "",
"FirstName": "",
"Housenumber": "",
"Id": 0,
"LastName": "",
"Name2": "",
"RestoredAt": "",
"State": "",
"Street": "",
"Tel1": "",
"Tel2": "",
"Zip": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/api/v1/customers/addresses/:id")
.setHeader("content-type", "application/json")
.setBody("{\n \"AddressAddition\": \"\",\n \"AddressType\": 0,\n \"ArchivedAt\": \"\",\n \"City\": \"\",\n \"Company\": \"\",\n \"CountryCode\": \"\",\n \"CustomerId\": 0,\n \"Email\": \"\",\n \"Fax\": \"\",\n \"FirstName\": \"\",\n \"Housenumber\": \"\",\n \"Id\": 0,\n \"LastName\": \"\",\n \"Name2\": \"\",\n \"RestoredAt\": \"\",\n \"State\": \"\",\n \"Street\": \"\",\n \"Tel1\": \"\",\n \"Tel2\": \"\",\n \"Zip\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/v1/customers/addresses/:id"))
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("{\n \"AddressAddition\": \"\",\n \"AddressType\": 0,\n \"ArchivedAt\": \"\",\n \"City\": \"\",\n \"Company\": \"\",\n \"CountryCode\": \"\",\n \"CustomerId\": 0,\n \"Email\": \"\",\n \"Fax\": \"\",\n \"FirstName\": \"\",\n \"Housenumber\": \"\",\n \"Id\": 0,\n \"LastName\": \"\",\n \"Name2\": \"\",\n \"RestoredAt\": \"\",\n \"State\": \"\",\n \"Street\": \"\",\n \"Tel1\": \"\",\n \"Tel2\": \"\",\n \"Zip\": \"\"\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 \"AddressAddition\": \"\",\n \"AddressType\": 0,\n \"ArchivedAt\": \"\",\n \"City\": \"\",\n \"Company\": \"\",\n \"CountryCode\": \"\",\n \"CustomerId\": 0,\n \"Email\": \"\",\n \"Fax\": \"\",\n \"FirstName\": \"\",\n \"Housenumber\": \"\",\n \"Id\": 0,\n \"LastName\": \"\",\n \"Name2\": \"\",\n \"RestoredAt\": \"\",\n \"State\": \"\",\n \"Street\": \"\",\n \"Tel1\": \"\",\n \"Tel2\": \"\",\n \"Zip\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/api/v1/customers/addresses/:id")
.put(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/api/v1/customers/addresses/:id")
.header("content-type", "application/json")
.body("{\n \"AddressAddition\": \"\",\n \"AddressType\": 0,\n \"ArchivedAt\": \"\",\n \"City\": \"\",\n \"Company\": \"\",\n \"CountryCode\": \"\",\n \"CustomerId\": 0,\n \"Email\": \"\",\n \"Fax\": \"\",\n \"FirstName\": \"\",\n \"Housenumber\": \"\",\n \"Id\": 0,\n \"LastName\": \"\",\n \"Name2\": \"\",\n \"RestoredAt\": \"\",\n \"State\": \"\",\n \"Street\": \"\",\n \"Tel1\": \"\",\n \"Tel2\": \"\",\n \"Zip\": \"\"\n}")
.asString();
const data = JSON.stringify({
AddressAddition: '',
AddressType: 0,
ArchivedAt: '',
City: '',
Company: '',
CountryCode: '',
CustomerId: 0,
Email: '',
Fax: '',
FirstName: '',
Housenumber: '',
Id: 0,
LastName: '',
Name2: '',
RestoredAt: '',
State: '',
Street: '',
Tel1: '',
Tel2: '',
Zip: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/api/v1/customers/addresses/:id');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/api/v1/customers/addresses/:id',
headers: {'content-type': 'application/json'},
data: {
AddressAddition: '',
AddressType: 0,
ArchivedAt: '',
City: '',
Company: '',
CountryCode: '',
CustomerId: 0,
Email: '',
Fax: '',
FirstName: '',
Housenumber: '',
Id: 0,
LastName: '',
Name2: '',
RestoredAt: '',
State: '',
Street: '',
Tel1: '',
Tel2: '',
Zip: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/v1/customers/addresses/:id';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"AddressAddition":"","AddressType":0,"ArchivedAt":"","City":"","Company":"","CountryCode":"","CustomerId":0,"Email":"","Fax":"","FirstName":"","Housenumber":"","Id":0,"LastName":"","Name2":"","RestoredAt":"","State":"","Street":"","Tel1":"","Tel2":"","Zip":""}'
};
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}}/api/v1/customers/addresses/:id',
method: 'PUT',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "AddressAddition": "",\n "AddressType": 0,\n "ArchivedAt": "",\n "City": "",\n "Company": "",\n "CountryCode": "",\n "CustomerId": 0,\n "Email": "",\n "Fax": "",\n "FirstName": "",\n "Housenumber": "",\n "Id": 0,\n "LastName": "",\n "Name2": "",\n "RestoredAt": "",\n "State": "",\n "Street": "",\n "Tel1": "",\n "Tel2": "",\n "Zip": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"AddressAddition\": \"\",\n \"AddressType\": 0,\n \"ArchivedAt\": \"\",\n \"City\": \"\",\n \"Company\": \"\",\n \"CountryCode\": \"\",\n \"CustomerId\": 0,\n \"Email\": \"\",\n \"Fax\": \"\",\n \"FirstName\": \"\",\n \"Housenumber\": \"\",\n \"Id\": 0,\n \"LastName\": \"\",\n \"Name2\": \"\",\n \"RestoredAt\": \"\",\n \"State\": \"\",\n \"Street\": \"\",\n \"Tel1\": \"\",\n \"Tel2\": \"\",\n \"Zip\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/api/v1/customers/addresses/: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/api/v1/customers/addresses/: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({
AddressAddition: '',
AddressType: 0,
ArchivedAt: '',
City: '',
Company: '',
CountryCode: '',
CustomerId: 0,
Email: '',
Fax: '',
FirstName: '',
Housenumber: '',
Id: 0,
LastName: '',
Name2: '',
RestoredAt: '',
State: '',
Street: '',
Tel1: '',
Tel2: '',
Zip: ''
}));
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/api/v1/customers/addresses/:id',
headers: {'content-type': 'application/json'},
body: {
AddressAddition: '',
AddressType: 0,
ArchivedAt: '',
City: '',
Company: '',
CountryCode: '',
CustomerId: 0,
Email: '',
Fax: '',
FirstName: '',
Housenumber: '',
Id: 0,
LastName: '',
Name2: '',
RestoredAt: '',
State: '',
Street: '',
Tel1: '',
Tel2: '',
Zip: ''
},
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}}/api/v1/customers/addresses/:id');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
AddressAddition: '',
AddressType: 0,
ArchivedAt: '',
City: '',
Company: '',
CountryCode: '',
CustomerId: 0,
Email: '',
Fax: '',
FirstName: '',
Housenumber: '',
Id: 0,
LastName: '',
Name2: '',
RestoredAt: '',
State: '',
Street: '',
Tel1: '',
Tel2: '',
Zip: ''
});
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}}/api/v1/customers/addresses/:id',
headers: {'content-type': 'application/json'},
data: {
AddressAddition: '',
AddressType: 0,
ArchivedAt: '',
City: '',
Company: '',
CountryCode: '',
CustomerId: 0,
Email: '',
Fax: '',
FirstName: '',
Housenumber: '',
Id: 0,
LastName: '',
Name2: '',
RestoredAt: '',
State: '',
Street: '',
Tel1: '',
Tel2: '',
Zip: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/v1/customers/addresses/:id';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"AddressAddition":"","AddressType":0,"ArchivedAt":"","City":"","Company":"","CountryCode":"","CustomerId":0,"Email":"","Fax":"","FirstName":"","Housenumber":"","Id":0,"LastName":"","Name2":"","RestoredAt":"","State":"","Street":"","Tel1":"","Tel2":"","Zip":""}'
};
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 = @{ @"AddressAddition": @"",
@"AddressType": @0,
@"ArchivedAt": @"",
@"City": @"",
@"Company": @"",
@"CountryCode": @"",
@"CustomerId": @0,
@"Email": @"",
@"Fax": @"",
@"FirstName": @"",
@"Housenumber": @"",
@"Id": @0,
@"LastName": @"",
@"Name2": @"",
@"RestoredAt": @"",
@"State": @"",
@"Street": @"",
@"Tel1": @"",
@"Tel2": @"",
@"Zip": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/api/v1/customers/addresses/: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}}/api/v1/customers/addresses/:id" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"AddressAddition\": \"\",\n \"AddressType\": 0,\n \"ArchivedAt\": \"\",\n \"City\": \"\",\n \"Company\": \"\",\n \"CountryCode\": \"\",\n \"CustomerId\": 0,\n \"Email\": \"\",\n \"Fax\": \"\",\n \"FirstName\": \"\",\n \"Housenumber\": \"\",\n \"Id\": 0,\n \"LastName\": \"\",\n \"Name2\": \"\",\n \"RestoredAt\": \"\",\n \"State\": \"\",\n \"Street\": \"\",\n \"Tel1\": \"\",\n \"Tel2\": \"\",\n \"Zip\": \"\"\n}" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/v1/customers/addresses/: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([
'AddressAddition' => '',
'AddressType' => 0,
'ArchivedAt' => '',
'City' => '',
'Company' => '',
'CountryCode' => '',
'CustomerId' => 0,
'Email' => '',
'Fax' => '',
'FirstName' => '',
'Housenumber' => '',
'Id' => 0,
'LastName' => '',
'Name2' => '',
'RestoredAt' => '',
'State' => '',
'Street' => '',
'Tel1' => '',
'Tel2' => '',
'Zip' => ''
]),
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}}/api/v1/customers/addresses/:id', [
'body' => '{
"AddressAddition": "",
"AddressType": 0,
"ArchivedAt": "",
"City": "",
"Company": "",
"CountryCode": "",
"CustomerId": 0,
"Email": "",
"Fax": "",
"FirstName": "",
"Housenumber": "",
"Id": 0,
"LastName": "",
"Name2": "",
"RestoredAt": "",
"State": "",
"Street": "",
"Tel1": "",
"Tel2": "",
"Zip": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/api/v1/customers/addresses/:id');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'AddressAddition' => '',
'AddressType' => 0,
'ArchivedAt' => '',
'City' => '',
'Company' => '',
'CountryCode' => '',
'CustomerId' => 0,
'Email' => '',
'Fax' => '',
'FirstName' => '',
'Housenumber' => '',
'Id' => 0,
'LastName' => '',
'Name2' => '',
'RestoredAt' => '',
'State' => '',
'Street' => '',
'Tel1' => '',
'Tel2' => '',
'Zip' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'AddressAddition' => '',
'AddressType' => 0,
'ArchivedAt' => '',
'City' => '',
'Company' => '',
'CountryCode' => '',
'CustomerId' => 0,
'Email' => '',
'Fax' => '',
'FirstName' => '',
'Housenumber' => '',
'Id' => 0,
'LastName' => '',
'Name2' => '',
'RestoredAt' => '',
'State' => '',
'Street' => '',
'Tel1' => '',
'Tel2' => '',
'Zip' => ''
]));
$request->setRequestUrl('{{baseUrl}}/api/v1/customers/addresses/: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}}/api/v1/customers/addresses/:id' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"AddressAddition": "",
"AddressType": 0,
"ArchivedAt": "",
"City": "",
"Company": "",
"CountryCode": "",
"CustomerId": 0,
"Email": "",
"Fax": "",
"FirstName": "",
"Housenumber": "",
"Id": 0,
"LastName": "",
"Name2": "",
"RestoredAt": "",
"State": "",
"Street": "",
"Tel1": "",
"Tel2": "",
"Zip": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/v1/customers/addresses/:id' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"AddressAddition": "",
"AddressType": 0,
"ArchivedAt": "",
"City": "",
"Company": "",
"CountryCode": "",
"CustomerId": 0,
"Email": "",
"Fax": "",
"FirstName": "",
"Housenumber": "",
"Id": 0,
"LastName": "",
"Name2": "",
"RestoredAt": "",
"State": "",
"Street": "",
"Tel1": "",
"Tel2": "",
"Zip": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"AddressAddition\": \"\",\n \"AddressType\": 0,\n \"ArchivedAt\": \"\",\n \"City\": \"\",\n \"Company\": \"\",\n \"CountryCode\": \"\",\n \"CustomerId\": 0,\n \"Email\": \"\",\n \"Fax\": \"\",\n \"FirstName\": \"\",\n \"Housenumber\": \"\",\n \"Id\": 0,\n \"LastName\": \"\",\n \"Name2\": \"\",\n \"RestoredAt\": \"\",\n \"State\": \"\",\n \"Street\": \"\",\n \"Tel1\": \"\",\n \"Tel2\": \"\",\n \"Zip\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("PUT", "/baseUrl/api/v1/customers/addresses/:id", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/v1/customers/addresses/:id"
payload = {
"AddressAddition": "",
"AddressType": 0,
"ArchivedAt": "",
"City": "",
"Company": "",
"CountryCode": "",
"CustomerId": 0,
"Email": "",
"Fax": "",
"FirstName": "",
"Housenumber": "",
"Id": 0,
"LastName": "",
"Name2": "",
"RestoredAt": "",
"State": "",
"Street": "",
"Tel1": "",
"Tel2": "",
"Zip": ""
}
headers = {"content-type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/v1/customers/addresses/:id"
payload <- "{\n \"AddressAddition\": \"\",\n \"AddressType\": 0,\n \"ArchivedAt\": \"\",\n \"City\": \"\",\n \"Company\": \"\",\n \"CountryCode\": \"\",\n \"CustomerId\": 0,\n \"Email\": \"\",\n \"Fax\": \"\",\n \"FirstName\": \"\",\n \"Housenumber\": \"\",\n \"Id\": 0,\n \"LastName\": \"\",\n \"Name2\": \"\",\n \"RestoredAt\": \"\",\n \"State\": \"\",\n \"Street\": \"\",\n \"Tel1\": \"\",\n \"Tel2\": \"\",\n \"Zip\": \"\"\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}}/api/v1/customers/addresses/: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 \"AddressAddition\": \"\",\n \"AddressType\": 0,\n \"ArchivedAt\": \"\",\n \"City\": \"\",\n \"Company\": \"\",\n \"CountryCode\": \"\",\n \"CustomerId\": 0,\n \"Email\": \"\",\n \"Fax\": \"\",\n \"FirstName\": \"\",\n \"Housenumber\": \"\",\n \"Id\": 0,\n \"LastName\": \"\",\n \"Name2\": \"\",\n \"RestoredAt\": \"\",\n \"State\": \"\",\n \"Street\": \"\",\n \"Tel1\": \"\",\n \"Tel2\": \"\",\n \"Zip\": \"\"\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/api/v1/customers/addresses/:id') do |req|
req.body = "{\n \"AddressAddition\": \"\",\n \"AddressType\": 0,\n \"ArchivedAt\": \"\",\n \"City\": \"\",\n \"Company\": \"\",\n \"CountryCode\": \"\",\n \"CustomerId\": 0,\n \"Email\": \"\",\n \"Fax\": \"\",\n \"FirstName\": \"\",\n \"Housenumber\": \"\",\n \"Id\": 0,\n \"LastName\": \"\",\n \"Name2\": \"\",\n \"RestoredAt\": \"\",\n \"State\": \"\",\n \"Street\": \"\",\n \"Tel1\": \"\",\n \"Tel2\": \"\",\n \"Zip\": \"\"\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}}/api/v1/customers/addresses/:id";
let payload = json!({
"AddressAddition": "",
"AddressType": 0,
"ArchivedAt": "",
"City": "",
"Company": "",
"CountryCode": "",
"CustomerId": 0,
"Email": "",
"Fax": "",
"FirstName": "",
"Housenumber": "",
"Id": 0,
"LastName": "",
"Name2": "",
"RestoredAt": "",
"State": "",
"Street": "",
"Tel1": "",
"Tel2": "",
"Zip": ""
});
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}}/api/v1/customers/addresses/:id \
--header 'content-type: application/json' \
--data '{
"AddressAddition": "",
"AddressType": 0,
"ArchivedAt": "",
"City": "",
"Company": "",
"CountryCode": "",
"CustomerId": 0,
"Email": "",
"Fax": "",
"FirstName": "",
"Housenumber": "",
"Id": 0,
"LastName": "",
"Name2": "",
"RestoredAt": "",
"State": "",
"Street": "",
"Tel1": "",
"Tel2": "",
"Zip": ""
}'
echo '{
"AddressAddition": "",
"AddressType": 0,
"ArchivedAt": "",
"City": "",
"Company": "",
"CountryCode": "",
"CustomerId": 0,
"Email": "",
"Fax": "",
"FirstName": "",
"Housenumber": "",
"Id": 0,
"LastName": "",
"Name2": "",
"RestoredAt": "",
"State": "",
"Street": "",
"Tel1": "",
"Tel2": "",
"Zip": ""
}' | \
http PUT {{baseUrl}}/api/v1/customers/addresses/:id \
content-type:application/json
wget --quiet \
--method PUT \
--header 'content-type: application/json' \
--body-data '{\n "AddressAddition": "",\n "AddressType": 0,\n "ArchivedAt": "",\n "City": "",\n "Company": "",\n "CountryCode": "",\n "CustomerId": 0,\n "Email": "",\n "Fax": "",\n "FirstName": "",\n "Housenumber": "",\n "Id": 0,\n "LastName": "",\n "Name2": "",\n "RestoredAt": "",\n "State": "",\n "Street": "",\n "Tel1": "",\n "Tel2": "",\n "Zip": ""\n}' \
--output-document \
- {{baseUrl}}/api/v1/customers/addresses/:id
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"AddressAddition": "",
"AddressType": 0,
"ArchivedAt": "",
"City": "",
"Company": "",
"CountryCode": "",
"CustomerId": 0,
"Email": "",
"Fax": "",
"FirstName": "",
"Housenumber": "",
"Id": 0,
"LastName": "",
"Name2": "",
"RestoredAt": "",
"State": "",
"Street": "",
"Tel1": "",
"Tel2": "",
"Zip": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/v1/customers/addresses/: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()
PATCH
Updates one or more fields of an address
{{baseUrl}}/api/v1/customers/addresses/:id
QUERY PARAMS
id
BODY json
{}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/v1/customers/addresses/: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, "{}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/patch "{{baseUrl}}/api/v1/customers/addresses/:id" {:content-type :json})
require "http/client"
url = "{{baseUrl}}/api/v1/customers/addresses/:id"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{}"
response = HTTP::Client.patch url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Patch,
RequestUri = new Uri("{{baseUrl}}/api/v1/customers/addresses/:id"),
Content = new StringContent("{}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/api/v1/customers/addresses/:id");
var request = new RestRequest("", Method.Patch);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/v1/customers/addresses/:id"
payload := strings.NewReader("{}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
PATCH /baseUrl/api/v1/customers/addresses/:id HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 2
{}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PATCH", "{{baseUrl}}/api/v1/customers/addresses/:id")
.setHeader("content-type", "application/json")
.setBody("{}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/v1/customers/addresses/:id"))
.header("content-type", "application/json")
.method("PATCH", HttpRequest.BodyPublishers.ofString("{}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{}");
Request request = new Request.Builder()
.url("{{baseUrl}}/api/v1/customers/addresses/:id")
.patch(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.patch("{{baseUrl}}/api/v1/customers/addresses/:id")
.header("content-type", "application/json")
.body("{}")
.asString();
const data = JSON.stringify({});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PATCH', '{{baseUrl}}/api/v1/customers/addresses/:id');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PATCH',
url: '{{baseUrl}}/api/v1/customers/addresses/:id',
headers: {'content-type': 'application/json'},
data: {}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/v1/customers/addresses/:id';
const options = {method: 'PATCH', headers: {'content-type': 'application/json'}, body: '{}'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/api/v1/customers/addresses/:id',
method: 'PATCH',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{}")
val request = Request.Builder()
.url("{{baseUrl}}/api/v1/customers/addresses/:id")
.patch(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PATCH',
hostname: 'example.com',
port: null,
path: '/baseUrl/api/v1/customers/addresses/: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({}));
req.end();
const request = require('request');
const options = {
method: 'PATCH',
url: '{{baseUrl}}/api/v1/customers/addresses/:id',
headers: {'content-type': 'application/json'},
body: {},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PATCH', '{{baseUrl}}/api/v1/customers/addresses/:id');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PATCH',
url: '{{baseUrl}}/api/v1/customers/addresses/:id',
headers: {'content-type': 'application/json'},
data: {}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/v1/customers/addresses/:id';
const options = {method: 'PATCH', headers: {'content-type': 'application/json'}, body: '{}'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/api/v1/customers/addresses/:id"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PATCH"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/api/v1/customers/addresses/:id" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{}" in
Client.call ~headers ~body `PATCH uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/v1/customers/addresses/:id",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('PATCH', '{{baseUrl}}/api/v1/customers/addresses/:id', [
'body' => '{}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/api/v1/customers/addresses/:id');
$request->setMethod(HttpRequest::HTTP_METH_PATCH);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
]));
$request->setRequestUrl('{{baseUrl}}/api/v1/customers/addresses/:id');
$request->setRequestMethod('PATCH');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/api/v1/customers/addresses/:id' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/v1/customers/addresses/:id' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{}"
headers = { 'content-type': "application/json" }
conn.request("PATCH", "/baseUrl/api/v1/customers/addresses/:id", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/v1/customers/addresses/:id"
payload = {}
headers = {"content-type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/v1/customers/addresses/:id"
payload <- "{}"
encode <- "json"
response <- VERB("PATCH", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/api/v1/customers/addresses/:id")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["content-type"] = 'application/json'
request.body = "{}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.patch('/baseUrl/api/v1/customers/addresses/:id') do |req|
req.body = "{}"
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}}/api/v1/customers/addresses/:id";
let payload = json!({});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PATCH").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PATCH \
--url {{baseUrl}}/api/v1/customers/addresses/:id \
--header 'content-type: application/json' \
--data '{}'
echo '{}' | \
http PATCH {{baseUrl}}/api/v1/customers/addresses/:id \
content-type:application/json
wget --quiet \
--method PATCH \
--header 'content-type: application/json' \
--body-data '{}' \
--output-document \
- {{baseUrl}}/api/v1/customers/addresses/:id
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/v1/customers/addresses/:id")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PATCH"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
Returns a list with all defined orderstates
{{baseUrl}}/api/v1/enums/orderstates
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/v1/enums/orderstates");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/api/v1/enums/orderstates")
require "http/client"
url = "{{baseUrl}}/api/v1/enums/orderstates"
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}}/api/v1/enums/orderstates"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/api/v1/enums/orderstates");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/v1/enums/orderstates"
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/api/v1/enums/orderstates HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/api/v1/enums/orderstates")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/v1/enums/orderstates"))
.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}}/api/v1/enums/orderstates")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/api/v1/enums/orderstates")
.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}}/api/v1/enums/orderstates');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/api/v1/enums/orderstates'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/v1/enums/orderstates';
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}}/api/v1/enums/orderstates',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/api/v1/enums/orderstates")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/api/v1/enums/orderstates',
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}}/api/v1/enums/orderstates'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/api/v1/enums/orderstates');
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}}/api/v1/enums/orderstates'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/v1/enums/orderstates';
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}}/api/v1/enums/orderstates"]
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}}/api/v1/enums/orderstates" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/v1/enums/orderstates",
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}}/api/v1/enums/orderstates');
echo $response->getBody();
setUrl('{{baseUrl}}/api/v1/enums/orderstates');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/api/v1/enums/orderstates');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/api/v1/enums/orderstates' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/v1/enums/orderstates' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/api/v1/enums/orderstates")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/v1/enums/orderstates"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/v1/enums/orderstates"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/api/v1/enums/orderstates")
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/api/v1/enums/orderstates') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/api/v1/enums/orderstates";
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}}/api/v1/enums/orderstates
http GET {{baseUrl}}/api/v1/enums/orderstates
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/api/v1/enums/orderstates
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/v1/enums/orderstates")! 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
Returns a list with all defined paymenttypes
{{baseUrl}}/api/v1/enums/paymenttypes
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/v1/enums/paymenttypes");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/api/v1/enums/paymenttypes")
require "http/client"
url = "{{baseUrl}}/api/v1/enums/paymenttypes"
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}}/api/v1/enums/paymenttypes"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/api/v1/enums/paymenttypes");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/v1/enums/paymenttypes"
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/api/v1/enums/paymenttypes HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/api/v1/enums/paymenttypes")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/v1/enums/paymenttypes"))
.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}}/api/v1/enums/paymenttypes")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/api/v1/enums/paymenttypes")
.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}}/api/v1/enums/paymenttypes');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/api/v1/enums/paymenttypes'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/v1/enums/paymenttypes';
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}}/api/v1/enums/paymenttypes',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/api/v1/enums/paymenttypes")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/api/v1/enums/paymenttypes',
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}}/api/v1/enums/paymenttypes'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/api/v1/enums/paymenttypes');
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}}/api/v1/enums/paymenttypes'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/v1/enums/paymenttypes';
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}}/api/v1/enums/paymenttypes"]
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}}/api/v1/enums/paymenttypes" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/v1/enums/paymenttypes",
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}}/api/v1/enums/paymenttypes');
echo $response->getBody();
setUrl('{{baseUrl}}/api/v1/enums/paymenttypes');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/api/v1/enums/paymenttypes');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/api/v1/enums/paymenttypes' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/v1/enums/paymenttypes' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/api/v1/enums/paymenttypes")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/v1/enums/paymenttypes"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/v1/enums/paymenttypes"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/api/v1/enums/paymenttypes")
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/api/v1/enums/paymenttypes') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/api/v1/enums/paymenttypes";
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}}/api/v1/enums/paymenttypes
http GET {{baseUrl}}/api/v1/enums/paymenttypes
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/api/v1/enums/paymenttypes
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/v1/enums/paymenttypes")! 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
Returns a list with all defined shipmenttypes
{{baseUrl}}/api/v1/enums/shipmenttypes
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/v1/enums/shipmenttypes");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/api/v1/enums/shipmenttypes")
require "http/client"
url = "{{baseUrl}}/api/v1/enums/shipmenttypes"
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}}/api/v1/enums/shipmenttypes"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/api/v1/enums/shipmenttypes");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/v1/enums/shipmenttypes"
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/api/v1/enums/shipmenttypes HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/api/v1/enums/shipmenttypes")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/v1/enums/shipmenttypes"))
.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}}/api/v1/enums/shipmenttypes")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/api/v1/enums/shipmenttypes")
.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}}/api/v1/enums/shipmenttypes');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/api/v1/enums/shipmenttypes'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/v1/enums/shipmenttypes';
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}}/api/v1/enums/shipmenttypes',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/api/v1/enums/shipmenttypes")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/api/v1/enums/shipmenttypes',
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}}/api/v1/enums/shipmenttypes'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/api/v1/enums/shipmenttypes');
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}}/api/v1/enums/shipmenttypes'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/v1/enums/shipmenttypes';
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}}/api/v1/enums/shipmenttypes"]
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}}/api/v1/enums/shipmenttypes" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/v1/enums/shipmenttypes",
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}}/api/v1/enums/shipmenttypes');
echo $response->getBody();
setUrl('{{baseUrl}}/api/v1/enums/shipmenttypes');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/api/v1/enums/shipmenttypes');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/api/v1/enums/shipmenttypes' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/v1/enums/shipmenttypes' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/api/v1/enums/shipmenttypes")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/v1/enums/shipmenttypes"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/v1/enums/shipmenttypes"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/api/v1/enums/shipmenttypes")
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/api/v1/enums/shipmenttypes') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/api/v1/enums/shipmenttypes";
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}}/api/v1/enums/shipmenttypes
http GET {{baseUrl}}/api/v1/enums/shipmenttypes
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/api/v1/enums/shipmenttypes
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/v1/enums/shipmenttypes")! 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
Returns a list with all defined shippingcarriers
{{baseUrl}}/api/v1/enums/shippingcarriers
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/v1/enums/shippingcarriers");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/api/v1/enums/shippingcarriers")
require "http/client"
url = "{{baseUrl}}/api/v1/enums/shippingcarriers"
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}}/api/v1/enums/shippingcarriers"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/api/v1/enums/shippingcarriers");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/v1/enums/shippingcarriers"
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/api/v1/enums/shippingcarriers HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/api/v1/enums/shippingcarriers")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/v1/enums/shippingcarriers"))
.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}}/api/v1/enums/shippingcarriers")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/api/v1/enums/shippingcarriers")
.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}}/api/v1/enums/shippingcarriers');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/api/v1/enums/shippingcarriers'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/v1/enums/shippingcarriers';
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}}/api/v1/enums/shippingcarriers',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/api/v1/enums/shippingcarriers")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/api/v1/enums/shippingcarriers',
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}}/api/v1/enums/shippingcarriers'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/api/v1/enums/shippingcarriers');
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}}/api/v1/enums/shippingcarriers'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/v1/enums/shippingcarriers';
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}}/api/v1/enums/shippingcarriers"]
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}}/api/v1/enums/shippingcarriers" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/v1/enums/shippingcarriers",
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}}/api/v1/enums/shippingcarriers');
echo $response->getBody();
setUrl('{{baseUrl}}/api/v1/enums/shippingcarriers');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/api/v1/enums/shippingcarriers');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/api/v1/enums/shippingcarriers' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/v1/enums/shippingcarriers' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/api/v1/enums/shippingcarriers")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/v1/enums/shippingcarriers"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/v1/enums/shippingcarriers"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/api/v1/enums/shippingcarriers")
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/api/v1/enums/shippingcarriers') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/api/v1/enums/shippingcarriers";
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}}/api/v1/enums/shippingcarriers
http GET {{baseUrl}}/api/v1/enums/shippingcarriers
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/api/v1/enums/shippingcarriers
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/v1/enums/shippingcarriers")! 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
Get a list of all events optionally filtered by date. This request is extra throttled to 2 calls per page per hour.
{{baseUrl}}/api/v1/events
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/v1/events");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/api/v1/events")
require "http/client"
url = "{{baseUrl}}/api/v1/events"
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}}/api/v1/events"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/api/v1/events");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/v1/events"
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/api/v1/events HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/api/v1/events")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/v1/events"))
.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}}/api/v1/events")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/api/v1/events")
.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}}/api/v1/events');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/api/v1/events'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/v1/events';
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}}/api/v1/events',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/api/v1/events")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/api/v1/events',
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}}/api/v1/events'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/api/v1/events');
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}}/api/v1/events'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/v1/events';
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}}/api/v1/events"]
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}}/api/v1/events" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/v1/events",
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}}/api/v1/events');
echo $response->getBody();
setUrl('{{baseUrl}}/api/v1/events');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/api/v1/events');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/api/v1/events' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/v1/events' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/api/v1/events")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/v1/events"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/v1/events"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/api/v1/events")
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/api/v1/events') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/api/v1/events";
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}}/api/v1/events
http GET {{baseUrl}}/api/v1/events
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/api/v1/events
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/v1/events")! 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
Add a shipment to a given order
{{baseUrl}}/api/v1/orders/:id/shipment
QUERY PARAMS
id
BODY json
{
"CarrierId": 0,
"Comment": "",
"OrderId": "",
"ShipmentType": 0,
"ShippingId": "",
"ShippingProviderId": 0,
"ShippingProviderProductId": 0
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/v1/orders/:id/shipment");
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 \"CarrierId\": 0,\n \"Comment\": \"\",\n \"OrderId\": \"\",\n \"ShipmentType\": 0,\n \"ShippingId\": \"\",\n \"ShippingProviderId\": 0,\n \"ShippingProviderProductId\": 0\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/api/v1/orders/:id/shipment" {:content-type :json
:form-params {:CarrierId 0
:Comment ""
:OrderId ""
:ShipmentType 0
:ShippingId ""
:ShippingProviderId 0
:ShippingProviderProductId 0}})
require "http/client"
url = "{{baseUrl}}/api/v1/orders/:id/shipment"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"CarrierId\": 0,\n \"Comment\": \"\",\n \"OrderId\": \"\",\n \"ShipmentType\": 0,\n \"ShippingId\": \"\",\n \"ShippingProviderId\": 0,\n \"ShippingProviderProductId\": 0\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}}/api/v1/orders/:id/shipment"),
Content = new StringContent("{\n \"CarrierId\": 0,\n \"Comment\": \"\",\n \"OrderId\": \"\",\n \"ShipmentType\": 0,\n \"ShippingId\": \"\",\n \"ShippingProviderId\": 0,\n \"ShippingProviderProductId\": 0\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}}/api/v1/orders/:id/shipment");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"CarrierId\": 0,\n \"Comment\": \"\",\n \"OrderId\": \"\",\n \"ShipmentType\": 0,\n \"ShippingId\": \"\",\n \"ShippingProviderId\": 0,\n \"ShippingProviderProductId\": 0\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/v1/orders/:id/shipment"
payload := strings.NewReader("{\n \"CarrierId\": 0,\n \"Comment\": \"\",\n \"OrderId\": \"\",\n \"ShipmentType\": 0,\n \"ShippingId\": \"\",\n \"ShippingProviderId\": 0,\n \"ShippingProviderProductId\": 0\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/api/v1/orders/:id/shipment HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 156
{
"CarrierId": 0,
"Comment": "",
"OrderId": "",
"ShipmentType": 0,
"ShippingId": "",
"ShippingProviderId": 0,
"ShippingProviderProductId": 0
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/api/v1/orders/:id/shipment")
.setHeader("content-type", "application/json")
.setBody("{\n \"CarrierId\": 0,\n \"Comment\": \"\",\n \"OrderId\": \"\",\n \"ShipmentType\": 0,\n \"ShippingId\": \"\",\n \"ShippingProviderId\": 0,\n \"ShippingProviderProductId\": 0\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/v1/orders/:id/shipment"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"CarrierId\": 0,\n \"Comment\": \"\",\n \"OrderId\": \"\",\n \"ShipmentType\": 0,\n \"ShippingId\": \"\",\n \"ShippingProviderId\": 0,\n \"ShippingProviderProductId\": 0\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 \"CarrierId\": 0,\n \"Comment\": \"\",\n \"OrderId\": \"\",\n \"ShipmentType\": 0,\n \"ShippingId\": \"\",\n \"ShippingProviderId\": 0,\n \"ShippingProviderProductId\": 0\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/api/v1/orders/:id/shipment")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/api/v1/orders/:id/shipment")
.header("content-type", "application/json")
.body("{\n \"CarrierId\": 0,\n \"Comment\": \"\",\n \"OrderId\": \"\",\n \"ShipmentType\": 0,\n \"ShippingId\": \"\",\n \"ShippingProviderId\": 0,\n \"ShippingProviderProductId\": 0\n}")
.asString();
const data = JSON.stringify({
CarrierId: 0,
Comment: '',
OrderId: '',
ShipmentType: 0,
ShippingId: '',
ShippingProviderId: 0,
ShippingProviderProductId: 0
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/api/v1/orders/:id/shipment');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/api/v1/orders/:id/shipment',
headers: {'content-type': 'application/json'},
data: {
CarrierId: 0,
Comment: '',
OrderId: '',
ShipmentType: 0,
ShippingId: '',
ShippingProviderId: 0,
ShippingProviderProductId: 0
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/v1/orders/:id/shipment';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"CarrierId":0,"Comment":"","OrderId":"","ShipmentType":0,"ShippingId":"","ShippingProviderId":0,"ShippingProviderProductId":0}'
};
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}}/api/v1/orders/:id/shipment',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "CarrierId": 0,\n "Comment": "",\n "OrderId": "",\n "ShipmentType": 0,\n "ShippingId": "",\n "ShippingProviderId": 0,\n "ShippingProviderProductId": 0\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"CarrierId\": 0,\n \"Comment\": \"\",\n \"OrderId\": \"\",\n \"ShipmentType\": 0,\n \"ShippingId\": \"\",\n \"ShippingProviderId\": 0,\n \"ShippingProviderProductId\": 0\n}")
val request = Request.Builder()
.url("{{baseUrl}}/api/v1/orders/:id/shipment")
.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/api/v1/orders/:id/shipment',
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({
CarrierId: 0,
Comment: '',
OrderId: '',
ShipmentType: 0,
ShippingId: '',
ShippingProviderId: 0,
ShippingProviderProductId: 0
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/api/v1/orders/:id/shipment',
headers: {'content-type': 'application/json'},
body: {
CarrierId: 0,
Comment: '',
OrderId: '',
ShipmentType: 0,
ShippingId: '',
ShippingProviderId: 0,
ShippingProviderProductId: 0
},
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}}/api/v1/orders/:id/shipment');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
CarrierId: 0,
Comment: '',
OrderId: '',
ShipmentType: 0,
ShippingId: '',
ShippingProviderId: 0,
ShippingProviderProductId: 0
});
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}}/api/v1/orders/:id/shipment',
headers: {'content-type': 'application/json'},
data: {
CarrierId: 0,
Comment: '',
OrderId: '',
ShipmentType: 0,
ShippingId: '',
ShippingProviderId: 0,
ShippingProviderProductId: 0
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/v1/orders/:id/shipment';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"CarrierId":0,"Comment":"","OrderId":"","ShipmentType":0,"ShippingId":"","ShippingProviderId":0,"ShippingProviderProductId":0}'
};
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 = @{ @"CarrierId": @0,
@"Comment": @"",
@"OrderId": @"",
@"ShipmentType": @0,
@"ShippingId": @"",
@"ShippingProviderId": @0,
@"ShippingProviderProductId": @0 };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/api/v1/orders/:id/shipment"]
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}}/api/v1/orders/:id/shipment" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"CarrierId\": 0,\n \"Comment\": \"\",\n \"OrderId\": \"\",\n \"ShipmentType\": 0,\n \"ShippingId\": \"\",\n \"ShippingProviderId\": 0,\n \"ShippingProviderProductId\": 0\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/v1/orders/:id/shipment",
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([
'CarrierId' => 0,
'Comment' => '',
'OrderId' => '',
'ShipmentType' => 0,
'ShippingId' => '',
'ShippingProviderId' => 0,
'ShippingProviderProductId' => 0
]),
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}}/api/v1/orders/:id/shipment', [
'body' => '{
"CarrierId": 0,
"Comment": "",
"OrderId": "",
"ShipmentType": 0,
"ShippingId": "",
"ShippingProviderId": 0,
"ShippingProviderProductId": 0
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/api/v1/orders/:id/shipment');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'CarrierId' => 0,
'Comment' => '',
'OrderId' => '',
'ShipmentType' => 0,
'ShippingId' => '',
'ShippingProviderId' => 0,
'ShippingProviderProductId' => 0
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'CarrierId' => 0,
'Comment' => '',
'OrderId' => '',
'ShipmentType' => 0,
'ShippingId' => '',
'ShippingProviderId' => 0,
'ShippingProviderProductId' => 0
]));
$request->setRequestUrl('{{baseUrl}}/api/v1/orders/:id/shipment');
$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}}/api/v1/orders/:id/shipment' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"CarrierId": 0,
"Comment": "",
"OrderId": "",
"ShipmentType": 0,
"ShippingId": "",
"ShippingProviderId": 0,
"ShippingProviderProductId": 0
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/v1/orders/:id/shipment' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"CarrierId": 0,
"Comment": "",
"OrderId": "",
"ShipmentType": 0,
"ShippingId": "",
"ShippingProviderId": 0,
"ShippingProviderProductId": 0
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"CarrierId\": 0,\n \"Comment\": \"\",\n \"OrderId\": \"\",\n \"ShipmentType\": 0,\n \"ShippingId\": \"\",\n \"ShippingProviderId\": 0,\n \"ShippingProviderProductId\": 0\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/api/v1/orders/:id/shipment", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/v1/orders/:id/shipment"
payload = {
"CarrierId": 0,
"Comment": "",
"OrderId": "",
"ShipmentType": 0,
"ShippingId": "",
"ShippingProviderId": 0,
"ShippingProviderProductId": 0
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/v1/orders/:id/shipment"
payload <- "{\n \"CarrierId\": 0,\n \"Comment\": \"\",\n \"OrderId\": \"\",\n \"ShipmentType\": 0,\n \"ShippingId\": \"\",\n \"ShippingProviderId\": 0,\n \"ShippingProviderProductId\": 0\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}}/api/v1/orders/:id/shipment")
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 \"CarrierId\": 0,\n \"Comment\": \"\",\n \"OrderId\": \"\",\n \"ShipmentType\": 0,\n \"ShippingId\": \"\",\n \"ShippingProviderId\": 0,\n \"ShippingProviderProductId\": 0\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/api/v1/orders/:id/shipment') do |req|
req.body = "{\n \"CarrierId\": 0,\n \"Comment\": \"\",\n \"OrderId\": \"\",\n \"ShipmentType\": 0,\n \"ShippingId\": \"\",\n \"ShippingProviderId\": 0,\n \"ShippingProviderProductId\": 0\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/api/v1/orders/:id/shipment";
let payload = json!({
"CarrierId": 0,
"Comment": "",
"OrderId": "",
"ShipmentType": 0,
"ShippingId": "",
"ShippingProviderId": 0,
"ShippingProviderProductId": 0
});
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}}/api/v1/orders/:id/shipment \
--header 'content-type: application/json' \
--data '{
"CarrierId": 0,
"Comment": "",
"OrderId": "",
"ShipmentType": 0,
"ShippingId": "",
"ShippingProviderId": 0,
"ShippingProviderProductId": 0
}'
echo '{
"CarrierId": 0,
"Comment": "",
"OrderId": "",
"ShipmentType": 0,
"ShippingId": "",
"ShippingProviderId": 0,
"ShippingProviderProductId": 0
}' | \
http POST {{baseUrl}}/api/v1/orders/:id/shipment \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "CarrierId": 0,\n "Comment": "",\n "OrderId": "",\n "ShipmentType": 0,\n "ShippingId": "",\n "ShippingProviderId": 0,\n "ShippingProviderProductId": 0\n}' \
--output-document \
- {{baseUrl}}/api/v1/orders/:id/shipment
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"CarrierId": 0,
"Comment": "",
"OrderId": "",
"ShipmentType": 0,
"ShippingId": "",
"ShippingProviderId": 0,
"ShippingProviderProductId": 0
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/v1/orders/:id/shipment")! 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
Attach one or more tags to an order
{{baseUrl}}/api/v1/orders/:id/tags
QUERY PARAMS
id
BODY json
{
"Tags": []
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/v1/orders/:id/tags");
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 \"Tags\": []\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/api/v1/orders/:id/tags" {:content-type :json
:form-params {:Tags []}})
require "http/client"
url = "{{baseUrl}}/api/v1/orders/:id/tags"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"Tags\": []\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}}/api/v1/orders/:id/tags"),
Content = new StringContent("{\n \"Tags\": []\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}}/api/v1/orders/:id/tags");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"Tags\": []\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/v1/orders/:id/tags"
payload := strings.NewReader("{\n \"Tags\": []\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/api/v1/orders/:id/tags HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 16
{
"Tags": []
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/api/v1/orders/:id/tags")
.setHeader("content-type", "application/json")
.setBody("{\n \"Tags\": []\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/v1/orders/:id/tags"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"Tags\": []\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 \"Tags\": []\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/api/v1/orders/:id/tags")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/api/v1/orders/:id/tags")
.header("content-type", "application/json")
.body("{\n \"Tags\": []\n}")
.asString();
const data = JSON.stringify({
Tags: []
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/api/v1/orders/:id/tags');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/api/v1/orders/:id/tags',
headers: {'content-type': 'application/json'},
data: {Tags: []}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/v1/orders/:id/tags';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"Tags":[]}'
};
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}}/api/v1/orders/:id/tags',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "Tags": []\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"Tags\": []\n}")
val request = Request.Builder()
.url("{{baseUrl}}/api/v1/orders/:id/tags")
.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/api/v1/orders/:id/tags',
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({Tags: []}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/api/v1/orders/:id/tags',
headers: {'content-type': 'application/json'},
body: {Tags: []},
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}}/api/v1/orders/:id/tags');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
Tags: []
});
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}}/api/v1/orders/:id/tags',
headers: {'content-type': 'application/json'},
data: {Tags: []}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/v1/orders/:id/tags';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"Tags":[]}'
};
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 = @{ @"Tags": @[ ] };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/api/v1/orders/:id/tags"]
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}}/api/v1/orders/:id/tags" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"Tags\": []\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/v1/orders/:id/tags",
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([
'Tags' => [
]
]),
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}}/api/v1/orders/:id/tags', [
'body' => '{
"Tags": []
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/api/v1/orders/:id/tags');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'Tags' => [
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'Tags' => [
]
]));
$request->setRequestUrl('{{baseUrl}}/api/v1/orders/:id/tags');
$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}}/api/v1/orders/:id/tags' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"Tags": []
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/v1/orders/:id/tags' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"Tags": []
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"Tags\": []\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/api/v1/orders/:id/tags", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/v1/orders/:id/tags"
payload = { "Tags": [] }
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/v1/orders/:id/tags"
payload <- "{\n \"Tags\": []\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}}/api/v1/orders/:id/tags")
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 \"Tags\": []\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/api/v1/orders/:id/tags') do |req|
req.body = "{\n \"Tags\": []\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/api/v1/orders/:id/tags";
let payload = json!({"Tags": ()});
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}}/api/v1/orders/:id/tags \
--header 'content-type: application/json' \
--data '{
"Tags": []
}'
echo '{
"Tags": []
}' | \
http POST {{baseUrl}}/api/v1/orders/:id/tags \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "Tags": []\n}' \
--output-document \
- {{baseUrl}}/api/v1/orders/:id/tags
import Foundation
let headers = ["content-type": "application/json"]
let parameters = ["Tags": []] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/v1/orders/:id/tags")! 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()
PUT
Changes the main state of a single order
{{baseUrl}}/api/v1/orders/:id/orderstate
QUERY PARAMS
id
BODY json
{
"NewStateId": 0
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/v1/orders/:id/orderstate");
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 \"NewStateId\": 0\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/api/v1/orders/:id/orderstate" {:content-type :json
:form-params {:NewStateId 0}})
require "http/client"
url = "{{baseUrl}}/api/v1/orders/:id/orderstate"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"NewStateId\": 0\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}}/api/v1/orders/:id/orderstate"),
Content = new StringContent("{\n \"NewStateId\": 0\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}}/api/v1/orders/:id/orderstate");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"NewStateId\": 0\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/v1/orders/:id/orderstate"
payload := strings.NewReader("{\n \"NewStateId\": 0\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/api/v1/orders/:id/orderstate HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 21
{
"NewStateId": 0
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/api/v1/orders/:id/orderstate")
.setHeader("content-type", "application/json")
.setBody("{\n \"NewStateId\": 0\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/v1/orders/:id/orderstate"))
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("{\n \"NewStateId\": 0\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 \"NewStateId\": 0\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/api/v1/orders/:id/orderstate")
.put(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/api/v1/orders/:id/orderstate")
.header("content-type", "application/json")
.body("{\n \"NewStateId\": 0\n}")
.asString();
const data = JSON.stringify({
NewStateId: 0
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/api/v1/orders/:id/orderstate');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/api/v1/orders/:id/orderstate',
headers: {'content-type': 'application/json'},
data: {NewStateId: 0}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/v1/orders/:id/orderstate';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"NewStateId":0}'
};
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}}/api/v1/orders/:id/orderstate',
method: 'PUT',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "NewStateId": 0\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"NewStateId\": 0\n}")
val request = Request.Builder()
.url("{{baseUrl}}/api/v1/orders/:id/orderstate")
.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/api/v1/orders/:id/orderstate',
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({NewStateId: 0}));
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/api/v1/orders/:id/orderstate',
headers: {'content-type': 'application/json'},
body: {NewStateId: 0},
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}}/api/v1/orders/:id/orderstate');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
NewStateId: 0
});
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}}/api/v1/orders/:id/orderstate',
headers: {'content-type': 'application/json'},
data: {NewStateId: 0}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/v1/orders/:id/orderstate';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"NewStateId":0}'
};
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 = @{ @"NewStateId": @0 };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/api/v1/orders/:id/orderstate"]
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}}/api/v1/orders/:id/orderstate" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"NewStateId\": 0\n}" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/v1/orders/:id/orderstate",
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([
'NewStateId' => 0
]),
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}}/api/v1/orders/:id/orderstate', [
'body' => '{
"NewStateId": 0
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/api/v1/orders/:id/orderstate');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'NewStateId' => 0
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'NewStateId' => 0
]));
$request->setRequestUrl('{{baseUrl}}/api/v1/orders/:id/orderstate');
$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}}/api/v1/orders/:id/orderstate' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"NewStateId": 0
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/v1/orders/:id/orderstate' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"NewStateId": 0
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"NewStateId\": 0\n}"
headers = { 'content-type': "application/json" }
conn.request("PUT", "/baseUrl/api/v1/orders/:id/orderstate", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/v1/orders/:id/orderstate"
payload = { "NewStateId": 0 }
headers = {"content-type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/v1/orders/:id/orderstate"
payload <- "{\n \"NewStateId\": 0\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}}/api/v1/orders/:id/orderstate")
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 \"NewStateId\": 0\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/api/v1/orders/:id/orderstate') do |req|
req.body = "{\n \"NewStateId\": 0\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}}/api/v1/orders/:id/orderstate";
let payload = json!({"NewStateId": 0});
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}}/api/v1/orders/:id/orderstate \
--header 'content-type: application/json' \
--data '{
"NewStateId": 0
}'
echo '{
"NewStateId": 0
}' | \
http PUT {{baseUrl}}/api/v1/orders/:id/orderstate \
content-type:application/json
wget --quiet \
--method PUT \
--header 'content-type: application/json' \
--body-data '{\n "NewStateId": 0\n}' \
--output-document \
- {{baseUrl}}/api/v1/orders/:id/orderstate
import Foundation
let headers = ["content-type": "application/json"]
let parameters = ["NewStateId": 0] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/v1/orders/:id/orderstate")! 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
Create an delivery note for an existing order. This request is extra throttled by order and api key to a maximum of 1 per 5 minutes.
{{baseUrl}}/api/v1/orders/CreateDeliveryNote/:id
QUERY PARAMS
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/v1/orders/CreateDeliveryNote/:id");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/api/v1/orders/CreateDeliveryNote/:id")
require "http/client"
url = "{{baseUrl}}/api/v1/orders/CreateDeliveryNote/:id"
response = HTTP::Client.post url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/api/v1/orders/CreateDeliveryNote/:id"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/api/v1/orders/CreateDeliveryNote/:id");
var request = new RestRequest("", Method.Post);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/v1/orders/CreateDeliveryNote/:id"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/api/v1/orders/CreateDeliveryNote/:id HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/api/v1/orders/CreateDeliveryNote/:id")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/v1/orders/CreateDeliveryNote/:id"))
.method("POST", 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}}/api/v1/orders/CreateDeliveryNote/:id")
.post(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/api/v1/orders/CreateDeliveryNote/: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('POST', '{{baseUrl}}/api/v1/orders/CreateDeliveryNote/:id');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/api/v1/orders/CreateDeliveryNote/:id'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/v1/orders/CreateDeliveryNote/:id';
const options = {method: 'POST'};
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}}/api/v1/orders/CreateDeliveryNote/:id',
method: 'POST',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/api/v1/orders/CreateDeliveryNote/:id")
.post(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/api/v1/orders/CreateDeliveryNote/: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: 'POST',
url: '{{baseUrl}}/api/v1/orders/CreateDeliveryNote/:id'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/api/v1/orders/CreateDeliveryNote/: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: 'POST',
url: '{{baseUrl}}/api/v1/orders/CreateDeliveryNote/:id'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/v1/orders/CreateDeliveryNote/:id';
const options = {method: 'POST'};
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}}/api/v1/orders/CreateDeliveryNote/:id"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
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}}/api/v1/orders/CreateDeliveryNote/:id" in
Client.call `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/v1/orders/CreateDeliveryNote/:id",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/api/v1/orders/CreateDeliveryNote/:id');
echo $response->getBody();
setUrl('{{baseUrl}}/api/v1/orders/CreateDeliveryNote/:id');
$request->setMethod(HTTP_METH_POST);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/api/v1/orders/CreateDeliveryNote/:id');
$request->setRequestMethod('POST');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/api/v1/orders/CreateDeliveryNote/:id' -Method POST
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/v1/orders/CreateDeliveryNote/:id' -Method POST
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("POST", "/baseUrl/api/v1/orders/CreateDeliveryNote/:id")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/v1/orders/CreateDeliveryNote/:id"
response = requests.post(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/v1/orders/CreateDeliveryNote/:id"
response <- VERB("POST", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/api/v1/orders/CreateDeliveryNote/:id")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.post('/baseUrl/api/v1/orders/CreateDeliveryNote/:id') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/api/v1/orders/CreateDeliveryNote/:id";
let client = reqwest::Client::new();
let response = client.post(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/api/v1/orders/CreateDeliveryNote/:id
http POST {{baseUrl}}/api/v1/orders/CreateDeliveryNote/:id
wget --quiet \
--method POST \
--output-document \
- {{baseUrl}}/api/v1/orders/CreateDeliveryNote/:id
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/v1/orders/CreateDeliveryNote/:id")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
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
Create an invoice for an existing order. This request is extra throttled by order and api key to a maximum of 1 per 5 minutes.
{{baseUrl}}/api/v1/orders/CreateInvoice/:id
QUERY PARAMS
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/v1/orders/CreateInvoice/:id");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/api/v1/orders/CreateInvoice/:id")
require "http/client"
url = "{{baseUrl}}/api/v1/orders/CreateInvoice/:id"
response = HTTP::Client.post url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/api/v1/orders/CreateInvoice/:id"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/api/v1/orders/CreateInvoice/:id");
var request = new RestRequest("", Method.Post);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/v1/orders/CreateInvoice/:id"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/api/v1/orders/CreateInvoice/:id HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/api/v1/orders/CreateInvoice/:id")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/v1/orders/CreateInvoice/:id"))
.method("POST", 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}}/api/v1/orders/CreateInvoice/:id")
.post(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/api/v1/orders/CreateInvoice/: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('POST', '{{baseUrl}}/api/v1/orders/CreateInvoice/:id');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/api/v1/orders/CreateInvoice/:id'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/v1/orders/CreateInvoice/:id';
const options = {method: 'POST'};
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}}/api/v1/orders/CreateInvoice/:id',
method: 'POST',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/api/v1/orders/CreateInvoice/:id")
.post(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/api/v1/orders/CreateInvoice/: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: 'POST',
url: '{{baseUrl}}/api/v1/orders/CreateInvoice/:id'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/api/v1/orders/CreateInvoice/: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: 'POST',
url: '{{baseUrl}}/api/v1/orders/CreateInvoice/:id'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/v1/orders/CreateInvoice/:id';
const options = {method: 'POST'};
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}}/api/v1/orders/CreateInvoice/:id"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
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}}/api/v1/orders/CreateInvoice/:id" in
Client.call `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/v1/orders/CreateInvoice/:id",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/api/v1/orders/CreateInvoice/:id');
echo $response->getBody();
setUrl('{{baseUrl}}/api/v1/orders/CreateInvoice/:id');
$request->setMethod(HTTP_METH_POST);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/api/v1/orders/CreateInvoice/:id');
$request->setRequestMethod('POST');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/api/v1/orders/CreateInvoice/:id' -Method POST
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/v1/orders/CreateInvoice/:id' -Method POST
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("POST", "/baseUrl/api/v1/orders/CreateInvoice/:id")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/v1/orders/CreateInvoice/:id"
response = requests.post(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/v1/orders/CreateInvoice/:id"
response <- VERB("POST", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/api/v1/orders/CreateInvoice/:id")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.post('/baseUrl/api/v1/orders/CreateInvoice/:id') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/api/v1/orders/CreateInvoice/:id";
let client = reqwest::Client::new();
let response = client.post(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/api/v1/orders/CreateInvoice/:id
http POST {{baseUrl}}/api/v1/orders/CreateInvoice/:id
wget --quiet \
--method POST \
--output-document \
- {{baseUrl}}/api/v1/orders/CreateInvoice/:id
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/v1/orders/CreateInvoice/:id")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
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
Creates a new order in the Billbee account
{{baseUrl}}/api/v1/orders
BODY json
{
"AcceptLossOfReturnRight": false,
"AdjustmentCost": "",
"AdjustmentReason": "",
"ApiAccountId": 0,
"ApiAccountName": "",
"ArchivedAt": "",
"BillBeeOrderId": 0,
"BillBeeParentOrderId": 0,
"Buyer": {
"BillbeeShopId": 0,
"BillbeeShopName": "",
"Email": "",
"FirstName": "",
"FullName": "",
"Id": "",
"LastName": "",
"Nick": "",
"Platform": ""
},
"Comments": [
{
"Created": "",
"FromCustomer": false,
"Id": 0,
"Name": "",
"Text": ""
}
],
"ConfirmedAt": "",
"CreatedAt": "",
"Currency": "",
"CustomInvoiceNote": "",
"Customer": {
"ArchivedAt": "",
"DefaultCommercialMailAddress": {
"Id": 0,
"SubType": "",
"TypeId": 0,
"TypeName": "",
"Value": ""
},
"DefaultFax": {},
"DefaultMailAddress": {},
"DefaultPhone1": {},
"DefaultPhone2": {},
"DefaultStatusUpdatesMailAddress": {},
"Email": "",
"Id": 0,
"LanguageId": 0,
"MetaData": [
{}
],
"Name": "",
"Number": 0,
"PriceGroupId": 0,
"RestoredAt": "",
"Tel1": "",
"Tel2": "",
"Type": 0,
"VatId": ""
},
"CustomerNumber": "",
"CustomerVatId": "",
"DeliverySourceCountryCode": "",
"DistributionCenter": "",
"History": [
{
"Created": "",
"EmployeeName": "",
"EventTypeName": "",
"Text": "",
"TypeId": 0
}
],
"Id": "",
"InvoiceAddress": {
"BillbeeId": 0,
"City": "",
"Company": "",
"Country": "",
"CountryISO2": "",
"Email": "",
"FirstName": "",
"HouseNumber": "",
"LastName": "",
"Line2": "",
"NameAddition": "",
"Phone": "",
"State": "",
"Street": "",
"Zip": ""
},
"InvoiceDate": "",
"InvoiceNumber": 0,
"InvoiceNumberPostfix": "",
"InvoiceNumberPrefix": "",
"IsCancelationFor": "",
"IsFromBillbeeApi": false,
"LanguageCode": "",
"LastModifiedAt": "",
"MerchantVatId": "",
"OrderItems": [
{
"Attributes": [
{
"Id": "",
"Name": "",
"Price": "",
"Value": ""
}
],
"BillbeeId": 0,
"Discount": "",
"DontAdjustStock": false,
"GetPriceFromArticleIfAny": false,
"InvoiceSKU": "",
"IsCoupon": false,
"Product": {
"BillbeeId": 0,
"CountryOfOrigin": "",
"EAN": "",
"Id": "",
"Images": [
{
"ExternalId": "",
"IsDefaultImage": false,
"Position": 0,
"Url": ""
}
],
"IsDigital": false,
"OldId": "",
"PlatformData": "",
"SKU": "",
"SkuOrId": "",
"TARICCode": "",
"Title": "",
"Type": 0,
"Weight": 0
},
"Quantity": "",
"SerialNumber": "",
"ShippingProfileId": "",
"TaxAmount": "",
"TaxIndex": 0,
"TotalPrice": "",
"TransactionId": "",
"UnrebatedTotalPrice": ""
}
],
"OrderNumber": "",
"PaidAmount": "",
"PayedAt": "",
"PaymentInstruction": "",
"PaymentMethod": 0,
"PaymentReference": "",
"PaymentTransactionId": "",
"Payments": [
{
"BillbeeId": 0,
"Name": "",
"PayDate": "",
"PayValue": "",
"PaymentType": 0,
"Purpose": "",
"SourceTechnology": "",
"SourceText": "",
"TransactionId": ""
}
],
"RebateDifference": "",
"RestoredAt": "",
"Seller": {},
"SellerComment": "",
"ShipWeightKg": "",
"ShippedAt": "",
"ShippingAddress": {},
"ShippingCost": "",
"ShippingIds": [
{
"BillbeeId": 0,
"Created": "",
"ShipmentType": 0,
"Shipper": "",
"ShippingCarrier": 0,
"ShippingId": "",
"ShippingProviderId": 0,
"ShippingProviderProductId": 0,
"TrackingUrl": ""
}
],
"ShippingProfileId": "",
"ShippingProfileName": "",
"ShippingProviderId": 0,
"ShippingProviderName": "",
"ShippingProviderProductId": 0,
"ShippingProviderProductName": "",
"ShippingServices": [
{
"CanBeConfigured": false,
"DisplayName": "",
"DisplayValue": "",
"PossibleValueLists": [
{
"key": "",
"value": [
{
"key": 0,
"value": ""
}
]
}
],
"RequiresUserInput": false,
"ServiceName": "",
"typeName": ""
}
],
"State": 0,
"Tags": [],
"TaxRate1": "",
"TaxRate2": "",
"TotalCost": "",
"UpdatedAt": "",
"VatId": "",
"VatMode": 0
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/v1/orders");
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 \"AcceptLossOfReturnRight\": false,\n \"AdjustmentCost\": \"\",\n \"AdjustmentReason\": \"\",\n \"ApiAccountId\": 0,\n \"ApiAccountName\": \"\",\n \"ArchivedAt\": \"\",\n \"BillBeeOrderId\": 0,\n \"BillBeeParentOrderId\": 0,\n \"Buyer\": {\n \"BillbeeShopId\": 0,\n \"BillbeeShopName\": \"\",\n \"Email\": \"\",\n \"FirstName\": \"\",\n \"FullName\": \"\",\n \"Id\": \"\",\n \"LastName\": \"\",\n \"Nick\": \"\",\n \"Platform\": \"\"\n },\n \"Comments\": [\n {\n \"Created\": \"\",\n \"FromCustomer\": false,\n \"Id\": 0,\n \"Name\": \"\",\n \"Text\": \"\"\n }\n ],\n \"ConfirmedAt\": \"\",\n \"CreatedAt\": \"\",\n \"Currency\": \"\",\n \"CustomInvoiceNote\": \"\",\n \"Customer\": {\n \"ArchivedAt\": \"\",\n \"DefaultCommercialMailAddress\": {\n \"Id\": 0,\n \"SubType\": \"\",\n \"TypeId\": 0,\n \"TypeName\": \"\",\n \"Value\": \"\"\n },\n \"DefaultFax\": {},\n \"DefaultMailAddress\": {},\n \"DefaultPhone1\": {},\n \"DefaultPhone2\": {},\n \"DefaultStatusUpdatesMailAddress\": {},\n \"Email\": \"\",\n \"Id\": 0,\n \"LanguageId\": 0,\n \"MetaData\": [\n {}\n ],\n \"Name\": \"\",\n \"Number\": 0,\n \"PriceGroupId\": 0,\n \"RestoredAt\": \"\",\n \"Tel1\": \"\",\n \"Tel2\": \"\",\n \"Type\": 0,\n \"VatId\": \"\"\n },\n \"CustomerNumber\": \"\",\n \"CustomerVatId\": \"\",\n \"DeliverySourceCountryCode\": \"\",\n \"DistributionCenter\": \"\",\n \"History\": [\n {\n \"Created\": \"\",\n \"EmployeeName\": \"\",\n \"EventTypeName\": \"\",\n \"Text\": \"\",\n \"TypeId\": 0\n }\n ],\n \"Id\": \"\",\n \"InvoiceAddress\": {\n \"BillbeeId\": 0,\n \"City\": \"\",\n \"Company\": \"\",\n \"Country\": \"\",\n \"CountryISO2\": \"\",\n \"Email\": \"\",\n \"FirstName\": \"\",\n \"HouseNumber\": \"\",\n \"LastName\": \"\",\n \"Line2\": \"\",\n \"NameAddition\": \"\",\n \"Phone\": \"\",\n \"State\": \"\",\n \"Street\": \"\",\n \"Zip\": \"\"\n },\n \"InvoiceDate\": \"\",\n \"InvoiceNumber\": 0,\n \"InvoiceNumberPostfix\": \"\",\n \"InvoiceNumberPrefix\": \"\",\n \"IsCancelationFor\": \"\",\n \"IsFromBillbeeApi\": false,\n \"LanguageCode\": \"\",\n \"LastModifiedAt\": \"\",\n \"MerchantVatId\": \"\",\n \"OrderItems\": [\n {\n \"Attributes\": [\n {\n \"Id\": \"\",\n \"Name\": \"\",\n \"Price\": \"\",\n \"Value\": \"\"\n }\n ],\n \"BillbeeId\": 0,\n \"Discount\": \"\",\n \"DontAdjustStock\": false,\n \"GetPriceFromArticleIfAny\": false,\n \"InvoiceSKU\": \"\",\n \"IsCoupon\": false,\n \"Product\": {\n \"BillbeeId\": 0,\n \"CountryOfOrigin\": \"\",\n \"EAN\": \"\",\n \"Id\": \"\",\n \"Images\": [\n {\n \"ExternalId\": \"\",\n \"IsDefaultImage\": false,\n \"Position\": 0,\n \"Url\": \"\"\n }\n ],\n \"IsDigital\": false,\n \"OldId\": \"\",\n \"PlatformData\": \"\",\n \"SKU\": \"\",\n \"SkuOrId\": \"\",\n \"TARICCode\": \"\",\n \"Title\": \"\",\n \"Type\": 0,\n \"Weight\": 0\n },\n \"Quantity\": \"\",\n \"SerialNumber\": \"\",\n \"ShippingProfileId\": \"\",\n \"TaxAmount\": \"\",\n \"TaxIndex\": 0,\n \"TotalPrice\": \"\",\n \"TransactionId\": \"\",\n \"UnrebatedTotalPrice\": \"\"\n }\n ],\n \"OrderNumber\": \"\",\n \"PaidAmount\": \"\",\n \"PayedAt\": \"\",\n \"PaymentInstruction\": \"\",\n \"PaymentMethod\": 0,\n \"PaymentReference\": \"\",\n \"PaymentTransactionId\": \"\",\n \"Payments\": [\n {\n \"BillbeeId\": 0,\n \"Name\": \"\",\n \"PayDate\": \"\",\n \"PayValue\": \"\",\n \"PaymentType\": 0,\n \"Purpose\": \"\",\n \"SourceTechnology\": \"\",\n \"SourceText\": \"\",\n \"TransactionId\": \"\"\n }\n ],\n \"RebateDifference\": \"\",\n \"RestoredAt\": \"\",\n \"Seller\": {},\n \"SellerComment\": \"\",\n \"ShipWeightKg\": \"\",\n \"ShippedAt\": \"\",\n \"ShippingAddress\": {},\n \"ShippingCost\": \"\",\n \"ShippingIds\": [\n {\n \"BillbeeId\": 0,\n \"Created\": \"\",\n \"ShipmentType\": 0,\n \"Shipper\": \"\",\n \"ShippingCarrier\": 0,\n \"ShippingId\": \"\",\n \"ShippingProviderId\": 0,\n \"ShippingProviderProductId\": 0,\n \"TrackingUrl\": \"\"\n }\n ],\n \"ShippingProfileId\": \"\",\n \"ShippingProfileName\": \"\",\n \"ShippingProviderId\": 0,\n \"ShippingProviderName\": \"\",\n \"ShippingProviderProductId\": 0,\n \"ShippingProviderProductName\": \"\",\n \"ShippingServices\": [\n {\n \"CanBeConfigured\": false,\n \"DisplayName\": \"\",\n \"DisplayValue\": \"\",\n \"PossibleValueLists\": [\n {\n \"key\": \"\",\n \"value\": [\n {\n \"key\": 0,\n \"value\": \"\"\n }\n ]\n }\n ],\n \"RequiresUserInput\": false,\n \"ServiceName\": \"\",\n \"typeName\": \"\"\n }\n ],\n \"State\": 0,\n \"Tags\": [],\n \"TaxRate1\": \"\",\n \"TaxRate2\": \"\",\n \"TotalCost\": \"\",\n \"UpdatedAt\": \"\",\n \"VatId\": \"\",\n \"VatMode\": 0\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/api/v1/orders" {:content-type :json
:form-params {:AcceptLossOfReturnRight false
:AdjustmentCost ""
:AdjustmentReason ""
:ApiAccountId 0
:ApiAccountName ""
:ArchivedAt ""
:BillBeeOrderId 0
:BillBeeParentOrderId 0
:Buyer {:BillbeeShopId 0
:BillbeeShopName ""
:Email ""
:FirstName ""
:FullName ""
:Id ""
:LastName ""
:Nick ""
:Platform ""}
:Comments [{:Created ""
:FromCustomer false
:Id 0
:Name ""
:Text ""}]
:ConfirmedAt ""
:CreatedAt ""
:Currency ""
:CustomInvoiceNote ""
:Customer {:ArchivedAt ""
:DefaultCommercialMailAddress {:Id 0
:SubType ""
:TypeId 0
:TypeName ""
:Value ""}
:DefaultFax {}
:DefaultMailAddress {}
:DefaultPhone1 {}
:DefaultPhone2 {}
:DefaultStatusUpdatesMailAddress {}
:Email ""
:Id 0
:LanguageId 0
:MetaData [{}]
:Name ""
:Number 0
:PriceGroupId 0
:RestoredAt ""
:Tel1 ""
:Tel2 ""
:Type 0
:VatId ""}
:CustomerNumber ""
:CustomerVatId ""
:DeliverySourceCountryCode ""
:DistributionCenter ""
:History [{:Created ""
:EmployeeName ""
:EventTypeName ""
:Text ""
:TypeId 0}]
:Id ""
:InvoiceAddress {:BillbeeId 0
:City ""
:Company ""
:Country ""
:CountryISO2 ""
:Email ""
:FirstName ""
:HouseNumber ""
:LastName ""
:Line2 ""
:NameAddition ""
:Phone ""
:State ""
:Street ""
:Zip ""}
:InvoiceDate ""
:InvoiceNumber 0
:InvoiceNumberPostfix ""
:InvoiceNumberPrefix ""
:IsCancelationFor ""
:IsFromBillbeeApi false
:LanguageCode ""
:LastModifiedAt ""
:MerchantVatId ""
:OrderItems [{:Attributes [{:Id ""
:Name ""
:Price ""
:Value ""}]
:BillbeeId 0
:Discount ""
:DontAdjustStock false
:GetPriceFromArticleIfAny false
:InvoiceSKU ""
:IsCoupon false
:Product {:BillbeeId 0
:CountryOfOrigin ""
:EAN ""
:Id ""
:Images [{:ExternalId ""
:IsDefaultImage false
:Position 0
:Url ""}]
:IsDigital false
:OldId ""
:PlatformData ""
:SKU ""
:SkuOrId ""
:TARICCode ""
:Title ""
:Type 0
:Weight 0}
:Quantity ""
:SerialNumber ""
:ShippingProfileId ""
:TaxAmount ""
:TaxIndex 0
:TotalPrice ""
:TransactionId ""
:UnrebatedTotalPrice ""}]
:OrderNumber ""
:PaidAmount ""
:PayedAt ""
:PaymentInstruction ""
:PaymentMethod 0
:PaymentReference ""
:PaymentTransactionId ""
:Payments [{:BillbeeId 0
:Name ""
:PayDate ""
:PayValue ""
:PaymentType 0
:Purpose ""
:SourceTechnology ""
:SourceText ""
:TransactionId ""}]
:RebateDifference ""
:RestoredAt ""
:Seller {}
:SellerComment ""
:ShipWeightKg ""
:ShippedAt ""
:ShippingAddress {}
:ShippingCost ""
:ShippingIds [{:BillbeeId 0
:Created ""
:ShipmentType 0
:Shipper ""
:ShippingCarrier 0
:ShippingId ""
:ShippingProviderId 0
:ShippingProviderProductId 0
:TrackingUrl ""}]
:ShippingProfileId ""
:ShippingProfileName ""
:ShippingProviderId 0
:ShippingProviderName ""
:ShippingProviderProductId 0
:ShippingProviderProductName ""
:ShippingServices [{:CanBeConfigured false
:DisplayName ""
:DisplayValue ""
:PossibleValueLists [{:key ""
:value [{:key 0
:value ""}]}]
:RequiresUserInput false
:ServiceName ""
:typeName ""}]
:State 0
:Tags []
:TaxRate1 ""
:TaxRate2 ""
:TotalCost ""
:UpdatedAt ""
:VatId ""
:VatMode 0}})
require "http/client"
url = "{{baseUrl}}/api/v1/orders"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"AcceptLossOfReturnRight\": false,\n \"AdjustmentCost\": \"\",\n \"AdjustmentReason\": \"\",\n \"ApiAccountId\": 0,\n \"ApiAccountName\": \"\",\n \"ArchivedAt\": \"\",\n \"BillBeeOrderId\": 0,\n \"BillBeeParentOrderId\": 0,\n \"Buyer\": {\n \"BillbeeShopId\": 0,\n \"BillbeeShopName\": \"\",\n \"Email\": \"\",\n \"FirstName\": \"\",\n \"FullName\": \"\",\n \"Id\": \"\",\n \"LastName\": \"\",\n \"Nick\": \"\",\n \"Platform\": \"\"\n },\n \"Comments\": [\n {\n \"Created\": \"\",\n \"FromCustomer\": false,\n \"Id\": 0,\n \"Name\": \"\",\n \"Text\": \"\"\n }\n ],\n \"ConfirmedAt\": \"\",\n \"CreatedAt\": \"\",\n \"Currency\": \"\",\n \"CustomInvoiceNote\": \"\",\n \"Customer\": {\n \"ArchivedAt\": \"\",\n \"DefaultCommercialMailAddress\": {\n \"Id\": 0,\n \"SubType\": \"\",\n \"TypeId\": 0,\n \"TypeName\": \"\",\n \"Value\": \"\"\n },\n \"DefaultFax\": {},\n \"DefaultMailAddress\": {},\n \"DefaultPhone1\": {},\n \"DefaultPhone2\": {},\n \"DefaultStatusUpdatesMailAddress\": {},\n \"Email\": \"\",\n \"Id\": 0,\n \"LanguageId\": 0,\n \"MetaData\": [\n {}\n ],\n \"Name\": \"\",\n \"Number\": 0,\n \"PriceGroupId\": 0,\n \"RestoredAt\": \"\",\n \"Tel1\": \"\",\n \"Tel2\": \"\",\n \"Type\": 0,\n \"VatId\": \"\"\n },\n \"CustomerNumber\": \"\",\n \"CustomerVatId\": \"\",\n \"DeliverySourceCountryCode\": \"\",\n \"DistributionCenter\": \"\",\n \"History\": [\n {\n \"Created\": \"\",\n \"EmployeeName\": \"\",\n \"EventTypeName\": \"\",\n \"Text\": \"\",\n \"TypeId\": 0\n }\n ],\n \"Id\": \"\",\n \"InvoiceAddress\": {\n \"BillbeeId\": 0,\n \"City\": \"\",\n \"Company\": \"\",\n \"Country\": \"\",\n \"CountryISO2\": \"\",\n \"Email\": \"\",\n \"FirstName\": \"\",\n \"HouseNumber\": \"\",\n \"LastName\": \"\",\n \"Line2\": \"\",\n \"NameAddition\": \"\",\n \"Phone\": \"\",\n \"State\": \"\",\n \"Street\": \"\",\n \"Zip\": \"\"\n },\n \"InvoiceDate\": \"\",\n \"InvoiceNumber\": 0,\n \"InvoiceNumberPostfix\": \"\",\n \"InvoiceNumberPrefix\": \"\",\n \"IsCancelationFor\": \"\",\n \"IsFromBillbeeApi\": false,\n \"LanguageCode\": \"\",\n \"LastModifiedAt\": \"\",\n \"MerchantVatId\": \"\",\n \"OrderItems\": [\n {\n \"Attributes\": [\n {\n \"Id\": \"\",\n \"Name\": \"\",\n \"Price\": \"\",\n \"Value\": \"\"\n }\n ],\n \"BillbeeId\": 0,\n \"Discount\": \"\",\n \"DontAdjustStock\": false,\n \"GetPriceFromArticleIfAny\": false,\n \"InvoiceSKU\": \"\",\n \"IsCoupon\": false,\n \"Product\": {\n \"BillbeeId\": 0,\n \"CountryOfOrigin\": \"\",\n \"EAN\": \"\",\n \"Id\": \"\",\n \"Images\": [\n {\n \"ExternalId\": \"\",\n \"IsDefaultImage\": false,\n \"Position\": 0,\n \"Url\": \"\"\n }\n ],\n \"IsDigital\": false,\n \"OldId\": \"\",\n \"PlatformData\": \"\",\n \"SKU\": \"\",\n \"SkuOrId\": \"\",\n \"TARICCode\": \"\",\n \"Title\": \"\",\n \"Type\": 0,\n \"Weight\": 0\n },\n \"Quantity\": \"\",\n \"SerialNumber\": \"\",\n \"ShippingProfileId\": \"\",\n \"TaxAmount\": \"\",\n \"TaxIndex\": 0,\n \"TotalPrice\": \"\",\n \"TransactionId\": \"\",\n \"UnrebatedTotalPrice\": \"\"\n }\n ],\n \"OrderNumber\": \"\",\n \"PaidAmount\": \"\",\n \"PayedAt\": \"\",\n \"PaymentInstruction\": \"\",\n \"PaymentMethod\": 0,\n \"PaymentReference\": \"\",\n \"PaymentTransactionId\": \"\",\n \"Payments\": [\n {\n \"BillbeeId\": 0,\n \"Name\": \"\",\n \"PayDate\": \"\",\n \"PayValue\": \"\",\n \"PaymentType\": 0,\n \"Purpose\": \"\",\n \"SourceTechnology\": \"\",\n \"SourceText\": \"\",\n \"TransactionId\": \"\"\n }\n ],\n \"RebateDifference\": \"\",\n \"RestoredAt\": \"\",\n \"Seller\": {},\n \"SellerComment\": \"\",\n \"ShipWeightKg\": \"\",\n \"ShippedAt\": \"\",\n \"ShippingAddress\": {},\n \"ShippingCost\": \"\",\n \"ShippingIds\": [\n {\n \"BillbeeId\": 0,\n \"Created\": \"\",\n \"ShipmentType\": 0,\n \"Shipper\": \"\",\n \"ShippingCarrier\": 0,\n \"ShippingId\": \"\",\n \"ShippingProviderId\": 0,\n \"ShippingProviderProductId\": 0,\n \"TrackingUrl\": \"\"\n }\n ],\n \"ShippingProfileId\": \"\",\n \"ShippingProfileName\": \"\",\n \"ShippingProviderId\": 0,\n \"ShippingProviderName\": \"\",\n \"ShippingProviderProductId\": 0,\n \"ShippingProviderProductName\": \"\",\n \"ShippingServices\": [\n {\n \"CanBeConfigured\": false,\n \"DisplayName\": \"\",\n \"DisplayValue\": \"\",\n \"PossibleValueLists\": [\n {\n \"key\": \"\",\n \"value\": [\n {\n \"key\": 0,\n \"value\": \"\"\n }\n ]\n }\n ],\n \"RequiresUserInput\": false,\n \"ServiceName\": \"\",\n \"typeName\": \"\"\n }\n ],\n \"State\": 0,\n \"Tags\": [],\n \"TaxRate1\": \"\",\n \"TaxRate2\": \"\",\n \"TotalCost\": \"\",\n \"UpdatedAt\": \"\",\n \"VatId\": \"\",\n \"VatMode\": 0\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}}/api/v1/orders"),
Content = new StringContent("{\n \"AcceptLossOfReturnRight\": false,\n \"AdjustmentCost\": \"\",\n \"AdjustmentReason\": \"\",\n \"ApiAccountId\": 0,\n \"ApiAccountName\": \"\",\n \"ArchivedAt\": \"\",\n \"BillBeeOrderId\": 0,\n \"BillBeeParentOrderId\": 0,\n \"Buyer\": {\n \"BillbeeShopId\": 0,\n \"BillbeeShopName\": \"\",\n \"Email\": \"\",\n \"FirstName\": \"\",\n \"FullName\": \"\",\n \"Id\": \"\",\n \"LastName\": \"\",\n \"Nick\": \"\",\n \"Platform\": \"\"\n },\n \"Comments\": [\n {\n \"Created\": \"\",\n \"FromCustomer\": false,\n \"Id\": 0,\n \"Name\": \"\",\n \"Text\": \"\"\n }\n ],\n \"ConfirmedAt\": \"\",\n \"CreatedAt\": \"\",\n \"Currency\": \"\",\n \"CustomInvoiceNote\": \"\",\n \"Customer\": {\n \"ArchivedAt\": \"\",\n \"DefaultCommercialMailAddress\": {\n \"Id\": 0,\n \"SubType\": \"\",\n \"TypeId\": 0,\n \"TypeName\": \"\",\n \"Value\": \"\"\n },\n \"DefaultFax\": {},\n \"DefaultMailAddress\": {},\n \"DefaultPhone1\": {},\n \"DefaultPhone2\": {},\n \"DefaultStatusUpdatesMailAddress\": {},\n \"Email\": \"\",\n \"Id\": 0,\n \"LanguageId\": 0,\n \"MetaData\": [\n {}\n ],\n \"Name\": \"\",\n \"Number\": 0,\n \"PriceGroupId\": 0,\n \"RestoredAt\": \"\",\n \"Tel1\": \"\",\n \"Tel2\": \"\",\n \"Type\": 0,\n \"VatId\": \"\"\n },\n \"CustomerNumber\": \"\",\n \"CustomerVatId\": \"\",\n \"DeliverySourceCountryCode\": \"\",\n \"DistributionCenter\": \"\",\n \"History\": [\n {\n \"Created\": \"\",\n \"EmployeeName\": \"\",\n \"EventTypeName\": \"\",\n \"Text\": \"\",\n \"TypeId\": 0\n }\n ],\n \"Id\": \"\",\n \"InvoiceAddress\": {\n \"BillbeeId\": 0,\n \"City\": \"\",\n \"Company\": \"\",\n \"Country\": \"\",\n \"CountryISO2\": \"\",\n \"Email\": \"\",\n \"FirstName\": \"\",\n \"HouseNumber\": \"\",\n \"LastName\": \"\",\n \"Line2\": \"\",\n \"NameAddition\": \"\",\n \"Phone\": \"\",\n \"State\": \"\",\n \"Street\": \"\",\n \"Zip\": \"\"\n },\n \"InvoiceDate\": \"\",\n \"InvoiceNumber\": 0,\n \"InvoiceNumberPostfix\": \"\",\n \"InvoiceNumberPrefix\": \"\",\n \"IsCancelationFor\": \"\",\n \"IsFromBillbeeApi\": false,\n \"LanguageCode\": \"\",\n \"LastModifiedAt\": \"\",\n \"MerchantVatId\": \"\",\n \"OrderItems\": [\n {\n \"Attributes\": [\n {\n \"Id\": \"\",\n \"Name\": \"\",\n \"Price\": \"\",\n \"Value\": \"\"\n }\n ],\n \"BillbeeId\": 0,\n \"Discount\": \"\",\n \"DontAdjustStock\": false,\n \"GetPriceFromArticleIfAny\": false,\n \"InvoiceSKU\": \"\",\n \"IsCoupon\": false,\n \"Product\": {\n \"BillbeeId\": 0,\n \"CountryOfOrigin\": \"\",\n \"EAN\": \"\",\n \"Id\": \"\",\n \"Images\": [\n {\n \"ExternalId\": \"\",\n \"IsDefaultImage\": false,\n \"Position\": 0,\n \"Url\": \"\"\n }\n ],\n \"IsDigital\": false,\n \"OldId\": \"\",\n \"PlatformData\": \"\",\n \"SKU\": \"\",\n \"SkuOrId\": \"\",\n \"TARICCode\": \"\",\n \"Title\": \"\",\n \"Type\": 0,\n \"Weight\": 0\n },\n \"Quantity\": \"\",\n \"SerialNumber\": \"\",\n \"ShippingProfileId\": \"\",\n \"TaxAmount\": \"\",\n \"TaxIndex\": 0,\n \"TotalPrice\": \"\",\n \"TransactionId\": \"\",\n \"UnrebatedTotalPrice\": \"\"\n }\n ],\n \"OrderNumber\": \"\",\n \"PaidAmount\": \"\",\n \"PayedAt\": \"\",\n \"PaymentInstruction\": \"\",\n \"PaymentMethod\": 0,\n \"PaymentReference\": \"\",\n \"PaymentTransactionId\": \"\",\n \"Payments\": [\n {\n \"BillbeeId\": 0,\n \"Name\": \"\",\n \"PayDate\": \"\",\n \"PayValue\": \"\",\n \"PaymentType\": 0,\n \"Purpose\": \"\",\n \"SourceTechnology\": \"\",\n \"SourceText\": \"\",\n \"TransactionId\": \"\"\n }\n ],\n \"RebateDifference\": \"\",\n \"RestoredAt\": \"\",\n \"Seller\": {},\n \"SellerComment\": \"\",\n \"ShipWeightKg\": \"\",\n \"ShippedAt\": \"\",\n \"ShippingAddress\": {},\n \"ShippingCost\": \"\",\n \"ShippingIds\": [\n {\n \"BillbeeId\": 0,\n \"Created\": \"\",\n \"ShipmentType\": 0,\n \"Shipper\": \"\",\n \"ShippingCarrier\": 0,\n \"ShippingId\": \"\",\n \"ShippingProviderId\": 0,\n \"ShippingProviderProductId\": 0,\n \"TrackingUrl\": \"\"\n }\n ],\n \"ShippingProfileId\": \"\",\n \"ShippingProfileName\": \"\",\n \"ShippingProviderId\": 0,\n \"ShippingProviderName\": \"\",\n \"ShippingProviderProductId\": 0,\n \"ShippingProviderProductName\": \"\",\n \"ShippingServices\": [\n {\n \"CanBeConfigured\": false,\n \"DisplayName\": \"\",\n \"DisplayValue\": \"\",\n \"PossibleValueLists\": [\n {\n \"key\": \"\",\n \"value\": [\n {\n \"key\": 0,\n \"value\": \"\"\n }\n ]\n }\n ],\n \"RequiresUserInput\": false,\n \"ServiceName\": \"\",\n \"typeName\": \"\"\n }\n ],\n \"State\": 0,\n \"Tags\": [],\n \"TaxRate1\": \"\",\n \"TaxRate2\": \"\",\n \"TotalCost\": \"\",\n \"UpdatedAt\": \"\",\n \"VatId\": \"\",\n \"VatMode\": 0\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}}/api/v1/orders");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"AcceptLossOfReturnRight\": false,\n \"AdjustmentCost\": \"\",\n \"AdjustmentReason\": \"\",\n \"ApiAccountId\": 0,\n \"ApiAccountName\": \"\",\n \"ArchivedAt\": \"\",\n \"BillBeeOrderId\": 0,\n \"BillBeeParentOrderId\": 0,\n \"Buyer\": {\n \"BillbeeShopId\": 0,\n \"BillbeeShopName\": \"\",\n \"Email\": \"\",\n \"FirstName\": \"\",\n \"FullName\": \"\",\n \"Id\": \"\",\n \"LastName\": \"\",\n \"Nick\": \"\",\n \"Platform\": \"\"\n },\n \"Comments\": [\n {\n \"Created\": \"\",\n \"FromCustomer\": false,\n \"Id\": 0,\n \"Name\": \"\",\n \"Text\": \"\"\n }\n ],\n \"ConfirmedAt\": \"\",\n \"CreatedAt\": \"\",\n \"Currency\": \"\",\n \"CustomInvoiceNote\": \"\",\n \"Customer\": {\n \"ArchivedAt\": \"\",\n \"DefaultCommercialMailAddress\": {\n \"Id\": 0,\n \"SubType\": \"\",\n \"TypeId\": 0,\n \"TypeName\": \"\",\n \"Value\": \"\"\n },\n \"DefaultFax\": {},\n \"DefaultMailAddress\": {},\n \"DefaultPhone1\": {},\n \"DefaultPhone2\": {},\n \"DefaultStatusUpdatesMailAddress\": {},\n \"Email\": \"\",\n \"Id\": 0,\n \"LanguageId\": 0,\n \"MetaData\": [\n {}\n ],\n \"Name\": \"\",\n \"Number\": 0,\n \"PriceGroupId\": 0,\n \"RestoredAt\": \"\",\n \"Tel1\": \"\",\n \"Tel2\": \"\",\n \"Type\": 0,\n \"VatId\": \"\"\n },\n \"CustomerNumber\": \"\",\n \"CustomerVatId\": \"\",\n \"DeliverySourceCountryCode\": \"\",\n \"DistributionCenter\": \"\",\n \"History\": [\n {\n \"Created\": \"\",\n \"EmployeeName\": \"\",\n \"EventTypeName\": \"\",\n \"Text\": \"\",\n \"TypeId\": 0\n }\n ],\n \"Id\": \"\",\n \"InvoiceAddress\": {\n \"BillbeeId\": 0,\n \"City\": \"\",\n \"Company\": \"\",\n \"Country\": \"\",\n \"CountryISO2\": \"\",\n \"Email\": \"\",\n \"FirstName\": \"\",\n \"HouseNumber\": \"\",\n \"LastName\": \"\",\n \"Line2\": \"\",\n \"NameAddition\": \"\",\n \"Phone\": \"\",\n \"State\": \"\",\n \"Street\": \"\",\n \"Zip\": \"\"\n },\n \"InvoiceDate\": \"\",\n \"InvoiceNumber\": 0,\n \"InvoiceNumberPostfix\": \"\",\n \"InvoiceNumberPrefix\": \"\",\n \"IsCancelationFor\": \"\",\n \"IsFromBillbeeApi\": false,\n \"LanguageCode\": \"\",\n \"LastModifiedAt\": \"\",\n \"MerchantVatId\": \"\",\n \"OrderItems\": [\n {\n \"Attributes\": [\n {\n \"Id\": \"\",\n \"Name\": \"\",\n \"Price\": \"\",\n \"Value\": \"\"\n }\n ],\n \"BillbeeId\": 0,\n \"Discount\": \"\",\n \"DontAdjustStock\": false,\n \"GetPriceFromArticleIfAny\": false,\n \"InvoiceSKU\": \"\",\n \"IsCoupon\": false,\n \"Product\": {\n \"BillbeeId\": 0,\n \"CountryOfOrigin\": \"\",\n \"EAN\": \"\",\n \"Id\": \"\",\n \"Images\": [\n {\n \"ExternalId\": \"\",\n \"IsDefaultImage\": false,\n \"Position\": 0,\n \"Url\": \"\"\n }\n ],\n \"IsDigital\": false,\n \"OldId\": \"\",\n \"PlatformData\": \"\",\n \"SKU\": \"\",\n \"SkuOrId\": \"\",\n \"TARICCode\": \"\",\n \"Title\": \"\",\n \"Type\": 0,\n \"Weight\": 0\n },\n \"Quantity\": \"\",\n \"SerialNumber\": \"\",\n \"ShippingProfileId\": \"\",\n \"TaxAmount\": \"\",\n \"TaxIndex\": 0,\n \"TotalPrice\": \"\",\n \"TransactionId\": \"\",\n \"UnrebatedTotalPrice\": \"\"\n }\n ],\n \"OrderNumber\": \"\",\n \"PaidAmount\": \"\",\n \"PayedAt\": \"\",\n \"PaymentInstruction\": \"\",\n \"PaymentMethod\": 0,\n \"PaymentReference\": \"\",\n \"PaymentTransactionId\": \"\",\n \"Payments\": [\n {\n \"BillbeeId\": 0,\n \"Name\": \"\",\n \"PayDate\": \"\",\n \"PayValue\": \"\",\n \"PaymentType\": 0,\n \"Purpose\": \"\",\n \"SourceTechnology\": \"\",\n \"SourceText\": \"\",\n \"TransactionId\": \"\"\n }\n ],\n \"RebateDifference\": \"\",\n \"RestoredAt\": \"\",\n \"Seller\": {},\n \"SellerComment\": \"\",\n \"ShipWeightKg\": \"\",\n \"ShippedAt\": \"\",\n \"ShippingAddress\": {},\n \"ShippingCost\": \"\",\n \"ShippingIds\": [\n {\n \"BillbeeId\": 0,\n \"Created\": \"\",\n \"ShipmentType\": 0,\n \"Shipper\": \"\",\n \"ShippingCarrier\": 0,\n \"ShippingId\": \"\",\n \"ShippingProviderId\": 0,\n \"ShippingProviderProductId\": 0,\n \"TrackingUrl\": \"\"\n }\n ],\n \"ShippingProfileId\": \"\",\n \"ShippingProfileName\": \"\",\n \"ShippingProviderId\": 0,\n \"ShippingProviderName\": \"\",\n \"ShippingProviderProductId\": 0,\n \"ShippingProviderProductName\": \"\",\n \"ShippingServices\": [\n {\n \"CanBeConfigured\": false,\n \"DisplayName\": \"\",\n \"DisplayValue\": \"\",\n \"PossibleValueLists\": [\n {\n \"key\": \"\",\n \"value\": [\n {\n \"key\": 0,\n \"value\": \"\"\n }\n ]\n }\n ],\n \"RequiresUserInput\": false,\n \"ServiceName\": \"\",\n \"typeName\": \"\"\n }\n ],\n \"State\": 0,\n \"Tags\": [],\n \"TaxRate1\": \"\",\n \"TaxRate2\": \"\",\n \"TotalCost\": \"\",\n \"UpdatedAt\": \"\",\n \"VatId\": \"\",\n \"VatMode\": 0\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/v1/orders"
payload := strings.NewReader("{\n \"AcceptLossOfReturnRight\": false,\n \"AdjustmentCost\": \"\",\n \"AdjustmentReason\": \"\",\n \"ApiAccountId\": 0,\n \"ApiAccountName\": \"\",\n \"ArchivedAt\": \"\",\n \"BillBeeOrderId\": 0,\n \"BillBeeParentOrderId\": 0,\n \"Buyer\": {\n \"BillbeeShopId\": 0,\n \"BillbeeShopName\": \"\",\n \"Email\": \"\",\n \"FirstName\": \"\",\n \"FullName\": \"\",\n \"Id\": \"\",\n \"LastName\": \"\",\n \"Nick\": \"\",\n \"Platform\": \"\"\n },\n \"Comments\": [\n {\n \"Created\": \"\",\n \"FromCustomer\": false,\n \"Id\": 0,\n \"Name\": \"\",\n \"Text\": \"\"\n }\n ],\n \"ConfirmedAt\": \"\",\n \"CreatedAt\": \"\",\n \"Currency\": \"\",\n \"CustomInvoiceNote\": \"\",\n \"Customer\": {\n \"ArchivedAt\": \"\",\n \"DefaultCommercialMailAddress\": {\n \"Id\": 0,\n \"SubType\": \"\",\n \"TypeId\": 0,\n \"TypeName\": \"\",\n \"Value\": \"\"\n },\n \"DefaultFax\": {},\n \"DefaultMailAddress\": {},\n \"DefaultPhone1\": {},\n \"DefaultPhone2\": {},\n \"DefaultStatusUpdatesMailAddress\": {},\n \"Email\": \"\",\n \"Id\": 0,\n \"LanguageId\": 0,\n \"MetaData\": [\n {}\n ],\n \"Name\": \"\",\n \"Number\": 0,\n \"PriceGroupId\": 0,\n \"RestoredAt\": \"\",\n \"Tel1\": \"\",\n \"Tel2\": \"\",\n \"Type\": 0,\n \"VatId\": \"\"\n },\n \"CustomerNumber\": \"\",\n \"CustomerVatId\": \"\",\n \"DeliverySourceCountryCode\": \"\",\n \"DistributionCenter\": \"\",\n \"History\": [\n {\n \"Created\": \"\",\n \"EmployeeName\": \"\",\n \"EventTypeName\": \"\",\n \"Text\": \"\",\n \"TypeId\": 0\n }\n ],\n \"Id\": \"\",\n \"InvoiceAddress\": {\n \"BillbeeId\": 0,\n \"City\": \"\",\n \"Company\": \"\",\n \"Country\": \"\",\n \"CountryISO2\": \"\",\n \"Email\": \"\",\n \"FirstName\": \"\",\n \"HouseNumber\": \"\",\n \"LastName\": \"\",\n \"Line2\": \"\",\n \"NameAddition\": \"\",\n \"Phone\": \"\",\n \"State\": \"\",\n \"Street\": \"\",\n \"Zip\": \"\"\n },\n \"InvoiceDate\": \"\",\n \"InvoiceNumber\": 0,\n \"InvoiceNumberPostfix\": \"\",\n \"InvoiceNumberPrefix\": \"\",\n \"IsCancelationFor\": \"\",\n \"IsFromBillbeeApi\": false,\n \"LanguageCode\": \"\",\n \"LastModifiedAt\": \"\",\n \"MerchantVatId\": \"\",\n \"OrderItems\": [\n {\n \"Attributes\": [\n {\n \"Id\": \"\",\n \"Name\": \"\",\n \"Price\": \"\",\n \"Value\": \"\"\n }\n ],\n \"BillbeeId\": 0,\n \"Discount\": \"\",\n \"DontAdjustStock\": false,\n \"GetPriceFromArticleIfAny\": false,\n \"InvoiceSKU\": \"\",\n \"IsCoupon\": false,\n \"Product\": {\n \"BillbeeId\": 0,\n \"CountryOfOrigin\": \"\",\n \"EAN\": \"\",\n \"Id\": \"\",\n \"Images\": [\n {\n \"ExternalId\": \"\",\n \"IsDefaultImage\": false,\n \"Position\": 0,\n \"Url\": \"\"\n }\n ],\n \"IsDigital\": false,\n \"OldId\": \"\",\n \"PlatformData\": \"\",\n \"SKU\": \"\",\n \"SkuOrId\": \"\",\n \"TARICCode\": \"\",\n \"Title\": \"\",\n \"Type\": 0,\n \"Weight\": 0\n },\n \"Quantity\": \"\",\n \"SerialNumber\": \"\",\n \"ShippingProfileId\": \"\",\n \"TaxAmount\": \"\",\n \"TaxIndex\": 0,\n \"TotalPrice\": \"\",\n \"TransactionId\": \"\",\n \"UnrebatedTotalPrice\": \"\"\n }\n ],\n \"OrderNumber\": \"\",\n \"PaidAmount\": \"\",\n \"PayedAt\": \"\",\n \"PaymentInstruction\": \"\",\n \"PaymentMethod\": 0,\n \"PaymentReference\": \"\",\n \"PaymentTransactionId\": \"\",\n \"Payments\": [\n {\n \"BillbeeId\": 0,\n \"Name\": \"\",\n \"PayDate\": \"\",\n \"PayValue\": \"\",\n \"PaymentType\": 0,\n \"Purpose\": \"\",\n \"SourceTechnology\": \"\",\n \"SourceText\": \"\",\n \"TransactionId\": \"\"\n }\n ],\n \"RebateDifference\": \"\",\n \"RestoredAt\": \"\",\n \"Seller\": {},\n \"SellerComment\": \"\",\n \"ShipWeightKg\": \"\",\n \"ShippedAt\": \"\",\n \"ShippingAddress\": {},\n \"ShippingCost\": \"\",\n \"ShippingIds\": [\n {\n \"BillbeeId\": 0,\n \"Created\": \"\",\n \"ShipmentType\": 0,\n \"Shipper\": \"\",\n \"ShippingCarrier\": 0,\n \"ShippingId\": \"\",\n \"ShippingProviderId\": 0,\n \"ShippingProviderProductId\": 0,\n \"TrackingUrl\": \"\"\n }\n ],\n \"ShippingProfileId\": \"\",\n \"ShippingProfileName\": \"\",\n \"ShippingProviderId\": 0,\n \"ShippingProviderName\": \"\",\n \"ShippingProviderProductId\": 0,\n \"ShippingProviderProductName\": \"\",\n \"ShippingServices\": [\n {\n \"CanBeConfigured\": false,\n \"DisplayName\": \"\",\n \"DisplayValue\": \"\",\n \"PossibleValueLists\": [\n {\n \"key\": \"\",\n \"value\": [\n {\n \"key\": 0,\n \"value\": \"\"\n }\n ]\n }\n ],\n \"RequiresUserInput\": false,\n \"ServiceName\": \"\",\n \"typeName\": \"\"\n }\n ],\n \"State\": 0,\n \"Tags\": [],\n \"TaxRate1\": \"\",\n \"TaxRate2\": \"\",\n \"TotalCost\": \"\",\n \"UpdatedAt\": \"\",\n \"VatId\": \"\",\n \"VatMode\": 0\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/api/v1/orders HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 4575
{
"AcceptLossOfReturnRight": false,
"AdjustmentCost": "",
"AdjustmentReason": "",
"ApiAccountId": 0,
"ApiAccountName": "",
"ArchivedAt": "",
"BillBeeOrderId": 0,
"BillBeeParentOrderId": 0,
"Buyer": {
"BillbeeShopId": 0,
"BillbeeShopName": "",
"Email": "",
"FirstName": "",
"FullName": "",
"Id": "",
"LastName": "",
"Nick": "",
"Platform": ""
},
"Comments": [
{
"Created": "",
"FromCustomer": false,
"Id": 0,
"Name": "",
"Text": ""
}
],
"ConfirmedAt": "",
"CreatedAt": "",
"Currency": "",
"CustomInvoiceNote": "",
"Customer": {
"ArchivedAt": "",
"DefaultCommercialMailAddress": {
"Id": 0,
"SubType": "",
"TypeId": 0,
"TypeName": "",
"Value": ""
},
"DefaultFax": {},
"DefaultMailAddress": {},
"DefaultPhone1": {},
"DefaultPhone2": {},
"DefaultStatusUpdatesMailAddress": {},
"Email": "",
"Id": 0,
"LanguageId": 0,
"MetaData": [
{}
],
"Name": "",
"Number": 0,
"PriceGroupId": 0,
"RestoredAt": "",
"Tel1": "",
"Tel2": "",
"Type": 0,
"VatId": ""
},
"CustomerNumber": "",
"CustomerVatId": "",
"DeliverySourceCountryCode": "",
"DistributionCenter": "",
"History": [
{
"Created": "",
"EmployeeName": "",
"EventTypeName": "",
"Text": "",
"TypeId": 0
}
],
"Id": "",
"InvoiceAddress": {
"BillbeeId": 0,
"City": "",
"Company": "",
"Country": "",
"CountryISO2": "",
"Email": "",
"FirstName": "",
"HouseNumber": "",
"LastName": "",
"Line2": "",
"NameAddition": "",
"Phone": "",
"State": "",
"Street": "",
"Zip": ""
},
"InvoiceDate": "",
"InvoiceNumber": 0,
"InvoiceNumberPostfix": "",
"InvoiceNumberPrefix": "",
"IsCancelationFor": "",
"IsFromBillbeeApi": false,
"LanguageCode": "",
"LastModifiedAt": "",
"MerchantVatId": "",
"OrderItems": [
{
"Attributes": [
{
"Id": "",
"Name": "",
"Price": "",
"Value": ""
}
],
"BillbeeId": 0,
"Discount": "",
"DontAdjustStock": false,
"GetPriceFromArticleIfAny": false,
"InvoiceSKU": "",
"IsCoupon": false,
"Product": {
"BillbeeId": 0,
"CountryOfOrigin": "",
"EAN": "",
"Id": "",
"Images": [
{
"ExternalId": "",
"IsDefaultImage": false,
"Position": 0,
"Url": ""
}
],
"IsDigital": false,
"OldId": "",
"PlatformData": "",
"SKU": "",
"SkuOrId": "",
"TARICCode": "",
"Title": "",
"Type": 0,
"Weight": 0
},
"Quantity": "",
"SerialNumber": "",
"ShippingProfileId": "",
"TaxAmount": "",
"TaxIndex": 0,
"TotalPrice": "",
"TransactionId": "",
"UnrebatedTotalPrice": ""
}
],
"OrderNumber": "",
"PaidAmount": "",
"PayedAt": "",
"PaymentInstruction": "",
"PaymentMethod": 0,
"PaymentReference": "",
"PaymentTransactionId": "",
"Payments": [
{
"BillbeeId": 0,
"Name": "",
"PayDate": "",
"PayValue": "",
"PaymentType": 0,
"Purpose": "",
"SourceTechnology": "",
"SourceText": "",
"TransactionId": ""
}
],
"RebateDifference": "",
"RestoredAt": "",
"Seller": {},
"SellerComment": "",
"ShipWeightKg": "",
"ShippedAt": "",
"ShippingAddress": {},
"ShippingCost": "",
"ShippingIds": [
{
"BillbeeId": 0,
"Created": "",
"ShipmentType": 0,
"Shipper": "",
"ShippingCarrier": 0,
"ShippingId": "",
"ShippingProviderId": 0,
"ShippingProviderProductId": 0,
"TrackingUrl": ""
}
],
"ShippingProfileId": "",
"ShippingProfileName": "",
"ShippingProviderId": 0,
"ShippingProviderName": "",
"ShippingProviderProductId": 0,
"ShippingProviderProductName": "",
"ShippingServices": [
{
"CanBeConfigured": false,
"DisplayName": "",
"DisplayValue": "",
"PossibleValueLists": [
{
"key": "",
"value": [
{
"key": 0,
"value": ""
}
]
}
],
"RequiresUserInput": false,
"ServiceName": "",
"typeName": ""
}
],
"State": 0,
"Tags": [],
"TaxRate1": "",
"TaxRate2": "",
"TotalCost": "",
"UpdatedAt": "",
"VatId": "",
"VatMode": 0
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/api/v1/orders")
.setHeader("content-type", "application/json")
.setBody("{\n \"AcceptLossOfReturnRight\": false,\n \"AdjustmentCost\": \"\",\n \"AdjustmentReason\": \"\",\n \"ApiAccountId\": 0,\n \"ApiAccountName\": \"\",\n \"ArchivedAt\": \"\",\n \"BillBeeOrderId\": 0,\n \"BillBeeParentOrderId\": 0,\n \"Buyer\": {\n \"BillbeeShopId\": 0,\n \"BillbeeShopName\": \"\",\n \"Email\": \"\",\n \"FirstName\": \"\",\n \"FullName\": \"\",\n \"Id\": \"\",\n \"LastName\": \"\",\n \"Nick\": \"\",\n \"Platform\": \"\"\n },\n \"Comments\": [\n {\n \"Created\": \"\",\n \"FromCustomer\": false,\n \"Id\": 0,\n \"Name\": \"\",\n \"Text\": \"\"\n }\n ],\n \"ConfirmedAt\": \"\",\n \"CreatedAt\": \"\",\n \"Currency\": \"\",\n \"CustomInvoiceNote\": \"\",\n \"Customer\": {\n \"ArchivedAt\": \"\",\n \"DefaultCommercialMailAddress\": {\n \"Id\": 0,\n \"SubType\": \"\",\n \"TypeId\": 0,\n \"TypeName\": \"\",\n \"Value\": \"\"\n },\n \"DefaultFax\": {},\n \"DefaultMailAddress\": {},\n \"DefaultPhone1\": {},\n \"DefaultPhone2\": {},\n \"DefaultStatusUpdatesMailAddress\": {},\n \"Email\": \"\",\n \"Id\": 0,\n \"LanguageId\": 0,\n \"MetaData\": [\n {}\n ],\n \"Name\": \"\",\n \"Number\": 0,\n \"PriceGroupId\": 0,\n \"RestoredAt\": \"\",\n \"Tel1\": \"\",\n \"Tel2\": \"\",\n \"Type\": 0,\n \"VatId\": \"\"\n },\n \"CustomerNumber\": \"\",\n \"CustomerVatId\": \"\",\n \"DeliverySourceCountryCode\": \"\",\n \"DistributionCenter\": \"\",\n \"History\": [\n {\n \"Created\": \"\",\n \"EmployeeName\": \"\",\n \"EventTypeName\": \"\",\n \"Text\": \"\",\n \"TypeId\": 0\n }\n ],\n \"Id\": \"\",\n \"InvoiceAddress\": {\n \"BillbeeId\": 0,\n \"City\": \"\",\n \"Company\": \"\",\n \"Country\": \"\",\n \"CountryISO2\": \"\",\n \"Email\": \"\",\n \"FirstName\": \"\",\n \"HouseNumber\": \"\",\n \"LastName\": \"\",\n \"Line2\": \"\",\n \"NameAddition\": \"\",\n \"Phone\": \"\",\n \"State\": \"\",\n \"Street\": \"\",\n \"Zip\": \"\"\n },\n \"InvoiceDate\": \"\",\n \"InvoiceNumber\": 0,\n \"InvoiceNumberPostfix\": \"\",\n \"InvoiceNumberPrefix\": \"\",\n \"IsCancelationFor\": \"\",\n \"IsFromBillbeeApi\": false,\n \"LanguageCode\": \"\",\n \"LastModifiedAt\": \"\",\n \"MerchantVatId\": \"\",\n \"OrderItems\": [\n {\n \"Attributes\": [\n {\n \"Id\": \"\",\n \"Name\": \"\",\n \"Price\": \"\",\n \"Value\": \"\"\n }\n ],\n \"BillbeeId\": 0,\n \"Discount\": \"\",\n \"DontAdjustStock\": false,\n \"GetPriceFromArticleIfAny\": false,\n \"InvoiceSKU\": \"\",\n \"IsCoupon\": false,\n \"Product\": {\n \"BillbeeId\": 0,\n \"CountryOfOrigin\": \"\",\n \"EAN\": \"\",\n \"Id\": \"\",\n \"Images\": [\n {\n \"ExternalId\": \"\",\n \"IsDefaultImage\": false,\n \"Position\": 0,\n \"Url\": \"\"\n }\n ],\n \"IsDigital\": false,\n \"OldId\": \"\",\n \"PlatformData\": \"\",\n \"SKU\": \"\",\n \"SkuOrId\": \"\",\n \"TARICCode\": \"\",\n \"Title\": \"\",\n \"Type\": 0,\n \"Weight\": 0\n },\n \"Quantity\": \"\",\n \"SerialNumber\": \"\",\n \"ShippingProfileId\": \"\",\n \"TaxAmount\": \"\",\n \"TaxIndex\": 0,\n \"TotalPrice\": \"\",\n \"TransactionId\": \"\",\n \"UnrebatedTotalPrice\": \"\"\n }\n ],\n \"OrderNumber\": \"\",\n \"PaidAmount\": \"\",\n \"PayedAt\": \"\",\n \"PaymentInstruction\": \"\",\n \"PaymentMethod\": 0,\n \"PaymentReference\": \"\",\n \"PaymentTransactionId\": \"\",\n \"Payments\": [\n {\n \"BillbeeId\": 0,\n \"Name\": \"\",\n \"PayDate\": \"\",\n \"PayValue\": \"\",\n \"PaymentType\": 0,\n \"Purpose\": \"\",\n \"SourceTechnology\": \"\",\n \"SourceText\": \"\",\n \"TransactionId\": \"\"\n }\n ],\n \"RebateDifference\": \"\",\n \"RestoredAt\": \"\",\n \"Seller\": {},\n \"SellerComment\": \"\",\n \"ShipWeightKg\": \"\",\n \"ShippedAt\": \"\",\n \"ShippingAddress\": {},\n \"ShippingCost\": \"\",\n \"ShippingIds\": [\n {\n \"BillbeeId\": 0,\n \"Created\": \"\",\n \"ShipmentType\": 0,\n \"Shipper\": \"\",\n \"ShippingCarrier\": 0,\n \"ShippingId\": \"\",\n \"ShippingProviderId\": 0,\n \"ShippingProviderProductId\": 0,\n \"TrackingUrl\": \"\"\n }\n ],\n \"ShippingProfileId\": \"\",\n \"ShippingProfileName\": \"\",\n \"ShippingProviderId\": 0,\n \"ShippingProviderName\": \"\",\n \"ShippingProviderProductId\": 0,\n \"ShippingProviderProductName\": \"\",\n \"ShippingServices\": [\n {\n \"CanBeConfigured\": false,\n \"DisplayName\": \"\",\n \"DisplayValue\": \"\",\n \"PossibleValueLists\": [\n {\n \"key\": \"\",\n \"value\": [\n {\n \"key\": 0,\n \"value\": \"\"\n }\n ]\n }\n ],\n \"RequiresUserInput\": false,\n \"ServiceName\": \"\",\n \"typeName\": \"\"\n }\n ],\n \"State\": 0,\n \"Tags\": [],\n \"TaxRate1\": \"\",\n \"TaxRate2\": \"\",\n \"TotalCost\": \"\",\n \"UpdatedAt\": \"\",\n \"VatId\": \"\",\n \"VatMode\": 0\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/v1/orders"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"AcceptLossOfReturnRight\": false,\n \"AdjustmentCost\": \"\",\n \"AdjustmentReason\": \"\",\n \"ApiAccountId\": 0,\n \"ApiAccountName\": \"\",\n \"ArchivedAt\": \"\",\n \"BillBeeOrderId\": 0,\n \"BillBeeParentOrderId\": 0,\n \"Buyer\": {\n \"BillbeeShopId\": 0,\n \"BillbeeShopName\": \"\",\n \"Email\": \"\",\n \"FirstName\": \"\",\n \"FullName\": \"\",\n \"Id\": \"\",\n \"LastName\": \"\",\n \"Nick\": \"\",\n \"Platform\": \"\"\n },\n \"Comments\": [\n {\n \"Created\": \"\",\n \"FromCustomer\": false,\n \"Id\": 0,\n \"Name\": \"\",\n \"Text\": \"\"\n }\n ],\n \"ConfirmedAt\": \"\",\n \"CreatedAt\": \"\",\n \"Currency\": \"\",\n \"CustomInvoiceNote\": \"\",\n \"Customer\": {\n \"ArchivedAt\": \"\",\n \"DefaultCommercialMailAddress\": {\n \"Id\": 0,\n \"SubType\": \"\",\n \"TypeId\": 0,\n \"TypeName\": \"\",\n \"Value\": \"\"\n },\n \"DefaultFax\": {},\n \"DefaultMailAddress\": {},\n \"DefaultPhone1\": {},\n \"DefaultPhone2\": {},\n \"DefaultStatusUpdatesMailAddress\": {},\n \"Email\": \"\",\n \"Id\": 0,\n \"LanguageId\": 0,\n \"MetaData\": [\n {}\n ],\n \"Name\": \"\",\n \"Number\": 0,\n \"PriceGroupId\": 0,\n \"RestoredAt\": \"\",\n \"Tel1\": \"\",\n \"Tel2\": \"\",\n \"Type\": 0,\n \"VatId\": \"\"\n },\n \"CustomerNumber\": \"\",\n \"CustomerVatId\": \"\",\n \"DeliverySourceCountryCode\": \"\",\n \"DistributionCenter\": \"\",\n \"History\": [\n {\n \"Created\": \"\",\n \"EmployeeName\": \"\",\n \"EventTypeName\": \"\",\n \"Text\": \"\",\n \"TypeId\": 0\n }\n ],\n \"Id\": \"\",\n \"InvoiceAddress\": {\n \"BillbeeId\": 0,\n \"City\": \"\",\n \"Company\": \"\",\n \"Country\": \"\",\n \"CountryISO2\": \"\",\n \"Email\": \"\",\n \"FirstName\": \"\",\n \"HouseNumber\": \"\",\n \"LastName\": \"\",\n \"Line2\": \"\",\n \"NameAddition\": \"\",\n \"Phone\": \"\",\n \"State\": \"\",\n \"Street\": \"\",\n \"Zip\": \"\"\n },\n \"InvoiceDate\": \"\",\n \"InvoiceNumber\": 0,\n \"InvoiceNumberPostfix\": \"\",\n \"InvoiceNumberPrefix\": \"\",\n \"IsCancelationFor\": \"\",\n \"IsFromBillbeeApi\": false,\n \"LanguageCode\": \"\",\n \"LastModifiedAt\": \"\",\n \"MerchantVatId\": \"\",\n \"OrderItems\": [\n {\n \"Attributes\": [\n {\n \"Id\": \"\",\n \"Name\": \"\",\n \"Price\": \"\",\n \"Value\": \"\"\n }\n ],\n \"BillbeeId\": 0,\n \"Discount\": \"\",\n \"DontAdjustStock\": false,\n \"GetPriceFromArticleIfAny\": false,\n \"InvoiceSKU\": \"\",\n \"IsCoupon\": false,\n \"Product\": {\n \"BillbeeId\": 0,\n \"CountryOfOrigin\": \"\",\n \"EAN\": \"\",\n \"Id\": \"\",\n \"Images\": [\n {\n \"ExternalId\": \"\",\n \"IsDefaultImage\": false,\n \"Position\": 0,\n \"Url\": \"\"\n }\n ],\n \"IsDigital\": false,\n \"OldId\": \"\",\n \"PlatformData\": \"\",\n \"SKU\": \"\",\n \"SkuOrId\": \"\",\n \"TARICCode\": \"\",\n \"Title\": \"\",\n \"Type\": 0,\n \"Weight\": 0\n },\n \"Quantity\": \"\",\n \"SerialNumber\": \"\",\n \"ShippingProfileId\": \"\",\n \"TaxAmount\": \"\",\n \"TaxIndex\": 0,\n \"TotalPrice\": \"\",\n \"TransactionId\": \"\",\n \"UnrebatedTotalPrice\": \"\"\n }\n ],\n \"OrderNumber\": \"\",\n \"PaidAmount\": \"\",\n \"PayedAt\": \"\",\n \"PaymentInstruction\": \"\",\n \"PaymentMethod\": 0,\n \"PaymentReference\": \"\",\n \"PaymentTransactionId\": \"\",\n \"Payments\": [\n {\n \"BillbeeId\": 0,\n \"Name\": \"\",\n \"PayDate\": \"\",\n \"PayValue\": \"\",\n \"PaymentType\": 0,\n \"Purpose\": \"\",\n \"SourceTechnology\": \"\",\n \"SourceText\": \"\",\n \"TransactionId\": \"\"\n }\n ],\n \"RebateDifference\": \"\",\n \"RestoredAt\": \"\",\n \"Seller\": {},\n \"SellerComment\": \"\",\n \"ShipWeightKg\": \"\",\n \"ShippedAt\": \"\",\n \"ShippingAddress\": {},\n \"ShippingCost\": \"\",\n \"ShippingIds\": [\n {\n \"BillbeeId\": 0,\n \"Created\": \"\",\n \"ShipmentType\": 0,\n \"Shipper\": \"\",\n \"ShippingCarrier\": 0,\n \"ShippingId\": \"\",\n \"ShippingProviderId\": 0,\n \"ShippingProviderProductId\": 0,\n \"TrackingUrl\": \"\"\n }\n ],\n \"ShippingProfileId\": \"\",\n \"ShippingProfileName\": \"\",\n \"ShippingProviderId\": 0,\n \"ShippingProviderName\": \"\",\n \"ShippingProviderProductId\": 0,\n \"ShippingProviderProductName\": \"\",\n \"ShippingServices\": [\n {\n \"CanBeConfigured\": false,\n \"DisplayName\": \"\",\n \"DisplayValue\": \"\",\n \"PossibleValueLists\": [\n {\n \"key\": \"\",\n \"value\": [\n {\n \"key\": 0,\n \"value\": \"\"\n }\n ]\n }\n ],\n \"RequiresUserInput\": false,\n \"ServiceName\": \"\",\n \"typeName\": \"\"\n }\n ],\n \"State\": 0,\n \"Tags\": [],\n \"TaxRate1\": \"\",\n \"TaxRate2\": \"\",\n \"TotalCost\": \"\",\n \"UpdatedAt\": \"\",\n \"VatId\": \"\",\n \"VatMode\": 0\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 \"AcceptLossOfReturnRight\": false,\n \"AdjustmentCost\": \"\",\n \"AdjustmentReason\": \"\",\n \"ApiAccountId\": 0,\n \"ApiAccountName\": \"\",\n \"ArchivedAt\": \"\",\n \"BillBeeOrderId\": 0,\n \"BillBeeParentOrderId\": 0,\n \"Buyer\": {\n \"BillbeeShopId\": 0,\n \"BillbeeShopName\": \"\",\n \"Email\": \"\",\n \"FirstName\": \"\",\n \"FullName\": \"\",\n \"Id\": \"\",\n \"LastName\": \"\",\n \"Nick\": \"\",\n \"Platform\": \"\"\n },\n \"Comments\": [\n {\n \"Created\": \"\",\n \"FromCustomer\": false,\n \"Id\": 0,\n \"Name\": \"\",\n \"Text\": \"\"\n }\n ],\n \"ConfirmedAt\": \"\",\n \"CreatedAt\": \"\",\n \"Currency\": \"\",\n \"CustomInvoiceNote\": \"\",\n \"Customer\": {\n \"ArchivedAt\": \"\",\n \"DefaultCommercialMailAddress\": {\n \"Id\": 0,\n \"SubType\": \"\",\n \"TypeId\": 0,\n \"TypeName\": \"\",\n \"Value\": \"\"\n },\n \"DefaultFax\": {},\n \"DefaultMailAddress\": {},\n \"DefaultPhone1\": {},\n \"DefaultPhone2\": {},\n \"DefaultStatusUpdatesMailAddress\": {},\n \"Email\": \"\",\n \"Id\": 0,\n \"LanguageId\": 0,\n \"MetaData\": [\n {}\n ],\n \"Name\": \"\",\n \"Number\": 0,\n \"PriceGroupId\": 0,\n \"RestoredAt\": \"\",\n \"Tel1\": \"\",\n \"Tel2\": \"\",\n \"Type\": 0,\n \"VatId\": \"\"\n },\n \"CustomerNumber\": \"\",\n \"CustomerVatId\": \"\",\n \"DeliverySourceCountryCode\": \"\",\n \"DistributionCenter\": \"\",\n \"History\": [\n {\n \"Created\": \"\",\n \"EmployeeName\": \"\",\n \"EventTypeName\": \"\",\n \"Text\": \"\",\n \"TypeId\": 0\n }\n ],\n \"Id\": \"\",\n \"InvoiceAddress\": {\n \"BillbeeId\": 0,\n \"City\": \"\",\n \"Company\": \"\",\n \"Country\": \"\",\n \"CountryISO2\": \"\",\n \"Email\": \"\",\n \"FirstName\": \"\",\n \"HouseNumber\": \"\",\n \"LastName\": \"\",\n \"Line2\": \"\",\n \"NameAddition\": \"\",\n \"Phone\": \"\",\n \"State\": \"\",\n \"Street\": \"\",\n \"Zip\": \"\"\n },\n \"InvoiceDate\": \"\",\n \"InvoiceNumber\": 0,\n \"InvoiceNumberPostfix\": \"\",\n \"InvoiceNumberPrefix\": \"\",\n \"IsCancelationFor\": \"\",\n \"IsFromBillbeeApi\": false,\n \"LanguageCode\": \"\",\n \"LastModifiedAt\": \"\",\n \"MerchantVatId\": \"\",\n \"OrderItems\": [\n {\n \"Attributes\": [\n {\n \"Id\": \"\",\n \"Name\": \"\",\n \"Price\": \"\",\n \"Value\": \"\"\n }\n ],\n \"BillbeeId\": 0,\n \"Discount\": \"\",\n \"DontAdjustStock\": false,\n \"GetPriceFromArticleIfAny\": false,\n \"InvoiceSKU\": \"\",\n \"IsCoupon\": false,\n \"Product\": {\n \"BillbeeId\": 0,\n \"CountryOfOrigin\": \"\",\n \"EAN\": \"\",\n \"Id\": \"\",\n \"Images\": [\n {\n \"ExternalId\": \"\",\n \"IsDefaultImage\": false,\n \"Position\": 0,\n \"Url\": \"\"\n }\n ],\n \"IsDigital\": false,\n \"OldId\": \"\",\n \"PlatformData\": \"\",\n \"SKU\": \"\",\n \"SkuOrId\": \"\",\n \"TARICCode\": \"\",\n \"Title\": \"\",\n \"Type\": 0,\n \"Weight\": 0\n },\n \"Quantity\": \"\",\n \"SerialNumber\": \"\",\n \"ShippingProfileId\": \"\",\n \"TaxAmount\": \"\",\n \"TaxIndex\": 0,\n \"TotalPrice\": \"\",\n \"TransactionId\": \"\",\n \"UnrebatedTotalPrice\": \"\"\n }\n ],\n \"OrderNumber\": \"\",\n \"PaidAmount\": \"\",\n \"PayedAt\": \"\",\n \"PaymentInstruction\": \"\",\n \"PaymentMethod\": 0,\n \"PaymentReference\": \"\",\n \"PaymentTransactionId\": \"\",\n \"Payments\": [\n {\n \"BillbeeId\": 0,\n \"Name\": \"\",\n \"PayDate\": \"\",\n \"PayValue\": \"\",\n \"PaymentType\": 0,\n \"Purpose\": \"\",\n \"SourceTechnology\": \"\",\n \"SourceText\": \"\",\n \"TransactionId\": \"\"\n }\n ],\n \"RebateDifference\": \"\",\n \"RestoredAt\": \"\",\n \"Seller\": {},\n \"SellerComment\": \"\",\n \"ShipWeightKg\": \"\",\n \"ShippedAt\": \"\",\n \"ShippingAddress\": {},\n \"ShippingCost\": \"\",\n \"ShippingIds\": [\n {\n \"BillbeeId\": 0,\n \"Created\": \"\",\n \"ShipmentType\": 0,\n \"Shipper\": \"\",\n \"ShippingCarrier\": 0,\n \"ShippingId\": \"\",\n \"ShippingProviderId\": 0,\n \"ShippingProviderProductId\": 0,\n \"TrackingUrl\": \"\"\n }\n ],\n \"ShippingProfileId\": \"\",\n \"ShippingProfileName\": \"\",\n \"ShippingProviderId\": 0,\n \"ShippingProviderName\": \"\",\n \"ShippingProviderProductId\": 0,\n \"ShippingProviderProductName\": \"\",\n \"ShippingServices\": [\n {\n \"CanBeConfigured\": false,\n \"DisplayName\": \"\",\n \"DisplayValue\": \"\",\n \"PossibleValueLists\": [\n {\n \"key\": \"\",\n \"value\": [\n {\n \"key\": 0,\n \"value\": \"\"\n }\n ]\n }\n ],\n \"RequiresUserInput\": false,\n \"ServiceName\": \"\",\n \"typeName\": \"\"\n }\n ],\n \"State\": 0,\n \"Tags\": [],\n \"TaxRate1\": \"\",\n \"TaxRate2\": \"\",\n \"TotalCost\": \"\",\n \"UpdatedAt\": \"\",\n \"VatId\": \"\",\n \"VatMode\": 0\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/api/v1/orders")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/api/v1/orders")
.header("content-type", "application/json")
.body("{\n \"AcceptLossOfReturnRight\": false,\n \"AdjustmentCost\": \"\",\n \"AdjustmentReason\": \"\",\n \"ApiAccountId\": 0,\n \"ApiAccountName\": \"\",\n \"ArchivedAt\": \"\",\n \"BillBeeOrderId\": 0,\n \"BillBeeParentOrderId\": 0,\n \"Buyer\": {\n \"BillbeeShopId\": 0,\n \"BillbeeShopName\": \"\",\n \"Email\": \"\",\n \"FirstName\": \"\",\n \"FullName\": \"\",\n \"Id\": \"\",\n \"LastName\": \"\",\n \"Nick\": \"\",\n \"Platform\": \"\"\n },\n \"Comments\": [\n {\n \"Created\": \"\",\n \"FromCustomer\": false,\n \"Id\": 0,\n \"Name\": \"\",\n \"Text\": \"\"\n }\n ],\n \"ConfirmedAt\": \"\",\n \"CreatedAt\": \"\",\n \"Currency\": \"\",\n \"CustomInvoiceNote\": \"\",\n \"Customer\": {\n \"ArchivedAt\": \"\",\n \"DefaultCommercialMailAddress\": {\n \"Id\": 0,\n \"SubType\": \"\",\n \"TypeId\": 0,\n \"TypeName\": \"\",\n \"Value\": \"\"\n },\n \"DefaultFax\": {},\n \"DefaultMailAddress\": {},\n \"DefaultPhone1\": {},\n \"DefaultPhone2\": {},\n \"DefaultStatusUpdatesMailAddress\": {},\n \"Email\": \"\",\n \"Id\": 0,\n \"LanguageId\": 0,\n \"MetaData\": [\n {}\n ],\n \"Name\": \"\",\n \"Number\": 0,\n \"PriceGroupId\": 0,\n \"RestoredAt\": \"\",\n \"Tel1\": \"\",\n \"Tel2\": \"\",\n \"Type\": 0,\n \"VatId\": \"\"\n },\n \"CustomerNumber\": \"\",\n \"CustomerVatId\": \"\",\n \"DeliverySourceCountryCode\": \"\",\n \"DistributionCenter\": \"\",\n \"History\": [\n {\n \"Created\": \"\",\n \"EmployeeName\": \"\",\n \"EventTypeName\": \"\",\n \"Text\": \"\",\n \"TypeId\": 0\n }\n ],\n \"Id\": \"\",\n \"InvoiceAddress\": {\n \"BillbeeId\": 0,\n \"City\": \"\",\n \"Company\": \"\",\n \"Country\": \"\",\n \"CountryISO2\": \"\",\n \"Email\": \"\",\n \"FirstName\": \"\",\n \"HouseNumber\": \"\",\n \"LastName\": \"\",\n \"Line2\": \"\",\n \"NameAddition\": \"\",\n \"Phone\": \"\",\n \"State\": \"\",\n \"Street\": \"\",\n \"Zip\": \"\"\n },\n \"InvoiceDate\": \"\",\n \"InvoiceNumber\": 0,\n \"InvoiceNumberPostfix\": \"\",\n \"InvoiceNumberPrefix\": \"\",\n \"IsCancelationFor\": \"\",\n \"IsFromBillbeeApi\": false,\n \"LanguageCode\": \"\",\n \"LastModifiedAt\": \"\",\n \"MerchantVatId\": \"\",\n \"OrderItems\": [\n {\n \"Attributes\": [\n {\n \"Id\": \"\",\n \"Name\": \"\",\n \"Price\": \"\",\n \"Value\": \"\"\n }\n ],\n \"BillbeeId\": 0,\n \"Discount\": \"\",\n \"DontAdjustStock\": false,\n \"GetPriceFromArticleIfAny\": false,\n \"InvoiceSKU\": \"\",\n \"IsCoupon\": false,\n \"Product\": {\n \"BillbeeId\": 0,\n \"CountryOfOrigin\": \"\",\n \"EAN\": \"\",\n \"Id\": \"\",\n \"Images\": [\n {\n \"ExternalId\": \"\",\n \"IsDefaultImage\": false,\n \"Position\": 0,\n \"Url\": \"\"\n }\n ],\n \"IsDigital\": false,\n \"OldId\": \"\",\n \"PlatformData\": \"\",\n \"SKU\": \"\",\n \"SkuOrId\": \"\",\n \"TARICCode\": \"\",\n \"Title\": \"\",\n \"Type\": 0,\n \"Weight\": 0\n },\n \"Quantity\": \"\",\n \"SerialNumber\": \"\",\n \"ShippingProfileId\": \"\",\n \"TaxAmount\": \"\",\n \"TaxIndex\": 0,\n \"TotalPrice\": \"\",\n \"TransactionId\": \"\",\n \"UnrebatedTotalPrice\": \"\"\n }\n ],\n \"OrderNumber\": \"\",\n \"PaidAmount\": \"\",\n \"PayedAt\": \"\",\n \"PaymentInstruction\": \"\",\n \"PaymentMethod\": 0,\n \"PaymentReference\": \"\",\n \"PaymentTransactionId\": \"\",\n \"Payments\": [\n {\n \"BillbeeId\": 0,\n \"Name\": \"\",\n \"PayDate\": \"\",\n \"PayValue\": \"\",\n \"PaymentType\": 0,\n \"Purpose\": \"\",\n \"SourceTechnology\": \"\",\n \"SourceText\": \"\",\n \"TransactionId\": \"\"\n }\n ],\n \"RebateDifference\": \"\",\n \"RestoredAt\": \"\",\n \"Seller\": {},\n \"SellerComment\": \"\",\n \"ShipWeightKg\": \"\",\n \"ShippedAt\": \"\",\n \"ShippingAddress\": {},\n \"ShippingCost\": \"\",\n \"ShippingIds\": [\n {\n \"BillbeeId\": 0,\n \"Created\": \"\",\n \"ShipmentType\": 0,\n \"Shipper\": \"\",\n \"ShippingCarrier\": 0,\n \"ShippingId\": \"\",\n \"ShippingProviderId\": 0,\n \"ShippingProviderProductId\": 0,\n \"TrackingUrl\": \"\"\n }\n ],\n \"ShippingProfileId\": \"\",\n \"ShippingProfileName\": \"\",\n \"ShippingProviderId\": 0,\n \"ShippingProviderName\": \"\",\n \"ShippingProviderProductId\": 0,\n \"ShippingProviderProductName\": \"\",\n \"ShippingServices\": [\n {\n \"CanBeConfigured\": false,\n \"DisplayName\": \"\",\n \"DisplayValue\": \"\",\n \"PossibleValueLists\": [\n {\n \"key\": \"\",\n \"value\": [\n {\n \"key\": 0,\n \"value\": \"\"\n }\n ]\n }\n ],\n \"RequiresUserInput\": false,\n \"ServiceName\": \"\",\n \"typeName\": \"\"\n }\n ],\n \"State\": 0,\n \"Tags\": [],\n \"TaxRate1\": \"\",\n \"TaxRate2\": \"\",\n \"TotalCost\": \"\",\n \"UpdatedAt\": \"\",\n \"VatId\": \"\",\n \"VatMode\": 0\n}")
.asString();
const data = JSON.stringify({
AcceptLossOfReturnRight: false,
AdjustmentCost: '',
AdjustmentReason: '',
ApiAccountId: 0,
ApiAccountName: '',
ArchivedAt: '',
BillBeeOrderId: 0,
BillBeeParentOrderId: 0,
Buyer: {
BillbeeShopId: 0,
BillbeeShopName: '',
Email: '',
FirstName: '',
FullName: '',
Id: '',
LastName: '',
Nick: '',
Platform: ''
},
Comments: [
{
Created: '',
FromCustomer: false,
Id: 0,
Name: '',
Text: ''
}
],
ConfirmedAt: '',
CreatedAt: '',
Currency: '',
CustomInvoiceNote: '',
Customer: {
ArchivedAt: '',
DefaultCommercialMailAddress: {
Id: 0,
SubType: '',
TypeId: 0,
TypeName: '',
Value: ''
},
DefaultFax: {},
DefaultMailAddress: {},
DefaultPhone1: {},
DefaultPhone2: {},
DefaultStatusUpdatesMailAddress: {},
Email: '',
Id: 0,
LanguageId: 0,
MetaData: [
{}
],
Name: '',
Number: 0,
PriceGroupId: 0,
RestoredAt: '',
Tel1: '',
Tel2: '',
Type: 0,
VatId: ''
},
CustomerNumber: '',
CustomerVatId: '',
DeliverySourceCountryCode: '',
DistributionCenter: '',
History: [
{
Created: '',
EmployeeName: '',
EventTypeName: '',
Text: '',
TypeId: 0
}
],
Id: '',
InvoiceAddress: {
BillbeeId: 0,
City: '',
Company: '',
Country: '',
CountryISO2: '',
Email: '',
FirstName: '',
HouseNumber: '',
LastName: '',
Line2: '',
NameAddition: '',
Phone: '',
State: '',
Street: '',
Zip: ''
},
InvoiceDate: '',
InvoiceNumber: 0,
InvoiceNumberPostfix: '',
InvoiceNumberPrefix: '',
IsCancelationFor: '',
IsFromBillbeeApi: false,
LanguageCode: '',
LastModifiedAt: '',
MerchantVatId: '',
OrderItems: [
{
Attributes: [
{
Id: '',
Name: '',
Price: '',
Value: ''
}
],
BillbeeId: 0,
Discount: '',
DontAdjustStock: false,
GetPriceFromArticleIfAny: false,
InvoiceSKU: '',
IsCoupon: false,
Product: {
BillbeeId: 0,
CountryOfOrigin: '',
EAN: '',
Id: '',
Images: [
{
ExternalId: '',
IsDefaultImage: false,
Position: 0,
Url: ''
}
],
IsDigital: false,
OldId: '',
PlatformData: '',
SKU: '',
SkuOrId: '',
TARICCode: '',
Title: '',
Type: 0,
Weight: 0
},
Quantity: '',
SerialNumber: '',
ShippingProfileId: '',
TaxAmount: '',
TaxIndex: 0,
TotalPrice: '',
TransactionId: '',
UnrebatedTotalPrice: ''
}
],
OrderNumber: '',
PaidAmount: '',
PayedAt: '',
PaymentInstruction: '',
PaymentMethod: 0,
PaymentReference: '',
PaymentTransactionId: '',
Payments: [
{
BillbeeId: 0,
Name: '',
PayDate: '',
PayValue: '',
PaymentType: 0,
Purpose: '',
SourceTechnology: '',
SourceText: '',
TransactionId: ''
}
],
RebateDifference: '',
RestoredAt: '',
Seller: {},
SellerComment: '',
ShipWeightKg: '',
ShippedAt: '',
ShippingAddress: {},
ShippingCost: '',
ShippingIds: [
{
BillbeeId: 0,
Created: '',
ShipmentType: 0,
Shipper: '',
ShippingCarrier: 0,
ShippingId: '',
ShippingProviderId: 0,
ShippingProviderProductId: 0,
TrackingUrl: ''
}
],
ShippingProfileId: '',
ShippingProfileName: '',
ShippingProviderId: 0,
ShippingProviderName: '',
ShippingProviderProductId: 0,
ShippingProviderProductName: '',
ShippingServices: [
{
CanBeConfigured: false,
DisplayName: '',
DisplayValue: '',
PossibleValueLists: [
{
key: '',
value: [
{
key: 0,
value: ''
}
]
}
],
RequiresUserInput: false,
ServiceName: '',
typeName: ''
}
],
State: 0,
Tags: [],
TaxRate1: '',
TaxRate2: '',
TotalCost: '',
UpdatedAt: '',
VatId: '',
VatMode: 0
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/api/v1/orders');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/api/v1/orders',
headers: {'content-type': 'application/json'},
data: {
AcceptLossOfReturnRight: false,
AdjustmentCost: '',
AdjustmentReason: '',
ApiAccountId: 0,
ApiAccountName: '',
ArchivedAt: '',
BillBeeOrderId: 0,
BillBeeParentOrderId: 0,
Buyer: {
BillbeeShopId: 0,
BillbeeShopName: '',
Email: '',
FirstName: '',
FullName: '',
Id: '',
LastName: '',
Nick: '',
Platform: ''
},
Comments: [{Created: '', FromCustomer: false, Id: 0, Name: '', Text: ''}],
ConfirmedAt: '',
CreatedAt: '',
Currency: '',
CustomInvoiceNote: '',
Customer: {
ArchivedAt: '',
DefaultCommercialMailAddress: {Id: 0, SubType: '', TypeId: 0, TypeName: '', Value: ''},
DefaultFax: {},
DefaultMailAddress: {},
DefaultPhone1: {},
DefaultPhone2: {},
DefaultStatusUpdatesMailAddress: {},
Email: '',
Id: 0,
LanguageId: 0,
MetaData: [{}],
Name: '',
Number: 0,
PriceGroupId: 0,
RestoredAt: '',
Tel1: '',
Tel2: '',
Type: 0,
VatId: ''
},
CustomerNumber: '',
CustomerVatId: '',
DeliverySourceCountryCode: '',
DistributionCenter: '',
History: [{Created: '', EmployeeName: '', EventTypeName: '', Text: '', TypeId: 0}],
Id: '',
InvoiceAddress: {
BillbeeId: 0,
City: '',
Company: '',
Country: '',
CountryISO2: '',
Email: '',
FirstName: '',
HouseNumber: '',
LastName: '',
Line2: '',
NameAddition: '',
Phone: '',
State: '',
Street: '',
Zip: ''
},
InvoiceDate: '',
InvoiceNumber: 0,
InvoiceNumberPostfix: '',
InvoiceNumberPrefix: '',
IsCancelationFor: '',
IsFromBillbeeApi: false,
LanguageCode: '',
LastModifiedAt: '',
MerchantVatId: '',
OrderItems: [
{
Attributes: [{Id: '', Name: '', Price: '', Value: ''}],
BillbeeId: 0,
Discount: '',
DontAdjustStock: false,
GetPriceFromArticleIfAny: false,
InvoiceSKU: '',
IsCoupon: false,
Product: {
BillbeeId: 0,
CountryOfOrigin: '',
EAN: '',
Id: '',
Images: [{ExternalId: '', IsDefaultImage: false, Position: 0, Url: ''}],
IsDigital: false,
OldId: '',
PlatformData: '',
SKU: '',
SkuOrId: '',
TARICCode: '',
Title: '',
Type: 0,
Weight: 0
},
Quantity: '',
SerialNumber: '',
ShippingProfileId: '',
TaxAmount: '',
TaxIndex: 0,
TotalPrice: '',
TransactionId: '',
UnrebatedTotalPrice: ''
}
],
OrderNumber: '',
PaidAmount: '',
PayedAt: '',
PaymentInstruction: '',
PaymentMethod: 0,
PaymentReference: '',
PaymentTransactionId: '',
Payments: [
{
BillbeeId: 0,
Name: '',
PayDate: '',
PayValue: '',
PaymentType: 0,
Purpose: '',
SourceTechnology: '',
SourceText: '',
TransactionId: ''
}
],
RebateDifference: '',
RestoredAt: '',
Seller: {},
SellerComment: '',
ShipWeightKg: '',
ShippedAt: '',
ShippingAddress: {},
ShippingCost: '',
ShippingIds: [
{
BillbeeId: 0,
Created: '',
ShipmentType: 0,
Shipper: '',
ShippingCarrier: 0,
ShippingId: '',
ShippingProviderId: 0,
ShippingProviderProductId: 0,
TrackingUrl: ''
}
],
ShippingProfileId: '',
ShippingProfileName: '',
ShippingProviderId: 0,
ShippingProviderName: '',
ShippingProviderProductId: 0,
ShippingProviderProductName: '',
ShippingServices: [
{
CanBeConfigured: false,
DisplayName: '',
DisplayValue: '',
PossibleValueLists: [{key: '', value: [{key: 0, value: ''}]}],
RequiresUserInput: false,
ServiceName: '',
typeName: ''
}
],
State: 0,
Tags: [],
TaxRate1: '',
TaxRate2: '',
TotalCost: '',
UpdatedAt: '',
VatId: '',
VatMode: 0
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/v1/orders';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"AcceptLossOfReturnRight":false,"AdjustmentCost":"","AdjustmentReason":"","ApiAccountId":0,"ApiAccountName":"","ArchivedAt":"","BillBeeOrderId":0,"BillBeeParentOrderId":0,"Buyer":{"BillbeeShopId":0,"BillbeeShopName":"","Email":"","FirstName":"","FullName":"","Id":"","LastName":"","Nick":"","Platform":""},"Comments":[{"Created":"","FromCustomer":false,"Id":0,"Name":"","Text":""}],"ConfirmedAt":"","CreatedAt":"","Currency":"","CustomInvoiceNote":"","Customer":{"ArchivedAt":"","DefaultCommercialMailAddress":{"Id":0,"SubType":"","TypeId":0,"TypeName":"","Value":""},"DefaultFax":{},"DefaultMailAddress":{},"DefaultPhone1":{},"DefaultPhone2":{},"DefaultStatusUpdatesMailAddress":{},"Email":"","Id":0,"LanguageId":0,"MetaData":[{}],"Name":"","Number":0,"PriceGroupId":0,"RestoredAt":"","Tel1":"","Tel2":"","Type":0,"VatId":""},"CustomerNumber":"","CustomerVatId":"","DeliverySourceCountryCode":"","DistributionCenter":"","History":[{"Created":"","EmployeeName":"","EventTypeName":"","Text":"","TypeId":0}],"Id":"","InvoiceAddress":{"BillbeeId":0,"City":"","Company":"","Country":"","CountryISO2":"","Email":"","FirstName":"","HouseNumber":"","LastName":"","Line2":"","NameAddition":"","Phone":"","State":"","Street":"","Zip":""},"InvoiceDate":"","InvoiceNumber":0,"InvoiceNumberPostfix":"","InvoiceNumberPrefix":"","IsCancelationFor":"","IsFromBillbeeApi":false,"LanguageCode":"","LastModifiedAt":"","MerchantVatId":"","OrderItems":[{"Attributes":[{"Id":"","Name":"","Price":"","Value":""}],"BillbeeId":0,"Discount":"","DontAdjustStock":false,"GetPriceFromArticleIfAny":false,"InvoiceSKU":"","IsCoupon":false,"Product":{"BillbeeId":0,"CountryOfOrigin":"","EAN":"","Id":"","Images":[{"ExternalId":"","IsDefaultImage":false,"Position":0,"Url":""}],"IsDigital":false,"OldId":"","PlatformData":"","SKU":"","SkuOrId":"","TARICCode":"","Title":"","Type":0,"Weight":0},"Quantity":"","SerialNumber":"","ShippingProfileId":"","TaxAmount":"","TaxIndex":0,"TotalPrice":"","TransactionId":"","UnrebatedTotalPrice":""}],"OrderNumber":"","PaidAmount":"","PayedAt":"","PaymentInstruction":"","PaymentMethod":0,"PaymentReference":"","PaymentTransactionId":"","Payments":[{"BillbeeId":0,"Name":"","PayDate":"","PayValue":"","PaymentType":0,"Purpose":"","SourceTechnology":"","SourceText":"","TransactionId":""}],"RebateDifference":"","RestoredAt":"","Seller":{},"SellerComment":"","ShipWeightKg":"","ShippedAt":"","ShippingAddress":{},"ShippingCost":"","ShippingIds":[{"BillbeeId":0,"Created":"","ShipmentType":0,"Shipper":"","ShippingCarrier":0,"ShippingId":"","ShippingProviderId":0,"ShippingProviderProductId":0,"TrackingUrl":""}],"ShippingProfileId":"","ShippingProfileName":"","ShippingProviderId":0,"ShippingProviderName":"","ShippingProviderProductId":0,"ShippingProviderProductName":"","ShippingServices":[{"CanBeConfigured":false,"DisplayName":"","DisplayValue":"","PossibleValueLists":[{"key":"","value":[{"key":0,"value":""}]}],"RequiresUserInput":false,"ServiceName":"","typeName":""}],"State":0,"Tags":[],"TaxRate1":"","TaxRate2":"","TotalCost":"","UpdatedAt":"","VatId":"","VatMode":0}'
};
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}}/api/v1/orders',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "AcceptLossOfReturnRight": false,\n "AdjustmentCost": "",\n "AdjustmentReason": "",\n "ApiAccountId": 0,\n "ApiAccountName": "",\n "ArchivedAt": "",\n "BillBeeOrderId": 0,\n "BillBeeParentOrderId": 0,\n "Buyer": {\n "BillbeeShopId": 0,\n "BillbeeShopName": "",\n "Email": "",\n "FirstName": "",\n "FullName": "",\n "Id": "",\n "LastName": "",\n "Nick": "",\n "Platform": ""\n },\n "Comments": [\n {\n "Created": "",\n "FromCustomer": false,\n "Id": 0,\n "Name": "",\n "Text": ""\n }\n ],\n "ConfirmedAt": "",\n "CreatedAt": "",\n "Currency": "",\n "CustomInvoiceNote": "",\n "Customer": {\n "ArchivedAt": "",\n "DefaultCommercialMailAddress": {\n "Id": 0,\n "SubType": "",\n "TypeId": 0,\n "TypeName": "",\n "Value": ""\n },\n "DefaultFax": {},\n "DefaultMailAddress": {},\n "DefaultPhone1": {},\n "DefaultPhone2": {},\n "DefaultStatusUpdatesMailAddress": {},\n "Email": "",\n "Id": 0,\n "LanguageId": 0,\n "MetaData": [\n {}\n ],\n "Name": "",\n "Number": 0,\n "PriceGroupId": 0,\n "RestoredAt": "",\n "Tel1": "",\n "Tel2": "",\n "Type": 0,\n "VatId": ""\n },\n "CustomerNumber": "",\n "CustomerVatId": "",\n "DeliverySourceCountryCode": "",\n "DistributionCenter": "",\n "History": [\n {\n "Created": "",\n "EmployeeName": "",\n "EventTypeName": "",\n "Text": "",\n "TypeId": 0\n }\n ],\n "Id": "",\n "InvoiceAddress": {\n "BillbeeId": 0,\n "City": "",\n "Company": "",\n "Country": "",\n "CountryISO2": "",\n "Email": "",\n "FirstName": "",\n "HouseNumber": "",\n "LastName": "",\n "Line2": "",\n "NameAddition": "",\n "Phone": "",\n "State": "",\n "Street": "",\n "Zip": ""\n },\n "InvoiceDate": "",\n "InvoiceNumber": 0,\n "InvoiceNumberPostfix": "",\n "InvoiceNumberPrefix": "",\n "IsCancelationFor": "",\n "IsFromBillbeeApi": false,\n "LanguageCode": "",\n "LastModifiedAt": "",\n "MerchantVatId": "",\n "OrderItems": [\n {\n "Attributes": [\n {\n "Id": "",\n "Name": "",\n "Price": "",\n "Value": ""\n }\n ],\n "BillbeeId": 0,\n "Discount": "",\n "DontAdjustStock": false,\n "GetPriceFromArticleIfAny": false,\n "InvoiceSKU": "",\n "IsCoupon": false,\n "Product": {\n "BillbeeId": 0,\n "CountryOfOrigin": "",\n "EAN": "",\n "Id": "",\n "Images": [\n {\n "ExternalId": "",\n "IsDefaultImage": false,\n "Position": 0,\n "Url": ""\n }\n ],\n "IsDigital": false,\n "OldId": "",\n "PlatformData": "",\n "SKU": "",\n "SkuOrId": "",\n "TARICCode": "",\n "Title": "",\n "Type": 0,\n "Weight": 0\n },\n "Quantity": "",\n "SerialNumber": "",\n "ShippingProfileId": "",\n "TaxAmount": "",\n "TaxIndex": 0,\n "TotalPrice": "",\n "TransactionId": "",\n "UnrebatedTotalPrice": ""\n }\n ],\n "OrderNumber": "",\n "PaidAmount": "",\n "PayedAt": "",\n "PaymentInstruction": "",\n "PaymentMethod": 0,\n "PaymentReference": "",\n "PaymentTransactionId": "",\n "Payments": [\n {\n "BillbeeId": 0,\n "Name": "",\n "PayDate": "",\n "PayValue": "",\n "PaymentType": 0,\n "Purpose": "",\n "SourceTechnology": "",\n "SourceText": "",\n "TransactionId": ""\n }\n ],\n "RebateDifference": "",\n "RestoredAt": "",\n "Seller": {},\n "SellerComment": "",\n "ShipWeightKg": "",\n "ShippedAt": "",\n "ShippingAddress": {},\n "ShippingCost": "",\n "ShippingIds": [\n {\n "BillbeeId": 0,\n "Created": "",\n "ShipmentType": 0,\n "Shipper": "",\n "ShippingCarrier": 0,\n "ShippingId": "",\n "ShippingProviderId": 0,\n "ShippingProviderProductId": 0,\n "TrackingUrl": ""\n }\n ],\n "ShippingProfileId": "",\n "ShippingProfileName": "",\n "ShippingProviderId": 0,\n "ShippingProviderName": "",\n "ShippingProviderProductId": 0,\n "ShippingProviderProductName": "",\n "ShippingServices": [\n {\n "CanBeConfigured": false,\n "DisplayName": "",\n "DisplayValue": "",\n "PossibleValueLists": [\n {\n "key": "",\n "value": [\n {\n "key": 0,\n "value": ""\n }\n ]\n }\n ],\n "RequiresUserInput": false,\n "ServiceName": "",\n "typeName": ""\n }\n ],\n "State": 0,\n "Tags": [],\n "TaxRate1": "",\n "TaxRate2": "",\n "TotalCost": "",\n "UpdatedAt": "",\n "VatId": "",\n "VatMode": 0\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"AcceptLossOfReturnRight\": false,\n \"AdjustmentCost\": \"\",\n \"AdjustmentReason\": \"\",\n \"ApiAccountId\": 0,\n \"ApiAccountName\": \"\",\n \"ArchivedAt\": \"\",\n \"BillBeeOrderId\": 0,\n \"BillBeeParentOrderId\": 0,\n \"Buyer\": {\n \"BillbeeShopId\": 0,\n \"BillbeeShopName\": \"\",\n \"Email\": \"\",\n \"FirstName\": \"\",\n \"FullName\": \"\",\n \"Id\": \"\",\n \"LastName\": \"\",\n \"Nick\": \"\",\n \"Platform\": \"\"\n },\n \"Comments\": [\n {\n \"Created\": \"\",\n \"FromCustomer\": false,\n \"Id\": 0,\n \"Name\": \"\",\n \"Text\": \"\"\n }\n ],\n \"ConfirmedAt\": \"\",\n \"CreatedAt\": \"\",\n \"Currency\": \"\",\n \"CustomInvoiceNote\": \"\",\n \"Customer\": {\n \"ArchivedAt\": \"\",\n \"DefaultCommercialMailAddress\": {\n \"Id\": 0,\n \"SubType\": \"\",\n \"TypeId\": 0,\n \"TypeName\": \"\",\n \"Value\": \"\"\n },\n \"DefaultFax\": {},\n \"DefaultMailAddress\": {},\n \"DefaultPhone1\": {},\n \"DefaultPhone2\": {},\n \"DefaultStatusUpdatesMailAddress\": {},\n \"Email\": \"\",\n \"Id\": 0,\n \"LanguageId\": 0,\n \"MetaData\": [\n {}\n ],\n \"Name\": \"\",\n \"Number\": 0,\n \"PriceGroupId\": 0,\n \"RestoredAt\": \"\",\n \"Tel1\": \"\",\n \"Tel2\": \"\",\n \"Type\": 0,\n \"VatId\": \"\"\n },\n \"CustomerNumber\": \"\",\n \"CustomerVatId\": \"\",\n \"DeliverySourceCountryCode\": \"\",\n \"DistributionCenter\": \"\",\n \"History\": [\n {\n \"Created\": \"\",\n \"EmployeeName\": \"\",\n \"EventTypeName\": \"\",\n \"Text\": \"\",\n \"TypeId\": 0\n }\n ],\n \"Id\": \"\",\n \"InvoiceAddress\": {\n \"BillbeeId\": 0,\n \"City\": \"\",\n \"Company\": \"\",\n \"Country\": \"\",\n \"CountryISO2\": \"\",\n \"Email\": \"\",\n \"FirstName\": \"\",\n \"HouseNumber\": \"\",\n \"LastName\": \"\",\n \"Line2\": \"\",\n \"NameAddition\": \"\",\n \"Phone\": \"\",\n \"State\": \"\",\n \"Street\": \"\",\n \"Zip\": \"\"\n },\n \"InvoiceDate\": \"\",\n \"InvoiceNumber\": 0,\n \"InvoiceNumberPostfix\": \"\",\n \"InvoiceNumberPrefix\": \"\",\n \"IsCancelationFor\": \"\",\n \"IsFromBillbeeApi\": false,\n \"LanguageCode\": \"\",\n \"LastModifiedAt\": \"\",\n \"MerchantVatId\": \"\",\n \"OrderItems\": [\n {\n \"Attributes\": [\n {\n \"Id\": \"\",\n \"Name\": \"\",\n \"Price\": \"\",\n \"Value\": \"\"\n }\n ],\n \"BillbeeId\": 0,\n \"Discount\": \"\",\n \"DontAdjustStock\": false,\n \"GetPriceFromArticleIfAny\": false,\n \"InvoiceSKU\": \"\",\n \"IsCoupon\": false,\n \"Product\": {\n \"BillbeeId\": 0,\n \"CountryOfOrigin\": \"\",\n \"EAN\": \"\",\n \"Id\": \"\",\n \"Images\": [\n {\n \"ExternalId\": \"\",\n \"IsDefaultImage\": false,\n \"Position\": 0,\n \"Url\": \"\"\n }\n ],\n \"IsDigital\": false,\n \"OldId\": \"\",\n \"PlatformData\": \"\",\n \"SKU\": \"\",\n \"SkuOrId\": \"\",\n \"TARICCode\": \"\",\n \"Title\": \"\",\n \"Type\": 0,\n \"Weight\": 0\n },\n \"Quantity\": \"\",\n \"SerialNumber\": \"\",\n \"ShippingProfileId\": \"\",\n \"TaxAmount\": \"\",\n \"TaxIndex\": 0,\n \"TotalPrice\": \"\",\n \"TransactionId\": \"\",\n \"UnrebatedTotalPrice\": \"\"\n }\n ],\n \"OrderNumber\": \"\",\n \"PaidAmount\": \"\",\n \"PayedAt\": \"\",\n \"PaymentInstruction\": \"\",\n \"PaymentMethod\": 0,\n \"PaymentReference\": \"\",\n \"PaymentTransactionId\": \"\",\n \"Payments\": [\n {\n \"BillbeeId\": 0,\n \"Name\": \"\",\n \"PayDate\": \"\",\n \"PayValue\": \"\",\n \"PaymentType\": 0,\n \"Purpose\": \"\",\n \"SourceTechnology\": \"\",\n \"SourceText\": \"\",\n \"TransactionId\": \"\"\n }\n ],\n \"RebateDifference\": \"\",\n \"RestoredAt\": \"\",\n \"Seller\": {},\n \"SellerComment\": \"\",\n \"ShipWeightKg\": \"\",\n \"ShippedAt\": \"\",\n \"ShippingAddress\": {},\n \"ShippingCost\": \"\",\n \"ShippingIds\": [\n {\n \"BillbeeId\": 0,\n \"Created\": \"\",\n \"ShipmentType\": 0,\n \"Shipper\": \"\",\n \"ShippingCarrier\": 0,\n \"ShippingId\": \"\",\n \"ShippingProviderId\": 0,\n \"ShippingProviderProductId\": 0,\n \"TrackingUrl\": \"\"\n }\n ],\n \"ShippingProfileId\": \"\",\n \"ShippingProfileName\": \"\",\n \"ShippingProviderId\": 0,\n \"ShippingProviderName\": \"\",\n \"ShippingProviderProductId\": 0,\n \"ShippingProviderProductName\": \"\",\n \"ShippingServices\": [\n {\n \"CanBeConfigured\": false,\n \"DisplayName\": \"\",\n \"DisplayValue\": \"\",\n \"PossibleValueLists\": [\n {\n \"key\": \"\",\n \"value\": [\n {\n \"key\": 0,\n \"value\": \"\"\n }\n ]\n }\n ],\n \"RequiresUserInput\": false,\n \"ServiceName\": \"\",\n \"typeName\": \"\"\n }\n ],\n \"State\": 0,\n \"Tags\": [],\n \"TaxRate1\": \"\",\n \"TaxRate2\": \"\",\n \"TotalCost\": \"\",\n \"UpdatedAt\": \"\",\n \"VatId\": \"\",\n \"VatMode\": 0\n}")
val request = Request.Builder()
.url("{{baseUrl}}/api/v1/orders")
.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/api/v1/orders',
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({
AcceptLossOfReturnRight: false,
AdjustmentCost: '',
AdjustmentReason: '',
ApiAccountId: 0,
ApiAccountName: '',
ArchivedAt: '',
BillBeeOrderId: 0,
BillBeeParentOrderId: 0,
Buyer: {
BillbeeShopId: 0,
BillbeeShopName: '',
Email: '',
FirstName: '',
FullName: '',
Id: '',
LastName: '',
Nick: '',
Platform: ''
},
Comments: [{Created: '', FromCustomer: false, Id: 0, Name: '', Text: ''}],
ConfirmedAt: '',
CreatedAt: '',
Currency: '',
CustomInvoiceNote: '',
Customer: {
ArchivedAt: '',
DefaultCommercialMailAddress: {Id: 0, SubType: '', TypeId: 0, TypeName: '', Value: ''},
DefaultFax: {},
DefaultMailAddress: {},
DefaultPhone1: {},
DefaultPhone2: {},
DefaultStatusUpdatesMailAddress: {},
Email: '',
Id: 0,
LanguageId: 0,
MetaData: [{}],
Name: '',
Number: 0,
PriceGroupId: 0,
RestoredAt: '',
Tel1: '',
Tel2: '',
Type: 0,
VatId: ''
},
CustomerNumber: '',
CustomerVatId: '',
DeliverySourceCountryCode: '',
DistributionCenter: '',
History: [{Created: '', EmployeeName: '', EventTypeName: '', Text: '', TypeId: 0}],
Id: '',
InvoiceAddress: {
BillbeeId: 0,
City: '',
Company: '',
Country: '',
CountryISO2: '',
Email: '',
FirstName: '',
HouseNumber: '',
LastName: '',
Line2: '',
NameAddition: '',
Phone: '',
State: '',
Street: '',
Zip: ''
},
InvoiceDate: '',
InvoiceNumber: 0,
InvoiceNumberPostfix: '',
InvoiceNumberPrefix: '',
IsCancelationFor: '',
IsFromBillbeeApi: false,
LanguageCode: '',
LastModifiedAt: '',
MerchantVatId: '',
OrderItems: [
{
Attributes: [{Id: '', Name: '', Price: '', Value: ''}],
BillbeeId: 0,
Discount: '',
DontAdjustStock: false,
GetPriceFromArticleIfAny: false,
InvoiceSKU: '',
IsCoupon: false,
Product: {
BillbeeId: 0,
CountryOfOrigin: '',
EAN: '',
Id: '',
Images: [{ExternalId: '', IsDefaultImage: false, Position: 0, Url: ''}],
IsDigital: false,
OldId: '',
PlatformData: '',
SKU: '',
SkuOrId: '',
TARICCode: '',
Title: '',
Type: 0,
Weight: 0
},
Quantity: '',
SerialNumber: '',
ShippingProfileId: '',
TaxAmount: '',
TaxIndex: 0,
TotalPrice: '',
TransactionId: '',
UnrebatedTotalPrice: ''
}
],
OrderNumber: '',
PaidAmount: '',
PayedAt: '',
PaymentInstruction: '',
PaymentMethod: 0,
PaymentReference: '',
PaymentTransactionId: '',
Payments: [
{
BillbeeId: 0,
Name: '',
PayDate: '',
PayValue: '',
PaymentType: 0,
Purpose: '',
SourceTechnology: '',
SourceText: '',
TransactionId: ''
}
],
RebateDifference: '',
RestoredAt: '',
Seller: {},
SellerComment: '',
ShipWeightKg: '',
ShippedAt: '',
ShippingAddress: {},
ShippingCost: '',
ShippingIds: [
{
BillbeeId: 0,
Created: '',
ShipmentType: 0,
Shipper: '',
ShippingCarrier: 0,
ShippingId: '',
ShippingProviderId: 0,
ShippingProviderProductId: 0,
TrackingUrl: ''
}
],
ShippingProfileId: '',
ShippingProfileName: '',
ShippingProviderId: 0,
ShippingProviderName: '',
ShippingProviderProductId: 0,
ShippingProviderProductName: '',
ShippingServices: [
{
CanBeConfigured: false,
DisplayName: '',
DisplayValue: '',
PossibleValueLists: [{key: '', value: [{key: 0, value: ''}]}],
RequiresUserInput: false,
ServiceName: '',
typeName: ''
}
],
State: 0,
Tags: [],
TaxRate1: '',
TaxRate2: '',
TotalCost: '',
UpdatedAt: '',
VatId: '',
VatMode: 0
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/api/v1/orders',
headers: {'content-type': 'application/json'},
body: {
AcceptLossOfReturnRight: false,
AdjustmentCost: '',
AdjustmentReason: '',
ApiAccountId: 0,
ApiAccountName: '',
ArchivedAt: '',
BillBeeOrderId: 0,
BillBeeParentOrderId: 0,
Buyer: {
BillbeeShopId: 0,
BillbeeShopName: '',
Email: '',
FirstName: '',
FullName: '',
Id: '',
LastName: '',
Nick: '',
Platform: ''
},
Comments: [{Created: '', FromCustomer: false, Id: 0, Name: '', Text: ''}],
ConfirmedAt: '',
CreatedAt: '',
Currency: '',
CustomInvoiceNote: '',
Customer: {
ArchivedAt: '',
DefaultCommercialMailAddress: {Id: 0, SubType: '', TypeId: 0, TypeName: '', Value: ''},
DefaultFax: {},
DefaultMailAddress: {},
DefaultPhone1: {},
DefaultPhone2: {},
DefaultStatusUpdatesMailAddress: {},
Email: '',
Id: 0,
LanguageId: 0,
MetaData: [{}],
Name: '',
Number: 0,
PriceGroupId: 0,
RestoredAt: '',
Tel1: '',
Tel2: '',
Type: 0,
VatId: ''
},
CustomerNumber: '',
CustomerVatId: '',
DeliverySourceCountryCode: '',
DistributionCenter: '',
History: [{Created: '', EmployeeName: '', EventTypeName: '', Text: '', TypeId: 0}],
Id: '',
InvoiceAddress: {
BillbeeId: 0,
City: '',
Company: '',
Country: '',
CountryISO2: '',
Email: '',
FirstName: '',
HouseNumber: '',
LastName: '',
Line2: '',
NameAddition: '',
Phone: '',
State: '',
Street: '',
Zip: ''
},
InvoiceDate: '',
InvoiceNumber: 0,
InvoiceNumberPostfix: '',
InvoiceNumberPrefix: '',
IsCancelationFor: '',
IsFromBillbeeApi: false,
LanguageCode: '',
LastModifiedAt: '',
MerchantVatId: '',
OrderItems: [
{
Attributes: [{Id: '', Name: '', Price: '', Value: ''}],
BillbeeId: 0,
Discount: '',
DontAdjustStock: false,
GetPriceFromArticleIfAny: false,
InvoiceSKU: '',
IsCoupon: false,
Product: {
BillbeeId: 0,
CountryOfOrigin: '',
EAN: '',
Id: '',
Images: [{ExternalId: '', IsDefaultImage: false, Position: 0, Url: ''}],
IsDigital: false,
OldId: '',
PlatformData: '',
SKU: '',
SkuOrId: '',
TARICCode: '',
Title: '',
Type: 0,
Weight: 0
},
Quantity: '',
SerialNumber: '',
ShippingProfileId: '',
TaxAmount: '',
TaxIndex: 0,
TotalPrice: '',
TransactionId: '',
UnrebatedTotalPrice: ''
}
],
OrderNumber: '',
PaidAmount: '',
PayedAt: '',
PaymentInstruction: '',
PaymentMethod: 0,
PaymentReference: '',
PaymentTransactionId: '',
Payments: [
{
BillbeeId: 0,
Name: '',
PayDate: '',
PayValue: '',
PaymentType: 0,
Purpose: '',
SourceTechnology: '',
SourceText: '',
TransactionId: ''
}
],
RebateDifference: '',
RestoredAt: '',
Seller: {},
SellerComment: '',
ShipWeightKg: '',
ShippedAt: '',
ShippingAddress: {},
ShippingCost: '',
ShippingIds: [
{
BillbeeId: 0,
Created: '',
ShipmentType: 0,
Shipper: '',
ShippingCarrier: 0,
ShippingId: '',
ShippingProviderId: 0,
ShippingProviderProductId: 0,
TrackingUrl: ''
}
],
ShippingProfileId: '',
ShippingProfileName: '',
ShippingProviderId: 0,
ShippingProviderName: '',
ShippingProviderProductId: 0,
ShippingProviderProductName: '',
ShippingServices: [
{
CanBeConfigured: false,
DisplayName: '',
DisplayValue: '',
PossibleValueLists: [{key: '', value: [{key: 0, value: ''}]}],
RequiresUserInput: false,
ServiceName: '',
typeName: ''
}
],
State: 0,
Tags: [],
TaxRate1: '',
TaxRate2: '',
TotalCost: '',
UpdatedAt: '',
VatId: '',
VatMode: 0
},
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}}/api/v1/orders');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
AcceptLossOfReturnRight: false,
AdjustmentCost: '',
AdjustmentReason: '',
ApiAccountId: 0,
ApiAccountName: '',
ArchivedAt: '',
BillBeeOrderId: 0,
BillBeeParentOrderId: 0,
Buyer: {
BillbeeShopId: 0,
BillbeeShopName: '',
Email: '',
FirstName: '',
FullName: '',
Id: '',
LastName: '',
Nick: '',
Platform: ''
},
Comments: [
{
Created: '',
FromCustomer: false,
Id: 0,
Name: '',
Text: ''
}
],
ConfirmedAt: '',
CreatedAt: '',
Currency: '',
CustomInvoiceNote: '',
Customer: {
ArchivedAt: '',
DefaultCommercialMailAddress: {
Id: 0,
SubType: '',
TypeId: 0,
TypeName: '',
Value: ''
},
DefaultFax: {},
DefaultMailAddress: {},
DefaultPhone1: {},
DefaultPhone2: {},
DefaultStatusUpdatesMailAddress: {},
Email: '',
Id: 0,
LanguageId: 0,
MetaData: [
{}
],
Name: '',
Number: 0,
PriceGroupId: 0,
RestoredAt: '',
Tel1: '',
Tel2: '',
Type: 0,
VatId: ''
},
CustomerNumber: '',
CustomerVatId: '',
DeliverySourceCountryCode: '',
DistributionCenter: '',
History: [
{
Created: '',
EmployeeName: '',
EventTypeName: '',
Text: '',
TypeId: 0
}
],
Id: '',
InvoiceAddress: {
BillbeeId: 0,
City: '',
Company: '',
Country: '',
CountryISO2: '',
Email: '',
FirstName: '',
HouseNumber: '',
LastName: '',
Line2: '',
NameAddition: '',
Phone: '',
State: '',
Street: '',
Zip: ''
},
InvoiceDate: '',
InvoiceNumber: 0,
InvoiceNumberPostfix: '',
InvoiceNumberPrefix: '',
IsCancelationFor: '',
IsFromBillbeeApi: false,
LanguageCode: '',
LastModifiedAt: '',
MerchantVatId: '',
OrderItems: [
{
Attributes: [
{
Id: '',
Name: '',
Price: '',
Value: ''
}
],
BillbeeId: 0,
Discount: '',
DontAdjustStock: false,
GetPriceFromArticleIfAny: false,
InvoiceSKU: '',
IsCoupon: false,
Product: {
BillbeeId: 0,
CountryOfOrigin: '',
EAN: '',
Id: '',
Images: [
{
ExternalId: '',
IsDefaultImage: false,
Position: 0,
Url: ''
}
],
IsDigital: false,
OldId: '',
PlatformData: '',
SKU: '',
SkuOrId: '',
TARICCode: '',
Title: '',
Type: 0,
Weight: 0
},
Quantity: '',
SerialNumber: '',
ShippingProfileId: '',
TaxAmount: '',
TaxIndex: 0,
TotalPrice: '',
TransactionId: '',
UnrebatedTotalPrice: ''
}
],
OrderNumber: '',
PaidAmount: '',
PayedAt: '',
PaymentInstruction: '',
PaymentMethod: 0,
PaymentReference: '',
PaymentTransactionId: '',
Payments: [
{
BillbeeId: 0,
Name: '',
PayDate: '',
PayValue: '',
PaymentType: 0,
Purpose: '',
SourceTechnology: '',
SourceText: '',
TransactionId: ''
}
],
RebateDifference: '',
RestoredAt: '',
Seller: {},
SellerComment: '',
ShipWeightKg: '',
ShippedAt: '',
ShippingAddress: {},
ShippingCost: '',
ShippingIds: [
{
BillbeeId: 0,
Created: '',
ShipmentType: 0,
Shipper: '',
ShippingCarrier: 0,
ShippingId: '',
ShippingProviderId: 0,
ShippingProviderProductId: 0,
TrackingUrl: ''
}
],
ShippingProfileId: '',
ShippingProfileName: '',
ShippingProviderId: 0,
ShippingProviderName: '',
ShippingProviderProductId: 0,
ShippingProviderProductName: '',
ShippingServices: [
{
CanBeConfigured: false,
DisplayName: '',
DisplayValue: '',
PossibleValueLists: [
{
key: '',
value: [
{
key: 0,
value: ''
}
]
}
],
RequiresUserInput: false,
ServiceName: '',
typeName: ''
}
],
State: 0,
Tags: [],
TaxRate1: '',
TaxRate2: '',
TotalCost: '',
UpdatedAt: '',
VatId: '',
VatMode: 0
});
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}}/api/v1/orders',
headers: {'content-type': 'application/json'},
data: {
AcceptLossOfReturnRight: false,
AdjustmentCost: '',
AdjustmentReason: '',
ApiAccountId: 0,
ApiAccountName: '',
ArchivedAt: '',
BillBeeOrderId: 0,
BillBeeParentOrderId: 0,
Buyer: {
BillbeeShopId: 0,
BillbeeShopName: '',
Email: '',
FirstName: '',
FullName: '',
Id: '',
LastName: '',
Nick: '',
Platform: ''
},
Comments: [{Created: '', FromCustomer: false, Id: 0, Name: '', Text: ''}],
ConfirmedAt: '',
CreatedAt: '',
Currency: '',
CustomInvoiceNote: '',
Customer: {
ArchivedAt: '',
DefaultCommercialMailAddress: {Id: 0, SubType: '', TypeId: 0, TypeName: '', Value: ''},
DefaultFax: {},
DefaultMailAddress: {},
DefaultPhone1: {},
DefaultPhone2: {},
DefaultStatusUpdatesMailAddress: {},
Email: '',
Id: 0,
LanguageId: 0,
MetaData: [{}],
Name: '',
Number: 0,
PriceGroupId: 0,
RestoredAt: '',
Tel1: '',
Tel2: '',
Type: 0,
VatId: ''
},
CustomerNumber: '',
CustomerVatId: '',
DeliverySourceCountryCode: '',
DistributionCenter: '',
History: [{Created: '', EmployeeName: '', EventTypeName: '', Text: '', TypeId: 0}],
Id: '',
InvoiceAddress: {
BillbeeId: 0,
City: '',
Company: '',
Country: '',
CountryISO2: '',
Email: '',
FirstName: '',
HouseNumber: '',
LastName: '',
Line2: '',
NameAddition: '',
Phone: '',
State: '',
Street: '',
Zip: ''
},
InvoiceDate: '',
InvoiceNumber: 0,
InvoiceNumberPostfix: '',
InvoiceNumberPrefix: '',
IsCancelationFor: '',
IsFromBillbeeApi: false,
LanguageCode: '',
LastModifiedAt: '',
MerchantVatId: '',
OrderItems: [
{
Attributes: [{Id: '', Name: '', Price: '', Value: ''}],
BillbeeId: 0,
Discount: '',
DontAdjustStock: false,
GetPriceFromArticleIfAny: false,
InvoiceSKU: '',
IsCoupon: false,
Product: {
BillbeeId: 0,
CountryOfOrigin: '',
EAN: '',
Id: '',
Images: [{ExternalId: '', IsDefaultImage: false, Position: 0, Url: ''}],
IsDigital: false,
OldId: '',
PlatformData: '',
SKU: '',
SkuOrId: '',
TARICCode: '',
Title: '',
Type: 0,
Weight: 0
},
Quantity: '',
SerialNumber: '',
ShippingProfileId: '',
TaxAmount: '',
TaxIndex: 0,
TotalPrice: '',
TransactionId: '',
UnrebatedTotalPrice: ''
}
],
OrderNumber: '',
PaidAmount: '',
PayedAt: '',
PaymentInstruction: '',
PaymentMethod: 0,
PaymentReference: '',
PaymentTransactionId: '',
Payments: [
{
BillbeeId: 0,
Name: '',
PayDate: '',
PayValue: '',
PaymentType: 0,
Purpose: '',
SourceTechnology: '',
SourceText: '',
TransactionId: ''
}
],
RebateDifference: '',
RestoredAt: '',
Seller: {},
SellerComment: '',
ShipWeightKg: '',
ShippedAt: '',
ShippingAddress: {},
ShippingCost: '',
ShippingIds: [
{
BillbeeId: 0,
Created: '',
ShipmentType: 0,
Shipper: '',
ShippingCarrier: 0,
ShippingId: '',
ShippingProviderId: 0,
ShippingProviderProductId: 0,
TrackingUrl: ''
}
],
ShippingProfileId: '',
ShippingProfileName: '',
ShippingProviderId: 0,
ShippingProviderName: '',
ShippingProviderProductId: 0,
ShippingProviderProductName: '',
ShippingServices: [
{
CanBeConfigured: false,
DisplayName: '',
DisplayValue: '',
PossibleValueLists: [{key: '', value: [{key: 0, value: ''}]}],
RequiresUserInput: false,
ServiceName: '',
typeName: ''
}
],
State: 0,
Tags: [],
TaxRate1: '',
TaxRate2: '',
TotalCost: '',
UpdatedAt: '',
VatId: '',
VatMode: 0
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/v1/orders';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"AcceptLossOfReturnRight":false,"AdjustmentCost":"","AdjustmentReason":"","ApiAccountId":0,"ApiAccountName":"","ArchivedAt":"","BillBeeOrderId":0,"BillBeeParentOrderId":0,"Buyer":{"BillbeeShopId":0,"BillbeeShopName":"","Email":"","FirstName":"","FullName":"","Id":"","LastName":"","Nick":"","Platform":""},"Comments":[{"Created":"","FromCustomer":false,"Id":0,"Name":"","Text":""}],"ConfirmedAt":"","CreatedAt":"","Currency":"","CustomInvoiceNote":"","Customer":{"ArchivedAt":"","DefaultCommercialMailAddress":{"Id":0,"SubType":"","TypeId":0,"TypeName":"","Value":""},"DefaultFax":{},"DefaultMailAddress":{},"DefaultPhone1":{},"DefaultPhone2":{},"DefaultStatusUpdatesMailAddress":{},"Email":"","Id":0,"LanguageId":0,"MetaData":[{}],"Name":"","Number":0,"PriceGroupId":0,"RestoredAt":"","Tel1":"","Tel2":"","Type":0,"VatId":""},"CustomerNumber":"","CustomerVatId":"","DeliverySourceCountryCode":"","DistributionCenter":"","History":[{"Created":"","EmployeeName":"","EventTypeName":"","Text":"","TypeId":0}],"Id":"","InvoiceAddress":{"BillbeeId":0,"City":"","Company":"","Country":"","CountryISO2":"","Email":"","FirstName":"","HouseNumber":"","LastName":"","Line2":"","NameAddition":"","Phone":"","State":"","Street":"","Zip":""},"InvoiceDate":"","InvoiceNumber":0,"InvoiceNumberPostfix":"","InvoiceNumberPrefix":"","IsCancelationFor":"","IsFromBillbeeApi":false,"LanguageCode":"","LastModifiedAt":"","MerchantVatId":"","OrderItems":[{"Attributes":[{"Id":"","Name":"","Price":"","Value":""}],"BillbeeId":0,"Discount":"","DontAdjustStock":false,"GetPriceFromArticleIfAny":false,"InvoiceSKU":"","IsCoupon":false,"Product":{"BillbeeId":0,"CountryOfOrigin":"","EAN":"","Id":"","Images":[{"ExternalId":"","IsDefaultImage":false,"Position":0,"Url":""}],"IsDigital":false,"OldId":"","PlatformData":"","SKU":"","SkuOrId":"","TARICCode":"","Title":"","Type":0,"Weight":0},"Quantity":"","SerialNumber":"","ShippingProfileId":"","TaxAmount":"","TaxIndex":0,"TotalPrice":"","TransactionId":"","UnrebatedTotalPrice":""}],"OrderNumber":"","PaidAmount":"","PayedAt":"","PaymentInstruction":"","PaymentMethod":0,"PaymentReference":"","PaymentTransactionId":"","Payments":[{"BillbeeId":0,"Name":"","PayDate":"","PayValue":"","PaymentType":0,"Purpose":"","SourceTechnology":"","SourceText":"","TransactionId":""}],"RebateDifference":"","RestoredAt":"","Seller":{},"SellerComment":"","ShipWeightKg":"","ShippedAt":"","ShippingAddress":{},"ShippingCost":"","ShippingIds":[{"BillbeeId":0,"Created":"","ShipmentType":0,"Shipper":"","ShippingCarrier":0,"ShippingId":"","ShippingProviderId":0,"ShippingProviderProductId":0,"TrackingUrl":""}],"ShippingProfileId":"","ShippingProfileName":"","ShippingProviderId":0,"ShippingProviderName":"","ShippingProviderProductId":0,"ShippingProviderProductName":"","ShippingServices":[{"CanBeConfigured":false,"DisplayName":"","DisplayValue":"","PossibleValueLists":[{"key":"","value":[{"key":0,"value":""}]}],"RequiresUserInput":false,"ServiceName":"","typeName":""}],"State":0,"Tags":[],"TaxRate1":"","TaxRate2":"","TotalCost":"","UpdatedAt":"","VatId":"","VatMode":0}'
};
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 = @{ @"AcceptLossOfReturnRight": @NO,
@"AdjustmentCost": @"",
@"AdjustmentReason": @"",
@"ApiAccountId": @0,
@"ApiAccountName": @"",
@"ArchivedAt": @"",
@"BillBeeOrderId": @0,
@"BillBeeParentOrderId": @0,
@"Buyer": @{ @"BillbeeShopId": @0, @"BillbeeShopName": @"", @"Email": @"", @"FirstName": @"", @"FullName": @"", @"Id": @"", @"LastName": @"", @"Nick": @"", @"Platform": @"" },
@"Comments": @[ @{ @"Created": @"", @"FromCustomer": @NO, @"Id": @0, @"Name": @"", @"Text": @"" } ],
@"ConfirmedAt": @"",
@"CreatedAt": @"",
@"Currency": @"",
@"CustomInvoiceNote": @"",
@"Customer": @{ @"ArchivedAt": @"", @"DefaultCommercialMailAddress": @{ @"Id": @0, @"SubType": @"", @"TypeId": @0, @"TypeName": @"", @"Value": @"" }, @"DefaultFax": @{ }, @"DefaultMailAddress": @{ }, @"DefaultPhone1": @{ }, @"DefaultPhone2": @{ }, @"DefaultStatusUpdatesMailAddress": @{ }, @"Email": @"", @"Id": @0, @"LanguageId": @0, @"MetaData": @[ @{ } ], @"Name": @"", @"Number": @0, @"PriceGroupId": @0, @"RestoredAt": @"", @"Tel1": @"", @"Tel2": @"", @"Type": @0, @"VatId": @"" },
@"CustomerNumber": @"",
@"CustomerVatId": @"",
@"DeliverySourceCountryCode": @"",
@"DistributionCenter": @"",
@"History": @[ @{ @"Created": @"", @"EmployeeName": @"", @"EventTypeName": @"", @"Text": @"", @"TypeId": @0 } ],
@"Id": @"",
@"InvoiceAddress": @{ @"BillbeeId": @0, @"City": @"", @"Company": @"", @"Country": @"", @"CountryISO2": @"", @"Email": @"", @"FirstName": @"", @"HouseNumber": @"", @"LastName": @"", @"Line2": @"", @"NameAddition": @"", @"Phone": @"", @"State": @"", @"Street": @"", @"Zip": @"" },
@"InvoiceDate": @"",
@"InvoiceNumber": @0,
@"InvoiceNumberPostfix": @"",
@"InvoiceNumberPrefix": @"",
@"IsCancelationFor": @"",
@"IsFromBillbeeApi": @NO,
@"LanguageCode": @"",
@"LastModifiedAt": @"",
@"MerchantVatId": @"",
@"OrderItems": @[ @{ @"Attributes": @[ @{ @"Id": @"", @"Name": @"", @"Price": @"", @"Value": @"" } ], @"BillbeeId": @0, @"Discount": @"", @"DontAdjustStock": @NO, @"GetPriceFromArticleIfAny": @NO, @"InvoiceSKU": @"", @"IsCoupon": @NO, @"Product": @{ @"BillbeeId": @0, @"CountryOfOrigin": @"", @"EAN": @"", @"Id": @"", @"Images": @[ @{ @"ExternalId": @"", @"IsDefaultImage": @NO, @"Position": @0, @"Url": @"" } ], @"IsDigital": @NO, @"OldId": @"", @"PlatformData": @"", @"SKU": @"", @"SkuOrId": @"", @"TARICCode": @"", @"Title": @"", @"Type": @0, @"Weight": @0 }, @"Quantity": @"", @"SerialNumber": @"", @"ShippingProfileId": @"", @"TaxAmount": @"", @"TaxIndex": @0, @"TotalPrice": @"", @"TransactionId": @"", @"UnrebatedTotalPrice": @"" } ],
@"OrderNumber": @"",
@"PaidAmount": @"",
@"PayedAt": @"",
@"PaymentInstruction": @"",
@"PaymentMethod": @0,
@"PaymentReference": @"",
@"PaymentTransactionId": @"",
@"Payments": @[ @{ @"BillbeeId": @0, @"Name": @"", @"PayDate": @"", @"PayValue": @"", @"PaymentType": @0, @"Purpose": @"", @"SourceTechnology": @"", @"SourceText": @"", @"TransactionId": @"" } ],
@"RebateDifference": @"",
@"RestoredAt": @"",
@"Seller": @{ },
@"SellerComment": @"",
@"ShipWeightKg": @"",
@"ShippedAt": @"",
@"ShippingAddress": @{ },
@"ShippingCost": @"",
@"ShippingIds": @[ @{ @"BillbeeId": @0, @"Created": @"", @"ShipmentType": @0, @"Shipper": @"", @"ShippingCarrier": @0, @"ShippingId": @"", @"ShippingProviderId": @0, @"ShippingProviderProductId": @0, @"TrackingUrl": @"" } ],
@"ShippingProfileId": @"",
@"ShippingProfileName": @"",
@"ShippingProviderId": @0,
@"ShippingProviderName": @"",
@"ShippingProviderProductId": @0,
@"ShippingProviderProductName": @"",
@"ShippingServices": @[ @{ @"CanBeConfigured": @NO, @"DisplayName": @"", @"DisplayValue": @"", @"PossibleValueLists": @[ @{ @"key": @"", @"value": @[ @{ @"key": @0, @"value": @"" } ] } ], @"RequiresUserInput": @NO, @"ServiceName": @"", @"typeName": @"" } ],
@"State": @0,
@"Tags": @[ ],
@"TaxRate1": @"",
@"TaxRate2": @"",
@"TotalCost": @"",
@"UpdatedAt": @"",
@"VatId": @"",
@"VatMode": @0 };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/api/v1/orders"]
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}}/api/v1/orders" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"AcceptLossOfReturnRight\": false,\n \"AdjustmentCost\": \"\",\n \"AdjustmentReason\": \"\",\n \"ApiAccountId\": 0,\n \"ApiAccountName\": \"\",\n \"ArchivedAt\": \"\",\n \"BillBeeOrderId\": 0,\n \"BillBeeParentOrderId\": 0,\n \"Buyer\": {\n \"BillbeeShopId\": 0,\n \"BillbeeShopName\": \"\",\n \"Email\": \"\",\n \"FirstName\": \"\",\n \"FullName\": \"\",\n \"Id\": \"\",\n \"LastName\": \"\",\n \"Nick\": \"\",\n \"Platform\": \"\"\n },\n \"Comments\": [\n {\n \"Created\": \"\",\n \"FromCustomer\": false,\n \"Id\": 0,\n \"Name\": \"\",\n \"Text\": \"\"\n }\n ],\n \"ConfirmedAt\": \"\",\n \"CreatedAt\": \"\",\n \"Currency\": \"\",\n \"CustomInvoiceNote\": \"\",\n \"Customer\": {\n \"ArchivedAt\": \"\",\n \"DefaultCommercialMailAddress\": {\n \"Id\": 0,\n \"SubType\": \"\",\n \"TypeId\": 0,\n \"TypeName\": \"\",\n \"Value\": \"\"\n },\n \"DefaultFax\": {},\n \"DefaultMailAddress\": {},\n \"DefaultPhone1\": {},\n \"DefaultPhone2\": {},\n \"DefaultStatusUpdatesMailAddress\": {},\n \"Email\": \"\",\n \"Id\": 0,\n \"LanguageId\": 0,\n \"MetaData\": [\n {}\n ],\n \"Name\": \"\",\n \"Number\": 0,\n \"PriceGroupId\": 0,\n \"RestoredAt\": \"\",\n \"Tel1\": \"\",\n \"Tel2\": \"\",\n \"Type\": 0,\n \"VatId\": \"\"\n },\n \"CustomerNumber\": \"\",\n \"CustomerVatId\": \"\",\n \"DeliverySourceCountryCode\": \"\",\n \"DistributionCenter\": \"\",\n \"History\": [\n {\n \"Created\": \"\",\n \"EmployeeName\": \"\",\n \"EventTypeName\": \"\",\n \"Text\": \"\",\n \"TypeId\": 0\n }\n ],\n \"Id\": \"\",\n \"InvoiceAddress\": {\n \"BillbeeId\": 0,\n \"City\": \"\",\n \"Company\": \"\",\n \"Country\": \"\",\n \"CountryISO2\": \"\",\n \"Email\": \"\",\n \"FirstName\": \"\",\n \"HouseNumber\": \"\",\n \"LastName\": \"\",\n \"Line2\": \"\",\n \"NameAddition\": \"\",\n \"Phone\": \"\",\n \"State\": \"\",\n \"Street\": \"\",\n \"Zip\": \"\"\n },\n \"InvoiceDate\": \"\",\n \"InvoiceNumber\": 0,\n \"InvoiceNumberPostfix\": \"\",\n \"InvoiceNumberPrefix\": \"\",\n \"IsCancelationFor\": \"\",\n \"IsFromBillbeeApi\": false,\n \"LanguageCode\": \"\",\n \"LastModifiedAt\": \"\",\n \"MerchantVatId\": \"\",\n \"OrderItems\": [\n {\n \"Attributes\": [\n {\n \"Id\": \"\",\n \"Name\": \"\",\n \"Price\": \"\",\n \"Value\": \"\"\n }\n ],\n \"BillbeeId\": 0,\n \"Discount\": \"\",\n \"DontAdjustStock\": false,\n \"GetPriceFromArticleIfAny\": false,\n \"InvoiceSKU\": \"\",\n \"IsCoupon\": false,\n \"Product\": {\n \"BillbeeId\": 0,\n \"CountryOfOrigin\": \"\",\n \"EAN\": \"\",\n \"Id\": \"\",\n \"Images\": [\n {\n \"ExternalId\": \"\",\n \"IsDefaultImage\": false,\n \"Position\": 0,\n \"Url\": \"\"\n }\n ],\n \"IsDigital\": false,\n \"OldId\": \"\",\n \"PlatformData\": \"\",\n \"SKU\": \"\",\n \"SkuOrId\": \"\",\n \"TARICCode\": \"\",\n \"Title\": \"\",\n \"Type\": 0,\n \"Weight\": 0\n },\n \"Quantity\": \"\",\n \"SerialNumber\": \"\",\n \"ShippingProfileId\": \"\",\n \"TaxAmount\": \"\",\n \"TaxIndex\": 0,\n \"TotalPrice\": \"\",\n \"TransactionId\": \"\",\n \"UnrebatedTotalPrice\": \"\"\n }\n ],\n \"OrderNumber\": \"\",\n \"PaidAmount\": \"\",\n \"PayedAt\": \"\",\n \"PaymentInstruction\": \"\",\n \"PaymentMethod\": 0,\n \"PaymentReference\": \"\",\n \"PaymentTransactionId\": \"\",\n \"Payments\": [\n {\n \"BillbeeId\": 0,\n \"Name\": \"\",\n \"PayDate\": \"\",\n \"PayValue\": \"\",\n \"PaymentType\": 0,\n \"Purpose\": \"\",\n \"SourceTechnology\": \"\",\n \"SourceText\": \"\",\n \"TransactionId\": \"\"\n }\n ],\n \"RebateDifference\": \"\",\n \"RestoredAt\": \"\",\n \"Seller\": {},\n \"SellerComment\": \"\",\n \"ShipWeightKg\": \"\",\n \"ShippedAt\": \"\",\n \"ShippingAddress\": {},\n \"ShippingCost\": \"\",\n \"ShippingIds\": [\n {\n \"BillbeeId\": 0,\n \"Created\": \"\",\n \"ShipmentType\": 0,\n \"Shipper\": \"\",\n \"ShippingCarrier\": 0,\n \"ShippingId\": \"\",\n \"ShippingProviderId\": 0,\n \"ShippingProviderProductId\": 0,\n \"TrackingUrl\": \"\"\n }\n ],\n \"ShippingProfileId\": \"\",\n \"ShippingProfileName\": \"\",\n \"ShippingProviderId\": 0,\n \"ShippingProviderName\": \"\",\n \"ShippingProviderProductId\": 0,\n \"ShippingProviderProductName\": \"\",\n \"ShippingServices\": [\n {\n \"CanBeConfigured\": false,\n \"DisplayName\": \"\",\n \"DisplayValue\": \"\",\n \"PossibleValueLists\": [\n {\n \"key\": \"\",\n \"value\": [\n {\n \"key\": 0,\n \"value\": \"\"\n }\n ]\n }\n ],\n \"RequiresUserInput\": false,\n \"ServiceName\": \"\",\n \"typeName\": \"\"\n }\n ],\n \"State\": 0,\n \"Tags\": [],\n \"TaxRate1\": \"\",\n \"TaxRate2\": \"\",\n \"TotalCost\": \"\",\n \"UpdatedAt\": \"\",\n \"VatId\": \"\",\n \"VatMode\": 0\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/v1/orders",
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([
'AcceptLossOfReturnRight' => null,
'AdjustmentCost' => '',
'AdjustmentReason' => '',
'ApiAccountId' => 0,
'ApiAccountName' => '',
'ArchivedAt' => '',
'BillBeeOrderId' => 0,
'BillBeeParentOrderId' => 0,
'Buyer' => [
'BillbeeShopId' => 0,
'BillbeeShopName' => '',
'Email' => '',
'FirstName' => '',
'FullName' => '',
'Id' => '',
'LastName' => '',
'Nick' => '',
'Platform' => ''
],
'Comments' => [
[
'Created' => '',
'FromCustomer' => null,
'Id' => 0,
'Name' => '',
'Text' => ''
]
],
'ConfirmedAt' => '',
'CreatedAt' => '',
'Currency' => '',
'CustomInvoiceNote' => '',
'Customer' => [
'ArchivedAt' => '',
'DefaultCommercialMailAddress' => [
'Id' => 0,
'SubType' => '',
'TypeId' => 0,
'TypeName' => '',
'Value' => ''
],
'DefaultFax' => [
],
'DefaultMailAddress' => [
],
'DefaultPhone1' => [
],
'DefaultPhone2' => [
],
'DefaultStatusUpdatesMailAddress' => [
],
'Email' => '',
'Id' => 0,
'LanguageId' => 0,
'MetaData' => [
[
]
],
'Name' => '',
'Number' => 0,
'PriceGroupId' => 0,
'RestoredAt' => '',
'Tel1' => '',
'Tel2' => '',
'Type' => 0,
'VatId' => ''
],
'CustomerNumber' => '',
'CustomerVatId' => '',
'DeliverySourceCountryCode' => '',
'DistributionCenter' => '',
'History' => [
[
'Created' => '',
'EmployeeName' => '',
'EventTypeName' => '',
'Text' => '',
'TypeId' => 0
]
],
'Id' => '',
'InvoiceAddress' => [
'BillbeeId' => 0,
'City' => '',
'Company' => '',
'Country' => '',
'CountryISO2' => '',
'Email' => '',
'FirstName' => '',
'HouseNumber' => '',
'LastName' => '',
'Line2' => '',
'NameAddition' => '',
'Phone' => '',
'State' => '',
'Street' => '',
'Zip' => ''
],
'InvoiceDate' => '',
'InvoiceNumber' => 0,
'InvoiceNumberPostfix' => '',
'InvoiceNumberPrefix' => '',
'IsCancelationFor' => '',
'IsFromBillbeeApi' => null,
'LanguageCode' => '',
'LastModifiedAt' => '',
'MerchantVatId' => '',
'OrderItems' => [
[
'Attributes' => [
[
'Id' => '',
'Name' => '',
'Price' => '',
'Value' => ''
]
],
'BillbeeId' => 0,
'Discount' => '',
'DontAdjustStock' => null,
'GetPriceFromArticleIfAny' => null,
'InvoiceSKU' => '',
'IsCoupon' => null,
'Product' => [
'BillbeeId' => 0,
'CountryOfOrigin' => '',
'EAN' => '',
'Id' => '',
'Images' => [
[
'ExternalId' => '',
'IsDefaultImage' => null,
'Position' => 0,
'Url' => ''
]
],
'IsDigital' => null,
'OldId' => '',
'PlatformData' => '',
'SKU' => '',
'SkuOrId' => '',
'TARICCode' => '',
'Title' => '',
'Type' => 0,
'Weight' => 0
],
'Quantity' => '',
'SerialNumber' => '',
'ShippingProfileId' => '',
'TaxAmount' => '',
'TaxIndex' => 0,
'TotalPrice' => '',
'TransactionId' => '',
'UnrebatedTotalPrice' => ''
]
],
'OrderNumber' => '',
'PaidAmount' => '',
'PayedAt' => '',
'PaymentInstruction' => '',
'PaymentMethod' => 0,
'PaymentReference' => '',
'PaymentTransactionId' => '',
'Payments' => [
[
'BillbeeId' => 0,
'Name' => '',
'PayDate' => '',
'PayValue' => '',
'PaymentType' => 0,
'Purpose' => '',
'SourceTechnology' => '',
'SourceText' => '',
'TransactionId' => ''
]
],
'RebateDifference' => '',
'RestoredAt' => '',
'Seller' => [
],
'SellerComment' => '',
'ShipWeightKg' => '',
'ShippedAt' => '',
'ShippingAddress' => [
],
'ShippingCost' => '',
'ShippingIds' => [
[
'BillbeeId' => 0,
'Created' => '',
'ShipmentType' => 0,
'Shipper' => '',
'ShippingCarrier' => 0,
'ShippingId' => '',
'ShippingProviderId' => 0,
'ShippingProviderProductId' => 0,
'TrackingUrl' => ''
]
],
'ShippingProfileId' => '',
'ShippingProfileName' => '',
'ShippingProviderId' => 0,
'ShippingProviderName' => '',
'ShippingProviderProductId' => 0,
'ShippingProviderProductName' => '',
'ShippingServices' => [
[
'CanBeConfigured' => null,
'DisplayName' => '',
'DisplayValue' => '',
'PossibleValueLists' => [
[
'key' => '',
'value' => [
[
'key' => 0,
'value' => ''
]
]
]
],
'RequiresUserInput' => null,
'ServiceName' => '',
'typeName' => ''
]
],
'State' => 0,
'Tags' => [
],
'TaxRate1' => '',
'TaxRate2' => '',
'TotalCost' => '',
'UpdatedAt' => '',
'VatId' => '',
'VatMode' => 0
]),
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}}/api/v1/orders', [
'body' => '{
"AcceptLossOfReturnRight": false,
"AdjustmentCost": "",
"AdjustmentReason": "",
"ApiAccountId": 0,
"ApiAccountName": "",
"ArchivedAt": "",
"BillBeeOrderId": 0,
"BillBeeParentOrderId": 0,
"Buyer": {
"BillbeeShopId": 0,
"BillbeeShopName": "",
"Email": "",
"FirstName": "",
"FullName": "",
"Id": "",
"LastName": "",
"Nick": "",
"Platform": ""
},
"Comments": [
{
"Created": "",
"FromCustomer": false,
"Id": 0,
"Name": "",
"Text": ""
}
],
"ConfirmedAt": "",
"CreatedAt": "",
"Currency": "",
"CustomInvoiceNote": "",
"Customer": {
"ArchivedAt": "",
"DefaultCommercialMailAddress": {
"Id": 0,
"SubType": "",
"TypeId": 0,
"TypeName": "",
"Value": ""
},
"DefaultFax": {},
"DefaultMailAddress": {},
"DefaultPhone1": {},
"DefaultPhone2": {},
"DefaultStatusUpdatesMailAddress": {},
"Email": "",
"Id": 0,
"LanguageId": 0,
"MetaData": [
{}
],
"Name": "",
"Number": 0,
"PriceGroupId": 0,
"RestoredAt": "",
"Tel1": "",
"Tel2": "",
"Type": 0,
"VatId": ""
},
"CustomerNumber": "",
"CustomerVatId": "",
"DeliverySourceCountryCode": "",
"DistributionCenter": "",
"History": [
{
"Created": "",
"EmployeeName": "",
"EventTypeName": "",
"Text": "",
"TypeId": 0
}
],
"Id": "",
"InvoiceAddress": {
"BillbeeId": 0,
"City": "",
"Company": "",
"Country": "",
"CountryISO2": "",
"Email": "",
"FirstName": "",
"HouseNumber": "",
"LastName": "",
"Line2": "",
"NameAddition": "",
"Phone": "",
"State": "",
"Street": "",
"Zip": ""
},
"InvoiceDate": "",
"InvoiceNumber": 0,
"InvoiceNumberPostfix": "",
"InvoiceNumberPrefix": "",
"IsCancelationFor": "",
"IsFromBillbeeApi": false,
"LanguageCode": "",
"LastModifiedAt": "",
"MerchantVatId": "",
"OrderItems": [
{
"Attributes": [
{
"Id": "",
"Name": "",
"Price": "",
"Value": ""
}
],
"BillbeeId": 0,
"Discount": "",
"DontAdjustStock": false,
"GetPriceFromArticleIfAny": false,
"InvoiceSKU": "",
"IsCoupon": false,
"Product": {
"BillbeeId": 0,
"CountryOfOrigin": "",
"EAN": "",
"Id": "",
"Images": [
{
"ExternalId": "",
"IsDefaultImage": false,
"Position": 0,
"Url": ""
}
],
"IsDigital": false,
"OldId": "",
"PlatformData": "",
"SKU": "",
"SkuOrId": "",
"TARICCode": "",
"Title": "",
"Type": 0,
"Weight": 0
},
"Quantity": "",
"SerialNumber": "",
"ShippingProfileId": "",
"TaxAmount": "",
"TaxIndex": 0,
"TotalPrice": "",
"TransactionId": "",
"UnrebatedTotalPrice": ""
}
],
"OrderNumber": "",
"PaidAmount": "",
"PayedAt": "",
"PaymentInstruction": "",
"PaymentMethod": 0,
"PaymentReference": "",
"PaymentTransactionId": "",
"Payments": [
{
"BillbeeId": 0,
"Name": "",
"PayDate": "",
"PayValue": "",
"PaymentType": 0,
"Purpose": "",
"SourceTechnology": "",
"SourceText": "",
"TransactionId": ""
}
],
"RebateDifference": "",
"RestoredAt": "",
"Seller": {},
"SellerComment": "",
"ShipWeightKg": "",
"ShippedAt": "",
"ShippingAddress": {},
"ShippingCost": "",
"ShippingIds": [
{
"BillbeeId": 0,
"Created": "",
"ShipmentType": 0,
"Shipper": "",
"ShippingCarrier": 0,
"ShippingId": "",
"ShippingProviderId": 0,
"ShippingProviderProductId": 0,
"TrackingUrl": ""
}
],
"ShippingProfileId": "",
"ShippingProfileName": "",
"ShippingProviderId": 0,
"ShippingProviderName": "",
"ShippingProviderProductId": 0,
"ShippingProviderProductName": "",
"ShippingServices": [
{
"CanBeConfigured": false,
"DisplayName": "",
"DisplayValue": "",
"PossibleValueLists": [
{
"key": "",
"value": [
{
"key": 0,
"value": ""
}
]
}
],
"RequiresUserInput": false,
"ServiceName": "",
"typeName": ""
}
],
"State": 0,
"Tags": [],
"TaxRate1": "",
"TaxRate2": "",
"TotalCost": "",
"UpdatedAt": "",
"VatId": "",
"VatMode": 0
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/api/v1/orders');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'AcceptLossOfReturnRight' => null,
'AdjustmentCost' => '',
'AdjustmentReason' => '',
'ApiAccountId' => 0,
'ApiAccountName' => '',
'ArchivedAt' => '',
'BillBeeOrderId' => 0,
'BillBeeParentOrderId' => 0,
'Buyer' => [
'BillbeeShopId' => 0,
'BillbeeShopName' => '',
'Email' => '',
'FirstName' => '',
'FullName' => '',
'Id' => '',
'LastName' => '',
'Nick' => '',
'Platform' => ''
],
'Comments' => [
[
'Created' => '',
'FromCustomer' => null,
'Id' => 0,
'Name' => '',
'Text' => ''
]
],
'ConfirmedAt' => '',
'CreatedAt' => '',
'Currency' => '',
'CustomInvoiceNote' => '',
'Customer' => [
'ArchivedAt' => '',
'DefaultCommercialMailAddress' => [
'Id' => 0,
'SubType' => '',
'TypeId' => 0,
'TypeName' => '',
'Value' => ''
],
'DefaultFax' => [
],
'DefaultMailAddress' => [
],
'DefaultPhone1' => [
],
'DefaultPhone2' => [
],
'DefaultStatusUpdatesMailAddress' => [
],
'Email' => '',
'Id' => 0,
'LanguageId' => 0,
'MetaData' => [
[
]
],
'Name' => '',
'Number' => 0,
'PriceGroupId' => 0,
'RestoredAt' => '',
'Tel1' => '',
'Tel2' => '',
'Type' => 0,
'VatId' => ''
],
'CustomerNumber' => '',
'CustomerVatId' => '',
'DeliverySourceCountryCode' => '',
'DistributionCenter' => '',
'History' => [
[
'Created' => '',
'EmployeeName' => '',
'EventTypeName' => '',
'Text' => '',
'TypeId' => 0
]
],
'Id' => '',
'InvoiceAddress' => [
'BillbeeId' => 0,
'City' => '',
'Company' => '',
'Country' => '',
'CountryISO2' => '',
'Email' => '',
'FirstName' => '',
'HouseNumber' => '',
'LastName' => '',
'Line2' => '',
'NameAddition' => '',
'Phone' => '',
'State' => '',
'Street' => '',
'Zip' => ''
],
'InvoiceDate' => '',
'InvoiceNumber' => 0,
'InvoiceNumberPostfix' => '',
'InvoiceNumberPrefix' => '',
'IsCancelationFor' => '',
'IsFromBillbeeApi' => null,
'LanguageCode' => '',
'LastModifiedAt' => '',
'MerchantVatId' => '',
'OrderItems' => [
[
'Attributes' => [
[
'Id' => '',
'Name' => '',
'Price' => '',
'Value' => ''
]
],
'BillbeeId' => 0,
'Discount' => '',
'DontAdjustStock' => null,
'GetPriceFromArticleIfAny' => null,
'InvoiceSKU' => '',
'IsCoupon' => null,
'Product' => [
'BillbeeId' => 0,
'CountryOfOrigin' => '',
'EAN' => '',
'Id' => '',
'Images' => [
[
'ExternalId' => '',
'IsDefaultImage' => null,
'Position' => 0,
'Url' => ''
]
],
'IsDigital' => null,
'OldId' => '',
'PlatformData' => '',
'SKU' => '',
'SkuOrId' => '',
'TARICCode' => '',
'Title' => '',
'Type' => 0,
'Weight' => 0
],
'Quantity' => '',
'SerialNumber' => '',
'ShippingProfileId' => '',
'TaxAmount' => '',
'TaxIndex' => 0,
'TotalPrice' => '',
'TransactionId' => '',
'UnrebatedTotalPrice' => ''
]
],
'OrderNumber' => '',
'PaidAmount' => '',
'PayedAt' => '',
'PaymentInstruction' => '',
'PaymentMethod' => 0,
'PaymentReference' => '',
'PaymentTransactionId' => '',
'Payments' => [
[
'BillbeeId' => 0,
'Name' => '',
'PayDate' => '',
'PayValue' => '',
'PaymentType' => 0,
'Purpose' => '',
'SourceTechnology' => '',
'SourceText' => '',
'TransactionId' => ''
]
],
'RebateDifference' => '',
'RestoredAt' => '',
'Seller' => [
],
'SellerComment' => '',
'ShipWeightKg' => '',
'ShippedAt' => '',
'ShippingAddress' => [
],
'ShippingCost' => '',
'ShippingIds' => [
[
'BillbeeId' => 0,
'Created' => '',
'ShipmentType' => 0,
'Shipper' => '',
'ShippingCarrier' => 0,
'ShippingId' => '',
'ShippingProviderId' => 0,
'ShippingProviderProductId' => 0,
'TrackingUrl' => ''
]
],
'ShippingProfileId' => '',
'ShippingProfileName' => '',
'ShippingProviderId' => 0,
'ShippingProviderName' => '',
'ShippingProviderProductId' => 0,
'ShippingProviderProductName' => '',
'ShippingServices' => [
[
'CanBeConfigured' => null,
'DisplayName' => '',
'DisplayValue' => '',
'PossibleValueLists' => [
[
'key' => '',
'value' => [
[
'key' => 0,
'value' => ''
]
]
]
],
'RequiresUserInput' => null,
'ServiceName' => '',
'typeName' => ''
]
],
'State' => 0,
'Tags' => [
],
'TaxRate1' => '',
'TaxRate2' => '',
'TotalCost' => '',
'UpdatedAt' => '',
'VatId' => '',
'VatMode' => 0
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'AcceptLossOfReturnRight' => null,
'AdjustmentCost' => '',
'AdjustmentReason' => '',
'ApiAccountId' => 0,
'ApiAccountName' => '',
'ArchivedAt' => '',
'BillBeeOrderId' => 0,
'BillBeeParentOrderId' => 0,
'Buyer' => [
'BillbeeShopId' => 0,
'BillbeeShopName' => '',
'Email' => '',
'FirstName' => '',
'FullName' => '',
'Id' => '',
'LastName' => '',
'Nick' => '',
'Platform' => ''
],
'Comments' => [
[
'Created' => '',
'FromCustomer' => null,
'Id' => 0,
'Name' => '',
'Text' => ''
]
],
'ConfirmedAt' => '',
'CreatedAt' => '',
'Currency' => '',
'CustomInvoiceNote' => '',
'Customer' => [
'ArchivedAt' => '',
'DefaultCommercialMailAddress' => [
'Id' => 0,
'SubType' => '',
'TypeId' => 0,
'TypeName' => '',
'Value' => ''
],
'DefaultFax' => [
],
'DefaultMailAddress' => [
],
'DefaultPhone1' => [
],
'DefaultPhone2' => [
],
'DefaultStatusUpdatesMailAddress' => [
],
'Email' => '',
'Id' => 0,
'LanguageId' => 0,
'MetaData' => [
[
]
],
'Name' => '',
'Number' => 0,
'PriceGroupId' => 0,
'RestoredAt' => '',
'Tel1' => '',
'Tel2' => '',
'Type' => 0,
'VatId' => ''
],
'CustomerNumber' => '',
'CustomerVatId' => '',
'DeliverySourceCountryCode' => '',
'DistributionCenter' => '',
'History' => [
[
'Created' => '',
'EmployeeName' => '',
'EventTypeName' => '',
'Text' => '',
'TypeId' => 0
]
],
'Id' => '',
'InvoiceAddress' => [
'BillbeeId' => 0,
'City' => '',
'Company' => '',
'Country' => '',
'CountryISO2' => '',
'Email' => '',
'FirstName' => '',
'HouseNumber' => '',
'LastName' => '',
'Line2' => '',
'NameAddition' => '',
'Phone' => '',
'State' => '',
'Street' => '',
'Zip' => ''
],
'InvoiceDate' => '',
'InvoiceNumber' => 0,
'InvoiceNumberPostfix' => '',
'InvoiceNumberPrefix' => '',
'IsCancelationFor' => '',
'IsFromBillbeeApi' => null,
'LanguageCode' => '',
'LastModifiedAt' => '',
'MerchantVatId' => '',
'OrderItems' => [
[
'Attributes' => [
[
'Id' => '',
'Name' => '',
'Price' => '',
'Value' => ''
]
],
'BillbeeId' => 0,
'Discount' => '',
'DontAdjustStock' => null,
'GetPriceFromArticleIfAny' => null,
'InvoiceSKU' => '',
'IsCoupon' => null,
'Product' => [
'BillbeeId' => 0,
'CountryOfOrigin' => '',
'EAN' => '',
'Id' => '',
'Images' => [
[
'ExternalId' => '',
'IsDefaultImage' => null,
'Position' => 0,
'Url' => ''
]
],
'IsDigital' => null,
'OldId' => '',
'PlatformData' => '',
'SKU' => '',
'SkuOrId' => '',
'TARICCode' => '',
'Title' => '',
'Type' => 0,
'Weight' => 0
],
'Quantity' => '',
'SerialNumber' => '',
'ShippingProfileId' => '',
'TaxAmount' => '',
'TaxIndex' => 0,
'TotalPrice' => '',
'TransactionId' => '',
'UnrebatedTotalPrice' => ''
]
],
'OrderNumber' => '',
'PaidAmount' => '',
'PayedAt' => '',
'PaymentInstruction' => '',
'PaymentMethod' => 0,
'PaymentReference' => '',
'PaymentTransactionId' => '',
'Payments' => [
[
'BillbeeId' => 0,
'Name' => '',
'PayDate' => '',
'PayValue' => '',
'PaymentType' => 0,
'Purpose' => '',
'SourceTechnology' => '',
'SourceText' => '',
'TransactionId' => ''
]
],
'RebateDifference' => '',
'RestoredAt' => '',
'Seller' => [
],
'SellerComment' => '',
'ShipWeightKg' => '',
'ShippedAt' => '',
'ShippingAddress' => [
],
'ShippingCost' => '',
'ShippingIds' => [
[
'BillbeeId' => 0,
'Created' => '',
'ShipmentType' => 0,
'Shipper' => '',
'ShippingCarrier' => 0,
'ShippingId' => '',
'ShippingProviderId' => 0,
'ShippingProviderProductId' => 0,
'TrackingUrl' => ''
]
],
'ShippingProfileId' => '',
'ShippingProfileName' => '',
'ShippingProviderId' => 0,
'ShippingProviderName' => '',
'ShippingProviderProductId' => 0,
'ShippingProviderProductName' => '',
'ShippingServices' => [
[
'CanBeConfigured' => null,
'DisplayName' => '',
'DisplayValue' => '',
'PossibleValueLists' => [
[
'key' => '',
'value' => [
[
'key' => 0,
'value' => ''
]
]
]
],
'RequiresUserInput' => null,
'ServiceName' => '',
'typeName' => ''
]
],
'State' => 0,
'Tags' => [
],
'TaxRate1' => '',
'TaxRate2' => '',
'TotalCost' => '',
'UpdatedAt' => '',
'VatId' => '',
'VatMode' => 0
]));
$request->setRequestUrl('{{baseUrl}}/api/v1/orders');
$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}}/api/v1/orders' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"AcceptLossOfReturnRight": false,
"AdjustmentCost": "",
"AdjustmentReason": "",
"ApiAccountId": 0,
"ApiAccountName": "",
"ArchivedAt": "",
"BillBeeOrderId": 0,
"BillBeeParentOrderId": 0,
"Buyer": {
"BillbeeShopId": 0,
"BillbeeShopName": "",
"Email": "",
"FirstName": "",
"FullName": "",
"Id": "",
"LastName": "",
"Nick": "",
"Platform": ""
},
"Comments": [
{
"Created": "",
"FromCustomer": false,
"Id": 0,
"Name": "",
"Text": ""
}
],
"ConfirmedAt": "",
"CreatedAt": "",
"Currency": "",
"CustomInvoiceNote": "",
"Customer": {
"ArchivedAt": "",
"DefaultCommercialMailAddress": {
"Id": 0,
"SubType": "",
"TypeId": 0,
"TypeName": "",
"Value": ""
},
"DefaultFax": {},
"DefaultMailAddress": {},
"DefaultPhone1": {},
"DefaultPhone2": {},
"DefaultStatusUpdatesMailAddress": {},
"Email": "",
"Id": 0,
"LanguageId": 0,
"MetaData": [
{}
],
"Name": "",
"Number": 0,
"PriceGroupId": 0,
"RestoredAt": "",
"Tel1": "",
"Tel2": "",
"Type": 0,
"VatId": ""
},
"CustomerNumber": "",
"CustomerVatId": "",
"DeliverySourceCountryCode": "",
"DistributionCenter": "",
"History": [
{
"Created": "",
"EmployeeName": "",
"EventTypeName": "",
"Text": "",
"TypeId": 0
}
],
"Id": "",
"InvoiceAddress": {
"BillbeeId": 0,
"City": "",
"Company": "",
"Country": "",
"CountryISO2": "",
"Email": "",
"FirstName": "",
"HouseNumber": "",
"LastName": "",
"Line2": "",
"NameAddition": "",
"Phone": "",
"State": "",
"Street": "",
"Zip": ""
},
"InvoiceDate": "",
"InvoiceNumber": 0,
"InvoiceNumberPostfix": "",
"InvoiceNumberPrefix": "",
"IsCancelationFor": "",
"IsFromBillbeeApi": false,
"LanguageCode": "",
"LastModifiedAt": "",
"MerchantVatId": "",
"OrderItems": [
{
"Attributes": [
{
"Id": "",
"Name": "",
"Price": "",
"Value": ""
}
],
"BillbeeId": 0,
"Discount": "",
"DontAdjustStock": false,
"GetPriceFromArticleIfAny": false,
"InvoiceSKU": "",
"IsCoupon": false,
"Product": {
"BillbeeId": 0,
"CountryOfOrigin": "",
"EAN": "",
"Id": "",
"Images": [
{
"ExternalId": "",
"IsDefaultImage": false,
"Position": 0,
"Url": ""
}
],
"IsDigital": false,
"OldId": "",
"PlatformData": "",
"SKU": "",
"SkuOrId": "",
"TARICCode": "",
"Title": "",
"Type": 0,
"Weight": 0
},
"Quantity": "",
"SerialNumber": "",
"ShippingProfileId": "",
"TaxAmount": "",
"TaxIndex": 0,
"TotalPrice": "",
"TransactionId": "",
"UnrebatedTotalPrice": ""
}
],
"OrderNumber": "",
"PaidAmount": "",
"PayedAt": "",
"PaymentInstruction": "",
"PaymentMethod": 0,
"PaymentReference": "",
"PaymentTransactionId": "",
"Payments": [
{
"BillbeeId": 0,
"Name": "",
"PayDate": "",
"PayValue": "",
"PaymentType": 0,
"Purpose": "",
"SourceTechnology": "",
"SourceText": "",
"TransactionId": ""
}
],
"RebateDifference": "",
"RestoredAt": "",
"Seller": {},
"SellerComment": "",
"ShipWeightKg": "",
"ShippedAt": "",
"ShippingAddress": {},
"ShippingCost": "",
"ShippingIds": [
{
"BillbeeId": 0,
"Created": "",
"ShipmentType": 0,
"Shipper": "",
"ShippingCarrier": 0,
"ShippingId": "",
"ShippingProviderId": 0,
"ShippingProviderProductId": 0,
"TrackingUrl": ""
}
],
"ShippingProfileId": "",
"ShippingProfileName": "",
"ShippingProviderId": 0,
"ShippingProviderName": "",
"ShippingProviderProductId": 0,
"ShippingProviderProductName": "",
"ShippingServices": [
{
"CanBeConfigured": false,
"DisplayName": "",
"DisplayValue": "",
"PossibleValueLists": [
{
"key": "",
"value": [
{
"key": 0,
"value": ""
}
]
}
],
"RequiresUserInput": false,
"ServiceName": "",
"typeName": ""
}
],
"State": 0,
"Tags": [],
"TaxRate1": "",
"TaxRate2": "",
"TotalCost": "",
"UpdatedAt": "",
"VatId": "",
"VatMode": 0
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/v1/orders' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"AcceptLossOfReturnRight": false,
"AdjustmentCost": "",
"AdjustmentReason": "",
"ApiAccountId": 0,
"ApiAccountName": "",
"ArchivedAt": "",
"BillBeeOrderId": 0,
"BillBeeParentOrderId": 0,
"Buyer": {
"BillbeeShopId": 0,
"BillbeeShopName": "",
"Email": "",
"FirstName": "",
"FullName": "",
"Id": "",
"LastName": "",
"Nick": "",
"Platform": ""
},
"Comments": [
{
"Created": "",
"FromCustomer": false,
"Id": 0,
"Name": "",
"Text": ""
}
],
"ConfirmedAt": "",
"CreatedAt": "",
"Currency": "",
"CustomInvoiceNote": "",
"Customer": {
"ArchivedAt": "",
"DefaultCommercialMailAddress": {
"Id": 0,
"SubType": "",
"TypeId": 0,
"TypeName": "",
"Value": ""
},
"DefaultFax": {},
"DefaultMailAddress": {},
"DefaultPhone1": {},
"DefaultPhone2": {},
"DefaultStatusUpdatesMailAddress": {},
"Email": "",
"Id": 0,
"LanguageId": 0,
"MetaData": [
{}
],
"Name": "",
"Number": 0,
"PriceGroupId": 0,
"RestoredAt": "",
"Tel1": "",
"Tel2": "",
"Type": 0,
"VatId": ""
},
"CustomerNumber": "",
"CustomerVatId": "",
"DeliverySourceCountryCode": "",
"DistributionCenter": "",
"History": [
{
"Created": "",
"EmployeeName": "",
"EventTypeName": "",
"Text": "",
"TypeId": 0
}
],
"Id": "",
"InvoiceAddress": {
"BillbeeId": 0,
"City": "",
"Company": "",
"Country": "",
"CountryISO2": "",
"Email": "",
"FirstName": "",
"HouseNumber": "",
"LastName": "",
"Line2": "",
"NameAddition": "",
"Phone": "",
"State": "",
"Street": "",
"Zip": ""
},
"InvoiceDate": "",
"InvoiceNumber": 0,
"InvoiceNumberPostfix": "",
"InvoiceNumberPrefix": "",
"IsCancelationFor": "",
"IsFromBillbeeApi": false,
"LanguageCode": "",
"LastModifiedAt": "",
"MerchantVatId": "",
"OrderItems": [
{
"Attributes": [
{
"Id": "",
"Name": "",
"Price": "",
"Value": ""
}
],
"BillbeeId": 0,
"Discount": "",
"DontAdjustStock": false,
"GetPriceFromArticleIfAny": false,
"InvoiceSKU": "",
"IsCoupon": false,
"Product": {
"BillbeeId": 0,
"CountryOfOrigin": "",
"EAN": "",
"Id": "",
"Images": [
{
"ExternalId": "",
"IsDefaultImage": false,
"Position": 0,
"Url": ""
}
],
"IsDigital": false,
"OldId": "",
"PlatformData": "",
"SKU": "",
"SkuOrId": "",
"TARICCode": "",
"Title": "",
"Type": 0,
"Weight": 0
},
"Quantity": "",
"SerialNumber": "",
"ShippingProfileId": "",
"TaxAmount": "",
"TaxIndex": 0,
"TotalPrice": "",
"TransactionId": "",
"UnrebatedTotalPrice": ""
}
],
"OrderNumber": "",
"PaidAmount": "",
"PayedAt": "",
"PaymentInstruction": "",
"PaymentMethod": 0,
"PaymentReference": "",
"PaymentTransactionId": "",
"Payments": [
{
"BillbeeId": 0,
"Name": "",
"PayDate": "",
"PayValue": "",
"PaymentType": 0,
"Purpose": "",
"SourceTechnology": "",
"SourceText": "",
"TransactionId": ""
}
],
"RebateDifference": "",
"RestoredAt": "",
"Seller": {},
"SellerComment": "",
"ShipWeightKg": "",
"ShippedAt": "",
"ShippingAddress": {},
"ShippingCost": "",
"ShippingIds": [
{
"BillbeeId": 0,
"Created": "",
"ShipmentType": 0,
"Shipper": "",
"ShippingCarrier": 0,
"ShippingId": "",
"ShippingProviderId": 0,
"ShippingProviderProductId": 0,
"TrackingUrl": ""
}
],
"ShippingProfileId": "",
"ShippingProfileName": "",
"ShippingProviderId": 0,
"ShippingProviderName": "",
"ShippingProviderProductId": 0,
"ShippingProviderProductName": "",
"ShippingServices": [
{
"CanBeConfigured": false,
"DisplayName": "",
"DisplayValue": "",
"PossibleValueLists": [
{
"key": "",
"value": [
{
"key": 0,
"value": ""
}
]
}
],
"RequiresUserInput": false,
"ServiceName": "",
"typeName": ""
}
],
"State": 0,
"Tags": [],
"TaxRate1": "",
"TaxRate2": "",
"TotalCost": "",
"UpdatedAt": "",
"VatId": "",
"VatMode": 0
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"AcceptLossOfReturnRight\": false,\n \"AdjustmentCost\": \"\",\n \"AdjustmentReason\": \"\",\n \"ApiAccountId\": 0,\n \"ApiAccountName\": \"\",\n \"ArchivedAt\": \"\",\n \"BillBeeOrderId\": 0,\n \"BillBeeParentOrderId\": 0,\n \"Buyer\": {\n \"BillbeeShopId\": 0,\n \"BillbeeShopName\": \"\",\n \"Email\": \"\",\n \"FirstName\": \"\",\n \"FullName\": \"\",\n \"Id\": \"\",\n \"LastName\": \"\",\n \"Nick\": \"\",\n \"Platform\": \"\"\n },\n \"Comments\": [\n {\n \"Created\": \"\",\n \"FromCustomer\": false,\n \"Id\": 0,\n \"Name\": \"\",\n \"Text\": \"\"\n }\n ],\n \"ConfirmedAt\": \"\",\n \"CreatedAt\": \"\",\n \"Currency\": \"\",\n \"CustomInvoiceNote\": \"\",\n \"Customer\": {\n \"ArchivedAt\": \"\",\n \"DefaultCommercialMailAddress\": {\n \"Id\": 0,\n \"SubType\": \"\",\n \"TypeId\": 0,\n \"TypeName\": \"\",\n \"Value\": \"\"\n },\n \"DefaultFax\": {},\n \"DefaultMailAddress\": {},\n \"DefaultPhone1\": {},\n \"DefaultPhone2\": {},\n \"DefaultStatusUpdatesMailAddress\": {},\n \"Email\": \"\",\n \"Id\": 0,\n \"LanguageId\": 0,\n \"MetaData\": [\n {}\n ],\n \"Name\": \"\",\n \"Number\": 0,\n \"PriceGroupId\": 0,\n \"RestoredAt\": \"\",\n \"Tel1\": \"\",\n \"Tel2\": \"\",\n \"Type\": 0,\n \"VatId\": \"\"\n },\n \"CustomerNumber\": \"\",\n \"CustomerVatId\": \"\",\n \"DeliverySourceCountryCode\": \"\",\n \"DistributionCenter\": \"\",\n \"History\": [\n {\n \"Created\": \"\",\n \"EmployeeName\": \"\",\n \"EventTypeName\": \"\",\n \"Text\": \"\",\n \"TypeId\": 0\n }\n ],\n \"Id\": \"\",\n \"InvoiceAddress\": {\n \"BillbeeId\": 0,\n \"City\": \"\",\n \"Company\": \"\",\n \"Country\": \"\",\n \"CountryISO2\": \"\",\n \"Email\": \"\",\n \"FirstName\": \"\",\n \"HouseNumber\": \"\",\n \"LastName\": \"\",\n \"Line2\": \"\",\n \"NameAddition\": \"\",\n \"Phone\": \"\",\n \"State\": \"\",\n \"Street\": \"\",\n \"Zip\": \"\"\n },\n \"InvoiceDate\": \"\",\n \"InvoiceNumber\": 0,\n \"InvoiceNumberPostfix\": \"\",\n \"InvoiceNumberPrefix\": \"\",\n \"IsCancelationFor\": \"\",\n \"IsFromBillbeeApi\": false,\n \"LanguageCode\": \"\",\n \"LastModifiedAt\": \"\",\n \"MerchantVatId\": \"\",\n \"OrderItems\": [\n {\n \"Attributes\": [\n {\n \"Id\": \"\",\n \"Name\": \"\",\n \"Price\": \"\",\n \"Value\": \"\"\n }\n ],\n \"BillbeeId\": 0,\n \"Discount\": \"\",\n \"DontAdjustStock\": false,\n \"GetPriceFromArticleIfAny\": false,\n \"InvoiceSKU\": \"\",\n \"IsCoupon\": false,\n \"Product\": {\n \"BillbeeId\": 0,\n \"CountryOfOrigin\": \"\",\n \"EAN\": \"\",\n \"Id\": \"\",\n \"Images\": [\n {\n \"ExternalId\": \"\",\n \"IsDefaultImage\": false,\n \"Position\": 0,\n \"Url\": \"\"\n }\n ],\n \"IsDigital\": false,\n \"OldId\": \"\",\n \"PlatformData\": \"\",\n \"SKU\": \"\",\n \"SkuOrId\": \"\",\n \"TARICCode\": \"\",\n \"Title\": \"\",\n \"Type\": 0,\n \"Weight\": 0\n },\n \"Quantity\": \"\",\n \"SerialNumber\": \"\",\n \"ShippingProfileId\": \"\",\n \"TaxAmount\": \"\",\n \"TaxIndex\": 0,\n \"TotalPrice\": \"\",\n \"TransactionId\": \"\",\n \"UnrebatedTotalPrice\": \"\"\n }\n ],\n \"OrderNumber\": \"\",\n \"PaidAmount\": \"\",\n \"PayedAt\": \"\",\n \"PaymentInstruction\": \"\",\n \"PaymentMethod\": 0,\n \"PaymentReference\": \"\",\n \"PaymentTransactionId\": \"\",\n \"Payments\": [\n {\n \"BillbeeId\": 0,\n \"Name\": \"\",\n \"PayDate\": \"\",\n \"PayValue\": \"\",\n \"PaymentType\": 0,\n \"Purpose\": \"\",\n \"SourceTechnology\": \"\",\n \"SourceText\": \"\",\n \"TransactionId\": \"\"\n }\n ],\n \"RebateDifference\": \"\",\n \"RestoredAt\": \"\",\n \"Seller\": {},\n \"SellerComment\": \"\",\n \"ShipWeightKg\": \"\",\n \"ShippedAt\": \"\",\n \"ShippingAddress\": {},\n \"ShippingCost\": \"\",\n \"ShippingIds\": [\n {\n \"BillbeeId\": 0,\n \"Created\": \"\",\n \"ShipmentType\": 0,\n \"Shipper\": \"\",\n \"ShippingCarrier\": 0,\n \"ShippingId\": \"\",\n \"ShippingProviderId\": 0,\n \"ShippingProviderProductId\": 0,\n \"TrackingUrl\": \"\"\n }\n ],\n \"ShippingProfileId\": \"\",\n \"ShippingProfileName\": \"\",\n \"ShippingProviderId\": 0,\n \"ShippingProviderName\": \"\",\n \"ShippingProviderProductId\": 0,\n \"ShippingProviderProductName\": \"\",\n \"ShippingServices\": [\n {\n \"CanBeConfigured\": false,\n \"DisplayName\": \"\",\n \"DisplayValue\": \"\",\n \"PossibleValueLists\": [\n {\n \"key\": \"\",\n \"value\": [\n {\n \"key\": 0,\n \"value\": \"\"\n }\n ]\n }\n ],\n \"RequiresUserInput\": false,\n \"ServiceName\": \"\",\n \"typeName\": \"\"\n }\n ],\n \"State\": 0,\n \"Tags\": [],\n \"TaxRate1\": \"\",\n \"TaxRate2\": \"\",\n \"TotalCost\": \"\",\n \"UpdatedAt\": \"\",\n \"VatId\": \"\",\n \"VatMode\": 0\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/api/v1/orders", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/v1/orders"
payload = {
"AcceptLossOfReturnRight": False,
"AdjustmentCost": "",
"AdjustmentReason": "",
"ApiAccountId": 0,
"ApiAccountName": "",
"ArchivedAt": "",
"BillBeeOrderId": 0,
"BillBeeParentOrderId": 0,
"Buyer": {
"BillbeeShopId": 0,
"BillbeeShopName": "",
"Email": "",
"FirstName": "",
"FullName": "",
"Id": "",
"LastName": "",
"Nick": "",
"Platform": ""
},
"Comments": [
{
"Created": "",
"FromCustomer": False,
"Id": 0,
"Name": "",
"Text": ""
}
],
"ConfirmedAt": "",
"CreatedAt": "",
"Currency": "",
"CustomInvoiceNote": "",
"Customer": {
"ArchivedAt": "",
"DefaultCommercialMailAddress": {
"Id": 0,
"SubType": "",
"TypeId": 0,
"TypeName": "",
"Value": ""
},
"DefaultFax": {},
"DefaultMailAddress": {},
"DefaultPhone1": {},
"DefaultPhone2": {},
"DefaultStatusUpdatesMailAddress": {},
"Email": "",
"Id": 0,
"LanguageId": 0,
"MetaData": [{}],
"Name": "",
"Number": 0,
"PriceGroupId": 0,
"RestoredAt": "",
"Tel1": "",
"Tel2": "",
"Type": 0,
"VatId": ""
},
"CustomerNumber": "",
"CustomerVatId": "",
"DeliverySourceCountryCode": "",
"DistributionCenter": "",
"History": [
{
"Created": "",
"EmployeeName": "",
"EventTypeName": "",
"Text": "",
"TypeId": 0
}
],
"Id": "",
"InvoiceAddress": {
"BillbeeId": 0,
"City": "",
"Company": "",
"Country": "",
"CountryISO2": "",
"Email": "",
"FirstName": "",
"HouseNumber": "",
"LastName": "",
"Line2": "",
"NameAddition": "",
"Phone": "",
"State": "",
"Street": "",
"Zip": ""
},
"InvoiceDate": "",
"InvoiceNumber": 0,
"InvoiceNumberPostfix": "",
"InvoiceNumberPrefix": "",
"IsCancelationFor": "",
"IsFromBillbeeApi": False,
"LanguageCode": "",
"LastModifiedAt": "",
"MerchantVatId": "",
"OrderItems": [
{
"Attributes": [
{
"Id": "",
"Name": "",
"Price": "",
"Value": ""
}
],
"BillbeeId": 0,
"Discount": "",
"DontAdjustStock": False,
"GetPriceFromArticleIfAny": False,
"InvoiceSKU": "",
"IsCoupon": False,
"Product": {
"BillbeeId": 0,
"CountryOfOrigin": "",
"EAN": "",
"Id": "",
"Images": [
{
"ExternalId": "",
"IsDefaultImage": False,
"Position": 0,
"Url": ""
}
],
"IsDigital": False,
"OldId": "",
"PlatformData": "",
"SKU": "",
"SkuOrId": "",
"TARICCode": "",
"Title": "",
"Type": 0,
"Weight": 0
},
"Quantity": "",
"SerialNumber": "",
"ShippingProfileId": "",
"TaxAmount": "",
"TaxIndex": 0,
"TotalPrice": "",
"TransactionId": "",
"UnrebatedTotalPrice": ""
}
],
"OrderNumber": "",
"PaidAmount": "",
"PayedAt": "",
"PaymentInstruction": "",
"PaymentMethod": 0,
"PaymentReference": "",
"PaymentTransactionId": "",
"Payments": [
{
"BillbeeId": 0,
"Name": "",
"PayDate": "",
"PayValue": "",
"PaymentType": 0,
"Purpose": "",
"SourceTechnology": "",
"SourceText": "",
"TransactionId": ""
}
],
"RebateDifference": "",
"RestoredAt": "",
"Seller": {},
"SellerComment": "",
"ShipWeightKg": "",
"ShippedAt": "",
"ShippingAddress": {},
"ShippingCost": "",
"ShippingIds": [
{
"BillbeeId": 0,
"Created": "",
"ShipmentType": 0,
"Shipper": "",
"ShippingCarrier": 0,
"ShippingId": "",
"ShippingProviderId": 0,
"ShippingProviderProductId": 0,
"TrackingUrl": ""
}
],
"ShippingProfileId": "",
"ShippingProfileName": "",
"ShippingProviderId": 0,
"ShippingProviderName": "",
"ShippingProviderProductId": 0,
"ShippingProviderProductName": "",
"ShippingServices": [
{
"CanBeConfigured": False,
"DisplayName": "",
"DisplayValue": "",
"PossibleValueLists": [
{
"key": "",
"value": [
{
"key": 0,
"value": ""
}
]
}
],
"RequiresUserInput": False,
"ServiceName": "",
"typeName": ""
}
],
"State": 0,
"Tags": [],
"TaxRate1": "",
"TaxRate2": "",
"TotalCost": "",
"UpdatedAt": "",
"VatId": "",
"VatMode": 0
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/v1/orders"
payload <- "{\n \"AcceptLossOfReturnRight\": false,\n \"AdjustmentCost\": \"\",\n \"AdjustmentReason\": \"\",\n \"ApiAccountId\": 0,\n \"ApiAccountName\": \"\",\n \"ArchivedAt\": \"\",\n \"BillBeeOrderId\": 0,\n \"BillBeeParentOrderId\": 0,\n \"Buyer\": {\n \"BillbeeShopId\": 0,\n \"BillbeeShopName\": \"\",\n \"Email\": \"\",\n \"FirstName\": \"\",\n \"FullName\": \"\",\n \"Id\": \"\",\n \"LastName\": \"\",\n \"Nick\": \"\",\n \"Platform\": \"\"\n },\n \"Comments\": [\n {\n \"Created\": \"\",\n \"FromCustomer\": false,\n \"Id\": 0,\n \"Name\": \"\",\n \"Text\": \"\"\n }\n ],\n \"ConfirmedAt\": \"\",\n \"CreatedAt\": \"\",\n \"Currency\": \"\",\n \"CustomInvoiceNote\": \"\",\n \"Customer\": {\n \"ArchivedAt\": \"\",\n \"DefaultCommercialMailAddress\": {\n \"Id\": 0,\n \"SubType\": \"\",\n \"TypeId\": 0,\n \"TypeName\": \"\",\n \"Value\": \"\"\n },\n \"DefaultFax\": {},\n \"DefaultMailAddress\": {},\n \"DefaultPhone1\": {},\n \"DefaultPhone2\": {},\n \"DefaultStatusUpdatesMailAddress\": {},\n \"Email\": \"\",\n \"Id\": 0,\n \"LanguageId\": 0,\n \"MetaData\": [\n {}\n ],\n \"Name\": \"\",\n \"Number\": 0,\n \"PriceGroupId\": 0,\n \"RestoredAt\": \"\",\n \"Tel1\": \"\",\n \"Tel2\": \"\",\n \"Type\": 0,\n \"VatId\": \"\"\n },\n \"CustomerNumber\": \"\",\n \"CustomerVatId\": \"\",\n \"DeliverySourceCountryCode\": \"\",\n \"DistributionCenter\": \"\",\n \"History\": [\n {\n \"Created\": \"\",\n \"EmployeeName\": \"\",\n \"EventTypeName\": \"\",\n \"Text\": \"\",\n \"TypeId\": 0\n }\n ],\n \"Id\": \"\",\n \"InvoiceAddress\": {\n \"BillbeeId\": 0,\n \"City\": \"\",\n \"Company\": \"\",\n \"Country\": \"\",\n \"CountryISO2\": \"\",\n \"Email\": \"\",\n \"FirstName\": \"\",\n \"HouseNumber\": \"\",\n \"LastName\": \"\",\n \"Line2\": \"\",\n \"NameAddition\": \"\",\n \"Phone\": \"\",\n \"State\": \"\",\n \"Street\": \"\",\n \"Zip\": \"\"\n },\n \"InvoiceDate\": \"\",\n \"InvoiceNumber\": 0,\n \"InvoiceNumberPostfix\": \"\",\n \"InvoiceNumberPrefix\": \"\",\n \"IsCancelationFor\": \"\",\n \"IsFromBillbeeApi\": false,\n \"LanguageCode\": \"\",\n \"LastModifiedAt\": \"\",\n \"MerchantVatId\": \"\",\n \"OrderItems\": [\n {\n \"Attributes\": [\n {\n \"Id\": \"\",\n \"Name\": \"\",\n \"Price\": \"\",\n \"Value\": \"\"\n }\n ],\n \"BillbeeId\": 0,\n \"Discount\": \"\",\n \"DontAdjustStock\": false,\n \"GetPriceFromArticleIfAny\": false,\n \"InvoiceSKU\": \"\",\n \"IsCoupon\": false,\n \"Product\": {\n \"BillbeeId\": 0,\n \"CountryOfOrigin\": \"\",\n \"EAN\": \"\",\n \"Id\": \"\",\n \"Images\": [\n {\n \"ExternalId\": \"\",\n \"IsDefaultImage\": false,\n \"Position\": 0,\n \"Url\": \"\"\n }\n ],\n \"IsDigital\": false,\n \"OldId\": \"\",\n \"PlatformData\": \"\",\n \"SKU\": \"\",\n \"SkuOrId\": \"\",\n \"TARICCode\": \"\",\n \"Title\": \"\",\n \"Type\": 0,\n \"Weight\": 0\n },\n \"Quantity\": \"\",\n \"SerialNumber\": \"\",\n \"ShippingProfileId\": \"\",\n \"TaxAmount\": \"\",\n \"TaxIndex\": 0,\n \"TotalPrice\": \"\",\n \"TransactionId\": \"\",\n \"UnrebatedTotalPrice\": \"\"\n }\n ],\n \"OrderNumber\": \"\",\n \"PaidAmount\": \"\",\n \"PayedAt\": \"\",\n \"PaymentInstruction\": \"\",\n \"PaymentMethod\": 0,\n \"PaymentReference\": \"\",\n \"PaymentTransactionId\": \"\",\n \"Payments\": [\n {\n \"BillbeeId\": 0,\n \"Name\": \"\",\n \"PayDate\": \"\",\n \"PayValue\": \"\",\n \"PaymentType\": 0,\n \"Purpose\": \"\",\n \"SourceTechnology\": \"\",\n \"SourceText\": \"\",\n \"TransactionId\": \"\"\n }\n ],\n \"RebateDifference\": \"\",\n \"RestoredAt\": \"\",\n \"Seller\": {},\n \"SellerComment\": \"\",\n \"ShipWeightKg\": \"\",\n \"ShippedAt\": \"\",\n \"ShippingAddress\": {},\n \"ShippingCost\": \"\",\n \"ShippingIds\": [\n {\n \"BillbeeId\": 0,\n \"Created\": \"\",\n \"ShipmentType\": 0,\n \"Shipper\": \"\",\n \"ShippingCarrier\": 0,\n \"ShippingId\": \"\",\n \"ShippingProviderId\": 0,\n \"ShippingProviderProductId\": 0,\n \"TrackingUrl\": \"\"\n }\n ],\n \"ShippingProfileId\": \"\",\n \"ShippingProfileName\": \"\",\n \"ShippingProviderId\": 0,\n \"ShippingProviderName\": \"\",\n \"ShippingProviderProductId\": 0,\n \"ShippingProviderProductName\": \"\",\n \"ShippingServices\": [\n {\n \"CanBeConfigured\": false,\n \"DisplayName\": \"\",\n \"DisplayValue\": \"\",\n \"PossibleValueLists\": [\n {\n \"key\": \"\",\n \"value\": [\n {\n \"key\": 0,\n \"value\": \"\"\n }\n ]\n }\n ],\n \"RequiresUserInput\": false,\n \"ServiceName\": \"\",\n \"typeName\": \"\"\n }\n ],\n \"State\": 0,\n \"Tags\": [],\n \"TaxRate1\": \"\",\n \"TaxRate2\": \"\",\n \"TotalCost\": \"\",\n \"UpdatedAt\": \"\",\n \"VatId\": \"\",\n \"VatMode\": 0\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}}/api/v1/orders")
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 \"AcceptLossOfReturnRight\": false,\n \"AdjustmentCost\": \"\",\n \"AdjustmentReason\": \"\",\n \"ApiAccountId\": 0,\n \"ApiAccountName\": \"\",\n \"ArchivedAt\": \"\",\n \"BillBeeOrderId\": 0,\n \"BillBeeParentOrderId\": 0,\n \"Buyer\": {\n \"BillbeeShopId\": 0,\n \"BillbeeShopName\": \"\",\n \"Email\": \"\",\n \"FirstName\": \"\",\n \"FullName\": \"\",\n \"Id\": \"\",\n \"LastName\": \"\",\n \"Nick\": \"\",\n \"Platform\": \"\"\n },\n \"Comments\": [\n {\n \"Created\": \"\",\n \"FromCustomer\": false,\n \"Id\": 0,\n \"Name\": \"\",\n \"Text\": \"\"\n }\n ],\n \"ConfirmedAt\": \"\",\n \"CreatedAt\": \"\",\n \"Currency\": \"\",\n \"CustomInvoiceNote\": \"\",\n \"Customer\": {\n \"ArchivedAt\": \"\",\n \"DefaultCommercialMailAddress\": {\n \"Id\": 0,\n \"SubType\": \"\",\n \"TypeId\": 0,\n \"TypeName\": \"\",\n \"Value\": \"\"\n },\n \"DefaultFax\": {},\n \"DefaultMailAddress\": {},\n \"DefaultPhone1\": {},\n \"DefaultPhone2\": {},\n \"DefaultStatusUpdatesMailAddress\": {},\n \"Email\": \"\",\n \"Id\": 0,\n \"LanguageId\": 0,\n \"MetaData\": [\n {}\n ],\n \"Name\": \"\",\n \"Number\": 0,\n \"PriceGroupId\": 0,\n \"RestoredAt\": \"\",\n \"Tel1\": \"\",\n \"Tel2\": \"\",\n \"Type\": 0,\n \"VatId\": \"\"\n },\n \"CustomerNumber\": \"\",\n \"CustomerVatId\": \"\",\n \"DeliverySourceCountryCode\": \"\",\n \"DistributionCenter\": \"\",\n \"History\": [\n {\n \"Created\": \"\",\n \"EmployeeName\": \"\",\n \"EventTypeName\": \"\",\n \"Text\": \"\",\n \"TypeId\": 0\n }\n ],\n \"Id\": \"\",\n \"InvoiceAddress\": {\n \"BillbeeId\": 0,\n \"City\": \"\",\n \"Company\": \"\",\n \"Country\": \"\",\n \"CountryISO2\": \"\",\n \"Email\": \"\",\n \"FirstName\": \"\",\n \"HouseNumber\": \"\",\n \"LastName\": \"\",\n \"Line2\": \"\",\n \"NameAddition\": \"\",\n \"Phone\": \"\",\n \"State\": \"\",\n \"Street\": \"\",\n \"Zip\": \"\"\n },\n \"InvoiceDate\": \"\",\n \"InvoiceNumber\": 0,\n \"InvoiceNumberPostfix\": \"\",\n \"InvoiceNumberPrefix\": \"\",\n \"IsCancelationFor\": \"\",\n \"IsFromBillbeeApi\": false,\n \"LanguageCode\": \"\",\n \"LastModifiedAt\": \"\",\n \"MerchantVatId\": \"\",\n \"OrderItems\": [\n {\n \"Attributes\": [\n {\n \"Id\": \"\",\n \"Name\": \"\",\n \"Price\": \"\",\n \"Value\": \"\"\n }\n ],\n \"BillbeeId\": 0,\n \"Discount\": \"\",\n \"DontAdjustStock\": false,\n \"GetPriceFromArticleIfAny\": false,\n \"InvoiceSKU\": \"\",\n \"IsCoupon\": false,\n \"Product\": {\n \"BillbeeId\": 0,\n \"CountryOfOrigin\": \"\",\n \"EAN\": \"\",\n \"Id\": \"\",\n \"Images\": [\n {\n \"ExternalId\": \"\",\n \"IsDefaultImage\": false,\n \"Position\": 0,\n \"Url\": \"\"\n }\n ],\n \"IsDigital\": false,\n \"OldId\": \"\",\n \"PlatformData\": \"\",\n \"SKU\": \"\",\n \"SkuOrId\": \"\",\n \"TARICCode\": \"\",\n \"Title\": \"\",\n \"Type\": 0,\n \"Weight\": 0\n },\n \"Quantity\": \"\",\n \"SerialNumber\": \"\",\n \"ShippingProfileId\": \"\",\n \"TaxAmount\": \"\",\n \"TaxIndex\": 0,\n \"TotalPrice\": \"\",\n \"TransactionId\": \"\",\n \"UnrebatedTotalPrice\": \"\"\n }\n ],\n \"OrderNumber\": \"\",\n \"PaidAmount\": \"\",\n \"PayedAt\": \"\",\n \"PaymentInstruction\": \"\",\n \"PaymentMethod\": 0,\n \"PaymentReference\": \"\",\n \"PaymentTransactionId\": \"\",\n \"Payments\": [\n {\n \"BillbeeId\": 0,\n \"Name\": \"\",\n \"PayDate\": \"\",\n \"PayValue\": \"\",\n \"PaymentType\": 0,\n \"Purpose\": \"\",\n \"SourceTechnology\": \"\",\n \"SourceText\": \"\",\n \"TransactionId\": \"\"\n }\n ],\n \"RebateDifference\": \"\",\n \"RestoredAt\": \"\",\n \"Seller\": {},\n \"SellerComment\": \"\",\n \"ShipWeightKg\": \"\",\n \"ShippedAt\": \"\",\n \"ShippingAddress\": {},\n \"ShippingCost\": \"\",\n \"ShippingIds\": [\n {\n \"BillbeeId\": 0,\n \"Created\": \"\",\n \"ShipmentType\": 0,\n \"Shipper\": \"\",\n \"ShippingCarrier\": 0,\n \"ShippingId\": \"\",\n \"ShippingProviderId\": 0,\n \"ShippingProviderProductId\": 0,\n \"TrackingUrl\": \"\"\n }\n ],\n \"ShippingProfileId\": \"\",\n \"ShippingProfileName\": \"\",\n \"ShippingProviderId\": 0,\n \"ShippingProviderName\": \"\",\n \"ShippingProviderProductId\": 0,\n \"ShippingProviderProductName\": \"\",\n \"ShippingServices\": [\n {\n \"CanBeConfigured\": false,\n \"DisplayName\": \"\",\n \"DisplayValue\": \"\",\n \"PossibleValueLists\": [\n {\n \"key\": \"\",\n \"value\": [\n {\n \"key\": 0,\n \"value\": \"\"\n }\n ]\n }\n ],\n \"RequiresUserInput\": false,\n \"ServiceName\": \"\",\n \"typeName\": \"\"\n }\n ],\n \"State\": 0,\n \"Tags\": [],\n \"TaxRate1\": \"\",\n \"TaxRate2\": \"\",\n \"TotalCost\": \"\",\n \"UpdatedAt\": \"\",\n \"VatId\": \"\",\n \"VatMode\": 0\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/api/v1/orders') do |req|
req.body = "{\n \"AcceptLossOfReturnRight\": false,\n \"AdjustmentCost\": \"\",\n \"AdjustmentReason\": \"\",\n \"ApiAccountId\": 0,\n \"ApiAccountName\": \"\",\n \"ArchivedAt\": \"\",\n \"BillBeeOrderId\": 0,\n \"BillBeeParentOrderId\": 0,\n \"Buyer\": {\n \"BillbeeShopId\": 0,\n \"BillbeeShopName\": \"\",\n \"Email\": \"\",\n \"FirstName\": \"\",\n \"FullName\": \"\",\n \"Id\": \"\",\n \"LastName\": \"\",\n \"Nick\": \"\",\n \"Platform\": \"\"\n },\n \"Comments\": [\n {\n \"Created\": \"\",\n \"FromCustomer\": false,\n \"Id\": 0,\n \"Name\": \"\",\n \"Text\": \"\"\n }\n ],\n \"ConfirmedAt\": \"\",\n \"CreatedAt\": \"\",\n \"Currency\": \"\",\n \"CustomInvoiceNote\": \"\",\n \"Customer\": {\n \"ArchivedAt\": \"\",\n \"DefaultCommercialMailAddress\": {\n \"Id\": 0,\n \"SubType\": \"\",\n \"TypeId\": 0,\n \"TypeName\": \"\",\n \"Value\": \"\"\n },\n \"DefaultFax\": {},\n \"DefaultMailAddress\": {},\n \"DefaultPhone1\": {},\n \"DefaultPhone2\": {},\n \"DefaultStatusUpdatesMailAddress\": {},\n \"Email\": \"\",\n \"Id\": 0,\n \"LanguageId\": 0,\n \"MetaData\": [\n {}\n ],\n \"Name\": \"\",\n \"Number\": 0,\n \"PriceGroupId\": 0,\n \"RestoredAt\": \"\",\n \"Tel1\": \"\",\n \"Tel2\": \"\",\n \"Type\": 0,\n \"VatId\": \"\"\n },\n \"CustomerNumber\": \"\",\n \"CustomerVatId\": \"\",\n \"DeliverySourceCountryCode\": \"\",\n \"DistributionCenter\": \"\",\n \"History\": [\n {\n \"Created\": \"\",\n \"EmployeeName\": \"\",\n \"EventTypeName\": \"\",\n \"Text\": \"\",\n \"TypeId\": 0\n }\n ],\n \"Id\": \"\",\n \"InvoiceAddress\": {\n \"BillbeeId\": 0,\n \"City\": \"\",\n \"Company\": \"\",\n \"Country\": \"\",\n \"CountryISO2\": \"\",\n \"Email\": \"\",\n \"FirstName\": \"\",\n \"HouseNumber\": \"\",\n \"LastName\": \"\",\n \"Line2\": \"\",\n \"NameAddition\": \"\",\n \"Phone\": \"\",\n \"State\": \"\",\n \"Street\": \"\",\n \"Zip\": \"\"\n },\n \"InvoiceDate\": \"\",\n \"InvoiceNumber\": 0,\n \"InvoiceNumberPostfix\": \"\",\n \"InvoiceNumberPrefix\": \"\",\n \"IsCancelationFor\": \"\",\n \"IsFromBillbeeApi\": false,\n \"LanguageCode\": \"\",\n \"LastModifiedAt\": \"\",\n \"MerchantVatId\": \"\",\n \"OrderItems\": [\n {\n \"Attributes\": [\n {\n \"Id\": \"\",\n \"Name\": \"\",\n \"Price\": \"\",\n \"Value\": \"\"\n }\n ],\n \"BillbeeId\": 0,\n \"Discount\": \"\",\n \"DontAdjustStock\": false,\n \"GetPriceFromArticleIfAny\": false,\n \"InvoiceSKU\": \"\",\n \"IsCoupon\": false,\n \"Product\": {\n \"BillbeeId\": 0,\n \"CountryOfOrigin\": \"\",\n \"EAN\": \"\",\n \"Id\": \"\",\n \"Images\": [\n {\n \"ExternalId\": \"\",\n \"IsDefaultImage\": false,\n \"Position\": 0,\n \"Url\": \"\"\n }\n ],\n \"IsDigital\": false,\n \"OldId\": \"\",\n \"PlatformData\": \"\",\n \"SKU\": \"\",\n \"SkuOrId\": \"\",\n \"TARICCode\": \"\",\n \"Title\": \"\",\n \"Type\": 0,\n \"Weight\": 0\n },\n \"Quantity\": \"\",\n \"SerialNumber\": \"\",\n \"ShippingProfileId\": \"\",\n \"TaxAmount\": \"\",\n \"TaxIndex\": 0,\n \"TotalPrice\": \"\",\n \"TransactionId\": \"\",\n \"UnrebatedTotalPrice\": \"\"\n }\n ],\n \"OrderNumber\": \"\",\n \"PaidAmount\": \"\",\n \"PayedAt\": \"\",\n \"PaymentInstruction\": \"\",\n \"PaymentMethod\": 0,\n \"PaymentReference\": \"\",\n \"PaymentTransactionId\": \"\",\n \"Payments\": [\n {\n \"BillbeeId\": 0,\n \"Name\": \"\",\n \"PayDate\": \"\",\n \"PayValue\": \"\",\n \"PaymentType\": 0,\n \"Purpose\": \"\",\n \"SourceTechnology\": \"\",\n \"SourceText\": \"\",\n \"TransactionId\": \"\"\n }\n ],\n \"RebateDifference\": \"\",\n \"RestoredAt\": \"\",\n \"Seller\": {},\n \"SellerComment\": \"\",\n \"ShipWeightKg\": \"\",\n \"ShippedAt\": \"\",\n \"ShippingAddress\": {},\n \"ShippingCost\": \"\",\n \"ShippingIds\": [\n {\n \"BillbeeId\": 0,\n \"Created\": \"\",\n \"ShipmentType\": 0,\n \"Shipper\": \"\",\n \"ShippingCarrier\": 0,\n \"ShippingId\": \"\",\n \"ShippingProviderId\": 0,\n \"ShippingProviderProductId\": 0,\n \"TrackingUrl\": \"\"\n }\n ],\n \"ShippingProfileId\": \"\",\n \"ShippingProfileName\": \"\",\n \"ShippingProviderId\": 0,\n \"ShippingProviderName\": \"\",\n \"ShippingProviderProductId\": 0,\n \"ShippingProviderProductName\": \"\",\n \"ShippingServices\": [\n {\n \"CanBeConfigured\": false,\n \"DisplayName\": \"\",\n \"DisplayValue\": \"\",\n \"PossibleValueLists\": [\n {\n \"key\": \"\",\n \"value\": [\n {\n \"key\": 0,\n \"value\": \"\"\n }\n ]\n }\n ],\n \"RequiresUserInput\": false,\n \"ServiceName\": \"\",\n \"typeName\": \"\"\n }\n ],\n \"State\": 0,\n \"Tags\": [],\n \"TaxRate1\": \"\",\n \"TaxRate2\": \"\",\n \"TotalCost\": \"\",\n \"UpdatedAt\": \"\",\n \"VatId\": \"\",\n \"VatMode\": 0\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/api/v1/orders";
let payload = json!({
"AcceptLossOfReturnRight": false,
"AdjustmentCost": "",
"AdjustmentReason": "",
"ApiAccountId": 0,
"ApiAccountName": "",
"ArchivedAt": "",
"BillBeeOrderId": 0,
"BillBeeParentOrderId": 0,
"Buyer": json!({
"BillbeeShopId": 0,
"BillbeeShopName": "",
"Email": "",
"FirstName": "",
"FullName": "",
"Id": "",
"LastName": "",
"Nick": "",
"Platform": ""
}),
"Comments": (
json!({
"Created": "",
"FromCustomer": false,
"Id": 0,
"Name": "",
"Text": ""
})
),
"ConfirmedAt": "",
"CreatedAt": "",
"Currency": "",
"CustomInvoiceNote": "",
"Customer": json!({
"ArchivedAt": "",
"DefaultCommercialMailAddress": json!({
"Id": 0,
"SubType": "",
"TypeId": 0,
"TypeName": "",
"Value": ""
}),
"DefaultFax": json!({}),
"DefaultMailAddress": json!({}),
"DefaultPhone1": json!({}),
"DefaultPhone2": json!({}),
"DefaultStatusUpdatesMailAddress": json!({}),
"Email": "",
"Id": 0,
"LanguageId": 0,
"MetaData": (json!({})),
"Name": "",
"Number": 0,
"PriceGroupId": 0,
"RestoredAt": "",
"Tel1": "",
"Tel2": "",
"Type": 0,
"VatId": ""
}),
"CustomerNumber": "",
"CustomerVatId": "",
"DeliverySourceCountryCode": "",
"DistributionCenter": "",
"History": (
json!({
"Created": "",
"EmployeeName": "",
"EventTypeName": "",
"Text": "",
"TypeId": 0
})
),
"Id": "",
"InvoiceAddress": json!({
"BillbeeId": 0,
"City": "",
"Company": "",
"Country": "",
"CountryISO2": "",
"Email": "",
"FirstName": "",
"HouseNumber": "",
"LastName": "",
"Line2": "",
"NameAddition": "",
"Phone": "",
"State": "",
"Street": "",
"Zip": ""
}),
"InvoiceDate": "",
"InvoiceNumber": 0,
"InvoiceNumberPostfix": "",
"InvoiceNumberPrefix": "",
"IsCancelationFor": "",
"IsFromBillbeeApi": false,
"LanguageCode": "",
"LastModifiedAt": "",
"MerchantVatId": "",
"OrderItems": (
json!({
"Attributes": (
json!({
"Id": "",
"Name": "",
"Price": "",
"Value": ""
})
),
"BillbeeId": 0,
"Discount": "",
"DontAdjustStock": false,
"GetPriceFromArticleIfAny": false,
"InvoiceSKU": "",
"IsCoupon": false,
"Product": json!({
"BillbeeId": 0,
"CountryOfOrigin": "",
"EAN": "",
"Id": "",
"Images": (
json!({
"ExternalId": "",
"IsDefaultImage": false,
"Position": 0,
"Url": ""
})
),
"IsDigital": false,
"OldId": "",
"PlatformData": "",
"SKU": "",
"SkuOrId": "",
"TARICCode": "",
"Title": "",
"Type": 0,
"Weight": 0
}),
"Quantity": "",
"SerialNumber": "",
"ShippingProfileId": "",
"TaxAmount": "",
"TaxIndex": 0,
"TotalPrice": "",
"TransactionId": "",
"UnrebatedTotalPrice": ""
})
),
"OrderNumber": "",
"PaidAmount": "",
"PayedAt": "",
"PaymentInstruction": "",
"PaymentMethod": 0,
"PaymentReference": "",
"PaymentTransactionId": "",
"Payments": (
json!({
"BillbeeId": 0,
"Name": "",
"PayDate": "",
"PayValue": "",
"PaymentType": 0,
"Purpose": "",
"SourceTechnology": "",
"SourceText": "",
"TransactionId": ""
})
),
"RebateDifference": "",
"RestoredAt": "",
"Seller": json!({}),
"SellerComment": "",
"ShipWeightKg": "",
"ShippedAt": "",
"ShippingAddress": json!({}),
"ShippingCost": "",
"ShippingIds": (
json!({
"BillbeeId": 0,
"Created": "",
"ShipmentType": 0,
"Shipper": "",
"ShippingCarrier": 0,
"ShippingId": "",
"ShippingProviderId": 0,
"ShippingProviderProductId": 0,
"TrackingUrl": ""
})
),
"ShippingProfileId": "",
"ShippingProfileName": "",
"ShippingProviderId": 0,
"ShippingProviderName": "",
"ShippingProviderProductId": 0,
"ShippingProviderProductName": "",
"ShippingServices": (
json!({
"CanBeConfigured": false,
"DisplayName": "",
"DisplayValue": "",
"PossibleValueLists": (
json!({
"key": "",
"value": (
json!({
"key": 0,
"value": ""
})
)
})
),
"RequiresUserInput": false,
"ServiceName": "",
"typeName": ""
})
),
"State": 0,
"Tags": (),
"TaxRate1": "",
"TaxRate2": "",
"TotalCost": "",
"UpdatedAt": "",
"VatId": "",
"VatMode": 0
});
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}}/api/v1/orders \
--header 'content-type: application/json' \
--data '{
"AcceptLossOfReturnRight": false,
"AdjustmentCost": "",
"AdjustmentReason": "",
"ApiAccountId": 0,
"ApiAccountName": "",
"ArchivedAt": "",
"BillBeeOrderId": 0,
"BillBeeParentOrderId": 0,
"Buyer": {
"BillbeeShopId": 0,
"BillbeeShopName": "",
"Email": "",
"FirstName": "",
"FullName": "",
"Id": "",
"LastName": "",
"Nick": "",
"Platform": ""
},
"Comments": [
{
"Created": "",
"FromCustomer": false,
"Id": 0,
"Name": "",
"Text": ""
}
],
"ConfirmedAt": "",
"CreatedAt": "",
"Currency": "",
"CustomInvoiceNote": "",
"Customer": {
"ArchivedAt": "",
"DefaultCommercialMailAddress": {
"Id": 0,
"SubType": "",
"TypeId": 0,
"TypeName": "",
"Value": ""
},
"DefaultFax": {},
"DefaultMailAddress": {},
"DefaultPhone1": {},
"DefaultPhone2": {},
"DefaultStatusUpdatesMailAddress": {},
"Email": "",
"Id": 0,
"LanguageId": 0,
"MetaData": [
{}
],
"Name": "",
"Number": 0,
"PriceGroupId": 0,
"RestoredAt": "",
"Tel1": "",
"Tel2": "",
"Type": 0,
"VatId": ""
},
"CustomerNumber": "",
"CustomerVatId": "",
"DeliverySourceCountryCode": "",
"DistributionCenter": "",
"History": [
{
"Created": "",
"EmployeeName": "",
"EventTypeName": "",
"Text": "",
"TypeId": 0
}
],
"Id": "",
"InvoiceAddress": {
"BillbeeId": 0,
"City": "",
"Company": "",
"Country": "",
"CountryISO2": "",
"Email": "",
"FirstName": "",
"HouseNumber": "",
"LastName": "",
"Line2": "",
"NameAddition": "",
"Phone": "",
"State": "",
"Street": "",
"Zip": ""
},
"InvoiceDate": "",
"InvoiceNumber": 0,
"InvoiceNumberPostfix": "",
"InvoiceNumberPrefix": "",
"IsCancelationFor": "",
"IsFromBillbeeApi": false,
"LanguageCode": "",
"LastModifiedAt": "",
"MerchantVatId": "",
"OrderItems": [
{
"Attributes": [
{
"Id": "",
"Name": "",
"Price": "",
"Value": ""
}
],
"BillbeeId": 0,
"Discount": "",
"DontAdjustStock": false,
"GetPriceFromArticleIfAny": false,
"InvoiceSKU": "",
"IsCoupon": false,
"Product": {
"BillbeeId": 0,
"CountryOfOrigin": "",
"EAN": "",
"Id": "",
"Images": [
{
"ExternalId": "",
"IsDefaultImage": false,
"Position": 0,
"Url": ""
}
],
"IsDigital": false,
"OldId": "",
"PlatformData": "",
"SKU": "",
"SkuOrId": "",
"TARICCode": "",
"Title": "",
"Type": 0,
"Weight": 0
},
"Quantity": "",
"SerialNumber": "",
"ShippingProfileId": "",
"TaxAmount": "",
"TaxIndex": 0,
"TotalPrice": "",
"TransactionId": "",
"UnrebatedTotalPrice": ""
}
],
"OrderNumber": "",
"PaidAmount": "",
"PayedAt": "",
"PaymentInstruction": "",
"PaymentMethod": 0,
"PaymentReference": "",
"PaymentTransactionId": "",
"Payments": [
{
"BillbeeId": 0,
"Name": "",
"PayDate": "",
"PayValue": "",
"PaymentType": 0,
"Purpose": "",
"SourceTechnology": "",
"SourceText": "",
"TransactionId": ""
}
],
"RebateDifference": "",
"RestoredAt": "",
"Seller": {},
"SellerComment": "",
"ShipWeightKg": "",
"ShippedAt": "",
"ShippingAddress": {},
"ShippingCost": "",
"ShippingIds": [
{
"BillbeeId": 0,
"Created": "",
"ShipmentType": 0,
"Shipper": "",
"ShippingCarrier": 0,
"ShippingId": "",
"ShippingProviderId": 0,
"ShippingProviderProductId": 0,
"TrackingUrl": ""
}
],
"ShippingProfileId": "",
"ShippingProfileName": "",
"ShippingProviderId": 0,
"ShippingProviderName": "",
"ShippingProviderProductId": 0,
"ShippingProviderProductName": "",
"ShippingServices": [
{
"CanBeConfigured": false,
"DisplayName": "",
"DisplayValue": "",
"PossibleValueLists": [
{
"key": "",
"value": [
{
"key": 0,
"value": ""
}
]
}
],
"RequiresUserInput": false,
"ServiceName": "",
"typeName": ""
}
],
"State": 0,
"Tags": [],
"TaxRate1": "",
"TaxRate2": "",
"TotalCost": "",
"UpdatedAt": "",
"VatId": "",
"VatMode": 0
}'
echo '{
"AcceptLossOfReturnRight": false,
"AdjustmentCost": "",
"AdjustmentReason": "",
"ApiAccountId": 0,
"ApiAccountName": "",
"ArchivedAt": "",
"BillBeeOrderId": 0,
"BillBeeParentOrderId": 0,
"Buyer": {
"BillbeeShopId": 0,
"BillbeeShopName": "",
"Email": "",
"FirstName": "",
"FullName": "",
"Id": "",
"LastName": "",
"Nick": "",
"Platform": ""
},
"Comments": [
{
"Created": "",
"FromCustomer": false,
"Id": 0,
"Name": "",
"Text": ""
}
],
"ConfirmedAt": "",
"CreatedAt": "",
"Currency": "",
"CustomInvoiceNote": "",
"Customer": {
"ArchivedAt": "",
"DefaultCommercialMailAddress": {
"Id": 0,
"SubType": "",
"TypeId": 0,
"TypeName": "",
"Value": ""
},
"DefaultFax": {},
"DefaultMailAddress": {},
"DefaultPhone1": {},
"DefaultPhone2": {},
"DefaultStatusUpdatesMailAddress": {},
"Email": "",
"Id": 0,
"LanguageId": 0,
"MetaData": [
{}
],
"Name": "",
"Number": 0,
"PriceGroupId": 0,
"RestoredAt": "",
"Tel1": "",
"Tel2": "",
"Type": 0,
"VatId": ""
},
"CustomerNumber": "",
"CustomerVatId": "",
"DeliverySourceCountryCode": "",
"DistributionCenter": "",
"History": [
{
"Created": "",
"EmployeeName": "",
"EventTypeName": "",
"Text": "",
"TypeId": 0
}
],
"Id": "",
"InvoiceAddress": {
"BillbeeId": 0,
"City": "",
"Company": "",
"Country": "",
"CountryISO2": "",
"Email": "",
"FirstName": "",
"HouseNumber": "",
"LastName": "",
"Line2": "",
"NameAddition": "",
"Phone": "",
"State": "",
"Street": "",
"Zip": ""
},
"InvoiceDate": "",
"InvoiceNumber": 0,
"InvoiceNumberPostfix": "",
"InvoiceNumberPrefix": "",
"IsCancelationFor": "",
"IsFromBillbeeApi": false,
"LanguageCode": "",
"LastModifiedAt": "",
"MerchantVatId": "",
"OrderItems": [
{
"Attributes": [
{
"Id": "",
"Name": "",
"Price": "",
"Value": ""
}
],
"BillbeeId": 0,
"Discount": "",
"DontAdjustStock": false,
"GetPriceFromArticleIfAny": false,
"InvoiceSKU": "",
"IsCoupon": false,
"Product": {
"BillbeeId": 0,
"CountryOfOrigin": "",
"EAN": "",
"Id": "",
"Images": [
{
"ExternalId": "",
"IsDefaultImage": false,
"Position": 0,
"Url": ""
}
],
"IsDigital": false,
"OldId": "",
"PlatformData": "",
"SKU": "",
"SkuOrId": "",
"TARICCode": "",
"Title": "",
"Type": 0,
"Weight": 0
},
"Quantity": "",
"SerialNumber": "",
"ShippingProfileId": "",
"TaxAmount": "",
"TaxIndex": 0,
"TotalPrice": "",
"TransactionId": "",
"UnrebatedTotalPrice": ""
}
],
"OrderNumber": "",
"PaidAmount": "",
"PayedAt": "",
"PaymentInstruction": "",
"PaymentMethod": 0,
"PaymentReference": "",
"PaymentTransactionId": "",
"Payments": [
{
"BillbeeId": 0,
"Name": "",
"PayDate": "",
"PayValue": "",
"PaymentType": 0,
"Purpose": "",
"SourceTechnology": "",
"SourceText": "",
"TransactionId": ""
}
],
"RebateDifference": "",
"RestoredAt": "",
"Seller": {},
"SellerComment": "",
"ShipWeightKg": "",
"ShippedAt": "",
"ShippingAddress": {},
"ShippingCost": "",
"ShippingIds": [
{
"BillbeeId": 0,
"Created": "",
"ShipmentType": 0,
"Shipper": "",
"ShippingCarrier": 0,
"ShippingId": "",
"ShippingProviderId": 0,
"ShippingProviderProductId": 0,
"TrackingUrl": ""
}
],
"ShippingProfileId": "",
"ShippingProfileName": "",
"ShippingProviderId": 0,
"ShippingProviderName": "",
"ShippingProviderProductId": 0,
"ShippingProviderProductName": "",
"ShippingServices": [
{
"CanBeConfigured": false,
"DisplayName": "",
"DisplayValue": "",
"PossibleValueLists": [
{
"key": "",
"value": [
{
"key": 0,
"value": ""
}
]
}
],
"RequiresUserInput": false,
"ServiceName": "",
"typeName": ""
}
],
"State": 0,
"Tags": [],
"TaxRate1": "",
"TaxRate2": "",
"TotalCost": "",
"UpdatedAt": "",
"VatId": "",
"VatMode": 0
}' | \
http POST {{baseUrl}}/api/v1/orders \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "AcceptLossOfReturnRight": false,\n "AdjustmentCost": "",\n "AdjustmentReason": "",\n "ApiAccountId": 0,\n "ApiAccountName": "",\n "ArchivedAt": "",\n "BillBeeOrderId": 0,\n "BillBeeParentOrderId": 0,\n "Buyer": {\n "BillbeeShopId": 0,\n "BillbeeShopName": "",\n "Email": "",\n "FirstName": "",\n "FullName": "",\n "Id": "",\n "LastName": "",\n "Nick": "",\n "Platform": ""\n },\n "Comments": [\n {\n "Created": "",\n "FromCustomer": false,\n "Id": 0,\n "Name": "",\n "Text": ""\n }\n ],\n "ConfirmedAt": "",\n "CreatedAt": "",\n "Currency": "",\n "CustomInvoiceNote": "",\n "Customer": {\n "ArchivedAt": "",\n "DefaultCommercialMailAddress": {\n "Id": 0,\n "SubType": "",\n "TypeId": 0,\n "TypeName": "",\n "Value": ""\n },\n "DefaultFax": {},\n "DefaultMailAddress": {},\n "DefaultPhone1": {},\n "DefaultPhone2": {},\n "DefaultStatusUpdatesMailAddress": {},\n "Email": "",\n "Id": 0,\n "LanguageId": 0,\n "MetaData": [\n {}\n ],\n "Name": "",\n "Number": 0,\n "PriceGroupId": 0,\n "RestoredAt": "",\n "Tel1": "",\n "Tel2": "",\n "Type": 0,\n "VatId": ""\n },\n "CustomerNumber": "",\n "CustomerVatId": "",\n "DeliverySourceCountryCode": "",\n "DistributionCenter": "",\n "History": [\n {\n "Created": "",\n "EmployeeName": "",\n "EventTypeName": "",\n "Text": "",\n "TypeId": 0\n }\n ],\n "Id": "",\n "InvoiceAddress": {\n "BillbeeId": 0,\n "City": "",\n "Company": "",\n "Country": "",\n "CountryISO2": "",\n "Email": "",\n "FirstName": "",\n "HouseNumber": "",\n "LastName": "",\n "Line2": "",\n "NameAddition": "",\n "Phone": "",\n "State": "",\n "Street": "",\n "Zip": ""\n },\n "InvoiceDate": "",\n "InvoiceNumber": 0,\n "InvoiceNumberPostfix": "",\n "InvoiceNumberPrefix": "",\n "IsCancelationFor": "",\n "IsFromBillbeeApi": false,\n "LanguageCode": "",\n "LastModifiedAt": "",\n "MerchantVatId": "",\n "OrderItems": [\n {\n "Attributes": [\n {\n "Id": "",\n "Name": "",\n "Price": "",\n "Value": ""\n }\n ],\n "BillbeeId": 0,\n "Discount": "",\n "DontAdjustStock": false,\n "GetPriceFromArticleIfAny": false,\n "InvoiceSKU": "",\n "IsCoupon": false,\n "Product": {\n "BillbeeId": 0,\n "CountryOfOrigin": "",\n "EAN": "",\n "Id": "",\n "Images": [\n {\n "ExternalId": "",\n "IsDefaultImage": false,\n "Position": 0,\n "Url": ""\n }\n ],\n "IsDigital": false,\n "OldId": "",\n "PlatformData": "",\n "SKU": "",\n "SkuOrId": "",\n "TARICCode": "",\n "Title": "",\n "Type": 0,\n "Weight": 0\n },\n "Quantity": "",\n "SerialNumber": "",\n "ShippingProfileId": "",\n "TaxAmount": "",\n "TaxIndex": 0,\n "TotalPrice": "",\n "TransactionId": "",\n "UnrebatedTotalPrice": ""\n }\n ],\n "OrderNumber": "",\n "PaidAmount": "",\n "PayedAt": "",\n "PaymentInstruction": "",\n "PaymentMethod": 0,\n "PaymentReference": "",\n "PaymentTransactionId": "",\n "Payments": [\n {\n "BillbeeId": 0,\n "Name": "",\n "PayDate": "",\n "PayValue": "",\n "PaymentType": 0,\n "Purpose": "",\n "SourceTechnology": "",\n "SourceText": "",\n "TransactionId": ""\n }\n ],\n "RebateDifference": "",\n "RestoredAt": "",\n "Seller": {},\n "SellerComment": "",\n "ShipWeightKg": "",\n "ShippedAt": "",\n "ShippingAddress": {},\n "ShippingCost": "",\n "ShippingIds": [\n {\n "BillbeeId": 0,\n "Created": "",\n "ShipmentType": 0,\n "Shipper": "",\n "ShippingCarrier": 0,\n "ShippingId": "",\n "ShippingProviderId": 0,\n "ShippingProviderProductId": 0,\n "TrackingUrl": ""\n }\n ],\n "ShippingProfileId": "",\n "ShippingProfileName": "",\n "ShippingProviderId": 0,\n "ShippingProviderName": "",\n "ShippingProviderProductId": 0,\n "ShippingProviderProductName": "",\n "ShippingServices": [\n {\n "CanBeConfigured": false,\n "DisplayName": "",\n "DisplayValue": "",\n "PossibleValueLists": [\n {\n "key": "",\n "value": [\n {\n "key": 0,\n "value": ""\n }\n ]\n }\n ],\n "RequiresUserInput": false,\n "ServiceName": "",\n "typeName": ""\n }\n ],\n "State": 0,\n "Tags": [],\n "TaxRate1": "",\n "TaxRate2": "",\n "TotalCost": "",\n "UpdatedAt": "",\n "VatId": "",\n "VatMode": 0\n}' \
--output-document \
- {{baseUrl}}/api/v1/orders
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"AcceptLossOfReturnRight": false,
"AdjustmentCost": "",
"AdjustmentReason": "",
"ApiAccountId": 0,
"ApiAccountName": "",
"ArchivedAt": "",
"BillBeeOrderId": 0,
"BillBeeParentOrderId": 0,
"Buyer": [
"BillbeeShopId": 0,
"BillbeeShopName": "",
"Email": "",
"FirstName": "",
"FullName": "",
"Id": "",
"LastName": "",
"Nick": "",
"Platform": ""
],
"Comments": [
[
"Created": "",
"FromCustomer": false,
"Id": 0,
"Name": "",
"Text": ""
]
],
"ConfirmedAt": "",
"CreatedAt": "",
"Currency": "",
"CustomInvoiceNote": "",
"Customer": [
"ArchivedAt": "",
"DefaultCommercialMailAddress": [
"Id": 0,
"SubType": "",
"TypeId": 0,
"TypeName": "",
"Value": ""
],
"DefaultFax": [],
"DefaultMailAddress": [],
"DefaultPhone1": [],
"DefaultPhone2": [],
"DefaultStatusUpdatesMailAddress": [],
"Email": "",
"Id": 0,
"LanguageId": 0,
"MetaData": [[]],
"Name": "",
"Number": 0,
"PriceGroupId": 0,
"RestoredAt": "",
"Tel1": "",
"Tel2": "",
"Type": 0,
"VatId": ""
],
"CustomerNumber": "",
"CustomerVatId": "",
"DeliverySourceCountryCode": "",
"DistributionCenter": "",
"History": [
[
"Created": "",
"EmployeeName": "",
"EventTypeName": "",
"Text": "",
"TypeId": 0
]
],
"Id": "",
"InvoiceAddress": [
"BillbeeId": 0,
"City": "",
"Company": "",
"Country": "",
"CountryISO2": "",
"Email": "",
"FirstName": "",
"HouseNumber": "",
"LastName": "",
"Line2": "",
"NameAddition": "",
"Phone": "",
"State": "",
"Street": "",
"Zip": ""
],
"InvoiceDate": "",
"InvoiceNumber": 0,
"InvoiceNumberPostfix": "",
"InvoiceNumberPrefix": "",
"IsCancelationFor": "",
"IsFromBillbeeApi": false,
"LanguageCode": "",
"LastModifiedAt": "",
"MerchantVatId": "",
"OrderItems": [
[
"Attributes": [
[
"Id": "",
"Name": "",
"Price": "",
"Value": ""
]
],
"BillbeeId": 0,
"Discount": "",
"DontAdjustStock": false,
"GetPriceFromArticleIfAny": false,
"InvoiceSKU": "",
"IsCoupon": false,
"Product": [
"BillbeeId": 0,
"CountryOfOrigin": "",
"EAN": "",
"Id": "",
"Images": [
[
"ExternalId": "",
"IsDefaultImage": false,
"Position": 0,
"Url": ""
]
],
"IsDigital": false,
"OldId": "",
"PlatformData": "",
"SKU": "",
"SkuOrId": "",
"TARICCode": "",
"Title": "",
"Type": 0,
"Weight": 0
],
"Quantity": "",
"SerialNumber": "",
"ShippingProfileId": "",
"TaxAmount": "",
"TaxIndex": 0,
"TotalPrice": "",
"TransactionId": "",
"UnrebatedTotalPrice": ""
]
],
"OrderNumber": "",
"PaidAmount": "",
"PayedAt": "",
"PaymentInstruction": "",
"PaymentMethod": 0,
"PaymentReference": "",
"PaymentTransactionId": "",
"Payments": [
[
"BillbeeId": 0,
"Name": "",
"PayDate": "",
"PayValue": "",
"PaymentType": 0,
"Purpose": "",
"SourceTechnology": "",
"SourceText": "",
"TransactionId": ""
]
],
"RebateDifference": "",
"RestoredAt": "",
"Seller": [],
"SellerComment": "",
"ShipWeightKg": "",
"ShippedAt": "",
"ShippingAddress": [],
"ShippingCost": "",
"ShippingIds": [
[
"BillbeeId": 0,
"Created": "",
"ShipmentType": 0,
"Shipper": "",
"ShippingCarrier": 0,
"ShippingId": "",
"ShippingProviderId": 0,
"ShippingProviderProductId": 0,
"TrackingUrl": ""
]
],
"ShippingProfileId": "",
"ShippingProfileName": "",
"ShippingProviderId": 0,
"ShippingProviderName": "",
"ShippingProviderProductId": 0,
"ShippingProviderProductName": "",
"ShippingServices": [
[
"CanBeConfigured": false,
"DisplayName": "",
"DisplayValue": "",
"PossibleValueLists": [
[
"key": "",
"value": [
[
"key": 0,
"value": ""
]
]
]
],
"RequiresUserInput": false,
"ServiceName": "",
"typeName": ""
]
],
"State": 0,
"Tags": [],
"TaxRate1": "",
"TaxRate2": "",
"TotalCost": "",
"UpdatedAt": "",
"VatId": "",
"VatMode": 0
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/v1/orders")! 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
Find a single order by its external id (order number)
{{baseUrl}}/api/v1/orders/find/:id/:partner
QUERY PARAMS
id
partner
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/v1/orders/find/:id/:partner");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/api/v1/orders/find/:id/:partner")
require "http/client"
url = "{{baseUrl}}/api/v1/orders/find/:id/:partner"
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}}/api/v1/orders/find/:id/:partner"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/api/v1/orders/find/:id/:partner");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/v1/orders/find/:id/:partner"
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/api/v1/orders/find/:id/:partner HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/api/v1/orders/find/:id/:partner")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/v1/orders/find/:id/:partner"))
.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}}/api/v1/orders/find/:id/:partner")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/api/v1/orders/find/:id/:partner")
.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}}/api/v1/orders/find/:id/:partner');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/api/v1/orders/find/:id/:partner'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/v1/orders/find/:id/:partner';
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}}/api/v1/orders/find/:id/:partner',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/api/v1/orders/find/:id/:partner")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/api/v1/orders/find/:id/:partner',
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}}/api/v1/orders/find/:id/:partner'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/api/v1/orders/find/:id/:partner');
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}}/api/v1/orders/find/:id/:partner'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/v1/orders/find/:id/:partner';
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}}/api/v1/orders/find/:id/:partner"]
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}}/api/v1/orders/find/:id/:partner" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/v1/orders/find/:id/:partner",
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}}/api/v1/orders/find/:id/:partner');
echo $response->getBody();
setUrl('{{baseUrl}}/api/v1/orders/find/:id/:partner');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/api/v1/orders/find/:id/:partner');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/api/v1/orders/find/:id/:partner' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/v1/orders/find/:id/:partner' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/api/v1/orders/find/:id/:partner")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/v1/orders/find/:id/:partner"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/v1/orders/find/:id/:partner"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/api/v1/orders/find/:id/:partner")
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/api/v1/orders/find/:id/:partner') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/api/v1/orders/find/:id/:partner";
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}}/api/v1/orders/find/:id/:partner
http GET {{baseUrl}}/api/v1/orders/find/:id/:partner
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/api/v1/orders/find/:id/:partner
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/v1/orders/find/:id/:partner")! 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
Get a list of all invoices optionally filtered by date. This request ist throttled to 1 per 1 minute for same page and minInvoiceDate
{{baseUrl}}/api/v1/orders/invoices
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/v1/orders/invoices");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/api/v1/orders/invoices")
require "http/client"
url = "{{baseUrl}}/api/v1/orders/invoices"
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}}/api/v1/orders/invoices"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/api/v1/orders/invoices");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/v1/orders/invoices"
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/api/v1/orders/invoices HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/api/v1/orders/invoices")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/v1/orders/invoices"))
.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}}/api/v1/orders/invoices")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/api/v1/orders/invoices")
.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}}/api/v1/orders/invoices');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/api/v1/orders/invoices'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/v1/orders/invoices';
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}}/api/v1/orders/invoices',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/api/v1/orders/invoices")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/api/v1/orders/invoices',
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}}/api/v1/orders/invoices'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/api/v1/orders/invoices');
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}}/api/v1/orders/invoices'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/v1/orders/invoices';
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}}/api/v1/orders/invoices"]
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}}/api/v1/orders/invoices" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/v1/orders/invoices",
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}}/api/v1/orders/invoices');
echo $response->getBody();
setUrl('{{baseUrl}}/api/v1/orders/invoices');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/api/v1/orders/invoices');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/api/v1/orders/invoices' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/v1/orders/invoices' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/api/v1/orders/invoices")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/v1/orders/invoices"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/v1/orders/invoices"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/api/v1/orders/invoices")
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/api/v1/orders/invoices') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/api/v1/orders/invoices";
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}}/api/v1/orders/invoices
http GET {{baseUrl}}/api/v1/orders/invoices
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/api/v1/orders/invoices
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/v1/orders/invoices")! 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
Get a list of all orders optionally filtered by date
{{baseUrl}}/api/v1/orders
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/v1/orders");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/api/v1/orders")
require "http/client"
url = "{{baseUrl}}/api/v1/orders"
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}}/api/v1/orders"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/api/v1/orders");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/v1/orders"
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/api/v1/orders HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/api/v1/orders")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/v1/orders"))
.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}}/api/v1/orders")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/api/v1/orders")
.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}}/api/v1/orders');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/api/v1/orders'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/v1/orders';
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}}/api/v1/orders',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/api/v1/orders")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/api/v1/orders',
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}}/api/v1/orders'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/api/v1/orders');
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}}/api/v1/orders'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/v1/orders';
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}}/api/v1/orders"]
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}}/api/v1/orders" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/v1/orders",
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}}/api/v1/orders');
echo $response->getBody();
setUrl('{{baseUrl}}/api/v1/orders');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/api/v1/orders');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/api/v1/orders' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/v1/orders' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/api/v1/orders")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/v1/orders"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/v1/orders"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/api/v1/orders")
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/api/v1/orders') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/api/v1/orders";
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}}/api/v1/orders
http GET {{baseUrl}}/api/v1/orders
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/api/v1/orders
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/v1/orders")! 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
Get a single order by its external order number
{{baseUrl}}/api/v1/orders/findbyextref/:extRef
QUERY PARAMS
extRef
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/v1/orders/findbyextref/:extRef");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/api/v1/orders/findbyextref/:extRef")
require "http/client"
url = "{{baseUrl}}/api/v1/orders/findbyextref/:extRef"
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}}/api/v1/orders/findbyextref/:extRef"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/api/v1/orders/findbyextref/:extRef");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/v1/orders/findbyextref/:extRef"
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/api/v1/orders/findbyextref/:extRef HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/api/v1/orders/findbyextref/:extRef")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/v1/orders/findbyextref/:extRef"))
.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}}/api/v1/orders/findbyextref/:extRef")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/api/v1/orders/findbyextref/:extRef")
.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}}/api/v1/orders/findbyextref/:extRef');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/api/v1/orders/findbyextref/:extRef'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/v1/orders/findbyextref/:extRef';
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}}/api/v1/orders/findbyextref/:extRef',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/api/v1/orders/findbyextref/:extRef")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/api/v1/orders/findbyextref/:extRef',
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}}/api/v1/orders/findbyextref/:extRef'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/api/v1/orders/findbyextref/:extRef');
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}}/api/v1/orders/findbyextref/:extRef'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/v1/orders/findbyextref/:extRef';
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}}/api/v1/orders/findbyextref/:extRef"]
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}}/api/v1/orders/findbyextref/:extRef" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/v1/orders/findbyextref/:extRef",
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}}/api/v1/orders/findbyextref/:extRef');
echo $response->getBody();
setUrl('{{baseUrl}}/api/v1/orders/findbyextref/:extRef');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/api/v1/orders/findbyextref/:extRef');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/api/v1/orders/findbyextref/:extRef' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/v1/orders/findbyextref/:extRef' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/api/v1/orders/findbyextref/:extRef")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/v1/orders/findbyextref/:extRef"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/v1/orders/findbyextref/:extRef"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/api/v1/orders/findbyextref/:extRef")
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/api/v1/orders/findbyextref/:extRef') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/api/v1/orders/findbyextref/:extRef";
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}}/api/v1/orders/findbyextref/:extRef
http GET {{baseUrl}}/api/v1/orders/findbyextref/:extRef
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/api/v1/orders/findbyextref/:extRef
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/v1/orders/findbyextref/:extRef")! 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
Get a single order by its internal billbee id. This request is throttled to 6 calls per order in one minute
{{baseUrl}}/api/v1/orders/:id
QUERY PARAMS
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/v1/orders/:id");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/api/v1/orders/:id")
require "http/client"
url = "{{baseUrl}}/api/v1/orders/: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}}/api/v1/orders/:id"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/api/v1/orders/:id");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/v1/orders/: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/api/v1/orders/:id HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/api/v1/orders/:id")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/v1/orders/: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}}/api/v1/orders/:id")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/api/v1/orders/: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}}/api/v1/orders/:id');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/api/v1/orders/:id'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/v1/orders/: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}}/api/v1/orders/:id',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/api/v1/orders/:id")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/api/v1/orders/: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}}/api/v1/orders/: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}}/api/v1/orders/: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}}/api/v1/orders/:id'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/v1/orders/: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}}/api/v1/orders/: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}}/api/v1/orders/:id" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/v1/orders/: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}}/api/v1/orders/:id');
echo $response->getBody();
setUrl('{{baseUrl}}/api/v1/orders/:id');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/api/v1/orders/:id');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/api/v1/orders/:id' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/v1/orders/:id' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/api/v1/orders/:id")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/v1/orders/:id"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/v1/orders/:id"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/api/v1/orders/: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/api/v1/orders/:id') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/api/v1/orders/: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}}/api/v1/orders/:id
http GET {{baseUrl}}/api/v1/orders/:id
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/api/v1/orders/:id
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/v1/orders/: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
LayoutApi_GetList
{{baseUrl}}/api/v1/layouts
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/v1/layouts");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/api/v1/layouts")
require "http/client"
url = "{{baseUrl}}/api/v1/layouts"
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}}/api/v1/layouts"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/api/v1/layouts");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/v1/layouts"
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/api/v1/layouts HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/api/v1/layouts")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/v1/layouts"))
.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}}/api/v1/layouts")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/api/v1/layouts")
.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}}/api/v1/layouts');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/api/v1/layouts'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/v1/layouts';
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}}/api/v1/layouts',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/api/v1/layouts")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/api/v1/layouts',
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}}/api/v1/layouts'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/api/v1/layouts');
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}}/api/v1/layouts'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/v1/layouts';
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}}/api/v1/layouts"]
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}}/api/v1/layouts" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/v1/layouts",
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}}/api/v1/layouts');
echo $response->getBody();
setUrl('{{baseUrl}}/api/v1/layouts');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/api/v1/layouts');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/api/v1/layouts' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/v1/layouts' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/api/v1/layouts")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/v1/layouts"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/v1/layouts"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/api/v1/layouts")
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/api/v1/layouts') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/api/v1/layouts";
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}}/api/v1/layouts
http GET {{baseUrl}}/api/v1/layouts
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/api/v1/layouts
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/v1/layouts")! 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
Parses a text and replaces all placeholders
{{baseUrl}}/api/v1/orders/:id/parse-placeholders
QUERY PARAMS
id
BODY json
{
"IsHtml": false,
"Language": "",
"TextToParse": "",
"Trim": false
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/v1/orders/:id/parse-placeholders");
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 \"IsHtml\": false,\n \"Language\": \"\",\n \"TextToParse\": \"\",\n \"Trim\": false\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/api/v1/orders/:id/parse-placeholders" {:content-type :json
:form-params {:IsHtml false
:Language ""
:TextToParse ""
:Trim false}})
require "http/client"
url = "{{baseUrl}}/api/v1/orders/:id/parse-placeholders"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"IsHtml\": false,\n \"Language\": \"\",\n \"TextToParse\": \"\",\n \"Trim\": 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}}/api/v1/orders/:id/parse-placeholders"),
Content = new StringContent("{\n \"IsHtml\": false,\n \"Language\": \"\",\n \"TextToParse\": \"\",\n \"Trim\": 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}}/api/v1/orders/:id/parse-placeholders");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"IsHtml\": false,\n \"Language\": \"\",\n \"TextToParse\": \"\",\n \"Trim\": false\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/v1/orders/:id/parse-placeholders"
payload := strings.NewReader("{\n \"IsHtml\": false,\n \"Language\": \"\",\n \"TextToParse\": \"\",\n \"Trim\": 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/api/v1/orders/:id/parse-placeholders HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 77
{
"IsHtml": false,
"Language": "",
"TextToParse": "",
"Trim": false
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/api/v1/orders/:id/parse-placeholders")
.setHeader("content-type", "application/json")
.setBody("{\n \"IsHtml\": false,\n \"Language\": \"\",\n \"TextToParse\": \"\",\n \"Trim\": false\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/v1/orders/:id/parse-placeholders"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"IsHtml\": false,\n \"Language\": \"\",\n \"TextToParse\": \"\",\n \"Trim\": 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 \"IsHtml\": false,\n \"Language\": \"\",\n \"TextToParse\": \"\",\n \"Trim\": false\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/api/v1/orders/:id/parse-placeholders")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/api/v1/orders/:id/parse-placeholders")
.header("content-type", "application/json")
.body("{\n \"IsHtml\": false,\n \"Language\": \"\",\n \"TextToParse\": \"\",\n \"Trim\": false\n}")
.asString();
const data = JSON.stringify({
IsHtml: false,
Language: '',
TextToParse: '',
Trim: 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}}/api/v1/orders/:id/parse-placeholders');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/api/v1/orders/:id/parse-placeholders',
headers: {'content-type': 'application/json'},
data: {IsHtml: false, Language: '', TextToParse: '', Trim: false}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/v1/orders/:id/parse-placeholders';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"IsHtml":false,"Language":"","TextToParse":"","Trim":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}}/api/v1/orders/:id/parse-placeholders',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "IsHtml": false,\n "Language": "",\n "TextToParse": "",\n "Trim": 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 \"IsHtml\": false,\n \"Language\": \"\",\n \"TextToParse\": \"\",\n \"Trim\": false\n}")
val request = Request.Builder()
.url("{{baseUrl}}/api/v1/orders/:id/parse-placeholders")
.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/api/v1/orders/:id/parse-placeholders',
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({IsHtml: false, Language: '', TextToParse: '', Trim: false}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/api/v1/orders/:id/parse-placeholders',
headers: {'content-type': 'application/json'},
body: {IsHtml: false, Language: '', TextToParse: '', Trim: 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}}/api/v1/orders/:id/parse-placeholders');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
IsHtml: false,
Language: '',
TextToParse: '',
Trim: 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}}/api/v1/orders/:id/parse-placeholders',
headers: {'content-type': 'application/json'},
data: {IsHtml: false, Language: '', TextToParse: '', Trim: false}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/v1/orders/:id/parse-placeholders';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"IsHtml":false,"Language":"","TextToParse":"","Trim":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 = @{ @"IsHtml": @NO,
@"Language": @"",
@"TextToParse": @"",
@"Trim": @NO };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/api/v1/orders/:id/parse-placeholders"]
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}}/api/v1/orders/:id/parse-placeholders" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"IsHtml\": false,\n \"Language\": \"\",\n \"TextToParse\": \"\",\n \"Trim\": false\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/v1/orders/:id/parse-placeholders",
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([
'IsHtml' => null,
'Language' => '',
'TextToParse' => '',
'Trim' => 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}}/api/v1/orders/:id/parse-placeholders', [
'body' => '{
"IsHtml": false,
"Language": "",
"TextToParse": "",
"Trim": false
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/api/v1/orders/:id/parse-placeholders');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'IsHtml' => null,
'Language' => '',
'TextToParse' => '',
'Trim' => null
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'IsHtml' => null,
'Language' => '',
'TextToParse' => '',
'Trim' => null
]));
$request->setRequestUrl('{{baseUrl}}/api/v1/orders/:id/parse-placeholders');
$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}}/api/v1/orders/:id/parse-placeholders' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"IsHtml": false,
"Language": "",
"TextToParse": "",
"Trim": false
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/v1/orders/:id/parse-placeholders' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"IsHtml": false,
"Language": "",
"TextToParse": "",
"Trim": false
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"IsHtml\": false,\n \"Language\": \"\",\n \"TextToParse\": \"\",\n \"Trim\": false\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/api/v1/orders/:id/parse-placeholders", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/v1/orders/:id/parse-placeholders"
payload = {
"IsHtml": False,
"Language": "",
"TextToParse": "",
"Trim": False
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/v1/orders/:id/parse-placeholders"
payload <- "{\n \"IsHtml\": false,\n \"Language\": \"\",\n \"TextToParse\": \"\",\n \"Trim\": 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}}/api/v1/orders/:id/parse-placeholders")
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 \"IsHtml\": false,\n \"Language\": \"\",\n \"TextToParse\": \"\",\n \"Trim\": 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/api/v1/orders/:id/parse-placeholders') do |req|
req.body = "{\n \"IsHtml\": false,\n \"Language\": \"\",\n \"TextToParse\": \"\",\n \"Trim\": false\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/api/v1/orders/:id/parse-placeholders";
let payload = json!({
"IsHtml": false,
"Language": "",
"TextToParse": "",
"Trim": 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}}/api/v1/orders/:id/parse-placeholders \
--header 'content-type: application/json' \
--data '{
"IsHtml": false,
"Language": "",
"TextToParse": "",
"Trim": false
}'
echo '{
"IsHtml": false,
"Language": "",
"TextToParse": "",
"Trim": false
}' | \
http POST {{baseUrl}}/api/v1/orders/:id/parse-placeholders \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "IsHtml": false,\n "Language": "",\n "TextToParse": "",\n "Trim": false\n}' \
--output-document \
- {{baseUrl}}/api/v1/orders/:id/parse-placeholders
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"IsHtml": false,
"Language": "",
"TextToParse": "",
"Trim": false
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/v1/orders/:id/parse-placeholders")! 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
Returns a list of fields which can be updated with the orders-{id} patch call
{{baseUrl}}/api/v1/orders/PatchableFields
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/v1/orders/PatchableFields");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/api/v1/orders/PatchableFields")
require "http/client"
url = "{{baseUrl}}/api/v1/orders/PatchableFields"
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}}/api/v1/orders/PatchableFields"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/api/v1/orders/PatchableFields");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/v1/orders/PatchableFields"
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/api/v1/orders/PatchableFields HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/api/v1/orders/PatchableFields")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/v1/orders/PatchableFields"))
.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}}/api/v1/orders/PatchableFields")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/api/v1/orders/PatchableFields")
.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}}/api/v1/orders/PatchableFields');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/api/v1/orders/PatchableFields'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/v1/orders/PatchableFields';
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}}/api/v1/orders/PatchableFields',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/api/v1/orders/PatchableFields")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/api/v1/orders/PatchableFields',
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}}/api/v1/orders/PatchableFields'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/api/v1/orders/PatchableFields');
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}}/api/v1/orders/PatchableFields'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/v1/orders/PatchableFields';
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}}/api/v1/orders/PatchableFields"]
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}}/api/v1/orders/PatchableFields" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/v1/orders/PatchableFields",
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}}/api/v1/orders/PatchableFields');
echo $response->getBody();
setUrl('{{baseUrl}}/api/v1/orders/PatchableFields');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/api/v1/orders/PatchableFields');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/api/v1/orders/PatchableFields' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/v1/orders/PatchableFields' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/api/v1/orders/PatchableFields")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/v1/orders/PatchableFields"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/v1/orders/PatchableFields"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/api/v1/orders/PatchableFields")
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/api/v1/orders/PatchableFields') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/api/v1/orders/PatchableFields";
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}}/api/v1/orders/PatchableFields
http GET {{baseUrl}}/api/v1/orders/PatchableFields
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/api/v1/orders/PatchableFields
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/v1/orders/PatchableFields")! 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
Sends a message to the buyer
{{baseUrl}}/api/v1/orders/:id/send-message
QUERY PARAMS
id
BODY json
{
"AlternativeMail": "",
"Body": [
{
"LanguageCode": "",
"Text": ""
}
],
"SendMode": 0,
"Subject": [
{}
]
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/v1/orders/:id/send-message");
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 \"AlternativeMail\": \"\",\n \"Body\": [\n {\n \"LanguageCode\": \"\",\n \"Text\": \"\"\n }\n ],\n \"SendMode\": 0,\n \"Subject\": [\n {}\n ]\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/api/v1/orders/:id/send-message" {:content-type :json
:form-params {:AlternativeMail ""
:Body [{:LanguageCode ""
:Text ""}]
:SendMode 0
:Subject [{}]}})
require "http/client"
url = "{{baseUrl}}/api/v1/orders/:id/send-message"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"AlternativeMail\": \"\",\n \"Body\": [\n {\n \"LanguageCode\": \"\",\n \"Text\": \"\"\n }\n ],\n \"SendMode\": 0,\n \"Subject\": [\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}}/api/v1/orders/:id/send-message"),
Content = new StringContent("{\n \"AlternativeMail\": \"\",\n \"Body\": [\n {\n \"LanguageCode\": \"\",\n \"Text\": \"\"\n }\n ],\n \"SendMode\": 0,\n \"Subject\": [\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}}/api/v1/orders/:id/send-message");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"AlternativeMail\": \"\",\n \"Body\": [\n {\n \"LanguageCode\": \"\",\n \"Text\": \"\"\n }\n ],\n \"SendMode\": 0,\n \"Subject\": [\n {}\n ]\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/v1/orders/:id/send-message"
payload := strings.NewReader("{\n \"AlternativeMail\": \"\",\n \"Body\": [\n {\n \"LanguageCode\": \"\",\n \"Text\": \"\"\n }\n ],\n \"SendMode\": 0,\n \"Subject\": [\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/api/v1/orders/:id/send-message HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 143
{
"AlternativeMail": "",
"Body": [
{
"LanguageCode": "",
"Text": ""
}
],
"SendMode": 0,
"Subject": [
{}
]
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/api/v1/orders/:id/send-message")
.setHeader("content-type", "application/json")
.setBody("{\n \"AlternativeMail\": \"\",\n \"Body\": [\n {\n \"LanguageCode\": \"\",\n \"Text\": \"\"\n }\n ],\n \"SendMode\": 0,\n \"Subject\": [\n {}\n ]\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/v1/orders/:id/send-message"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"AlternativeMail\": \"\",\n \"Body\": [\n {\n \"LanguageCode\": \"\",\n \"Text\": \"\"\n }\n ],\n \"SendMode\": 0,\n \"Subject\": [\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 \"AlternativeMail\": \"\",\n \"Body\": [\n {\n \"LanguageCode\": \"\",\n \"Text\": \"\"\n }\n ],\n \"SendMode\": 0,\n \"Subject\": [\n {}\n ]\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/api/v1/orders/:id/send-message")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/api/v1/orders/:id/send-message")
.header("content-type", "application/json")
.body("{\n \"AlternativeMail\": \"\",\n \"Body\": [\n {\n \"LanguageCode\": \"\",\n \"Text\": \"\"\n }\n ],\n \"SendMode\": 0,\n \"Subject\": [\n {}\n ]\n}")
.asString();
const data = JSON.stringify({
AlternativeMail: '',
Body: [
{
LanguageCode: '',
Text: ''
}
],
SendMode: 0,
Subject: [
{}
]
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/api/v1/orders/:id/send-message');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/api/v1/orders/:id/send-message',
headers: {'content-type': 'application/json'},
data: {
AlternativeMail: '',
Body: [{LanguageCode: '', Text: ''}],
SendMode: 0,
Subject: [{}]
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/v1/orders/:id/send-message';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"AlternativeMail":"","Body":[{"LanguageCode":"","Text":""}],"SendMode":0,"Subject":[{}]}'
};
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}}/api/v1/orders/:id/send-message',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "AlternativeMail": "",\n "Body": [\n {\n "LanguageCode": "",\n "Text": ""\n }\n ],\n "SendMode": 0,\n "Subject": [\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 \"AlternativeMail\": \"\",\n \"Body\": [\n {\n \"LanguageCode\": \"\",\n \"Text\": \"\"\n }\n ],\n \"SendMode\": 0,\n \"Subject\": [\n {}\n ]\n}")
val request = Request.Builder()
.url("{{baseUrl}}/api/v1/orders/:id/send-message")
.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/api/v1/orders/:id/send-message',
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({
AlternativeMail: '',
Body: [{LanguageCode: '', Text: ''}],
SendMode: 0,
Subject: [{}]
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/api/v1/orders/:id/send-message',
headers: {'content-type': 'application/json'},
body: {
AlternativeMail: '',
Body: [{LanguageCode: '', Text: ''}],
SendMode: 0,
Subject: [{}]
},
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}}/api/v1/orders/:id/send-message');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
AlternativeMail: '',
Body: [
{
LanguageCode: '',
Text: ''
}
],
SendMode: 0,
Subject: [
{}
]
});
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}}/api/v1/orders/:id/send-message',
headers: {'content-type': 'application/json'},
data: {
AlternativeMail: '',
Body: [{LanguageCode: '', Text: ''}],
SendMode: 0,
Subject: [{}]
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/v1/orders/:id/send-message';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"AlternativeMail":"","Body":[{"LanguageCode":"","Text":""}],"SendMode":0,"Subject":[{}]}'
};
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 = @{ @"AlternativeMail": @"",
@"Body": @[ @{ @"LanguageCode": @"", @"Text": @"" } ],
@"SendMode": @0,
@"Subject": @[ @{ } ] };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/api/v1/orders/:id/send-message"]
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}}/api/v1/orders/:id/send-message" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"AlternativeMail\": \"\",\n \"Body\": [\n {\n \"LanguageCode\": \"\",\n \"Text\": \"\"\n }\n ],\n \"SendMode\": 0,\n \"Subject\": [\n {}\n ]\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/v1/orders/:id/send-message",
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([
'AlternativeMail' => '',
'Body' => [
[
'LanguageCode' => '',
'Text' => ''
]
],
'SendMode' => 0,
'Subject' => [
[
]
]
]),
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}}/api/v1/orders/:id/send-message', [
'body' => '{
"AlternativeMail": "",
"Body": [
{
"LanguageCode": "",
"Text": ""
}
],
"SendMode": 0,
"Subject": [
{}
]
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/api/v1/orders/:id/send-message');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'AlternativeMail' => '',
'Body' => [
[
'LanguageCode' => '',
'Text' => ''
]
],
'SendMode' => 0,
'Subject' => [
[
]
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'AlternativeMail' => '',
'Body' => [
[
'LanguageCode' => '',
'Text' => ''
]
],
'SendMode' => 0,
'Subject' => [
[
]
]
]));
$request->setRequestUrl('{{baseUrl}}/api/v1/orders/:id/send-message');
$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}}/api/v1/orders/:id/send-message' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"AlternativeMail": "",
"Body": [
{
"LanguageCode": "",
"Text": ""
}
],
"SendMode": 0,
"Subject": [
{}
]
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/v1/orders/:id/send-message' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"AlternativeMail": "",
"Body": [
{
"LanguageCode": "",
"Text": ""
}
],
"SendMode": 0,
"Subject": [
{}
]
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"AlternativeMail\": \"\",\n \"Body\": [\n {\n \"LanguageCode\": \"\",\n \"Text\": \"\"\n }\n ],\n \"SendMode\": 0,\n \"Subject\": [\n {}\n ]\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/api/v1/orders/:id/send-message", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/v1/orders/:id/send-message"
payload = {
"AlternativeMail": "",
"Body": [
{
"LanguageCode": "",
"Text": ""
}
],
"SendMode": 0,
"Subject": [{}]
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/v1/orders/:id/send-message"
payload <- "{\n \"AlternativeMail\": \"\",\n \"Body\": [\n {\n \"LanguageCode\": \"\",\n \"Text\": \"\"\n }\n ],\n \"SendMode\": 0,\n \"Subject\": [\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}}/api/v1/orders/:id/send-message")
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 \"AlternativeMail\": \"\",\n \"Body\": [\n {\n \"LanguageCode\": \"\",\n \"Text\": \"\"\n }\n ],\n \"SendMode\": 0,\n \"Subject\": [\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/api/v1/orders/:id/send-message') do |req|
req.body = "{\n \"AlternativeMail\": \"\",\n \"Body\": [\n {\n \"LanguageCode\": \"\",\n \"Text\": \"\"\n }\n ],\n \"SendMode\": 0,\n \"Subject\": [\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}}/api/v1/orders/:id/send-message";
let payload = json!({
"AlternativeMail": "",
"Body": (
json!({
"LanguageCode": "",
"Text": ""
})
),
"SendMode": 0,
"Subject": (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}}/api/v1/orders/:id/send-message \
--header 'content-type: application/json' \
--data '{
"AlternativeMail": "",
"Body": [
{
"LanguageCode": "",
"Text": ""
}
],
"SendMode": 0,
"Subject": [
{}
]
}'
echo '{
"AlternativeMail": "",
"Body": [
{
"LanguageCode": "",
"Text": ""
}
],
"SendMode": 0,
"Subject": [
{}
]
}' | \
http POST {{baseUrl}}/api/v1/orders/:id/send-message \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "AlternativeMail": "",\n "Body": [\n {\n "LanguageCode": "",\n "Text": ""\n }\n ],\n "SendMode": 0,\n "Subject": [\n {}\n ]\n}' \
--output-document \
- {{baseUrl}}/api/v1/orders/:id/send-message
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"AlternativeMail": "",
"Body": [
[
"LanguageCode": "",
"Text": ""
]
],
"SendMode": 0,
"Subject": [[]]
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/v1/orders/:id/send-message")! 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()
PUT
Sets the tags attached to an order
{{baseUrl}}/api/v1/orders/:id/tags
QUERY PARAMS
id
BODY json
{
"Tags": []
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/v1/orders/:id/tags");
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 \"Tags\": []\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/api/v1/orders/:id/tags" {:content-type :json
:form-params {:Tags []}})
require "http/client"
url = "{{baseUrl}}/api/v1/orders/:id/tags"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"Tags\": []\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}}/api/v1/orders/:id/tags"),
Content = new StringContent("{\n \"Tags\": []\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}}/api/v1/orders/:id/tags");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"Tags\": []\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/v1/orders/:id/tags"
payload := strings.NewReader("{\n \"Tags\": []\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/api/v1/orders/:id/tags HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 16
{
"Tags": []
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/api/v1/orders/:id/tags")
.setHeader("content-type", "application/json")
.setBody("{\n \"Tags\": []\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/v1/orders/:id/tags"))
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("{\n \"Tags\": []\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 \"Tags\": []\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/api/v1/orders/:id/tags")
.put(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/api/v1/orders/:id/tags")
.header("content-type", "application/json")
.body("{\n \"Tags\": []\n}")
.asString();
const data = JSON.stringify({
Tags: []
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/api/v1/orders/:id/tags');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/api/v1/orders/:id/tags',
headers: {'content-type': 'application/json'},
data: {Tags: []}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/v1/orders/:id/tags';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"Tags":[]}'
};
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}}/api/v1/orders/:id/tags',
method: 'PUT',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "Tags": []\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"Tags\": []\n}")
val request = Request.Builder()
.url("{{baseUrl}}/api/v1/orders/:id/tags")
.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/api/v1/orders/:id/tags',
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({Tags: []}));
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/api/v1/orders/:id/tags',
headers: {'content-type': 'application/json'},
body: {Tags: []},
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}}/api/v1/orders/:id/tags');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
Tags: []
});
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}}/api/v1/orders/:id/tags',
headers: {'content-type': 'application/json'},
data: {Tags: []}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/v1/orders/:id/tags';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"Tags":[]}'
};
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 = @{ @"Tags": @[ ] };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/api/v1/orders/:id/tags"]
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}}/api/v1/orders/:id/tags" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"Tags\": []\n}" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/v1/orders/:id/tags",
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([
'Tags' => [
]
]),
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}}/api/v1/orders/:id/tags', [
'body' => '{
"Tags": []
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/api/v1/orders/:id/tags');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'Tags' => [
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'Tags' => [
]
]));
$request->setRequestUrl('{{baseUrl}}/api/v1/orders/:id/tags');
$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}}/api/v1/orders/:id/tags' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"Tags": []
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/v1/orders/:id/tags' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"Tags": []
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"Tags\": []\n}"
headers = { 'content-type': "application/json" }
conn.request("PUT", "/baseUrl/api/v1/orders/:id/tags", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/v1/orders/:id/tags"
payload = { "Tags": [] }
headers = {"content-type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/v1/orders/:id/tags"
payload <- "{\n \"Tags\": []\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}}/api/v1/orders/:id/tags")
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 \"Tags\": []\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/api/v1/orders/:id/tags') do |req|
req.body = "{\n \"Tags\": []\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}}/api/v1/orders/:id/tags";
let payload = json!({"Tags": ()});
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}}/api/v1/orders/:id/tags \
--header 'content-type: application/json' \
--data '{
"Tags": []
}'
echo '{
"Tags": []
}' | \
http PUT {{baseUrl}}/api/v1/orders/:id/tags \
content-type:application/json
wget --quiet \
--method PUT \
--header 'content-type: application/json' \
--body-data '{\n "Tags": []\n}' \
--output-document \
- {{baseUrl}}/api/v1/orders/:id/tags
import Foundation
let headers = ["content-type": "application/json"]
let parameters = ["Tags": []] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/v1/orders/:id/tags")! 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
Triggers a rule event
{{baseUrl}}/api/v1/orders/:id/trigger-event
QUERY PARAMS
id
BODY json
{
"DelayInMinutes": 0,
"Name": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/v1/orders/:id/trigger-event");
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 \"DelayInMinutes\": 0,\n \"Name\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/api/v1/orders/:id/trigger-event" {:content-type :json
:form-params {:DelayInMinutes 0
:Name ""}})
require "http/client"
url = "{{baseUrl}}/api/v1/orders/:id/trigger-event"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"DelayInMinutes\": 0,\n \"Name\": \"\"\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}}/api/v1/orders/:id/trigger-event"),
Content = new StringContent("{\n \"DelayInMinutes\": 0,\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}}/api/v1/orders/:id/trigger-event");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"DelayInMinutes\": 0,\n \"Name\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/v1/orders/:id/trigger-event"
payload := strings.NewReader("{\n \"DelayInMinutes\": 0,\n \"Name\": \"\"\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/api/v1/orders/:id/trigger-event HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 39
{
"DelayInMinutes": 0,
"Name": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/api/v1/orders/:id/trigger-event")
.setHeader("content-type", "application/json")
.setBody("{\n \"DelayInMinutes\": 0,\n \"Name\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/v1/orders/:id/trigger-event"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"DelayInMinutes\": 0,\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 \"DelayInMinutes\": 0,\n \"Name\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/api/v1/orders/:id/trigger-event")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/api/v1/orders/:id/trigger-event")
.header("content-type", "application/json")
.body("{\n \"DelayInMinutes\": 0,\n \"Name\": \"\"\n}")
.asString();
const data = JSON.stringify({
DelayInMinutes: 0,
Name: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/api/v1/orders/:id/trigger-event');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/api/v1/orders/:id/trigger-event',
headers: {'content-type': 'application/json'},
data: {DelayInMinutes: 0, Name: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/v1/orders/:id/trigger-event';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"DelayInMinutes":0,"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}}/api/v1/orders/:id/trigger-event',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "DelayInMinutes": 0,\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 \"DelayInMinutes\": 0,\n \"Name\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/api/v1/orders/:id/trigger-event")
.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/api/v1/orders/:id/trigger-event',
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({DelayInMinutes: 0, Name: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/api/v1/orders/:id/trigger-event',
headers: {'content-type': 'application/json'},
body: {DelayInMinutes: 0, 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('POST', '{{baseUrl}}/api/v1/orders/:id/trigger-event');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
DelayInMinutes: 0,
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: 'POST',
url: '{{baseUrl}}/api/v1/orders/:id/trigger-event',
headers: {'content-type': 'application/json'},
data: {DelayInMinutes: 0, Name: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/v1/orders/:id/trigger-event';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"DelayInMinutes":0,"Name":""}'
};
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 = @{ @"DelayInMinutes": @0,
@"Name": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/api/v1/orders/:id/trigger-event"]
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}}/api/v1/orders/:id/trigger-event" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"DelayInMinutes\": 0,\n \"Name\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/v1/orders/:id/trigger-event",
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([
'DelayInMinutes' => 0,
'Name' => ''
]),
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}}/api/v1/orders/:id/trigger-event', [
'body' => '{
"DelayInMinutes": 0,
"Name": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/api/v1/orders/:id/trigger-event');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'DelayInMinutes' => 0,
'Name' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'DelayInMinutes' => 0,
'Name' => ''
]));
$request->setRequestUrl('{{baseUrl}}/api/v1/orders/:id/trigger-event');
$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}}/api/v1/orders/:id/trigger-event' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"DelayInMinutes": 0,
"Name": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/v1/orders/:id/trigger-event' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"DelayInMinutes": 0,
"Name": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"DelayInMinutes\": 0,\n \"Name\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/api/v1/orders/:id/trigger-event", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/v1/orders/:id/trigger-event"
payload = {
"DelayInMinutes": 0,
"Name": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/v1/orders/:id/trigger-event"
payload <- "{\n \"DelayInMinutes\": 0,\n \"Name\": \"\"\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}}/api/v1/orders/:id/trigger-event")
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 \"DelayInMinutes\": 0,\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.post('/baseUrl/api/v1/orders/:id/trigger-event') do |req|
req.body = "{\n \"DelayInMinutes\": 0,\n \"Name\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/api/v1/orders/:id/trigger-event";
let payload = json!({
"DelayInMinutes": 0,
"Name": ""
});
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}}/api/v1/orders/:id/trigger-event \
--header 'content-type: application/json' \
--data '{
"DelayInMinutes": 0,
"Name": ""
}'
echo '{
"DelayInMinutes": 0,
"Name": ""
}' | \
http POST {{baseUrl}}/api/v1/orders/:id/trigger-event \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "DelayInMinutes": 0,\n "Name": ""\n}' \
--output-document \
- {{baseUrl}}/api/v1/orders/:id/trigger-event
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"DelayInMinutes": 0,
"Name": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/v1/orders/:id/trigger-event")! 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()
PATCH
Updates one or more fields of an order
{{baseUrl}}/api/v1/orders/:id
QUERY PARAMS
id
BODY json
{}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/v1/orders/: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, "{}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/patch "{{baseUrl}}/api/v1/orders/:id" {:content-type :json})
require "http/client"
url = "{{baseUrl}}/api/v1/orders/:id"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{}"
response = HTTP::Client.patch url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Patch,
RequestUri = new Uri("{{baseUrl}}/api/v1/orders/:id"),
Content = new StringContent("{}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/api/v1/orders/:id");
var request = new RestRequest("", Method.Patch);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/v1/orders/:id"
payload := strings.NewReader("{}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
PATCH /baseUrl/api/v1/orders/:id HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 2
{}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PATCH", "{{baseUrl}}/api/v1/orders/:id")
.setHeader("content-type", "application/json")
.setBody("{}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/v1/orders/:id"))
.header("content-type", "application/json")
.method("PATCH", HttpRequest.BodyPublishers.ofString("{}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{}");
Request request = new Request.Builder()
.url("{{baseUrl}}/api/v1/orders/:id")
.patch(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.patch("{{baseUrl}}/api/v1/orders/:id")
.header("content-type", "application/json")
.body("{}")
.asString();
const data = JSON.stringify({});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PATCH', '{{baseUrl}}/api/v1/orders/:id');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PATCH',
url: '{{baseUrl}}/api/v1/orders/:id',
headers: {'content-type': 'application/json'},
data: {}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/v1/orders/:id';
const options = {method: 'PATCH', headers: {'content-type': 'application/json'}, body: '{}'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/api/v1/orders/:id',
method: 'PATCH',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{}")
val request = Request.Builder()
.url("{{baseUrl}}/api/v1/orders/:id")
.patch(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PATCH',
hostname: 'example.com',
port: null,
path: '/baseUrl/api/v1/orders/: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({}));
req.end();
const request = require('request');
const options = {
method: 'PATCH',
url: '{{baseUrl}}/api/v1/orders/:id',
headers: {'content-type': 'application/json'},
body: {},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PATCH', '{{baseUrl}}/api/v1/orders/:id');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PATCH',
url: '{{baseUrl}}/api/v1/orders/:id',
headers: {'content-type': 'application/json'},
data: {}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/v1/orders/:id';
const options = {method: 'PATCH', headers: {'content-type': 'application/json'}, body: '{}'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/api/v1/orders/:id"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PATCH"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/api/v1/orders/:id" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{}" in
Client.call ~headers ~body `PATCH uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/v1/orders/:id",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('PATCH', '{{baseUrl}}/api/v1/orders/:id', [
'body' => '{}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/api/v1/orders/:id');
$request->setMethod(HttpRequest::HTTP_METH_PATCH);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
]));
$request->setRequestUrl('{{baseUrl}}/api/v1/orders/:id');
$request->setRequestMethod('PATCH');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/api/v1/orders/:id' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/v1/orders/:id' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{}"
headers = { 'content-type': "application/json" }
conn.request("PATCH", "/baseUrl/api/v1/orders/:id", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/v1/orders/:id"
payload = {}
headers = {"content-type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/v1/orders/:id"
payload <- "{}"
encode <- "json"
response <- VERB("PATCH", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/api/v1/orders/:id")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["content-type"] = 'application/json'
request.body = "{}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.patch('/baseUrl/api/v1/orders/:id') do |req|
req.body = "{}"
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}}/api/v1/orders/:id";
let payload = json!({});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PATCH").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PATCH \
--url {{baseUrl}}/api/v1/orders/:id \
--header 'content-type: application/json' \
--data '{}'
echo '{}' | \
http PATCH {{baseUrl}}/api/v1/orders/:id \
content-type:application/json
wget --quiet \
--method PATCH \
--header 'content-type: application/json' \
--body-data '{}' \
--output-document \
- {{baseUrl}}/api/v1/orders/:id
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/v1/orders/:id")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PATCH"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PUT
Add multiple images to a product or replace the product images by the given images
{{baseUrl}}/api/v1/products/:productId/images
QUERY PARAMS
productId
BODY json
[
{
"ArticleId": 0,
"Id": 0,
"IsDefault": false,
"Position": 0,
"ThumbPathExt": "",
"ThumbUrl": "",
"Url": ""
}
]
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/v1/products/:productId/images");
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 {\n \"ArticleId\": 0,\n \"Id\": 0,\n \"IsDefault\": false,\n \"Position\": 0,\n \"ThumbPathExt\": \"\",\n \"ThumbUrl\": \"\",\n \"Url\": \"\"\n }\n]");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/api/v1/products/:productId/images" {:content-type :json
:form-params [{:ArticleId 0
:Id 0
:IsDefault false
:Position 0
:ThumbPathExt ""
:ThumbUrl ""
:Url ""}]})
require "http/client"
url = "{{baseUrl}}/api/v1/products/:productId/images"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "[\n {\n \"ArticleId\": 0,\n \"Id\": 0,\n \"IsDefault\": false,\n \"Position\": 0,\n \"ThumbPathExt\": \"\",\n \"ThumbUrl\": \"\",\n \"Url\": \"\"\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}}/api/v1/products/:productId/images"),
Content = new StringContent("[\n {\n \"ArticleId\": 0,\n \"Id\": 0,\n \"IsDefault\": false,\n \"Position\": 0,\n \"ThumbPathExt\": \"\",\n \"ThumbUrl\": \"\",\n \"Url\": \"\"\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}}/api/v1/products/:productId/images");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "[\n {\n \"ArticleId\": 0,\n \"Id\": 0,\n \"IsDefault\": false,\n \"Position\": 0,\n \"ThumbPathExt\": \"\",\n \"ThumbUrl\": \"\",\n \"Url\": \"\"\n }\n]", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/v1/products/:productId/images"
payload := strings.NewReader("[\n {\n \"ArticleId\": 0,\n \"Id\": 0,\n \"IsDefault\": false,\n \"Position\": 0,\n \"ThumbPathExt\": \"\",\n \"ThumbUrl\": \"\",\n \"Url\": \"\"\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/api/v1/products/:productId/images HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 145
[
{
"ArticleId": 0,
"Id": 0,
"IsDefault": false,
"Position": 0,
"ThumbPathExt": "",
"ThumbUrl": "",
"Url": ""
}
]
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/api/v1/products/:productId/images")
.setHeader("content-type", "application/json")
.setBody("[\n {\n \"ArticleId\": 0,\n \"Id\": 0,\n \"IsDefault\": false,\n \"Position\": 0,\n \"ThumbPathExt\": \"\",\n \"ThumbUrl\": \"\",\n \"Url\": \"\"\n }\n]")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/v1/products/:productId/images"))
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("[\n {\n \"ArticleId\": 0,\n \"Id\": 0,\n \"IsDefault\": false,\n \"Position\": 0,\n \"ThumbPathExt\": \"\",\n \"ThumbUrl\": \"\",\n \"Url\": \"\"\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 {\n \"ArticleId\": 0,\n \"Id\": 0,\n \"IsDefault\": false,\n \"Position\": 0,\n \"ThumbPathExt\": \"\",\n \"ThumbUrl\": \"\",\n \"Url\": \"\"\n }\n]");
Request request = new Request.Builder()
.url("{{baseUrl}}/api/v1/products/:productId/images")
.put(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/api/v1/products/:productId/images")
.header("content-type", "application/json")
.body("[\n {\n \"ArticleId\": 0,\n \"Id\": 0,\n \"IsDefault\": false,\n \"Position\": 0,\n \"ThumbPathExt\": \"\",\n \"ThumbUrl\": \"\",\n \"Url\": \"\"\n }\n]")
.asString();
const data = JSON.stringify([
{
ArticleId: 0,
Id: 0,
IsDefault: false,
Position: 0,
ThumbPathExt: '',
ThumbUrl: '',
Url: ''
}
]);
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/api/v1/products/:productId/images');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/api/v1/products/:productId/images',
headers: {'content-type': 'application/json'},
data: [
{
ArticleId: 0,
Id: 0,
IsDefault: false,
Position: 0,
ThumbPathExt: '',
ThumbUrl: '',
Url: ''
}
]
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/v1/products/:productId/images';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '[{"ArticleId":0,"Id":0,"IsDefault":false,"Position":0,"ThumbPathExt":"","ThumbUrl":"","Url":""}]'
};
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}}/api/v1/products/:productId/images',
method: 'PUT',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '[\n {\n "ArticleId": 0,\n "Id": 0,\n "IsDefault": false,\n "Position": 0,\n "ThumbPathExt": "",\n "ThumbUrl": "",\n "Url": ""\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 {\n \"ArticleId\": 0,\n \"Id\": 0,\n \"IsDefault\": false,\n \"Position\": 0,\n \"ThumbPathExt\": \"\",\n \"ThumbUrl\": \"\",\n \"Url\": \"\"\n }\n]")
val request = Request.Builder()
.url("{{baseUrl}}/api/v1/products/:productId/images")
.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/api/v1/products/:productId/images',
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([
{
ArticleId: 0,
Id: 0,
IsDefault: false,
Position: 0,
ThumbPathExt: '',
ThumbUrl: '',
Url: ''
}
]));
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/api/v1/products/:productId/images',
headers: {'content-type': 'application/json'},
body: [
{
ArticleId: 0,
Id: 0,
IsDefault: false,
Position: 0,
ThumbPathExt: '',
ThumbUrl: '',
Url: ''
}
],
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}}/api/v1/products/:productId/images');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send([
{
ArticleId: 0,
Id: 0,
IsDefault: false,
Position: 0,
ThumbPathExt: '',
ThumbUrl: '',
Url: ''
}
]);
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}}/api/v1/products/:productId/images',
headers: {'content-type': 'application/json'},
data: [
{
ArticleId: 0,
Id: 0,
IsDefault: false,
Position: 0,
ThumbPathExt: '',
ThumbUrl: '',
Url: ''
}
]
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/v1/products/:productId/images';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '[{"ArticleId":0,"Id":0,"IsDefault":false,"Position":0,"ThumbPathExt":"","ThumbUrl":"","Url":""}]'
};
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 = @[ @{ @"ArticleId": @0, @"Id": @0, @"IsDefault": @NO, @"Position": @0, @"ThumbPathExt": @"", @"ThumbUrl": @"", @"Url": @"" } ];
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/api/v1/products/:productId/images"]
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}}/api/v1/products/:productId/images" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "[\n {\n \"ArticleId\": 0,\n \"Id\": 0,\n \"IsDefault\": false,\n \"Position\": 0,\n \"ThumbPathExt\": \"\",\n \"ThumbUrl\": \"\",\n \"Url\": \"\"\n }\n]" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/v1/products/:productId/images",
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([
[
'ArticleId' => 0,
'Id' => 0,
'IsDefault' => null,
'Position' => 0,
'ThumbPathExt' => '',
'ThumbUrl' => '',
'Url' => ''
]
]),
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}}/api/v1/products/:productId/images', [
'body' => '[
{
"ArticleId": 0,
"Id": 0,
"IsDefault": false,
"Position": 0,
"ThumbPathExt": "",
"ThumbUrl": "",
"Url": ""
}
]',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/api/v1/products/:productId/images');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
[
'ArticleId' => 0,
'Id' => 0,
'IsDefault' => null,
'Position' => 0,
'ThumbPathExt' => '',
'ThumbUrl' => '',
'Url' => ''
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
[
'ArticleId' => 0,
'Id' => 0,
'IsDefault' => null,
'Position' => 0,
'ThumbPathExt' => '',
'ThumbUrl' => '',
'Url' => ''
]
]));
$request->setRequestUrl('{{baseUrl}}/api/v1/products/:productId/images');
$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}}/api/v1/products/:productId/images' -Method PUT -Headers $headers -ContentType 'application/json' -Body '[
{
"ArticleId": 0,
"Id": 0,
"IsDefault": false,
"Position": 0,
"ThumbPathExt": "",
"ThumbUrl": "",
"Url": ""
}
]'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/v1/products/:productId/images' -Method PUT -Headers $headers -ContentType 'application/json' -Body '[
{
"ArticleId": 0,
"Id": 0,
"IsDefault": false,
"Position": 0,
"ThumbPathExt": "",
"ThumbUrl": "",
"Url": ""
}
]'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "[\n {\n \"ArticleId\": 0,\n \"Id\": 0,\n \"IsDefault\": false,\n \"Position\": 0,\n \"ThumbPathExt\": \"\",\n \"ThumbUrl\": \"\",\n \"Url\": \"\"\n }\n]"
headers = { 'content-type': "application/json" }
conn.request("PUT", "/baseUrl/api/v1/products/:productId/images", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/v1/products/:productId/images"
payload = [
{
"ArticleId": 0,
"Id": 0,
"IsDefault": False,
"Position": 0,
"ThumbPathExt": "",
"ThumbUrl": "",
"Url": ""
}
]
headers = {"content-type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/v1/products/:productId/images"
payload <- "[\n {\n \"ArticleId\": 0,\n \"Id\": 0,\n \"IsDefault\": false,\n \"Position\": 0,\n \"ThumbPathExt\": \"\",\n \"ThumbUrl\": \"\",\n \"Url\": \"\"\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}}/api/v1/products/:productId/images")
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 {\n \"ArticleId\": 0,\n \"Id\": 0,\n \"IsDefault\": false,\n \"Position\": 0,\n \"ThumbPathExt\": \"\",\n \"ThumbUrl\": \"\",\n \"Url\": \"\"\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/api/v1/products/:productId/images') do |req|
req.body = "[\n {\n \"ArticleId\": 0,\n \"Id\": 0,\n \"IsDefault\": false,\n \"Position\": 0,\n \"ThumbPathExt\": \"\",\n \"ThumbUrl\": \"\",\n \"Url\": \"\"\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}}/api/v1/products/:productId/images";
let payload = (
json!({
"ArticleId": 0,
"Id": 0,
"IsDefault": false,
"Position": 0,
"ThumbPathExt": "",
"ThumbUrl": "",
"Url": ""
})
);
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}}/api/v1/products/:productId/images \
--header 'content-type: application/json' \
--data '[
{
"ArticleId": 0,
"Id": 0,
"IsDefault": false,
"Position": 0,
"ThumbPathExt": "",
"ThumbUrl": "",
"Url": ""
}
]'
echo '[
{
"ArticleId": 0,
"Id": 0,
"IsDefault": false,
"Position": 0,
"ThumbPathExt": "",
"ThumbUrl": "",
"Url": ""
}
]' | \
http PUT {{baseUrl}}/api/v1/products/:productId/images \
content-type:application/json
wget --quiet \
--method PUT \
--header 'content-type: application/json' \
--body-data '[\n {\n "ArticleId": 0,\n "Id": 0,\n "IsDefault": false,\n "Position": 0,\n "ThumbPathExt": "",\n "ThumbUrl": "",\n "Url": ""\n }\n]' \
--output-document \
- {{baseUrl}}/api/v1/products/:productId/images
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
[
"ArticleId": 0,
"Id": 0,
"IsDefault": false,
"Position": 0,
"ThumbPathExt": "",
"ThumbUrl": "",
"Url": ""
]
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/v1/products/:productId/images")! 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
Add or update an existing image of a product
{{baseUrl}}/api/v1/products/:productId/images/:imageId
QUERY PARAMS
productId
imageId
BODY json
{
"ArticleId": 0,
"Id": 0,
"IsDefault": false,
"Position": 0,
"ThumbPathExt": "",
"ThumbUrl": "",
"Url": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/v1/products/:productId/images/:imageId");
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 \"ArticleId\": 0,\n \"Id\": 0,\n \"IsDefault\": false,\n \"Position\": 0,\n \"ThumbPathExt\": \"\",\n \"ThumbUrl\": \"\",\n \"Url\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/api/v1/products/:productId/images/:imageId" {:content-type :json
:form-params {:ArticleId 0
:Id 0
:IsDefault false
:Position 0
:ThumbPathExt ""
:ThumbUrl ""
:Url ""}})
require "http/client"
url = "{{baseUrl}}/api/v1/products/:productId/images/:imageId"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"ArticleId\": 0,\n \"Id\": 0,\n \"IsDefault\": false,\n \"Position\": 0,\n \"ThumbPathExt\": \"\",\n \"ThumbUrl\": \"\",\n \"Url\": \"\"\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}}/api/v1/products/:productId/images/:imageId"),
Content = new StringContent("{\n \"ArticleId\": 0,\n \"Id\": 0,\n \"IsDefault\": false,\n \"Position\": 0,\n \"ThumbPathExt\": \"\",\n \"ThumbUrl\": \"\",\n \"Url\": \"\"\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}}/api/v1/products/:productId/images/:imageId");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"ArticleId\": 0,\n \"Id\": 0,\n \"IsDefault\": false,\n \"Position\": 0,\n \"ThumbPathExt\": \"\",\n \"ThumbUrl\": \"\",\n \"Url\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/v1/products/:productId/images/:imageId"
payload := strings.NewReader("{\n \"ArticleId\": 0,\n \"Id\": 0,\n \"IsDefault\": false,\n \"Position\": 0,\n \"ThumbPathExt\": \"\",\n \"ThumbUrl\": \"\",\n \"Url\": \"\"\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/api/v1/products/:productId/images/:imageId HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 123
{
"ArticleId": 0,
"Id": 0,
"IsDefault": false,
"Position": 0,
"ThumbPathExt": "",
"ThumbUrl": "",
"Url": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/api/v1/products/:productId/images/:imageId")
.setHeader("content-type", "application/json")
.setBody("{\n \"ArticleId\": 0,\n \"Id\": 0,\n \"IsDefault\": false,\n \"Position\": 0,\n \"ThumbPathExt\": \"\",\n \"ThumbUrl\": \"\",\n \"Url\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/v1/products/:productId/images/:imageId"))
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("{\n \"ArticleId\": 0,\n \"Id\": 0,\n \"IsDefault\": false,\n \"Position\": 0,\n \"ThumbPathExt\": \"\",\n \"ThumbUrl\": \"\",\n \"Url\": \"\"\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 \"ArticleId\": 0,\n \"Id\": 0,\n \"IsDefault\": false,\n \"Position\": 0,\n \"ThumbPathExt\": \"\",\n \"ThumbUrl\": \"\",\n \"Url\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/api/v1/products/:productId/images/:imageId")
.put(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/api/v1/products/:productId/images/:imageId")
.header("content-type", "application/json")
.body("{\n \"ArticleId\": 0,\n \"Id\": 0,\n \"IsDefault\": false,\n \"Position\": 0,\n \"ThumbPathExt\": \"\",\n \"ThumbUrl\": \"\",\n \"Url\": \"\"\n}")
.asString();
const data = JSON.stringify({
ArticleId: 0,
Id: 0,
IsDefault: false,
Position: 0,
ThumbPathExt: '',
ThumbUrl: '',
Url: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/api/v1/products/:productId/images/:imageId');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/api/v1/products/:productId/images/:imageId',
headers: {'content-type': 'application/json'},
data: {
ArticleId: 0,
Id: 0,
IsDefault: false,
Position: 0,
ThumbPathExt: '',
ThumbUrl: '',
Url: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/v1/products/:productId/images/:imageId';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"ArticleId":0,"Id":0,"IsDefault":false,"Position":0,"ThumbPathExt":"","ThumbUrl":"","Url":""}'
};
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}}/api/v1/products/:productId/images/:imageId',
method: 'PUT',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "ArticleId": 0,\n "Id": 0,\n "IsDefault": false,\n "Position": 0,\n "ThumbPathExt": "",\n "ThumbUrl": "",\n "Url": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"ArticleId\": 0,\n \"Id\": 0,\n \"IsDefault\": false,\n \"Position\": 0,\n \"ThumbPathExt\": \"\",\n \"ThumbUrl\": \"\",\n \"Url\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/api/v1/products/:productId/images/:imageId")
.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/api/v1/products/:productId/images/:imageId',
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({
ArticleId: 0,
Id: 0,
IsDefault: false,
Position: 0,
ThumbPathExt: '',
ThumbUrl: '',
Url: ''
}));
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/api/v1/products/:productId/images/:imageId',
headers: {'content-type': 'application/json'},
body: {
ArticleId: 0,
Id: 0,
IsDefault: false,
Position: 0,
ThumbPathExt: '',
ThumbUrl: '',
Url: ''
},
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}}/api/v1/products/:productId/images/:imageId');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
ArticleId: 0,
Id: 0,
IsDefault: false,
Position: 0,
ThumbPathExt: '',
ThumbUrl: '',
Url: ''
});
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}}/api/v1/products/:productId/images/:imageId',
headers: {'content-type': 'application/json'},
data: {
ArticleId: 0,
Id: 0,
IsDefault: false,
Position: 0,
ThumbPathExt: '',
ThumbUrl: '',
Url: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/v1/products/:productId/images/:imageId';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"ArticleId":0,"Id":0,"IsDefault":false,"Position":0,"ThumbPathExt":"","ThumbUrl":"","Url":""}'
};
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 = @{ @"ArticleId": @0,
@"Id": @0,
@"IsDefault": @NO,
@"Position": @0,
@"ThumbPathExt": @"",
@"ThumbUrl": @"",
@"Url": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/api/v1/products/:productId/images/:imageId"]
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}}/api/v1/products/:productId/images/:imageId" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"ArticleId\": 0,\n \"Id\": 0,\n \"IsDefault\": false,\n \"Position\": 0,\n \"ThumbPathExt\": \"\",\n \"ThumbUrl\": \"\",\n \"Url\": \"\"\n}" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/v1/products/:productId/images/:imageId",
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([
'ArticleId' => 0,
'Id' => 0,
'IsDefault' => null,
'Position' => 0,
'ThumbPathExt' => '',
'ThumbUrl' => '',
'Url' => ''
]),
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}}/api/v1/products/:productId/images/:imageId', [
'body' => '{
"ArticleId": 0,
"Id": 0,
"IsDefault": false,
"Position": 0,
"ThumbPathExt": "",
"ThumbUrl": "",
"Url": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/api/v1/products/:productId/images/:imageId');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'ArticleId' => 0,
'Id' => 0,
'IsDefault' => null,
'Position' => 0,
'ThumbPathExt' => '',
'ThumbUrl' => '',
'Url' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'ArticleId' => 0,
'Id' => 0,
'IsDefault' => null,
'Position' => 0,
'ThumbPathExt' => '',
'ThumbUrl' => '',
'Url' => ''
]));
$request->setRequestUrl('{{baseUrl}}/api/v1/products/:productId/images/:imageId');
$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}}/api/v1/products/:productId/images/:imageId' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"ArticleId": 0,
"Id": 0,
"IsDefault": false,
"Position": 0,
"ThumbPathExt": "",
"ThumbUrl": "",
"Url": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/v1/products/:productId/images/:imageId' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"ArticleId": 0,
"Id": 0,
"IsDefault": false,
"Position": 0,
"ThumbPathExt": "",
"ThumbUrl": "",
"Url": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"ArticleId\": 0,\n \"Id\": 0,\n \"IsDefault\": false,\n \"Position\": 0,\n \"ThumbPathExt\": \"\",\n \"ThumbUrl\": \"\",\n \"Url\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("PUT", "/baseUrl/api/v1/products/:productId/images/:imageId", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/v1/products/:productId/images/:imageId"
payload = {
"ArticleId": 0,
"Id": 0,
"IsDefault": False,
"Position": 0,
"ThumbPathExt": "",
"ThumbUrl": "",
"Url": ""
}
headers = {"content-type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/v1/products/:productId/images/:imageId"
payload <- "{\n \"ArticleId\": 0,\n \"Id\": 0,\n \"IsDefault\": false,\n \"Position\": 0,\n \"ThumbPathExt\": \"\",\n \"ThumbUrl\": \"\",\n \"Url\": \"\"\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}}/api/v1/products/:productId/images/:imageId")
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 \"ArticleId\": 0,\n \"Id\": 0,\n \"IsDefault\": false,\n \"Position\": 0,\n \"ThumbPathExt\": \"\",\n \"ThumbUrl\": \"\",\n \"Url\": \"\"\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/api/v1/products/:productId/images/:imageId') do |req|
req.body = "{\n \"ArticleId\": 0,\n \"Id\": 0,\n \"IsDefault\": false,\n \"Position\": 0,\n \"ThumbPathExt\": \"\",\n \"ThumbUrl\": \"\",\n \"Url\": \"\"\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}}/api/v1/products/:productId/images/:imageId";
let payload = json!({
"ArticleId": 0,
"Id": 0,
"IsDefault": false,
"Position": 0,
"ThumbPathExt": "",
"ThumbUrl": "",
"Url": ""
});
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}}/api/v1/products/:productId/images/:imageId \
--header 'content-type: application/json' \
--data '{
"ArticleId": 0,
"Id": 0,
"IsDefault": false,
"Position": 0,
"ThumbPathExt": "",
"ThumbUrl": "",
"Url": ""
}'
echo '{
"ArticleId": 0,
"Id": 0,
"IsDefault": false,
"Position": 0,
"ThumbPathExt": "",
"ThumbUrl": "",
"Url": ""
}' | \
http PUT {{baseUrl}}/api/v1/products/:productId/images/:imageId \
content-type:application/json
wget --quiet \
--method PUT \
--header 'content-type: application/json' \
--body-data '{\n "ArticleId": 0,\n "Id": 0,\n "IsDefault": false,\n "Position": 0,\n "ThumbPathExt": "",\n "ThumbUrl": "",\n "Url": ""\n}' \
--output-document \
- {{baseUrl}}/api/v1/products/:productId/images/:imageId
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"ArticleId": 0,
"Id": 0,
"IsDefault": false,
"Position": 0,
"ThumbPathExt": "",
"ThumbUrl": "",
"Url": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/v1/products/:productId/images/:imageId")! 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
Creates a new product
{{baseUrl}}/api/v1/products
BODY json
{
"BasicAttributes": [
{
"LanguageCode": "",
"Text": ""
}
],
"BillOfMaterial": [
{
"Amount": "",
"ArticleId": 0,
"SKU": ""
}
],
"Category1": {
"Id": 0,
"Name": ""
},
"Category2": {},
"Category3": {},
"Condition": 0,
"CostPrice": "",
"CountryOfOrigin": "",
"CustomFields": [
{
"ArticleId": 0,
"Definition": {
"Configuration": {},
"Id": 0,
"IsNullable": false,
"Name": "",
"Type": 0
},
"DefinitionId": 0,
"Id": 0,
"Value": {}
}
],
"DeliveryTime": 0,
"Description": [
{}
],
"EAN": "",
"ExportDescription": "",
"ExportDescriptionMultiLanguage": [
{}
],
"HeightCm": "",
"Id": 0,
"Images": [
{
"ArticleId": 0,
"Id": 0,
"IsDefault": false,
"Position": 0,
"ThumbPathExt": "",
"ThumbUrl": "",
"Url": ""
}
],
"InvoiceText": [
{}
],
"IsCustomizable": false,
"IsDeactivated": false,
"IsDigital": false,
"LengthCm": "",
"LowStock": false,
"Manufacturer": "",
"Materials": [
{}
],
"Occasion": 0,
"Price": "",
"Recipient": 0,
"SKU": "",
"ShippingProductId": 0,
"ShortDescription": [
{}
],
"SoldAmount": "",
"SoldAmountLast30Days": "",
"SoldSumGross": "",
"SoldSumGrossLast30Days": "",
"SoldSumNet": "",
"SoldSumNetLast30Days": "",
"Sources": [
{
"ApiAccountId": 0,
"ApiAccountName": "",
"Custom": {},
"ExportFactor": "",
"Id": 0,
"Source": "",
"SourceId": "",
"StockSyncInactive": false,
"StockSyncMax": "",
"StockSyncMin": "",
"UnitsPerItem": ""
}
],
"StockCode": "",
"StockCurrent": "",
"StockDesired": "",
"StockReduceItemsPerSale": "",
"StockWarning": "",
"Stocks": [
{
"Name": "",
"StockCode": "",
"StockCurrent": "",
"StockDesired": "",
"StockId": 0,
"StockWarning": "",
"UnfulfilledAmount": ""
}
],
"Tags": [
{}
],
"TaricNumber": "",
"Title": [
{}
],
"Type": 0,
"Unit": 0,
"UnitsPerItem": "",
"Vat1Rate": "",
"Vat2Rate": "",
"VatIndex": 0,
"Weight": 0,
"WeightNet": 0,
"WidthCm": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/v1/products");
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 \"BasicAttributes\": [\n {\n \"LanguageCode\": \"\",\n \"Text\": \"\"\n }\n ],\n \"BillOfMaterial\": [\n {\n \"Amount\": \"\",\n \"ArticleId\": 0,\n \"SKU\": \"\"\n }\n ],\n \"Category1\": {\n \"Id\": 0,\n \"Name\": \"\"\n },\n \"Category2\": {},\n \"Category3\": {},\n \"Condition\": 0,\n \"CostPrice\": \"\",\n \"CountryOfOrigin\": \"\",\n \"CustomFields\": [\n {\n \"ArticleId\": 0,\n \"Definition\": {\n \"Configuration\": {},\n \"Id\": 0,\n \"IsNullable\": false,\n \"Name\": \"\",\n \"Type\": 0\n },\n \"DefinitionId\": 0,\n \"Id\": 0,\n \"Value\": {}\n }\n ],\n \"DeliveryTime\": 0,\n \"Description\": [\n {}\n ],\n \"EAN\": \"\",\n \"ExportDescription\": \"\",\n \"ExportDescriptionMultiLanguage\": [\n {}\n ],\n \"HeightCm\": \"\",\n \"Id\": 0,\n \"Images\": [\n {\n \"ArticleId\": 0,\n \"Id\": 0,\n \"IsDefault\": false,\n \"Position\": 0,\n \"ThumbPathExt\": \"\",\n \"ThumbUrl\": \"\",\n \"Url\": \"\"\n }\n ],\n \"InvoiceText\": [\n {}\n ],\n \"IsCustomizable\": false,\n \"IsDeactivated\": false,\n \"IsDigital\": false,\n \"LengthCm\": \"\",\n \"LowStock\": false,\n \"Manufacturer\": \"\",\n \"Materials\": [\n {}\n ],\n \"Occasion\": 0,\n \"Price\": \"\",\n \"Recipient\": 0,\n \"SKU\": \"\",\n \"ShippingProductId\": 0,\n \"ShortDescription\": [\n {}\n ],\n \"SoldAmount\": \"\",\n \"SoldAmountLast30Days\": \"\",\n \"SoldSumGross\": \"\",\n \"SoldSumGrossLast30Days\": \"\",\n \"SoldSumNet\": \"\",\n \"SoldSumNetLast30Days\": \"\",\n \"Sources\": [\n {\n \"ApiAccountId\": 0,\n \"ApiAccountName\": \"\",\n \"Custom\": {},\n \"ExportFactor\": \"\",\n \"Id\": 0,\n \"Source\": \"\",\n \"SourceId\": \"\",\n \"StockSyncInactive\": false,\n \"StockSyncMax\": \"\",\n \"StockSyncMin\": \"\",\n \"UnitsPerItem\": \"\"\n }\n ],\n \"StockCode\": \"\",\n \"StockCurrent\": \"\",\n \"StockDesired\": \"\",\n \"StockReduceItemsPerSale\": \"\",\n \"StockWarning\": \"\",\n \"Stocks\": [\n {\n \"Name\": \"\",\n \"StockCode\": \"\",\n \"StockCurrent\": \"\",\n \"StockDesired\": \"\",\n \"StockId\": 0,\n \"StockWarning\": \"\",\n \"UnfulfilledAmount\": \"\"\n }\n ],\n \"Tags\": [\n {}\n ],\n \"TaricNumber\": \"\",\n \"Title\": [\n {}\n ],\n \"Type\": 0,\n \"Unit\": 0,\n \"UnitsPerItem\": \"\",\n \"Vat1Rate\": \"\",\n \"Vat2Rate\": \"\",\n \"VatIndex\": 0,\n \"Weight\": 0,\n \"WeightNet\": 0,\n \"WidthCm\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/api/v1/products" {:content-type :json
:form-params {:BasicAttributes [{:LanguageCode ""
:Text ""}]
:BillOfMaterial [{:Amount ""
:ArticleId 0
:SKU ""}]
:Category1 {:Id 0
:Name ""}
:Category2 {}
:Category3 {}
:Condition 0
:CostPrice ""
:CountryOfOrigin ""
:CustomFields [{:ArticleId 0
:Definition {:Configuration {}
:Id 0
:IsNullable false
:Name ""
:Type 0}
:DefinitionId 0
:Id 0
:Value {}}]
:DeliveryTime 0
:Description [{}]
:EAN ""
:ExportDescription ""
:ExportDescriptionMultiLanguage [{}]
:HeightCm ""
:Id 0
:Images [{:ArticleId 0
:Id 0
:IsDefault false
:Position 0
:ThumbPathExt ""
:ThumbUrl ""
:Url ""}]
:InvoiceText [{}]
:IsCustomizable false
:IsDeactivated false
:IsDigital false
:LengthCm ""
:LowStock false
:Manufacturer ""
:Materials [{}]
:Occasion 0
:Price ""
:Recipient 0
:SKU ""
:ShippingProductId 0
:ShortDescription [{}]
:SoldAmount ""
:SoldAmountLast30Days ""
:SoldSumGross ""
:SoldSumGrossLast30Days ""
:SoldSumNet ""
:SoldSumNetLast30Days ""
:Sources [{:ApiAccountId 0
:ApiAccountName ""
:Custom {}
:ExportFactor ""
:Id 0
:Source ""
:SourceId ""
:StockSyncInactive false
:StockSyncMax ""
:StockSyncMin ""
:UnitsPerItem ""}]
:StockCode ""
:StockCurrent ""
:StockDesired ""
:StockReduceItemsPerSale ""
:StockWarning ""
:Stocks [{:Name ""
:StockCode ""
:StockCurrent ""
:StockDesired ""
:StockId 0
:StockWarning ""
:UnfulfilledAmount ""}]
:Tags [{}]
:TaricNumber ""
:Title [{}]
:Type 0
:Unit 0
:UnitsPerItem ""
:Vat1Rate ""
:Vat2Rate ""
:VatIndex 0
:Weight 0
:WeightNet 0
:WidthCm ""}})
require "http/client"
url = "{{baseUrl}}/api/v1/products"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"BasicAttributes\": [\n {\n \"LanguageCode\": \"\",\n \"Text\": \"\"\n }\n ],\n \"BillOfMaterial\": [\n {\n \"Amount\": \"\",\n \"ArticleId\": 0,\n \"SKU\": \"\"\n }\n ],\n \"Category1\": {\n \"Id\": 0,\n \"Name\": \"\"\n },\n \"Category2\": {},\n \"Category3\": {},\n \"Condition\": 0,\n \"CostPrice\": \"\",\n \"CountryOfOrigin\": \"\",\n \"CustomFields\": [\n {\n \"ArticleId\": 0,\n \"Definition\": {\n \"Configuration\": {},\n \"Id\": 0,\n \"IsNullable\": false,\n \"Name\": \"\",\n \"Type\": 0\n },\n \"DefinitionId\": 0,\n \"Id\": 0,\n \"Value\": {}\n }\n ],\n \"DeliveryTime\": 0,\n \"Description\": [\n {}\n ],\n \"EAN\": \"\",\n \"ExportDescription\": \"\",\n \"ExportDescriptionMultiLanguage\": [\n {}\n ],\n \"HeightCm\": \"\",\n \"Id\": 0,\n \"Images\": [\n {\n \"ArticleId\": 0,\n \"Id\": 0,\n \"IsDefault\": false,\n \"Position\": 0,\n \"ThumbPathExt\": \"\",\n \"ThumbUrl\": \"\",\n \"Url\": \"\"\n }\n ],\n \"InvoiceText\": [\n {}\n ],\n \"IsCustomizable\": false,\n \"IsDeactivated\": false,\n \"IsDigital\": false,\n \"LengthCm\": \"\",\n \"LowStock\": false,\n \"Manufacturer\": \"\",\n \"Materials\": [\n {}\n ],\n \"Occasion\": 0,\n \"Price\": \"\",\n \"Recipient\": 0,\n \"SKU\": \"\",\n \"ShippingProductId\": 0,\n \"ShortDescription\": [\n {}\n ],\n \"SoldAmount\": \"\",\n \"SoldAmountLast30Days\": \"\",\n \"SoldSumGross\": \"\",\n \"SoldSumGrossLast30Days\": \"\",\n \"SoldSumNet\": \"\",\n \"SoldSumNetLast30Days\": \"\",\n \"Sources\": [\n {\n \"ApiAccountId\": 0,\n \"ApiAccountName\": \"\",\n \"Custom\": {},\n \"ExportFactor\": \"\",\n \"Id\": 0,\n \"Source\": \"\",\n \"SourceId\": \"\",\n \"StockSyncInactive\": false,\n \"StockSyncMax\": \"\",\n \"StockSyncMin\": \"\",\n \"UnitsPerItem\": \"\"\n }\n ],\n \"StockCode\": \"\",\n \"StockCurrent\": \"\",\n \"StockDesired\": \"\",\n \"StockReduceItemsPerSale\": \"\",\n \"StockWarning\": \"\",\n \"Stocks\": [\n {\n \"Name\": \"\",\n \"StockCode\": \"\",\n \"StockCurrent\": \"\",\n \"StockDesired\": \"\",\n \"StockId\": 0,\n \"StockWarning\": \"\",\n \"UnfulfilledAmount\": \"\"\n }\n ],\n \"Tags\": [\n {}\n ],\n \"TaricNumber\": \"\",\n \"Title\": [\n {}\n ],\n \"Type\": 0,\n \"Unit\": 0,\n \"UnitsPerItem\": \"\",\n \"Vat1Rate\": \"\",\n \"Vat2Rate\": \"\",\n \"VatIndex\": 0,\n \"Weight\": 0,\n \"WeightNet\": 0,\n \"WidthCm\": \"\"\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}}/api/v1/products"),
Content = new StringContent("{\n \"BasicAttributes\": [\n {\n \"LanguageCode\": \"\",\n \"Text\": \"\"\n }\n ],\n \"BillOfMaterial\": [\n {\n \"Amount\": \"\",\n \"ArticleId\": 0,\n \"SKU\": \"\"\n }\n ],\n \"Category1\": {\n \"Id\": 0,\n \"Name\": \"\"\n },\n \"Category2\": {},\n \"Category3\": {},\n \"Condition\": 0,\n \"CostPrice\": \"\",\n \"CountryOfOrigin\": \"\",\n \"CustomFields\": [\n {\n \"ArticleId\": 0,\n \"Definition\": {\n \"Configuration\": {},\n \"Id\": 0,\n \"IsNullable\": false,\n \"Name\": \"\",\n \"Type\": 0\n },\n \"DefinitionId\": 0,\n \"Id\": 0,\n \"Value\": {}\n }\n ],\n \"DeliveryTime\": 0,\n \"Description\": [\n {}\n ],\n \"EAN\": \"\",\n \"ExportDescription\": \"\",\n \"ExportDescriptionMultiLanguage\": [\n {}\n ],\n \"HeightCm\": \"\",\n \"Id\": 0,\n \"Images\": [\n {\n \"ArticleId\": 0,\n \"Id\": 0,\n \"IsDefault\": false,\n \"Position\": 0,\n \"ThumbPathExt\": \"\",\n \"ThumbUrl\": \"\",\n \"Url\": \"\"\n }\n ],\n \"InvoiceText\": [\n {}\n ],\n \"IsCustomizable\": false,\n \"IsDeactivated\": false,\n \"IsDigital\": false,\n \"LengthCm\": \"\",\n \"LowStock\": false,\n \"Manufacturer\": \"\",\n \"Materials\": [\n {}\n ],\n \"Occasion\": 0,\n \"Price\": \"\",\n \"Recipient\": 0,\n \"SKU\": \"\",\n \"ShippingProductId\": 0,\n \"ShortDescription\": [\n {}\n ],\n \"SoldAmount\": \"\",\n \"SoldAmountLast30Days\": \"\",\n \"SoldSumGross\": \"\",\n \"SoldSumGrossLast30Days\": \"\",\n \"SoldSumNet\": \"\",\n \"SoldSumNetLast30Days\": \"\",\n \"Sources\": [\n {\n \"ApiAccountId\": 0,\n \"ApiAccountName\": \"\",\n \"Custom\": {},\n \"ExportFactor\": \"\",\n \"Id\": 0,\n \"Source\": \"\",\n \"SourceId\": \"\",\n \"StockSyncInactive\": false,\n \"StockSyncMax\": \"\",\n \"StockSyncMin\": \"\",\n \"UnitsPerItem\": \"\"\n }\n ],\n \"StockCode\": \"\",\n \"StockCurrent\": \"\",\n \"StockDesired\": \"\",\n \"StockReduceItemsPerSale\": \"\",\n \"StockWarning\": \"\",\n \"Stocks\": [\n {\n \"Name\": \"\",\n \"StockCode\": \"\",\n \"StockCurrent\": \"\",\n \"StockDesired\": \"\",\n \"StockId\": 0,\n \"StockWarning\": \"\",\n \"UnfulfilledAmount\": \"\"\n }\n ],\n \"Tags\": [\n {}\n ],\n \"TaricNumber\": \"\",\n \"Title\": [\n {}\n ],\n \"Type\": 0,\n \"Unit\": 0,\n \"UnitsPerItem\": \"\",\n \"Vat1Rate\": \"\",\n \"Vat2Rate\": \"\",\n \"VatIndex\": 0,\n \"Weight\": 0,\n \"WeightNet\": 0,\n \"WidthCm\": \"\"\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}}/api/v1/products");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"BasicAttributes\": [\n {\n \"LanguageCode\": \"\",\n \"Text\": \"\"\n }\n ],\n \"BillOfMaterial\": [\n {\n \"Amount\": \"\",\n \"ArticleId\": 0,\n \"SKU\": \"\"\n }\n ],\n \"Category1\": {\n \"Id\": 0,\n \"Name\": \"\"\n },\n \"Category2\": {},\n \"Category3\": {},\n \"Condition\": 0,\n \"CostPrice\": \"\",\n \"CountryOfOrigin\": \"\",\n \"CustomFields\": [\n {\n \"ArticleId\": 0,\n \"Definition\": {\n \"Configuration\": {},\n \"Id\": 0,\n \"IsNullable\": false,\n \"Name\": \"\",\n \"Type\": 0\n },\n \"DefinitionId\": 0,\n \"Id\": 0,\n \"Value\": {}\n }\n ],\n \"DeliveryTime\": 0,\n \"Description\": [\n {}\n ],\n \"EAN\": \"\",\n \"ExportDescription\": \"\",\n \"ExportDescriptionMultiLanguage\": [\n {}\n ],\n \"HeightCm\": \"\",\n \"Id\": 0,\n \"Images\": [\n {\n \"ArticleId\": 0,\n \"Id\": 0,\n \"IsDefault\": false,\n \"Position\": 0,\n \"ThumbPathExt\": \"\",\n \"ThumbUrl\": \"\",\n \"Url\": \"\"\n }\n ],\n \"InvoiceText\": [\n {}\n ],\n \"IsCustomizable\": false,\n \"IsDeactivated\": false,\n \"IsDigital\": false,\n \"LengthCm\": \"\",\n \"LowStock\": false,\n \"Manufacturer\": \"\",\n \"Materials\": [\n {}\n ],\n \"Occasion\": 0,\n \"Price\": \"\",\n \"Recipient\": 0,\n \"SKU\": \"\",\n \"ShippingProductId\": 0,\n \"ShortDescription\": [\n {}\n ],\n \"SoldAmount\": \"\",\n \"SoldAmountLast30Days\": \"\",\n \"SoldSumGross\": \"\",\n \"SoldSumGrossLast30Days\": \"\",\n \"SoldSumNet\": \"\",\n \"SoldSumNetLast30Days\": \"\",\n \"Sources\": [\n {\n \"ApiAccountId\": 0,\n \"ApiAccountName\": \"\",\n \"Custom\": {},\n \"ExportFactor\": \"\",\n \"Id\": 0,\n \"Source\": \"\",\n \"SourceId\": \"\",\n \"StockSyncInactive\": false,\n \"StockSyncMax\": \"\",\n \"StockSyncMin\": \"\",\n \"UnitsPerItem\": \"\"\n }\n ],\n \"StockCode\": \"\",\n \"StockCurrent\": \"\",\n \"StockDesired\": \"\",\n \"StockReduceItemsPerSale\": \"\",\n \"StockWarning\": \"\",\n \"Stocks\": [\n {\n \"Name\": \"\",\n \"StockCode\": \"\",\n \"StockCurrent\": \"\",\n \"StockDesired\": \"\",\n \"StockId\": 0,\n \"StockWarning\": \"\",\n \"UnfulfilledAmount\": \"\"\n }\n ],\n \"Tags\": [\n {}\n ],\n \"TaricNumber\": \"\",\n \"Title\": [\n {}\n ],\n \"Type\": 0,\n \"Unit\": 0,\n \"UnitsPerItem\": \"\",\n \"Vat1Rate\": \"\",\n \"Vat2Rate\": \"\",\n \"VatIndex\": 0,\n \"Weight\": 0,\n \"WeightNet\": 0,\n \"WidthCm\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/v1/products"
payload := strings.NewReader("{\n \"BasicAttributes\": [\n {\n \"LanguageCode\": \"\",\n \"Text\": \"\"\n }\n ],\n \"BillOfMaterial\": [\n {\n \"Amount\": \"\",\n \"ArticleId\": 0,\n \"SKU\": \"\"\n }\n ],\n \"Category1\": {\n \"Id\": 0,\n \"Name\": \"\"\n },\n \"Category2\": {},\n \"Category3\": {},\n \"Condition\": 0,\n \"CostPrice\": \"\",\n \"CountryOfOrigin\": \"\",\n \"CustomFields\": [\n {\n \"ArticleId\": 0,\n \"Definition\": {\n \"Configuration\": {},\n \"Id\": 0,\n \"IsNullable\": false,\n \"Name\": \"\",\n \"Type\": 0\n },\n \"DefinitionId\": 0,\n \"Id\": 0,\n \"Value\": {}\n }\n ],\n \"DeliveryTime\": 0,\n \"Description\": [\n {}\n ],\n \"EAN\": \"\",\n \"ExportDescription\": \"\",\n \"ExportDescriptionMultiLanguage\": [\n {}\n ],\n \"HeightCm\": \"\",\n \"Id\": 0,\n \"Images\": [\n {\n \"ArticleId\": 0,\n \"Id\": 0,\n \"IsDefault\": false,\n \"Position\": 0,\n \"ThumbPathExt\": \"\",\n \"ThumbUrl\": \"\",\n \"Url\": \"\"\n }\n ],\n \"InvoiceText\": [\n {}\n ],\n \"IsCustomizable\": false,\n \"IsDeactivated\": false,\n \"IsDigital\": false,\n \"LengthCm\": \"\",\n \"LowStock\": false,\n \"Manufacturer\": \"\",\n \"Materials\": [\n {}\n ],\n \"Occasion\": 0,\n \"Price\": \"\",\n \"Recipient\": 0,\n \"SKU\": \"\",\n \"ShippingProductId\": 0,\n \"ShortDescription\": [\n {}\n ],\n \"SoldAmount\": \"\",\n \"SoldAmountLast30Days\": \"\",\n \"SoldSumGross\": \"\",\n \"SoldSumGrossLast30Days\": \"\",\n \"SoldSumNet\": \"\",\n \"SoldSumNetLast30Days\": \"\",\n \"Sources\": [\n {\n \"ApiAccountId\": 0,\n \"ApiAccountName\": \"\",\n \"Custom\": {},\n \"ExportFactor\": \"\",\n \"Id\": 0,\n \"Source\": \"\",\n \"SourceId\": \"\",\n \"StockSyncInactive\": false,\n \"StockSyncMax\": \"\",\n \"StockSyncMin\": \"\",\n \"UnitsPerItem\": \"\"\n }\n ],\n \"StockCode\": \"\",\n \"StockCurrent\": \"\",\n \"StockDesired\": \"\",\n \"StockReduceItemsPerSale\": \"\",\n \"StockWarning\": \"\",\n \"Stocks\": [\n {\n \"Name\": \"\",\n \"StockCode\": \"\",\n \"StockCurrent\": \"\",\n \"StockDesired\": \"\",\n \"StockId\": 0,\n \"StockWarning\": \"\",\n \"UnfulfilledAmount\": \"\"\n }\n ],\n \"Tags\": [\n {}\n ],\n \"TaricNumber\": \"\",\n \"Title\": [\n {}\n ],\n \"Type\": 0,\n \"Unit\": 0,\n \"UnitsPerItem\": \"\",\n \"Vat1Rate\": \"\",\n \"Vat2Rate\": \"\",\n \"VatIndex\": 0,\n \"Weight\": 0,\n \"WeightNet\": 0,\n \"WidthCm\": \"\"\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/api/v1/products HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 2256
{
"BasicAttributes": [
{
"LanguageCode": "",
"Text": ""
}
],
"BillOfMaterial": [
{
"Amount": "",
"ArticleId": 0,
"SKU": ""
}
],
"Category1": {
"Id": 0,
"Name": ""
},
"Category2": {},
"Category3": {},
"Condition": 0,
"CostPrice": "",
"CountryOfOrigin": "",
"CustomFields": [
{
"ArticleId": 0,
"Definition": {
"Configuration": {},
"Id": 0,
"IsNullable": false,
"Name": "",
"Type": 0
},
"DefinitionId": 0,
"Id": 0,
"Value": {}
}
],
"DeliveryTime": 0,
"Description": [
{}
],
"EAN": "",
"ExportDescription": "",
"ExportDescriptionMultiLanguage": [
{}
],
"HeightCm": "",
"Id": 0,
"Images": [
{
"ArticleId": 0,
"Id": 0,
"IsDefault": false,
"Position": 0,
"ThumbPathExt": "",
"ThumbUrl": "",
"Url": ""
}
],
"InvoiceText": [
{}
],
"IsCustomizable": false,
"IsDeactivated": false,
"IsDigital": false,
"LengthCm": "",
"LowStock": false,
"Manufacturer": "",
"Materials": [
{}
],
"Occasion": 0,
"Price": "",
"Recipient": 0,
"SKU": "",
"ShippingProductId": 0,
"ShortDescription": [
{}
],
"SoldAmount": "",
"SoldAmountLast30Days": "",
"SoldSumGross": "",
"SoldSumGrossLast30Days": "",
"SoldSumNet": "",
"SoldSumNetLast30Days": "",
"Sources": [
{
"ApiAccountId": 0,
"ApiAccountName": "",
"Custom": {},
"ExportFactor": "",
"Id": 0,
"Source": "",
"SourceId": "",
"StockSyncInactive": false,
"StockSyncMax": "",
"StockSyncMin": "",
"UnitsPerItem": ""
}
],
"StockCode": "",
"StockCurrent": "",
"StockDesired": "",
"StockReduceItemsPerSale": "",
"StockWarning": "",
"Stocks": [
{
"Name": "",
"StockCode": "",
"StockCurrent": "",
"StockDesired": "",
"StockId": 0,
"StockWarning": "",
"UnfulfilledAmount": ""
}
],
"Tags": [
{}
],
"TaricNumber": "",
"Title": [
{}
],
"Type": 0,
"Unit": 0,
"UnitsPerItem": "",
"Vat1Rate": "",
"Vat2Rate": "",
"VatIndex": 0,
"Weight": 0,
"WeightNet": 0,
"WidthCm": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/api/v1/products")
.setHeader("content-type", "application/json")
.setBody("{\n \"BasicAttributes\": [\n {\n \"LanguageCode\": \"\",\n \"Text\": \"\"\n }\n ],\n \"BillOfMaterial\": [\n {\n \"Amount\": \"\",\n \"ArticleId\": 0,\n \"SKU\": \"\"\n }\n ],\n \"Category1\": {\n \"Id\": 0,\n \"Name\": \"\"\n },\n \"Category2\": {},\n \"Category3\": {},\n \"Condition\": 0,\n \"CostPrice\": \"\",\n \"CountryOfOrigin\": \"\",\n \"CustomFields\": [\n {\n \"ArticleId\": 0,\n \"Definition\": {\n \"Configuration\": {},\n \"Id\": 0,\n \"IsNullable\": false,\n \"Name\": \"\",\n \"Type\": 0\n },\n \"DefinitionId\": 0,\n \"Id\": 0,\n \"Value\": {}\n }\n ],\n \"DeliveryTime\": 0,\n \"Description\": [\n {}\n ],\n \"EAN\": \"\",\n \"ExportDescription\": \"\",\n \"ExportDescriptionMultiLanguage\": [\n {}\n ],\n \"HeightCm\": \"\",\n \"Id\": 0,\n \"Images\": [\n {\n \"ArticleId\": 0,\n \"Id\": 0,\n \"IsDefault\": false,\n \"Position\": 0,\n \"ThumbPathExt\": \"\",\n \"ThumbUrl\": \"\",\n \"Url\": \"\"\n }\n ],\n \"InvoiceText\": [\n {}\n ],\n \"IsCustomizable\": false,\n \"IsDeactivated\": false,\n \"IsDigital\": false,\n \"LengthCm\": \"\",\n \"LowStock\": false,\n \"Manufacturer\": \"\",\n \"Materials\": [\n {}\n ],\n \"Occasion\": 0,\n \"Price\": \"\",\n \"Recipient\": 0,\n \"SKU\": \"\",\n \"ShippingProductId\": 0,\n \"ShortDescription\": [\n {}\n ],\n \"SoldAmount\": \"\",\n \"SoldAmountLast30Days\": \"\",\n \"SoldSumGross\": \"\",\n \"SoldSumGrossLast30Days\": \"\",\n \"SoldSumNet\": \"\",\n \"SoldSumNetLast30Days\": \"\",\n \"Sources\": [\n {\n \"ApiAccountId\": 0,\n \"ApiAccountName\": \"\",\n \"Custom\": {},\n \"ExportFactor\": \"\",\n \"Id\": 0,\n \"Source\": \"\",\n \"SourceId\": \"\",\n \"StockSyncInactive\": false,\n \"StockSyncMax\": \"\",\n \"StockSyncMin\": \"\",\n \"UnitsPerItem\": \"\"\n }\n ],\n \"StockCode\": \"\",\n \"StockCurrent\": \"\",\n \"StockDesired\": \"\",\n \"StockReduceItemsPerSale\": \"\",\n \"StockWarning\": \"\",\n \"Stocks\": [\n {\n \"Name\": \"\",\n \"StockCode\": \"\",\n \"StockCurrent\": \"\",\n \"StockDesired\": \"\",\n \"StockId\": 0,\n \"StockWarning\": \"\",\n \"UnfulfilledAmount\": \"\"\n }\n ],\n \"Tags\": [\n {}\n ],\n \"TaricNumber\": \"\",\n \"Title\": [\n {}\n ],\n \"Type\": 0,\n \"Unit\": 0,\n \"UnitsPerItem\": \"\",\n \"Vat1Rate\": \"\",\n \"Vat2Rate\": \"\",\n \"VatIndex\": 0,\n \"Weight\": 0,\n \"WeightNet\": 0,\n \"WidthCm\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/v1/products"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"BasicAttributes\": [\n {\n \"LanguageCode\": \"\",\n \"Text\": \"\"\n }\n ],\n \"BillOfMaterial\": [\n {\n \"Amount\": \"\",\n \"ArticleId\": 0,\n \"SKU\": \"\"\n }\n ],\n \"Category1\": {\n \"Id\": 0,\n \"Name\": \"\"\n },\n \"Category2\": {},\n \"Category3\": {},\n \"Condition\": 0,\n \"CostPrice\": \"\",\n \"CountryOfOrigin\": \"\",\n \"CustomFields\": [\n {\n \"ArticleId\": 0,\n \"Definition\": {\n \"Configuration\": {},\n \"Id\": 0,\n \"IsNullable\": false,\n \"Name\": \"\",\n \"Type\": 0\n },\n \"DefinitionId\": 0,\n \"Id\": 0,\n \"Value\": {}\n }\n ],\n \"DeliveryTime\": 0,\n \"Description\": [\n {}\n ],\n \"EAN\": \"\",\n \"ExportDescription\": \"\",\n \"ExportDescriptionMultiLanguage\": [\n {}\n ],\n \"HeightCm\": \"\",\n \"Id\": 0,\n \"Images\": [\n {\n \"ArticleId\": 0,\n \"Id\": 0,\n \"IsDefault\": false,\n \"Position\": 0,\n \"ThumbPathExt\": \"\",\n \"ThumbUrl\": \"\",\n \"Url\": \"\"\n }\n ],\n \"InvoiceText\": [\n {}\n ],\n \"IsCustomizable\": false,\n \"IsDeactivated\": false,\n \"IsDigital\": false,\n \"LengthCm\": \"\",\n \"LowStock\": false,\n \"Manufacturer\": \"\",\n \"Materials\": [\n {}\n ],\n \"Occasion\": 0,\n \"Price\": \"\",\n \"Recipient\": 0,\n \"SKU\": \"\",\n \"ShippingProductId\": 0,\n \"ShortDescription\": [\n {}\n ],\n \"SoldAmount\": \"\",\n \"SoldAmountLast30Days\": \"\",\n \"SoldSumGross\": \"\",\n \"SoldSumGrossLast30Days\": \"\",\n \"SoldSumNet\": \"\",\n \"SoldSumNetLast30Days\": \"\",\n \"Sources\": [\n {\n \"ApiAccountId\": 0,\n \"ApiAccountName\": \"\",\n \"Custom\": {},\n \"ExportFactor\": \"\",\n \"Id\": 0,\n \"Source\": \"\",\n \"SourceId\": \"\",\n \"StockSyncInactive\": false,\n \"StockSyncMax\": \"\",\n \"StockSyncMin\": \"\",\n \"UnitsPerItem\": \"\"\n }\n ],\n \"StockCode\": \"\",\n \"StockCurrent\": \"\",\n \"StockDesired\": \"\",\n \"StockReduceItemsPerSale\": \"\",\n \"StockWarning\": \"\",\n \"Stocks\": [\n {\n \"Name\": \"\",\n \"StockCode\": \"\",\n \"StockCurrent\": \"\",\n \"StockDesired\": \"\",\n \"StockId\": 0,\n \"StockWarning\": \"\",\n \"UnfulfilledAmount\": \"\"\n }\n ],\n \"Tags\": [\n {}\n ],\n \"TaricNumber\": \"\",\n \"Title\": [\n {}\n ],\n \"Type\": 0,\n \"Unit\": 0,\n \"UnitsPerItem\": \"\",\n \"Vat1Rate\": \"\",\n \"Vat2Rate\": \"\",\n \"VatIndex\": 0,\n \"Weight\": 0,\n \"WeightNet\": 0,\n \"WidthCm\": \"\"\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 \"BasicAttributes\": [\n {\n \"LanguageCode\": \"\",\n \"Text\": \"\"\n }\n ],\n \"BillOfMaterial\": [\n {\n \"Amount\": \"\",\n \"ArticleId\": 0,\n \"SKU\": \"\"\n }\n ],\n \"Category1\": {\n \"Id\": 0,\n \"Name\": \"\"\n },\n \"Category2\": {},\n \"Category3\": {},\n \"Condition\": 0,\n \"CostPrice\": \"\",\n \"CountryOfOrigin\": \"\",\n \"CustomFields\": [\n {\n \"ArticleId\": 0,\n \"Definition\": {\n \"Configuration\": {},\n \"Id\": 0,\n \"IsNullable\": false,\n \"Name\": \"\",\n \"Type\": 0\n },\n \"DefinitionId\": 0,\n \"Id\": 0,\n \"Value\": {}\n }\n ],\n \"DeliveryTime\": 0,\n \"Description\": [\n {}\n ],\n \"EAN\": \"\",\n \"ExportDescription\": \"\",\n \"ExportDescriptionMultiLanguage\": [\n {}\n ],\n \"HeightCm\": \"\",\n \"Id\": 0,\n \"Images\": [\n {\n \"ArticleId\": 0,\n \"Id\": 0,\n \"IsDefault\": false,\n \"Position\": 0,\n \"ThumbPathExt\": \"\",\n \"ThumbUrl\": \"\",\n \"Url\": \"\"\n }\n ],\n \"InvoiceText\": [\n {}\n ],\n \"IsCustomizable\": false,\n \"IsDeactivated\": false,\n \"IsDigital\": false,\n \"LengthCm\": \"\",\n \"LowStock\": false,\n \"Manufacturer\": \"\",\n \"Materials\": [\n {}\n ],\n \"Occasion\": 0,\n \"Price\": \"\",\n \"Recipient\": 0,\n \"SKU\": \"\",\n \"ShippingProductId\": 0,\n \"ShortDescription\": [\n {}\n ],\n \"SoldAmount\": \"\",\n \"SoldAmountLast30Days\": \"\",\n \"SoldSumGross\": \"\",\n \"SoldSumGrossLast30Days\": \"\",\n \"SoldSumNet\": \"\",\n \"SoldSumNetLast30Days\": \"\",\n \"Sources\": [\n {\n \"ApiAccountId\": 0,\n \"ApiAccountName\": \"\",\n \"Custom\": {},\n \"ExportFactor\": \"\",\n \"Id\": 0,\n \"Source\": \"\",\n \"SourceId\": \"\",\n \"StockSyncInactive\": false,\n \"StockSyncMax\": \"\",\n \"StockSyncMin\": \"\",\n \"UnitsPerItem\": \"\"\n }\n ],\n \"StockCode\": \"\",\n \"StockCurrent\": \"\",\n \"StockDesired\": \"\",\n \"StockReduceItemsPerSale\": \"\",\n \"StockWarning\": \"\",\n \"Stocks\": [\n {\n \"Name\": \"\",\n \"StockCode\": \"\",\n \"StockCurrent\": \"\",\n \"StockDesired\": \"\",\n \"StockId\": 0,\n \"StockWarning\": \"\",\n \"UnfulfilledAmount\": \"\"\n }\n ],\n \"Tags\": [\n {}\n ],\n \"TaricNumber\": \"\",\n \"Title\": [\n {}\n ],\n \"Type\": 0,\n \"Unit\": 0,\n \"UnitsPerItem\": \"\",\n \"Vat1Rate\": \"\",\n \"Vat2Rate\": \"\",\n \"VatIndex\": 0,\n \"Weight\": 0,\n \"WeightNet\": 0,\n \"WidthCm\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/api/v1/products")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/api/v1/products")
.header("content-type", "application/json")
.body("{\n \"BasicAttributes\": [\n {\n \"LanguageCode\": \"\",\n \"Text\": \"\"\n }\n ],\n \"BillOfMaterial\": [\n {\n \"Amount\": \"\",\n \"ArticleId\": 0,\n \"SKU\": \"\"\n }\n ],\n \"Category1\": {\n \"Id\": 0,\n \"Name\": \"\"\n },\n \"Category2\": {},\n \"Category3\": {},\n \"Condition\": 0,\n \"CostPrice\": \"\",\n \"CountryOfOrigin\": \"\",\n \"CustomFields\": [\n {\n \"ArticleId\": 0,\n \"Definition\": {\n \"Configuration\": {},\n \"Id\": 0,\n \"IsNullable\": false,\n \"Name\": \"\",\n \"Type\": 0\n },\n \"DefinitionId\": 0,\n \"Id\": 0,\n \"Value\": {}\n }\n ],\n \"DeliveryTime\": 0,\n \"Description\": [\n {}\n ],\n \"EAN\": \"\",\n \"ExportDescription\": \"\",\n \"ExportDescriptionMultiLanguage\": [\n {}\n ],\n \"HeightCm\": \"\",\n \"Id\": 0,\n \"Images\": [\n {\n \"ArticleId\": 0,\n \"Id\": 0,\n \"IsDefault\": false,\n \"Position\": 0,\n \"ThumbPathExt\": \"\",\n \"ThumbUrl\": \"\",\n \"Url\": \"\"\n }\n ],\n \"InvoiceText\": [\n {}\n ],\n \"IsCustomizable\": false,\n \"IsDeactivated\": false,\n \"IsDigital\": false,\n \"LengthCm\": \"\",\n \"LowStock\": false,\n \"Manufacturer\": \"\",\n \"Materials\": [\n {}\n ],\n \"Occasion\": 0,\n \"Price\": \"\",\n \"Recipient\": 0,\n \"SKU\": \"\",\n \"ShippingProductId\": 0,\n \"ShortDescription\": [\n {}\n ],\n \"SoldAmount\": \"\",\n \"SoldAmountLast30Days\": \"\",\n \"SoldSumGross\": \"\",\n \"SoldSumGrossLast30Days\": \"\",\n \"SoldSumNet\": \"\",\n \"SoldSumNetLast30Days\": \"\",\n \"Sources\": [\n {\n \"ApiAccountId\": 0,\n \"ApiAccountName\": \"\",\n \"Custom\": {},\n \"ExportFactor\": \"\",\n \"Id\": 0,\n \"Source\": \"\",\n \"SourceId\": \"\",\n \"StockSyncInactive\": false,\n \"StockSyncMax\": \"\",\n \"StockSyncMin\": \"\",\n \"UnitsPerItem\": \"\"\n }\n ],\n \"StockCode\": \"\",\n \"StockCurrent\": \"\",\n \"StockDesired\": \"\",\n \"StockReduceItemsPerSale\": \"\",\n \"StockWarning\": \"\",\n \"Stocks\": [\n {\n \"Name\": \"\",\n \"StockCode\": \"\",\n \"StockCurrent\": \"\",\n \"StockDesired\": \"\",\n \"StockId\": 0,\n \"StockWarning\": \"\",\n \"UnfulfilledAmount\": \"\"\n }\n ],\n \"Tags\": [\n {}\n ],\n \"TaricNumber\": \"\",\n \"Title\": [\n {}\n ],\n \"Type\": 0,\n \"Unit\": 0,\n \"UnitsPerItem\": \"\",\n \"Vat1Rate\": \"\",\n \"Vat2Rate\": \"\",\n \"VatIndex\": 0,\n \"Weight\": 0,\n \"WeightNet\": 0,\n \"WidthCm\": \"\"\n}")
.asString();
const data = JSON.stringify({
BasicAttributes: [
{
LanguageCode: '',
Text: ''
}
],
BillOfMaterial: [
{
Amount: '',
ArticleId: 0,
SKU: ''
}
],
Category1: {
Id: 0,
Name: ''
},
Category2: {},
Category3: {},
Condition: 0,
CostPrice: '',
CountryOfOrigin: '',
CustomFields: [
{
ArticleId: 0,
Definition: {
Configuration: {},
Id: 0,
IsNullable: false,
Name: '',
Type: 0
},
DefinitionId: 0,
Id: 0,
Value: {}
}
],
DeliveryTime: 0,
Description: [
{}
],
EAN: '',
ExportDescription: '',
ExportDescriptionMultiLanguage: [
{}
],
HeightCm: '',
Id: 0,
Images: [
{
ArticleId: 0,
Id: 0,
IsDefault: false,
Position: 0,
ThumbPathExt: '',
ThumbUrl: '',
Url: ''
}
],
InvoiceText: [
{}
],
IsCustomizable: false,
IsDeactivated: false,
IsDigital: false,
LengthCm: '',
LowStock: false,
Manufacturer: '',
Materials: [
{}
],
Occasion: 0,
Price: '',
Recipient: 0,
SKU: '',
ShippingProductId: 0,
ShortDescription: [
{}
],
SoldAmount: '',
SoldAmountLast30Days: '',
SoldSumGross: '',
SoldSumGrossLast30Days: '',
SoldSumNet: '',
SoldSumNetLast30Days: '',
Sources: [
{
ApiAccountId: 0,
ApiAccountName: '',
Custom: {},
ExportFactor: '',
Id: 0,
Source: '',
SourceId: '',
StockSyncInactive: false,
StockSyncMax: '',
StockSyncMin: '',
UnitsPerItem: ''
}
],
StockCode: '',
StockCurrent: '',
StockDesired: '',
StockReduceItemsPerSale: '',
StockWarning: '',
Stocks: [
{
Name: '',
StockCode: '',
StockCurrent: '',
StockDesired: '',
StockId: 0,
StockWarning: '',
UnfulfilledAmount: ''
}
],
Tags: [
{}
],
TaricNumber: '',
Title: [
{}
],
Type: 0,
Unit: 0,
UnitsPerItem: '',
Vat1Rate: '',
Vat2Rate: '',
VatIndex: 0,
Weight: 0,
WeightNet: 0,
WidthCm: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/api/v1/products');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/api/v1/products',
headers: {'content-type': 'application/json'},
data: {
BasicAttributes: [{LanguageCode: '', Text: ''}],
BillOfMaterial: [{Amount: '', ArticleId: 0, SKU: ''}],
Category1: {Id: 0, Name: ''},
Category2: {},
Category3: {},
Condition: 0,
CostPrice: '',
CountryOfOrigin: '',
CustomFields: [
{
ArticleId: 0,
Definition: {Configuration: {}, Id: 0, IsNullable: false, Name: '', Type: 0},
DefinitionId: 0,
Id: 0,
Value: {}
}
],
DeliveryTime: 0,
Description: [{}],
EAN: '',
ExportDescription: '',
ExportDescriptionMultiLanguage: [{}],
HeightCm: '',
Id: 0,
Images: [
{
ArticleId: 0,
Id: 0,
IsDefault: false,
Position: 0,
ThumbPathExt: '',
ThumbUrl: '',
Url: ''
}
],
InvoiceText: [{}],
IsCustomizable: false,
IsDeactivated: false,
IsDigital: false,
LengthCm: '',
LowStock: false,
Manufacturer: '',
Materials: [{}],
Occasion: 0,
Price: '',
Recipient: 0,
SKU: '',
ShippingProductId: 0,
ShortDescription: [{}],
SoldAmount: '',
SoldAmountLast30Days: '',
SoldSumGross: '',
SoldSumGrossLast30Days: '',
SoldSumNet: '',
SoldSumNetLast30Days: '',
Sources: [
{
ApiAccountId: 0,
ApiAccountName: '',
Custom: {},
ExportFactor: '',
Id: 0,
Source: '',
SourceId: '',
StockSyncInactive: false,
StockSyncMax: '',
StockSyncMin: '',
UnitsPerItem: ''
}
],
StockCode: '',
StockCurrent: '',
StockDesired: '',
StockReduceItemsPerSale: '',
StockWarning: '',
Stocks: [
{
Name: '',
StockCode: '',
StockCurrent: '',
StockDesired: '',
StockId: 0,
StockWarning: '',
UnfulfilledAmount: ''
}
],
Tags: [{}],
TaricNumber: '',
Title: [{}],
Type: 0,
Unit: 0,
UnitsPerItem: '',
Vat1Rate: '',
Vat2Rate: '',
VatIndex: 0,
Weight: 0,
WeightNet: 0,
WidthCm: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/v1/products';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"BasicAttributes":[{"LanguageCode":"","Text":""}],"BillOfMaterial":[{"Amount":"","ArticleId":0,"SKU":""}],"Category1":{"Id":0,"Name":""},"Category2":{},"Category3":{},"Condition":0,"CostPrice":"","CountryOfOrigin":"","CustomFields":[{"ArticleId":0,"Definition":{"Configuration":{},"Id":0,"IsNullable":false,"Name":"","Type":0},"DefinitionId":0,"Id":0,"Value":{}}],"DeliveryTime":0,"Description":[{}],"EAN":"","ExportDescription":"","ExportDescriptionMultiLanguage":[{}],"HeightCm":"","Id":0,"Images":[{"ArticleId":0,"Id":0,"IsDefault":false,"Position":0,"ThumbPathExt":"","ThumbUrl":"","Url":""}],"InvoiceText":[{}],"IsCustomizable":false,"IsDeactivated":false,"IsDigital":false,"LengthCm":"","LowStock":false,"Manufacturer":"","Materials":[{}],"Occasion":0,"Price":"","Recipient":0,"SKU":"","ShippingProductId":0,"ShortDescription":[{}],"SoldAmount":"","SoldAmountLast30Days":"","SoldSumGross":"","SoldSumGrossLast30Days":"","SoldSumNet":"","SoldSumNetLast30Days":"","Sources":[{"ApiAccountId":0,"ApiAccountName":"","Custom":{},"ExportFactor":"","Id":0,"Source":"","SourceId":"","StockSyncInactive":false,"StockSyncMax":"","StockSyncMin":"","UnitsPerItem":""}],"StockCode":"","StockCurrent":"","StockDesired":"","StockReduceItemsPerSale":"","StockWarning":"","Stocks":[{"Name":"","StockCode":"","StockCurrent":"","StockDesired":"","StockId":0,"StockWarning":"","UnfulfilledAmount":""}],"Tags":[{}],"TaricNumber":"","Title":[{}],"Type":0,"Unit":0,"UnitsPerItem":"","Vat1Rate":"","Vat2Rate":"","VatIndex":0,"Weight":0,"WeightNet":0,"WidthCm":""}'
};
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}}/api/v1/products',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "BasicAttributes": [\n {\n "LanguageCode": "",\n "Text": ""\n }\n ],\n "BillOfMaterial": [\n {\n "Amount": "",\n "ArticleId": 0,\n "SKU": ""\n }\n ],\n "Category1": {\n "Id": 0,\n "Name": ""\n },\n "Category2": {},\n "Category3": {},\n "Condition": 0,\n "CostPrice": "",\n "CountryOfOrigin": "",\n "CustomFields": [\n {\n "ArticleId": 0,\n "Definition": {\n "Configuration": {},\n "Id": 0,\n "IsNullable": false,\n "Name": "",\n "Type": 0\n },\n "DefinitionId": 0,\n "Id": 0,\n "Value": {}\n }\n ],\n "DeliveryTime": 0,\n "Description": [\n {}\n ],\n "EAN": "",\n "ExportDescription": "",\n "ExportDescriptionMultiLanguage": [\n {}\n ],\n "HeightCm": "",\n "Id": 0,\n "Images": [\n {\n "ArticleId": 0,\n "Id": 0,\n "IsDefault": false,\n "Position": 0,\n "ThumbPathExt": "",\n "ThumbUrl": "",\n "Url": ""\n }\n ],\n "InvoiceText": [\n {}\n ],\n "IsCustomizable": false,\n "IsDeactivated": false,\n "IsDigital": false,\n "LengthCm": "",\n "LowStock": false,\n "Manufacturer": "",\n "Materials": [\n {}\n ],\n "Occasion": 0,\n "Price": "",\n "Recipient": 0,\n "SKU": "",\n "ShippingProductId": 0,\n "ShortDescription": [\n {}\n ],\n "SoldAmount": "",\n "SoldAmountLast30Days": "",\n "SoldSumGross": "",\n "SoldSumGrossLast30Days": "",\n "SoldSumNet": "",\n "SoldSumNetLast30Days": "",\n "Sources": [\n {\n "ApiAccountId": 0,\n "ApiAccountName": "",\n "Custom": {},\n "ExportFactor": "",\n "Id": 0,\n "Source": "",\n "SourceId": "",\n "StockSyncInactive": false,\n "StockSyncMax": "",\n "StockSyncMin": "",\n "UnitsPerItem": ""\n }\n ],\n "StockCode": "",\n "StockCurrent": "",\n "StockDesired": "",\n "StockReduceItemsPerSale": "",\n "StockWarning": "",\n "Stocks": [\n {\n "Name": "",\n "StockCode": "",\n "StockCurrent": "",\n "StockDesired": "",\n "StockId": 0,\n "StockWarning": "",\n "UnfulfilledAmount": ""\n }\n ],\n "Tags": [\n {}\n ],\n "TaricNumber": "",\n "Title": [\n {}\n ],\n "Type": 0,\n "Unit": 0,\n "UnitsPerItem": "",\n "Vat1Rate": "",\n "Vat2Rate": "",\n "VatIndex": 0,\n "Weight": 0,\n "WeightNet": 0,\n "WidthCm": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"BasicAttributes\": [\n {\n \"LanguageCode\": \"\",\n \"Text\": \"\"\n }\n ],\n \"BillOfMaterial\": [\n {\n \"Amount\": \"\",\n \"ArticleId\": 0,\n \"SKU\": \"\"\n }\n ],\n \"Category1\": {\n \"Id\": 0,\n \"Name\": \"\"\n },\n \"Category2\": {},\n \"Category3\": {},\n \"Condition\": 0,\n \"CostPrice\": \"\",\n \"CountryOfOrigin\": \"\",\n \"CustomFields\": [\n {\n \"ArticleId\": 0,\n \"Definition\": {\n \"Configuration\": {},\n \"Id\": 0,\n \"IsNullable\": false,\n \"Name\": \"\",\n \"Type\": 0\n },\n \"DefinitionId\": 0,\n \"Id\": 0,\n \"Value\": {}\n }\n ],\n \"DeliveryTime\": 0,\n \"Description\": [\n {}\n ],\n \"EAN\": \"\",\n \"ExportDescription\": \"\",\n \"ExportDescriptionMultiLanguage\": [\n {}\n ],\n \"HeightCm\": \"\",\n \"Id\": 0,\n \"Images\": [\n {\n \"ArticleId\": 0,\n \"Id\": 0,\n \"IsDefault\": false,\n \"Position\": 0,\n \"ThumbPathExt\": \"\",\n \"ThumbUrl\": \"\",\n \"Url\": \"\"\n }\n ],\n \"InvoiceText\": [\n {}\n ],\n \"IsCustomizable\": false,\n \"IsDeactivated\": false,\n \"IsDigital\": false,\n \"LengthCm\": \"\",\n \"LowStock\": false,\n \"Manufacturer\": \"\",\n \"Materials\": [\n {}\n ],\n \"Occasion\": 0,\n \"Price\": \"\",\n \"Recipient\": 0,\n \"SKU\": \"\",\n \"ShippingProductId\": 0,\n \"ShortDescription\": [\n {}\n ],\n \"SoldAmount\": \"\",\n \"SoldAmountLast30Days\": \"\",\n \"SoldSumGross\": \"\",\n \"SoldSumGrossLast30Days\": \"\",\n \"SoldSumNet\": \"\",\n \"SoldSumNetLast30Days\": \"\",\n \"Sources\": [\n {\n \"ApiAccountId\": 0,\n \"ApiAccountName\": \"\",\n \"Custom\": {},\n \"ExportFactor\": \"\",\n \"Id\": 0,\n \"Source\": \"\",\n \"SourceId\": \"\",\n \"StockSyncInactive\": false,\n \"StockSyncMax\": \"\",\n \"StockSyncMin\": \"\",\n \"UnitsPerItem\": \"\"\n }\n ],\n \"StockCode\": \"\",\n \"StockCurrent\": \"\",\n \"StockDesired\": \"\",\n \"StockReduceItemsPerSale\": \"\",\n \"StockWarning\": \"\",\n \"Stocks\": [\n {\n \"Name\": \"\",\n \"StockCode\": \"\",\n \"StockCurrent\": \"\",\n \"StockDesired\": \"\",\n \"StockId\": 0,\n \"StockWarning\": \"\",\n \"UnfulfilledAmount\": \"\"\n }\n ],\n \"Tags\": [\n {}\n ],\n \"TaricNumber\": \"\",\n \"Title\": [\n {}\n ],\n \"Type\": 0,\n \"Unit\": 0,\n \"UnitsPerItem\": \"\",\n \"Vat1Rate\": \"\",\n \"Vat2Rate\": \"\",\n \"VatIndex\": 0,\n \"Weight\": 0,\n \"WeightNet\": 0,\n \"WidthCm\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/api/v1/products")
.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/api/v1/products',
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({
BasicAttributes: [{LanguageCode: '', Text: ''}],
BillOfMaterial: [{Amount: '', ArticleId: 0, SKU: ''}],
Category1: {Id: 0, Name: ''},
Category2: {},
Category3: {},
Condition: 0,
CostPrice: '',
CountryOfOrigin: '',
CustomFields: [
{
ArticleId: 0,
Definition: {Configuration: {}, Id: 0, IsNullable: false, Name: '', Type: 0},
DefinitionId: 0,
Id: 0,
Value: {}
}
],
DeliveryTime: 0,
Description: [{}],
EAN: '',
ExportDescription: '',
ExportDescriptionMultiLanguage: [{}],
HeightCm: '',
Id: 0,
Images: [
{
ArticleId: 0,
Id: 0,
IsDefault: false,
Position: 0,
ThumbPathExt: '',
ThumbUrl: '',
Url: ''
}
],
InvoiceText: [{}],
IsCustomizable: false,
IsDeactivated: false,
IsDigital: false,
LengthCm: '',
LowStock: false,
Manufacturer: '',
Materials: [{}],
Occasion: 0,
Price: '',
Recipient: 0,
SKU: '',
ShippingProductId: 0,
ShortDescription: [{}],
SoldAmount: '',
SoldAmountLast30Days: '',
SoldSumGross: '',
SoldSumGrossLast30Days: '',
SoldSumNet: '',
SoldSumNetLast30Days: '',
Sources: [
{
ApiAccountId: 0,
ApiAccountName: '',
Custom: {},
ExportFactor: '',
Id: 0,
Source: '',
SourceId: '',
StockSyncInactive: false,
StockSyncMax: '',
StockSyncMin: '',
UnitsPerItem: ''
}
],
StockCode: '',
StockCurrent: '',
StockDesired: '',
StockReduceItemsPerSale: '',
StockWarning: '',
Stocks: [
{
Name: '',
StockCode: '',
StockCurrent: '',
StockDesired: '',
StockId: 0,
StockWarning: '',
UnfulfilledAmount: ''
}
],
Tags: [{}],
TaricNumber: '',
Title: [{}],
Type: 0,
Unit: 0,
UnitsPerItem: '',
Vat1Rate: '',
Vat2Rate: '',
VatIndex: 0,
Weight: 0,
WeightNet: 0,
WidthCm: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/api/v1/products',
headers: {'content-type': 'application/json'},
body: {
BasicAttributes: [{LanguageCode: '', Text: ''}],
BillOfMaterial: [{Amount: '', ArticleId: 0, SKU: ''}],
Category1: {Id: 0, Name: ''},
Category2: {},
Category3: {},
Condition: 0,
CostPrice: '',
CountryOfOrigin: '',
CustomFields: [
{
ArticleId: 0,
Definition: {Configuration: {}, Id: 0, IsNullable: false, Name: '', Type: 0},
DefinitionId: 0,
Id: 0,
Value: {}
}
],
DeliveryTime: 0,
Description: [{}],
EAN: '',
ExportDescription: '',
ExportDescriptionMultiLanguage: [{}],
HeightCm: '',
Id: 0,
Images: [
{
ArticleId: 0,
Id: 0,
IsDefault: false,
Position: 0,
ThumbPathExt: '',
ThumbUrl: '',
Url: ''
}
],
InvoiceText: [{}],
IsCustomizable: false,
IsDeactivated: false,
IsDigital: false,
LengthCm: '',
LowStock: false,
Manufacturer: '',
Materials: [{}],
Occasion: 0,
Price: '',
Recipient: 0,
SKU: '',
ShippingProductId: 0,
ShortDescription: [{}],
SoldAmount: '',
SoldAmountLast30Days: '',
SoldSumGross: '',
SoldSumGrossLast30Days: '',
SoldSumNet: '',
SoldSumNetLast30Days: '',
Sources: [
{
ApiAccountId: 0,
ApiAccountName: '',
Custom: {},
ExportFactor: '',
Id: 0,
Source: '',
SourceId: '',
StockSyncInactive: false,
StockSyncMax: '',
StockSyncMin: '',
UnitsPerItem: ''
}
],
StockCode: '',
StockCurrent: '',
StockDesired: '',
StockReduceItemsPerSale: '',
StockWarning: '',
Stocks: [
{
Name: '',
StockCode: '',
StockCurrent: '',
StockDesired: '',
StockId: 0,
StockWarning: '',
UnfulfilledAmount: ''
}
],
Tags: [{}],
TaricNumber: '',
Title: [{}],
Type: 0,
Unit: 0,
UnitsPerItem: '',
Vat1Rate: '',
Vat2Rate: '',
VatIndex: 0,
Weight: 0,
WeightNet: 0,
WidthCm: ''
},
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}}/api/v1/products');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
BasicAttributes: [
{
LanguageCode: '',
Text: ''
}
],
BillOfMaterial: [
{
Amount: '',
ArticleId: 0,
SKU: ''
}
],
Category1: {
Id: 0,
Name: ''
},
Category2: {},
Category3: {},
Condition: 0,
CostPrice: '',
CountryOfOrigin: '',
CustomFields: [
{
ArticleId: 0,
Definition: {
Configuration: {},
Id: 0,
IsNullable: false,
Name: '',
Type: 0
},
DefinitionId: 0,
Id: 0,
Value: {}
}
],
DeliveryTime: 0,
Description: [
{}
],
EAN: '',
ExportDescription: '',
ExportDescriptionMultiLanguage: [
{}
],
HeightCm: '',
Id: 0,
Images: [
{
ArticleId: 0,
Id: 0,
IsDefault: false,
Position: 0,
ThumbPathExt: '',
ThumbUrl: '',
Url: ''
}
],
InvoiceText: [
{}
],
IsCustomizable: false,
IsDeactivated: false,
IsDigital: false,
LengthCm: '',
LowStock: false,
Manufacturer: '',
Materials: [
{}
],
Occasion: 0,
Price: '',
Recipient: 0,
SKU: '',
ShippingProductId: 0,
ShortDescription: [
{}
],
SoldAmount: '',
SoldAmountLast30Days: '',
SoldSumGross: '',
SoldSumGrossLast30Days: '',
SoldSumNet: '',
SoldSumNetLast30Days: '',
Sources: [
{
ApiAccountId: 0,
ApiAccountName: '',
Custom: {},
ExportFactor: '',
Id: 0,
Source: '',
SourceId: '',
StockSyncInactive: false,
StockSyncMax: '',
StockSyncMin: '',
UnitsPerItem: ''
}
],
StockCode: '',
StockCurrent: '',
StockDesired: '',
StockReduceItemsPerSale: '',
StockWarning: '',
Stocks: [
{
Name: '',
StockCode: '',
StockCurrent: '',
StockDesired: '',
StockId: 0,
StockWarning: '',
UnfulfilledAmount: ''
}
],
Tags: [
{}
],
TaricNumber: '',
Title: [
{}
],
Type: 0,
Unit: 0,
UnitsPerItem: '',
Vat1Rate: '',
Vat2Rate: '',
VatIndex: 0,
Weight: 0,
WeightNet: 0,
WidthCm: ''
});
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}}/api/v1/products',
headers: {'content-type': 'application/json'},
data: {
BasicAttributes: [{LanguageCode: '', Text: ''}],
BillOfMaterial: [{Amount: '', ArticleId: 0, SKU: ''}],
Category1: {Id: 0, Name: ''},
Category2: {},
Category3: {},
Condition: 0,
CostPrice: '',
CountryOfOrigin: '',
CustomFields: [
{
ArticleId: 0,
Definition: {Configuration: {}, Id: 0, IsNullable: false, Name: '', Type: 0},
DefinitionId: 0,
Id: 0,
Value: {}
}
],
DeliveryTime: 0,
Description: [{}],
EAN: '',
ExportDescription: '',
ExportDescriptionMultiLanguage: [{}],
HeightCm: '',
Id: 0,
Images: [
{
ArticleId: 0,
Id: 0,
IsDefault: false,
Position: 0,
ThumbPathExt: '',
ThumbUrl: '',
Url: ''
}
],
InvoiceText: [{}],
IsCustomizable: false,
IsDeactivated: false,
IsDigital: false,
LengthCm: '',
LowStock: false,
Manufacturer: '',
Materials: [{}],
Occasion: 0,
Price: '',
Recipient: 0,
SKU: '',
ShippingProductId: 0,
ShortDescription: [{}],
SoldAmount: '',
SoldAmountLast30Days: '',
SoldSumGross: '',
SoldSumGrossLast30Days: '',
SoldSumNet: '',
SoldSumNetLast30Days: '',
Sources: [
{
ApiAccountId: 0,
ApiAccountName: '',
Custom: {},
ExportFactor: '',
Id: 0,
Source: '',
SourceId: '',
StockSyncInactive: false,
StockSyncMax: '',
StockSyncMin: '',
UnitsPerItem: ''
}
],
StockCode: '',
StockCurrent: '',
StockDesired: '',
StockReduceItemsPerSale: '',
StockWarning: '',
Stocks: [
{
Name: '',
StockCode: '',
StockCurrent: '',
StockDesired: '',
StockId: 0,
StockWarning: '',
UnfulfilledAmount: ''
}
],
Tags: [{}],
TaricNumber: '',
Title: [{}],
Type: 0,
Unit: 0,
UnitsPerItem: '',
Vat1Rate: '',
Vat2Rate: '',
VatIndex: 0,
Weight: 0,
WeightNet: 0,
WidthCm: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/v1/products';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"BasicAttributes":[{"LanguageCode":"","Text":""}],"BillOfMaterial":[{"Amount":"","ArticleId":0,"SKU":""}],"Category1":{"Id":0,"Name":""},"Category2":{},"Category3":{},"Condition":0,"CostPrice":"","CountryOfOrigin":"","CustomFields":[{"ArticleId":0,"Definition":{"Configuration":{},"Id":0,"IsNullable":false,"Name":"","Type":0},"DefinitionId":0,"Id":0,"Value":{}}],"DeliveryTime":0,"Description":[{}],"EAN":"","ExportDescription":"","ExportDescriptionMultiLanguage":[{}],"HeightCm":"","Id":0,"Images":[{"ArticleId":0,"Id":0,"IsDefault":false,"Position":0,"ThumbPathExt":"","ThumbUrl":"","Url":""}],"InvoiceText":[{}],"IsCustomizable":false,"IsDeactivated":false,"IsDigital":false,"LengthCm":"","LowStock":false,"Manufacturer":"","Materials":[{}],"Occasion":0,"Price":"","Recipient":0,"SKU":"","ShippingProductId":0,"ShortDescription":[{}],"SoldAmount":"","SoldAmountLast30Days":"","SoldSumGross":"","SoldSumGrossLast30Days":"","SoldSumNet":"","SoldSumNetLast30Days":"","Sources":[{"ApiAccountId":0,"ApiAccountName":"","Custom":{},"ExportFactor":"","Id":0,"Source":"","SourceId":"","StockSyncInactive":false,"StockSyncMax":"","StockSyncMin":"","UnitsPerItem":""}],"StockCode":"","StockCurrent":"","StockDesired":"","StockReduceItemsPerSale":"","StockWarning":"","Stocks":[{"Name":"","StockCode":"","StockCurrent":"","StockDesired":"","StockId":0,"StockWarning":"","UnfulfilledAmount":""}],"Tags":[{}],"TaricNumber":"","Title":[{}],"Type":0,"Unit":0,"UnitsPerItem":"","Vat1Rate":"","Vat2Rate":"","VatIndex":0,"Weight":0,"WeightNet":0,"WidthCm":""}'
};
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 = @{ @"BasicAttributes": @[ @{ @"LanguageCode": @"", @"Text": @"" } ],
@"BillOfMaterial": @[ @{ @"Amount": @"", @"ArticleId": @0, @"SKU": @"" } ],
@"Category1": @{ @"Id": @0, @"Name": @"" },
@"Category2": @{ },
@"Category3": @{ },
@"Condition": @0,
@"CostPrice": @"",
@"CountryOfOrigin": @"",
@"CustomFields": @[ @{ @"ArticleId": @0, @"Definition": @{ @"Configuration": @{ }, @"Id": @0, @"IsNullable": @NO, @"Name": @"", @"Type": @0 }, @"DefinitionId": @0, @"Id": @0, @"Value": @{ } } ],
@"DeliveryTime": @0,
@"Description": @[ @{ } ],
@"EAN": @"",
@"ExportDescription": @"",
@"ExportDescriptionMultiLanguage": @[ @{ } ],
@"HeightCm": @"",
@"Id": @0,
@"Images": @[ @{ @"ArticleId": @0, @"Id": @0, @"IsDefault": @NO, @"Position": @0, @"ThumbPathExt": @"", @"ThumbUrl": @"", @"Url": @"" } ],
@"InvoiceText": @[ @{ } ],
@"IsCustomizable": @NO,
@"IsDeactivated": @NO,
@"IsDigital": @NO,
@"LengthCm": @"",
@"LowStock": @NO,
@"Manufacturer": @"",
@"Materials": @[ @{ } ],
@"Occasion": @0,
@"Price": @"",
@"Recipient": @0,
@"SKU": @"",
@"ShippingProductId": @0,
@"ShortDescription": @[ @{ } ],
@"SoldAmount": @"",
@"SoldAmountLast30Days": @"",
@"SoldSumGross": @"",
@"SoldSumGrossLast30Days": @"",
@"SoldSumNet": @"",
@"SoldSumNetLast30Days": @"",
@"Sources": @[ @{ @"ApiAccountId": @0, @"ApiAccountName": @"", @"Custom": @{ }, @"ExportFactor": @"", @"Id": @0, @"Source": @"", @"SourceId": @"", @"StockSyncInactive": @NO, @"StockSyncMax": @"", @"StockSyncMin": @"", @"UnitsPerItem": @"" } ],
@"StockCode": @"",
@"StockCurrent": @"",
@"StockDesired": @"",
@"StockReduceItemsPerSale": @"",
@"StockWarning": @"",
@"Stocks": @[ @{ @"Name": @"", @"StockCode": @"", @"StockCurrent": @"", @"StockDesired": @"", @"StockId": @0, @"StockWarning": @"", @"UnfulfilledAmount": @"" } ],
@"Tags": @[ @{ } ],
@"TaricNumber": @"",
@"Title": @[ @{ } ],
@"Type": @0,
@"Unit": @0,
@"UnitsPerItem": @"",
@"Vat1Rate": @"",
@"Vat2Rate": @"",
@"VatIndex": @0,
@"Weight": @0,
@"WeightNet": @0,
@"WidthCm": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/api/v1/products"]
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}}/api/v1/products" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"BasicAttributes\": [\n {\n \"LanguageCode\": \"\",\n \"Text\": \"\"\n }\n ],\n \"BillOfMaterial\": [\n {\n \"Amount\": \"\",\n \"ArticleId\": 0,\n \"SKU\": \"\"\n }\n ],\n \"Category1\": {\n \"Id\": 0,\n \"Name\": \"\"\n },\n \"Category2\": {},\n \"Category3\": {},\n \"Condition\": 0,\n \"CostPrice\": \"\",\n \"CountryOfOrigin\": \"\",\n \"CustomFields\": [\n {\n \"ArticleId\": 0,\n \"Definition\": {\n \"Configuration\": {},\n \"Id\": 0,\n \"IsNullable\": false,\n \"Name\": \"\",\n \"Type\": 0\n },\n \"DefinitionId\": 0,\n \"Id\": 0,\n \"Value\": {}\n }\n ],\n \"DeliveryTime\": 0,\n \"Description\": [\n {}\n ],\n \"EAN\": \"\",\n \"ExportDescription\": \"\",\n \"ExportDescriptionMultiLanguage\": [\n {}\n ],\n \"HeightCm\": \"\",\n \"Id\": 0,\n \"Images\": [\n {\n \"ArticleId\": 0,\n \"Id\": 0,\n \"IsDefault\": false,\n \"Position\": 0,\n \"ThumbPathExt\": \"\",\n \"ThumbUrl\": \"\",\n \"Url\": \"\"\n }\n ],\n \"InvoiceText\": [\n {}\n ],\n \"IsCustomizable\": false,\n \"IsDeactivated\": false,\n \"IsDigital\": false,\n \"LengthCm\": \"\",\n \"LowStock\": false,\n \"Manufacturer\": \"\",\n \"Materials\": [\n {}\n ],\n \"Occasion\": 0,\n \"Price\": \"\",\n \"Recipient\": 0,\n \"SKU\": \"\",\n \"ShippingProductId\": 0,\n \"ShortDescription\": [\n {}\n ],\n \"SoldAmount\": \"\",\n \"SoldAmountLast30Days\": \"\",\n \"SoldSumGross\": \"\",\n \"SoldSumGrossLast30Days\": \"\",\n \"SoldSumNet\": \"\",\n \"SoldSumNetLast30Days\": \"\",\n \"Sources\": [\n {\n \"ApiAccountId\": 0,\n \"ApiAccountName\": \"\",\n \"Custom\": {},\n \"ExportFactor\": \"\",\n \"Id\": 0,\n \"Source\": \"\",\n \"SourceId\": \"\",\n \"StockSyncInactive\": false,\n \"StockSyncMax\": \"\",\n \"StockSyncMin\": \"\",\n \"UnitsPerItem\": \"\"\n }\n ],\n \"StockCode\": \"\",\n \"StockCurrent\": \"\",\n \"StockDesired\": \"\",\n \"StockReduceItemsPerSale\": \"\",\n \"StockWarning\": \"\",\n \"Stocks\": [\n {\n \"Name\": \"\",\n \"StockCode\": \"\",\n \"StockCurrent\": \"\",\n \"StockDesired\": \"\",\n \"StockId\": 0,\n \"StockWarning\": \"\",\n \"UnfulfilledAmount\": \"\"\n }\n ],\n \"Tags\": [\n {}\n ],\n \"TaricNumber\": \"\",\n \"Title\": [\n {}\n ],\n \"Type\": 0,\n \"Unit\": 0,\n \"UnitsPerItem\": \"\",\n \"Vat1Rate\": \"\",\n \"Vat2Rate\": \"\",\n \"VatIndex\": 0,\n \"Weight\": 0,\n \"WeightNet\": 0,\n \"WidthCm\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/v1/products",
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([
'BasicAttributes' => [
[
'LanguageCode' => '',
'Text' => ''
]
],
'BillOfMaterial' => [
[
'Amount' => '',
'ArticleId' => 0,
'SKU' => ''
]
],
'Category1' => [
'Id' => 0,
'Name' => ''
],
'Category2' => [
],
'Category3' => [
],
'Condition' => 0,
'CostPrice' => '',
'CountryOfOrigin' => '',
'CustomFields' => [
[
'ArticleId' => 0,
'Definition' => [
'Configuration' => [
],
'Id' => 0,
'IsNullable' => null,
'Name' => '',
'Type' => 0
],
'DefinitionId' => 0,
'Id' => 0,
'Value' => [
]
]
],
'DeliveryTime' => 0,
'Description' => [
[
]
],
'EAN' => '',
'ExportDescription' => '',
'ExportDescriptionMultiLanguage' => [
[
]
],
'HeightCm' => '',
'Id' => 0,
'Images' => [
[
'ArticleId' => 0,
'Id' => 0,
'IsDefault' => null,
'Position' => 0,
'ThumbPathExt' => '',
'ThumbUrl' => '',
'Url' => ''
]
],
'InvoiceText' => [
[
]
],
'IsCustomizable' => null,
'IsDeactivated' => null,
'IsDigital' => null,
'LengthCm' => '',
'LowStock' => null,
'Manufacturer' => '',
'Materials' => [
[
]
],
'Occasion' => 0,
'Price' => '',
'Recipient' => 0,
'SKU' => '',
'ShippingProductId' => 0,
'ShortDescription' => [
[
]
],
'SoldAmount' => '',
'SoldAmountLast30Days' => '',
'SoldSumGross' => '',
'SoldSumGrossLast30Days' => '',
'SoldSumNet' => '',
'SoldSumNetLast30Days' => '',
'Sources' => [
[
'ApiAccountId' => 0,
'ApiAccountName' => '',
'Custom' => [
],
'ExportFactor' => '',
'Id' => 0,
'Source' => '',
'SourceId' => '',
'StockSyncInactive' => null,
'StockSyncMax' => '',
'StockSyncMin' => '',
'UnitsPerItem' => ''
]
],
'StockCode' => '',
'StockCurrent' => '',
'StockDesired' => '',
'StockReduceItemsPerSale' => '',
'StockWarning' => '',
'Stocks' => [
[
'Name' => '',
'StockCode' => '',
'StockCurrent' => '',
'StockDesired' => '',
'StockId' => 0,
'StockWarning' => '',
'UnfulfilledAmount' => ''
]
],
'Tags' => [
[
]
],
'TaricNumber' => '',
'Title' => [
[
]
],
'Type' => 0,
'Unit' => 0,
'UnitsPerItem' => '',
'Vat1Rate' => '',
'Vat2Rate' => '',
'VatIndex' => 0,
'Weight' => 0,
'WeightNet' => 0,
'WidthCm' => ''
]),
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}}/api/v1/products', [
'body' => '{
"BasicAttributes": [
{
"LanguageCode": "",
"Text": ""
}
],
"BillOfMaterial": [
{
"Amount": "",
"ArticleId": 0,
"SKU": ""
}
],
"Category1": {
"Id": 0,
"Name": ""
},
"Category2": {},
"Category3": {},
"Condition": 0,
"CostPrice": "",
"CountryOfOrigin": "",
"CustomFields": [
{
"ArticleId": 0,
"Definition": {
"Configuration": {},
"Id": 0,
"IsNullable": false,
"Name": "",
"Type": 0
},
"DefinitionId": 0,
"Id": 0,
"Value": {}
}
],
"DeliveryTime": 0,
"Description": [
{}
],
"EAN": "",
"ExportDescription": "",
"ExportDescriptionMultiLanguage": [
{}
],
"HeightCm": "",
"Id": 0,
"Images": [
{
"ArticleId": 0,
"Id": 0,
"IsDefault": false,
"Position": 0,
"ThumbPathExt": "",
"ThumbUrl": "",
"Url": ""
}
],
"InvoiceText": [
{}
],
"IsCustomizable": false,
"IsDeactivated": false,
"IsDigital": false,
"LengthCm": "",
"LowStock": false,
"Manufacturer": "",
"Materials": [
{}
],
"Occasion": 0,
"Price": "",
"Recipient": 0,
"SKU": "",
"ShippingProductId": 0,
"ShortDescription": [
{}
],
"SoldAmount": "",
"SoldAmountLast30Days": "",
"SoldSumGross": "",
"SoldSumGrossLast30Days": "",
"SoldSumNet": "",
"SoldSumNetLast30Days": "",
"Sources": [
{
"ApiAccountId": 0,
"ApiAccountName": "",
"Custom": {},
"ExportFactor": "",
"Id": 0,
"Source": "",
"SourceId": "",
"StockSyncInactive": false,
"StockSyncMax": "",
"StockSyncMin": "",
"UnitsPerItem": ""
}
],
"StockCode": "",
"StockCurrent": "",
"StockDesired": "",
"StockReduceItemsPerSale": "",
"StockWarning": "",
"Stocks": [
{
"Name": "",
"StockCode": "",
"StockCurrent": "",
"StockDesired": "",
"StockId": 0,
"StockWarning": "",
"UnfulfilledAmount": ""
}
],
"Tags": [
{}
],
"TaricNumber": "",
"Title": [
{}
],
"Type": 0,
"Unit": 0,
"UnitsPerItem": "",
"Vat1Rate": "",
"Vat2Rate": "",
"VatIndex": 0,
"Weight": 0,
"WeightNet": 0,
"WidthCm": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/api/v1/products');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'BasicAttributes' => [
[
'LanguageCode' => '',
'Text' => ''
]
],
'BillOfMaterial' => [
[
'Amount' => '',
'ArticleId' => 0,
'SKU' => ''
]
],
'Category1' => [
'Id' => 0,
'Name' => ''
],
'Category2' => [
],
'Category3' => [
],
'Condition' => 0,
'CostPrice' => '',
'CountryOfOrigin' => '',
'CustomFields' => [
[
'ArticleId' => 0,
'Definition' => [
'Configuration' => [
],
'Id' => 0,
'IsNullable' => null,
'Name' => '',
'Type' => 0
],
'DefinitionId' => 0,
'Id' => 0,
'Value' => [
]
]
],
'DeliveryTime' => 0,
'Description' => [
[
]
],
'EAN' => '',
'ExportDescription' => '',
'ExportDescriptionMultiLanguage' => [
[
]
],
'HeightCm' => '',
'Id' => 0,
'Images' => [
[
'ArticleId' => 0,
'Id' => 0,
'IsDefault' => null,
'Position' => 0,
'ThumbPathExt' => '',
'ThumbUrl' => '',
'Url' => ''
]
],
'InvoiceText' => [
[
]
],
'IsCustomizable' => null,
'IsDeactivated' => null,
'IsDigital' => null,
'LengthCm' => '',
'LowStock' => null,
'Manufacturer' => '',
'Materials' => [
[
]
],
'Occasion' => 0,
'Price' => '',
'Recipient' => 0,
'SKU' => '',
'ShippingProductId' => 0,
'ShortDescription' => [
[
]
],
'SoldAmount' => '',
'SoldAmountLast30Days' => '',
'SoldSumGross' => '',
'SoldSumGrossLast30Days' => '',
'SoldSumNet' => '',
'SoldSumNetLast30Days' => '',
'Sources' => [
[
'ApiAccountId' => 0,
'ApiAccountName' => '',
'Custom' => [
],
'ExportFactor' => '',
'Id' => 0,
'Source' => '',
'SourceId' => '',
'StockSyncInactive' => null,
'StockSyncMax' => '',
'StockSyncMin' => '',
'UnitsPerItem' => ''
]
],
'StockCode' => '',
'StockCurrent' => '',
'StockDesired' => '',
'StockReduceItemsPerSale' => '',
'StockWarning' => '',
'Stocks' => [
[
'Name' => '',
'StockCode' => '',
'StockCurrent' => '',
'StockDesired' => '',
'StockId' => 0,
'StockWarning' => '',
'UnfulfilledAmount' => ''
]
],
'Tags' => [
[
]
],
'TaricNumber' => '',
'Title' => [
[
]
],
'Type' => 0,
'Unit' => 0,
'UnitsPerItem' => '',
'Vat1Rate' => '',
'Vat2Rate' => '',
'VatIndex' => 0,
'Weight' => 0,
'WeightNet' => 0,
'WidthCm' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'BasicAttributes' => [
[
'LanguageCode' => '',
'Text' => ''
]
],
'BillOfMaterial' => [
[
'Amount' => '',
'ArticleId' => 0,
'SKU' => ''
]
],
'Category1' => [
'Id' => 0,
'Name' => ''
],
'Category2' => [
],
'Category3' => [
],
'Condition' => 0,
'CostPrice' => '',
'CountryOfOrigin' => '',
'CustomFields' => [
[
'ArticleId' => 0,
'Definition' => [
'Configuration' => [
],
'Id' => 0,
'IsNullable' => null,
'Name' => '',
'Type' => 0
],
'DefinitionId' => 0,
'Id' => 0,
'Value' => [
]
]
],
'DeliveryTime' => 0,
'Description' => [
[
]
],
'EAN' => '',
'ExportDescription' => '',
'ExportDescriptionMultiLanguage' => [
[
]
],
'HeightCm' => '',
'Id' => 0,
'Images' => [
[
'ArticleId' => 0,
'Id' => 0,
'IsDefault' => null,
'Position' => 0,
'ThumbPathExt' => '',
'ThumbUrl' => '',
'Url' => ''
]
],
'InvoiceText' => [
[
]
],
'IsCustomizable' => null,
'IsDeactivated' => null,
'IsDigital' => null,
'LengthCm' => '',
'LowStock' => null,
'Manufacturer' => '',
'Materials' => [
[
]
],
'Occasion' => 0,
'Price' => '',
'Recipient' => 0,
'SKU' => '',
'ShippingProductId' => 0,
'ShortDescription' => [
[
]
],
'SoldAmount' => '',
'SoldAmountLast30Days' => '',
'SoldSumGross' => '',
'SoldSumGrossLast30Days' => '',
'SoldSumNet' => '',
'SoldSumNetLast30Days' => '',
'Sources' => [
[
'ApiAccountId' => 0,
'ApiAccountName' => '',
'Custom' => [
],
'ExportFactor' => '',
'Id' => 0,
'Source' => '',
'SourceId' => '',
'StockSyncInactive' => null,
'StockSyncMax' => '',
'StockSyncMin' => '',
'UnitsPerItem' => ''
]
],
'StockCode' => '',
'StockCurrent' => '',
'StockDesired' => '',
'StockReduceItemsPerSale' => '',
'StockWarning' => '',
'Stocks' => [
[
'Name' => '',
'StockCode' => '',
'StockCurrent' => '',
'StockDesired' => '',
'StockId' => 0,
'StockWarning' => '',
'UnfulfilledAmount' => ''
]
],
'Tags' => [
[
]
],
'TaricNumber' => '',
'Title' => [
[
]
],
'Type' => 0,
'Unit' => 0,
'UnitsPerItem' => '',
'Vat1Rate' => '',
'Vat2Rate' => '',
'VatIndex' => 0,
'Weight' => 0,
'WeightNet' => 0,
'WidthCm' => ''
]));
$request->setRequestUrl('{{baseUrl}}/api/v1/products');
$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}}/api/v1/products' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"BasicAttributes": [
{
"LanguageCode": "",
"Text": ""
}
],
"BillOfMaterial": [
{
"Amount": "",
"ArticleId": 0,
"SKU": ""
}
],
"Category1": {
"Id": 0,
"Name": ""
},
"Category2": {},
"Category3": {},
"Condition": 0,
"CostPrice": "",
"CountryOfOrigin": "",
"CustomFields": [
{
"ArticleId": 0,
"Definition": {
"Configuration": {},
"Id": 0,
"IsNullable": false,
"Name": "",
"Type": 0
},
"DefinitionId": 0,
"Id": 0,
"Value": {}
}
],
"DeliveryTime": 0,
"Description": [
{}
],
"EAN": "",
"ExportDescription": "",
"ExportDescriptionMultiLanguage": [
{}
],
"HeightCm": "",
"Id": 0,
"Images": [
{
"ArticleId": 0,
"Id": 0,
"IsDefault": false,
"Position": 0,
"ThumbPathExt": "",
"ThumbUrl": "",
"Url": ""
}
],
"InvoiceText": [
{}
],
"IsCustomizable": false,
"IsDeactivated": false,
"IsDigital": false,
"LengthCm": "",
"LowStock": false,
"Manufacturer": "",
"Materials": [
{}
],
"Occasion": 0,
"Price": "",
"Recipient": 0,
"SKU": "",
"ShippingProductId": 0,
"ShortDescription": [
{}
],
"SoldAmount": "",
"SoldAmountLast30Days": "",
"SoldSumGross": "",
"SoldSumGrossLast30Days": "",
"SoldSumNet": "",
"SoldSumNetLast30Days": "",
"Sources": [
{
"ApiAccountId": 0,
"ApiAccountName": "",
"Custom": {},
"ExportFactor": "",
"Id": 0,
"Source": "",
"SourceId": "",
"StockSyncInactive": false,
"StockSyncMax": "",
"StockSyncMin": "",
"UnitsPerItem": ""
}
],
"StockCode": "",
"StockCurrent": "",
"StockDesired": "",
"StockReduceItemsPerSale": "",
"StockWarning": "",
"Stocks": [
{
"Name": "",
"StockCode": "",
"StockCurrent": "",
"StockDesired": "",
"StockId": 0,
"StockWarning": "",
"UnfulfilledAmount": ""
}
],
"Tags": [
{}
],
"TaricNumber": "",
"Title": [
{}
],
"Type": 0,
"Unit": 0,
"UnitsPerItem": "",
"Vat1Rate": "",
"Vat2Rate": "",
"VatIndex": 0,
"Weight": 0,
"WeightNet": 0,
"WidthCm": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/v1/products' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"BasicAttributes": [
{
"LanguageCode": "",
"Text": ""
}
],
"BillOfMaterial": [
{
"Amount": "",
"ArticleId": 0,
"SKU": ""
}
],
"Category1": {
"Id": 0,
"Name": ""
},
"Category2": {},
"Category3": {},
"Condition": 0,
"CostPrice": "",
"CountryOfOrigin": "",
"CustomFields": [
{
"ArticleId": 0,
"Definition": {
"Configuration": {},
"Id": 0,
"IsNullable": false,
"Name": "",
"Type": 0
},
"DefinitionId": 0,
"Id": 0,
"Value": {}
}
],
"DeliveryTime": 0,
"Description": [
{}
],
"EAN": "",
"ExportDescription": "",
"ExportDescriptionMultiLanguage": [
{}
],
"HeightCm": "",
"Id": 0,
"Images": [
{
"ArticleId": 0,
"Id": 0,
"IsDefault": false,
"Position": 0,
"ThumbPathExt": "",
"ThumbUrl": "",
"Url": ""
}
],
"InvoiceText": [
{}
],
"IsCustomizable": false,
"IsDeactivated": false,
"IsDigital": false,
"LengthCm": "",
"LowStock": false,
"Manufacturer": "",
"Materials": [
{}
],
"Occasion": 0,
"Price": "",
"Recipient": 0,
"SKU": "",
"ShippingProductId": 0,
"ShortDescription": [
{}
],
"SoldAmount": "",
"SoldAmountLast30Days": "",
"SoldSumGross": "",
"SoldSumGrossLast30Days": "",
"SoldSumNet": "",
"SoldSumNetLast30Days": "",
"Sources": [
{
"ApiAccountId": 0,
"ApiAccountName": "",
"Custom": {},
"ExportFactor": "",
"Id": 0,
"Source": "",
"SourceId": "",
"StockSyncInactive": false,
"StockSyncMax": "",
"StockSyncMin": "",
"UnitsPerItem": ""
}
],
"StockCode": "",
"StockCurrent": "",
"StockDesired": "",
"StockReduceItemsPerSale": "",
"StockWarning": "",
"Stocks": [
{
"Name": "",
"StockCode": "",
"StockCurrent": "",
"StockDesired": "",
"StockId": 0,
"StockWarning": "",
"UnfulfilledAmount": ""
}
],
"Tags": [
{}
],
"TaricNumber": "",
"Title": [
{}
],
"Type": 0,
"Unit": 0,
"UnitsPerItem": "",
"Vat1Rate": "",
"Vat2Rate": "",
"VatIndex": 0,
"Weight": 0,
"WeightNet": 0,
"WidthCm": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"BasicAttributes\": [\n {\n \"LanguageCode\": \"\",\n \"Text\": \"\"\n }\n ],\n \"BillOfMaterial\": [\n {\n \"Amount\": \"\",\n \"ArticleId\": 0,\n \"SKU\": \"\"\n }\n ],\n \"Category1\": {\n \"Id\": 0,\n \"Name\": \"\"\n },\n \"Category2\": {},\n \"Category3\": {},\n \"Condition\": 0,\n \"CostPrice\": \"\",\n \"CountryOfOrigin\": \"\",\n \"CustomFields\": [\n {\n \"ArticleId\": 0,\n \"Definition\": {\n \"Configuration\": {},\n \"Id\": 0,\n \"IsNullable\": false,\n \"Name\": \"\",\n \"Type\": 0\n },\n \"DefinitionId\": 0,\n \"Id\": 0,\n \"Value\": {}\n }\n ],\n \"DeliveryTime\": 0,\n \"Description\": [\n {}\n ],\n \"EAN\": \"\",\n \"ExportDescription\": \"\",\n \"ExportDescriptionMultiLanguage\": [\n {}\n ],\n \"HeightCm\": \"\",\n \"Id\": 0,\n \"Images\": [\n {\n \"ArticleId\": 0,\n \"Id\": 0,\n \"IsDefault\": false,\n \"Position\": 0,\n \"ThumbPathExt\": \"\",\n \"ThumbUrl\": \"\",\n \"Url\": \"\"\n }\n ],\n \"InvoiceText\": [\n {}\n ],\n \"IsCustomizable\": false,\n \"IsDeactivated\": false,\n \"IsDigital\": false,\n \"LengthCm\": \"\",\n \"LowStock\": false,\n \"Manufacturer\": \"\",\n \"Materials\": [\n {}\n ],\n \"Occasion\": 0,\n \"Price\": \"\",\n \"Recipient\": 0,\n \"SKU\": \"\",\n \"ShippingProductId\": 0,\n \"ShortDescription\": [\n {}\n ],\n \"SoldAmount\": \"\",\n \"SoldAmountLast30Days\": \"\",\n \"SoldSumGross\": \"\",\n \"SoldSumGrossLast30Days\": \"\",\n \"SoldSumNet\": \"\",\n \"SoldSumNetLast30Days\": \"\",\n \"Sources\": [\n {\n \"ApiAccountId\": 0,\n \"ApiAccountName\": \"\",\n \"Custom\": {},\n \"ExportFactor\": \"\",\n \"Id\": 0,\n \"Source\": \"\",\n \"SourceId\": \"\",\n \"StockSyncInactive\": false,\n \"StockSyncMax\": \"\",\n \"StockSyncMin\": \"\",\n \"UnitsPerItem\": \"\"\n }\n ],\n \"StockCode\": \"\",\n \"StockCurrent\": \"\",\n \"StockDesired\": \"\",\n \"StockReduceItemsPerSale\": \"\",\n \"StockWarning\": \"\",\n \"Stocks\": [\n {\n \"Name\": \"\",\n \"StockCode\": \"\",\n \"StockCurrent\": \"\",\n \"StockDesired\": \"\",\n \"StockId\": 0,\n \"StockWarning\": \"\",\n \"UnfulfilledAmount\": \"\"\n }\n ],\n \"Tags\": [\n {}\n ],\n \"TaricNumber\": \"\",\n \"Title\": [\n {}\n ],\n \"Type\": 0,\n \"Unit\": 0,\n \"UnitsPerItem\": \"\",\n \"Vat1Rate\": \"\",\n \"Vat2Rate\": \"\",\n \"VatIndex\": 0,\n \"Weight\": 0,\n \"WeightNet\": 0,\n \"WidthCm\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/api/v1/products", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/v1/products"
payload = {
"BasicAttributes": [
{
"LanguageCode": "",
"Text": ""
}
],
"BillOfMaterial": [
{
"Amount": "",
"ArticleId": 0,
"SKU": ""
}
],
"Category1": {
"Id": 0,
"Name": ""
},
"Category2": {},
"Category3": {},
"Condition": 0,
"CostPrice": "",
"CountryOfOrigin": "",
"CustomFields": [
{
"ArticleId": 0,
"Definition": {
"Configuration": {},
"Id": 0,
"IsNullable": False,
"Name": "",
"Type": 0
},
"DefinitionId": 0,
"Id": 0,
"Value": {}
}
],
"DeliveryTime": 0,
"Description": [{}],
"EAN": "",
"ExportDescription": "",
"ExportDescriptionMultiLanguage": [{}],
"HeightCm": "",
"Id": 0,
"Images": [
{
"ArticleId": 0,
"Id": 0,
"IsDefault": False,
"Position": 0,
"ThumbPathExt": "",
"ThumbUrl": "",
"Url": ""
}
],
"InvoiceText": [{}],
"IsCustomizable": False,
"IsDeactivated": False,
"IsDigital": False,
"LengthCm": "",
"LowStock": False,
"Manufacturer": "",
"Materials": [{}],
"Occasion": 0,
"Price": "",
"Recipient": 0,
"SKU": "",
"ShippingProductId": 0,
"ShortDescription": [{}],
"SoldAmount": "",
"SoldAmountLast30Days": "",
"SoldSumGross": "",
"SoldSumGrossLast30Days": "",
"SoldSumNet": "",
"SoldSumNetLast30Days": "",
"Sources": [
{
"ApiAccountId": 0,
"ApiAccountName": "",
"Custom": {},
"ExportFactor": "",
"Id": 0,
"Source": "",
"SourceId": "",
"StockSyncInactive": False,
"StockSyncMax": "",
"StockSyncMin": "",
"UnitsPerItem": ""
}
],
"StockCode": "",
"StockCurrent": "",
"StockDesired": "",
"StockReduceItemsPerSale": "",
"StockWarning": "",
"Stocks": [
{
"Name": "",
"StockCode": "",
"StockCurrent": "",
"StockDesired": "",
"StockId": 0,
"StockWarning": "",
"UnfulfilledAmount": ""
}
],
"Tags": [{}],
"TaricNumber": "",
"Title": [{}],
"Type": 0,
"Unit": 0,
"UnitsPerItem": "",
"Vat1Rate": "",
"Vat2Rate": "",
"VatIndex": 0,
"Weight": 0,
"WeightNet": 0,
"WidthCm": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/v1/products"
payload <- "{\n \"BasicAttributes\": [\n {\n \"LanguageCode\": \"\",\n \"Text\": \"\"\n }\n ],\n \"BillOfMaterial\": [\n {\n \"Amount\": \"\",\n \"ArticleId\": 0,\n \"SKU\": \"\"\n }\n ],\n \"Category1\": {\n \"Id\": 0,\n \"Name\": \"\"\n },\n \"Category2\": {},\n \"Category3\": {},\n \"Condition\": 0,\n \"CostPrice\": \"\",\n \"CountryOfOrigin\": \"\",\n \"CustomFields\": [\n {\n \"ArticleId\": 0,\n \"Definition\": {\n \"Configuration\": {},\n \"Id\": 0,\n \"IsNullable\": false,\n \"Name\": \"\",\n \"Type\": 0\n },\n \"DefinitionId\": 0,\n \"Id\": 0,\n \"Value\": {}\n }\n ],\n \"DeliveryTime\": 0,\n \"Description\": [\n {}\n ],\n \"EAN\": \"\",\n \"ExportDescription\": \"\",\n \"ExportDescriptionMultiLanguage\": [\n {}\n ],\n \"HeightCm\": \"\",\n \"Id\": 0,\n \"Images\": [\n {\n \"ArticleId\": 0,\n \"Id\": 0,\n \"IsDefault\": false,\n \"Position\": 0,\n \"ThumbPathExt\": \"\",\n \"ThumbUrl\": \"\",\n \"Url\": \"\"\n }\n ],\n \"InvoiceText\": [\n {}\n ],\n \"IsCustomizable\": false,\n \"IsDeactivated\": false,\n \"IsDigital\": false,\n \"LengthCm\": \"\",\n \"LowStock\": false,\n \"Manufacturer\": \"\",\n \"Materials\": [\n {}\n ],\n \"Occasion\": 0,\n \"Price\": \"\",\n \"Recipient\": 0,\n \"SKU\": \"\",\n \"ShippingProductId\": 0,\n \"ShortDescription\": [\n {}\n ],\n \"SoldAmount\": \"\",\n \"SoldAmountLast30Days\": \"\",\n \"SoldSumGross\": \"\",\n \"SoldSumGrossLast30Days\": \"\",\n \"SoldSumNet\": \"\",\n \"SoldSumNetLast30Days\": \"\",\n \"Sources\": [\n {\n \"ApiAccountId\": 0,\n \"ApiAccountName\": \"\",\n \"Custom\": {},\n \"ExportFactor\": \"\",\n \"Id\": 0,\n \"Source\": \"\",\n \"SourceId\": \"\",\n \"StockSyncInactive\": false,\n \"StockSyncMax\": \"\",\n \"StockSyncMin\": \"\",\n \"UnitsPerItem\": \"\"\n }\n ],\n \"StockCode\": \"\",\n \"StockCurrent\": \"\",\n \"StockDesired\": \"\",\n \"StockReduceItemsPerSale\": \"\",\n \"StockWarning\": \"\",\n \"Stocks\": [\n {\n \"Name\": \"\",\n \"StockCode\": \"\",\n \"StockCurrent\": \"\",\n \"StockDesired\": \"\",\n \"StockId\": 0,\n \"StockWarning\": \"\",\n \"UnfulfilledAmount\": \"\"\n }\n ],\n \"Tags\": [\n {}\n ],\n \"TaricNumber\": \"\",\n \"Title\": [\n {}\n ],\n \"Type\": 0,\n \"Unit\": 0,\n \"UnitsPerItem\": \"\",\n \"Vat1Rate\": \"\",\n \"Vat2Rate\": \"\",\n \"VatIndex\": 0,\n \"Weight\": 0,\n \"WeightNet\": 0,\n \"WidthCm\": \"\"\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}}/api/v1/products")
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 \"BasicAttributes\": [\n {\n \"LanguageCode\": \"\",\n \"Text\": \"\"\n }\n ],\n \"BillOfMaterial\": [\n {\n \"Amount\": \"\",\n \"ArticleId\": 0,\n \"SKU\": \"\"\n }\n ],\n \"Category1\": {\n \"Id\": 0,\n \"Name\": \"\"\n },\n \"Category2\": {},\n \"Category3\": {},\n \"Condition\": 0,\n \"CostPrice\": \"\",\n \"CountryOfOrigin\": \"\",\n \"CustomFields\": [\n {\n \"ArticleId\": 0,\n \"Definition\": {\n \"Configuration\": {},\n \"Id\": 0,\n \"IsNullable\": false,\n \"Name\": \"\",\n \"Type\": 0\n },\n \"DefinitionId\": 0,\n \"Id\": 0,\n \"Value\": {}\n }\n ],\n \"DeliveryTime\": 0,\n \"Description\": [\n {}\n ],\n \"EAN\": \"\",\n \"ExportDescription\": \"\",\n \"ExportDescriptionMultiLanguage\": [\n {}\n ],\n \"HeightCm\": \"\",\n \"Id\": 0,\n \"Images\": [\n {\n \"ArticleId\": 0,\n \"Id\": 0,\n \"IsDefault\": false,\n \"Position\": 0,\n \"ThumbPathExt\": \"\",\n \"ThumbUrl\": \"\",\n \"Url\": \"\"\n }\n ],\n \"InvoiceText\": [\n {}\n ],\n \"IsCustomizable\": false,\n \"IsDeactivated\": false,\n \"IsDigital\": false,\n \"LengthCm\": \"\",\n \"LowStock\": false,\n \"Manufacturer\": \"\",\n \"Materials\": [\n {}\n ],\n \"Occasion\": 0,\n \"Price\": \"\",\n \"Recipient\": 0,\n \"SKU\": \"\",\n \"ShippingProductId\": 0,\n \"ShortDescription\": [\n {}\n ],\n \"SoldAmount\": \"\",\n \"SoldAmountLast30Days\": \"\",\n \"SoldSumGross\": \"\",\n \"SoldSumGrossLast30Days\": \"\",\n \"SoldSumNet\": \"\",\n \"SoldSumNetLast30Days\": \"\",\n \"Sources\": [\n {\n \"ApiAccountId\": 0,\n \"ApiAccountName\": \"\",\n \"Custom\": {},\n \"ExportFactor\": \"\",\n \"Id\": 0,\n \"Source\": \"\",\n \"SourceId\": \"\",\n \"StockSyncInactive\": false,\n \"StockSyncMax\": \"\",\n \"StockSyncMin\": \"\",\n \"UnitsPerItem\": \"\"\n }\n ],\n \"StockCode\": \"\",\n \"StockCurrent\": \"\",\n \"StockDesired\": \"\",\n \"StockReduceItemsPerSale\": \"\",\n \"StockWarning\": \"\",\n \"Stocks\": [\n {\n \"Name\": \"\",\n \"StockCode\": \"\",\n \"StockCurrent\": \"\",\n \"StockDesired\": \"\",\n \"StockId\": 0,\n \"StockWarning\": \"\",\n \"UnfulfilledAmount\": \"\"\n }\n ],\n \"Tags\": [\n {}\n ],\n \"TaricNumber\": \"\",\n \"Title\": [\n {}\n ],\n \"Type\": 0,\n \"Unit\": 0,\n \"UnitsPerItem\": \"\",\n \"Vat1Rate\": \"\",\n \"Vat2Rate\": \"\",\n \"VatIndex\": 0,\n \"Weight\": 0,\n \"WeightNet\": 0,\n \"WidthCm\": \"\"\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/api/v1/products') do |req|
req.body = "{\n \"BasicAttributes\": [\n {\n \"LanguageCode\": \"\",\n \"Text\": \"\"\n }\n ],\n \"BillOfMaterial\": [\n {\n \"Amount\": \"\",\n \"ArticleId\": 0,\n \"SKU\": \"\"\n }\n ],\n \"Category1\": {\n \"Id\": 0,\n \"Name\": \"\"\n },\n \"Category2\": {},\n \"Category3\": {},\n \"Condition\": 0,\n \"CostPrice\": \"\",\n \"CountryOfOrigin\": \"\",\n \"CustomFields\": [\n {\n \"ArticleId\": 0,\n \"Definition\": {\n \"Configuration\": {},\n \"Id\": 0,\n \"IsNullable\": false,\n \"Name\": \"\",\n \"Type\": 0\n },\n \"DefinitionId\": 0,\n \"Id\": 0,\n \"Value\": {}\n }\n ],\n \"DeliveryTime\": 0,\n \"Description\": [\n {}\n ],\n \"EAN\": \"\",\n \"ExportDescription\": \"\",\n \"ExportDescriptionMultiLanguage\": [\n {}\n ],\n \"HeightCm\": \"\",\n \"Id\": 0,\n \"Images\": [\n {\n \"ArticleId\": 0,\n \"Id\": 0,\n \"IsDefault\": false,\n \"Position\": 0,\n \"ThumbPathExt\": \"\",\n \"ThumbUrl\": \"\",\n \"Url\": \"\"\n }\n ],\n \"InvoiceText\": [\n {}\n ],\n \"IsCustomizable\": false,\n \"IsDeactivated\": false,\n \"IsDigital\": false,\n \"LengthCm\": \"\",\n \"LowStock\": false,\n \"Manufacturer\": \"\",\n \"Materials\": [\n {}\n ],\n \"Occasion\": 0,\n \"Price\": \"\",\n \"Recipient\": 0,\n \"SKU\": \"\",\n \"ShippingProductId\": 0,\n \"ShortDescription\": [\n {}\n ],\n \"SoldAmount\": \"\",\n \"SoldAmountLast30Days\": \"\",\n \"SoldSumGross\": \"\",\n \"SoldSumGrossLast30Days\": \"\",\n \"SoldSumNet\": \"\",\n \"SoldSumNetLast30Days\": \"\",\n \"Sources\": [\n {\n \"ApiAccountId\": 0,\n \"ApiAccountName\": \"\",\n \"Custom\": {},\n \"ExportFactor\": \"\",\n \"Id\": 0,\n \"Source\": \"\",\n \"SourceId\": \"\",\n \"StockSyncInactive\": false,\n \"StockSyncMax\": \"\",\n \"StockSyncMin\": \"\",\n \"UnitsPerItem\": \"\"\n }\n ],\n \"StockCode\": \"\",\n \"StockCurrent\": \"\",\n \"StockDesired\": \"\",\n \"StockReduceItemsPerSale\": \"\",\n \"StockWarning\": \"\",\n \"Stocks\": [\n {\n \"Name\": \"\",\n \"StockCode\": \"\",\n \"StockCurrent\": \"\",\n \"StockDesired\": \"\",\n \"StockId\": 0,\n \"StockWarning\": \"\",\n \"UnfulfilledAmount\": \"\"\n }\n ],\n \"Tags\": [\n {}\n ],\n \"TaricNumber\": \"\",\n \"Title\": [\n {}\n ],\n \"Type\": 0,\n \"Unit\": 0,\n \"UnitsPerItem\": \"\",\n \"Vat1Rate\": \"\",\n \"Vat2Rate\": \"\",\n \"VatIndex\": 0,\n \"Weight\": 0,\n \"WeightNet\": 0,\n \"WidthCm\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/api/v1/products";
let payload = json!({
"BasicAttributes": (
json!({
"LanguageCode": "",
"Text": ""
})
),
"BillOfMaterial": (
json!({
"Amount": "",
"ArticleId": 0,
"SKU": ""
})
),
"Category1": json!({
"Id": 0,
"Name": ""
}),
"Category2": json!({}),
"Category3": json!({}),
"Condition": 0,
"CostPrice": "",
"CountryOfOrigin": "",
"CustomFields": (
json!({
"ArticleId": 0,
"Definition": json!({
"Configuration": json!({}),
"Id": 0,
"IsNullable": false,
"Name": "",
"Type": 0
}),
"DefinitionId": 0,
"Id": 0,
"Value": json!({})
})
),
"DeliveryTime": 0,
"Description": (json!({})),
"EAN": "",
"ExportDescription": "",
"ExportDescriptionMultiLanguage": (json!({})),
"HeightCm": "",
"Id": 0,
"Images": (
json!({
"ArticleId": 0,
"Id": 0,
"IsDefault": false,
"Position": 0,
"ThumbPathExt": "",
"ThumbUrl": "",
"Url": ""
})
),
"InvoiceText": (json!({})),
"IsCustomizable": false,
"IsDeactivated": false,
"IsDigital": false,
"LengthCm": "",
"LowStock": false,
"Manufacturer": "",
"Materials": (json!({})),
"Occasion": 0,
"Price": "",
"Recipient": 0,
"SKU": "",
"ShippingProductId": 0,
"ShortDescription": (json!({})),
"SoldAmount": "",
"SoldAmountLast30Days": "",
"SoldSumGross": "",
"SoldSumGrossLast30Days": "",
"SoldSumNet": "",
"SoldSumNetLast30Days": "",
"Sources": (
json!({
"ApiAccountId": 0,
"ApiAccountName": "",
"Custom": json!({}),
"ExportFactor": "",
"Id": 0,
"Source": "",
"SourceId": "",
"StockSyncInactive": false,
"StockSyncMax": "",
"StockSyncMin": "",
"UnitsPerItem": ""
})
),
"StockCode": "",
"StockCurrent": "",
"StockDesired": "",
"StockReduceItemsPerSale": "",
"StockWarning": "",
"Stocks": (
json!({
"Name": "",
"StockCode": "",
"StockCurrent": "",
"StockDesired": "",
"StockId": 0,
"StockWarning": "",
"UnfulfilledAmount": ""
})
),
"Tags": (json!({})),
"TaricNumber": "",
"Title": (json!({})),
"Type": 0,
"Unit": 0,
"UnitsPerItem": "",
"Vat1Rate": "",
"Vat2Rate": "",
"VatIndex": 0,
"Weight": 0,
"WeightNet": 0,
"WidthCm": ""
});
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}}/api/v1/products \
--header 'content-type: application/json' \
--data '{
"BasicAttributes": [
{
"LanguageCode": "",
"Text": ""
}
],
"BillOfMaterial": [
{
"Amount": "",
"ArticleId": 0,
"SKU": ""
}
],
"Category1": {
"Id": 0,
"Name": ""
},
"Category2": {},
"Category3": {},
"Condition": 0,
"CostPrice": "",
"CountryOfOrigin": "",
"CustomFields": [
{
"ArticleId": 0,
"Definition": {
"Configuration": {},
"Id": 0,
"IsNullable": false,
"Name": "",
"Type": 0
},
"DefinitionId": 0,
"Id": 0,
"Value": {}
}
],
"DeliveryTime": 0,
"Description": [
{}
],
"EAN": "",
"ExportDescription": "",
"ExportDescriptionMultiLanguage": [
{}
],
"HeightCm": "",
"Id": 0,
"Images": [
{
"ArticleId": 0,
"Id": 0,
"IsDefault": false,
"Position": 0,
"ThumbPathExt": "",
"ThumbUrl": "",
"Url": ""
}
],
"InvoiceText": [
{}
],
"IsCustomizable": false,
"IsDeactivated": false,
"IsDigital": false,
"LengthCm": "",
"LowStock": false,
"Manufacturer": "",
"Materials": [
{}
],
"Occasion": 0,
"Price": "",
"Recipient": 0,
"SKU": "",
"ShippingProductId": 0,
"ShortDescription": [
{}
],
"SoldAmount": "",
"SoldAmountLast30Days": "",
"SoldSumGross": "",
"SoldSumGrossLast30Days": "",
"SoldSumNet": "",
"SoldSumNetLast30Days": "",
"Sources": [
{
"ApiAccountId": 0,
"ApiAccountName": "",
"Custom": {},
"ExportFactor": "",
"Id": 0,
"Source": "",
"SourceId": "",
"StockSyncInactive": false,
"StockSyncMax": "",
"StockSyncMin": "",
"UnitsPerItem": ""
}
],
"StockCode": "",
"StockCurrent": "",
"StockDesired": "",
"StockReduceItemsPerSale": "",
"StockWarning": "",
"Stocks": [
{
"Name": "",
"StockCode": "",
"StockCurrent": "",
"StockDesired": "",
"StockId": 0,
"StockWarning": "",
"UnfulfilledAmount": ""
}
],
"Tags": [
{}
],
"TaricNumber": "",
"Title": [
{}
],
"Type": 0,
"Unit": 0,
"UnitsPerItem": "",
"Vat1Rate": "",
"Vat2Rate": "",
"VatIndex": 0,
"Weight": 0,
"WeightNet": 0,
"WidthCm": ""
}'
echo '{
"BasicAttributes": [
{
"LanguageCode": "",
"Text": ""
}
],
"BillOfMaterial": [
{
"Amount": "",
"ArticleId": 0,
"SKU": ""
}
],
"Category1": {
"Id": 0,
"Name": ""
},
"Category2": {},
"Category3": {},
"Condition": 0,
"CostPrice": "",
"CountryOfOrigin": "",
"CustomFields": [
{
"ArticleId": 0,
"Definition": {
"Configuration": {},
"Id": 0,
"IsNullable": false,
"Name": "",
"Type": 0
},
"DefinitionId": 0,
"Id": 0,
"Value": {}
}
],
"DeliveryTime": 0,
"Description": [
{}
],
"EAN": "",
"ExportDescription": "",
"ExportDescriptionMultiLanguage": [
{}
],
"HeightCm": "",
"Id": 0,
"Images": [
{
"ArticleId": 0,
"Id": 0,
"IsDefault": false,
"Position": 0,
"ThumbPathExt": "",
"ThumbUrl": "",
"Url": ""
}
],
"InvoiceText": [
{}
],
"IsCustomizable": false,
"IsDeactivated": false,
"IsDigital": false,
"LengthCm": "",
"LowStock": false,
"Manufacturer": "",
"Materials": [
{}
],
"Occasion": 0,
"Price": "",
"Recipient": 0,
"SKU": "",
"ShippingProductId": 0,
"ShortDescription": [
{}
],
"SoldAmount": "",
"SoldAmountLast30Days": "",
"SoldSumGross": "",
"SoldSumGrossLast30Days": "",
"SoldSumNet": "",
"SoldSumNetLast30Days": "",
"Sources": [
{
"ApiAccountId": 0,
"ApiAccountName": "",
"Custom": {},
"ExportFactor": "",
"Id": 0,
"Source": "",
"SourceId": "",
"StockSyncInactive": false,
"StockSyncMax": "",
"StockSyncMin": "",
"UnitsPerItem": ""
}
],
"StockCode": "",
"StockCurrent": "",
"StockDesired": "",
"StockReduceItemsPerSale": "",
"StockWarning": "",
"Stocks": [
{
"Name": "",
"StockCode": "",
"StockCurrent": "",
"StockDesired": "",
"StockId": 0,
"StockWarning": "",
"UnfulfilledAmount": ""
}
],
"Tags": [
{}
],
"TaricNumber": "",
"Title": [
{}
],
"Type": 0,
"Unit": 0,
"UnitsPerItem": "",
"Vat1Rate": "",
"Vat2Rate": "",
"VatIndex": 0,
"Weight": 0,
"WeightNet": 0,
"WidthCm": ""
}' | \
http POST {{baseUrl}}/api/v1/products \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "BasicAttributes": [\n {\n "LanguageCode": "",\n "Text": ""\n }\n ],\n "BillOfMaterial": [\n {\n "Amount": "",\n "ArticleId": 0,\n "SKU": ""\n }\n ],\n "Category1": {\n "Id": 0,\n "Name": ""\n },\n "Category2": {},\n "Category3": {},\n "Condition": 0,\n "CostPrice": "",\n "CountryOfOrigin": "",\n "CustomFields": [\n {\n "ArticleId": 0,\n "Definition": {\n "Configuration": {},\n "Id": 0,\n "IsNullable": false,\n "Name": "",\n "Type": 0\n },\n "DefinitionId": 0,\n "Id": 0,\n "Value": {}\n }\n ],\n "DeliveryTime": 0,\n "Description": [\n {}\n ],\n "EAN": "",\n "ExportDescription": "",\n "ExportDescriptionMultiLanguage": [\n {}\n ],\n "HeightCm": "",\n "Id": 0,\n "Images": [\n {\n "ArticleId": 0,\n "Id": 0,\n "IsDefault": false,\n "Position": 0,\n "ThumbPathExt": "",\n "ThumbUrl": "",\n "Url": ""\n }\n ],\n "InvoiceText": [\n {}\n ],\n "IsCustomizable": false,\n "IsDeactivated": false,\n "IsDigital": false,\n "LengthCm": "",\n "LowStock": false,\n "Manufacturer": "",\n "Materials": [\n {}\n ],\n "Occasion": 0,\n "Price": "",\n "Recipient": 0,\n "SKU": "",\n "ShippingProductId": 0,\n "ShortDescription": [\n {}\n ],\n "SoldAmount": "",\n "SoldAmountLast30Days": "",\n "SoldSumGross": "",\n "SoldSumGrossLast30Days": "",\n "SoldSumNet": "",\n "SoldSumNetLast30Days": "",\n "Sources": [\n {\n "ApiAccountId": 0,\n "ApiAccountName": "",\n "Custom": {},\n "ExportFactor": "",\n "Id": 0,\n "Source": "",\n "SourceId": "",\n "StockSyncInactive": false,\n "StockSyncMax": "",\n "StockSyncMin": "",\n "UnitsPerItem": ""\n }\n ],\n "StockCode": "",\n "StockCurrent": "",\n "StockDesired": "",\n "StockReduceItemsPerSale": "",\n "StockWarning": "",\n "Stocks": [\n {\n "Name": "",\n "StockCode": "",\n "StockCurrent": "",\n "StockDesired": "",\n "StockId": 0,\n "StockWarning": "",\n "UnfulfilledAmount": ""\n }\n ],\n "Tags": [\n {}\n ],\n "TaricNumber": "",\n "Title": [\n {}\n ],\n "Type": 0,\n "Unit": 0,\n "UnitsPerItem": "",\n "Vat1Rate": "",\n "Vat2Rate": "",\n "VatIndex": 0,\n "Weight": 0,\n "WeightNet": 0,\n "WidthCm": ""\n}' \
--output-document \
- {{baseUrl}}/api/v1/products
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"BasicAttributes": [
[
"LanguageCode": "",
"Text": ""
]
],
"BillOfMaterial": [
[
"Amount": "",
"ArticleId": 0,
"SKU": ""
]
],
"Category1": [
"Id": 0,
"Name": ""
],
"Category2": [],
"Category3": [],
"Condition": 0,
"CostPrice": "",
"CountryOfOrigin": "",
"CustomFields": [
[
"ArticleId": 0,
"Definition": [
"Configuration": [],
"Id": 0,
"IsNullable": false,
"Name": "",
"Type": 0
],
"DefinitionId": 0,
"Id": 0,
"Value": []
]
],
"DeliveryTime": 0,
"Description": [[]],
"EAN": "",
"ExportDescription": "",
"ExportDescriptionMultiLanguage": [[]],
"HeightCm": "",
"Id": 0,
"Images": [
[
"ArticleId": 0,
"Id": 0,
"IsDefault": false,
"Position": 0,
"ThumbPathExt": "",
"ThumbUrl": "",
"Url": ""
]
],
"InvoiceText": [[]],
"IsCustomizable": false,
"IsDeactivated": false,
"IsDigital": false,
"LengthCm": "",
"LowStock": false,
"Manufacturer": "",
"Materials": [[]],
"Occasion": 0,
"Price": "",
"Recipient": 0,
"SKU": "",
"ShippingProductId": 0,
"ShortDescription": [[]],
"SoldAmount": "",
"SoldAmountLast30Days": "",
"SoldSumGross": "",
"SoldSumGrossLast30Days": "",
"SoldSumNet": "",
"SoldSumNetLast30Days": "",
"Sources": [
[
"ApiAccountId": 0,
"ApiAccountName": "",
"Custom": [],
"ExportFactor": "",
"Id": 0,
"Source": "",
"SourceId": "",
"StockSyncInactive": false,
"StockSyncMax": "",
"StockSyncMin": "",
"UnitsPerItem": ""
]
],
"StockCode": "",
"StockCurrent": "",
"StockDesired": "",
"StockReduceItemsPerSale": "",
"StockWarning": "",
"Stocks": [
[
"Name": "",
"StockCode": "",
"StockCurrent": "",
"StockDesired": "",
"StockId": 0,
"StockWarning": "",
"UnfulfilledAmount": ""
]
],
"Tags": [[]],
"TaricNumber": "",
"Title": [[]],
"Type": 0,
"Unit": 0,
"UnitsPerItem": "",
"Vat1Rate": "",
"Vat2Rate": "",
"VatIndex": 0,
"Weight": 0,
"WeightNet": 0,
"WidthCm": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/v1/products")! 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
Delete multiple images by id
{{baseUrl}}/api/v1/products/images/delete
BODY json
[
{}
]
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/v1/products/images/delete");
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 {}\n]");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/api/v1/products/images/delete" {:content-type :json
:form-params [{}]})
require "http/client"
url = "{{baseUrl}}/api/v1/products/images/delete"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "[\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}}/api/v1/products/images/delete"),
Content = new StringContent("[\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}}/api/v1/products/images/delete");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "[\n {}\n]", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/v1/products/images/delete"
payload := strings.NewReader("[\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/api/v1/products/images/delete HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 8
[
{}
]
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/api/v1/products/images/delete")
.setHeader("content-type", "application/json")
.setBody("[\n {}\n]")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/v1/products/images/delete"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("[\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 {}\n]");
Request request = new Request.Builder()
.url("{{baseUrl}}/api/v1/products/images/delete")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/api/v1/products/images/delete")
.header("content-type", "application/json")
.body("[\n {}\n]")
.asString();
const data = JSON.stringify([
{}
]);
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/api/v1/products/images/delete');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/api/v1/products/images/delete',
headers: {'content-type': 'application/json'},
data: [{}]
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/v1/products/images/delete';
const options = {method: 'POST', headers: {'content-type': 'application/json'}, body: '[{}]'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/api/v1/products/images/delete',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '[\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 {}\n]")
val request = Request.Builder()
.url("{{baseUrl}}/api/v1/products/images/delete")
.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/api/v1/products/images/delete',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify([{}]));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/api/v1/products/images/delete',
headers: {'content-type': 'application/json'},
body: [{}],
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/api/v1/products/images/delete');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send([
{}
]);
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/api/v1/products/images/delete',
headers: {'content-type': 'application/json'},
data: [{}]
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/v1/products/images/delete';
const options = {method: 'POST', headers: {'content-type': 'application/json'}, body: '[{}]'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @[ @{ } ];
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/api/v1/products/images/delete"]
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}}/api/v1/products/images/delete" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "[\n {}\n]" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/v1/products/images/delete",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
[
]
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/api/v1/products/images/delete', [
'body' => '[
{}
]',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/api/v1/products/images/delete');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
[
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
[
]
]));
$request->setRequestUrl('{{baseUrl}}/api/v1/products/images/delete');
$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}}/api/v1/products/images/delete' -Method POST -Headers $headers -ContentType 'application/json' -Body '[
{}
]'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/v1/products/images/delete' -Method POST -Headers $headers -ContentType 'application/json' -Body '[
{}
]'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "[\n {}\n]"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/api/v1/products/images/delete", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/v1/products/images/delete"
payload = [{}]
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/v1/products/images/delete"
payload <- "[\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}}/api/v1/products/images/delete")
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 {}\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/api/v1/products/images/delete') do |req|
req.body = "[\n {}\n]"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/api/v1/products/images/delete";
let payload = (json!({}));
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/api/v1/products/images/delete \
--header 'content-type: application/json' \
--data '[
{}
]'
echo '[
{}
]' | \
http POST {{baseUrl}}/api/v1/products/images/delete \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '[\n {}\n]' \
--output-document \
- {{baseUrl}}/api/v1/products/images/delete
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [[]] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/v1/products/images/delete")! 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
Deletes a product
{{baseUrl}}/api/v1/products/:id
QUERY PARAMS
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/v1/products/:id");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/delete "{{baseUrl}}/api/v1/products/:id")
require "http/client"
url = "{{baseUrl}}/api/v1/products/: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}}/api/v1/products/:id"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/api/v1/products/:id");
var request = new RestRequest("", Method.Delete);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/v1/products/: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/api/v1/products/:id HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/api/v1/products/:id")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/v1/products/: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}}/api/v1/products/:id")
.delete(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/api/v1/products/: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}}/api/v1/products/:id');
xhr.send(data);
import axios from 'axios';
const options = {method: 'DELETE', url: '{{baseUrl}}/api/v1/products/:id'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/v1/products/: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}}/api/v1/products/:id',
method: 'DELETE',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/api/v1/products/: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/api/v1/products/: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}}/api/v1/products/: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}}/api/v1/products/: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}}/api/v1/products/:id'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/v1/products/: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}}/api/v1/products/: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}}/api/v1/products/:id" in
Client.call `DELETE uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/v1/products/: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}}/api/v1/products/:id');
echo $response->getBody();
setUrl('{{baseUrl}}/api/v1/products/:id');
$request->setMethod(HTTP_METH_DELETE);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/api/v1/products/:id');
$request->setRequestMethod('DELETE');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/api/v1/products/:id' -Method DELETE
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/v1/products/:id' -Method DELETE
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("DELETE", "/baseUrl/api/v1/products/:id")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/v1/products/:id"
response = requests.delete(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/v1/products/:id"
response <- VERB("DELETE", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/api/v1/products/: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/api/v1/products/: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}}/api/v1/products/: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}}/api/v1/products/:id
http DELETE {{baseUrl}}/api/v1/products/:id
wget --quiet \
--method DELETE \
--output-document \
- {{baseUrl}}/api/v1/products/:id
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/v1/products/: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()
DELETE
Deletes a single image by id
{{baseUrl}}/api/v1/products/images/:imageId
QUERY PARAMS
imageId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/v1/products/images/:imageId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/delete "{{baseUrl}}/api/v1/products/images/:imageId")
require "http/client"
url = "{{baseUrl}}/api/v1/products/images/:imageId"
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}}/api/v1/products/images/:imageId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/api/v1/products/images/:imageId");
var request = new RestRequest("", Method.Delete);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/v1/products/images/:imageId"
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/api/v1/products/images/:imageId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/api/v1/products/images/:imageId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/v1/products/images/:imageId"))
.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}}/api/v1/products/images/:imageId")
.delete(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/api/v1/products/images/:imageId")
.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}}/api/v1/products/images/:imageId');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'DELETE',
url: '{{baseUrl}}/api/v1/products/images/:imageId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/v1/products/images/:imageId';
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}}/api/v1/products/images/:imageId',
method: 'DELETE',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/api/v1/products/images/:imageId")
.delete(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'DELETE',
hostname: 'example.com',
port: null,
path: '/baseUrl/api/v1/products/images/:imageId',
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}}/api/v1/products/images/:imageId'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('DELETE', '{{baseUrl}}/api/v1/products/images/:imageId');
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}}/api/v1/products/images/:imageId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/v1/products/images/:imageId';
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}}/api/v1/products/images/:imageId"]
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}}/api/v1/products/images/:imageId" in
Client.call `DELETE uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/v1/products/images/:imageId",
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}}/api/v1/products/images/:imageId');
echo $response->getBody();
setUrl('{{baseUrl}}/api/v1/products/images/:imageId');
$request->setMethod(HTTP_METH_DELETE);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/api/v1/products/images/:imageId');
$request->setRequestMethod('DELETE');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/api/v1/products/images/:imageId' -Method DELETE
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/v1/products/images/:imageId' -Method DELETE
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("DELETE", "/baseUrl/api/v1/products/images/:imageId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/v1/products/images/:imageId"
response = requests.delete(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/v1/products/images/:imageId"
response <- VERB("DELETE", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/api/v1/products/images/:imageId")
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/api/v1/products/images/:imageId') do |req|
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/api/v1/products/images/:imageId";
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}}/api/v1/products/images/:imageId
http DELETE {{baseUrl}}/api/v1/products/images/:imageId
wget --quiet \
--method DELETE \
--output-document \
- {{baseUrl}}/api/v1/products/images/:imageId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/v1/products/images/:imageId")! 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()
DELETE
Deletes a single image from a product
{{baseUrl}}/api/v1/products/:productId/images/:imageId
QUERY PARAMS
productId
imageId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/v1/products/:productId/images/:imageId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/delete "{{baseUrl}}/api/v1/products/:productId/images/:imageId")
require "http/client"
url = "{{baseUrl}}/api/v1/products/:productId/images/:imageId"
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}}/api/v1/products/:productId/images/:imageId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/api/v1/products/:productId/images/:imageId");
var request = new RestRequest("", Method.Delete);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/v1/products/:productId/images/:imageId"
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/api/v1/products/:productId/images/:imageId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/api/v1/products/:productId/images/:imageId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/v1/products/:productId/images/:imageId"))
.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}}/api/v1/products/:productId/images/:imageId")
.delete(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/api/v1/products/:productId/images/:imageId")
.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}}/api/v1/products/:productId/images/:imageId');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'DELETE',
url: '{{baseUrl}}/api/v1/products/:productId/images/:imageId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/v1/products/:productId/images/:imageId';
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}}/api/v1/products/:productId/images/:imageId',
method: 'DELETE',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/api/v1/products/:productId/images/:imageId")
.delete(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'DELETE',
hostname: 'example.com',
port: null,
path: '/baseUrl/api/v1/products/:productId/images/:imageId',
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}}/api/v1/products/:productId/images/:imageId'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('DELETE', '{{baseUrl}}/api/v1/products/:productId/images/:imageId');
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}}/api/v1/products/:productId/images/:imageId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/v1/products/:productId/images/:imageId';
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}}/api/v1/products/:productId/images/:imageId"]
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}}/api/v1/products/:productId/images/:imageId" in
Client.call `DELETE uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/v1/products/:productId/images/:imageId",
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}}/api/v1/products/:productId/images/:imageId');
echo $response->getBody();
setUrl('{{baseUrl}}/api/v1/products/:productId/images/:imageId');
$request->setMethod(HTTP_METH_DELETE);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/api/v1/products/:productId/images/:imageId');
$request->setRequestMethod('DELETE');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/api/v1/products/:productId/images/:imageId' -Method DELETE
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/v1/products/:productId/images/:imageId' -Method DELETE
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("DELETE", "/baseUrl/api/v1/products/:productId/images/:imageId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/v1/products/:productId/images/:imageId"
response = requests.delete(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/v1/products/:productId/images/:imageId"
response <- VERB("DELETE", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/api/v1/products/:productId/images/:imageId")
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/api/v1/products/:productId/images/:imageId') do |req|
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/api/v1/products/:productId/images/:imageId";
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}}/api/v1/products/:productId/images/:imageId
http DELETE {{baseUrl}}/api/v1/products/:productId/images/:imageId
wget --quiet \
--method DELETE \
--output-document \
- {{baseUrl}}/api/v1/products/:productId/images/:imageId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/v1/products/:productId/images/:imageId")! 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
GEts a list of all defined categories
{{baseUrl}}/api/v1/products/category
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/v1/products/category");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/api/v1/products/category")
require "http/client"
url = "{{baseUrl}}/api/v1/products/category"
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}}/api/v1/products/category"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/api/v1/products/category");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/v1/products/category"
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/api/v1/products/category HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/api/v1/products/category")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/v1/products/category"))
.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}}/api/v1/products/category")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/api/v1/products/category")
.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}}/api/v1/products/category');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/api/v1/products/category'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/v1/products/category';
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}}/api/v1/products/category',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/api/v1/products/category")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/api/v1/products/category',
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}}/api/v1/products/category'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/api/v1/products/category');
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}}/api/v1/products/category'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/v1/products/category';
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}}/api/v1/products/category"]
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}}/api/v1/products/category" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/v1/products/category",
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}}/api/v1/products/category');
echo $response->getBody();
setUrl('{{baseUrl}}/api/v1/products/category');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/api/v1/products/category');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/api/v1/products/category' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/v1/products/category' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/api/v1/products/category")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/v1/products/category"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/v1/products/category"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/api/v1/products/category")
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/api/v1/products/category') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/api/v1/products/category";
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}}/api/v1/products/category
http GET {{baseUrl}}/api/v1/products/category
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/api/v1/products/category
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/v1/products/category")! 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
Get a list of all products
{{baseUrl}}/api/v1/products
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/v1/products");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/api/v1/products")
require "http/client"
url = "{{baseUrl}}/api/v1/products"
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}}/api/v1/products"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/api/v1/products");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/v1/products"
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/api/v1/products HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/api/v1/products")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/v1/products"))
.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}}/api/v1/products")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/api/v1/products")
.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}}/api/v1/products');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/api/v1/products'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/v1/products';
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}}/api/v1/products',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/api/v1/products")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/api/v1/products',
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}}/api/v1/products'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/api/v1/products');
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}}/api/v1/products'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/v1/products';
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}}/api/v1/products"]
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}}/api/v1/products" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/v1/products",
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}}/api/v1/products');
echo $response->getBody();
setUrl('{{baseUrl}}/api/v1/products');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/api/v1/products');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/api/v1/products' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/v1/products' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/api/v1/products")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/v1/products"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/v1/products"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/api/v1/products")
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/api/v1/products') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/api/v1/products";
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}}/api/v1/products
http GET {{baseUrl}}/api/v1/products
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/api/v1/products
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/v1/products")! 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
Queries a list of all custom fields
{{baseUrl}}/api/v1/products/custom-fields
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/v1/products/custom-fields");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/api/v1/products/custom-fields")
require "http/client"
url = "{{baseUrl}}/api/v1/products/custom-fields"
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}}/api/v1/products/custom-fields"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/api/v1/products/custom-fields");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/v1/products/custom-fields"
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/api/v1/products/custom-fields HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/api/v1/products/custom-fields")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/v1/products/custom-fields"))
.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}}/api/v1/products/custom-fields")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/api/v1/products/custom-fields")
.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}}/api/v1/products/custom-fields');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/api/v1/products/custom-fields'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/v1/products/custom-fields';
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}}/api/v1/products/custom-fields',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/api/v1/products/custom-fields")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/api/v1/products/custom-fields',
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}}/api/v1/products/custom-fields'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/api/v1/products/custom-fields');
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}}/api/v1/products/custom-fields'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/v1/products/custom-fields';
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}}/api/v1/products/custom-fields"]
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}}/api/v1/products/custom-fields" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/v1/products/custom-fields",
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}}/api/v1/products/custom-fields');
echo $response->getBody();
setUrl('{{baseUrl}}/api/v1/products/custom-fields');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/api/v1/products/custom-fields');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/api/v1/products/custom-fields' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/v1/products/custom-fields' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/api/v1/products/custom-fields")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/v1/products/custom-fields"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/v1/products/custom-fields"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/api/v1/products/custom-fields")
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/api/v1/products/custom-fields') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/api/v1/products/custom-fields";
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}}/api/v1/products/custom-fields
http GET {{baseUrl}}/api/v1/products/custom-fields
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/api/v1/products/custom-fields
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/v1/products/custom-fields")! 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
Queries a single article by id or by sku
{{baseUrl}}/api/v1/products/:id
QUERY PARAMS
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/v1/products/:id");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/api/v1/products/:id")
require "http/client"
url = "{{baseUrl}}/api/v1/products/: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}}/api/v1/products/:id"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/api/v1/products/:id");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/v1/products/: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/api/v1/products/:id HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/api/v1/products/:id")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/v1/products/: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}}/api/v1/products/:id")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/api/v1/products/: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}}/api/v1/products/:id');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/api/v1/products/:id'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/v1/products/: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}}/api/v1/products/:id',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/api/v1/products/:id")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/api/v1/products/: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}}/api/v1/products/: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}}/api/v1/products/: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}}/api/v1/products/:id'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/v1/products/: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}}/api/v1/products/: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}}/api/v1/products/:id" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/v1/products/: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}}/api/v1/products/:id');
echo $response->getBody();
setUrl('{{baseUrl}}/api/v1/products/:id');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/api/v1/products/:id');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/api/v1/products/:id' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/v1/products/:id' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/api/v1/products/:id")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/v1/products/:id"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/v1/products/:id"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/api/v1/products/: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/api/v1/products/:id') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/api/v1/products/: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}}/api/v1/products/:id
http GET {{baseUrl}}/api/v1/products/:id
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/api/v1/products/:id
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/v1/products/: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
Queries a single custom field
{{baseUrl}}/api/v1/products/custom-fields/:id
QUERY PARAMS
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/v1/products/custom-fields/:id");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/api/v1/products/custom-fields/:id")
require "http/client"
url = "{{baseUrl}}/api/v1/products/custom-fields/: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}}/api/v1/products/custom-fields/:id"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/api/v1/products/custom-fields/:id");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/v1/products/custom-fields/: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/api/v1/products/custom-fields/:id HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/api/v1/products/custom-fields/:id")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/v1/products/custom-fields/: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}}/api/v1/products/custom-fields/:id")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/api/v1/products/custom-fields/: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}}/api/v1/products/custom-fields/:id');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/api/v1/products/custom-fields/:id'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/v1/products/custom-fields/: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}}/api/v1/products/custom-fields/:id',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/api/v1/products/custom-fields/:id")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/api/v1/products/custom-fields/: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}}/api/v1/products/custom-fields/: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}}/api/v1/products/custom-fields/: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}}/api/v1/products/custom-fields/:id'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/v1/products/custom-fields/: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}}/api/v1/products/custom-fields/: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}}/api/v1/products/custom-fields/:id" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/v1/products/custom-fields/: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}}/api/v1/products/custom-fields/:id');
echo $response->getBody();
setUrl('{{baseUrl}}/api/v1/products/custom-fields/:id');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/api/v1/products/custom-fields/:id');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/api/v1/products/custom-fields/:id' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/v1/products/custom-fields/:id' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/api/v1/products/custom-fields/:id")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/v1/products/custom-fields/:id"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/v1/products/custom-fields/:id"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/api/v1/products/custom-fields/: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/api/v1/products/custom-fields/:id') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/api/v1/products/custom-fields/: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}}/api/v1/products/custom-fields/:id
http GET {{baseUrl}}/api/v1/products/custom-fields/:id
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/api/v1/products/custom-fields/:id
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/v1/products/custom-fields/: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
Queries the reserved amount for a single article by id or by sku
{{baseUrl}}/api/v1/products/reservedamount
QUERY PARAMS
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/v1/products/reservedamount?id=");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/api/v1/products/reservedamount" {:query-params {:id ""}})
require "http/client"
url = "{{baseUrl}}/api/v1/products/reservedamount?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}}/api/v1/products/reservedamount?id="),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/api/v1/products/reservedamount?id=");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/v1/products/reservedamount?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/api/v1/products/reservedamount?id= HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/api/v1/products/reservedamount?id=")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/v1/products/reservedamount?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}}/api/v1/products/reservedamount?id=")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/api/v1/products/reservedamount?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}}/api/v1/products/reservedamount?id=');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/api/v1/products/reservedamount',
params: {id: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/v1/products/reservedamount?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}}/api/v1/products/reservedamount?id=',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/api/v1/products/reservedamount?id=")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/api/v1/products/reservedamount?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}}/api/v1/products/reservedamount',
qs: {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}}/api/v1/products/reservedamount');
req.query({
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}}/api/v1/products/reservedamount',
params: {id: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/v1/products/reservedamount?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}}/api/v1/products/reservedamount?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}}/api/v1/products/reservedamount?id=" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/v1/products/reservedamount?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}}/api/v1/products/reservedamount?id=');
echo $response->getBody();
setUrl('{{baseUrl}}/api/v1/products/reservedamount');
$request->setMethod(HTTP_METH_GET);
$request->setQueryData([
'id' => ''
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/api/v1/products/reservedamount');
$request->setRequestMethod('GET');
$request->setQuery(new http\QueryString([
'id' => ''
]));
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/api/v1/products/reservedamount?id=' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/v1/products/reservedamount?id=' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/api/v1/products/reservedamount?id=")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/v1/products/reservedamount"
querystring = {"id":""}
response = requests.get(url, params=querystring)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/v1/products/reservedamount"
queryString <- list(id = "")
response <- VERB("GET", url, query = queryString, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/api/v1/products/reservedamount?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/api/v1/products/reservedamount') do |req|
req.params['id'] = ''
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/api/v1/products/reservedamount";
let querystring = [
("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}}/api/v1/products/reservedamount?id='
http GET '{{baseUrl}}/api/v1/products/reservedamount?id='
wget --quiet \
--method GET \
--output-document \
- '{{baseUrl}}/api/v1/products/reservedamount?id='
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/v1/products/reservedamount?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
Query all defined stock locations
{{baseUrl}}/api/v1/products/stocks
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/v1/products/stocks");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/api/v1/products/stocks")
require "http/client"
url = "{{baseUrl}}/api/v1/products/stocks"
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}}/api/v1/products/stocks"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/api/v1/products/stocks");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/v1/products/stocks"
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/api/v1/products/stocks HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/api/v1/products/stocks")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/v1/products/stocks"))
.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}}/api/v1/products/stocks")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/api/v1/products/stocks")
.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}}/api/v1/products/stocks');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/api/v1/products/stocks'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/v1/products/stocks';
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}}/api/v1/products/stocks',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/api/v1/products/stocks")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/api/v1/products/stocks',
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}}/api/v1/products/stocks'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/api/v1/products/stocks');
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}}/api/v1/products/stocks'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/v1/products/stocks';
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}}/api/v1/products/stocks"]
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}}/api/v1/products/stocks" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/v1/products/stocks",
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}}/api/v1/products/stocks');
echo $response->getBody();
setUrl('{{baseUrl}}/api/v1/products/stocks');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/api/v1/products/stocks');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/api/v1/products/stocks' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/v1/products/stocks' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/api/v1/products/stocks")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/v1/products/stocks"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/v1/products/stocks"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/api/v1/products/stocks")
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/api/v1/products/stocks') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/api/v1/products/stocks";
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}}/api/v1/products/stocks
http GET {{baseUrl}}/api/v1/products/stocks
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/api/v1/products/stocks
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/v1/products/stocks")! 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
Returns a list of all images of the product
{{baseUrl}}/api/v1/products/:productId/images
QUERY PARAMS
productId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/v1/products/:productId/images");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/api/v1/products/:productId/images")
require "http/client"
url = "{{baseUrl}}/api/v1/products/:productId/images"
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}}/api/v1/products/:productId/images"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/api/v1/products/:productId/images");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/v1/products/:productId/images"
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/api/v1/products/:productId/images HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/api/v1/products/:productId/images")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/v1/products/:productId/images"))
.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}}/api/v1/products/:productId/images")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/api/v1/products/:productId/images")
.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}}/api/v1/products/:productId/images');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/api/v1/products/:productId/images'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/v1/products/:productId/images';
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}}/api/v1/products/:productId/images',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/api/v1/products/:productId/images")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/api/v1/products/:productId/images',
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}}/api/v1/products/:productId/images'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/api/v1/products/:productId/images');
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}}/api/v1/products/:productId/images'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/v1/products/:productId/images';
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}}/api/v1/products/:productId/images"]
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}}/api/v1/products/:productId/images" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/v1/products/:productId/images",
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}}/api/v1/products/:productId/images');
echo $response->getBody();
setUrl('{{baseUrl}}/api/v1/products/:productId/images');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/api/v1/products/:productId/images');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/api/v1/products/:productId/images' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/v1/products/:productId/images' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/api/v1/products/:productId/images")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/v1/products/:productId/images"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/v1/products/:productId/images"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/api/v1/products/:productId/images")
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/api/v1/products/:productId/images') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/api/v1/products/:productId/images";
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}}/api/v1/products/:productId/images
http GET {{baseUrl}}/api/v1/products/:productId/images
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/api/v1/products/:productId/images
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/v1/products/:productId/images")! 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
Returns a list of fields which can be updated with the patch call
{{baseUrl}}/api/v1/products/PatchableFields
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/v1/products/PatchableFields");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/api/v1/products/PatchableFields")
require "http/client"
url = "{{baseUrl}}/api/v1/products/PatchableFields"
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}}/api/v1/products/PatchableFields"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/api/v1/products/PatchableFields");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/v1/products/PatchableFields"
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/api/v1/products/PatchableFields HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/api/v1/products/PatchableFields")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/v1/products/PatchableFields"))
.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}}/api/v1/products/PatchableFields")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/api/v1/products/PatchableFields")
.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}}/api/v1/products/PatchableFields');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/api/v1/products/PatchableFields'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/v1/products/PatchableFields';
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}}/api/v1/products/PatchableFields',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/api/v1/products/PatchableFields")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/api/v1/products/PatchableFields',
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}}/api/v1/products/PatchableFields'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/api/v1/products/PatchableFields');
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}}/api/v1/products/PatchableFields'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/v1/products/PatchableFields';
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}}/api/v1/products/PatchableFields"]
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}}/api/v1/products/PatchableFields" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/v1/products/PatchableFields",
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}}/api/v1/products/PatchableFields');
echo $response->getBody();
setUrl('{{baseUrl}}/api/v1/products/PatchableFields');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/api/v1/products/PatchableFields');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/api/v1/products/PatchableFields' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/v1/products/PatchableFields' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/api/v1/products/PatchableFields")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/v1/products/PatchableFields"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/v1/products/PatchableFields"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/api/v1/products/PatchableFields")
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/api/v1/products/PatchableFields') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/api/v1/products/PatchableFields";
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}}/api/v1/products/PatchableFields
http GET {{baseUrl}}/api/v1/products/PatchableFields
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/api/v1/products/PatchableFields
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/v1/products/PatchableFields")! 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
Returns a single image by id (GET)
{{baseUrl}}/api/v1/products/:productId/images/:imageId
QUERY PARAMS
productId
imageId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/v1/products/:productId/images/:imageId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/api/v1/products/:productId/images/:imageId")
require "http/client"
url = "{{baseUrl}}/api/v1/products/:productId/images/:imageId"
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}}/api/v1/products/:productId/images/:imageId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/api/v1/products/:productId/images/:imageId");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/v1/products/:productId/images/:imageId"
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/api/v1/products/:productId/images/:imageId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/api/v1/products/:productId/images/:imageId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/v1/products/:productId/images/:imageId"))
.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}}/api/v1/products/:productId/images/:imageId")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/api/v1/products/:productId/images/:imageId")
.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}}/api/v1/products/:productId/images/:imageId');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/api/v1/products/:productId/images/:imageId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/v1/products/:productId/images/:imageId';
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}}/api/v1/products/:productId/images/:imageId',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/api/v1/products/:productId/images/:imageId")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/api/v1/products/:productId/images/:imageId',
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}}/api/v1/products/:productId/images/:imageId'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/api/v1/products/:productId/images/:imageId');
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}}/api/v1/products/:productId/images/:imageId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/v1/products/:productId/images/:imageId';
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}}/api/v1/products/:productId/images/:imageId"]
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}}/api/v1/products/:productId/images/:imageId" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/v1/products/:productId/images/:imageId",
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}}/api/v1/products/:productId/images/:imageId');
echo $response->getBody();
setUrl('{{baseUrl}}/api/v1/products/:productId/images/:imageId');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/api/v1/products/:productId/images/:imageId');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/api/v1/products/:productId/images/:imageId' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/v1/products/:productId/images/:imageId' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/api/v1/products/:productId/images/:imageId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/v1/products/:productId/images/:imageId"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/v1/products/:productId/images/:imageId"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/api/v1/products/:productId/images/:imageId")
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/api/v1/products/:productId/images/:imageId') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/api/v1/products/:productId/images/:imageId";
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}}/api/v1/products/:productId/images/:imageId
http GET {{baseUrl}}/api/v1/products/:productId/images/:imageId
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/api/v1/products/:productId/images/:imageId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/v1/products/:productId/images/:imageId")! 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
Returns a single image by id
{{baseUrl}}/api/v1/products/images/:imageId
QUERY PARAMS
imageId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/v1/products/images/:imageId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/api/v1/products/images/:imageId")
require "http/client"
url = "{{baseUrl}}/api/v1/products/images/:imageId"
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}}/api/v1/products/images/:imageId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/api/v1/products/images/:imageId");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/v1/products/images/:imageId"
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/api/v1/products/images/:imageId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/api/v1/products/images/:imageId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/v1/products/images/:imageId"))
.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}}/api/v1/products/images/:imageId")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/api/v1/products/images/:imageId")
.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}}/api/v1/products/images/:imageId');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/api/v1/products/images/:imageId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/v1/products/images/:imageId';
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}}/api/v1/products/images/:imageId',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/api/v1/products/images/:imageId")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/api/v1/products/images/:imageId',
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}}/api/v1/products/images/:imageId'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/api/v1/products/images/:imageId');
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}}/api/v1/products/images/:imageId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/v1/products/images/:imageId';
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}}/api/v1/products/images/:imageId"]
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}}/api/v1/products/images/:imageId" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/v1/products/images/:imageId",
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}}/api/v1/products/images/:imageId');
echo $response->getBody();
setUrl('{{baseUrl}}/api/v1/products/images/:imageId');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/api/v1/products/images/:imageId');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/api/v1/products/images/:imageId' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/v1/products/images/:imageId' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/api/v1/products/images/:imageId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/v1/products/images/:imageId"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/v1/products/images/:imageId"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/api/v1/products/images/:imageId")
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/api/v1/products/images/:imageId') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/api/v1/products/images/:imageId";
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}}/api/v1/products/images/:imageId
http GET {{baseUrl}}/api/v1/products/images/:imageId
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/api/v1/products/images/:imageId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/v1/products/images/:imageId")! 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
Search for products, customers and orders. Type can be -order-, -product- and - or -customer- Term can contains lucene query syntax
{{baseUrl}}/api/v1/search
BODY json
{
"SearchMode": 0,
"Term": "",
"Type": []
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/v1/search");
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 \"SearchMode\": 0,\n \"Term\": \"\",\n \"Type\": []\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/api/v1/search" {:content-type :json
:form-params {:SearchMode 0
:Term ""
:Type []}})
require "http/client"
url = "{{baseUrl}}/api/v1/search"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"SearchMode\": 0,\n \"Term\": \"\",\n \"Type\": []\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}}/api/v1/search"),
Content = new StringContent("{\n \"SearchMode\": 0,\n \"Term\": \"\",\n \"Type\": []\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}}/api/v1/search");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"SearchMode\": 0,\n \"Term\": \"\",\n \"Type\": []\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/v1/search"
payload := strings.NewReader("{\n \"SearchMode\": 0,\n \"Term\": \"\",\n \"Type\": []\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/api/v1/search HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 49
{
"SearchMode": 0,
"Term": "",
"Type": []
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/api/v1/search")
.setHeader("content-type", "application/json")
.setBody("{\n \"SearchMode\": 0,\n \"Term\": \"\",\n \"Type\": []\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/v1/search"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"SearchMode\": 0,\n \"Term\": \"\",\n \"Type\": []\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 \"SearchMode\": 0,\n \"Term\": \"\",\n \"Type\": []\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/api/v1/search")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/api/v1/search")
.header("content-type", "application/json")
.body("{\n \"SearchMode\": 0,\n \"Term\": \"\",\n \"Type\": []\n}")
.asString();
const data = JSON.stringify({
SearchMode: 0,
Term: '',
Type: []
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/api/v1/search');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/api/v1/search',
headers: {'content-type': 'application/json'},
data: {SearchMode: 0, Term: '', Type: []}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/v1/search';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"SearchMode":0,"Term":"","Type":[]}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/api/v1/search',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "SearchMode": 0,\n "Term": "",\n "Type": []\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"SearchMode\": 0,\n \"Term\": \"\",\n \"Type\": []\n}")
val request = Request.Builder()
.url("{{baseUrl}}/api/v1/search")
.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/api/v1/search',
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({SearchMode: 0, Term: '', Type: []}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/api/v1/search',
headers: {'content-type': 'application/json'},
body: {SearchMode: 0, Term: '', Type: []},
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}}/api/v1/search');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
SearchMode: 0,
Term: '',
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: 'POST',
url: '{{baseUrl}}/api/v1/search',
headers: {'content-type': 'application/json'},
data: {SearchMode: 0, Term: '', Type: []}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/v1/search';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"SearchMode":0,"Term":"","Type":[]}'
};
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 = @{ @"SearchMode": @0,
@"Term": @"",
@"Type": @[ ] };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/api/v1/search"]
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}}/api/v1/search" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"SearchMode\": 0,\n \"Term\": \"\",\n \"Type\": []\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/v1/search",
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([
'SearchMode' => 0,
'Term' => '',
'Type' => [
]
]),
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}}/api/v1/search', [
'body' => '{
"SearchMode": 0,
"Term": "",
"Type": []
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/api/v1/search');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'SearchMode' => 0,
'Term' => '',
'Type' => [
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'SearchMode' => 0,
'Term' => '',
'Type' => [
]
]));
$request->setRequestUrl('{{baseUrl}}/api/v1/search');
$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}}/api/v1/search' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"SearchMode": 0,
"Term": "",
"Type": []
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/v1/search' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"SearchMode": 0,
"Term": "",
"Type": []
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"SearchMode\": 0,\n \"Term\": \"\",\n \"Type\": []\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/api/v1/search", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/v1/search"
payload = {
"SearchMode": 0,
"Term": "",
"Type": []
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/v1/search"
payload <- "{\n \"SearchMode\": 0,\n \"Term\": \"\",\n \"Type\": []\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}}/api/v1/search")
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 \"SearchMode\": 0,\n \"Term\": \"\",\n \"Type\": []\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/api/v1/search') do |req|
req.body = "{\n \"SearchMode\": 0,\n \"Term\": \"\",\n \"Type\": []\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/api/v1/search";
let payload = json!({
"SearchMode": 0,
"Term": "",
"Type": ()
});
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}}/api/v1/search \
--header 'content-type: application/json' \
--data '{
"SearchMode": 0,
"Term": "",
"Type": []
}'
echo '{
"SearchMode": 0,
"Term": "",
"Type": []
}' | \
http POST {{baseUrl}}/api/v1/search \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "SearchMode": 0,\n "Term": "",\n "Type": []\n}' \
--output-document \
- {{baseUrl}}/api/v1/search
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"SearchMode": 0,
"Term": "",
"Type": []
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/v1/search")! 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
Update the stock code of an article
{{baseUrl}}/api/v1/products/updatestockcode
BODY json
{
"BillbeeId": 0,
"Sku": "",
"StockCode": "",
"StockId": 0
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/v1/products/updatestockcode");
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 \"BillbeeId\": 0,\n \"Sku\": \"\",\n \"StockCode\": \"\",\n \"StockId\": 0\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/api/v1/products/updatestockcode" {:content-type :json
:form-params {:BillbeeId 0
:Sku ""
:StockCode ""
:StockId 0}})
require "http/client"
url = "{{baseUrl}}/api/v1/products/updatestockcode"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"BillbeeId\": 0,\n \"Sku\": \"\",\n \"StockCode\": \"\",\n \"StockId\": 0\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}}/api/v1/products/updatestockcode"),
Content = new StringContent("{\n \"BillbeeId\": 0,\n \"Sku\": \"\",\n \"StockCode\": \"\",\n \"StockId\": 0\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}}/api/v1/products/updatestockcode");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"BillbeeId\": 0,\n \"Sku\": \"\",\n \"StockCode\": \"\",\n \"StockId\": 0\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/v1/products/updatestockcode"
payload := strings.NewReader("{\n \"BillbeeId\": 0,\n \"Sku\": \"\",\n \"StockCode\": \"\",\n \"StockId\": 0\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/api/v1/products/updatestockcode HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 68
{
"BillbeeId": 0,
"Sku": "",
"StockCode": "",
"StockId": 0
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/api/v1/products/updatestockcode")
.setHeader("content-type", "application/json")
.setBody("{\n \"BillbeeId\": 0,\n \"Sku\": \"\",\n \"StockCode\": \"\",\n \"StockId\": 0\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/v1/products/updatestockcode"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"BillbeeId\": 0,\n \"Sku\": \"\",\n \"StockCode\": \"\",\n \"StockId\": 0\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 \"BillbeeId\": 0,\n \"Sku\": \"\",\n \"StockCode\": \"\",\n \"StockId\": 0\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/api/v1/products/updatestockcode")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/api/v1/products/updatestockcode")
.header("content-type", "application/json")
.body("{\n \"BillbeeId\": 0,\n \"Sku\": \"\",\n \"StockCode\": \"\",\n \"StockId\": 0\n}")
.asString();
const data = JSON.stringify({
BillbeeId: 0,
Sku: '',
StockCode: '',
StockId: 0
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/api/v1/products/updatestockcode');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/api/v1/products/updatestockcode',
headers: {'content-type': 'application/json'},
data: {BillbeeId: 0, Sku: '', StockCode: '', StockId: 0}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/v1/products/updatestockcode';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"BillbeeId":0,"Sku":"","StockCode":"","StockId":0}'
};
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}}/api/v1/products/updatestockcode',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "BillbeeId": 0,\n "Sku": "",\n "StockCode": "",\n "StockId": 0\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"BillbeeId\": 0,\n \"Sku\": \"\",\n \"StockCode\": \"\",\n \"StockId\": 0\n}")
val request = Request.Builder()
.url("{{baseUrl}}/api/v1/products/updatestockcode")
.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/api/v1/products/updatestockcode',
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({BillbeeId: 0, Sku: '', StockCode: '', StockId: 0}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/api/v1/products/updatestockcode',
headers: {'content-type': 'application/json'},
body: {BillbeeId: 0, Sku: '', StockCode: '', StockId: 0},
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}}/api/v1/products/updatestockcode');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
BillbeeId: 0,
Sku: '',
StockCode: '',
StockId: 0
});
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}}/api/v1/products/updatestockcode',
headers: {'content-type': 'application/json'},
data: {BillbeeId: 0, Sku: '', StockCode: '', StockId: 0}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/v1/products/updatestockcode';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"BillbeeId":0,"Sku":"","StockCode":"","StockId":0}'
};
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 = @{ @"BillbeeId": @0,
@"Sku": @"",
@"StockCode": @"",
@"StockId": @0 };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/api/v1/products/updatestockcode"]
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}}/api/v1/products/updatestockcode" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"BillbeeId\": 0,\n \"Sku\": \"\",\n \"StockCode\": \"\",\n \"StockId\": 0\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/v1/products/updatestockcode",
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([
'BillbeeId' => 0,
'Sku' => '',
'StockCode' => '',
'StockId' => 0
]),
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}}/api/v1/products/updatestockcode', [
'body' => '{
"BillbeeId": 0,
"Sku": "",
"StockCode": "",
"StockId": 0
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/api/v1/products/updatestockcode');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'BillbeeId' => 0,
'Sku' => '',
'StockCode' => '',
'StockId' => 0
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'BillbeeId' => 0,
'Sku' => '',
'StockCode' => '',
'StockId' => 0
]));
$request->setRequestUrl('{{baseUrl}}/api/v1/products/updatestockcode');
$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}}/api/v1/products/updatestockcode' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"BillbeeId": 0,
"Sku": "",
"StockCode": "",
"StockId": 0
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/v1/products/updatestockcode' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"BillbeeId": 0,
"Sku": "",
"StockCode": "",
"StockId": 0
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"BillbeeId\": 0,\n \"Sku\": \"\",\n \"StockCode\": \"\",\n \"StockId\": 0\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/api/v1/products/updatestockcode", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/v1/products/updatestockcode"
payload = {
"BillbeeId": 0,
"Sku": "",
"StockCode": "",
"StockId": 0
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/v1/products/updatestockcode"
payload <- "{\n \"BillbeeId\": 0,\n \"Sku\": \"\",\n \"StockCode\": \"\",\n \"StockId\": 0\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}}/api/v1/products/updatestockcode")
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 \"BillbeeId\": 0,\n \"Sku\": \"\",\n \"StockCode\": \"\",\n \"StockId\": 0\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/api/v1/products/updatestockcode') do |req|
req.body = "{\n \"BillbeeId\": 0,\n \"Sku\": \"\",\n \"StockCode\": \"\",\n \"StockId\": 0\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/api/v1/products/updatestockcode";
let payload = json!({
"BillbeeId": 0,
"Sku": "",
"StockCode": "",
"StockId": 0
});
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}}/api/v1/products/updatestockcode \
--header 'content-type: application/json' \
--data '{
"BillbeeId": 0,
"Sku": "",
"StockCode": "",
"StockId": 0
}'
echo '{
"BillbeeId": 0,
"Sku": "",
"StockCode": "",
"StockId": 0
}' | \
http POST {{baseUrl}}/api/v1/products/updatestockcode \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "BillbeeId": 0,\n "Sku": "",\n "StockCode": "",\n "StockId": 0\n}' \
--output-document \
- {{baseUrl}}/api/v1/products/updatestockcode
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"BillbeeId": 0,
"Sku": "",
"StockCode": "",
"StockId": 0
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/v1/products/updatestockcode")! 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
Update the stock qty for multiple articles at once
{{baseUrl}}/api/v1/products/updatestockmultiple
BODY json
[
{
"AutosubtractReservedAmount": false,
"BillbeeId": 0,
"DeltaQuantity": "",
"ForceSendStockToShops": false,
"NewQuantity": "",
"OldQuantity": "",
"Reason": "",
"Sku": "",
"StockId": 0
}
]
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/v1/products/updatestockmultiple");
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 {\n \"AutosubtractReservedAmount\": false,\n \"BillbeeId\": 0,\n \"DeltaQuantity\": \"\",\n \"ForceSendStockToShops\": false,\n \"NewQuantity\": \"\",\n \"OldQuantity\": \"\",\n \"Reason\": \"\",\n \"Sku\": \"\",\n \"StockId\": 0\n }\n]");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/api/v1/products/updatestockmultiple" {:content-type :json
:form-params [{:AutosubtractReservedAmount false
:BillbeeId 0
:DeltaQuantity ""
:ForceSendStockToShops false
:NewQuantity ""
:OldQuantity ""
:Reason ""
:Sku ""
:StockId 0}]})
require "http/client"
url = "{{baseUrl}}/api/v1/products/updatestockmultiple"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "[\n {\n \"AutosubtractReservedAmount\": false,\n \"BillbeeId\": 0,\n \"DeltaQuantity\": \"\",\n \"ForceSendStockToShops\": false,\n \"NewQuantity\": \"\",\n \"OldQuantity\": \"\",\n \"Reason\": \"\",\n \"Sku\": \"\",\n \"StockId\": 0\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}}/api/v1/products/updatestockmultiple"),
Content = new StringContent("[\n {\n \"AutosubtractReservedAmount\": false,\n \"BillbeeId\": 0,\n \"DeltaQuantity\": \"\",\n \"ForceSendStockToShops\": false,\n \"NewQuantity\": \"\",\n \"OldQuantity\": \"\",\n \"Reason\": \"\",\n \"Sku\": \"\",\n \"StockId\": 0\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}}/api/v1/products/updatestockmultiple");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "[\n {\n \"AutosubtractReservedAmount\": false,\n \"BillbeeId\": 0,\n \"DeltaQuantity\": \"\",\n \"ForceSendStockToShops\": false,\n \"NewQuantity\": \"\",\n \"OldQuantity\": \"\",\n \"Reason\": \"\",\n \"Sku\": \"\",\n \"StockId\": 0\n }\n]", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/v1/products/updatestockmultiple"
payload := strings.NewReader("[\n {\n \"AutosubtractReservedAmount\": false,\n \"BillbeeId\": 0,\n \"DeltaQuantity\": \"\",\n \"ForceSendStockToShops\": false,\n \"NewQuantity\": \"\",\n \"OldQuantity\": \"\",\n \"Reason\": \"\",\n \"Sku\": \"\",\n \"StockId\": 0\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/api/v1/products/updatestockmultiple HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 229
[
{
"AutosubtractReservedAmount": false,
"BillbeeId": 0,
"DeltaQuantity": "",
"ForceSendStockToShops": false,
"NewQuantity": "",
"OldQuantity": "",
"Reason": "",
"Sku": "",
"StockId": 0
}
]
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/api/v1/products/updatestockmultiple")
.setHeader("content-type", "application/json")
.setBody("[\n {\n \"AutosubtractReservedAmount\": false,\n \"BillbeeId\": 0,\n \"DeltaQuantity\": \"\",\n \"ForceSendStockToShops\": false,\n \"NewQuantity\": \"\",\n \"OldQuantity\": \"\",\n \"Reason\": \"\",\n \"Sku\": \"\",\n \"StockId\": 0\n }\n]")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/v1/products/updatestockmultiple"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("[\n {\n \"AutosubtractReservedAmount\": false,\n \"BillbeeId\": 0,\n \"DeltaQuantity\": \"\",\n \"ForceSendStockToShops\": false,\n \"NewQuantity\": \"\",\n \"OldQuantity\": \"\",\n \"Reason\": \"\",\n \"Sku\": \"\",\n \"StockId\": 0\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 {\n \"AutosubtractReservedAmount\": false,\n \"BillbeeId\": 0,\n \"DeltaQuantity\": \"\",\n \"ForceSendStockToShops\": false,\n \"NewQuantity\": \"\",\n \"OldQuantity\": \"\",\n \"Reason\": \"\",\n \"Sku\": \"\",\n \"StockId\": 0\n }\n]");
Request request = new Request.Builder()
.url("{{baseUrl}}/api/v1/products/updatestockmultiple")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/api/v1/products/updatestockmultiple")
.header("content-type", "application/json")
.body("[\n {\n \"AutosubtractReservedAmount\": false,\n \"BillbeeId\": 0,\n \"DeltaQuantity\": \"\",\n \"ForceSendStockToShops\": false,\n \"NewQuantity\": \"\",\n \"OldQuantity\": \"\",\n \"Reason\": \"\",\n \"Sku\": \"\",\n \"StockId\": 0\n }\n]")
.asString();
const data = JSON.stringify([
{
AutosubtractReservedAmount: false,
BillbeeId: 0,
DeltaQuantity: '',
ForceSendStockToShops: false,
NewQuantity: '',
OldQuantity: '',
Reason: '',
Sku: '',
StockId: 0
}
]);
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/api/v1/products/updatestockmultiple');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/api/v1/products/updatestockmultiple',
headers: {'content-type': 'application/json'},
data: [
{
AutosubtractReservedAmount: false,
BillbeeId: 0,
DeltaQuantity: '',
ForceSendStockToShops: false,
NewQuantity: '',
OldQuantity: '',
Reason: '',
Sku: '',
StockId: 0
}
]
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/v1/products/updatestockmultiple';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '[{"AutosubtractReservedAmount":false,"BillbeeId":0,"DeltaQuantity":"","ForceSendStockToShops":false,"NewQuantity":"","OldQuantity":"","Reason":"","Sku":"","StockId":0}]'
};
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}}/api/v1/products/updatestockmultiple',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '[\n {\n "AutosubtractReservedAmount": false,\n "BillbeeId": 0,\n "DeltaQuantity": "",\n "ForceSendStockToShops": false,\n "NewQuantity": "",\n "OldQuantity": "",\n "Reason": "",\n "Sku": "",\n "StockId": 0\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 {\n \"AutosubtractReservedAmount\": false,\n \"BillbeeId\": 0,\n \"DeltaQuantity\": \"\",\n \"ForceSendStockToShops\": false,\n \"NewQuantity\": \"\",\n \"OldQuantity\": \"\",\n \"Reason\": \"\",\n \"Sku\": \"\",\n \"StockId\": 0\n }\n]")
val request = Request.Builder()
.url("{{baseUrl}}/api/v1/products/updatestockmultiple")
.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/api/v1/products/updatestockmultiple',
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([
{
AutosubtractReservedAmount: false,
BillbeeId: 0,
DeltaQuantity: '',
ForceSendStockToShops: false,
NewQuantity: '',
OldQuantity: '',
Reason: '',
Sku: '',
StockId: 0
}
]));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/api/v1/products/updatestockmultiple',
headers: {'content-type': 'application/json'},
body: [
{
AutosubtractReservedAmount: false,
BillbeeId: 0,
DeltaQuantity: '',
ForceSendStockToShops: false,
NewQuantity: '',
OldQuantity: '',
Reason: '',
Sku: '',
StockId: 0
}
],
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}}/api/v1/products/updatestockmultiple');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send([
{
AutosubtractReservedAmount: false,
BillbeeId: 0,
DeltaQuantity: '',
ForceSendStockToShops: false,
NewQuantity: '',
OldQuantity: '',
Reason: '',
Sku: '',
StockId: 0
}
]);
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}}/api/v1/products/updatestockmultiple',
headers: {'content-type': 'application/json'},
data: [
{
AutosubtractReservedAmount: false,
BillbeeId: 0,
DeltaQuantity: '',
ForceSendStockToShops: false,
NewQuantity: '',
OldQuantity: '',
Reason: '',
Sku: '',
StockId: 0
}
]
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/v1/products/updatestockmultiple';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '[{"AutosubtractReservedAmount":false,"BillbeeId":0,"DeltaQuantity":"","ForceSendStockToShops":false,"NewQuantity":"","OldQuantity":"","Reason":"","Sku":"","StockId":0}]'
};
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 = @[ @{ @"AutosubtractReservedAmount": @NO, @"BillbeeId": @0, @"DeltaQuantity": @"", @"ForceSendStockToShops": @NO, @"NewQuantity": @"", @"OldQuantity": @"", @"Reason": @"", @"Sku": @"", @"StockId": @0 } ];
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/api/v1/products/updatestockmultiple"]
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}}/api/v1/products/updatestockmultiple" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "[\n {\n \"AutosubtractReservedAmount\": false,\n \"BillbeeId\": 0,\n \"DeltaQuantity\": \"\",\n \"ForceSendStockToShops\": false,\n \"NewQuantity\": \"\",\n \"OldQuantity\": \"\",\n \"Reason\": \"\",\n \"Sku\": \"\",\n \"StockId\": 0\n }\n]" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/v1/products/updatestockmultiple",
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([
[
'AutosubtractReservedAmount' => null,
'BillbeeId' => 0,
'DeltaQuantity' => '',
'ForceSendStockToShops' => null,
'NewQuantity' => '',
'OldQuantity' => '',
'Reason' => '',
'Sku' => '',
'StockId' => 0
]
]),
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}}/api/v1/products/updatestockmultiple', [
'body' => '[
{
"AutosubtractReservedAmount": false,
"BillbeeId": 0,
"DeltaQuantity": "",
"ForceSendStockToShops": false,
"NewQuantity": "",
"OldQuantity": "",
"Reason": "",
"Sku": "",
"StockId": 0
}
]',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/api/v1/products/updatestockmultiple');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
[
'AutosubtractReservedAmount' => null,
'BillbeeId' => 0,
'DeltaQuantity' => '',
'ForceSendStockToShops' => null,
'NewQuantity' => '',
'OldQuantity' => '',
'Reason' => '',
'Sku' => '',
'StockId' => 0
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
[
'AutosubtractReservedAmount' => null,
'BillbeeId' => 0,
'DeltaQuantity' => '',
'ForceSendStockToShops' => null,
'NewQuantity' => '',
'OldQuantity' => '',
'Reason' => '',
'Sku' => '',
'StockId' => 0
]
]));
$request->setRequestUrl('{{baseUrl}}/api/v1/products/updatestockmultiple');
$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}}/api/v1/products/updatestockmultiple' -Method POST -Headers $headers -ContentType 'application/json' -Body '[
{
"AutosubtractReservedAmount": false,
"BillbeeId": 0,
"DeltaQuantity": "",
"ForceSendStockToShops": false,
"NewQuantity": "",
"OldQuantity": "",
"Reason": "",
"Sku": "",
"StockId": 0
}
]'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/v1/products/updatestockmultiple' -Method POST -Headers $headers -ContentType 'application/json' -Body '[
{
"AutosubtractReservedAmount": false,
"BillbeeId": 0,
"DeltaQuantity": "",
"ForceSendStockToShops": false,
"NewQuantity": "",
"OldQuantity": "",
"Reason": "",
"Sku": "",
"StockId": 0
}
]'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "[\n {\n \"AutosubtractReservedAmount\": false,\n \"BillbeeId\": 0,\n \"DeltaQuantity\": \"\",\n \"ForceSendStockToShops\": false,\n \"NewQuantity\": \"\",\n \"OldQuantity\": \"\",\n \"Reason\": \"\",\n \"Sku\": \"\",\n \"StockId\": 0\n }\n]"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/api/v1/products/updatestockmultiple", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/v1/products/updatestockmultiple"
payload = [
{
"AutosubtractReservedAmount": False,
"BillbeeId": 0,
"DeltaQuantity": "",
"ForceSendStockToShops": False,
"NewQuantity": "",
"OldQuantity": "",
"Reason": "",
"Sku": "",
"StockId": 0
}
]
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/v1/products/updatestockmultiple"
payload <- "[\n {\n \"AutosubtractReservedAmount\": false,\n \"BillbeeId\": 0,\n \"DeltaQuantity\": \"\",\n \"ForceSendStockToShops\": false,\n \"NewQuantity\": \"\",\n \"OldQuantity\": \"\",\n \"Reason\": \"\",\n \"Sku\": \"\",\n \"StockId\": 0\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}}/api/v1/products/updatestockmultiple")
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 {\n \"AutosubtractReservedAmount\": false,\n \"BillbeeId\": 0,\n \"DeltaQuantity\": \"\",\n \"ForceSendStockToShops\": false,\n \"NewQuantity\": \"\",\n \"OldQuantity\": \"\",\n \"Reason\": \"\",\n \"Sku\": \"\",\n \"StockId\": 0\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/api/v1/products/updatestockmultiple') do |req|
req.body = "[\n {\n \"AutosubtractReservedAmount\": false,\n \"BillbeeId\": 0,\n \"DeltaQuantity\": \"\",\n \"ForceSendStockToShops\": false,\n \"NewQuantity\": \"\",\n \"OldQuantity\": \"\",\n \"Reason\": \"\",\n \"Sku\": \"\",\n \"StockId\": 0\n }\n]"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/api/v1/products/updatestockmultiple";
let payload = (
json!({
"AutosubtractReservedAmount": false,
"BillbeeId": 0,
"DeltaQuantity": "",
"ForceSendStockToShops": false,
"NewQuantity": "",
"OldQuantity": "",
"Reason": "",
"Sku": "",
"StockId": 0
})
);
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}}/api/v1/products/updatestockmultiple \
--header 'content-type: application/json' \
--data '[
{
"AutosubtractReservedAmount": false,
"BillbeeId": 0,
"DeltaQuantity": "",
"ForceSendStockToShops": false,
"NewQuantity": "",
"OldQuantity": "",
"Reason": "",
"Sku": "",
"StockId": 0
}
]'
echo '[
{
"AutosubtractReservedAmount": false,
"BillbeeId": 0,
"DeltaQuantity": "",
"ForceSendStockToShops": false,
"NewQuantity": "",
"OldQuantity": "",
"Reason": "",
"Sku": "",
"StockId": 0
}
]' | \
http POST {{baseUrl}}/api/v1/products/updatestockmultiple \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '[\n {\n "AutosubtractReservedAmount": false,\n "BillbeeId": 0,\n "DeltaQuantity": "",\n "ForceSendStockToShops": false,\n "NewQuantity": "",\n "OldQuantity": "",\n "Reason": "",\n "Sku": "",\n "StockId": 0\n }\n]' \
--output-document \
- {{baseUrl}}/api/v1/products/updatestockmultiple
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
[
"AutosubtractReservedAmount": false,
"BillbeeId": 0,
"DeltaQuantity": "",
"ForceSendStockToShops": false,
"NewQuantity": "",
"OldQuantity": "",
"Reason": "",
"Sku": "",
"StockId": 0
]
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/v1/products/updatestockmultiple")! 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
Update the stock qty of an article
{{baseUrl}}/api/v1/products/updatestock
BODY json
{
"AutosubtractReservedAmount": false,
"BillbeeId": 0,
"DeltaQuantity": "",
"ForceSendStockToShops": false,
"NewQuantity": "",
"OldQuantity": "",
"Reason": "",
"Sku": "",
"StockId": 0
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/v1/products/updatestock");
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 \"AutosubtractReservedAmount\": false,\n \"BillbeeId\": 0,\n \"DeltaQuantity\": \"\",\n \"ForceSendStockToShops\": false,\n \"NewQuantity\": \"\",\n \"OldQuantity\": \"\",\n \"Reason\": \"\",\n \"Sku\": \"\",\n \"StockId\": 0\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/api/v1/products/updatestock" {:content-type :json
:form-params {:AutosubtractReservedAmount false
:BillbeeId 0
:DeltaQuantity ""
:ForceSendStockToShops false
:NewQuantity ""
:OldQuantity ""
:Reason ""
:Sku ""
:StockId 0}})
require "http/client"
url = "{{baseUrl}}/api/v1/products/updatestock"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"AutosubtractReservedAmount\": false,\n \"BillbeeId\": 0,\n \"DeltaQuantity\": \"\",\n \"ForceSendStockToShops\": false,\n \"NewQuantity\": \"\",\n \"OldQuantity\": \"\",\n \"Reason\": \"\",\n \"Sku\": \"\",\n \"StockId\": 0\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}}/api/v1/products/updatestock"),
Content = new StringContent("{\n \"AutosubtractReservedAmount\": false,\n \"BillbeeId\": 0,\n \"DeltaQuantity\": \"\",\n \"ForceSendStockToShops\": false,\n \"NewQuantity\": \"\",\n \"OldQuantity\": \"\",\n \"Reason\": \"\",\n \"Sku\": \"\",\n \"StockId\": 0\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}}/api/v1/products/updatestock");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"AutosubtractReservedAmount\": false,\n \"BillbeeId\": 0,\n \"DeltaQuantity\": \"\",\n \"ForceSendStockToShops\": false,\n \"NewQuantity\": \"\",\n \"OldQuantity\": \"\",\n \"Reason\": \"\",\n \"Sku\": \"\",\n \"StockId\": 0\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/v1/products/updatestock"
payload := strings.NewReader("{\n \"AutosubtractReservedAmount\": false,\n \"BillbeeId\": 0,\n \"DeltaQuantity\": \"\",\n \"ForceSendStockToShops\": false,\n \"NewQuantity\": \"\",\n \"OldQuantity\": \"\",\n \"Reason\": \"\",\n \"Sku\": \"\",\n \"StockId\": 0\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/api/v1/products/updatestock HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 203
{
"AutosubtractReservedAmount": false,
"BillbeeId": 0,
"DeltaQuantity": "",
"ForceSendStockToShops": false,
"NewQuantity": "",
"OldQuantity": "",
"Reason": "",
"Sku": "",
"StockId": 0
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/api/v1/products/updatestock")
.setHeader("content-type", "application/json")
.setBody("{\n \"AutosubtractReservedAmount\": false,\n \"BillbeeId\": 0,\n \"DeltaQuantity\": \"\",\n \"ForceSendStockToShops\": false,\n \"NewQuantity\": \"\",\n \"OldQuantity\": \"\",\n \"Reason\": \"\",\n \"Sku\": \"\",\n \"StockId\": 0\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/v1/products/updatestock"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"AutosubtractReservedAmount\": false,\n \"BillbeeId\": 0,\n \"DeltaQuantity\": \"\",\n \"ForceSendStockToShops\": false,\n \"NewQuantity\": \"\",\n \"OldQuantity\": \"\",\n \"Reason\": \"\",\n \"Sku\": \"\",\n \"StockId\": 0\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 \"AutosubtractReservedAmount\": false,\n \"BillbeeId\": 0,\n \"DeltaQuantity\": \"\",\n \"ForceSendStockToShops\": false,\n \"NewQuantity\": \"\",\n \"OldQuantity\": \"\",\n \"Reason\": \"\",\n \"Sku\": \"\",\n \"StockId\": 0\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/api/v1/products/updatestock")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/api/v1/products/updatestock")
.header("content-type", "application/json")
.body("{\n \"AutosubtractReservedAmount\": false,\n \"BillbeeId\": 0,\n \"DeltaQuantity\": \"\",\n \"ForceSendStockToShops\": false,\n \"NewQuantity\": \"\",\n \"OldQuantity\": \"\",\n \"Reason\": \"\",\n \"Sku\": \"\",\n \"StockId\": 0\n}")
.asString();
const data = JSON.stringify({
AutosubtractReservedAmount: false,
BillbeeId: 0,
DeltaQuantity: '',
ForceSendStockToShops: false,
NewQuantity: '',
OldQuantity: '',
Reason: '',
Sku: '',
StockId: 0
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/api/v1/products/updatestock');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/api/v1/products/updatestock',
headers: {'content-type': 'application/json'},
data: {
AutosubtractReservedAmount: false,
BillbeeId: 0,
DeltaQuantity: '',
ForceSendStockToShops: false,
NewQuantity: '',
OldQuantity: '',
Reason: '',
Sku: '',
StockId: 0
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/v1/products/updatestock';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"AutosubtractReservedAmount":false,"BillbeeId":0,"DeltaQuantity":"","ForceSendStockToShops":false,"NewQuantity":"","OldQuantity":"","Reason":"","Sku":"","StockId":0}'
};
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}}/api/v1/products/updatestock',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "AutosubtractReservedAmount": false,\n "BillbeeId": 0,\n "DeltaQuantity": "",\n "ForceSendStockToShops": false,\n "NewQuantity": "",\n "OldQuantity": "",\n "Reason": "",\n "Sku": "",\n "StockId": 0\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"AutosubtractReservedAmount\": false,\n \"BillbeeId\": 0,\n \"DeltaQuantity\": \"\",\n \"ForceSendStockToShops\": false,\n \"NewQuantity\": \"\",\n \"OldQuantity\": \"\",\n \"Reason\": \"\",\n \"Sku\": \"\",\n \"StockId\": 0\n}")
val request = Request.Builder()
.url("{{baseUrl}}/api/v1/products/updatestock")
.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/api/v1/products/updatestock',
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({
AutosubtractReservedAmount: false,
BillbeeId: 0,
DeltaQuantity: '',
ForceSendStockToShops: false,
NewQuantity: '',
OldQuantity: '',
Reason: '',
Sku: '',
StockId: 0
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/api/v1/products/updatestock',
headers: {'content-type': 'application/json'},
body: {
AutosubtractReservedAmount: false,
BillbeeId: 0,
DeltaQuantity: '',
ForceSendStockToShops: false,
NewQuantity: '',
OldQuantity: '',
Reason: '',
Sku: '',
StockId: 0
},
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}}/api/v1/products/updatestock');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
AutosubtractReservedAmount: false,
BillbeeId: 0,
DeltaQuantity: '',
ForceSendStockToShops: false,
NewQuantity: '',
OldQuantity: '',
Reason: '',
Sku: '',
StockId: 0
});
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}}/api/v1/products/updatestock',
headers: {'content-type': 'application/json'},
data: {
AutosubtractReservedAmount: false,
BillbeeId: 0,
DeltaQuantity: '',
ForceSendStockToShops: false,
NewQuantity: '',
OldQuantity: '',
Reason: '',
Sku: '',
StockId: 0
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/v1/products/updatestock';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"AutosubtractReservedAmount":false,"BillbeeId":0,"DeltaQuantity":"","ForceSendStockToShops":false,"NewQuantity":"","OldQuantity":"","Reason":"","Sku":"","StockId":0}'
};
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 = @{ @"AutosubtractReservedAmount": @NO,
@"BillbeeId": @0,
@"DeltaQuantity": @"",
@"ForceSendStockToShops": @NO,
@"NewQuantity": @"",
@"OldQuantity": @"",
@"Reason": @"",
@"Sku": @"",
@"StockId": @0 };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/api/v1/products/updatestock"]
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}}/api/v1/products/updatestock" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"AutosubtractReservedAmount\": false,\n \"BillbeeId\": 0,\n \"DeltaQuantity\": \"\",\n \"ForceSendStockToShops\": false,\n \"NewQuantity\": \"\",\n \"OldQuantity\": \"\",\n \"Reason\": \"\",\n \"Sku\": \"\",\n \"StockId\": 0\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/v1/products/updatestock",
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([
'AutosubtractReservedAmount' => null,
'BillbeeId' => 0,
'DeltaQuantity' => '',
'ForceSendStockToShops' => null,
'NewQuantity' => '',
'OldQuantity' => '',
'Reason' => '',
'Sku' => '',
'StockId' => 0
]),
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}}/api/v1/products/updatestock', [
'body' => '{
"AutosubtractReservedAmount": false,
"BillbeeId": 0,
"DeltaQuantity": "",
"ForceSendStockToShops": false,
"NewQuantity": "",
"OldQuantity": "",
"Reason": "",
"Sku": "",
"StockId": 0
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/api/v1/products/updatestock');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'AutosubtractReservedAmount' => null,
'BillbeeId' => 0,
'DeltaQuantity' => '',
'ForceSendStockToShops' => null,
'NewQuantity' => '',
'OldQuantity' => '',
'Reason' => '',
'Sku' => '',
'StockId' => 0
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'AutosubtractReservedAmount' => null,
'BillbeeId' => 0,
'DeltaQuantity' => '',
'ForceSendStockToShops' => null,
'NewQuantity' => '',
'OldQuantity' => '',
'Reason' => '',
'Sku' => '',
'StockId' => 0
]));
$request->setRequestUrl('{{baseUrl}}/api/v1/products/updatestock');
$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}}/api/v1/products/updatestock' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"AutosubtractReservedAmount": false,
"BillbeeId": 0,
"DeltaQuantity": "",
"ForceSendStockToShops": false,
"NewQuantity": "",
"OldQuantity": "",
"Reason": "",
"Sku": "",
"StockId": 0
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/v1/products/updatestock' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"AutosubtractReservedAmount": false,
"BillbeeId": 0,
"DeltaQuantity": "",
"ForceSendStockToShops": false,
"NewQuantity": "",
"OldQuantity": "",
"Reason": "",
"Sku": "",
"StockId": 0
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"AutosubtractReservedAmount\": false,\n \"BillbeeId\": 0,\n \"DeltaQuantity\": \"\",\n \"ForceSendStockToShops\": false,\n \"NewQuantity\": \"\",\n \"OldQuantity\": \"\",\n \"Reason\": \"\",\n \"Sku\": \"\",\n \"StockId\": 0\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/api/v1/products/updatestock", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/v1/products/updatestock"
payload = {
"AutosubtractReservedAmount": False,
"BillbeeId": 0,
"DeltaQuantity": "",
"ForceSendStockToShops": False,
"NewQuantity": "",
"OldQuantity": "",
"Reason": "",
"Sku": "",
"StockId": 0
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/v1/products/updatestock"
payload <- "{\n \"AutosubtractReservedAmount\": false,\n \"BillbeeId\": 0,\n \"DeltaQuantity\": \"\",\n \"ForceSendStockToShops\": false,\n \"NewQuantity\": \"\",\n \"OldQuantity\": \"\",\n \"Reason\": \"\",\n \"Sku\": \"\",\n \"StockId\": 0\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}}/api/v1/products/updatestock")
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 \"AutosubtractReservedAmount\": false,\n \"BillbeeId\": 0,\n \"DeltaQuantity\": \"\",\n \"ForceSendStockToShops\": false,\n \"NewQuantity\": \"\",\n \"OldQuantity\": \"\",\n \"Reason\": \"\",\n \"Sku\": \"\",\n \"StockId\": 0\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/api/v1/products/updatestock') do |req|
req.body = "{\n \"AutosubtractReservedAmount\": false,\n \"BillbeeId\": 0,\n \"DeltaQuantity\": \"\",\n \"ForceSendStockToShops\": false,\n \"NewQuantity\": \"\",\n \"OldQuantity\": \"\",\n \"Reason\": \"\",\n \"Sku\": \"\",\n \"StockId\": 0\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/api/v1/products/updatestock";
let payload = json!({
"AutosubtractReservedAmount": false,
"BillbeeId": 0,
"DeltaQuantity": "",
"ForceSendStockToShops": false,
"NewQuantity": "",
"OldQuantity": "",
"Reason": "",
"Sku": "",
"StockId": 0
});
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}}/api/v1/products/updatestock \
--header 'content-type: application/json' \
--data '{
"AutosubtractReservedAmount": false,
"BillbeeId": 0,
"DeltaQuantity": "",
"ForceSendStockToShops": false,
"NewQuantity": "",
"OldQuantity": "",
"Reason": "",
"Sku": "",
"StockId": 0
}'
echo '{
"AutosubtractReservedAmount": false,
"BillbeeId": 0,
"DeltaQuantity": "",
"ForceSendStockToShops": false,
"NewQuantity": "",
"OldQuantity": "",
"Reason": "",
"Sku": "",
"StockId": 0
}' | \
http POST {{baseUrl}}/api/v1/products/updatestock \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "AutosubtractReservedAmount": false,\n "BillbeeId": 0,\n "DeltaQuantity": "",\n "ForceSendStockToShops": false,\n "NewQuantity": "",\n "OldQuantity": "",\n "Reason": "",\n "Sku": "",\n "StockId": 0\n}' \
--output-document \
- {{baseUrl}}/api/v1/products/updatestock
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"AutosubtractReservedAmount": false,
"BillbeeId": 0,
"DeltaQuantity": "",
"ForceSendStockToShops": false,
"NewQuantity": "",
"OldQuantity": "",
"Reason": "",
"Sku": "",
"StockId": 0
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/v1/products/updatestock")! 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()
PATCH
Updates one or more fields of a product
{{baseUrl}}/api/v1/products/:id
QUERY PARAMS
id
BODY json
{}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/v1/products/: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, "{}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/patch "{{baseUrl}}/api/v1/products/:id" {:content-type :json})
require "http/client"
url = "{{baseUrl}}/api/v1/products/:id"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{}"
response = HTTP::Client.patch url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Patch,
RequestUri = new Uri("{{baseUrl}}/api/v1/products/:id"),
Content = new StringContent("{}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/api/v1/products/:id");
var request = new RestRequest("", Method.Patch);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/v1/products/:id"
payload := strings.NewReader("{}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
PATCH /baseUrl/api/v1/products/:id HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 2
{}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PATCH", "{{baseUrl}}/api/v1/products/:id")
.setHeader("content-type", "application/json")
.setBody("{}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/v1/products/:id"))
.header("content-type", "application/json")
.method("PATCH", HttpRequest.BodyPublishers.ofString("{}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{}");
Request request = new Request.Builder()
.url("{{baseUrl}}/api/v1/products/:id")
.patch(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.patch("{{baseUrl}}/api/v1/products/:id")
.header("content-type", "application/json")
.body("{}")
.asString();
const data = JSON.stringify({});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PATCH', '{{baseUrl}}/api/v1/products/:id');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PATCH',
url: '{{baseUrl}}/api/v1/products/:id',
headers: {'content-type': 'application/json'},
data: {}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/v1/products/:id';
const options = {method: 'PATCH', headers: {'content-type': 'application/json'}, body: '{}'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/api/v1/products/:id',
method: 'PATCH',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{}")
val request = Request.Builder()
.url("{{baseUrl}}/api/v1/products/:id")
.patch(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PATCH',
hostname: 'example.com',
port: null,
path: '/baseUrl/api/v1/products/: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({}));
req.end();
const request = require('request');
const options = {
method: 'PATCH',
url: '{{baseUrl}}/api/v1/products/:id',
headers: {'content-type': 'application/json'},
body: {},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PATCH', '{{baseUrl}}/api/v1/products/:id');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PATCH',
url: '{{baseUrl}}/api/v1/products/:id',
headers: {'content-type': 'application/json'},
data: {}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/v1/products/:id';
const options = {method: 'PATCH', headers: {'content-type': 'application/json'}, body: '{}'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/api/v1/products/:id"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PATCH"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/api/v1/products/:id" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{}" in
Client.call ~headers ~body `PATCH uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/v1/products/:id",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('PATCH', '{{baseUrl}}/api/v1/products/:id', [
'body' => '{}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/api/v1/products/:id');
$request->setMethod(HttpRequest::HTTP_METH_PATCH);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
]));
$request->setRequestUrl('{{baseUrl}}/api/v1/products/:id');
$request->setRequestMethod('PATCH');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/api/v1/products/:id' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/v1/products/:id' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{}"
headers = { 'content-type': "application/json" }
conn.request("PATCH", "/baseUrl/api/v1/products/:id", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/v1/products/:id"
payload = {}
headers = {"content-type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/v1/products/:id"
payload <- "{}"
encode <- "json"
response <- VERB("PATCH", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/api/v1/products/:id")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["content-type"] = 'application/json'
request.body = "{}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.patch('/baseUrl/api/v1/products/:id') do |req|
req.body = "{}"
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}}/api/v1/products/:id";
let payload = json!({});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PATCH").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PATCH \
--url {{baseUrl}}/api/v1/products/:id \
--header 'content-type: application/json' \
--data '{}'
echo '{}' | \
http PATCH {{baseUrl}}/api/v1/products/:id \
content-type:application/json
wget --quiet \
--method PATCH \
--header 'content-type: application/json' \
--body-data '{}' \
--output-document \
- {{baseUrl}}/api/v1/products/:id
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/v1/products/:id")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PATCH"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
Creates a new Billbee user account with the data passed
{{baseUrl}}/api/v1/automaticprovision/createaccount
BODY json
{
"AcceptTerms": false,
"Address": {
"Address1": "",
"Address2": "",
"City": "",
"Company": "",
"Country": "",
"Name": "",
"VatId": "",
"Zip": ""
},
"AffiliateCouponCode": "",
"DefaultCurrrency": "",
"DefaultVatIndex": 0,
"DefaultVatMode": 0,
"EMail": "",
"Password": "",
"Vat1Rate": "",
"Vat2Rate": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/v1/automaticprovision/createaccount");
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 \"AcceptTerms\": false,\n \"Address\": {\n \"Address1\": \"\",\n \"Address2\": \"\",\n \"City\": \"\",\n \"Company\": \"\",\n \"Country\": \"\",\n \"Name\": \"\",\n \"VatId\": \"\",\n \"Zip\": \"\"\n },\n \"AffiliateCouponCode\": \"\",\n \"DefaultCurrrency\": \"\",\n \"DefaultVatIndex\": 0,\n \"DefaultVatMode\": 0,\n \"EMail\": \"\",\n \"Password\": \"\",\n \"Vat1Rate\": \"\",\n \"Vat2Rate\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/api/v1/automaticprovision/createaccount" {:content-type :json
:form-params {:AcceptTerms false
:Address {:Address1 ""
:Address2 ""
:City ""
:Company ""
:Country ""
:Name ""
:VatId ""
:Zip ""}
:AffiliateCouponCode ""
:DefaultCurrrency ""
:DefaultVatIndex 0
:DefaultVatMode 0
:EMail ""
:Password ""
:Vat1Rate ""
:Vat2Rate ""}})
require "http/client"
url = "{{baseUrl}}/api/v1/automaticprovision/createaccount"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"AcceptTerms\": false,\n \"Address\": {\n \"Address1\": \"\",\n \"Address2\": \"\",\n \"City\": \"\",\n \"Company\": \"\",\n \"Country\": \"\",\n \"Name\": \"\",\n \"VatId\": \"\",\n \"Zip\": \"\"\n },\n \"AffiliateCouponCode\": \"\",\n \"DefaultCurrrency\": \"\",\n \"DefaultVatIndex\": 0,\n \"DefaultVatMode\": 0,\n \"EMail\": \"\",\n \"Password\": \"\",\n \"Vat1Rate\": \"\",\n \"Vat2Rate\": \"\"\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}}/api/v1/automaticprovision/createaccount"),
Content = new StringContent("{\n \"AcceptTerms\": false,\n \"Address\": {\n \"Address1\": \"\",\n \"Address2\": \"\",\n \"City\": \"\",\n \"Company\": \"\",\n \"Country\": \"\",\n \"Name\": \"\",\n \"VatId\": \"\",\n \"Zip\": \"\"\n },\n \"AffiliateCouponCode\": \"\",\n \"DefaultCurrrency\": \"\",\n \"DefaultVatIndex\": 0,\n \"DefaultVatMode\": 0,\n \"EMail\": \"\",\n \"Password\": \"\",\n \"Vat1Rate\": \"\",\n \"Vat2Rate\": \"\"\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}}/api/v1/automaticprovision/createaccount");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"AcceptTerms\": false,\n \"Address\": {\n \"Address1\": \"\",\n \"Address2\": \"\",\n \"City\": \"\",\n \"Company\": \"\",\n \"Country\": \"\",\n \"Name\": \"\",\n \"VatId\": \"\",\n \"Zip\": \"\"\n },\n \"AffiliateCouponCode\": \"\",\n \"DefaultCurrrency\": \"\",\n \"DefaultVatIndex\": 0,\n \"DefaultVatMode\": 0,\n \"EMail\": \"\",\n \"Password\": \"\",\n \"Vat1Rate\": \"\",\n \"Vat2Rate\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/v1/automaticprovision/createaccount"
payload := strings.NewReader("{\n \"AcceptTerms\": false,\n \"Address\": {\n \"Address1\": \"\",\n \"Address2\": \"\",\n \"City\": \"\",\n \"Company\": \"\",\n \"Country\": \"\",\n \"Name\": \"\",\n \"VatId\": \"\",\n \"Zip\": \"\"\n },\n \"AffiliateCouponCode\": \"\",\n \"DefaultCurrrency\": \"\",\n \"DefaultVatIndex\": 0,\n \"DefaultVatMode\": 0,\n \"EMail\": \"\",\n \"Password\": \"\",\n \"Vat1Rate\": \"\",\n \"Vat2Rate\": \"\"\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/api/v1/automaticprovision/createaccount HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 358
{
"AcceptTerms": false,
"Address": {
"Address1": "",
"Address2": "",
"City": "",
"Company": "",
"Country": "",
"Name": "",
"VatId": "",
"Zip": ""
},
"AffiliateCouponCode": "",
"DefaultCurrrency": "",
"DefaultVatIndex": 0,
"DefaultVatMode": 0,
"EMail": "",
"Password": "",
"Vat1Rate": "",
"Vat2Rate": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/api/v1/automaticprovision/createaccount")
.setHeader("content-type", "application/json")
.setBody("{\n \"AcceptTerms\": false,\n \"Address\": {\n \"Address1\": \"\",\n \"Address2\": \"\",\n \"City\": \"\",\n \"Company\": \"\",\n \"Country\": \"\",\n \"Name\": \"\",\n \"VatId\": \"\",\n \"Zip\": \"\"\n },\n \"AffiliateCouponCode\": \"\",\n \"DefaultCurrrency\": \"\",\n \"DefaultVatIndex\": 0,\n \"DefaultVatMode\": 0,\n \"EMail\": \"\",\n \"Password\": \"\",\n \"Vat1Rate\": \"\",\n \"Vat2Rate\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/v1/automaticprovision/createaccount"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"AcceptTerms\": false,\n \"Address\": {\n \"Address1\": \"\",\n \"Address2\": \"\",\n \"City\": \"\",\n \"Company\": \"\",\n \"Country\": \"\",\n \"Name\": \"\",\n \"VatId\": \"\",\n \"Zip\": \"\"\n },\n \"AffiliateCouponCode\": \"\",\n \"DefaultCurrrency\": \"\",\n \"DefaultVatIndex\": 0,\n \"DefaultVatMode\": 0,\n \"EMail\": \"\",\n \"Password\": \"\",\n \"Vat1Rate\": \"\",\n \"Vat2Rate\": \"\"\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 \"AcceptTerms\": false,\n \"Address\": {\n \"Address1\": \"\",\n \"Address2\": \"\",\n \"City\": \"\",\n \"Company\": \"\",\n \"Country\": \"\",\n \"Name\": \"\",\n \"VatId\": \"\",\n \"Zip\": \"\"\n },\n \"AffiliateCouponCode\": \"\",\n \"DefaultCurrrency\": \"\",\n \"DefaultVatIndex\": 0,\n \"DefaultVatMode\": 0,\n \"EMail\": \"\",\n \"Password\": \"\",\n \"Vat1Rate\": \"\",\n \"Vat2Rate\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/api/v1/automaticprovision/createaccount")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/api/v1/automaticprovision/createaccount")
.header("content-type", "application/json")
.body("{\n \"AcceptTerms\": false,\n \"Address\": {\n \"Address1\": \"\",\n \"Address2\": \"\",\n \"City\": \"\",\n \"Company\": \"\",\n \"Country\": \"\",\n \"Name\": \"\",\n \"VatId\": \"\",\n \"Zip\": \"\"\n },\n \"AffiliateCouponCode\": \"\",\n \"DefaultCurrrency\": \"\",\n \"DefaultVatIndex\": 0,\n \"DefaultVatMode\": 0,\n \"EMail\": \"\",\n \"Password\": \"\",\n \"Vat1Rate\": \"\",\n \"Vat2Rate\": \"\"\n}")
.asString();
const data = JSON.stringify({
AcceptTerms: false,
Address: {
Address1: '',
Address2: '',
City: '',
Company: '',
Country: '',
Name: '',
VatId: '',
Zip: ''
},
AffiliateCouponCode: '',
DefaultCurrrency: '',
DefaultVatIndex: 0,
DefaultVatMode: 0,
EMail: '',
Password: '',
Vat1Rate: '',
Vat2Rate: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/api/v1/automaticprovision/createaccount');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/api/v1/automaticprovision/createaccount',
headers: {'content-type': 'application/json'},
data: {
AcceptTerms: false,
Address: {
Address1: '',
Address2: '',
City: '',
Company: '',
Country: '',
Name: '',
VatId: '',
Zip: ''
},
AffiliateCouponCode: '',
DefaultCurrrency: '',
DefaultVatIndex: 0,
DefaultVatMode: 0,
EMail: '',
Password: '',
Vat1Rate: '',
Vat2Rate: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/v1/automaticprovision/createaccount';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"AcceptTerms":false,"Address":{"Address1":"","Address2":"","City":"","Company":"","Country":"","Name":"","VatId":"","Zip":""},"AffiliateCouponCode":"","DefaultCurrrency":"","DefaultVatIndex":0,"DefaultVatMode":0,"EMail":"","Password":"","Vat1Rate":"","Vat2Rate":""}'
};
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}}/api/v1/automaticprovision/createaccount',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "AcceptTerms": false,\n "Address": {\n "Address1": "",\n "Address2": "",\n "City": "",\n "Company": "",\n "Country": "",\n "Name": "",\n "VatId": "",\n "Zip": ""\n },\n "AffiliateCouponCode": "",\n "DefaultCurrrency": "",\n "DefaultVatIndex": 0,\n "DefaultVatMode": 0,\n "EMail": "",\n "Password": "",\n "Vat1Rate": "",\n "Vat2Rate": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"AcceptTerms\": false,\n \"Address\": {\n \"Address1\": \"\",\n \"Address2\": \"\",\n \"City\": \"\",\n \"Company\": \"\",\n \"Country\": \"\",\n \"Name\": \"\",\n \"VatId\": \"\",\n \"Zip\": \"\"\n },\n \"AffiliateCouponCode\": \"\",\n \"DefaultCurrrency\": \"\",\n \"DefaultVatIndex\": 0,\n \"DefaultVatMode\": 0,\n \"EMail\": \"\",\n \"Password\": \"\",\n \"Vat1Rate\": \"\",\n \"Vat2Rate\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/api/v1/automaticprovision/createaccount")
.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/api/v1/automaticprovision/createaccount',
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({
AcceptTerms: false,
Address: {
Address1: '',
Address2: '',
City: '',
Company: '',
Country: '',
Name: '',
VatId: '',
Zip: ''
},
AffiliateCouponCode: '',
DefaultCurrrency: '',
DefaultVatIndex: 0,
DefaultVatMode: 0,
EMail: '',
Password: '',
Vat1Rate: '',
Vat2Rate: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/api/v1/automaticprovision/createaccount',
headers: {'content-type': 'application/json'},
body: {
AcceptTerms: false,
Address: {
Address1: '',
Address2: '',
City: '',
Company: '',
Country: '',
Name: '',
VatId: '',
Zip: ''
},
AffiliateCouponCode: '',
DefaultCurrrency: '',
DefaultVatIndex: 0,
DefaultVatMode: 0,
EMail: '',
Password: '',
Vat1Rate: '',
Vat2Rate: ''
},
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}}/api/v1/automaticprovision/createaccount');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
AcceptTerms: false,
Address: {
Address1: '',
Address2: '',
City: '',
Company: '',
Country: '',
Name: '',
VatId: '',
Zip: ''
},
AffiliateCouponCode: '',
DefaultCurrrency: '',
DefaultVatIndex: 0,
DefaultVatMode: 0,
EMail: '',
Password: '',
Vat1Rate: '',
Vat2Rate: ''
});
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}}/api/v1/automaticprovision/createaccount',
headers: {'content-type': 'application/json'},
data: {
AcceptTerms: false,
Address: {
Address1: '',
Address2: '',
City: '',
Company: '',
Country: '',
Name: '',
VatId: '',
Zip: ''
},
AffiliateCouponCode: '',
DefaultCurrrency: '',
DefaultVatIndex: 0,
DefaultVatMode: 0,
EMail: '',
Password: '',
Vat1Rate: '',
Vat2Rate: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/v1/automaticprovision/createaccount';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"AcceptTerms":false,"Address":{"Address1":"","Address2":"","City":"","Company":"","Country":"","Name":"","VatId":"","Zip":""},"AffiliateCouponCode":"","DefaultCurrrency":"","DefaultVatIndex":0,"DefaultVatMode":0,"EMail":"","Password":"","Vat1Rate":"","Vat2Rate":""}'
};
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 = @{ @"AcceptTerms": @NO,
@"Address": @{ @"Address1": @"", @"Address2": @"", @"City": @"", @"Company": @"", @"Country": @"", @"Name": @"", @"VatId": @"", @"Zip": @"" },
@"AffiliateCouponCode": @"",
@"DefaultCurrrency": @"",
@"DefaultVatIndex": @0,
@"DefaultVatMode": @0,
@"EMail": @"",
@"Password": @"",
@"Vat1Rate": @"",
@"Vat2Rate": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/api/v1/automaticprovision/createaccount"]
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}}/api/v1/automaticprovision/createaccount" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"AcceptTerms\": false,\n \"Address\": {\n \"Address1\": \"\",\n \"Address2\": \"\",\n \"City\": \"\",\n \"Company\": \"\",\n \"Country\": \"\",\n \"Name\": \"\",\n \"VatId\": \"\",\n \"Zip\": \"\"\n },\n \"AffiliateCouponCode\": \"\",\n \"DefaultCurrrency\": \"\",\n \"DefaultVatIndex\": 0,\n \"DefaultVatMode\": 0,\n \"EMail\": \"\",\n \"Password\": \"\",\n \"Vat1Rate\": \"\",\n \"Vat2Rate\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/v1/automaticprovision/createaccount",
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([
'AcceptTerms' => null,
'Address' => [
'Address1' => '',
'Address2' => '',
'City' => '',
'Company' => '',
'Country' => '',
'Name' => '',
'VatId' => '',
'Zip' => ''
],
'AffiliateCouponCode' => '',
'DefaultCurrrency' => '',
'DefaultVatIndex' => 0,
'DefaultVatMode' => 0,
'EMail' => '',
'Password' => '',
'Vat1Rate' => '',
'Vat2Rate' => ''
]),
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}}/api/v1/automaticprovision/createaccount', [
'body' => '{
"AcceptTerms": false,
"Address": {
"Address1": "",
"Address2": "",
"City": "",
"Company": "",
"Country": "",
"Name": "",
"VatId": "",
"Zip": ""
},
"AffiliateCouponCode": "",
"DefaultCurrrency": "",
"DefaultVatIndex": 0,
"DefaultVatMode": 0,
"EMail": "",
"Password": "",
"Vat1Rate": "",
"Vat2Rate": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/api/v1/automaticprovision/createaccount');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'AcceptTerms' => null,
'Address' => [
'Address1' => '',
'Address2' => '',
'City' => '',
'Company' => '',
'Country' => '',
'Name' => '',
'VatId' => '',
'Zip' => ''
],
'AffiliateCouponCode' => '',
'DefaultCurrrency' => '',
'DefaultVatIndex' => 0,
'DefaultVatMode' => 0,
'EMail' => '',
'Password' => '',
'Vat1Rate' => '',
'Vat2Rate' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'AcceptTerms' => null,
'Address' => [
'Address1' => '',
'Address2' => '',
'City' => '',
'Company' => '',
'Country' => '',
'Name' => '',
'VatId' => '',
'Zip' => ''
],
'AffiliateCouponCode' => '',
'DefaultCurrrency' => '',
'DefaultVatIndex' => 0,
'DefaultVatMode' => 0,
'EMail' => '',
'Password' => '',
'Vat1Rate' => '',
'Vat2Rate' => ''
]));
$request->setRequestUrl('{{baseUrl}}/api/v1/automaticprovision/createaccount');
$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}}/api/v1/automaticprovision/createaccount' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"AcceptTerms": false,
"Address": {
"Address1": "",
"Address2": "",
"City": "",
"Company": "",
"Country": "",
"Name": "",
"VatId": "",
"Zip": ""
},
"AffiliateCouponCode": "",
"DefaultCurrrency": "",
"DefaultVatIndex": 0,
"DefaultVatMode": 0,
"EMail": "",
"Password": "",
"Vat1Rate": "",
"Vat2Rate": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/v1/automaticprovision/createaccount' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"AcceptTerms": false,
"Address": {
"Address1": "",
"Address2": "",
"City": "",
"Company": "",
"Country": "",
"Name": "",
"VatId": "",
"Zip": ""
},
"AffiliateCouponCode": "",
"DefaultCurrrency": "",
"DefaultVatIndex": 0,
"DefaultVatMode": 0,
"EMail": "",
"Password": "",
"Vat1Rate": "",
"Vat2Rate": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"AcceptTerms\": false,\n \"Address\": {\n \"Address1\": \"\",\n \"Address2\": \"\",\n \"City\": \"\",\n \"Company\": \"\",\n \"Country\": \"\",\n \"Name\": \"\",\n \"VatId\": \"\",\n \"Zip\": \"\"\n },\n \"AffiliateCouponCode\": \"\",\n \"DefaultCurrrency\": \"\",\n \"DefaultVatIndex\": 0,\n \"DefaultVatMode\": 0,\n \"EMail\": \"\",\n \"Password\": \"\",\n \"Vat1Rate\": \"\",\n \"Vat2Rate\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/api/v1/automaticprovision/createaccount", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/v1/automaticprovision/createaccount"
payload = {
"AcceptTerms": False,
"Address": {
"Address1": "",
"Address2": "",
"City": "",
"Company": "",
"Country": "",
"Name": "",
"VatId": "",
"Zip": ""
},
"AffiliateCouponCode": "",
"DefaultCurrrency": "",
"DefaultVatIndex": 0,
"DefaultVatMode": 0,
"EMail": "",
"Password": "",
"Vat1Rate": "",
"Vat2Rate": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/v1/automaticprovision/createaccount"
payload <- "{\n \"AcceptTerms\": false,\n \"Address\": {\n \"Address1\": \"\",\n \"Address2\": \"\",\n \"City\": \"\",\n \"Company\": \"\",\n \"Country\": \"\",\n \"Name\": \"\",\n \"VatId\": \"\",\n \"Zip\": \"\"\n },\n \"AffiliateCouponCode\": \"\",\n \"DefaultCurrrency\": \"\",\n \"DefaultVatIndex\": 0,\n \"DefaultVatMode\": 0,\n \"EMail\": \"\",\n \"Password\": \"\",\n \"Vat1Rate\": \"\",\n \"Vat2Rate\": \"\"\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}}/api/v1/automaticprovision/createaccount")
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 \"AcceptTerms\": false,\n \"Address\": {\n \"Address1\": \"\",\n \"Address2\": \"\",\n \"City\": \"\",\n \"Company\": \"\",\n \"Country\": \"\",\n \"Name\": \"\",\n \"VatId\": \"\",\n \"Zip\": \"\"\n },\n \"AffiliateCouponCode\": \"\",\n \"DefaultCurrrency\": \"\",\n \"DefaultVatIndex\": 0,\n \"DefaultVatMode\": 0,\n \"EMail\": \"\",\n \"Password\": \"\",\n \"Vat1Rate\": \"\",\n \"Vat2Rate\": \"\"\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/api/v1/automaticprovision/createaccount') do |req|
req.body = "{\n \"AcceptTerms\": false,\n \"Address\": {\n \"Address1\": \"\",\n \"Address2\": \"\",\n \"City\": \"\",\n \"Company\": \"\",\n \"Country\": \"\",\n \"Name\": \"\",\n \"VatId\": \"\",\n \"Zip\": \"\"\n },\n \"AffiliateCouponCode\": \"\",\n \"DefaultCurrrency\": \"\",\n \"DefaultVatIndex\": 0,\n \"DefaultVatMode\": 0,\n \"EMail\": \"\",\n \"Password\": \"\",\n \"Vat1Rate\": \"\",\n \"Vat2Rate\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/api/v1/automaticprovision/createaccount";
let payload = json!({
"AcceptTerms": false,
"Address": json!({
"Address1": "",
"Address2": "",
"City": "",
"Company": "",
"Country": "",
"Name": "",
"VatId": "",
"Zip": ""
}),
"AffiliateCouponCode": "",
"DefaultCurrrency": "",
"DefaultVatIndex": 0,
"DefaultVatMode": 0,
"EMail": "",
"Password": "",
"Vat1Rate": "",
"Vat2Rate": ""
});
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}}/api/v1/automaticprovision/createaccount \
--header 'content-type: application/json' \
--data '{
"AcceptTerms": false,
"Address": {
"Address1": "",
"Address2": "",
"City": "",
"Company": "",
"Country": "",
"Name": "",
"VatId": "",
"Zip": ""
},
"AffiliateCouponCode": "",
"DefaultCurrrency": "",
"DefaultVatIndex": 0,
"DefaultVatMode": 0,
"EMail": "",
"Password": "",
"Vat1Rate": "",
"Vat2Rate": ""
}'
echo '{
"AcceptTerms": false,
"Address": {
"Address1": "",
"Address2": "",
"City": "",
"Company": "",
"Country": "",
"Name": "",
"VatId": "",
"Zip": ""
},
"AffiliateCouponCode": "",
"DefaultCurrrency": "",
"DefaultVatIndex": 0,
"DefaultVatMode": 0,
"EMail": "",
"Password": "",
"Vat1Rate": "",
"Vat2Rate": ""
}' | \
http POST {{baseUrl}}/api/v1/automaticprovision/createaccount \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "AcceptTerms": false,\n "Address": {\n "Address1": "",\n "Address2": "",\n "City": "",\n "Company": "",\n "Country": "",\n "Name": "",\n "VatId": "",\n "Zip": ""\n },\n "AffiliateCouponCode": "",\n "DefaultCurrrency": "",\n "DefaultVatIndex": 0,\n "DefaultVatMode": 0,\n "EMail": "",\n "Password": "",\n "Vat1Rate": "",\n "Vat2Rate": ""\n}' \
--output-document \
- {{baseUrl}}/api/v1/automaticprovision/createaccount
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"AcceptTerms": false,
"Address": [
"Address1": "",
"Address2": "",
"City": "",
"Company": "",
"Country": "",
"Name": "",
"VatId": "",
"Zip": ""
],
"AffiliateCouponCode": "",
"DefaultCurrrency": "",
"DefaultVatIndex": 0,
"DefaultVatMode": 0,
"EMail": "",
"Password": "",
"Vat1Rate": "",
"Vat2Rate": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/v1/automaticprovision/createaccount")! 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
Returns infos about Billbee terms and conditions
{{baseUrl}}/api/v1/automaticprovision/termsinfo
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/v1/automaticprovision/termsinfo");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/api/v1/automaticprovision/termsinfo")
require "http/client"
url = "{{baseUrl}}/api/v1/automaticprovision/termsinfo"
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}}/api/v1/automaticprovision/termsinfo"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/api/v1/automaticprovision/termsinfo");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/v1/automaticprovision/termsinfo"
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/api/v1/automaticprovision/termsinfo HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/api/v1/automaticprovision/termsinfo")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/v1/automaticprovision/termsinfo"))
.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}}/api/v1/automaticprovision/termsinfo")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/api/v1/automaticprovision/termsinfo")
.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}}/api/v1/automaticprovision/termsinfo');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/api/v1/automaticprovision/termsinfo'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/v1/automaticprovision/termsinfo';
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}}/api/v1/automaticprovision/termsinfo',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/api/v1/automaticprovision/termsinfo")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/api/v1/automaticprovision/termsinfo',
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}}/api/v1/automaticprovision/termsinfo'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/api/v1/automaticprovision/termsinfo');
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}}/api/v1/automaticprovision/termsinfo'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/v1/automaticprovision/termsinfo';
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}}/api/v1/automaticprovision/termsinfo"]
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}}/api/v1/automaticprovision/termsinfo" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/v1/automaticprovision/termsinfo",
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}}/api/v1/automaticprovision/termsinfo');
echo $response->getBody();
setUrl('{{baseUrl}}/api/v1/automaticprovision/termsinfo');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/api/v1/automaticprovision/termsinfo');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/api/v1/automaticprovision/termsinfo' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/v1/automaticprovision/termsinfo' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/api/v1/automaticprovision/termsinfo")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/v1/automaticprovision/termsinfo"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/v1/automaticprovision/termsinfo"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/api/v1/automaticprovision/termsinfo")
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/api/v1/automaticprovision/termsinfo') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/api/v1/automaticprovision/termsinfo";
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}}/api/v1/automaticprovision/termsinfo
http GET {{baseUrl}}/api/v1/automaticprovision/termsinfo
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/api/v1/automaticprovision/termsinfo
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/v1/automaticprovision/termsinfo")! 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
Creates a new shipment with the selected Shippingprovider
{{baseUrl}}/api/v1/shipment/shipment
BODY json
{
"ClientReference": "",
"Content": "",
"CustomerNumber": "",
"Dimension": {
"height": "",
"length": "",
"width": ""
},
"OrderCurrencyCode": "",
"OrderSum": "",
"PrinterIdForExportDocs": 0,
"PrinterName": "",
"ProductCode": "",
"ProviderName": "",
"ReceiverAddress": {
"AddressAddition": "",
"City": "",
"Company": "",
"CountryCode": "",
"CountryCodeISO3": "",
"Email": "",
"FirstName": "",
"FullName": "",
"FullStreet": "",
"Housenumber": "",
"IsExportCountry": false,
"LastName": "",
"Name2": "",
"State": "",
"Street": "",
"Telephone": "",
"Zip": ""
},
"Services": [
{
"CanBeConfigured": false,
"DisplayName": "",
"DisplayValue": "",
"PossibleValueLists": [
{
"key": "",
"value": [
{
"key": 0,
"value": ""
}
]
}
],
"RequiresUserInput": false,
"ServiceName": "",
"typeName": ""
}
],
"ShipDate": "",
"TotalNet": "",
"WeightInGram": "",
"shippingCarrier": 0
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/v1/shipment/shipment");
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 \"ClientReference\": \"\",\n \"Content\": \"\",\n \"CustomerNumber\": \"\",\n \"Dimension\": {\n \"height\": \"\",\n \"length\": \"\",\n \"width\": \"\"\n },\n \"OrderCurrencyCode\": \"\",\n \"OrderSum\": \"\",\n \"PrinterIdForExportDocs\": 0,\n \"PrinterName\": \"\",\n \"ProductCode\": \"\",\n \"ProviderName\": \"\",\n \"ReceiverAddress\": {\n \"AddressAddition\": \"\",\n \"City\": \"\",\n \"Company\": \"\",\n \"CountryCode\": \"\",\n \"CountryCodeISO3\": \"\",\n \"Email\": \"\",\n \"FirstName\": \"\",\n \"FullName\": \"\",\n \"FullStreet\": \"\",\n \"Housenumber\": \"\",\n \"IsExportCountry\": false,\n \"LastName\": \"\",\n \"Name2\": \"\",\n \"State\": \"\",\n \"Street\": \"\",\n \"Telephone\": \"\",\n \"Zip\": \"\"\n },\n \"Services\": [\n {\n \"CanBeConfigured\": false,\n \"DisplayName\": \"\",\n \"DisplayValue\": \"\",\n \"PossibleValueLists\": [\n {\n \"key\": \"\",\n \"value\": [\n {\n \"key\": 0,\n \"value\": \"\"\n }\n ]\n }\n ],\n \"RequiresUserInput\": false,\n \"ServiceName\": \"\",\n \"typeName\": \"\"\n }\n ],\n \"ShipDate\": \"\",\n \"TotalNet\": \"\",\n \"WeightInGram\": \"\",\n \"shippingCarrier\": 0\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/api/v1/shipment/shipment" {:content-type :json
:form-params {:ClientReference ""
:Content ""
:CustomerNumber ""
:Dimension {:height ""
:length ""
:width ""}
:OrderCurrencyCode ""
:OrderSum ""
:PrinterIdForExportDocs 0
:PrinterName ""
:ProductCode ""
:ProviderName ""
:ReceiverAddress {:AddressAddition ""
:City ""
:Company ""
:CountryCode ""
:CountryCodeISO3 ""
:Email ""
:FirstName ""
:FullName ""
:FullStreet ""
:Housenumber ""
:IsExportCountry false
:LastName ""
:Name2 ""
:State ""
:Street ""
:Telephone ""
:Zip ""}
:Services [{:CanBeConfigured false
:DisplayName ""
:DisplayValue ""
:PossibleValueLists [{:key ""
:value [{:key 0
:value ""}]}]
:RequiresUserInput false
:ServiceName ""
:typeName ""}]
:ShipDate ""
:TotalNet ""
:WeightInGram ""
:shippingCarrier 0}})
require "http/client"
url = "{{baseUrl}}/api/v1/shipment/shipment"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"ClientReference\": \"\",\n \"Content\": \"\",\n \"CustomerNumber\": \"\",\n \"Dimension\": {\n \"height\": \"\",\n \"length\": \"\",\n \"width\": \"\"\n },\n \"OrderCurrencyCode\": \"\",\n \"OrderSum\": \"\",\n \"PrinterIdForExportDocs\": 0,\n \"PrinterName\": \"\",\n \"ProductCode\": \"\",\n \"ProviderName\": \"\",\n \"ReceiverAddress\": {\n \"AddressAddition\": \"\",\n \"City\": \"\",\n \"Company\": \"\",\n \"CountryCode\": \"\",\n \"CountryCodeISO3\": \"\",\n \"Email\": \"\",\n \"FirstName\": \"\",\n \"FullName\": \"\",\n \"FullStreet\": \"\",\n \"Housenumber\": \"\",\n \"IsExportCountry\": false,\n \"LastName\": \"\",\n \"Name2\": \"\",\n \"State\": \"\",\n \"Street\": \"\",\n \"Telephone\": \"\",\n \"Zip\": \"\"\n },\n \"Services\": [\n {\n \"CanBeConfigured\": false,\n \"DisplayName\": \"\",\n \"DisplayValue\": \"\",\n \"PossibleValueLists\": [\n {\n \"key\": \"\",\n \"value\": [\n {\n \"key\": 0,\n \"value\": \"\"\n }\n ]\n }\n ],\n \"RequiresUserInput\": false,\n \"ServiceName\": \"\",\n \"typeName\": \"\"\n }\n ],\n \"ShipDate\": \"\",\n \"TotalNet\": \"\",\n \"WeightInGram\": \"\",\n \"shippingCarrier\": 0\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}}/api/v1/shipment/shipment"),
Content = new StringContent("{\n \"ClientReference\": \"\",\n \"Content\": \"\",\n \"CustomerNumber\": \"\",\n \"Dimension\": {\n \"height\": \"\",\n \"length\": \"\",\n \"width\": \"\"\n },\n \"OrderCurrencyCode\": \"\",\n \"OrderSum\": \"\",\n \"PrinterIdForExportDocs\": 0,\n \"PrinterName\": \"\",\n \"ProductCode\": \"\",\n \"ProviderName\": \"\",\n \"ReceiverAddress\": {\n \"AddressAddition\": \"\",\n \"City\": \"\",\n \"Company\": \"\",\n \"CountryCode\": \"\",\n \"CountryCodeISO3\": \"\",\n \"Email\": \"\",\n \"FirstName\": \"\",\n \"FullName\": \"\",\n \"FullStreet\": \"\",\n \"Housenumber\": \"\",\n \"IsExportCountry\": false,\n \"LastName\": \"\",\n \"Name2\": \"\",\n \"State\": \"\",\n \"Street\": \"\",\n \"Telephone\": \"\",\n \"Zip\": \"\"\n },\n \"Services\": [\n {\n \"CanBeConfigured\": false,\n \"DisplayName\": \"\",\n \"DisplayValue\": \"\",\n \"PossibleValueLists\": [\n {\n \"key\": \"\",\n \"value\": [\n {\n \"key\": 0,\n \"value\": \"\"\n }\n ]\n }\n ],\n \"RequiresUserInput\": false,\n \"ServiceName\": \"\",\n \"typeName\": \"\"\n }\n ],\n \"ShipDate\": \"\",\n \"TotalNet\": \"\",\n \"WeightInGram\": \"\",\n \"shippingCarrier\": 0\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}}/api/v1/shipment/shipment");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"ClientReference\": \"\",\n \"Content\": \"\",\n \"CustomerNumber\": \"\",\n \"Dimension\": {\n \"height\": \"\",\n \"length\": \"\",\n \"width\": \"\"\n },\n \"OrderCurrencyCode\": \"\",\n \"OrderSum\": \"\",\n \"PrinterIdForExportDocs\": 0,\n \"PrinterName\": \"\",\n \"ProductCode\": \"\",\n \"ProviderName\": \"\",\n \"ReceiverAddress\": {\n \"AddressAddition\": \"\",\n \"City\": \"\",\n \"Company\": \"\",\n \"CountryCode\": \"\",\n \"CountryCodeISO3\": \"\",\n \"Email\": \"\",\n \"FirstName\": \"\",\n \"FullName\": \"\",\n \"FullStreet\": \"\",\n \"Housenumber\": \"\",\n \"IsExportCountry\": false,\n \"LastName\": \"\",\n \"Name2\": \"\",\n \"State\": \"\",\n \"Street\": \"\",\n \"Telephone\": \"\",\n \"Zip\": \"\"\n },\n \"Services\": [\n {\n \"CanBeConfigured\": false,\n \"DisplayName\": \"\",\n \"DisplayValue\": \"\",\n \"PossibleValueLists\": [\n {\n \"key\": \"\",\n \"value\": [\n {\n \"key\": 0,\n \"value\": \"\"\n }\n ]\n }\n ],\n \"RequiresUserInput\": false,\n \"ServiceName\": \"\",\n \"typeName\": \"\"\n }\n ],\n \"ShipDate\": \"\",\n \"TotalNet\": \"\",\n \"WeightInGram\": \"\",\n \"shippingCarrier\": 0\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/v1/shipment/shipment"
payload := strings.NewReader("{\n \"ClientReference\": \"\",\n \"Content\": \"\",\n \"CustomerNumber\": \"\",\n \"Dimension\": {\n \"height\": \"\",\n \"length\": \"\",\n \"width\": \"\"\n },\n \"OrderCurrencyCode\": \"\",\n \"OrderSum\": \"\",\n \"PrinterIdForExportDocs\": 0,\n \"PrinterName\": \"\",\n \"ProductCode\": \"\",\n \"ProviderName\": \"\",\n \"ReceiverAddress\": {\n \"AddressAddition\": \"\",\n \"City\": \"\",\n \"Company\": \"\",\n \"CountryCode\": \"\",\n \"CountryCodeISO3\": \"\",\n \"Email\": \"\",\n \"FirstName\": \"\",\n \"FullName\": \"\",\n \"FullStreet\": \"\",\n \"Housenumber\": \"\",\n \"IsExportCountry\": false,\n \"LastName\": \"\",\n \"Name2\": \"\",\n \"State\": \"\",\n \"Street\": \"\",\n \"Telephone\": \"\",\n \"Zip\": \"\"\n },\n \"Services\": [\n {\n \"CanBeConfigured\": false,\n \"DisplayName\": \"\",\n \"DisplayValue\": \"\",\n \"PossibleValueLists\": [\n {\n \"key\": \"\",\n \"value\": [\n {\n \"key\": 0,\n \"value\": \"\"\n }\n ]\n }\n ],\n \"RequiresUserInput\": false,\n \"ServiceName\": \"\",\n \"typeName\": \"\"\n }\n ],\n \"ShipDate\": \"\",\n \"TotalNet\": \"\",\n \"WeightInGram\": \"\",\n \"shippingCarrier\": 0\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/api/v1/shipment/shipment HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 1131
{
"ClientReference": "",
"Content": "",
"CustomerNumber": "",
"Dimension": {
"height": "",
"length": "",
"width": ""
},
"OrderCurrencyCode": "",
"OrderSum": "",
"PrinterIdForExportDocs": 0,
"PrinterName": "",
"ProductCode": "",
"ProviderName": "",
"ReceiverAddress": {
"AddressAddition": "",
"City": "",
"Company": "",
"CountryCode": "",
"CountryCodeISO3": "",
"Email": "",
"FirstName": "",
"FullName": "",
"FullStreet": "",
"Housenumber": "",
"IsExportCountry": false,
"LastName": "",
"Name2": "",
"State": "",
"Street": "",
"Telephone": "",
"Zip": ""
},
"Services": [
{
"CanBeConfigured": false,
"DisplayName": "",
"DisplayValue": "",
"PossibleValueLists": [
{
"key": "",
"value": [
{
"key": 0,
"value": ""
}
]
}
],
"RequiresUserInput": false,
"ServiceName": "",
"typeName": ""
}
],
"ShipDate": "",
"TotalNet": "",
"WeightInGram": "",
"shippingCarrier": 0
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/api/v1/shipment/shipment")
.setHeader("content-type", "application/json")
.setBody("{\n \"ClientReference\": \"\",\n \"Content\": \"\",\n \"CustomerNumber\": \"\",\n \"Dimension\": {\n \"height\": \"\",\n \"length\": \"\",\n \"width\": \"\"\n },\n \"OrderCurrencyCode\": \"\",\n \"OrderSum\": \"\",\n \"PrinterIdForExportDocs\": 0,\n \"PrinterName\": \"\",\n \"ProductCode\": \"\",\n \"ProviderName\": \"\",\n \"ReceiverAddress\": {\n \"AddressAddition\": \"\",\n \"City\": \"\",\n \"Company\": \"\",\n \"CountryCode\": \"\",\n \"CountryCodeISO3\": \"\",\n \"Email\": \"\",\n \"FirstName\": \"\",\n \"FullName\": \"\",\n \"FullStreet\": \"\",\n \"Housenumber\": \"\",\n \"IsExportCountry\": false,\n \"LastName\": \"\",\n \"Name2\": \"\",\n \"State\": \"\",\n \"Street\": \"\",\n \"Telephone\": \"\",\n \"Zip\": \"\"\n },\n \"Services\": [\n {\n \"CanBeConfigured\": false,\n \"DisplayName\": \"\",\n \"DisplayValue\": \"\",\n \"PossibleValueLists\": [\n {\n \"key\": \"\",\n \"value\": [\n {\n \"key\": 0,\n \"value\": \"\"\n }\n ]\n }\n ],\n \"RequiresUserInput\": false,\n \"ServiceName\": \"\",\n \"typeName\": \"\"\n }\n ],\n \"ShipDate\": \"\",\n \"TotalNet\": \"\",\n \"WeightInGram\": \"\",\n \"shippingCarrier\": 0\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/v1/shipment/shipment"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"ClientReference\": \"\",\n \"Content\": \"\",\n \"CustomerNumber\": \"\",\n \"Dimension\": {\n \"height\": \"\",\n \"length\": \"\",\n \"width\": \"\"\n },\n \"OrderCurrencyCode\": \"\",\n \"OrderSum\": \"\",\n \"PrinterIdForExportDocs\": 0,\n \"PrinterName\": \"\",\n \"ProductCode\": \"\",\n \"ProviderName\": \"\",\n \"ReceiverAddress\": {\n \"AddressAddition\": \"\",\n \"City\": \"\",\n \"Company\": \"\",\n \"CountryCode\": \"\",\n \"CountryCodeISO3\": \"\",\n \"Email\": \"\",\n \"FirstName\": \"\",\n \"FullName\": \"\",\n \"FullStreet\": \"\",\n \"Housenumber\": \"\",\n \"IsExportCountry\": false,\n \"LastName\": \"\",\n \"Name2\": \"\",\n \"State\": \"\",\n \"Street\": \"\",\n \"Telephone\": \"\",\n \"Zip\": \"\"\n },\n \"Services\": [\n {\n \"CanBeConfigured\": false,\n \"DisplayName\": \"\",\n \"DisplayValue\": \"\",\n \"PossibleValueLists\": [\n {\n \"key\": \"\",\n \"value\": [\n {\n \"key\": 0,\n \"value\": \"\"\n }\n ]\n }\n ],\n \"RequiresUserInput\": false,\n \"ServiceName\": \"\",\n \"typeName\": \"\"\n }\n ],\n \"ShipDate\": \"\",\n \"TotalNet\": \"\",\n \"WeightInGram\": \"\",\n \"shippingCarrier\": 0\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 \"ClientReference\": \"\",\n \"Content\": \"\",\n \"CustomerNumber\": \"\",\n \"Dimension\": {\n \"height\": \"\",\n \"length\": \"\",\n \"width\": \"\"\n },\n \"OrderCurrencyCode\": \"\",\n \"OrderSum\": \"\",\n \"PrinterIdForExportDocs\": 0,\n \"PrinterName\": \"\",\n \"ProductCode\": \"\",\n \"ProviderName\": \"\",\n \"ReceiverAddress\": {\n \"AddressAddition\": \"\",\n \"City\": \"\",\n \"Company\": \"\",\n \"CountryCode\": \"\",\n \"CountryCodeISO3\": \"\",\n \"Email\": \"\",\n \"FirstName\": \"\",\n \"FullName\": \"\",\n \"FullStreet\": \"\",\n \"Housenumber\": \"\",\n \"IsExportCountry\": false,\n \"LastName\": \"\",\n \"Name2\": \"\",\n \"State\": \"\",\n \"Street\": \"\",\n \"Telephone\": \"\",\n \"Zip\": \"\"\n },\n \"Services\": [\n {\n \"CanBeConfigured\": false,\n \"DisplayName\": \"\",\n \"DisplayValue\": \"\",\n \"PossibleValueLists\": [\n {\n \"key\": \"\",\n \"value\": [\n {\n \"key\": 0,\n \"value\": \"\"\n }\n ]\n }\n ],\n \"RequiresUserInput\": false,\n \"ServiceName\": \"\",\n \"typeName\": \"\"\n }\n ],\n \"ShipDate\": \"\",\n \"TotalNet\": \"\",\n \"WeightInGram\": \"\",\n \"shippingCarrier\": 0\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/api/v1/shipment/shipment")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/api/v1/shipment/shipment")
.header("content-type", "application/json")
.body("{\n \"ClientReference\": \"\",\n \"Content\": \"\",\n \"CustomerNumber\": \"\",\n \"Dimension\": {\n \"height\": \"\",\n \"length\": \"\",\n \"width\": \"\"\n },\n \"OrderCurrencyCode\": \"\",\n \"OrderSum\": \"\",\n \"PrinterIdForExportDocs\": 0,\n \"PrinterName\": \"\",\n \"ProductCode\": \"\",\n \"ProviderName\": \"\",\n \"ReceiverAddress\": {\n \"AddressAddition\": \"\",\n \"City\": \"\",\n \"Company\": \"\",\n \"CountryCode\": \"\",\n \"CountryCodeISO3\": \"\",\n \"Email\": \"\",\n \"FirstName\": \"\",\n \"FullName\": \"\",\n \"FullStreet\": \"\",\n \"Housenumber\": \"\",\n \"IsExportCountry\": false,\n \"LastName\": \"\",\n \"Name2\": \"\",\n \"State\": \"\",\n \"Street\": \"\",\n \"Telephone\": \"\",\n \"Zip\": \"\"\n },\n \"Services\": [\n {\n \"CanBeConfigured\": false,\n \"DisplayName\": \"\",\n \"DisplayValue\": \"\",\n \"PossibleValueLists\": [\n {\n \"key\": \"\",\n \"value\": [\n {\n \"key\": 0,\n \"value\": \"\"\n }\n ]\n }\n ],\n \"RequiresUserInput\": false,\n \"ServiceName\": \"\",\n \"typeName\": \"\"\n }\n ],\n \"ShipDate\": \"\",\n \"TotalNet\": \"\",\n \"WeightInGram\": \"\",\n \"shippingCarrier\": 0\n}")
.asString();
const data = JSON.stringify({
ClientReference: '',
Content: '',
CustomerNumber: '',
Dimension: {
height: '',
length: '',
width: ''
},
OrderCurrencyCode: '',
OrderSum: '',
PrinterIdForExportDocs: 0,
PrinterName: '',
ProductCode: '',
ProviderName: '',
ReceiverAddress: {
AddressAddition: '',
City: '',
Company: '',
CountryCode: '',
CountryCodeISO3: '',
Email: '',
FirstName: '',
FullName: '',
FullStreet: '',
Housenumber: '',
IsExportCountry: false,
LastName: '',
Name2: '',
State: '',
Street: '',
Telephone: '',
Zip: ''
},
Services: [
{
CanBeConfigured: false,
DisplayName: '',
DisplayValue: '',
PossibleValueLists: [
{
key: '',
value: [
{
key: 0,
value: ''
}
]
}
],
RequiresUserInput: false,
ServiceName: '',
typeName: ''
}
],
ShipDate: '',
TotalNet: '',
WeightInGram: '',
shippingCarrier: 0
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/api/v1/shipment/shipment');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/api/v1/shipment/shipment',
headers: {'content-type': 'application/json'},
data: {
ClientReference: '',
Content: '',
CustomerNumber: '',
Dimension: {height: '', length: '', width: ''},
OrderCurrencyCode: '',
OrderSum: '',
PrinterIdForExportDocs: 0,
PrinterName: '',
ProductCode: '',
ProviderName: '',
ReceiverAddress: {
AddressAddition: '',
City: '',
Company: '',
CountryCode: '',
CountryCodeISO3: '',
Email: '',
FirstName: '',
FullName: '',
FullStreet: '',
Housenumber: '',
IsExportCountry: false,
LastName: '',
Name2: '',
State: '',
Street: '',
Telephone: '',
Zip: ''
},
Services: [
{
CanBeConfigured: false,
DisplayName: '',
DisplayValue: '',
PossibleValueLists: [{key: '', value: [{key: 0, value: ''}]}],
RequiresUserInput: false,
ServiceName: '',
typeName: ''
}
],
ShipDate: '',
TotalNet: '',
WeightInGram: '',
shippingCarrier: 0
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/v1/shipment/shipment';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"ClientReference":"","Content":"","CustomerNumber":"","Dimension":{"height":"","length":"","width":""},"OrderCurrencyCode":"","OrderSum":"","PrinterIdForExportDocs":0,"PrinterName":"","ProductCode":"","ProviderName":"","ReceiverAddress":{"AddressAddition":"","City":"","Company":"","CountryCode":"","CountryCodeISO3":"","Email":"","FirstName":"","FullName":"","FullStreet":"","Housenumber":"","IsExportCountry":false,"LastName":"","Name2":"","State":"","Street":"","Telephone":"","Zip":""},"Services":[{"CanBeConfigured":false,"DisplayName":"","DisplayValue":"","PossibleValueLists":[{"key":"","value":[{"key":0,"value":""}]}],"RequiresUserInput":false,"ServiceName":"","typeName":""}],"ShipDate":"","TotalNet":"","WeightInGram":"","shippingCarrier":0}'
};
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}}/api/v1/shipment/shipment',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "ClientReference": "",\n "Content": "",\n "CustomerNumber": "",\n "Dimension": {\n "height": "",\n "length": "",\n "width": ""\n },\n "OrderCurrencyCode": "",\n "OrderSum": "",\n "PrinterIdForExportDocs": 0,\n "PrinterName": "",\n "ProductCode": "",\n "ProviderName": "",\n "ReceiverAddress": {\n "AddressAddition": "",\n "City": "",\n "Company": "",\n "CountryCode": "",\n "CountryCodeISO3": "",\n "Email": "",\n "FirstName": "",\n "FullName": "",\n "FullStreet": "",\n "Housenumber": "",\n "IsExportCountry": false,\n "LastName": "",\n "Name2": "",\n "State": "",\n "Street": "",\n "Telephone": "",\n "Zip": ""\n },\n "Services": [\n {\n "CanBeConfigured": false,\n "DisplayName": "",\n "DisplayValue": "",\n "PossibleValueLists": [\n {\n "key": "",\n "value": [\n {\n "key": 0,\n "value": ""\n }\n ]\n }\n ],\n "RequiresUserInput": false,\n "ServiceName": "",\n "typeName": ""\n }\n ],\n "ShipDate": "",\n "TotalNet": "",\n "WeightInGram": "",\n "shippingCarrier": 0\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"ClientReference\": \"\",\n \"Content\": \"\",\n \"CustomerNumber\": \"\",\n \"Dimension\": {\n \"height\": \"\",\n \"length\": \"\",\n \"width\": \"\"\n },\n \"OrderCurrencyCode\": \"\",\n \"OrderSum\": \"\",\n \"PrinterIdForExportDocs\": 0,\n \"PrinterName\": \"\",\n \"ProductCode\": \"\",\n \"ProviderName\": \"\",\n \"ReceiverAddress\": {\n \"AddressAddition\": \"\",\n \"City\": \"\",\n \"Company\": \"\",\n \"CountryCode\": \"\",\n \"CountryCodeISO3\": \"\",\n \"Email\": \"\",\n \"FirstName\": \"\",\n \"FullName\": \"\",\n \"FullStreet\": \"\",\n \"Housenumber\": \"\",\n \"IsExportCountry\": false,\n \"LastName\": \"\",\n \"Name2\": \"\",\n \"State\": \"\",\n \"Street\": \"\",\n \"Telephone\": \"\",\n \"Zip\": \"\"\n },\n \"Services\": [\n {\n \"CanBeConfigured\": false,\n \"DisplayName\": \"\",\n \"DisplayValue\": \"\",\n \"PossibleValueLists\": [\n {\n \"key\": \"\",\n \"value\": [\n {\n \"key\": 0,\n \"value\": \"\"\n }\n ]\n }\n ],\n \"RequiresUserInput\": false,\n \"ServiceName\": \"\",\n \"typeName\": \"\"\n }\n ],\n \"ShipDate\": \"\",\n \"TotalNet\": \"\",\n \"WeightInGram\": \"\",\n \"shippingCarrier\": 0\n}")
val request = Request.Builder()
.url("{{baseUrl}}/api/v1/shipment/shipment")
.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/api/v1/shipment/shipment',
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({
ClientReference: '',
Content: '',
CustomerNumber: '',
Dimension: {height: '', length: '', width: ''},
OrderCurrencyCode: '',
OrderSum: '',
PrinterIdForExportDocs: 0,
PrinterName: '',
ProductCode: '',
ProviderName: '',
ReceiverAddress: {
AddressAddition: '',
City: '',
Company: '',
CountryCode: '',
CountryCodeISO3: '',
Email: '',
FirstName: '',
FullName: '',
FullStreet: '',
Housenumber: '',
IsExportCountry: false,
LastName: '',
Name2: '',
State: '',
Street: '',
Telephone: '',
Zip: ''
},
Services: [
{
CanBeConfigured: false,
DisplayName: '',
DisplayValue: '',
PossibleValueLists: [{key: '', value: [{key: 0, value: ''}]}],
RequiresUserInput: false,
ServiceName: '',
typeName: ''
}
],
ShipDate: '',
TotalNet: '',
WeightInGram: '',
shippingCarrier: 0
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/api/v1/shipment/shipment',
headers: {'content-type': 'application/json'},
body: {
ClientReference: '',
Content: '',
CustomerNumber: '',
Dimension: {height: '', length: '', width: ''},
OrderCurrencyCode: '',
OrderSum: '',
PrinterIdForExportDocs: 0,
PrinterName: '',
ProductCode: '',
ProviderName: '',
ReceiverAddress: {
AddressAddition: '',
City: '',
Company: '',
CountryCode: '',
CountryCodeISO3: '',
Email: '',
FirstName: '',
FullName: '',
FullStreet: '',
Housenumber: '',
IsExportCountry: false,
LastName: '',
Name2: '',
State: '',
Street: '',
Telephone: '',
Zip: ''
},
Services: [
{
CanBeConfigured: false,
DisplayName: '',
DisplayValue: '',
PossibleValueLists: [{key: '', value: [{key: 0, value: ''}]}],
RequiresUserInput: false,
ServiceName: '',
typeName: ''
}
],
ShipDate: '',
TotalNet: '',
WeightInGram: '',
shippingCarrier: 0
},
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}}/api/v1/shipment/shipment');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
ClientReference: '',
Content: '',
CustomerNumber: '',
Dimension: {
height: '',
length: '',
width: ''
},
OrderCurrencyCode: '',
OrderSum: '',
PrinterIdForExportDocs: 0,
PrinterName: '',
ProductCode: '',
ProviderName: '',
ReceiverAddress: {
AddressAddition: '',
City: '',
Company: '',
CountryCode: '',
CountryCodeISO3: '',
Email: '',
FirstName: '',
FullName: '',
FullStreet: '',
Housenumber: '',
IsExportCountry: false,
LastName: '',
Name2: '',
State: '',
Street: '',
Telephone: '',
Zip: ''
},
Services: [
{
CanBeConfigured: false,
DisplayName: '',
DisplayValue: '',
PossibleValueLists: [
{
key: '',
value: [
{
key: 0,
value: ''
}
]
}
],
RequiresUserInput: false,
ServiceName: '',
typeName: ''
}
],
ShipDate: '',
TotalNet: '',
WeightInGram: '',
shippingCarrier: 0
});
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}}/api/v1/shipment/shipment',
headers: {'content-type': 'application/json'},
data: {
ClientReference: '',
Content: '',
CustomerNumber: '',
Dimension: {height: '', length: '', width: ''},
OrderCurrencyCode: '',
OrderSum: '',
PrinterIdForExportDocs: 0,
PrinterName: '',
ProductCode: '',
ProviderName: '',
ReceiverAddress: {
AddressAddition: '',
City: '',
Company: '',
CountryCode: '',
CountryCodeISO3: '',
Email: '',
FirstName: '',
FullName: '',
FullStreet: '',
Housenumber: '',
IsExportCountry: false,
LastName: '',
Name2: '',
State: '',
Street: '',
Telephone: '',
Zip: ''
},
Services: [
{
CanBeConfigured: false,
DisplayName: '',
DisplayValue: '',
PossibleValueLists: [{key: '', value: [{key: 0, value: ''}]}],
RequiresUserInput: false,
ServiceName: '',
typeName: ''
}
],
ShipDate: '',
TotalNet: '',
WeightInGram: '',
shippingCarrier: 0
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/v1/shipment/shipment';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"ClientReference":"","Content":"","CustomerNumber":"","Dimension":{"height":"","length":"","width":""},"OrderCurrencyCode":"","OrderSum":"","PrinterIdForExportDocs":0,"PrinterName":"","ProductCode":"","ProviderName":"","ReceiverAddress":{"AddressAddition":"","City":"","Company":"","CountryCode":"","CountryCodeISO3":"","Email":"","FirstName":"","FullName":"","FullStreet":"","Housenumber":"","IsExportCountry":false,"LastName":"","Name2":"","State":"","Street":"","Telephone":"","Zip":""},"Services":[{"CanBeConfigured":false,"DisplayName":"","DisplayValue":"","PossibleValueLists":[{"key":"","value":[{"key":0,"value":""}]}],"RequiresUserInput":false,"ServiceName":"","typeName":""}],"ShipDate":"","TotalNet":"","WeightInGram":"","shippingCarrier":0}'
};
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 = @{ @"ClientReference": @"",
@"Content": @"",
@"CustomerNumber": @"",
@"Dimension": @{ @"height": @"", @"length": @"", @"width": @"" },
@"OrderCurrencyCode": @"",
@"OrderSum": @"",
@"PrinterIdForExportDocs": @0,
@"PrinterName": @"",
@"ProductCode": @"",
@"ProviderName": @"",
@"ReceiverAddress": @{ @"AddressAddition": @"", @"City": @"", @"Company": @"", @"CountryCode": @"", @"CountryCodeISO3": @"", @"Email": @"", @"FirstName": @"", @"FullName": @"", @"FullStreet": @"", @"Housenumber": @"", @"IsExportCountry": @NO, @"LastName": @"", @"Name2": @"", @"State": @"", @"Street": @"", @"Telephone": @"", @"Zip": @"" },
@"Services": @[ @{ @"CanBeConfigured": @NO, @"DisplayName": @"", @"DisplayValue": @"", @"PossibleValueLists": @[ @{ @"key": @"", @"value": @[ @{ @"key": @0, @"value": @"" } ] } ], @"RequiresUserInput": @NO, @"ServiceName": @"", @"typeName": @"" } ],
@"ShipDate": @"",
@"TotalNet": @"",
@"WeightInGram": @"",
@"shippingCarrier": @0 };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/api/v1/shipment/shipment"]
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}}/api/v1/shipment/shipment" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"ClientReference\": \"\",\n \"Content\": \"\",\n \"CustomerNumber\": \"\",\n \"Dimension\": {\n \"height\": \"\",\n \"length\": \"\",\n \"width\": \"\"\n },\n \"OrderCurrencyCode\": \"\",\n \"OrderSum\": \"\",\n \"PrinterIdForExportDocs\": 0,\n \"PrinterName\": \"\",\n \"ProductCode\": \"\",\n \"ProviderName\": \"\",\n \"ReceiverAddress\": {\n \"AddressAddition\": \"\",\n \"City\": \"\",\n \"Company\": \"\",\n \"CountryCode\": \"\",\n \"CountryCodeISO3\": \"\",\n \"Email\": \"\",\n \"FirstName\": \"\",\n \"FullName\": \"\",\n \"FullStreet\": \"\",\n \"Housenumber\": \"\",\n \"IsExportCountry\": false,\n \"LastName\": \"\",\n \"Name2\": \"\",\n \"State\": \"\",\n \"Street\": \"\",\n \"Telephone\": \"\",\n \"Zip\": \"\"\n },\n \"Services\": [\n {\n \"CanBeConfigured\": false,\n \"DisplayName\": \"\",\n \"DisplayValue\": \"\",\n \"PossibleValueLists\": [\n {\n \"key\": \"\",\n \"value\": [\n {\n \"key\": 0,\n \"value\": \"\"\n }\n ]\n }\n ],\n \"RequiresUserInput\": false,\n \"ServiceName\": \"\",\n \"typeName\": \"\"\n }\n ],\n \"ShipDate\": \"\",\n \"TotalNet\": \"\",\n \"WeightInGram\": \"\",\n \"shippingCarrier\": 0\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/v1/shipment/shipment",
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([
'ClientReference' => '',
'Content' => '',
'CustomerNumber' => '',
'Dimension' => [
'height' => '',
'length' => '',
'width' => ''
],
'OrderCurrencyCode' => '',
'OrderSum' => '',
'PrinterIdForExportDocs' => 0,
'PrinterName' => '',
'ProductCode' => '',
'ProviderName' => '',
'ReceiverAddress' => [
'AddressAddition' => '',
'City' => '',
'Company' => '',
'CountryCode' => '',
'CountryCodeISO3' => '',
'Email' => '',
'FirstName' => '',
'FullName' => '',
'FullStreet' => '',
'Housenumber' => '',
'IsExportCountry' => null,
'LastName' => '',
'Name2' => '',
'State' => '',
'Street' => '',
'Telephone' => '',
'Zip' => ''
],
'Services' => [
[
'CanBeConfigured' => null,
'DisplayName' => '',
'DisplayValue' => '',
'PossibleValueLists' => [
[
'key' => '',
'value' => [
[
'key' => 0,
'value' => ''
]
]
]
],
'RequiresUserInput' => null,
'ServiceName' => '',
'typeName' => ''
]
],
'ShipDate' => '',
'TotalNet' => '',
'WeightInGram' => '',
'shippingCarrier' => 0
]),
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}}/api/v1/shipment/shipment', [
'body' => '{
"ClientReference": "",
"Content": "",
"CustomerNumber": "",
"Dimension": {
"height": "",
"length": "",
"width": ""
},
"OrderCurrencyCode": "",
"OrderSum": "",
"PrinterIdForExportDocs": 0,
"PrinterName": "",
"ProductCode": "",
"ProviderName": "",
"ReceiverAddress": {
"AddressAddition": "",
"City": "",
"Company": "",
"CountryCode": "",
"CountryCodeISO3": "",
"Email": "",
"FirstName": "",
"FullName": "",
"FullStreet": "",
"Housenumber": "",
"IsExportCountry": false,
"LastName": "",
"Name2": "",
"State": "",
"Street": "",
"Telephone": "",
"Zip": ""
},
"Services": [
{
"CanBeConfigured": false,
"DisplayName": "",
"DisplayValue": "",
"PossibleValueLists": [
{
"key": "",
"value": [
{
"key": 0,
"value": ""
}
]
}
],
"RequiresUserInput": false,
"ServiceName": "",
"typeName": ""
}
],
"ShipDate": "",
"TotalNet": "",
"WeightInGram": "",
"shippingCarrier": 0
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/api/v1/shipment/shipment');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'ClientReference' => '',
'Content' => '',
'CustomerNumber' => '',
'Dimension' => [
'height' => '',
'length' => '',
'width' => ''
],
'OrderCurrencyCode' => '',
'OrderSum' => '',
'PrinterIdForExportDocs' => 0,
'PrinterName' => '',
'ProductCode' => '',
'ProviderName' => '',
'ReceiverAddress' => [
'AddressAddition' => '',
'City' => '',
'Company' => '',
'CountryCode' => '',
'CountryCodeISO3' => '',
'Email' => '',
'FirstName' => '',
'FullName' => '',
'FullStreet' => '',
'Housenumber' => '',
'IsExportCountry' => null,
'LastName' => '',
'Name2' => '',
'State' => '',
'Street' => '',
'Telephone' => '',
'Zip' => ''
],
'Services' => [
[
'CanBeConfigured' => null,
'DisplayName' => '',
'DisplayValue' => '',
'PossibleValueLists' => [
[
'key' => '',
'value' => [
[
'key' => 0,
'value' => ''
]
]
]
],
'RequiresUserInput' => null,
'ServiceName' => '',
'typeName' => ''
]
],
'ShipDate' => '',
'TotalNet' => '',
'WeightInGram' => '',
'shippingCarrier' => 0
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'ClientReference' => '',
'Content' => '',
'CustomerNumber' => '',
'Dimension' => [
'height' => '',
'length' => '',
'width' => ''
],
'OrderCurrencyCode' => '',
'OrderSum' => '',
'PrinterIdForExportDocs' => 0,
'PrinterName' => '',
'ProductCode' => '',
'ProviderName' => '',
'ReceiverAddress' => [
'AddressAddition' => '',
'City' => '',
'Company' => '',
'CountryCode' => '',
'CountryCodeISO3' => '',
'Email' => '',
'FirstName' => '',
'FullName' => '',
'FullStreet' => '',
'Housenumber' => '',
'IsExportCountry' => null,
'LastName' => '',
'Name2' => '',
'State' => '',
'Street' => '',
'Telephone' => '',
'Zip' => ''
],
'Services' => [
[
'CanBeConfigured' => null,
'DisplayName' => '',
'DisplayValue' => '',
'PossibleValueLists' => [
[
'key' => '',
'value' => [
[
'key' => 0,
'value' => ''
]
]
]
],
'RequiresUserInput' => null,
'ServiceName' => '',
'typeName' => ''
]
],
'ShipDate' => '',
'TotalNet' => '',
'WeightInGram' => '',
'shippingCarrier' => 0
]));
$request->setRequestUrl('{{baseUrl}}/api/v1/shipment/shipment');
$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}}/api/v1/shipment/shipment' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"ClientReference": "",
"Content": "",
"CustomerNumber": "",
"Dimension": {
"height": "",
"length": "",
"width": ""
},
"OrderCurrencyCode": "",
"OrderSum": "",
"PrinterIdForExportDocs": 0,
"PrinterName": "",
"ProductCode": "",
"ProviderName": "",
"ReceiverAddress": {
"AddressAddition": "",
"City": "",
"Company": "",
"CountryCode": "",
"CountryCodeISO3": "",
"Email": "",
"FirstName": "",
"FullName": "",
"FullStreet": "",
"Housenumber": "",
"IsExportCountry": false,
"LastName": "",
"Name2": "",
"State": "",
"Street": "",
"Telephone": "",
"Zip": ""
},
"Services": [
{
"CanBeConfigured": false,
"DisplayName": "",
"DisplayValue": "",
"PossibleValueLists": [
{
"key": "",
"value": [
{
"key": 0,
"value": ""
}
]
}
],
"RequiresUserInput": false,
"ServiceName": "",
"typeName": ""
}
],
"ShipDate": "",
"TotalNet": "",
"WeightInGram": "",
"shippingCarrier": 0
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/v1/shipment/shipment' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"ClientReference": "",
"Content": "",
"CustomerNumber": "",
"Dimension": {
"height": "",
"length": "",
"width": ""
},
"OrderCurrencyCode": "",
"OrderSum": "",
"PrinterIdForExportDocs": 0,
"PrinterName": "",
"ProductCode": "",
"ProviderName": "",
"ReceiverAddress": {
"AddressAddition": "",
"City": "",
"Company": "",
"CountryCode": "",
"CountryCodeISO3": "",
"Email": "",
"FirstName": "",
"FullName": "",
"FullStreet": "",
"Housenumber": "",
"IsExportCountry": false,
"LastName": "",
"Name2": "",
"State": "",
"Street": "",
"Telephone": "",
"Zip": ""
},
"Services": [
{
"CanBeConfigured": false,
"DisplayName": "",
"DisplayValue": "",
"PossibleValueLists": [
{
"key": "",
"value": [
{
"key": 0,
"value": ""
}
]
}
],
"RequiresUserInput": false,
"ServiceName": "",
"typeName": ""
}
],
"ShipDate": "",
"TotalNet": "",
"WeightInGram": "",
"shippingCarrier": 0
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"ClientReference\": \"\",\n \"Content\": \"\",\n \"CustomerNumber\": \"\",\n \"Dimension\": {\n \"height\": \"\",\n \"length\": \"\",\n \"width\": \"\"\n },\n \"OrderCurrencyCode\": \"\",\n \"OrderSum\": \"\",\n \"PrinterIdForExportDocs\": 0,\n \"PrinterName\": \"\",\n \"ProductCode\": \"\",\n \"ProviderName\": \"\",\n \"ReceiverAddress\": {\n \"AddressAddition\": \"\",\n \"City\": \"\",\n \"Company\": \"\",\n \"CountryCode\": \"\",\n \"CountryCodeISO3\": \"\",\n \"Email\": \"\",\n \"FirstName\": \"\",\n \"FullName\": \"\",\n \"FullStreet\": \"\",\n \"Housenumber\": \"\",\n \"IsExportCountry\": false,\n \"LastName\": \"\",\n \"Name2\": \"\",\n \"State\": \"\",\n \"Street\": \"\",\n \"Telephone\": \"\",\n \"Zip\": \"\"\n },\n \"Services\": [\n {\n \"CanBeConfigured\": false,\n \"DisplayName\": \"\",\n \"DisplayValue\": \"\",\n \"PossibleValueLists\": [\n {\n \"key\": \"\",\n \"value\": [\n {\n \"key\": 0,\n \"value\": \"\"\n }\n ]\n }\n ],\n \"RequiresUserInput\": false,\n \"ServiceName\": \"\",\n \"typeName\": \"\"\n }\n ],\n \"ShipDate\": \"\",\n \"TotalNet\": \"\",\n \"WeightInGram\": \"\",\n \"shippingCarrier\": 0\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/api/v1/shipment/shipment", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/v1/shipment/shipment"
payload = {
"ClientReference": "",
"Content": "",
"CustomerNumber": "",
"Dimension": {
"height": "",
"length": "",
"width": ""
},
"OrderCurrencyCode": "",
"OrderSum": "",
"PrinterIdForExportDocs": 0,
"PrinterName": "",
"ProductCode": "",
"ProviderName": "",
"ReceiverAddress": {
"AddressAddition": "",
"City": "",
"Company": "",
"CountryCode": "",
"CountryCodeISO3": "",
"Email": "",
"FirstName": "",
"FullName": "",
"FullStreet": "",
"Housenumber": "",
"IsExportCountry": False,
"LastName": "",
"Name2": "",
"State": "",
"Street": "",
"Telephone": "",
"Zip": ""
},
"Services": [
{
"CanBeConfigured": False,
"DisplayName": "",
"DisplayValue": "",
"PossibleValueLists": [
{
"key": "",
"value": [
{
"key": 0,
"value": ""
}
]
}
],
"RequiresUserInput": False,
"ServiceName": "",
"typeName": ""
}
],
"ShipDate": "",
"TotalNet": "",
"WeightInGram": "",
"shippingCarrier": 0
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/v1/shipment/shipment"
payload <- "{\n \"ClientReference\": \"\",\n \"Content\": \"\",\n \"CustomerNumber\": \"\",\n \"Dimension\": {\n \"height\": \"\",\n \"length\": \"\",\n \"width\": \"\"\n },\n \"OrderCurrencyCode\": \"\",\n \"OrderSum\": \"\",\n \"PrinterIdForExportDocs\": 0,\n \"PrinterName\": \"\",\n \"ProductCode\": \"\",\n \"ProviderName\": \"\",\n \"ReceiverAddress\": {\n \"AddressAddition\": \"\",\n \"City\": \"\",\n \"Company\": \"\",\n \"CountryCode\": \"\",\n \"CountryCodeISO3\": \"\",\n \"Email\": \"\",\n \"FirstName\": \"\",\n \"FullName\": \"\",\n \"FullStreet\": \"\",\n \"Housenumber\": \"\",\n \"IsExportCountry\": false,\n \"LastName\": \"\",\n \"Name2\": \"\",\n \"State\": \"\",\n \"Street\": \"\",\n \"Telephone\": \"\",\n \"Zip\": \"\"\n },\n \"Services\": [\n {\n \"CanBeConfigured\": false,\n \"DisplayName\": \"\",\n \"DisplayValue\": \"\",\n \"PossibleValueLists\": [\n {\n \"key\": \"\",\n \"value\": [\n {\n \"key\": 0,\n \"value\": \"\"\n }\n ]\n }\n ],\n \"RequiresUserInput\": false,\n \"ServiceName\": \"\",\n \"typeName\": \"\"\n }\n ],\n \"ShipDate\": \"\",\n \"TotalNet\": \"\",\n \"WeightInGram\": \"\",\n \"shippingCarrier\": 0\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}}/api/v1/shipment/shipment")
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 \"ClientReference\": \"\",\n \"Content\": \"\",\n \"CustomerNumber\": \"\",\n \"Dimension\": {\n \"height\": \"\",\n \"length\": \"\",\n \"width\": \"\"\n },\n \"OrderCurrencyCode\": \"\",\n \"OrderSum\": \"\",\n \"PrinterIdForExportDocs\": 0,\n \"PrinterName\": \"\",\n \"ProductCode\": \"\",\n \"ProviderName\": \"\",\n \"ReceiverAddress\": {\n \"AddressAddition\": \"\",\n \"City\": \"\",\n \"Company\": \"\",\n \"CountryCode\": \"\",\n \"CountryCodeISO3\": \"\",\n \"Email\": \"\",\n \"FirstName\": \"\",\n \"FullName\": \"\",\n \"FullStreet\": \"\",\n \"Housenumber\": \"\",\n \"IsExportCountry\": false,\n \"LastName\": \"\",\n \"Name2\": \"\",\n \"State\": \"\",\n \"Street\": \"\",\n \"Telephone\": \"\",\n \"Zip\": \"\"\n },\n \"Services\": [\n {\n \"CanBeConfigured\": false,\n \"DisplayName\": \"\",\n \"DisplayValue\": \"\",\n \"PossibleValueLists\": [\n {\n \"key\": \"\",\n \"value\": [\n {\n \"key\": 0,\n \"value\": \"\"\n }\n ]\n }\n ],\n \"RequiresUserInput\": false,\n \"ServiceName\": \"\",\n \"typeName\": \"\"\n }\n ],\n \"ShipDate\": \"\",\n \"TotalNet\": \"\",\n \"WeightInGram\": \"\",\n \"shippingCarrier\": 0\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/api/v1/shipment/shipment') do |req|
req.body = "{\n \"ClientReference\": \"\",\n \"Content\": \"\",\n \"CustomerNumber\": \"\",\n \"Dimension\": {\n \"height\": \"\",\n \"length\": \"\",\n \"width\": \"\"\n },\n \"OrderCurrencyCode\": \"\",\n \"OrderSum\": \"\",\n \"PrinterIdForExportDocs\": 0,\n \"PrinterName\": \"\",\n \"ProductCode\": \"\",\n \"ProviderName\": \"\",\n \"ReceiverAddress\": {\n \"AddressAddition\": \"\",\n \"City\": \"\",\n \"Company\": \"\",\n \"CountryCode\": \"\",\n \"CountryCodeISO3\": \"\",\n \"Email\": \"\",\n \"FirstName\": \"\",\n \"FullName\": \"\",\n \"FullStreet\": \"\",\n \"Housenumber\": \"\",\n \"IsExportCountry\": false,\n \"LastName\": \"\",\n \"Name2\": \"\",\n \"State\": \"\",\n \"Street\": \"\",\n \"Telephone\": \"\",\n \"Zip\": \"\"\n },\n \"Services\": [\n {\n \"CanBeConfigured\": false,\n \"DisplayName\": \"\",\n \"DisplayValue\": \"\",\n \"PossibleValueLists\": [\n {\n \"key\": \"\",\n \"value\": [\n {\n \"key\": 0,\n \"value\": \"\"\n }\n ]\n }\n ],\n \"RequiresUserInput\": false,\n \"ServiceName\": \"\",\n \"typeName\": \"\"\n }\n ],\n \"ShipDate\": \"\",\n \"TotalNet\": \"\",\n \"WeightInGram\": \"\",\n \"shippingCarrier\": 0\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/api/v1/shipment/shipment";
let payload = json!({
"ClientReference": "",
"Content": "",
"CustomerNumber": "",
"Dimension": json!({
"height": "",
"length": "",
"width": ""
}),
"OrderCurrencyCode": "",
"OrderSum": "",
"PrinterIdForExportDocs": 0,
"PrinterName": "",
"ProductCode": "",
"ProviderName": "",
"ReceiverAddress": json!({
"AddressAddition": "",
"City": "",
"Company": "",
"CountryCode": "",
"CountryCodeISO3": "",
"Email": "",
"FirstName": "",
"FullName": "",
"FullStreet": "",
"Housenumber": "",
"IsExportCountry": false,
"LastName": "",
"Name2": "",
"State": "",
"Street": "",
"Telephone": "",
"Zip": ""
}),
"Services": (
json!({
"CanBeConfigured": false,
"DisplayName": "",
"DisplayValue": "",
"PossibleValueLists": (
json!({
"key": "",
"value": (
json!({
"key": 0,
"value": ""
})
)
})
),
"RequiresUserInput": false,
"ServiceName": "",
"typeName": ""
})
),
"ShipDate": "",
"TotalNet": "",
"WeightInGram": "",
"shippingCarrier": 0
});
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}}/api/v1/shipment/shipment \
--header 'content-type: application/json' \
--data '{
"ClientReference": "",
"Content": "",
"CustomerNumber": "",
"Dimension": {
"height": "",
"length": "",
"width": ""
},
"OrderCurrencyCode": "",
"OrderSum": "",
"PrinterIdForExportDocs": 0,
"PrinterName": "",
"ProductCode": "",
"ProviderName": "",
"ReceiverAddress": {
"AddressAddition": "",
"City": "",
"Company": "",
"CountryCode": "",
"CountryCodeISO3": "",
"Email": "",
"FirstName": "",
"FullName": "",
"FullStreet": "",
"Housenumber": "",
"IsExportCountry": false,
"LastName": "",
"Name2": "",
"State": "",
"Street": "",
"Telephone": "",
"Zip": ""
},
"Services": [
{
"CanBeConfigured": false,
"DisplayName": "",
"DisplayValue": "",
"PossibleValueLists": [
{
"key": "",
"value": [
{
"key": 0,
"value": ""
}
]
}
],
"RequiresUserInput": false,
"ServiceName": "",
"typeName": ""
}
],
"ShipDate": "",
"TotalNet": "",
"WeightInGram": "",
"shippingCarrier": 0
}'
echo '{
"ClientReference": "",
"Content": "",
"CustomerNumber": "",
"Dimension": {
"height": "",
"length": "",
"width": ""
},
"OrderCurrencyCode": "",
"OrderSum": "",
"PrinterIdForExportDocs": 0,
"PrinterName": "",
"ProductCode": "",
"ProviderName": "",
"ReceiverAddress": {
"AddressAddition": "",
"City": "",
"Company": "",
"CountryCode": "",
"CountryCodeISO3": "",
"Email": "",
"FirstName": "",
"FullName": "",
"FullStreet": "",
"Housenumber": "",
"IsExportCountry": false,
"LastName": "",
"Name2": "",
"State": "",
"Street": "",
"Telephone": "",
"Zip": ""
},
"Services": [
{
"CanBeConfigured": false,
"DisplayName": "",
"DisplayValue": "",
"PossibleValueLists": [
{
"key": "",
"value": [
{
"key": 0,
"value": ""
}
]
}
],
"RequiresUserInput": false,
"ServiceName": "",
"typeName": ""
}
],
"ShipDate": "",
"TotalNet": "",
"WeightInGram": "",
"shippingCarrier": 0
}' | \
http POST {{baseUrl}}/api/v1/shipment/shipment \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "ClientReference": "",\n "Content": "",\n "CustomerNumber": "",\n "Dimension": {\n "height": "",\n "length": "",\n "width": ""\n },\n "OrderCurrencyCode": "",\n "OrderSum": "",\n "PrinterIdForExportDocs": 0,\n "PrinterName": "",\n "ProductCode": "",\n "ProviderName": "",\n "ReceiverAddress": {\n "AddressAddition": "",\n "City": "",\n "Company": "",\n "CountryCode": "",\n "CountryCodeISO3": "",\n "Email": "",\n "FirstName": "",\n "FullName": "",\n "FullStreet": "",\n "Housenumber": "",\n "IsExportCountry": false,\n "LastName": "",\n "Name2": "",\n "State": "",\n "Street": "",\n "Telephone": "",\n "Zip": ""\n },\n "Services": [\n {\n "CanBeConfigured": false,\n "DisplayName": "",\n "DisplayValue": "",\n "PossibleValueLists": [\n {\n "key": "",\n "value": [\n {\n "key": 0,\n "value": ""\n }\n ]\n }\n ],\n "RequiresUserInput": false,\n "ServiceName": "",\n "typeName": ""\n }\n ],\n "ShipDate": "",\n "TotalNet": "",\n "WeightInGram": "",\n "shippingCarrier": 0\n}' \
--output-document \
- {{baseUrl}}/api/v1/shipment/shipment
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"ClientReference": "",
"Content": "",
"CustomerNumber": "",
"Dimension": [
"height": "",
"length": "",
"width": ""
],
"OrderCurrencyCode": "",
"OrderSum": "",
"PrinterIdForExportDocs": 0,
"PrinterName": "",
"ProductCode": "",
"ProviderName": "",
"ReceiverAddress": [
"AddressAddition": "",
"City": "",
"Company": "",
"CountryCode": "",
"CountryCodeISO3": "",
"Email": "",
"FirstName": "",
"FullName": "",
"FullStreet": "",
"Housenumber": "",
"IsExportCountry": false,
"LastName": "",
"Name2": "",
"State": "",
"Street": "",
"Telephone": "",
"Zip": ""
],
"Services": [
[
"CanBeConfigured": false,
"DisplayName": "",
"DisplayValue": "",
"PossibleValueLists": [
[
"key": "",
"value": [
[
"key": 0,
"value": ""
]
]
]
],
"RequiresUserInput": false,
"ServiceName": "",
"typeName": ""
]
],
"ShipDate": "",
"TotalNet": "",
"WeightInGram": "",
"shippingCarrier": 0
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/v1/shipment/shipment")! 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
Creates a shipment for an order in billbee
{{baseUrl}}/api/v1/shipment/shipwithlabel
BODY json
{
"ChangeStateToSend": false,
"ClientReference": "",
"Dimension": {
"height": "",
"length": "",
"width": ""
},
"OrderId": 0,
"PrinterName": "",
"ProductId": 0,
"ProviderId": 0,
"ShipDate": "",
"WeightInGram": 0
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/v1/shipment/shipwithlabel");
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 \"ChangeStateToSend\": false,\n \"ClientReference\": \"\",\n \"Dimension\": {\n \"height\": \"\",\n \"length\": \"\",\n \"width\": \"\"\n },\n \"OrderId\": 0,\n \"PrinterName\": \"\",\n \"ProductId\": 0,\n \"ProviderId\": 0,\n \"ShipDate\": \"\",\n \"WeightInGram\": 0\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/api/v1/shipment/shipwithlabel" {:content-type :json
:form-params {:ChangeStateToSend false
:ClientReference ""
:Dimension {:height ""
:length ""
:width ""}
:OrderId 0
:PrinterName ""
:ProductId 0
:ProviderId 0
:ShipDate ""
:WeightInGram 0}})
require "http/client"
url = "{{baseUrl}}/api/v1/shipment/shipwithlabel"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"ChangeStateToSend\": false,\n \"ClientReference\": \"\",\n \"Dimension\": {\n \"height\": \"\",\n \"length\": \"\",\n \"width\": \"\"\n },\n \"OrderId\": 0,\n \"PrinterName\": \"\",\n \"ProductId\": 0,\n \"ProviderId\": 0,\n \"ShipDate\": \"\",\n \"WeightInGram\": 0\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}}/api/v1/shipment/shipwithlabel"),
Content = new StringContent("{\n \"ChangeStateToSend\": false,\n \"ClientReference\": \"\",\n \"Dimension\": {\n \"height\": \"\",\n \"length\": \"\",\n \"width\": \"\"\n },\n \"OrderId\": 0,\n \"PrinterName\": \"\",\n \"ProductId\": 0,\n \"ProviderId\": 0,\n \"ShipDate\": \"\",\n \"WeightInGram\": 0\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}}/api/v1/shipment/shipwithlabel");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"ChangeStateToSend\": false,\n \"ClientReference\": \"\",\n \"Dimension\": {\n \"height\": \"\",\n \"length\": \"\",\n \"width\": \"\"\n },\n \"OrderId\": 0,\n \"PrinterName\": \"\",\n \"ProductId\": 0,\n \"ProviderId\": 0,\n \"ShipDate\": \"\",\n \"WeightInGram\": 0\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/v1/shipment/shipwithlabel"
payload := strings.NewReader("{\n \"ChangeStateToSend\": false,\n \"ClientReference\": \"\",\n \"Dimension\": {\n \"height\": \"\",\n \"length\": \"\",\n \"width\": \"\"\n },\n \"OrderId\": 0,\n \"PrinterName\": \"\",\n \"ProductId\": 0,\n \"ProviderId\": 0,\n \"ShipDate\": \"\",\n \"WeightInGram\": 0\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/api/v1/shipment/shipwithlabel HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 244
{
"ChangeStateToSend": false,
"ClientReference": "",
"Dimension": {
"height": "",
"length": "",
"width": ""
},
"OrderId": 0,
"PrinterName": "",
"ProductId": 0,
"ProviderId": 0,
"ShipDate": "",
"WeightInGram": 0
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/api/v1/shipment/shipwithlabel")
.setHeader("content-type", "application/json")
.setBody("{\n \"ChangeStateToSend\": false,\n \"ClientReference\": \"\",\n \"Dimension\": {\n \"height\": \"\",\n \"length\": \"\",\n \"width\": \"\"\n },\n \"OrderId\": 0,\n \"PrinterName\": \"\",\n \"ProductId\": 0,\n \"ProviderId\": 0,\n \"ShipDate\": \"\",\n \"WeightInGram\": 0\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/v1/shipment/shipwithlabel"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"ChangeStateToSend\": false,\n \"ClientReference\": \"\",\n \"Dimension\": {\n \"height\": \"\",\n \"length\": \"\",\n \"width\": \"\"\n },\n \"OrderId\": 0,\n \"PrinterName\": \"\",\n \"ProductId\": 0,\n \"ProviderId\": 0,\n \"ShipDate\": \"\",\n \"WeightInGram\": 0\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 \"ChangeStateToSend\": false,\n \"ClientReference\": \"\",\n \"Dimension\": {\n \"height\": \"\",\n \"length\": \"\",\n \"width\": \"\"\n },\n \"OrderId\": 0,\n \"PrinterName\": \"\",\n \"ProductId\": 0,\n \"ProviderId\": 0,\n \"ShipDate\": \"\",\n \"WeightInGram\": 0\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/api/v1/shipment/shipwithlabel")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/api/v1/shipment/shipwithlabel")
.header("content-type", "application/json")
.body("{\n \"ChangeStateToSend\": false,\n \"ClientReference\": \"\",\n \"Dimension\": {\n \"height\": \"\",\n \"length\": \"\",\n \"width\": \"\"\n },\n \"OrderId\": 0,\n \"PrinterName\": \"\",\n \"ProductId\": 0,\n \"ProviderId\": 0,\n \"ShipDate\": \"\",\n \"WeightInGram\": 0\n}")
.asString();
const data = JSON.stringify({
ChangeStateToSend: false,
ClientReference: '',
Dimension: {
height: '',
length: '',
width: ''
},
OrderId: 0,
PrinterName: '',
ProductId: 0,
ProviderId: 0,
ShipDate: '',
WeightInGram: 0
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/api/v1/shipment/shipwithlabel');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/api/v1/shipment/shipwithlabel',
headers: {'content-type': 'application/json'},
data: {
ChangeStateToSend: false,
ClientReference: '',
Dimension: {height: '', length: '', width: ''},
OrderId: 0,
PrinterName: '',
ProductId: 0,
ProviderId: 0,
ShipDate: '',
WeightInGram: 0
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/v1/shipment/shipwithlabel';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"ChangeStateToSend":false,"ClientReference":"","Dimension":{"height":"","length":"","width":""},"OrderId":0,"PrinterName":"","ProductId":0,"ProviderId":0,"ShipDate":"","WeightInGram":0}'
};
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}}/api/v1/shipment/shipwithlabel',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "ChangeStateToSend": false,\n "ClientReference": "",\n "Dimension": {\n "height": "",\n "length": "",\n "width": ""\n },\n "OrderId": 0,\n "PrinterName": "",\n "ProductId": 0,\n "ProviderId": 0,\n "ShipDate": "",\n "WeightInGram": 0\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"ChangeStateToSend\": false,\n \"ClientReference\": \"\",\n \"Dimension\": {\n \"height\": \"\",\n \"length\": \"\",\n \"width\": \"\"\n },\n \"OrderId\": 0,\n \"PrinterName\": \"\",\n \"ProductId\": 0,\n \"ProviderId\": 0,\n \"ShipDate\": \"\",\n \"WeightInGram\": 0\n}")
val request = Request.Builder()
.url("{{baseUrl}}/api/v1/shipment/shipwithlabel")
.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/api/v1/shipment/shipwithlabel',
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({
ChangeStateToSend: false,
ClientReference: '',
Dimension: {height: '', length: '', width: ''},
OrderId: 0,
PrinterName: '',
ProductId: 0,
ProviderId: 0,
ShipDate: '',
WeightInGram: 0
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/api/v1/shipment/shipwithlabel',
headers: {'content-type': 'application/json'},
body: {
ChangeStateToSend: false,
ClientReference: '',
Dimension: {height: '', length: '', width: ''},
OrderId: 0,
PrinterName: '',
ProductId: 0,
ProviderId: 0,
ShipDate: '',
WeightInGram: 0
},
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}}/api/v1/shipment/shipwithlabel');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
ChangeStateToSend: false,
ClientReference: '',
Dimension: {
height: '',
length: '',
width: ''
},
OrderId: 0,
PrinterName: '',
ProductId: 0,
ProviderId: 0,
ShipDate: '',
WeightInGram: 0
});
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}}/api/v1/shipment/shipwithlabel',
headers: {'content-type': 'application/json'},
data: {
ChangeStateToSend: false,
ClientReference: '',
Dimension: {height: '', length: '', width: ''},
OrderId: 0,
PrinterName: '',
ProductId: 0,
ProviderId: 0,
ShipDate: '',
WeightInGram: 0
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/v1/shipment/shipwithlabel';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"ChangeStateToSend":false,"ClientReference":"","Dimension":{"height":"","length":"","width":""},"OrderId":0,"PrinterName":"","ProductId":0,"ProviderId":0,"ShipDate":"","WeightInGram":0}'
};
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 = @{ @"ChangeStateToSend": @NO,
@"ClientReference": @"",
@"Dimension": @{ @"height": @"", @"length": @"", @"width": @"" },
@"OrderId": @0,
@"PrinterName": @"",
@"ProductId": @0,
@"ProviderId": @0,
@"ShipDate": @"",
@"WeightInGram": @0 };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/api/v1/shipment/shipwithlabel"]
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}}/api/v1/shipment/shipwithlabel" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"ChangeStateToSend\": false,\n \"ClientReference\": \"\",\n \"Dimension\": {\n \"height\": \"\",\n \"length\": \"\",\n \"width\": \"\"\n },\n \"OrderId\": 0,\n \"PrinterName\": \"\",\n \"ProductId\": 0,\n \"ProviderId\": 0,\n \"ShipDate\": \"\",\n \"WeightInGram\": 0\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/v1/shipment/shipwithlabel",
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([
'ChangeStateToSend' => null,
'ClientReference' => '',
'Dimension' => [
'height' => '',
'length' => '',
'width' => ''
],
'OrderId' => 0,
'PrinterName' => '',
'ProductId' => 0,
'ProviderId' => 0,
'ShipDate' => '',
'WeightInGram' => 0
]),
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}}/api/v1/shipment/shipwithlabel', [
'body' => '{
"ChangeStateToSend": false,
"ClientReference": "",
"Dimension": {
"height": "",
"length": "",
"width": ""
},
"OrderId": 0,
"PrinterName": "",
"ProductId": 0,
"ProviderId": 0,
"ShipDate": "",
"WeightInGram": 0
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/api/v1/shipment/shipwithlabel');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'ChangeStateToSend' => null,
'ClientReference' => '',
'Dimension' => [
'height' => '',
'length' => '',
'width' => ''
],
'OrderId' => 0,
'PrinterName' => '',
'ProductId' => 0,
'ProviderId' => 0,
'ShipDate' => '',
'WeightInGram' => 0
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'ChangeStateToSend' => null,
'ClientReference' => '',
'Dimension' => [
'height' => '',
'length' => '',
'width' => ''
],
'OrderId' => 0,
'PrinterName' => '',
'ProductId' => 0,
'ProviderId' => 0,
'ShipDate' => '',
'WeightInGram' => 0
]));
$request->setRequestUrl('{{baseUrl}}/api/v1/shipment/shipwithlabel');
$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}}/api/v1/shipment/shipwithlabel' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"ChangeStateToSend": false,
"ClientReference": "",
"Dimension": {
"height": "",
"length": "",
"width": ""
},
"OrderId": 0,
"PrinterName": "",
"ProductId": 0,
"ProviderId": 0,
"ShipDate": "",
"WeightInGram": 0
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/v1/shipment/shipwithlabel' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"ChangeStateToSend": false,
"ClientReference": "",
"Dimension": {
"height": "",
"length": "",
"width": ""
},
"OrderId": 0,
"PrinterName": "",
"ProductId": 0,
"ProviderId": 0,
"ShipDate": "",
"WeightInGram": 0
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"ChangeStateToSend\": false,\n \"ClientReference\": \"\",\n \"Dimension\": {\n \"height\": \"\",\n \"length\": \"\",\n \"width\": \"\"\n },\n \"OrderId\": 0,\n \"PrinterName\": \"\",\n \"ProductId\": 0,\n \"ProviderId\": 0,\n \"ShipDate\": \"\",\n \"WeightInGram\": 0\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/api/v1/shipment/shipwithlabel", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/v1/shipment/shipwithlabel"
payload = {
"ChangeStateToSend": False,
"ClientReference": "",
"Dimension": {
"height": "",
"length": "",
"width": ""
},
"OrderId": 0,
"PrinterName": "",
"ProductId": 0,
"ProviderId": 0,
"ShipDate": "",
"WeightInGram": 0
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/v1/shipment/shipwithlabel"
payload <- "{\n \"ChangeStateToSend\": false,\n \"ClientReference\": \"\",\n \"Dimension\": {\n \"height\": \"\",\n \"length\": \"\",\n \"width\": \"\"\n },\n \"OrderId\": 0,\n \"PrinterName\": \"\",\n \"ProductId\": 0,\n \"ProviderId\": 0,\n \"ShipDate\": \"\",\n \"WeightInGram\": 0\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}}/api/v1/shipment/shipwithlabel")
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 \"ChangeStateToSend\": false,\n \"ClientReference\": \"\",\n \"Dimension\": {\n \"height\": \"\",\n \"length\": \"\",\n \"width\": \"\"\n },\n \"OrderId\": 0,\n \"PrinterName\": \"\",\n \"ProductId\": 0,\n \"ProviderId\": 0,\n \"ShipDate\": \"\",\n \"WeightInGram\": 0\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/api/v1/shipment/shipwithlabel') do |req|
req.body = "{\n \"ChangeStateToSend\": false,\n \"ClientReference\": \"\",\n \"Dimension\": {\n \"height\": \"\",\n \"length\": \"\",\n \"width\": \"\"\n },\n \"OrderId\": 0,\n \"PrinterName\": \"\",\n \"ProductId\": 0,\n \"ProviderId\": 0,\n \"ShipDate\": \"\",\n \"WeightInGram\": 0\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/api/v1/shipment/shipwithlabel";
let payload = json!({
"ChangeStateToSend": false,
"ClientReference": "",
"Dimension": json!({
"height": "",
"length": "",
"width": ""
}),
"OrderId": 0,
"PrinterName": "",
"ProductId": 0,
"ProviderId": 0,
"ShipDate": "",
"WeightInGram": 0
});
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}}/api/v1/shipment/shipwithlabel \
--header 'content-type: application/json' \
--data '{
"ChangeStateToSend": false,
"ClientReference": "",
"Dimension": {
"height": "",
"length": "",
"width": ""
},
"OrderId": 0,
"PrinterName": "",
"ProductId": 0,
"ProviderId": 0,
"ShipDate": "",
"WeightInGram": 0
}'
echo '{
"ChangeStateToSend": false,
"ClientReference": "",
"Dimension": {
"height": "",
"length": "",
"width": ""
},
"OrderId": 0,
"PrinterName": "",
"ProductId": 0,
"ProviderId": 0,
"ShipDate": "",
"WeightInGram": 0
}' | \
http POST {{baseUrl}}/api/v1/shipment/shipwithlabel \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "ChangeStateToSend": false,\n "ClientReference": "",\n "Dimension": {\n "height": "",\n "length": "",\n "width": ""\n },\n "OrderId": 0,\n "PrinterName": "",\n "ProductId": 0,\n "ProviderId": 0,\n "ShipDate": "",\n "WeightInGram": 0\n}' \
--output-document \
- {{baseUrl}}/api/v1/shipment/shipwithlabel
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"ChangeStateToSend": false,
"ClientReference": "",
"Dimension": [
"height": "",
"length": "",
"width": ""
],
"OrderId": 0,
"PrinterName": "",
"ProductId": 0,
"ProviderId": 0,
"ShipDate": "",
"WeightInGram": 0
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/v1/shipment/shipwithlabel")! 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
Get a list of all shipments optionally filtered by date. All parameters are optional.
{{baseUrl}}/api/v1/shipment/shipments
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/v1/shipment/shipments");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/api/v1/shipment/shipments")
require "http/client"
url = "{{baseUrl}}/api/v1/shipment/shipments"
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}}/api/v1/shipment/shipments"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/api/v1/shipment/shipments");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/v1/shipment/shipments"
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/api/v1/shipment/shipments HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/api/v1/shipment/shipments")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/v1/shipment/shipments"))
.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}}/api/v1/shipment/shipments")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/api/v1/shipment/shipments")
.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}}/api/v1/shipment/shipments');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/api/v1/shipment/shipments'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/v1/shipment/shipments';
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}}/api/v1/shipment/shipments',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/api/v1/shipment/shipments")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/api/v1/shipment/shipments',
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}}/api/v1/shipment/shipments'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/api/v1/shipment/shipments');
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}}/api/v1/shipment/shipments'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/v1/shipment/shipments';
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}}/api/v1/shipment/shipments"]
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}}/api/v1/shipment/shipments" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/v1/shipment/shipments",
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}}/api/v1/shipment/shipments');
echo $response->getBody();
setUrl('{{baseUrl}}/api/v1/shipment/shipments');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/api/v1/shipment/shipments');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/api/v1/shipment/shipments' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/v1/shipment/shipments' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/api/v1/shipment/shipments")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/v1/shipment/shipments"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/v1/shipment/shipments"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/api/v1/shipment/shipments")
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/api/v1/shipment/shipments') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/api/v1/shipment/shipments";
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}}/api/v1/shipment/shipments
http GET {{baseUrl}}/api/v1/shipment/shipments
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/api/v1/shipment/shipments
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/v1/shipment/shipments")! 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
Queries the currently available shipping carriers.
{{baseUrl}}/api/v1/shipment/shippingcarriers
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/v1/shipment/shippingcarriers");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/api/v1/shipment/shippingcarriers")
require "http/client"
url = "{{baseUrl}}/api/v1/shipment/shippingcarriers"
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}}/api/v1/shipment/shippingcarriers"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/api/v1/shipment/shippingcarriers");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/v1/shipment/shippingcarriers"
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/api/v1/shipment/shippingcarriers HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/api/v1/shipment/shippingcarriers")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/v1/shipment/shippingcarriers"))
.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}}/api/v1/shipment/shippingcarriers")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/api/v1/shipment/shippingcarriers")
.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}}/api/v1/shipment/shippingcarriers');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/api/v1/shipment/shippingcarriers'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/v1/shipment/shippingcarriers';
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}}/api/v1/shipment/shippingcarriers',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/api/v1/shipment/shippingcarriers")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/api/v1/shipment/shippingcarriers',
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}}/api/v1/shipment/shippingcarriers'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/api/v1/shipment/shippingcarriers');
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}}/api/v1/shipment/shippingcarriers'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/v1/shipment/shippingcarriers';
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}}/api/v1/shipment/shippingcarriers"]
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}}/api/v1/shipment/shippingcarriers" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/v1/shipment/shippingcarriers",
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}}/api/v1/shipment/shippingcarriers');
echo $response->getBody();
setUrl('{{baseUrl}}/api/v1/shipment/shippingcarriers');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/api/v1/shipment/shippingcarriers');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/api/v1/shipment/shippingcarriers' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/v1/shipment/shippingcarriers' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/api/v1/shipment/shippingcarriers")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/v1/shipment/shippingcarriers"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/v1/shipment/shippingcarriers"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/api/v1/shipment/shippingcarriers")
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/api/v1/shipment/shippingcarriers') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/api/v1/shipment/shippingcarriers";
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}}/api/v1/shipment/shippingcarriers
http GET {{baseUrl}}/api/v1/shipment/shippingcarriers
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/api/v1/shipment/shippingcarriers
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/v1/shipment/shippingcarriers")! 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
Query all defined shipping providers
{{baseUrl}}/api/v1/shipment/shippingproviders
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/v1/shipment/shippingproviders");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/api/v1/shipment/shippingproviders")
require "http/client"
url = "{{baseUrl}}/api/v1/shipment/shippingproviders"
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}}/api/v1/shipment/shippingproviders"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/api/v1/shipment/shippingproviders");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/v1/shipment/shippingproviders"
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/api/v1/shipment/shippingproviders HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/api/v1/shipment/shippingproviders")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/v1/shipment/shippingproviders"))
.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}}/api/v1/shipment/shippingproviders")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/api/v1/shipment/shippingproviders")
.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}}/api/v1/shipment/shippingproviders');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/api/v1/shipment/shippingproviders'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/v1/shipment/shippingproviders';
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}}/api/v1/shipment/shippingproviders',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/api/v1/shipment/shippingproviders")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/api/v1/shipment/shippingproviders',
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}}/api/v1/shipment/shippingproviders'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/api/v1/shipment/shippingproviders');
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}}/api/v1/shipment/shippingproviders'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/v1/shipment/shippingproviders';
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}}/api/v1/shipment/shippingproviders"]
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}}/api/v1/shipment/shippingproviders" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/v1/shipment/shippingproviders",
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}}/api/v1/shipment/shippingproviders');
echo $response->getBody();
setUrl('{{baseUrl}}/api/v1/shipment/shippingproviders');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/api/v1/shipment/shippingproviders');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/api/v1/shipment/shippingproviders' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/v1/shipment/shippingproviders' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/api/v1/shipment/shippingproviders")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/v1/shipment/shippingproviders"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/v1/shipment/shippingproviders"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/api/v1/shipment/shippingproviders")
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/api/v1/shipment/shippingproviders') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/api/v1/shipment/shippingproviders";
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}}/api/v1/shipment/shippingproviders
http GET {{baseUrl}}/api/v1/shipment/shippingproviders
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/api/v1/shipment/shippingproviders
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/v1/shipment/shippingproviders")! 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
Shipment_GetPing
{{baseUrl}}/api/v1/shipment/ping
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/v1/shipment/ping");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/api/v1/shipment/ping")
require "http/client"
url = "{{baseUrl}}/api/v1/shipment/ping"
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}}/api/v1/shipment/ping"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/api/v1/shipment/ping");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/v1/shipment/ping"
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/api/v1/shipment/ping HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/api/v1/shipment/ping")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/v1/shipment/ping"))
.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}}/api/v1/shipment/ping")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/api/v1/shipment/ping")
.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}}/api/v1/shipment/ping');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/api/v1/shipment/ping'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/v1/shipment/ping';
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}}/api/v1/shipment/ping',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/api/v1/shipment/ping")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/api/v1/shipment/ping',
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}}/api/v1/shipment/ping'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/api/v1/shipment/ping');
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}}/api/v1/shipment/ping'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/v1/shipment/ping';
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}}/api/v1/shipment/ping"]
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}}/api/v1/shipment/ping" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/v1/shipment/ping",
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}}/api/v1/shipment/ping');
echo $response->getBody();
setUrl('{{baseUrl}}/api/v1/shipment/ping');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/api/v1/shipment/ping');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/api/v1/shipment/ping' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/v1/shipment/ping' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/api/v1/shipment/ping")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/v1/shipment/ping"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/v1/shipment/ping"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/api/v1/shipment/ping")
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/api/v1/shipment/ping') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/api/v1/shipment/ping";
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}}/api/v1/shipment/ping
http GET {{baseUrl}}/api/v1/shipment/ping
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/api/v1/shipment/ping
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/v1/shipment/ping")! 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()
DELETE
Deletes all existing WebHook registrations.
{{baseUrl}}/api/v1/webhooks
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/v1/webhooks");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/delete "{{baseUrl}}/api/v1/webhooks")
require "http/client"
url = "{{baseUrl}}/api/v1/webhooks"
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}}/api/v1/webhooks"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/api/v1/webhooks");
var request = new RestRequest("", Method.Delete);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/v1/webhooks"
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/api/v1/webhooks HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/api/v1/webhooks")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/v1/webhooks"))
.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}}/api/v1/webhooks")
.delete(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/api/v1/webhooks")
.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}}/api/v1/webhooks');
xhr.send(data);
import axios from 'axios';
const options = {method: 'DELETE', url: '{{baseUrl}}/api/v1/webhooks'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/v1/webhooks';
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}}/api/v1/webhooks',
method: 'DELETE',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/api/v1/webhooks")
.delete(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'DELETE',
hostname: 'example.com',
port: null,
path: '/baseUrl/api/v1/webhooks',
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}}/api/v1/webhooks'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('DELETE', '{{baseUrl}}/api/v1/webhooks');
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}}/api/v1/webhooks'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/v1/webhooks';
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}}/api/v1/webhooks"]
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}}/api/v1/webhooks" in
Client.call `DELETE uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/v1/webhooks",
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}}/api/v1/webhooks');
echo $response->getBody();
setUrl('{{baseUrl}}/api/v1/webhooks');
$request->setMethod(HTTP_METH_DELETE);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/api/v1/webhooks');
$request->setRequestMethod('DELETE');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/api/v1/webhooks' -Method DELETE
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/v1/webhooks' -Method DELETE
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("DELETE", "/baseUrl/api/v1/webhooks")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/v1/webhooks"
response = requests.delete(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/v1/webhooks"
response <- VERB("DELETE", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/api/v1/webhooks")
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/api/v1/webhooks') do |req|
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/api/v1/webhooks";
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}}/api/v1/webhooks
http DELETE {{baseUrl}}/api/v1/webhooks
wget --quiet \
--method DELETE \
--output-document \
- {{baseUrl}}/api/v1/webhooks
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/v1/webhooks")! 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()
DELETE
Deletes an existing WebHook registration.
{{baseUrl}}/api/v1/webhooks/:id
QUERY PARAMS
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/v1/webhooks/:id");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/delete "{{baseUrl}}/api/v1/webhooks/:id")
require "http/client"
url = "{{baseUrl}}/api/v1/webhooks/: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}}/api/v1/webhooks/:id"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/api/v1/webhooks/:id");
var request = new RestRequest("", Method.Delete);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/v1/webhooks/: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/api/v1/webhooks/:id HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/api/v1/webhooks/:id")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/v1/webhooks/: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}}/api/v1/webhooks/:id")
.delete(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/api/v1/webhooks/: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}}/api/v1/webhooks/:id');
xhr.send(data);
import axios from 'axios';
const options = {method: 'DELETE', url: '{{baseUrl}}/api/v1/webhooks/:id'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/v1/webhooks/: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}}/api/v1/webhooks/:id',
method: 'DELETE',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/api/v1/webhooks/: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/api/v1/webhooks/: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}}/api/v1/webhooks/: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}}/api/v1/webhooks/: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}}/api/v1/webhooks/:id'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/v1/webhooks/: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}}/api/v1/webhooks/: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}}/api/v1/webhooks/:id" in
Client.call `DELETE uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/v1/webhooks/: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}}/api/v1/webhooks/:id');
echo $response->getBody();
setUrl('{{baseUrl}}/api/v1/webhooks/:id');
$request->setMethod(HTTP_METH_DELETE);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/api/v1/webhooks/:id');
$request->setRequestMethod('DELETE');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/api/v1/webhooks/:id' -Method DELETE
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/v1/webhooks/:id' -Method DELETE
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("DELETE", "/baseUrl/api/v1/webhooks/:id")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/v1/webhooks/:id"
response = requests.delete(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/v1/webhooks/:id"
response <- VERB("DELETE", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/api/v1/webhooks/: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/api/v1/webhooks/: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}}/api/v1/webhooks/: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}}/api/v1/webhooks/:id
http DELETE {{baseUrl}}/api/v1/webhooks/:id
wget --quiet \
--method DELETE \
--output-document \
- {{baseUrl}}/api/v1/webhooks/:id
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/v1/webhooks/: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
Gets all registered WebHooks for a given user.
{{baseUrl}}/api/v1/webhooks
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/v1/webhooks");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/api/v1/webhooks")
require "http/client"
url = "{{baseUrl}}/api/v1/webhooks"
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}}/api/v1/webhooks"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/api/v1/webhooks");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/v1/webhooks"
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/api/v1/webhooks HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/api/v1/webhooks")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/v1/webhooks"))
.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}}/api/v1/webhooks")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/api/v1/webhooks")
.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}}/api/v1/webhooks');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/api/v1/webhooks'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/v1/webhooks';
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}}/api/v1/webhooks',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/api/v1/webhooks")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/api/v1/webhooks',
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}}/api/v1/webhooks'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/api/v1/webhooks');
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}}/api/v1/webhooks'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/v1/webhooks';
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}}/api/v1/webhooks"]
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}}/api/v1/webhooks" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/v1/webhooks",
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}}/api/v1/webhooks');
echo $response->getBody();
setUrl('{{baseUrl}}/api/v1/webhooks');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/api/v1/webhooks');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/api/v1/webhooks' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/v1/webhooks' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/api/v1/webhooks")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/v1/webhooks"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/v1/webhooks"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/api/v1/webhooks")
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/api/v1/webhooks') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/api/v1/webhooks";
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}}/api/v1/webhooks
http GET {{baseUrl}}/api/v1/webhooks
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/api/v1/webhooks
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/v1/webhooks")! 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
Looks up a registered WebHook with the given {id} for a given user.
{{baseUrl}}/api/v1/webhooks/:id
QUERY PARAMS
id
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/v1/webhooks/:id");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/api/v1/webhooks/:id")
require "http/client"
url = "{{baseUrl}}/api/v1/webhooks/: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}}/api/v1/webhooks/:id"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/api/v1/webhooks/:id");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/v1/webhooks/: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/api/v1/webhooks/:id HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/api/v1/webhooks/:id")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/v1/webhooks/: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}}/api/v1/webhooks/:id")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/api/v1/webhooks/: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}}/api/v1/webhooks/:id');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/api/v1/webhooks/:id'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/v1/webhooks/: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}}/api/v1/webhooks/:id',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/api/v1/webhooks/:id")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/api/v1/webhooks/: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}}/api/v1/webhooks/: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}}/api/v1/webhooks/: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}}/api/v1/webhooks/:id'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/v1/webhooks/: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}}/api/v1/webhooks/: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}}/api/v1/webhooks/:id" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/v1/webhooks/: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}}/api/v1/webhooks/:id');
echo $response->getBody();
setUrl('{{baseUrl}}/api/v1/webhooks/:id');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/api/v1/webhooks/:id');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/api/v1/webhooks/:id' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/v1/webhooks/:id' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/api/v1/webhooks/:id")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/v1/webhooks/:id"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/v1/webhooks/:id"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/api/v1/webhooks/: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/api/v1/webhooks/:id') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/api/v1/webhooks/: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}}/api/v1/webhooks/:id
http GET {{baseUrl}}/api/v1/webhooks/:id
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/api/v1/webhooks/:id
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/v1/webhooks/: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()
POST
Registers a new WebHook for a given user.
{{baseUrl}}/api/v1/webhooks
BODY json
{
"Description": "",
"Filters": [],
"Headers": {},
"Id": "",
"IsPaused": false,
"Properties": {},
"Secret": "",
"WebHookUri": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/v1/webhooks");
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 \"Description\": \"\",\n \"Filters\": [],\n \"Headers\": {},\n \"Id\": \"\",\n \"IsPaused\": false,\n \"Properties\": {},\n \"Secret\": \"\",\n \"WebHookUri\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/api/v1/webhooks" {:content-type :json
:form-params {:Description ""
:Filters []
:Headers {}
:Id ""
:IsPaused false
:Properties {}
:Secret ""
:WebHookUri ""}})
require "http/client"
url = "{{baseUrl}}/api/v1/webhooks"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"Description\": \"\",\n \"Filters\": [],\n \"Headers\": {},\n \"Id\": \"\",\n \"IsPaused\": false,\n \"Properties\": {},\n \"Secret\": \"\",\n \"WebHookUri\": \"\"\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}}/api/v1/webhooks"),
Content = new StringContent("{\n \"Description\": \"\",\n \"Filters\": [],\n \"Headers\": {},\n \"Id\": \"\",\n \"IsPaused\": false,\n \"Properties\": {},\n \"Secret\": \"\",\n \"WebHookUri\": \"\"\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}}/api/v1/webhooks");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"Description\": \"\",\n \"Filters\": [],\n \"Headers\": {},\n \"Id\": \"\",\n \"IsPaused\": false,\n \"Properties\": {},\n \"Secret\": \"\",\n \"WebHookUri\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/v1/webhooks"
payload := strings.NewReader("{\n \"Description\": \"\",\n \"Filters\": [],\n \"Headers\": {},\n \"Id\": \"\",\n \"IsPaused\": false,\n \"Properties\": {},\n \"Secret\": \"\",\n \"WebHookUri\": \"\"\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/api/v1/webhooks HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 146
{
"Description": "",
"Filters": [],
"Headers": {},
"Id": "",
"IsPaused": false,
"Properties": {},
"Secret": "",
"WebHookUri": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/api/v1/webhooks")
.setHeader("content-type", "application/json")
.setBody("{\n \"Description\": \"\",\n \"Filters\": [],\n \"Headers\": {},\n \"Id\": \"\",\n \"IsPaused\": false,\n \"Properties\": {},\n \"Secret\": \"\",\n \"WebHookUri\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/v1/webhooks"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"Description\": \"\",\n \"Filters\": [],\n \"Headers\": {},\n \"Id\": \"\",\n \"IsPaused\": false,\n \"Properties\": {},\n \"Secret\": \"\",\n \"WebHookUri\": \"\"\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 \"Filters\": [],\n \"Headers\": {},\n \"Id\": \"\",\n \"IsPaused\": false,\n \"Properties\": {},\n \"Secret\": \"\",\n \"WebHookUri\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/api/v1/webhooks")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/api/v1/webhooks")
.header("content-type", "application/json")
.body("{\n \"Description\": \"\",\n \"Filters\": [],\n \"Headers\": {},\n \"Id\": \"\",\n \"IsPaused\": false,\n \"Properties\": {},\n \"Secret\": \"\",\n \"WebHookUri\": \"\"\n}")
.asString();
const data = JSON.stringify({
Description: '',
Filters: [],
Headers: {},
Id: '',
IsPaused: false,
Properties: {},
Secret: '',
WebHookUri: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/api/v1/webhooks');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/api/v1/webhooks',
headers: {'content-type': 'application/json'},
data: {
Description: '',
Filters: [],
Headers: {},
Id: '',
IsPaused: false,
Properties: {},
Secret: '',
WebHookUri: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/v1/webhooks';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"Description":"","Filters":[],"Headers":{},"Id":"","IsPaused":false,"Properties":{},"Secret":"","WebHookUri":""}'
};
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}}/api/v1/webhooks',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "Description": "",\n "Filters": [],\n "Headers": {},\n "Id": "",\n "IsPaused": false,\n "Properties": {},\n "Secret": "",\n "WebHookUri": ""\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 \"Filters\": [],\n \"Headers\": {},\n \"Id\": \"\",\n \"IsPaused\": false,\n \"Properties\": {},\n \"Secret\": \"\",\n \"WebHookUri\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/api/v1/webhooks")
.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/api/v1/webhooks',
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({
Description: '',
Filters: [],
Headers: {},
Id: '',
IsPaused: false,
Properties: {},
Secret: '',
WebHookUri: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/api/v1/webhooks',
headers: {'content-type': 'application/json'},
body: {
Description: '',
Filters: [],
Headers: {},
Id: '',
IsPaused: false,
Properties: {},
Secret: '',
WebHookUri: ''
},
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}}/api/v1/webhooks');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
Description: '',
Filters: [],
Headers: {},
Id: '',
IsPaused: false,
Properties: {},
Secret: '',
WebHookUri: ''
});
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}}/api/v1/webhooks',
headers: {'content-type': 'application/json'},
data: {
Description: '',
Filters: [],
Headers: {},
Id: '',
IsPaused: false,
Properties: {},
Secret: '',
WebHookUri: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/v1/webhooks';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"Description":"","Filters":[],"Headers":{},"Id":"","IsPaused":false,"Properties":{},"Secret":"","WebHookUri":""}'
};
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 = @{ @"Description": @"",
@"Filters": @[ ],
@"Headers": @{ },
@"Id": @"",
@"IsPaused": @NO,
@"Properties": @{ },
@"Secret": @"",
@"WebHookUri": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/api/v1/webhooks"]
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}}/api/v1/webhooks" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"Description\": \"\",\n \"Filters\": [],\n \"Headers\": {},\n \"Id\": \"\",\n \"IsPaused\": false,\n \"Properties\": {},\n \"Secret\": \"\",\n \"WebHookUri\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/v1/webhooks",
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' => '',
'Filters' => [
],
'Headers' => [
],
'Id' => '',
'IsPaused' => null,
'Properties' => [
],
'Secret' => '',
'WebHookUri' => ''
]),
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}}/api/v1/webhooks', [
'body' => '{
"Description": "",
"Filters": [],
"Headers": {},
"Id": "",
"IsPaused": false,
"Properties": {},
"Secret": "",
"WebHookUri": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/api/v1/webhooks');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'Description' => '',
'Filters' => [
],
'Headers' => [
],
'Id' => '',
'IsPaused' => null,
'Properties' => [
],
'Secret' => '',
'WebHookUri' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'Description' => '',
'Filters' => [
],
'Headers' => [
],
'Id' => '',
'IsPaused' => null,
'Properties' => [
],
'Secret' => '',
'WebHookUri' => ''
]));
$request->setRequestUrl('{{baseUrl}}/api/v1/webhooks');
$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}}/api/v1/webhooks' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"Description": "",
"Filters": [],
"Headers": {},
"Id": "",
"IsPaused": false,
"Properties": {},
"Secret": "",
"WebHookUri": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/v1/webhooks' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"Description": "",
"Filters": [],
"Headers": {},
"Id": "",
"IsPaused": false,
"Properties": {},
"Secret": "",
"WebHookUri": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"Description\": \"\",\n \"Filters\": [],\n \"Headers\": {},\n \"Id\": \"\",\n \"IsPaused\": false,\n \"Properties\": {},\n \"Secret\": \"\",\n \"WebHookUri\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/api/v1/webhooks", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/v1/webhooks"
payload = {
"Description": "",
"Filters": [],
"Headers": {},
"Id": "",
"IsPaused": False,
"Properties": {},
"Secret": "",
"WebHookUri": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/v1/webhooks"
payload <- "{\n \"Description\": \"\",\n \"Filters\": [],\n \"Headers\": {},\n \"Id\": \"\",\n \"IsPaused\": false,\n \"Properties\": {},\n \"Secret\": \"\",\n \"WebHookUri\": \"\"\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}}/api/v1/webhooks")
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 \"Description\": \"\",\n \"Filters\": [],\n \"Headers\": {},\n \"Id\": \"\",\n \"IsPaused\": false,\n \"Properties\": {},\n \"Secret\": \"\",\n \"WebHookUri\": \"\"\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/api/v1/webhooks') do |req|
req.body = "{\n \"Description\": \"\",\n \"Filters\": [],\n \"Headers\": {},\n \"Id\": \"\",\n \"IsPaused\": false,\n \"Properties\": {},\n \"Secret\": \"\",\n \"WebHookUri\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/api/v1/webhooks";
let payload = json!({
"Description": "",
"Filters": (),
"Headers": json!({}),
"Id": "",
"IsPaused": false,
"Properties": json!({}),
"Secret": "",
"WebHookUri": ""
});
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}}/api/v1/webhooks \
--header 'content-type: application/json' \
--data '{
"Description": "",
"Filters": [],
"Headers": {},
"Id": "",
"IsPaused": false,
"Properties": {},
"Secret": "",
"WebHookUri": ""
}'
echo '{
"Description": "",
"Filters": [],
"Headers": {},
"Id": "",
"IsPaused": false,
"Properties": {},
"Secret": "",
"WebHookUri": ""
}' | \
http POST {{baseUrl}}/api/v1/webhooks \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "Description": "",\n "Filters": [],\n "Headers": {},\n "Id": "",\n "IsPaused": false,\n "Properties": {},\n "Secret": "",\n "WebHookUri": ""\n}' \
--output-document \
- {{baseUrl}}/api/v1/webhooks
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"Description": "",
"Filters": [],
"Headers": [],
"Id": "",
"IsPaused": false,
"Properties": [],
"Secret": "",
"WebHookUri": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/v1/webhooks")! 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
Returns a list of all known filters you can use to register webhooks
{{baseUrl}}/api/v1/webhooks/filters
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/v1/webhooks/filters");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/api/v1/webhooks/filters")
require "http/client"
url = "{{baseUrl}}/api/v1/webhooks/filters"
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}}/api/v1/webhooks/filters"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/api/v1/webhooks/filters");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/v1/webhooks/filters"
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/api/v1/webhooks/filters HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/api/v1/webhooks/filters")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/v1/webhooks/filters"))
.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}}/api/v1/webhooks/filters")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/api/v1/webhooks/filters")
.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}}/api/v1/webhooks/filters');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/api/v1/webhooks/filters'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/v1/webhooks/filters';
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}}/api/v1/webhooks/filters',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/api/v1/webhooks/filters")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/api/v1/webhooks/filters',
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}}/api/v1/webhooks/filters'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/api/v1/webhooks/filters');
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}}/api/v1/webhooks/filters'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/v1/webhooks/filters';
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}}/api/v1/webhooks/filters"]
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}}/api/v1/webhooks/filters" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/v1/webhooks/filters",
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}}/api/v1/webhooks/filters');
echo $response->getBody();
setUrl('{{baseUrl}}/api/v1/webhooks/filters');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/api/v1/webhooks/filters');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/api/v1/webhooks/filters' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/v1/webhooks/filters' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/api/v1/webhooks/filters")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/v1/webhooks/filters"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/v1/webhooks/filters"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/api/v1/webhooks/filters")
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/api/v1/webhooks/filters') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/api/v1/webhooks/filters";
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}}/api/v1/webhooks/filters
http GET {{baseUrl}}/api/v1/webhooks/filters
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/api/v1/webhooks/filters
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/v1/webhooks/filters")! 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
Updates an existing WebHook registration.
{{baseUrl}}/api/v1/webhooks/:id
QUERY PARAMS
id
BODY json
{
"Description": "",
"Filters": [],
"Headers": {},
"Id": "",
"IsPaused": false,
"Properties": {},
"Secret": "",
"WebHookUri": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/api/v1/webhooks/: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 \"Description\": \"\",\n \"Filters\": [],\n \"Headers\": {},\n \"Id\": \"\",\n \"IsPaused\": false,\n \"Properties\": {},\n \"Secret\": \"\",\n \"WebHookUri\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/api/v1/webhooks/:id" {:content-type :json
:form-params {:Description ""
:Filters []
:Headers {}
:Id ""
:IsPaused false
:Properties {}
:Secret ""
:WebHookUri ""}})
require "http/client"
url = "{{baseUrl}}/api/v1/webhooks/:id"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"Description\": \"\",\n \"Filters\": [],\n \"Headers\": {},\n \"Id\": \"\",\n \"IsPaused\": false,\n \"Properties\": {},\n \"Secret\": \"\",\n \"WebHookUri\": \"\"\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}}/api/v1/webhooks/:id"),
Content = new StringContent("{\n \"Description\": \"\",\n \"Filters\": [],\n \"Headers\": {},\n \"Id\": \"\",\n \"IsPaused\": false,\n \"Properties\": {},\n \"Secret\": \"\",\n \"WebHookUri\": \"\"\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}}/api/v1/webhooks/:id");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"Description\": \"\",\n \"Filters\": [],\n \"Headers\": {},\n \"Id\": \"\",\n \"IsPaused\": false,\n \"Properties\": {},\n \"Secret\": \"\",\n \"WebHookUri\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/api/v1/webhooks/:id"
payload := strings.NewReader("{\n \"Description\": \"\",\n \"Filters\": [],\n \"Headers\": {},\n \"Id\": \"\",\n \"IsPaused\": false,\n \"Properties\": {},\n \"Secret\": \"\",\n \"WebHookUri\": \"\"\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/api/v1/webhooks/:id HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 146
{
"Description": "",
"Filters": [],
"Headers": {},
"Id": "",
"IsPaused": false,
"Properties": {},
"Secret": "",
"WebHookUri": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/api/v1/webhooks/:id")
.setHeader("content-type", "application/json")
.setBody("{\n \"Description\": \"\",\n \"Filters\": [],\n \"Headers\": {},\n \"Id\": \"\",\n \"IsPaused\": false,\n \"Properties\": {},\n \"Secret\": \"\",\n \"WebHookUri\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/api/v1/webhooks/:id"))
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("{\n \"Description\": \"\",\n \"Filters\": [],\n \"Headers\": {},\n \"Id\": \"\",\n \"IsPaused\": false,\n \"Properties\": {},\n \"Secret\": \"\",\n \"WebHookUri\": \"\"\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 \"Filters\": [],\n \"Headers\": {},\n \"Id\": \"\",\n \"IsPaused\": false,\n \"Properties\": {},\n \"Secret\": \"\",\n \"WebHookUri\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/api/v1/webhooks/:id")
.put(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/api/v1/webhooks/:id")
.header("content-type", "application/json")
.body("{\n \"Description\": \"\",\n \"Filters\": [],\n \"Headers\": {},\n \"Id\": \"\",\n \"IsPaused\": false,\n \"Properties\": {},\n \"Secret\": \"\",\n \"WebHookUri\": \"\"\n}")
.asString();
const data = JSON.stringify({
Description: '',
Filters: [],
Headers: {},
Id: '',
IsPaused: false,
Properties: {},
Secret: '',
WebHookUri: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/api/v1/webhooks/:id');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/api/v1/webhooks/:id',
headers: {'content-type': 'application/json'},
data: {
Description: '',
Filters: [],
Headers: {},
Id: '',
IsPaused: false,
Properties: {},
Secret: '',
WebHookUri: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/api/v1/webhooks/:id';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"Description":"","Filters":[],"Headers":{},"Id":"","IsPaused":false,"Properties":{},"Secret":"","WebHookUri":""}'
};
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}}/api/v1/webhooks/:id',
method: 'PUT',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "Description": "",\n "Filters": [],\n "Headers": {},\n "Id": "",\n "IsPaused": false,\n "Properties": {},\n "Secret": "",\n "WebHookUri": ""\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 \"Filters\": [],\n \"Headers\": {},\n \"Id\": \"\",\n \"IsPaused\": false,\n \"Properties\": {},\n \"Secret\": \"\",\n \"WebHookUri\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/api/v1/webhooks/: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/api/v1/webhooks/: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({
Description: '',
Filters: [],
Headers: {},
Id: '',
IsPaused: false,
Properties: {},
Secret: '',
WebHookUri: ''
}));
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/api/v1/webhooks/:id',
headers: {'content-type': 'application/json'},
body: {
Description: '',
Filters: [],
Headers: {},
Id: '',
IsPaused: false,
Properties: {},
Secret: '',
WebHookUri: ''
},
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}}/api/v1/webhooks/:id');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
Description: '',
Filters: [],
Headers: {},
Id: '',
IsPaused: false,
Properties: {},
Secret: '',
WebHookUri: ''
});
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}}/api/v1/webhooks/:id',
headers: {'content-type': 'application/json'},
data: {
Description: '',
Filters: [],
Headers: {},
Id: '',
IsPaused: false,
Properties: {},
Secret: '',
WebHookUri: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/api/v1/webhooks/:id';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"Description":"","Filters":[],"Headers":{},"Id":"","IsPaused":false,"Properties":{},"Secret":"","WebHookUri":""}'
};
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 = @{ @"Description": @"",
@"Filters": @[ ],
@"Headers": @{ },
@"Id": @"",
@"IsPaused": @NO,
@"Properties": @{ },
@"Secret": @"",
@"WebHookUri": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/api/v1/webhooks/: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}}/api/v1/webhooks/:id" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"Description\": \"\",\n \"Filters\": [],\n \"Headers\": {},\n \"Id\": \"\",\n \"IsPaused\": false,\n \"Properties\": {},\n \"Secret\": \"\",\n \"WebHookUri\": \"\"\n}" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/api/v1/webhooks/: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' => '',
'Filters' => [
],
'Headers' => [
],
'Id' => '',
'IsPaused' => null,
'Properties' => [
],
'Secret' => '',
'WebHookUri' => ''
]),
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}}/api/v1/webhooks/:id', [
'body' => '{
"Description": "",
"Filters": [],
"Headers": {},
"Id": "",
"IsPaused": false,
"Properties": {},
"Secret": "",
"WebHookUri": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/api/v1/webhooks/:id');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'Description' => '',
'Filters' => [
],
'Headers' => [
],
'Id' => '',
'IsPaused' => null,
'Properties' => [
],
'Secret' => '',
'WebHookUri' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'Description' => '',
'Filters' => [
],
'Headers' => [
],
'Id' => '',
'IsPaused' => null,
'Properties' => [
],
'Secret' => '',
'WebHookUri' => ''
]));
$request->setRequestUrl('{{baseUrl}}/api/v1/webhooks/: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}}/api/v1/webhooks/:id' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"Description": "",
"Filters": [],
"Headers": {},
"Id": "",
"IsPaused": false,
"Properties": {},
"Secret": "",
"WebHookUri": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/api/v1/webhooks/:id' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"Description": "",
"Filters": [],
"Headers": {},
"Id": "",
"IsPaused": false,
"Properties": {},
"Secret": "",
"WebHookUri": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"Description\": \"\",\n \"Filters\": [],\n \"Headers\": {},\n \"Id\": \"\",\n \"IsPaused\": false,\n \"Properties\": {},\n \"Secret\": \"\",\n \"WebHookUri\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("PUT", "/baseUrl/api/v1/webhooks/:id", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/api/v1/webhooks/:id"
payload = {
"Description": "",
"Filters": [],
"Headers": {},
"Id": "",
"IsPaused": False,
"Properties": {},
"Secret": "",
"WebHookUri": ""
}
headers = {"content-type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/api/v1/webhooks/:id"
payload <- "{\n \"Description\": \"\",\n \"Filters\": [],\n \"Headers\": {},\n \"Id\": \"\",\n \"IsPaused\": false,\n \"Properties\": {},\n \"Secret\": \"\",\n \"WebHookUri\": \"\"\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}}/api/v1/webhooks/: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 \"Description\": \"\",\n \"Filters\": [],\n \"Headers\": {},\n \"Id\": \"\",\n \"IsPaused\": false,\n \"Properties\": {},\n \"Secret\": \"\",\n \"WebHookUri\": \"\"\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/api/v1/webhooks/:id') do |req|
req.body = "{\n \"Description\": \"\",\n \"Filters\": [],\n \"Headers\": {},\n \"Id\": \"\",\n \"IsPaused\": false,\n \"Properties\": {},\n \"Secret\": \"\",\n \"WebHookUri\": \"\"\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}}/api/v1/webhooks/:id";
let payload = json!({
"Description": "",
"Filters": (),
"Headers": json!({}),
"Id": "",
"IsPaused": false,
"Properties": json!({}),
"Secret": "",
"WebHookUri": ""
});
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}}/api/v1/webhooks/:id \
--header 'content-type: application/json' \
--data '{
"Description": "",
"Filters": [],
"Headers": {},
"Id": "",
"IsPaused": false,
"Properties": {},
"Secret": "",
"WebHookUri": ""
}'
echo '{
"Description": "",
"Filters": [],
"Headers": {},
"Id": "",
"IsPaused": false,
"Properties": {},
"Secret": "",
"WebHookUri": ""
}' | \
http PUT {{baseUrl}}/api/v1/webhooks/:id \
content-type:application/json
wget --quiet \
--method PUT \
--header 'content-type: application/json' \
--body-data '{\n "Description": "",\n "Filters": [],\n "Headers": {},\n "Id": "",\n "IsPaused": false,\n "Properties": {},\n "Secret": "",\n "WebHookUri": ""\n}' \
--output-document \
- {{baseUrl}}/api/v1/webhooks/:id
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"Description": "",
"Filters": [],
"Headers": [],
"Id": "",
"IsPaused": false,
"Properties": [],
"Secret": "",
"WebHookUri": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/api/v1/webhooks/: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()