POST Create a bank account
{{baseUrl}}/bank-accounts
BODY json

{
  "account_number": "",
  "account_number_iban": "",
  "currency": "",
  "id": 0,
  "name": "",
  "need_qr": false,
  "swift": ""
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/bank-accounts");

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  \"account_number\": \"\",\n  \"account_number_iban\": \"\",\n  \"currency\": \"\",\n  \"id\": 0,\n  \"name\": \"\",\n  \"need_qr\": false,\n  \"swift\": \"\"\n}");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/post "{{baseUrl}}/bank-accounts" {:content-type :json
                                                          :form-params {:account_number ""
                                                                        :account_number_iban ""
                                                                        :currency ""
                                                                        :id 0
                                                                        :name ""
                                                                        :need_qr false
                                                                        :swift ""}})
require "http/client"

url = "{{baseUrl}}/bank-accounts"
headers = HTTP::Headers{
  "content-type" => "application/json"
}
reqBody = "{\n  \"account_number\": \"\",\n  \"account_number_iban\": \"\",\n  \"currency\": \"\",\n  \"id\": 0,\n  \"name\": \"\",\n  \"need_qr\": false,\n  \"swift\": \"\"\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}}/bank-accounts"),
    Content = new StringContent("{\n  \"account_number\": \"\",\n  \"account_number_iban\": \"\",\n  \"currency\": \"\",\n  \"id\": 0,\n  \"name\": \"\",\n  \"need_qr\": false,\n  \"swift\": \"\"\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}}/bank-accounts");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"account_number\": \"\",\n  \"account_number_iban\": \"\",\n  \"currency\": \"\",\n  \"id\": 0,\n  \"name\": \"\",\n  \"need_qr\": false,\n  \"swift\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/bank-accounts"

	payload := strings.NewReader("{\n  \"account_number\": \"\",\n  \"account_number_iban\": \"\",\n  \"currency\": \"\",\n  \"id\": 0,\n  \"name\": \"\",\n  \"need_qr\": false,\n  \"swift\": \"\"\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/bank-accounts HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 133

{
  "account_number": "",
  "account_number_iban": "",
  "currency": "",
  "id": 0,
  "name": "",
  "need_qr": false,
  "swift": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/bank-accounts")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"account_number\": \"\",\n  \"account_number_iban\": \"\",\n  \"currency\": \"\",\n  \"id\": 0,\n  \"name\": \"\",\n  \"need_qr\": false,\n  \"swift\": \"\"\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/bank-accounts"))
    .header("content-type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("{\n  \"account_number\": \"\",\n  \"account_number_iban\": \"\",\n  \"currency\": \"\",\n  \"id\": 0,\n  \"name\": \"\",\n  \"need_qr\": false,\n  \"swift\": \"\"\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  \"account_number\": \"\",\n  \"account_number_iban\": \"\",\n  \"currency\": \"\",\n  \"id\": 0,\n  \"name\": \"\",\n  \"need_qr\": false,\n  \"swift\": \"\"\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/bank-accounts")
  .post(body)
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/bank-accounts")
  .header("content-type", "application/json")
  .body("{\n  \"account_number\": \"\",\n  \"account_number_iban\": \"\",\n  \"currency\": \"\",\n  \"id\": 0,\n  \"name\": \"\",\n  \"need_qr\": false,\n  \"swift\": \"\"\n}")
  .asString();
const data = JSON.stringify({
  account_number: '',
  account_number_iban: '',
  currency: '',
  id: 0,
  name: '',
  need_qr: false,
  swift: ''
});

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('POST', '{{baseUrl}}/bank-accounts');
xhr.setRequestHeader('content-type', 'application/json');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'POST',
  url: '{{baseUrl}}/bank-accounts',
  headers: {'content-type': 'application/json'},
  data: {
    account_number: '',
    account_number_iban: '',
    currency: '',
    id: 0,
    name: '',
    need_qr: false,
    swift: ''
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/bank-accounts';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"account_number":"","account_number_iban":"","currency":"","id":0,"name":"","need_qr":false,"swift":""}'
};

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}}/bank-accounts',
  method: 'POST',
  headers: {
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "account_number": "",\n  "account_number_iban": "",\n  "currency": "",\n  "id": 0,\n  "name": "",\n  "need_qr": false,\n  "swift": ""\n}'
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n  \"account_number\": \"\",\n  \"account_number_iban\": \"\",\n  \"currency\": \"\",\n  \"id\": 0,\n  \"name\": \"\",\n  \"need_qr\": false,\n  \"swift\": \"\"\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/bank-accounts")
  .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/bank-accounts',
  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({
  account_number: '',
  account_number_iban: '',
  currency: '',
  id: 0,
  name: '',
  need_qr: false,
  swift: ''
}));
req.end();
const request = require('request');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/bank-accounts',
  headers: {'content-type': 'application/json'},
  body: {
    account_number: '',
    account_number_iban: '',
    currency: '',
    id: 0,
    name: '',
    need_qr: false,
    swift: ''
  },
  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}}/bank-accounts');

req.headers({
  'content-type': 'application/json'
});

req.type('json');
req.send({
  account_number: '',
  account_number_iban: '',
  currency: '',
  id: 0,
  name: '',
  need_qr: false,
  swift: ''
});

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}}/bank-accounts',
  headers: {'content-type': 'application/json'},
  data: {
    account_number: '',
    account_number_iban: '',
    currency: '',
    id: 0,
    name: '',
    need_qr: false,
    swift: ''
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/bank-accounts';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"account_number":"","account_number_iban":"","currency":"","id":0,"name":"","need_qr":false,"swift":""}'
};

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 = @{ @"account_number": @"",
                              @"account_number_iban": @"",
                              @"currency": @"",
                              @"id": @0,
                              @"name": @"",
                              @"need_qr": @NO,
                              @"swift": @"" };

NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/bank-accounts"]
                                                       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}}/bank-accounts" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n  \"account_number\": \"\",\n  \"account_number_iban\": \"\",\n  \"currency\": \"\",\n  \"id\": 0,\n  \"name\": \"\",\n  \"need_qr\": false,\n  \"swift\": \"\"\n}" in

Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/bank-accounts",
  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([
    'account_number' => '',
    'account_number_iban' => '',
    'currency' => '',
    'id' => 0,
    'name' => '',
    'need_qr' => null,
    'swift' => ''
  ]),
  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}}/bank-accounts', [
  'body' => '{
  "account_number": "",
  "account_number_iban": "",
  "currency": "",
  "id": 0,
  "name": "",
  "need_qr": false,
  "swift": ""
}',
  'headers' => [
    'content-type' => 'application/json',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/bank-accounts');
$request->setMethod(HTTP_METH_POST);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$request->setContentType('application/json');
$request->setBody(json_encode([
  'account_number' => '',
  'account_number_iban' => '',
  'currency' => '',
  'id' => 0,
  'name' => '',
  'need_qr' => null,
  'swift' => ''
]));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'account_number' => '',
  'account_number_iban' => '',
  'currency' => '',
  'id' => 0,
  'name' => '',
  'need_qr' => null,
  'swift' => ''
]));
$request->setRequestUrl('{{baseUrl}}/bank-accounts');
$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}}/bank-accounts' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "account_number": "",
  "account_number_iban": "",
  "currency": "",
  "id": 0,
  "name": "",
  "need_qr": false,
  "swift": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/bank-accounts' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "account_number": "",
  "account_number_iban": "",
  "currency": "",
  "id": 0,
  "name": "",
  "need_qr": false,
  "swift": ""
}'
import http.client

conn = http.client.HTTPSConnection("example.com")

payload = "{\n  \"account_number\": \"\",\n  \"account_number_iban\": \"\",\n  \"currency\": \"\",\n  \"id\": 0,\n  \"name\": \"\",\n  \"need_qr\": false,\n  \"swift\": \"\"\n}"

headers = { 'content-type': "application/json" }

conn.request("POST", "/baseUrl/bank-accounts", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/bank-accounts"

payload = {
    "account_number": "",
    "account_number_iban": "",
    "currency": "",
    "id": 0,
    "name": "",
    "need_qr": False,
    "swift": ""
}
headers = {"content-type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
library(httr)

url <- "{{baseUrl}}/bank-accounts"

payload <- "{\n  \"account_number\": \"\",\n  \"account_number_iban\": \"\",\n  \"currency\": \"\",\n  \"id\": 0,\n  \"name\": \"\",\n  \"need_qr\": false,\n  \"swift\": \"\"\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}}/bank-accounts")

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  \"account_number\": \"\",\n  \"account_number_iban\": \"\",\n  \"currency\": \"\",\n  \"id\": 0,\n  \"name\": \"\",\n  \"need_qr\": false,\n  \"swift\": \"\"\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/bank-accounts') do |req|
  req.body = "{\n  \"account_number\": \"\",\n  \"account_number_iban\": \"\",\n  \"currency\": \"\",\n  \"id\": 0,\n  \"name\": \"\",\n  \"need_qr\": false,\n  \"swift\": \"\"\n}"
end

puts response.status
puts response.body
use serde_json::json;
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/bank-accounts";

    let payload = json!({
        "account_number": "",
        "account_number_iban": "",
        "currency": "",
        "id": 0,
        "name": "",
        "need_qr": false,
        "swift": ""
    });

    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}}/bank-accounts \
  --header 'content-type: application/json' \
  --data '{
  "account_number": "",
  "account_number_iban": "",
  "currency": "",
  "id": 0,
  "name": "",
  "need_qr": false,
  "swift": ""
}'
echo '{
  "account_number": "",
  "account_number_iban": "",
  "currency": "",
  "id": 0,
  "name": "",
  "need_qr": false,
  "swift": ""
}' |  \
  http POST {{baseUrl}}/bank-accounts \
  content-type:application/json
wget --quiet \
  --method POST \
  --header 'content-type: application/json' \
  --body-data '{\n  "account_number": "",\n  "account_number_iban": "",\n  "currency": "",\n  "id": 0,\n  "name": "",\n  "need_qr": false,\n  "swift": ""\n}' \
  --output-document \
  - {{baseUrl}}/bank-accounts
import Foundation

let headers = ["content-type": "application/json"]
let parameters = [
  "account_number": "",
  "account_number_iban": "",
  "currency": "",
  "id": 0,
  "name": "",
  "need_qr": false,
  "swift": ""
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/bank-accounts")! 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()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": {
    "message": "Authorization information (Header: %s) is missing or invalid."
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": {
    "message": "Authorization information (Header: %s) is missing or invalid."
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": {
    "message": "Authorization information (Header: %s) is missing or invalid."
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": {
    "message": "Internal Server Error.",
    "trace_id": "664b218f93954a3480cb0ddb8f919c3f"
  }
}
DELETE Delete a bank account
{{baseUrl}}/bank-accounts/: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}}/bank-accounts/:id");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/delete "{{baseUrl}}/bank-accounts/:id")
require "http/client"

url = "{{baseUrl}}/bank-accounts/: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}}/bank-accounts/:id"),
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/bank-accounts/:id");
var request = new RestRequest("", Method.Delete);
var response = client.Execute(request);
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/bank-accounts/: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/bank-accounts/:id HTTP/1.1
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/bank-accounts/:id")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/bank-accounts/: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}}/bank-accounts/:id")
  .delete(null)
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/bank-accounts/: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}}/bank-accounts/:id');

xhr.send(data);
import axios from 'axios';

const options = {method: 'DELETE', url: '{{baseUrl}}/bank-accounts/:id'};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/bank-accounts/: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}}/bank-accounts/:id',
  method: 'DELETE',
  headers: {}
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/bank-accounts/: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/bank-accounts/: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}}/bank-accounts/: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}}/bank-accounts/: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}}/bank-accounts/:id'};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/bank-accounts/: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}}/bank-accounts/: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}}/bank-accounts/:id" in

Client.call `DELETE uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/bank-accounts/: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}}/bank-accounts/:id');

echo $response->getBody();
setUrl('{{baseUrl}}/bank-accounts/:id');
$request->setMethod(HTTP_METH_DELETE);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/bank-accounts/:id');
$request->setRequestMethod('DELETE');
$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/bank-accounts/:id' -Method DELETE 
$response = Invoke-RestMethod -Uri '{{baseUrl}}/bank-accounts/:id' -Method DELETE 
import http.client

conn = http.client.HTTPSConnection("example.com")

conn.request("DELETE", "/baseUrl/bank-accounts/:id")

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/bank-accounts/:id"

response = requests.delete(url)

print(response.json())
library(httr)

url <- "{{baseUrl}}/bank-accounts/:id"

response <- VERB("DELETE", url, content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/bank-accounts/: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/bank-accounts/: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}}/bank-accounts/: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}}/bank-accounts/:id
http DELETE {{baseUrl}}/bank-accounts/:id
wget --quiet \
  --method DELETE \
  --output-document \
  - {{baseUrl}}/bank-accounts/:id
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/bank-accounts/: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()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": {
    "message": "Authorization information (Header: %s) is missing or invalid."
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": {
    "message": "Authorization information (Header: %s) is missing or invalid."
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": {
    "message": "Authorization information (Header: %s) is missing or invalid."
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": {
    "message": "Authorization information (Header: %s) is missing or invalid."
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": {
    "message": "Internal Server Error.",
    "trace_id": "664b218f93954a3480cb0ddb8f919c3f"
  }
}
GET List all bank account
{{baseUrl}}/bank-accounts
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/bank-accounts");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/get "{{baseUrl}}/bank-accounts")
require "http/client"

url = "{{baseUrl}}/bank-accounts"

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}}/bank-accounts"),
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/bank-accounts");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/bank-accounts"

	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/bank-accounts HTTP/1.1
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/bank-accounts")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/bank-accounts"))
    .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}}/bank-accounts")
  .get()
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/bank-accounts")
  .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}}/bank-accounts');

xhr.send(data);
import axios from 'axios';

const options = {method: 'GET', url: '{{baseUrl}}/bank-accounts'};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/bank-accounts';
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}}/bank-accounts',
  method: 'GET',
  headers: {}
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/bank-accounts")
  .get()
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'GET',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/bank-accounts',
  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}}/bank-accounts'};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('GET', '{{baseUrl}}/bank-accounts');

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}}/bank-accounts'};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/bank-accounts';
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}}/bank-accounts"]
                                                       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}}/bank-accounts" in

Client.call `GET uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/bank-accounts",
  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}}/bank-accounts');

echo $response->getBody();
setUrl('{{baseUrl}}/bank-accounts');
$request->setMethod(HTTP_METH_GET);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/bank-accounts');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/bank-accounts' -Method GET 
$response = Invoke-RestMethod -Uri '{{baseUrl}}/bank-accounts' -Method GET 
import http.client

conn = http.client.HTTPSConnection("example.com")

conn.request("GET", "/baseUrl/bank-accounts")

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/bank-accounts"

response = requests.get(url)

print(response.json())
library(httr)

url <- "{{baseUrl}}/bank-accounts"

response <- VERB("GET", url, content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/bank-accounts")

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/bank-accounts') do |req|
end

puts response.status
puts response.body
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/bank-accounts";

    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}}/bank-accounts
http GET {{baseUrl}}/bank-accounts
wget --quiet \
  --method GET \
  --output-document \
  - {{baseUrl}}/bank-accounts
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/bank-accounts")! 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()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": {
    "message": "Authorization information (Header: %s) is missing or invalid."
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": {
    "message": "Authorization information (Header: %s) is missing or invalid."
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": {
    "message": "Internal Server Error.",
    "trace_id": "664b218f93954a3480cb0ddb8f919c3f"
  }
}
GET Retrieve a bank account
{{baseUrl}}/bank-accounts/: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}}/bank-accounts/:id");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/get "{{baseUrl}}/bank-accounts/:id")
require "http/client"

url = "{{baseUrl}}/bank-accounts/: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}}/bank-accounts/:id"),
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/bank-accounts/:id");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/bank-accounts/: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/bank-accounts/:id HTTP/1.1
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/bank-accounts/:id")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/bank-accounts/: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}}/bank-accounts/:id")
  .get()
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/bank-accounts/: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}}/bank-accounts/:id');

xhr.send(data);
import axios from 'axios';

const options = {method: 'GET', url: '{{baseUrl}}/bank-accounts/:id'};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/bank-accounts/: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}}/bank-accounts/:id',
  method: 'GET',
  headers: {}
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/bank-accounts/:id")
  .get()
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'GET',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/bank-accounts/: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}}/bank-accounts/: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}}/bank-accounts/: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}}/bank-accounts/:id'};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/bank-accounts/: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}}/bank-accounts/: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}}/bank-accounts/:id" in

Client.call `GET uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/bank-accounts/: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}}/bank-accounts/:id');

echo $response->getBody();
setUrl('{{baseUrl}}/bank-accounts/:id');
$request->setMethod(HTTP_METH_GET);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/bank-accounts/:id');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/bank-accounts/:id' -Method GET 
$response = Invoke-RestMethod -Uri '{{baseUrl}}/bank-accounts/:id' -Method GET 
import http.client

conn = http.client.HTTPSConnection("example.com")

conn.request("GET", "/baseUrl/bank-accounts/:id")

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/bank-accounts/:id"

response = requests.get(url)

print(response.json())
library(httr)

url <- "{{baseUrl}}/bank-accounts/:id"

response <- VERB("GET", url, content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/bank-accounts/: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/bank-accounts/:id') do |req|
end

puts response.status
puts response.body
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/bank-accounts/: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}}/bank-accounts/:id
http GET {{baseUrl}}/bank-accounts/:id
wget --quiet \
  --method GET \
  --output-document \
  - {{baseUrl}}/bank-accounts/:id
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/bank-accounts/: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()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": {
    "message": "Authorization information (Header: %s) is missing or invalid."
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": {
    "message": "Authorization information (Header: %s) is missing or invalid."
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": {
    "message": "Authorization information (Header: %s) is missing or invalid."
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": {
    "message": "Internal Server Error.",
    "trace_id": "664b218f93954a3480cb0ddb8f919c3f"
  }
}
PUT Update a bank account
{{baseUrl}}/bank-accounts/:id
QUERY PARAMS

id
BODY json

{
  "account_number": "",
  "account_number_iban": "",
  "currency": "",
  "id": 0,
  "name": "",
  "need_qr": false,
  "swift": ""
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/bank-accounts/: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  \"account_number\": \"\",\n  \"account_number_iban\": \"\",\n  \"currency\": \"\",\n  \"id\": 0,\n  \"name\": \"\",\n  \"need_qr\": false,\n  \"swift\": \"\"\n}");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/put "{{baseUrl}}/bank-accounts/:id" {:content-type :json
                                                             :form-params {:account_number ""
                                                                           :account_number_iban ""
                                                                           :currency ""
                                                                           :id 0
                                                                           :name ""
                                                                           :need_qr false
                                                                           :swift ""}})
require "http/client"

url = "{{baseUrl}}/bank-accounts/:id"
headers = HTTP::Headers{
  "content-type" => "application/json"
}
reqBody = "{\n  \"account_number\": \"\",\n  \"account_number_iban\": \"\",\n  \"currency\": \"\",\n  \"id\": 0,\n  \"name\": \"\",\n  \"need_qr\": false,\n  \"swift\": \"\"\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}}/bank-accounts/:id"),
    Content = new StringContent("{\n  \"account_number\": \"\",\n  \"account_number_iban\": \"\",\n  \"currency\": \"\",\n  \"id\": 0,\n  \"name\": \"\",\n  \"need_qr\": false,\n  \"swift\": \"\"\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}}/bank-accounts/:id");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"account_number\": \"\",\n  \"account_number_iban\": \"\",\n  \"currency\": \"\",\n  \"id\": 0,\n  \"name\": \"\",\n  \"need_qr\": false,\n  \"swift\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/bank-accounts/:id"

	payload := strings.NewReader("{\n  \"account_number\": \"\",\n  \"account_number_iban\": \"\",\n  \"currency\": \"\",\n  \"id\": 0,\n  \"name\": \"\",\n  \"need_qr\": false,\n  \"swift\": \"\"\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/bank-accounts/:id HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 133

{
  "account_number": "",
  "account_number_iban": "",
  "currency": "",
  "id": 0,
  "name": "",
  "need_qr": false,
  "swift": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/bank-accounts/:id")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"account_number\": \"\",\n  \"account_number_iban\": \"\",\n  \"currency\": \"\",\n  \"id\": 0,\n  \"name\": \"\",\n  \"need_qr\": false,\n  \"swift\": \"\"\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/bank-accounts/:id"))
    .header("content-type", "application/json")
    .method("PUT", HttpRequest.BodyPublishers.ofString("{\n  \"account_number\": \"\",\n  \"account_number_iban\": \"\",\n  \"currency\": \"\",\n  \"id\": 0,\n  \"name\": \"\",\n  \"need_qr\": false,\n  \"swift\": \"\"\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  \"account_number\": \"\",\n  \"account_number_iban\": \"\",\n  \"currency\": \"\",\n  \"id\": 0,\n  \"name\": \"\",\n  \"need_qr\": false,\n  \"swift\": \"\"\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/bank-accounts/:id")
  .put(body)
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/bank-accounts/:id")
  .header("content-type", "application/json")
  .body("{\n  \"account_number\": \"\",\n  \"account_number_iban\": \"\",\n  \"currency\": \"\",\n  \"id\": 0,\n  \"name\": \"\",\n  \"need_qr\": false,\n  \"swift\": \"\"\n}")
  .asString();
const data = JSON.stringify({
  account_number: '',
  account_number_iban: '',
  currency: '',
  id: 0,
  name: '',
  need_qr: false,
  swift: ''
});

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('PUT', '{{baseUrl}}/bank-accounts/:id');
xhr.setRequestHeader('content-type', 'application/json');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'PUT',
  url: '{{baseUrl}}/bank-accounts/:id',
  headers: {'content-type': 'application/json'},
  data: {
    account_number: '',
    account_number_iban: '',
    currency: '',
    id: 0,
    name: '',
    need_qr: false,
    swift: ''
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/bank-accounts/:id';
const options = {
  method: 'PUT',
  headers: {'content-type': 'application/json'},
  body: '{"account_number":"","account_number_iban":"","currency":"","id":0,"name":"","need_qr":false,"swift":""}'
};

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}}/bank-accounts/:id',
  method: 'PUT',
  headers: {
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "account_number": "",\n  "account_number_iban": "",\n  "currency": "",\n  "id": 0,\n  "name": "",\n  "need_qr": false,\n  "swift": ""\n}'
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n  \"account_number\": \"\",\n  \"account_number_iban\": \"\",\n  \"currency\": \"\",\n  \"id\": 0,\n  \"name\": \"\",\n  \"need_qr\": false,\n  \"swift\": \"\"\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/bank-accounts/: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/bank-accounts/: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({
  account_number: '',
  account_number_iban: '',
  currency: '',
  id: 0,
  name: '',
  need_qr: false,
  swift: ''
}));
req.end();
const request = require('request');

const options = {
  method: 'PUT',
  url: '{{baseUrl}}/bank-accounts/:id',
  headers: {'content-type': 'application/json'},
  body: {
    account_number: '',
    account_number_iban: '',
    currency: '',
    id: 0,
    name: '',
    need_qr: false,
    swift: ''
  },
  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}}/bank-accounts/:id');

req.headers({
  'content-type': 'application/json'
});

req.type('json');
req.send({
  account_number: '',
  account_number_iban: '',
  currency: '',
  id: 0,
  name: '',
  need_qr: false,
  swift: ''
});

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}}/bank-accounts/:id',
  headers: {'content-type': 'application/json'},
  data: {
    account_number: '',
    account_number_iban: '',
    currency: '',
    id: 0,
    name: '',
    need_qr: false,
    swift: ''
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/bank-accounts/:id';
const options = {
  method: 'PUT',
  headers: {'content-type': 'application/json'},
  body: '{"account_number":"","account_number_iban":"","currency":"","id":0,"name":"","need_qr":false,"swift":""}'
};

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 = @{ @"account_number": @"",
                              @"account_number_iban": @"",
                              @"currency": @"",
                              @"id": @0,
                              @"name": @"",
                              @"need_qr": @NO,
                              @"swift": @"" };

NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/bank-accounts/: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}}/bank-accounts/:id" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n  \"account_number\": \"\",\n  \"account_number_iban\": \"\",\n  \"currency\": \"\",\n  \"id\": 0,\n  \"name\": \"\",\n  \"need_qr\": false,\n  \"swift\": \"\"\n}" in

Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/bank-accounts/: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([
    'account_number' => '',
    'account_number_iban' => '',
    'currency' => '',
    'id' => 0,
    'name' => '',
    'need_qr' => null,
    'swift' => ''
  ]),
  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}}/bank-accounts/:id', [
  'body' => '{
  "account_number": "",
  "account_number_iban": "",
  "currency": "",
  "id": 0,
  "name": "",
  "need_qr": false,
  "swift": ""
}',
  'headers' => [
    'content-type' => 'application/json',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/bank-accounts/:id');
$request->setMethod(HTTP_METH_PUT);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$request->setContentType('application/json');
$request->setBody(json_encode([
  'account_number' => '',
  'account_number_iban' => '',
  'currency' => '',
  'id' => 0,
  'name' => '',
  'need_qr' => null,
  'swift' => ''
]));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'account_number' => '',
  'account_number_iban' => '',
  'currency' => '',
  'id' => 0,
  'name' => '',
  'need_qr' => null,
  'swift' => ''
]));
$request->setRequestUrl('{{baseUrl}}/bank-accounts/: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}}/bank-accounts/:id' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
  "account_number": "",
  "account_number_iban": "",
  "currency": "",
  "id": 0,
  "name": "",
  "need_qr": false,
  "swift": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/bank-accounts/:id' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
  "account_number": "",
  "account_number_iban": "",
  "currency": "",
  "id": 0,
  "name": "",
  "need_qr": false,
  "swift": ""
}'
import http.client

conn = http.client.HTTPSConnection("example.com")

payload = "{\n  \"account_number\": \"\",\n  \"account_number_iban\": \"\",\n  \"currency\": \"\",\n  \"id\": 0,\n  \"name\": \"\",\n  \"need_qr\": false,\n  \"swift\": \"\"\n}"

headers = { 'content-type': "application/json" }

conn.request("PUT", "/baseUrl/bank-accounts/:id", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/bank-accounts/:id"

payload = {
    "account_number": "",
    "account_number_iban": "",
    "currency": "",
    "id": 0,
    "name": "",
    "need_qr": False,
    "swift": ""
}
headers = {"content-type": "application/json"}

response = requests.put(url, json=payload, headers=headers)

print(response.json())
library(httr)

url <- "{{baseUrl}}/bank-accounts/:id"

payload <- "{\n  \"account_number\": \"\",\n  \"account_number_iban\": \"\",\n  \"currency\": \"\",\n  \"id\": 0,\n  \"name\": \"\",\n  \"need_qr\": false,\n  \"swift\": \"\"\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}}/bank-accounts/: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  \"account_number\": \"\",\n  \"account_number_iban\": \"\",\n  \"currency\": \"\",\n  \"id\": 0,\n  \"name\": \"\",\n  \"need_qr\": false,\n  \"swift\": \"\"\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/bank-accounts/:id') do |req|
  req.body = "{\n  \"account_number\": \"\",\n  \"account_number_iban\": \"\",\n  \"currency\": \"\",\n  \"id\": 0,\n  \"name\": \"\",\n  \"need_qr\": false,\n  \"swift\": \"\"\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}}/bank-accounts/:id";

    let payload = json!({
        "account_number": "",
        "account_number_iban": "",
        "currency": "",
        "id": 0,
        "name": "",
        "need_qr": false,
        "swift": ""
    });

    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}}/bank-accounts/:id \
  --header 'content-type: application/json' \
  --data '{
  "account_number": "",
  "account_number_iban": "",
  "currency": "",
  "id": 0,
  "name": "",
  "need_qr": false,
  "swift": ""
}'
echo '{
  "account_number": "",
  "account_number_iban": "",
  "currency": "",
  "id": 0,
  "name": "",
  "need_qr": false,
  "swift": ""
}' |  \
  http PUT {{baseUrl}}/bank-accounts/:id \
  content-type:application/json
wget --quiet \
  --method PUT \
  --header 'content-type: application/json' \
  --body-data '{\n  "account_number": "",\n  "account_number_iban": "",\n  "currency": "",\n  "id": 0,\n  "name": "",\n  "need_qr": false,\n  "swift": ""\n}' \
  --output-document \
  - {{baseUrl}}/bank-accounts/:id
import Foundation

let headers = ["content-type": "application/json"]
let parameters = [
  "account_number": "",
  "account_number_iban": "",
  "currency": "",
  "id": 0,
  "name": "",
  "need_qr": false,
  "swift": ""
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/bank-accounts/: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()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": {
    "message": "Authorization information (Header: %s) is missing or invalid."
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": {
    "message": "Authorization information (Header: %s) is missing or invalid."
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": {
    "message": "Authorization information (Header: %s) is missing or invalid."
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": {
    "message": "Authorization information (Header: %s) is missing or invalid."
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": {
    "message": "Internal Server Error.",
    "trace_id": "664b218f93954a3480cb0ddb8f919c3f"
  }
}
GET Get currencies exchange rate.
{{baseUrl}}/currencies
QUERY PARAMS

from
to
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/currencies?from=&to=");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/get "{{baseUrl}}/currencies" {:query-params {:from ""
                                                                     :to ""}})
require "http/client"

url = "{{baseUrl}}/currencies?from=&to="

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}}/currencies?from=&to="),
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/currencies?from=&to=");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/currencies?from=&to="

	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/currencies?from=&to= HTTP/1.1
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/currencies?from=&to=")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/currencies?from=&to="))
    .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}}/currencies?from=&to=")
  .get()
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/currencies?from=&to=")
  .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}}/currencies?from=&to=');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'GET',
  url: '{{baseUrl}}/currencies',
  params: {from: '', to: ''}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/currencies?from=&to=';
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}}/currencies?from=&to=',
  method: 'GET',
  headers: {}
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/currencies?from=&to=")
  .get()
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'GET',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/currencies?from=&to=',
  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}}/currencies',
  qs: {from: '', to: ''}
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('GET', '{{baseUrl}}/currencies');

req.query({
  from: '',
  to: ''
});

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}}/currencies',
  params: {from: '', to: ''}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/currencies?from=&to=';
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}}/currencies?from=&to="]
                                                       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}}/currencies?from=&to=" in

Client.call `GET uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/currencies?from=&to=",
  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}}/currencies?from=&to=');

echo $response->getBody();
setUrl('{{baseUrl}}/currencies');
$request->setMethod(HTTP_METH_GET);

$request->setQueryData([
  'from' => '',
  'to' => ''
]);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/currencies');
$request->setRequestMethod('GET');
$request->setQuery(new http\QueryString([
  'from' => '',
  'to' => ''
]));

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/currencies?from=&to=' -Method GET 
$response = Invoke-RestMethod -Uri '{{baseUrl}}/currencies?from=&to=' -Method GET 
import http.client

conn = http.client.HTTPSConnection("example.com")

conn.request("GET", "/baseUrl/currencies?from=&to=")

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/currencies"

querystring = {"from":"","to":""}

response = requests.get(url, params=querystring)

print(response.json())
library(httr)

url <- "{{baseUrl}}/currencies"

queryString <- list(
  from = "",
  to = ""
)

response <- VERB("GET", url, query = queryString, content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/currencies?from=&to=")

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/currencies') do |req|
  req.params['from'] = ''
  req.params['to'] = ''
end

puts response.status
puts response.body
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/currencies";

    let querystring = [
        ("from", ""),
        ("to", ""),
    ];

    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}}/currencies?from=&to='
http GET '{{baseUrl}}/currencies?from=&to='
wget --quiet \
  --method GET \
  --output-document \
  - '{{baseUrl}}/currencies?from=&to='
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/currencies?from=&to=")! 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()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": {
    "message": "Authorization information (Header: %s) is missing or invalid."
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": {
    "message": "Authorization information (Header: %s) is missing or invalid."
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": {
    "message": "Internal Server Error.",
    "trace_id": "664b218f93954a3480cb0ddb8f919c3f"
  }
}
POST Cancel a document
{{baseUrl}}/documents/:id/cancel
QUERY PARAMS

id
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/documents/:id/cancel");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/post "{{baseUrl}}/documents/:id/cancel")
require "http/client"

url = "{{baseUrl}}/documents/:id/cancel"

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}}/documents/:id/cancel"),
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/documents/:id/cancel");
var request = new RestRequest("", Method.Post);
var response = client.Execute(request);
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/documents/:id/cancel"

	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/documents/:id/cancel HTTP/1.1
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/documents/:id/cancel")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/documents/:id/cancel"))
    .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}}/documents/:id/cancel")
  .post(null)
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/documents/:id/cancel")
  .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}}/documents/:id/cancel');

xhr.send(data);
import axios from 'axios';

const options = {method: 'POST', url: '{{baseUrl}}/documents/:id/cancel'};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/documents/:id/cancel';
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}}/documents/:id/cancel',
  method: 'POST',
  headers: {}
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/documents/:id/cancel")
  .post(null)
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'POST',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/documents/:id/cancel',
  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}}/documents/:id/cancel'};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('POST', '{{baseUrl}}/documents/:id/cancel');

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}}/documents/:id/cancel'};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/documents/:id/cancel';
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}}/documents/:id/cancel"]
                                                       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}}/documents/:id/cancel" in

Client.call `POST uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/documents/:id/cancel",
  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}}/documents/:id/cancel');

echo $response->getBody();
setUrl('{{baseUrl}}/documents/:id/cancel');
$request->setMethod(HTTP_METH_POST);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/documents/:id/cancel');
$request->setRequestMethod('POST');
$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/documents/:id/cancel' -Method POST 
$response = Invoke-RestMethod -Uri '{{baseUrl}}/documents/:id/cancel' -Method POST 
import http.client

conn = http.client.HTTPSConnection("example.com")

conn.request("POST", "/baseUrl/documents/:id/cancel")

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/documents/:id/cancel"

response = requests.post(url)

print(response.json())
library(httr)

url <- "{{baseUrl}}/documents/:id/cancel"

response <- VERB("POST", url, content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/documents/:id/cancel")

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/documents/:id/cancel') do |req|
end

puts response.status
puts response.body
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/documents/:id/cancel";

    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}}/documents/:id/cancel
http POST {{baseUrl}}/documents/:id/cancel
wget --quiet \
  --method POST \
  --output-document \
  - {{baseUrl}}/documents/:id/cancel
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/documents/:id/cancel")! 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()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "invoice_number": "PREFIX / 2020-000001"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": {
    "message": "Authorization information (Header: %s) is missing or invalid."
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": {
    "message": "Authorization information (Header: %s) is missing or invalid."
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": {
    "message": "Authorization information (Header: %s) is missing or invalid."
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": {
    "message": "Authorization information (Header: %s) is missing or invalid."
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": {
    "message": "Internal Server Error.",
    "trace_id": "664b218f93954a3480cb0ddb8f919c3f"
  }
}
POST Create a document from proforma.
{{baseUrl}}/documents/:id/create-from-proforma
QUERY PARAMS

id
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/documents/:id/create-from-proforma");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/post "{{baseUrl}}/documents/:id/create-from-proforma")
require "http/client"

url = "{{baseUrl}}/documents/:id/create-from-proforma"

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}}/documents/:id/create-from-proforma"),
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/documents/:id/create-from-proforma");
var request = new RestRequest("", Method.Post);
var response = client.Execute(request);
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/documents/:id/create-from-proforma"

	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/documents/:id/create-from-proforma HTTP/1.1
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/documents/:id/create-from-proforma")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/documents/:id/create-from-proforma"))
    .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}}/documents/:id/create-from-proforma")
  .post(null)
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/documents/:id/create-from-proforma")
  .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}}/documents/:id/create-from-proforma');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'POST',
  url: '{{baseUrl}}/documents/:id/create-from-proforma'
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/documents/:id/create-from-proforma';
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}}/documents/:id/create-from-proforma',
  method: 'POST',
  headers: {}
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/documents/:id/create-from-proforma")
  .post(null)
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'POST',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/documents/:id/create-from-proforma',
  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}}/documents/:id/create-from-proforma'
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('POST', '{{baseUrl}}/documents/:id/create-from-proforma');

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}}/documents/:id/create-from-proforma'
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/documents/:id/create-from-proforma';
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}}/documents/:id/create-from-proforma"]
                                                       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}}/documents/:id/create-from-proforma" in

Client.call `POST uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/documents/:id/create-from-proforma",
  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}}/documents/:id/create-from-proforma');

echo $response->getBody();
setUrl('{{baseUrl}}/documents/:id/create-from-proforma');
$request->setMethod(HTTP_METH_POST);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/documents/:id/create-from-proforma');
$request->setRequestMethod('POST');
$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/documents/:id/create-from-proforma' -Method POST 
$response = Invoke-RestMethod -Uri '{{baseUrl}}/documents/:id/create-from-proforma' -Method POST 
import http.client

conn = http.client.HTTPSConnection("example.com")

conn.request("POST", "/baseUrl/documents/:id/create-from-proforma")

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/documents/:id/create-from-proforma"

response = requests.post(url)

print(response.json())
library(httr)

url <- "{{baseUrl}}/documents/:id/create-from-proforma"

response <- VERB("POST", url, content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/documents/:id/create-from-proforma")

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/documents/:id/create-from-proforma') do |req|
end

puts response.status
puts response.body
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/documents/:id/create-from-proforma";

    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}}/documents/:id/create-from-proforma
http POST {{baseUrl}}/documents/:id/create-from-proforma
wget --quiet \
  --method POST \
  --output-document \
  - {{baseUrl}}/documents/:id/create-from-proforma
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/documents/:id/create-from-proforma")! 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()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "invoice_number": "PREFIX / 2020-000001"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": {
    "message": "Authorization information (Header: %s) is missing or invalid."
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": {
    "message": "Authorization information (Header: %s) is missing or invalid."
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": {
    "message": "Authorization information (Header: %s) is missing or invalid."
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": {
    "message": "Authorization information (Header: %s) is missing or invalid."
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": {
    "message": "Internal Server Error.",
    "trace_id": "664b218f93954a3480cb0ddb8f919c3f"
  }
}
POST Create a document
{{baseUrl}}/documents
BODY json

{
  "bank_account_id": 0,
  "block_id": 0,
  "comment": "",
  "conversion_rate": "",
  "currency": "",
  "due_date": "",
  "electronic": false,
  "fulfillment_date": "",
  "items": [],
  "language": "",
  "paid": false,
  "partner_id": 0,
  "payment_method": "",
  "settings": {
    "mediated_service": false,
    "online_payment": "",
    "place_id": 0,
    "round": "",
    "without_financial_fulfillment": false
  },
  "type": "",
  "vendor_id": ""
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/documents");

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  \"bank_account_id\": 0,\n  \"block_id\": 0,\n  \"comment\": \"\",\n  \"conversion_rate\": \"\",\n  \"currency\": \"\",\n  \"due_date\": \"\",\n  \"electronic\": false,\n  \"fulfillment_date\": \"\",\n  \"items\": [],\n  \"language\": \"\",\n  \"paid\": false,\n  \"partner_id\": 0,\n  \"payment_method\": \"\",\n  \"settings\": {\n    \"mediated_service\": false,\n    \"online_payment\": \"\",\n    \"place_id\": 0,\n    \"round\": \"\",\n    \"without_financial_fulfillment\": false\n  },\n  \"type\": \"\",\n  \"vendor_id\": \"\"\n}");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/post "{{baseUrl}}/documents" {:content-type :json
                                                      :form-params {:bank_account_id 0
                                                                    :block_id 0
                                                                    :comment ""
                                                                    :conversion_rate ""
                                                                    :currency ""
                                                                    :due_date ""
                                                                    :electronic false
                                                                    :fulfillment_date ""
                                                                    :items []
                                                                    :language ""
                                                                    :paid false
                                                                    :partner_id 0
                                                                    :payment_method ""
                                                                    :settings {:mediated_service false
                                                                               :online_payment ""
                                                                               :place_id 0
                                                                               :round ""
                                                                               :without_financial_fulfillment false}
                                                                    :type ""
                                                                    :vendor_id ""}})
require "http/client"

url = "{{baseUrl}}/documents"
headers = HTTP::Headers{
  "content-type" => "application/json"
}
reqBody = "{\n  \"bank_account_id\": 0,\n  \"block_id\": 0,\n  \"comment\": \"\",\n  \"conversion_rate\": \"\",\n  \"currency\": \"\",\n  \"due_date\": \"\",\n  \"electronic\": false,\n  \"fulfillment_date\": \"\",\n  \"items\": [],\n  \"language\": \"\",\n  \"paid\": false,\n  \"partner_id\": 0,\n  \"payment_method\": \"\",\n  \"settings\": {\n    \"mediated_service\": false,\n    \"online_payment\": \"\",\n    \"place_id\": 0,\n    \"round\": \"\",\n    \"without_financial_fulfillment\": false\n  },\n  \"type\": \"\",\n  \"vendor_id\": \"\"\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}}/documents"),
    Content = new StringContent("{\n  \"bank_account_id\": 0,\n  \"block_id\": 0,\n  \"comment\": \"\",\n  \"conversion_rate\": \"\",\n  \"currency\": \"\",\n  \"due_date\": \"\",\n  \"electronic\": false,\n  \"fulfillment_date\": \"\",\n  \"items\": [],\n  \"language\": \"\",\n  \"paid\": false,\n  \"partner_id\": 0,\n  \"payment_method\": \"\",\n  \"settings\": {\n    \"mediated_service\": false,\n    \"online_payment\": \"\",\n    \"place_id\": 0,\n    \"round\": \"\",\n    \"without_financial_fulfillment\": false\n  },\n  \"type\": \"\",\n  \"vendor_id\": \"\"\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}}/documents");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"bank_account_id\": 0,\n  \"block_id\": 0,\n  \"comment\": \"\",\n  \"conversion_rate\": \"\",\n  \"currency\": \"\",\n  \"due_date\": \"\",\n  \"electronic\": false,\n  \"fulfillment_date\": \"\",\n  \"items\": [],\n  \"language\": \"\",\n  \"paid\": false,\n  \"partner_id\": 0,\n  \"payment_method\": \"\",\n  \"settings\": {\n    \"mediated_service\": false,\n    \"online_payment\": \"\",\n    \"place_id\": 0,\n    \"round\": \"\",\n    \"without_financial_fulfillment\": false\n  },\n  \"type\": \"\",\n  \"vendor_id\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/documents"

	payload := strings.NewReader("{\n  \"bank_account_id\": 0,\n  \"block_id\": 0,\n  \"comment\": \"\",\n  \"conversion_rate\": \"\",\n  \"currency\": \"\",\n  \"due_date\": \"\",\n  \"electronic\": false,\n  \"fulfillment_date\": \"\",\n  \"items\": [],\n  \"language\": \"\",\n  \"paid\": false,\n  \"partner_id\": 0,\n  \"payment_method\": \"\",\n  \"settings\": {\n    \"mediated_service\": false,\n    \"online_payment\": \"\",\n    \"place_id\": 0,\n    \"round\": \"\",\n    \"without_financial_fulfillment\": false\n  },\n  \"type\": \"\",\n  \"vendor_id\": \"\"\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/documents HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 453

{
  "bank_account_id": 0,
  "block_id": 0,
  "comment": "",
  "conversion_rate": "",
  "currency": "",
  "due_date": "",
  "electronic": false,
  "fulfillment_date": "",
  "items": [],
  "language": "",
  "paid": false,
  "partner_id": 0,
  "payment_method": "",
  "settings": {
    "mediated_service": false,
    "online_payment": "",
    "place_id": 0,
    "round": "",
    "without_financial_fulfillment": false
  },
  "type": "",
  "vendor_id": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/documents")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"bank_account_id\": 0,\n  \"block_id\": 0,\n  \"comment\": \"\",\n  \"conversion_rate\": \"\",\n  \"currency\": \"\",\n  \"due_date\": \"\",\n  \"electronic\": false,\n  \"fulfillment_date\": \"\",\n  \"items\": [],\n  \"language\": \"\",\n  \"paid\": false,\n  \"partner_id\": 0,\n  \"payment_method\": \"\",\n  \"settings\": {\n    \"mediated_service\": false,\n    \"online_payment\": \"\",\n    \"place_id\": 0,\n    \"round\": \"\",\n    \"without_financial_fulfillment\": false\n  },\n  \"type\": \"\",\n  \"vendor_id\": \"\"\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/documents"))
    .header("content-type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("{\n  \"bank_account_id\": 0,\n  \"block_id\": 0,\n  \"comment\": \"\",\n  \"conversion_rate\": \"\",\n  \"currency\": \"\",\n  \"due_date\": \"\",\n  \"electronic\": false,\n  \"fulfillment_date\": \"\",\n  \"items\": [],\n  \"language\": \"\",\n  \"paid\": false,\n  \"partner_id\": 0,\n  \"payment_method\": \"\",\n  \"settings\": {\n    \"mediated_service\": false,\n    \"online_payment\": \"\",\n    \"place_id\": 0,\n    \"round\": \"\",\n    \"without_financial_fulfillment\": false\n  },\n  \"type\": \"\",\n  \"vendor_id\": \"\"\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  \"bank_account_id\": 0,\n  \"block_id\": 0,\n  \"comment\": \"\",\n  \"conversion_rate\": \"\",\n  \"currency\": \"\",\n  \"due_date\": \"\",\n  \"electronic\": false,\n  \"fulfillment_date\": \"\",\n  \"items\": [],\n  \"language\": \"\",\n  \"paid\": false,\n  \"partner_id\": 0,\n  \"payment_method\": \"\",\n  \"settings\": {\n    \"mediated_service\": false,\n    \"online_payment\": \"\",\n    \"place_id\": 0,\n    \"round\": \"\",\n    \"without_financial_fulfillment\": false\n  },\n  \"type\": \"\",\n  \"vendor_id\": \"\"\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/documents")
  .post(body)
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/documents")
  .header("content-type", "application/json")
  .body("{\n  \"bank_account_id\": 0,\n  \"block_id\": 0,\n  \"comment\": \"\",\n  \"conversion_rate\": \"\",\n  \"currency\": \"\",\n  \"due_date\": \"\",\n  \"electronic\": false,\n  \"fulfillment_date\": \"\",\n  \"items\": [],\n  \"language\": \"\",\n  \"paid\": false,\n  \"partner_id\": 0,\n  \"payment_method\": \"\",\n  \"settings\": {\n    \"mediated_service\": false,\n    \"online_payment\": \"\",\n    \"place_id\": 0,\n    \"round\": \"\",\n    \"without_financial_fulfillment\": false\n  },\n  \"type\": \"\",\n  \"vendor_id\": \"\"\n}")
  .asString();
const data = JSON.stringify({
  bank_account_id: 0,
  block_id: 0,
  comment: '',
  conversion_rate: '',
  currency: '',
  due_date: '',
  electronic: false,
  fulfillment_date: '',
  items: [],
  language: '',
  paid: false,
  partner_id: 0,
  payment_method: '',
  settings: {
    mediated_service: false,
    online_payment: '',
    place_id: 0,
    round: '',
    without_financial_fulfillment: false
  },
  type: '',
  vendor_id: ''
});

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('POST', '{{baseUrl}}/documents');
xhr.setRequestHeader('content-type', 'application/json');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'POST',
  url: '{{baseUrl}}/documents',
  headers: {'content-type': 'application/json'},
  data: {
    bank_account_id: 0,
    block_id: 0,
    comment: '',
    conversion_rate: '',
    currency: '',
    due_date: '',
    electronic: false,
    fulfillment_date: '',
    items: [],
    language: '',
    paid: false,
    partner_id: 0,
    payment_method: '',
    settings: {
      mediated_service: false,
      online_payment: '',
      place_id: 0,
      round: '',
      without_financial_fulfillment: false
    },
    type: '',
    vendor_id: ''
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/documents';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"bank_account_id":0,"block_id":0,"comment":"","conversion_rate":"","currency":"","due_date":"","electronic":false,"fulfillment_date":"","items":[],"language":"","paid":false,"partner_id":0,"payment_method":"","settings":{"mediated_service":false,"online_payment":"","place_id":0,"round":"","without_financial_fulfillment":false},"type":"","vendor_id":""}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
const settings = {
  async: true,
  crossDomain: true,
  url: '{{baseUrl}}/documents',
  method: 'POST',
  headers: {
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "bank_account_id": 0,\n  "block_id": 0,\n  "comment": "",\n  "conversion_rate": "",\n  "currency": "",\n  "due_date": "",\n  "electronic": false,\n  "fulfillment_date": "",\n  "items": [],\n  "language": "",\n  "paid": false,\n  "partner_id": 0,\n  "payment_method": "",\n  "settings": {\n    "mediated_service": false,\n    "online_payment": "",\n    "place_id": 0,\n    "round": "",\n    "without_financial_fulfillment": false\n  },\n  "type": "",\n  "vendor_id": ""\n}'
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n  \"bank_account_id\": 0,\n  \"block_id\": 0,\n  \"comment\": \"\",\n  \"conversion_rate\": \"\",\n  \"currency\": \"\",\n  \"due_date\": \"\",\n  \"electronic\": false,\n  \"fulfillment_date\": \"\",\n  \"items\": [],\n  \"language\": \"\",\n  \"paid\": false,\n  \"partner_id\": 0,\n  \"payment_method\": \"\",\n  \"settings\": {\n    \"mediated_service\": false,\n    \"online_payment\": \"\",\n    \"place_id\": 0,\n    \"round\": \"\",\n    \"without_financial_fulfillment\": false\n  },\n  \"type\": \"\",\n  \"vendor_id\": \"\"\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/documents")
  .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/documents',
  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({
  bank_account_id: 0,
  block_id: 0,
  comment: '',
  conversion_rate: '',
  currency: '',
  due_date: '',
  electronic: false,
  fulfillment_date: '',
  items: [],
  language: '',
  paid: false,
  partner_id: 0,
  payment_method: '',
  settings: {
    mediated_service: false,
    online_payment: '',
    place_id: 0,
    round: '',
    without_financial_fulfillment: false
  },
  type: '',
  vendor_id: ''
}));
req.end();
const request = require('request');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/documents',
  headers: {'content-type': 'application/json'},
  body: {
    bank_account_id: 0,
    block_id: 0,
    comment: '',
    conversion_rate: '',
    currency: '',
    due_date: '',
    electronic: false,
    fulfillment_date: '',
    items: [],
    language: '',
    paid: false,
    partner_id: 0,
    payment_method: '',
    settings: {
      mediated_service: false,
      online_payment: '',
      place_id: 0,
      round: '',
      without_financial_fulfillment: false
    },
    type: '',
    vendor_id: ''
  },
  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}}/documents');

req.headers({
  'content-type': 'application/json'
});

req.type('json');
req.send({
  bank_account_id: 0,
  block_id: 0,
  comment: '',
  conversion_rate: '',
  currency: '',
  due_date: '',
  electronic: false,
  fulfillment_date: '',
  items: [],
  language: '',
  paid: false,
  partner_id: 0,
  payment_method: '',
  settings: {
    mediated_service: false,
    online_payment: '',
    place_id: 0,
    round: '',
    without_financial_fulfillment: false
  },
  type: '',
  vendor_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}}/documents',
  headers: {'content-type': 'application/json'},
  data: {
    bank_account_id: 0,
    block_id: 0,
    comment: '',
    conversion_rate: '',
    currency: '',
    due_date: '',
    electronic: false,
    fulfillment_date: '',
    items: [],
    language: '',
    paid: false,
    partner_id: 0,
    payment_method: '',
    settings: {
      mediated_service: false,
      online_payment: '',
      place_id: 0,
      round: '',
      without_financial_fulfillment: false
    },
    type: '',
    vendor_id: ''
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/documents';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"bank_account_id":0,"block_id":0,"comment":"","conversion_rate":"","currency":"","due_date":"","electronic":false,"fulfillment_date":"","items":[],"language":"","paid":false,"partner_id":0,"payment_method":"","settings":{"mediated_service":false,"online_payment":"","place_id":0,"round":"","without_financial_fulfillment":false},"type":"","vendor_id":""}'
};

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 = @{ @"bank_account_id": @0,
                              @"block_id": @0,
                              @"comment": @"",
                              @"conversion_rate": @"",
                              @"currency": @"",
                              @"due_date": @"",
                              @"electronic": @NO,
                              @"fulfillment_date": @"",
                              @"items": @[  ],
                              @"language": @"",
                              @"paid": @NO,
                              @"partner_id": @0,
                              @"payment_method": @"",
                              @"settings": @{ @"mediated_service": @NO, @"online_payment": @"", @"place_id": @0, @"round": @"", @"without_financial_fulfillment": @NO },
                              @"type": @"",
                              @"vendor_id": @"" };

NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/documents"]
                                                       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}}/documents" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n  \"bank_account_id\": 0,\n  \"block_id\": 0,\n  \"comment\": \"\",\n  \"conversion_rate\": \"\",\n  \"currency\": \"\",\n  \"due_date\": \"\",\n  \"electronic\": false,\n  \"fulfillment_date\": \"\",\n  \"items\": [],\n  \"language\": \"\",\n  \"paid\": false,\n  \"partner_id\": 0,\n  \"payment_method\": \"\",\n  \"settings\": {\n    \"mediated_service\": false,\n    \"online_payment\": \"\",\n    \"place_id\": 0,\n    \"round\": \"\",\n    \"without_financial_fulfillment\": false\n  },\n  \"type\": \"\",\n  \"vendor_id\": \"\"\n}" in

Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/documents",
  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([
    'bank_account_id' => 0,
    'block_id' => 0,
    'comment' => '',
    'conversion_rate' => '',
    'currency' => '',
    'due_date' => '',
    'electronic' => null,
    'fulfillment_date' => '',
    'items' => [
        
    ],
    'language' => '',
    'paid' => null,
    'partner_id' => 0,
    'payment_method' => '',
    'settings' => [
        'mediated_service' => null,
        'online_payment' => '',
        'place_id' => 0,
        'round' => '',
        'without_financial_fulfillment' => null
    ],
    'type' => '',
    'vendor_id' => ''
  ]),
  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}}/documents', [
  'body' => '{
  "bank_account_id": 0,
  "block_id": 0,
  "comment": "",
  "conversion_rate": "",
  "currency": "",
  "due_date": "",
  "electronic": false,
  "fulfillment_date": "",
  "items": [],
  "language": "",
  "paid": false,
  "partner_id": 0,
  "payment_method": "",
  "settings": {
    "mediated_service": false,
    "online_payment": "",
    "place_id": 0,
    "round": "",
    "without_financial_fulfillment": false
  },
  "type": "",
  "vendor_id": ""
}',
  'headers' => [
    'content-type' => 'application/json',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/documents');
$request->setMethod(HTTP_METH_POST);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$request->setContentType('application/json');
$request->setBody(json_encode([
  'bank_account_id' => 0,
  'block_id' => 0,
  'comment' => '',
  'conversion_rate' => '',
  'currency' => '',
  'due_date' => '',
  'electronic' => null,
  'fulfillment_date' => '',
  'items' => [
    
  ],
  'language' => '',
  'paid' => null,
  'partner_id' => 0,
  'payment_method' => '',
  'settings' => [
    'mediated_service' => null,
    'online_payment' => '',
    'place_id' => 0,
    'round' => '',
    'without_financial_fulfillment' => null
  ],
  'type' => '',
  'vendor_id' => ''
]));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'bank_account_id' => 0,
  'block_id' => 0,
  'comment' => '',
  'conversion_rate' => '',
  'currency' => '',
  'due_date' => '',
  'electronic' => null,
  'fulfillment_date' => '',
  'items' => [
    
  ],
  'language' => '',
  'paid' => null,
  'partner_id' => 0,
  'payment_method' => '',
  'settings' => [
    'mediated_service' => null,
    'online_payment' => '',
    'place_id' => 0,
    'round' => '',
    'without_financial_fulfillment' => null
  ],
  'type' => '',
  'vendor_id' => ''
]));
$request->setRequestUrl('{{baseUrl}}/documents');
$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}}/documents' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "bank_account_id": 0,
  "block_id": 0,
  "comment": "",
  "conversion_rate": "",
  "currency": "",
  "due_date": "",
  "electronic": false,
  "fulfillment_date": "",
  "items": [],
  "language": "",
  "paid": false,
  "partner_id": 0,
  "payment_method": "",
  "settings": {
    "mediated_service": false,
    "online_payment": "",
    "place_id": 0,
    "round": "",
    "without_financial_fulfillment": false
  },
  "type": "",
  "vendor_id": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/documents' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "bank_account_id": 0,
  "block_id": 0,
  "comment": "",
  "conversion_rate": "",
  "currency": "",
  "due_date": "",
  "electronic": false,
  "fulfillment_date": "",
  "items": [],
  "language": "",
  "paid": false,
  "partner_id": 0,
  "payment_method": "",
  "settings": {
    "mediated_service": false,
    "online_payment": "",
    "place_id": 0,
    "round": "",
    "without_financial_fulfillment": false
  },
  "type": "",
  "vendor_id": ""
}'
import http.client

conn = http.client.HTTPSConnection("example.com")

payload = "{\n  \"bank_account_id\": 0,\n  \"block_id\": 0,\n  \"comment\": \"\",\n  \"conversion_rate\": \"\",\n  \"currency\": \"\",\n  \"due_date\": \"\",\n  \"electronic\": false,\n  \"fulfillment_date\": \"\",\n  \"items\": [],\n  \"language\": \"\",\n  \"paid\": false,\n  \"partner_id\": 0,\n  \"payment_method\": \"\",\n  \"settings\": {\n    \"mediated_service\": false,\n    \"online_payment\": \"\",\n    \"place_id\": 0,\n    \"round\": \"\",\n    \"without_financial_fulfillment\": false\n  },\n  \"type\": \"\",\n  \"vendor_id\": \"\"\n}"

headers = { 'content-type': "application/json" }

conn.request("POST", "/baseUrl/documents", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/documents"

payload = {
    "bank_account_id": 0,
    "block_id": 0,
    "comment": "",
    "conversion_rate": "",
    "currency": "",
    "due_date": "",
    "electronic": False,
    "fulfillment_date": "",
    "items": [],
    "language": "",
    "paid": False,
    "partner_id": 0,
    "payment_method": "",
    "settings": {
        "mediated_service": False,
        "online_payment": "",
        "place_id": 0,
        "round": "",
        "without_financial_fulfillment": False
    },
    "type": "",
    "vendor_id": ""
}
headers = {"content-type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
library(httr)

url <- "{{baseUrl}}/documents"

payload <- "{\n  \"bank_account_id\": 0,\n  \"block_id\": 0,\n  \"comment\": \"\",\n  \"conversion_rate\": \"\",\n  \"currency\": \"\",\n  \"due_date\": \"\",\n  \"electronic\": false,\n  \"fulfillment_date\": \"\",\n  \"items\": [],\n  \"language\": \"\",\n  \"paid\": false,\n  \"partner_id\": 0,\n  \"payment_method\": \"\",\n  \"settings\": {\n    \"mediated_service\": false,\n    \"online_payment\": \"\",\n    \"place_id\": 0,\n    \"round\": \"\",\n    \"without_financial_fulfillment\": false\n  },\n  \"type\": \"\",\n  \"vendor_id\": \"\"\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}}/documents")

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  \"bank_account_id\": 0,\n  \"block_id\": 0,\n  \"comment\": \"\",\n  \"conversion_rate\": \"\",\n  \"currency\": \"\",\n  \"due_date\": \"\",\n  \"electronic\": false,\n  \"fulfillment_date\": \"\",\n  \"items\": [],\n  \"language\": \"\",\n  \"paid\": false,\n  \"partner_id\": 0,\n  \"payment_method\": \"\",\n  \"settings\": {\n    \"mediated_service\": false,\n    \"online_payment\": \"\",\n    \"place_id\": 0,\n    \"round\": \"\",\n    \"without_financial_fulfillment\": false\n  },\n  \"type\": \"\",\n  \"vendor_id\": \"\"\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/documents') do |req|
  req.body = "{\n  \"bank_account_id\": 0,\n  \"block_id\": 0,\n  \"comment\": \"\",\n  \"conversion_rate\": \"\",\n  \"currency\": \"\",\n  \"due_date\": \"\",\n  \"electronic\": false,\n  \"fulfillment_date\": \"\",\n  \"items\": [],\n  \"language\": \"\",\n  \"paid\": false,\n  \"partner_id\": 0,\n  \"payment_method\": \"\",\n  \"settings\": {\n    \"mediated_service\": false,\n    \"online_payment\": \"\",\n    \"place_id\": 0,\n    \"round\": \"\",\n    \"without_financial_fulfillment\": false\n  },\n  \"type\": \"\",\n  \"vendor_id\": \"\"\n}"
end

puts response.status
puts response.body
use serde_json::json;
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/documents";

    let payload = json!({
        "bank_account_id": 0,
        "block_id": 0,
        "comment": "",
        "conversion_rate": "",
        "currency": "",
        "due_date": "",
        "electronic": false,
        "fulfillment_date": "",
        "items": (),
        "language": "",
        "paid": false,
        "partner_id": 0,
        "payment_method": "",
        "settings": json!({
            "mediated_service": false,
            "online_payment": "",
            "place_id": 0,
            "round": "",
            "without_financial_fulfillment": false
        }),
        "type": "",
        "vendor_id": ""
    });

    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}}/documents \
  --header 'content-type: application/json' \
  --data '{
  "bank_account_id": 0,
  "block_id": 0,
  "comment": "",
  "conversion_rate": "",
  "currency": "",
  "due_date": "",
  "electronic": false,
  "fulfillment_date": "",
  "items": [],
  "language": "",
  "paid": false,
  "partner_id": 0,
  "payment_method": "",
  "settings": {
    "mediated_service": false,
    "online_payment": "",
    "place_id": 0,
    "round": "",
    "without_financial_fulfillment": false
  },
  "type": "",
  "vendor_id": ""
}'
echo '{
  "bank_account_id": 0,
  "block_id": 0,
  "comment": "",
  "conversion_rate": "",
  "currency": "",
  "due_date": "",
  "electronic": false,
  "fulfillment_date": "",
  "items": [],
  "language": "",
  "paid": false,
  "partner_id": 0,
  "payment_method": "",
  "settings": {
    "mediated_service": false,
    "online_payment": "",
    "place_id": 0,
    "round": "",
    "without_financial_fulfillment": false
  },
  "type": "",
  "vendor_id": ""
}' |  \
  http POST {{baseUrl}}/documents \
  content-type:application/json
wget --quiet \
  --method POST \
  --header 'content-type: application/json' \
  --body-data '{\n  "bank_account_id": 0,\n  "block_id": 0,\n  "comment": "",\n  "conversion_rate": "",\n  "currency": "",\n  "due_date": "",\n  "electronic": false,\n  "fulfillment_date": "",\n  "items": [],\n  "language": "",\n  "paid": false,\n  "partner_id": 0,\n  "payment_method": "",\n  "settings": {\n    "mediated_service": false,\n    "online_payment": "",\n    "place_id": 0,\n    "round": "",\n    "without_financial_fulfillment": false\n  },\n  "type": "",\n  "vendor_id": ""\n}' \
  --output-document \
  - {{baseUrl}}/documents
import Foundation

let headers = ["content-type": "application/json"]
let parameters = [
  "bank_account_id": 0,
  "block_id": 0,
  "comment": "",
  "conversion_rate": "",
  "currency": "",
  "due_date": "",
  "electronic": false,
  "fulfillment_date": "",
  "items": [],
  "language": "",
  "paid": false,
  "partner_id": 0,
  "payment_method": "",
  "settings": [
    "mediated_service": false,
    "online_payment": "",
    "place_id": 0,
    "round": "",
    "without_financial_fulfillment": false
  ],
  "type": "",
  "vendor_id": ""
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/documents")! 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()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "invoice_number": "PREFIX / 2020-000001"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": {
    "message": "Authorization information (Header: %s) is missing or invalid."
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": {
    "message": "Authorization information (Header: %s) is missing or invalid."
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": {
    "message": "Authorization information (Header: %s) is missing or invalid."
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": {
    "message": "Internal Server Error.",
    "trace_id": "664b218f93954a3480cb0ddb8f919c3f"
  }
}
DELETE Delete all payment history on document
{{baseUrl}}/documents/:id/payments
QUERY PARAMS

id
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/documents/:id/payments");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/delete "{{baseUrl}}/documents/:id/payments")
require "http/client"

url = "{{baseUrl}}/documents/:id/payments"

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}}/documents/:id/payments"),
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/documents/:id/payments");
var request = new RestRequest("", Method.Delete);
var response = client.Execute(request);
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/documents/:id/payments"

	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/documents/:id/payments HTTP/1.1
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/documents/:id/payments")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/documents/:id/payments"))
    .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}}/documents/:id/payments")
  .delete(null)
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/documents/:id/payments")
  .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}}/documents/:id/payments');

xhr.send(data);
import axios from 'axios';

const options = {method: 'DELETE', url: '{{baseUrl}}/documents/:id/payments'};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/documents/:id/payments';
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}}/documents/:id/payments',
  method: 'DELETE',
  headers: {}
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/documents/:id/payments")
  .delete(null)
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'DELETE',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/documents/:id/payments',
  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}}/documents/:id/payments'};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('DELETE', '{{baseUrl}}/documents/:id/payments');

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}}/documents/:id/payments'};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/documents/:id/payments';
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}}/documents/:id/payments"]
                                                       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}}/documents/:id/payments" in

Client.call `DELETE uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/documents/:id/payments",
  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}}/documents/:id/payments');

echo $response->getBody();
setUrl('{{baseUrl}}/documents/:id/payments');
$request->setMethod(HTTP_METH_DELETE);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/documents/:id/payments');
$request->setRequestMethod('DELETE');
$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/documents/:id/payments' -Method DELETE 
$response = Invoke-RestMethod -Uri '{{baseUrl}}/documents/:id/payments' -Method DELETE 
import http.client

conn = http.client.HTTPSConnection("example.com")

conn.request("DELETE", "/baseUrl/documents/:id/payments")

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/documents/:id/payments"

response = requests.delete(url)

print(response.json())
library(httr)

url <- "{{baseUrl}}/documents/:id/payments"

response <- VERB("DELETE", url, content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/documents/:id/payments")

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/documents/:id/payments') do |req|
end

puts response.status
puts response.body
use std::str::FromStr;
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/documents/:id/payments";

    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}}/documents/:id/payments
http DELETE {{baseUrl}}/documents/:id/payments
wget --quiet \
  --method DELETE \
  --output-document \
  - {{baseUrl}}/documents/:id/payments
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/documents/:id/payments")! 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()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": {
    "message": "Authorization information (Header: %s) is missing or invalid."
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": {
    "message": "Authorization information (Header: %s) is missing or invalid."
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": {
    "message": "Authorization information (Header: %s) is missing or invalid."
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": {
    "message": "Authorization information (Header: %s) is missing or invalid."
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": {
    "message": "Internal Server Error.",
    "trace_id": "664b218f93954a3480cb0ddb8f919c3f"
  }
}
GET Download a document in PDF format.
{{baseUrl}}/documents/:id/download
QUERY PARAMS

id
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/documents/:id/download");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/get "{{baseUrl}}/documents/:id/download")
require "http/client"

url = "{{baseUrl}}/documents/:id/download"

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}}/documents/:id/download"),
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/documents/:id/download");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/documents/:id/download"

	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/documents/:id/download HTTP/1.1
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/documents/:id/download")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/documents/:id/download"))
    .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}}/documents/:id/download")
  .get()
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/documents/:id/download")
  .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}}/documents/:id/download');

xhr.send(data);
import axios from 'axios';

const options = {method: 'GET', url: '{{baseUrl}}/documents/:id/download'};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/documents/:id/download';
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}}/documents/:id/download',
  method: 'GET',
  headers: {}
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/documents/:id/download")
  .get()
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'GET',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/documents/:id/download',
  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}}/documents/:id/download'};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('GET', '{{baseUrl}}/documents/:id/download');

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}}/documents/:id/download'};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/documents/:id/download';
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}}/documents/:id/download"]
                                                       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}}/documents/:id/download" in

Client.call `GET uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/documents/:id/download",
  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}}/documents/:id/download');

echo $response->getBody();
setUrl('{{baseUrl}}/documents/:id/download');
$request->setMethod(HTTP_METH_GET);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/documents/:id/download');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/documents/:id/download' -Method GET 
$response = Invoke-RestMethod -Uri '{{baseUrl}}/documents/:id/download' -Method GET 
import http.client

conn = http.client.HTTPSConnection("example.com")

conn.request("GET", "/baseUrl/documents/:id/download")

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/documents/:id/download"

response = requests.get(url)

print(response.json())
library(httr)

url <- "{{baseUrl}}/documents/:id/download"

response <- VERB("GET", url, content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/documents/:id/download")

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/documents/:id/download') do |req|
end

puts response.status
puts response.body
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/documents/:id/download";

    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}}/documents/:id/download
http GET {{baseUrl}}/documents/:id/download
wget --quiet \
  --method GET \
  --output-document \
  - {{baseUrl}}/documents/:id/download
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/documents/:id/download")! 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()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": {
    "message": "Authorization information (Header: %s) is missing or invalid."
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": {
    "message": "Authorization information (Header: %s) is missing or invalid."
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": {
    "message": "Authorization information (Header: %s) is missing or invalid."
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": {
    "message": "Internal Server Error.",
    "trace_id": "664b218f93954a3480cb0ddb8f919c3f"
  }
}
GET List all documents
{{baseUrl}}/documents
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/documents");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/get "{{baseUrl}}/documents")
require "http/client"

url = "{{baseUrl}}/documents"

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}}/documents"),
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/documents");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/documents"

	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/documents HTTP/1.1
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/documents")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/documents"))
    .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}}/documents")
  .get()
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/documents")
  .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}}/documents');

xhr.send(data);
import axios from 'axios';

const options = {method: 'GET', url: '{{baseUrl}}/documents'};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/documents';
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}}/documents',
  method: 'GET',
  headers: {}
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/documents")
  .get()
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'GET',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/documents',
  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}}/documents'};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('GET', '{{baseUrl}}/documents');

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}}/documents'};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/documents';
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}}/documents"]
                                                       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}}/documents" in

Client.call `GET uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/documents",
  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}}/documents');

echo $response->getBody();
setUrl('{{baseUrl}}/documents');
$request->setMethod(HTTP_METH_GET);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/documents');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/documents' -Method GET 
$response = Invoke-RestMethod -Uri '{{baseUrl}}/documents' -Method GET 
import http.client

conn = http.client.HTTPSConnection("example.com")

conn.request("GET", "/baseUrl/documents")

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/documents"

response = requests.get(url)

print(response.json())
library(httr)

url <- "{{baseUrl}}/documents"

response <- VERB("GET", url, content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/documents")

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/documents') do |req|
end

puts response.status
puts response.body
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/documents";

    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}}/documents
http GET {{baseUrl}}/documents
wget --quiet \
  --method GET \
  --output-document \
  - {{baseUrl}}/documents
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/documents")! 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()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": {
    "message": "Authorization information (Header: %s) is missing or invalid."
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": {
    "message": "Authorization information (Header: %s) is missing or invalid."
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": {
    "message": "Internal Server Error.",
    "trace_id": "664b218f93954a3480cb0ddb8f919c3f"
  }
}
GET Retrieve a document Online Számla status
{{baseUrl}}/documents/:id/online-szamla
QUERY PARAMS

id
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/documents/:id/online-szamla");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/get "{{baseUrl}}/documents/:id/online-szamla")
require "http/client"

url = "{{baseUrl}}/documents/:id/online-szamla"

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}}/documents/:id/online-szamla"),
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/documents/:id/online-szamla");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/documents/:id/online-szamla"

	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/documents/:id/online-szamla HTTP/1.1
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/documents/:id/online-szamla")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/documents/:id/online-szamla"))
    .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}}/documents/:id/online-szamla")
  .get()
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/documents/:id/online-szamla")
  .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}}/documents/:id/online-szamla');

xhr.send(data);
import axios from 'axios';

const options = {method: 'GET', url: '{{baseUrl}}/documents/:id/online-szamla'};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/documents/:id/online-szamla';
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}}/documents/:id/online-szamla',
  method: 'GET',
  headers: {}
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/documents/:id/online-szamla")
  .get()
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'GET',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/documents/:id/online-szamla',
  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}}/documents/:id/online-szamla'};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('GET', '{{baseUrl}}/documents/:id/online-szamla');

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}}/documents/:id/online-szamla'};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/documents/:id/online-szamla';
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}}/documents/:id/online-szamla"]
                                                       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}}/documents/:id/online-szamla" in

Client.call `GET uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/documents/:id/online-szamla",
  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}}/documents/:id/online-szamla');

echo $response->getBody();
setUrl('{{baseUrl}}/documents/:id/online-szamla');
$request->setMethod(HTTP_METH_GET);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/documents/:id/online-szamla');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/documents/:id/online-szamla' -Method GET 
$response = Invoke-RestMethod -Uri '{{baseUrl}}/documents/:id/online-szamla' -Method GET 
import http.client

conn = http.client.HTTPSConnection("example.com")

conn.request("GET", "/baseUrl/documents/:id/online-szamla")

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/documents/:id/online-szamla"

response = requests.get(url)

print(response.json())
library(httr)

url <- "{{baseUrl}}/documents/:id/online-szamla"

response <- VERB("GET", url, content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/documents/:id/online-szamla")

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/documents/:id/online-szamla') do |req|
end

puts response.status
puts response.body
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/documents/:id/online-szamla";

    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}}/documents/:id/online-szamla
http GET {{baseUrl}}/documents/:id/online-szamla
wget --quiet \
  --method GET \
  --output-document \
  - {{baseUrl}}/documents/:id/online-szamla
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/documents/:id/online-szamla")! 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()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": {
    "message": "Authorization information (Header: %s) is missing or invalid."
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": {
    "message": "Authorization information (Header: %s) is missing or invalid."
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": {
    "message": "Authorization information (Header: %s) is missing or invalid."
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": {
    "message": "Internal Server Error.",
    "trace_id": "664b218f93954a3480cb0ddb8f919c3f"
  }
}
GET Retrieve a document download public url.
{{baseUrl}}/documents/:id/public-url
QUERY PARAMS

id
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/documents/:id/public-url");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/get "{{baseUrl}}/documents/:id/public-url")
require "http/client"

url = "{{baseUrl}}/documents/:id/public-url"

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}}/documents/:id/public-url"),
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/documents/:id/public-url");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/documents/:id/public-url"

	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/documents/:id/public-url HTTP/1.1
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/documents/:id/public-url")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/documents/:id/public-url"))
    .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}}/documents/:id/public-url")
  .get()
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/documents/:id/public-url")
  .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}}/documents/:id/public-url');

xhr.send(data);
import axios from 'axios';

const options = {method: 'GET', url: '{{baseUrl}}/documents/:id/public-url'};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/documents/:id/public-url';
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}}/documents/:id/public-url',
  method: 'GET',
  headers: {}
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/documents/:id/public-url")
  .get()
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'GET',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/documents/:id/public-url',
  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}}/documents/:id/public-url'};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('GET', '{{baseUrl}}/documents/:id/public-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: 'GET', url: '{{baseUrl}}/documents/:id/public-url'};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/documents/:id/public-url';
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}}/documents/:id/public-url"]
                                                       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}}/documents/:id/public-url" in

Client.call `GET uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/documents/:id/public-url",
  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}}/documents/:id/public-url');

echo $response->getBody();
setUrl('{{baseUrl}}/documents/:id/public-url');
$request->setMethod(HTTP_METH_GET);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/documents/:id/public-url');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/documents/:id/public-url' -Method GET 
$response = Invoke-RestMethod -Uri '{{baseUrl}}/documents/:id/public-url' -Method GET 
import http.client

conn = http.client.HTTPSConnection("example.com")

conn.request("GET", "/baseUrl/documents/:id/public-url")

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/documents/:id/public-url"

response = requests.get(url)

print(response.json())
library(httr)

url <- "{{baseUrl}}/documents/:id/public-url"

response <- VERB("GET", url, content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/documents/:id/public-url")

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/documents/:id/public-url') do |req|
end

puts response.status
puts response.body
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/documents/:id/public-url";

    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}}/documents/:id/public-url
http GET {{baseUrl}}/documents/:id/public-url
wget --quiet \
  --method GET \
  --output-document \
  - {{baseUrl}}/documents/:id/public-url
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/documents/:id/public-url")! 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()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": {
    "message": "Authorization information (Header: %s) is missing or invalid."
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": {
    "message": "Authorization information (Header: %s) is missing or invalid."
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": {
    "message": "Authorization information (Header: %s) is missing or invalid."
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": {
    "message": "Internal Server Error.",
    "trace_id": "664b218f93954a3480cb0ddb8f919c3f"
  }
}
GET Retrieve a document
{{baseUrl}}/documents/: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}}/documents/:id");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/get "{{baseUrl}}/documents/:id")
require "http/client"

url = "{{baseUrl}}/documents/: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}}/documents/:id"),
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/documents/:id");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/documents/: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/documents/:id HTTP/1.1
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/documents/:id")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/documents/: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}}/documents/:id")
  .get()
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/documents/: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}}/documents/:id');

xhr.send(data);
import axios from 'axios';

const options = {method: 'GET', url: '{{baseUrl}}/documents/:id'};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/documents/: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}}/documents/:id',
  method: 'GET',
  headers: {}
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/documents/:id")
  .get()
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'GET',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/documents/: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}}/documents/: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}}/documents/: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}}/documents/:id'};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/documents/: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}}/documents/: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}}/documents/:id" in

Client.call `GET uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/documents/: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}}/documents/:id');

echo $response->getBody();
setUrl('{{baseUrl}}/documents/:id');
$request->setMethod(HTTP_METH_GET);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/documents/:id');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/documents/:id' -Method GET 
$response = Invoke-RestMethod -Uri '{{baseUrl}}/documents/:id' -Method GET 
import http.client

conn = http.client.HTTPSConnection("example.com")

conn.request("GET", "/baseUrl/documents/:id")

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/documents/:id"

response = requests.get(url)

print(response.json())
library(httr)

url <- "{{baseUrl}}/documents/:id"

response <- VERB("GET", url, content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/documents/: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/documents/:id') do |req|
end

puts response.status
puts response.body
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/documents/: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}}/documents/:id
http GET {{baseUrl}}/documents/:id
wget --quiet \
  --method GET \
  --output-document \
  - {{baseUrl}}/documents/:id
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/documents/: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()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "invoice_number": "PREFIX / 2020-000001"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": {
    "message": "Authorization information (Header: %s) is missing or invalid."
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": {
    "message": "Authorization information (Header: %s) is missing or invalid."
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": {
    "message": "Authorization information (Header: %s) is missing or invalid."
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": {
    "message": "Internal Server Error.",
    "trace_id": "664b218f93954a3480cb0ddb8f919c3f"
  }
}
GET Retrieve a payment histroy
{{baseUrl}}/documents/:id/payments
QUERY PARAMS

id
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/documents/:id/payments");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/get "{{baseUrl}}/documents/:id/payments")
require "http/client"

url = "{{baseUrl}}/documents/:id/payments"

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}}/documents/:id/payments"),
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/documents/:id/payments");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/documents/:id/payments"

	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/documents/:id/payments HTTP/1.1
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/documents/:id/payments")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/documents/:id/payments"))
    .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}}/documents/:id/payments")
  .get()
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/documents/:id/payments")
  .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}}/documents/:id/payments');

xhr.send(data);
import axios from 'axios';

const options = {method: 'GET', url: '{{baseUrl}}/documents/:id/payments'};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/documents/:id/payments';
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}}/documents/:id/payments',
  method: 'GET',
  headers: {}
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/documents/:id/payments")
  .get()
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'GET',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/documents/:id/payments',
  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}}/documents/:id/payments'};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('GET', '{{baseUrl}}/documents/:id/payments');

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}}/documents/:id/payments'};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/documents/:id/payments';
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}}/documents/:id/payments"]
                                                       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}}/documents/:id/payments" in

Client.call `GET uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/documents/:id/payments",
  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}}/documents/:id/payments');

echo $response->getBody();
setUrl('{{baseUrl}}/documents/:id/payments');
$request->setMethod(HTTP_METH_GET);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/documents/:id/payments');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/documents/:id/payments' -Method GET 
$response = Invoke-RestMethod -Uri '{{baseUrl}}/documents/:id/payments' -Method GET 
import http.client

conn = http.client.HTTPSConnection("example.com")

conn.request("GET", "/baseUrl/documents/:id/payments")

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/documents/:id/payments"

response = requests.get(url)

print(response.json())
library(httr)

url <- "{{baseUrl}}/documents/:id/payments"

response <- VERB("GET", url, content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/documents/:id/payments")

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/documents/:id/payments') do |req|
end

puts response.status
puts response.body
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/documents/:id/payments";

    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}}/documents/:id/payments
http GET {{baseUrl}}/documents/:id/payments
wget --quiet \
  --method GET \
  --output-document \
  - {{baseUrl}}/documents/:id/payments
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/documents/:id/payments")! 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()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": {
    "message": "Authorization information (Header: %s) is missing or invalid."
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": {
    "message": "Authorization information (Header: %s) is missing or invalid."
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": {
    "message": "Authorization information (Header: %s) is missing or invalid."
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": {
    "message": "Internal Server Error.",
    "trace_id": "664b218f93954a3480cb0ddb8f919c3f"
  }
}
POST Send invoice to given email adresses.
{{baseUrl}}/documents/:id/send
QUERY PARAMS

id
BODY json

{
  "emails": []
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/documents/:id/send");

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  \"emails\": []\n}");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/post "{{baseUrl}}/documents/:id/send" {:content-type :json
                                                               :form-params {:emails []}})
require "http/client"

url = "{{baseUrl}}/documents/:id/send"
headers = HTTP::Headers{
  "content-type" => "application/json"
}
reqBody = "{\n  \"emails\": []\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}}/documents/:id/send"),
    Content = new StringContent("{\n  \"emails\": []\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}}/documents/:id/send");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"emails\": []\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/documents/:id/send"

	payload := strings.NewReader("{\n  \"emails\": []\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/documents/:id/send HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 18

{
  "emails": []
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/documents/:id/send")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"emails\": []\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/documents/:id/send"))
    .header("content-type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("{\n  \"emails\": []\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  \"emails\": []\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/documents/:id/send")
  .post(body)
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/documents/:id/send")
  .header("content-type", "application/json")
  .body("{\n  \"emails\": []\n}")
  .asString();
const data = JSON.stringify({
  emails: []
});

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('POST', '{{baseUrl}}/documents/:id/send');
xhr.setRequestHeader('content-type', 'application/json');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'POST',
  url: '{{baseUrl}}/documents/:id/send',
  headers: {'content-type': 'application/json'},
  data: {emails: []}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/documents/:id/send';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"emails":[]}'
};

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}}/documents/:id/send',
  method: 'POST',
  headers: {
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "emails": []\n}'
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n  \"emails\": []\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/documents/:id/send")
  .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/documents/:id/send',
  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({emails: []}));
req.end();
const request = require('request');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/documents/:id/send',
  headers: {'content-type': 'application/json'},
  body: {emails: []},
  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}}/documents/:id/send');

req.headers({
  'content-type': 'application/json'
});

req.type('json');
req.send({
  emails: []
});

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}}/documents/:id/send',
  headers: {'content-type': 'application/json'},
  data: {emails: []}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/documents/:id/send';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"emails":[]}'
};

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 = @{ @"emails": @[  ] };

NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/documents/:id/send"]
                                                       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}}/documents/:id/send" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n  \"emails\": []\n}" in

Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/documents/:id/send",
  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([
    'emails' => [
        
    ]
  ]),
  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}}/documents/:id/send', [
  'body' => '{
  "emails": []
}',
  'headers' => [
    'content-type' => 'application/json',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/documents/:id/send');
$request->setMethod(HTTP_METH_POST);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$request->setContentType('application/json');
$request->setBody(json_encode([
  'emails' => [
    
  ]
]));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'emails' => [
    
  ]
]));
$request->setRequestUrl('{{baseUrl}}/documents/:id/send');
$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}}/documents/:id/send' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "emails": []
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/documents/:id/send' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "emails": []
}'
import http.client

conn = http.client.HTTPSConnection("example.com")

payload = "{\n  \"emails\": []\n}"

headers = { 'content-type': "application/json" }

conn.request("POST", "/baseUrl/documents/:id/send", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/documents/:id/send"

payload = { "emails": [] }
headers = {"content-type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
library(httr)

url <- "{{baseUrl}}/documents/:id/send"

payload <- "{\n  \"emails\": []\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}}/documents/:id/send")

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  \"emails\": []\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/documents/:id/send') do |req|
  req.body = "{\n  \"emails\": []\n}"
end

puts response.status
puts response.body
use serde_json::json;
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/documents/:id/send";

    let payload = json!({"emails": ()});

    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}}/documents/:id/send \
  --header 'content-type: application/json' \
  --data '{
  "emails": []
}'
echo '{
  "emails": []
}' |  \
  http POST {{baseUrl}}/documents/:id/send \
  content-type:application/json
wget --quiet \
  --method POST \
  --header 'content-type: application/json' \
  --body-data '{\n  "emails": []\n}' \
  --output-document \
  - {{baseUrl}}/documents/:id/send
import Foundation

let headers = ["content-type": "application/json"]
let parameters = ["emails": []] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/documents/:id/send")! 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()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": {
    "message": "Authorization information (Header: %s) is missing or invalid."
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": {
    "message": "Authorization information (Header: %s) is missing or invalid."
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": {
    "message": "Authorization information (Header: %s) is missing or invalid."
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": {
    "message": "Authorization information (Header: %s) is missing or invalid."
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": {
    "message": "Internal Server Error.",
    "trace_id": "664b218f93954a3480cb0ddb8f919c3f"
  }
}
PUT Update payment history
{{baseUrl}}/documents/:id/payments
QUERY PARAMS

id
BODY json

[
  {
    "conversion_rate": "",
    "date": "",
    "payment_method": "",
    "price": "",
    "voucher_number": ""
  }
]
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/documents/:id/payments");

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    \"conversion_rate\": \"\",\n    \"date\": \"\",\n    \"payment_method\": \"\",\n    \"price\": \"\",\n    \"voucher_number\": \"\"\n  }\n]");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/put "{{baseUrl}}/documents/:id/payments" {:content-type :json
                                                                  :form-params [{:conversion_rate ""
                                                                                 :date ""
                                                                                 :payment_method ""
                                                                                 :price ""
                                                                                 :voucher_number ""}]})
require "http/client"

url = "{{baseUrl}}/documents/:id/payments"
headers = HTTP::Headers{
  "content-type" => "application/json"
}
reqBody = "[\n  {\n    \"conversion_rate\": \"\",\n    \"date\": \"\",\n    \"payment_method\": \"\",\n    \"price\": \"\",\n    \"voucher_number\": \"\"\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}}/documents/:id/payments"),
    Content = new StringContent("[\n  {\n    \"conversion_rate\": \"\",\n    \"date\": \"\",\n    \"payment_method\": \"\",\n    \"price\": \"\",\n    \"voucher_number\": \"\"\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}}/documents/:id/payments");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "[\n  {\n    \"conversion_rate\": \"\",\n    \"date\": \"\",\n    \"payment_method\": \"\",\n    \"price\": \"\",\n    \"voucher_number\": \"\"\n  }\n]", ParameterType.RequestBody);
var response = client.Execute(request);
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/documents/:id/payments"

	payload := strings.NewReader("[\n  {\n    \"conversion_rate\": \"\",\n    \"date\": \"\",\n    \"payment_method\": \"\",\n    \"price\": \"\",\n    \"voucher_number\": \"\"\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/documents/:id/payments HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 122

[
  {
    "conversion_rate": "",
    "date": "",
    "payment_method": "",
    "price": "",
    "voucher_number": ""
  }
]
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/documents/:id/payments")
  .setHeader("content-type", "application/json")
  .setBody("[\n  {\n    \"conversion_rate\": \"\",\n    \"date\": \"\",\n    \"payment_method\": \"\",\n    \"price\": \"\",\n    \"voucher_number\": \"\"\n  }\n]")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/documents/:id/payments"))
    .header("content-type", "application/json")
    .method("PUT", HttpRequest.BodyPublishers.ofString("[\n  {\n    \"conversion_rate\": \"\",\n    \"date\": \"\",\n    \"payment_method\": \"\",\n    \"price\": \"\",\n    \"voucher_number\": \"\"\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    \"conversion_rate\": \"\",\n    \"date\": \"\",\n    \"payment_method\": \"\",\n    \"price\": \"\",\n    \"voucher_number\": \"\"\n  }\n]");
Request request = new Request.Builder()
  .url("{{baseUrl}}/documents/:id/payments")
  .put(body)
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/documents/:id/payments")
  .header("content-type", "application/json")
  .body("[\n  {\n    \"conversion_rate\": \"\",\n    \"date\": \"\",\n    \"payment_method\": \"\",\n    \"price\": \"\",\n    \"voucher_number\": \"\"\n  }\n]")
  .asString();
const data = JSON.stringify([
  {
    conversion_rate: '',
    date: '',
    payment_method: '',
    price: '',
    voucher_number: ''
  }
]);

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('PUT', '{{baseUrl}}/documents/:id/payments');
xhr.setRequestHeader('content-type', 'application/json');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'PUT',
  url: '{{baseUrl}}/documents/:id/payments',
  headers: {'content-type': 'application/json'},
  data: [
    {
      conversion_rate: '',
      date: '',
      payment_method: '',
      price: '',
      voucher_number: ''
    }
  ]
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/documents/:id/payments';
const options = {
  method: 'PUT',
  headers: {'content-type': 'application/json'},
  body: '[{"conversion_rate":"","date":"","payment_method":"","price":"","voucher_number":""}]'
};

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}}/documents/:id/payments',
  method: 'PUT',
  headers: {
    'content-type': 'application/json'
  },
  processData: false,
  data: '[\n  {\n    "conversion_rate": "",\n    "date": "",\n    "payment_method": "",\n    "price": "",\n    "voucher_number": ""\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    \"conversion_rate\": \"\",\n    \"date\": \"\",\n    \"payment_method\": \"\",\n    \"price\": \"\",\n    \"voucher_number\": \"\"\n  }\n]")
val request = Request.Builder()
  .url("{{baseUrl}}/documents/:id/payments")
  .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/documents/:id/payments',
  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([
  {
    conversion_rate: '',
    date: '',
    payment_method: '',
    price: '',
    voucher_number: ''
  }
]));
req.end();
const request = require('request');

const options = {
  method: 'PUT',
  url: '{{baseUrl}}/documents/:id/payments',
  headers: {'content-type': 'application/json'},
  body: [
    {
      conversion_rate: '',
      date: '',
      payment_method: '',
      price: '',
      voucher_number: ''
    }
  ],
  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}}/documents/:id/payments');

req.headers({
  'content-type': 'application/json'
});

req.type('json');
req.send([
  {
    conversion_rate: '',
    date: '',
    payment_method: '',
    price: '',
    voucher_number: ''
  }
]);

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}}/documents/:id/payments',
  headers: {'content-type': 'application/json'},
  data: [
    {
      conversion_rate: '',
      date: '',
      payment_method: '',
      price: '',
      voucher_number: ''
    }
  ]
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/documents/:id/payments';
const options = {
  method: 'PUT',
  headers: {'content-type': 'application/json'},
  body: '[{"conversion_rate":"","date":"","payment_method":"","price":"","voucher_number":""}]'
};

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 = @[ @{ @"conversion_rate": @"", @"date": @"", @"payment_method": @"", @"price": @"", @"voucher_number": @"" } ];

NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/documents/:id/payments"]
                                                       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}}/documents/:id/payments" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "[\n  {\n    \"conversion_rate\": \"\",\n    \"date\": \"\",\n    \"payment_method\": \"\",\n    \"price\": \"\",\n    \"voucher_number\": \"\"\n  }\n]" in

Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/documents/:id/payments",
  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([
    [
        'conversion_rate' => '',
        'date' => '',
        'payment_method' => '',
        'price' => '',
        'voucher_number' => ''
    ]
  ]),
  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}}/documents/:id/payments', [
  'body' => '[
  {
    "conversion_rate": "",
    "date": "",
    "payment_method": "",
    "price": "",
    "voucher_number": ""
  }
]',
  'headers' => [
    'content-type' => 'application/json',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/documents/:id/payments');
$request->setMethod(HTTP_METH_PUT);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$request->setContentType('application/json');
$request->setBody(json_encode([
  [
    'conversion_rate' => '',
    'date' => '',
    'payment_method' => '',
    'price' => '',
    'voucher_number' => ''
  ]
]));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  [
    'conversion_rate' => '',
    'date' => '',
    'payment_method' => '',
    'price' => '',
    'voucher_number' => ''
  ]
]));
$request->setRequestUrl('{{baseUrl}}/documents/:id/payments');
$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}}/documents/:id/payments' -Method PUT -Headers $headers -ContentType 'application/json' -Body '[
  {
    "conversion_rate": "",
    "date": "",
    "payment_method": "",
    "price": "",
    "voucher_number": ""
  }
]'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/documents/:id/payments' -Method PUT -Headers $headers -ContentType 'application/json' -Body '[
  {
    "conversion_rate": "",
    "date": "",
    "payment_method": "",
    "price": "",
    "voucher_number": ""
  }
]'
import http.client

conn = http.client.HTTPSConnection("example.com")

payload = "[\n  {\n    \"conversion_rate\": \"\",\n    \"date\": \"\",\n    \"payment_method\": \"\",\n    \"price\": \"\",\n    \"voucher_number\": \"\"\n  }\n]"

headers = { 'content-type': "application/json" }

conn.request("PUT", "/baseUrl/documents/:id/payments", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/documents/:id/payments"

payload = [
    {
        "conversion_rate": "",
        "date": "",
        "payment_method": "",
        "price": "",
        "voucher_number": ""
    }
]
headers = {"content-type": "application/json"}

response = requests.put(url, json=payload, headers=headers)

print(response.json())
library(httr)

url <- "{{baseUrl}}/documents/:id/payments"

payload <- "[\n  {\n    \"conversion_rate\": \"\",\n    \"date\": \"\",\n    \"payment_method\": \"\",\n    \"price\": \"\",\n    \"voucher_number\": \"\"\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}}/documents/:id/payments")

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    \"conversion_rate\": \"\",\n    \"date\": \"\",\n    \"payment_method\": \"\",\n    \"price\": \"\",\n    \"voucher_number\": \"\"\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/documents/:id/payments') do |req|
  req.body = "[\n  {\n    \"conversion_rate\": \"\",\n    \"date\": \"\",\n    \"payment_method\": \"\",\n    \"price\": \"\",\n    \"voucher_number\": \"\"\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}}/documents/:id/payments";

    let payload = (
        json!({
            "conversion_rate": "",
            "date": "",
            "payment_method": "",
            "price": "",
            "voucher_number": ""
        })
    );

    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}}/documents/:id/payments \
  --header 'content-type: application/json' \
  --data '[
  {
    "conversion_rate": "",
    "date": "",
    "payment_method": "",
    "price": "",
    "voucher_number": ""
  }
]'
echo '[
  {
    "conversion_rate": "",
    "date": "",
    "payment_method": "",
    "price": "",
    "voucher_number": ""
  }
]' |  \
  http PUT {{baseUrl}}/documents/:id/payments \
  content-type:application/json
wget --quiet \
  --method PUT \
  --header 'content-type: application/json' \
  --body-data '[\n  {\n    "conversion_rate": "",\n    "date": "",\n    "payment_method": "",\n    "price": "",\n    "voucher_number": ""\n  }\n]' \
  --output-document \
  - {{baseUrl}}/documents/:id/payments
import Foundation

let headers = ["content-type": "application/json"]
let parameters = [
  [
    "conversion_rate": "",
    "date": "",
    "payment_method": "",
    "price": "",
    "voucher_number": ""
  ]
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/documents/:id/payments")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": {
    "message": "Authorization information (Header: %s) is missing or invalid."
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": {
    "message": "Authorization information (Header: %s) is missing or invalid."
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": {
    "message": "Authorization information (Header: %s) is missing or invalid."
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": {
    "message": "Authorization information (Header: %s) is missing or invalid."
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": {
    "message": "Internal Server Error.",
    "trace_id": "664b218f93954a3480cb0ddb8f919c3f"
  }
}
GET List all document blocks
{{baseUrl}}/document-blocks
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/document-blocks");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/get "{{baseUrl}}/document-blocks")
require "http/client"

url = "{{baseUrl}}/document-blocks"

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}}/document-blocks"),
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/document-blocks");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/document-blocks"

	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/document-blocks HTTP/1.1
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/document-blocks")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/document-blocks"))
    .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}}/document-blocks")
  .get()
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/document-blocks")
  .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}}/document-blocks');

xhr.send(data);
import axios from 'axios';

const options = {method: 'GET', url: '{{baseUrl}}/document-blocks'};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/document-blocks';
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}}/document-blocks',
  method: 'GET',
  headers: {}
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/document-blocks")
  .get()
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'GET',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/document-blocks',
  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}}/document-blocks'};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('GET', '{{baseUrl}}/document-blocks');

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}}/document-blocks'};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/document-blocks';
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}}/document-blocks"]
                                                       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}}/document-blocks" in

Client.call `GET uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/document-blocks",
  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}}/document-blocks');

echo $response->getBody();
setUrl('{{baseUrl}}/document-blocks');
$request->setMethod(HTTP_METH_GET);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/document-blocks');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/document-blocks' -Method GET 
$response = Invoke-RestMethod -Uri '{{baseUrl}}/document-blocks' -Method GET 
import http.client

conn = http.client.HTTPSConnection("example.com")

conn.request("GET", "/baseUrl/document-blocks")

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/document-blocks"

response = requests.get(url)

print(response.json())
library(httr)

url <- "{{baseUrl}}/document-blocks"

response <- VERB("GET", url, content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/document-blocks")

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/document-blocks') do |req|
end

puts response.status
puts response.body
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/document-blocks";

    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}}/document-blocks
http GET {{baseUrl}}/document-blocks
wget --quiet \
  --method GET \
  --output-document \
  - {{baseUrl}}/document-blocks
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/document-blocks")! 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()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": {
    "message": "Authorization information (Header: %s) is missing or invalid."
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": {
    "message": "Authorization information (Header: %s) is missing or invalid."
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": {
    "message": "Internal Server Error.",
    "trace_id": "664b218f93954a3480cb0ddb8f919c3f"
  }
}
GET Retrieve a organization data.
{{baseUrl}}/organization
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/organization");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/get "{{baseUrl}}/organization")
require "http/client"

url = "{{baseUrl}}/organization"

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}}/organization"),
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/organization");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/organization"

	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/organization HTTP/1.1
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/organization")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/organization"))
    .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}}/organization")
  .get()
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/organization")
  .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}}/organization');

xhr.send(data);
import axios from 'axios';

const options = {method: 'GET', url: '{{baseUrl}}/organization'};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/organization';
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}}/organization',
  method: 'GET',
  headers: {}
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/organization")
  .get()
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'GET',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/organization',
  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}}/organization'};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('GET', '{{baseUrl}}/organization');

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}}/organization'};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/organization';
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}}/organization"]
                                                       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}}/organization" in

Client.call `GET uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/organization",
  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}}/organization');

echo $response->getBody();
setUrl('{{baseUrl}}/organization');
$request->setMethod(HTTP_METH_GET);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/organization');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/organization' -Method GET 
$response = Invoke-RestMethod -Uri '{{baseUrl}}/organization' -Method GET 
import http.client

conn = http.client.HTTPSConnection("example.com")

conn.request("GET", "/baseUrl/organization")

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/organization"

response = requests.get(url)

print(response.json())
library(httr)

url <- "{{baseUrl}}/organization"

response <- VERB("GET", url, content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/organization")

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/organization') do |req|
end

puts response.status
puts response.body
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/organization";

    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}}/organization
http GET {{baseUrl}}/organization
wget --quiet \
  --method GET \
  --output-document \
  - {{baseUrl}}/organization
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/organization")! 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()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": {
    "message": "Authorization information (Header: %s) is missing or invalid."
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": {
    "message": "Authorization information (Header: %s) is missing or invalid."
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": {
    "message": "Internal Server Error.",
    "trace_id": "664b218f93954a3480cb0ddb8f919c3f"
  }
}
POST Create a partner
{{baseUrl}}/partners
BODY json

{
  "account_number": "",
  "address": {
    "address": "",
    "city": "",
    "country_code": "",
    "post_code": ""
  },
  "emails": [],
  "general_ledger_number": "",
  "iban": "",
  "name": "",
  "phone": "",
  "swift": "",
  "taxcode": ""
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/partners");

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  \"account_number\": \"\",\n  \"address\": {\n    \"address\": \"\",\n    \"city\": \"\",\n    \"country_code\": \"\",\n    \"post_code\": \"\"\n  },\n  \"emails\": [],\n  \"general_ledger_number\": \"\",\n  \"iban\": \"\",\n  \"name\": \"\",\n  \"phone\": \"\",\n  \"swift\": \"\",\n  \"taxcode\": \"\"\n}");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/post "{{baseUrl}}/partners" {:content-type :json
                                                     :form-params {:account_number ""
                                                                   :address {:address ""
                                                                             :city ""
                                                                             :country_code ""
                                                                             :post_code ""}
                                                                   :emails []
                                                                   :general_ledger_number ""
                                                                   :iban ""
                                                                   :name ""
                                                                   :phone ""
                                                                   :swift ""
                                                                   :taxcode ""}})
require "http/client"

url = "{{baseUrl}}/partners"
headers = HTTP::Headers{
  "content-type" => "application/json"
}
reqBody = "{\n  \"account_number\": \"\",\n  \"address\": {\n    \"address\": \"\",\n    \"city\": \"\",\n    \"country_code\": \"\",\n    \"post_code\": \"\"\n  },\n  \"emails\": [],\n  \"general_ledger_number\": \"\",\n  \"iban\": \"\",\n  \"name\": \"\",\n  \"phone\": \"\",\n  \"swift\": \"\",\n  \"taxcode\": \"\"\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}}/partners"),
    Content = new StringContent("{\n  \"account_number\": \"\",\n  \"address\": {\n    \"address\": \"\",\n    \"city\": \"\",\n    \"country_code\": \"\",\n    \"post_code\": \"\"\n  },\n  \"emails\": [],\n  \"general_ledger_number\": \"\",\n  \"iban\": \"\",\n  \"name\": \"\",\n  \"phone\": \"\",\n  \"swift\": \"\",\n  \"taxcode\": \"\"\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}}/partners");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"account_number\": \"\",\n  \"address\": {\n    \"address\": \"\",\n    \"city\": \"\",\n    \"country_code\": \"\",\n    \"post_code\": \"\"\n  },\n  \"emails\": [],\n  \"general_ledger_number\": \"\",\n  \"iban\": \"\",\n  \"name\": \"\",\n  \"phone\": \"\",\n  \"swift\": \"\",\n  \"taxcode\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/partners"

	payload := strings.NewReader("{\n  \"account_number\": \"\",\n  \"address\": {\n    \"address\": \"\",\n    \"city\": \"\",\n    \"country_code\": \"\",\n    \"post_code\": \"\"\n  },\n  \"emails\": [],\n  \"general_ledger_number\": \"\",\n  \"iban\": \"\",\n  \"name\": \"\",\n  \"phone\": \"\",\n  \"swift\": \"\",\n  \"taxcode\": \"\"\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/partners HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 247

{
  "account_number": "",
  "address": {
    "address": "",
    "city": "",
    "country_code": "",
    "post_code": ""
  },
  "emails": [],
  "general_ledger_number": "",
  "iban": "",
  "name": "",
  "phone": "",
  "swift": "",
  "taxcode": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/partners")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"account_number\": \"\",\n  \"address\": {\n    \"address\": \"\",\n    \"city\": \"\",\n    \"country_code\": \"\",\n    \"post_code\": \"\"\n  },\n  \"emails\": [],\n  \"general_ledger_number\": \"\",\n  \"iban\": \"\",\n  \"name\": \"\",\n  \"phone\": \"\",\n  \"swift\": \"\",\n  \"taxcode\": \"\"\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/partners"))
    .header("content-type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("{\n  \"account_number\": \"\",\n  \"address\": {\n    \"address\": \"\",\n    \"city\": \"\",\n    \"country_code\": \"\",\n    \"post_code\": \"\"\n  },\n  \"emails\": [],\n  \"general_ledger_number\": \"\",\n  \"iban\": \"\",\n  \"name\": \"\",\n  \"phone\": \"\",\n  \"swift\": \"\",\n  \"taxcode\": \"\"\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  \"account_number\": \"\",\n  \"address\": {\n    \"address\": \"\",\n    \"city\": \"\",\n    \"country_code\": \"\",\n    \"post_code\": \"\"\n  },\n  \"emails\": [],\n  \"general_ledger_number\": \"\",\n  \"iban\": \"\",\n  \"name\": \"\",\n  \"phone\": \"\",\n  \"swift\": \"\",\n  \"taxcode\": \"\"\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/partners")
  .post(body)
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/partners")
  .header("content-type", "application/json")
  .body("{\n  \"account_number\": \"\",\n  \"address\": {\n    \"address\": \"\",\n    \"city\": \"\",\n    \"country_code\": \"\",\n    \"post_code\": \"\"\n  },\n  \"emails\": [],\n  \"general_ledger_number\": \"\",\n  \"iban\": \"\",\n  \"name\": \"\",\n  \"phone\": \"\",\n  \"swift\": \"\",\n  \"taxcode\": \"\"\n}")
  .asString();
const data = JSON.stringify({
  account_number: '',
  address: {
    address: '',
    city: '',
    country_code: '',
    post_code: ''
  },
  emails: [],
  general_ledger_number: '',
  iban: '',
  name: '',
  phone: '',
  swift: '',
  taxcode: ''
});

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('POST', '{{baseUrl}}/partners');
xhr.setRequestHeader('content-type', 'application/json');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'POST',
  url: '{{baseUrl}}/partners',
  headers: {'content-type': 'application/json'},
  data: {
    account_number: '',
    address: {address: '', city: '', country_code: '', post_code: ''},
    emails: [],
    general_ledger_number: '',
    iban: '',
    name: '',
    phone: '',
    swift: '',
    taxcode: ''
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/partners';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"account_number":"","address":{"address":"","city":"","country_code":"","post_code":""},"emails":[],"general_ledger_number":"","iban":"","name":"","phone":"","swift":"","taxcode":""}'
};

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}}/partners',
  method: 'POST',
  headers: {
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "account_number": "",\n  "address": {\n    "address": "",\n    "city": "",\n    "country_code": "",\n    "post_code": ""\n  },\n  "emails": [],\n  "general_ledger_number": "",\n  "iban": "",\n  "name": "",\n  "phone": "",\n  "swift": "",\n  "taxcode": ""\n}'
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n  \"account_number\": \"\",\n  \"address\": {\n    \"address\": \"\",\n    \"city\": \"\",\n    \"country_code\": \"\",\n    \"post_code\": \"\"\n  },\n  \"emails\": [],\n  \"general_ledger_number\": \"\",\n  \"iban\": \"\",\n  \"name\": \"\",\n  \"phone\": \"\",\n  \"swift\": \"\",\n  \"taxcode\": \"\"\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/partners")
  .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/partners',
  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({
  account_number: '',
  address: {address: '', city: '', country_code: '', post_code: ''},
  emails: [],
  general_ledger_number: '',
  iban: '',
  name: '',
  phone: '',
  swift: '',
  taxcode: ''
}));
req.end();
const request = require('request');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/partners',
  headers: {'content-type': 'application/json'},
  body: {
    account_number: '',
    address: {address: '', city: '', country_code: '', post_code: ''},
    emails: [],
    general_ledger_number: '',
    iban: '',
    name: '',
    phone: '',
    swift: '',
    taxcode: ''
  },
  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}}/partners');

req.headers({
  'content-type': 'application/json'
});

req.type('json');
req.send({
  account_number: '',
  address: {
    address: '',
    city: '',
    country_code: '',
    post_code: ''
  },
  emails: [],
  general_ledger_number: '',
  iban: '',
  name: '',
  phone: '',
  swift: '',
  taxcode: ''
});

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}}/partners',
  headers: {'content-type': 'application/json'},
  data: {
    account_number: '',
    address: {address: '', city: '', country_code: '', post_code: ''},
    emails: [],
    general_ledger_number: '',
    iban: '',
    name: '',
    phone: '',
    swift: '',
    taxcode: ''
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/partners';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"account_number":"","address":{"address":"","city":"","country_code":"","post_code":""},"emails":[],"general_ledger_number":"","iban":"","name":"","phone":"","swift":"","taxcode":""}'
};

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 = @{ @"account_number": @"",
                              @"address": @{ @"address": @"", @"city": @"", @"country_code": @"", @"post_code": @"" },
                              @"emails": @[  ],
                              @"general_ledger_number": @"",
                              @"iban": @"",
                              @"name": @"",
                              @"phone": @"",
                              @"swift": @"",
                              @"taxcode": @"" };

NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/partners"]
                                                       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}}/partners" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n  \"account_number\": \"\",\n  \"address\": {\n    \"address\": \"\",\n    \"city\": \"\",\n    \"country_code\": \"\",\n    \"post_code\": \"\"\n  },\n  \"emails\": [],\n  \"general_ledger_number\": \"\",\n  \"iban\": \"\",\n  \"name\": \"\",\n  \"phone\": \"\",\n  \"swift\": \"\",\n  \"taxcode\": \"\"\n}" in

Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/partners",
  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([
    'account_number' => '',
    'address' => [
        'address' => '',
        'city' => '',
        'country_code' => '',
        'post_code' => ''
    ],
    'emails' => [
        
    ],
    'general_ledger_number' => '',
    'iban' => '',
    'name' => '',
    'phone' => '',
    'swift' => '',
    'taxcode' => ''
  ]),
  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}}/partners', [
  'body' => '{
  "account_number": "",
  "address": {
    "address": "",
    "city": "",
    "country_code": "",
    "post_code": ""
  },
  "emails": [],
  "general_ledger_number": "",
  "iban": "",
  "name": "",
  "phone": "",
  "swift": "",
  "taxcode": ""
}',
  'headers' => [
    'content-type' => 'application/json',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/partners');
$request->setMethod(HTTP_METH_POST);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$request->setContentType('application/json');
$request->setBody(json_encode([
  'account_number' => '',
  'address' => [
    'address' => '',
    'city' => '',
    'country_code' => '',
    'post_code' => ''
  ],
  'emails' => [
    
  ],
  'general_ledger_number' => '',
  'iban' => '',
  'name' => '',
  'phone' => '',
  'swift' => '',
  'taxcode' => ''
]));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'account_number' => '',
  'address' => [
    'address' => '',
    'city' => '',
    'country_code' => '',
    'post_code' => ''
  ],
  'emails' => [
    
  ],
  'general_ledger_number' => '',
  'iban' => '',
  'name' => '',
  'phone' => '',
  'swift' => '',
  'taxcode' => ''
]));
$request->setRequestUrl('{{baseUrl}}/partners');
$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}}/partners' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "account_number": "",
  "address": {
    "address": "",
    "city": "",
    "country_code": "",
    "post_code": ""
  },
  "emails": [],
  "general_ledger_number": "",
  "iban": "",
  "name": "",
  "phone": "",
  "swift": "",
  "taxcode": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/partners' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "account_number": "",
  "address": {
    "address": "",
    "city": "",
    "country_code": "",
    "post_code": ""
  },
  "emails": [],
  "general_ledger_number": "",
  "iban": "",
  "name": "",
  "phone": "",
  "swift": "",
  "taxcode": ""
}'
import http.client

conn = http.client.HTTPSConnection("example.com")

payload = "{\n  \"account_number\": \"\",\n  \"address\": {\n    \"address\": \"\",\n    \"city\": \"\",\n    \"country_code\": \"\",\n    \"post_code\": \"\"\n  },\n  \"emails\": [],\n  \"general_ledger_number\": \"\",\n  \"iban\": \"\",\n  \"name\": \"\",\n  \"phone\": \"\",\n  \"swift\": \"\",\n  \"taxcode\": \"\"\n}"

headers = { 'content-type': "application/json" }

conn.request("POST", "/baseUrl/partners", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/partners"

payload = {
    "account_number": "",
    "address": {
        "address": "",
        "city": "",
        "country_code": "",
        "post_code": ""
    },
    "emails": [],
    "general_ledger_number": "",
    "iban": "",
    "name": "",
    "phone": "",
    "swift": "",
    "taxcode": ""
}
headers = {"content-type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
library(httr)

url <- "{{baseUrl}}/partners"

payload <- "{\n  \"account_number\": \"\",\n  \"address\": {\n    \"address\": \"\",\n    \"city\": \"\",\n    \"country_code\": \"\",\n    \"post_code\": \"\"\n  },\n  \"emails\": [],\n  \"general_ledger_number\": \"\",\n  \"iban\": \"\",\n  \"name\": \"\",\n  \"phone\": \"\",\n  \"swift\": \"\",\n  \"taxcode\": \"\"\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}}/partners")

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  \"account_number\": \"\",\n  \"address\": {\n    \"address\": \"\",\n    \"city\": \"\",\n    \"country_code\": \"\",\n    \"post_code\": \"\"\n  },\n  \"emails\": [],\n  \"general_ledger_number\": \"\",\n  \"iban\": \"\",\n  \"name\": \"\",\n  \"phone\": \"\",\n  \"swift\": \"\",\n  \"taxcode\": \"\"\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/partners') do |req|
  req.body = "{\n  \"account_number\": \"\",\n  \"address\": {\n    \"address\": \"\",\n    \"city\": \"\",\n    \"country_code\": \"\",\n    \"post_code\": \"\"\n  },\n  \"emails\": [],\n  \"general_ledger_number\": \"\",\n  \"iban\": \"\",\n  \"name\": \"\",\n  \"phone\": \"\",\n  \"swift\": \"\",\n  \"taxcode\": \"\"\n}"
end

puts response.status
puts response.body
use serde_json::json;
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/partners";

    let payload = json!({
        "account_number": "",
        "address": json!({
            "address": "",
            "city": "",
            "country_code": "",
            "post_code": ""
        }),
        "emails": (),
        "general_ledger_number": "",
        "iban": "",
        "name": "",
        "phone": "",
        "swift": "",
        "taxcode": ""
    });

    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}}/partners \
  --header 'content-type: application/json' \
  --data '{
  "account_number": "",
  "address": {
    "address": "",
    "city": "",
    "country_code": "",
    "post_code": ""
  },
  "emails": [],
  "general_ledger_number": "",
  "iban": "",
  "name": "",
  "phone": "",
  "swift": "",
  "taxcode": ""
}'
echo '{
  "account_number": "",
  "address": {
    "address": "",
    "city": "",
    "country_code": "",
    "post_code": ""
  },
  "emails": [],
  "general_ledger_number": "",
  "iban": "",
  "name": "",
  "phone": "",
  "swift": "",
  "taxcode": ""
}' |  \
  http POST {{baseUrl}}/partners \
  content-type:application/json
wget --quiet \
  --method POST \
  --header 'content-type: application/json' \
  --body-data '{\n  "account_number": "",\n  "address": {\n    "address": "",\n    "city": "",\n    "country_code": "",\n    "post_code": ""\n  },\n  "emails": [],\n  "general_ledger_number": "",\n  "iban": "",\n  "name": "",\n  "phone": "",\n  "swift": "",\n  "taxcode": ""\n}' \
  --output-document \
  - {{baseUrl}}/partners
import Foundation

let headers = ["content-type": "application/json"]
let parameters = [
  "account_number": "",
  "address": [
    "address": "",
    "city": "",
    "country_code": "",
    "post_code": ""
  ],
  "emails": [],
  "general_ledger_number": "",
  "iban": "",
  "name": "",
  "phone": "",
  "swift": "",
  "taxcode": ""
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/partners")! 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()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": {
    "message": "Authorization information (Header: %s) is missing or invalid."
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": {
    "message": "Authorization information (Header: %s) is missing or invalid."
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": {
    "message": "Authorization information (Header: %s) is missing or invalid."
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": {
    "message": "Internal Server Error.",
    "trace_id": "664b218f93954a3480cb0ddb8f919c3f"
  }
}
DELETE Delete a partner
{{baseUrl}}/partners/: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}}/partners/:id");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/delete "{{baseUrl}}/partners/:id")
require "http/client"

url = "{{baseUrl}}/partners/: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}}/partners/:id"),
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/partners/:id");
var request = new RestRequest("", Method.Delete);
var response = client.Execute(request);
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/partners/: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/partners/:id HTTP/1.1
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/partners/:id")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/partners/: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}}/partners/:id")
  .delete(null)
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/partners/: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}}/partners/:id');

xhr.send(data);
import axios from 'axios';

const options = {method: 'DELETE', url: '{{baseUrl}}/partners/:id'};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/partners/: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}}/partners/:id',
  method: 'DELETE',
  headers: {}
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/partners/: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/partners/: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}}/partners/: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}}/partners/: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}}/partners/:id'};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/partners/: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}}/partners/: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}}/partners/:id" in

Client.call `DELETE uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/partners/: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}}/partners/:id');

echo $response->getBody();
setUrl('{{baseUrl}}/partners/:id');
$request->setMethod(HTTP_METH_DELETE);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/partners/:id');
$request->setRequestMethod('DELETE');
$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/partners/:id' -Method DELETE 
$response = Invoke-RestMethod -Uri '{{baseUrl}}/partners/:id' -Method DELETE 
import http.client

conn = http.client.HTTPSConnection("example.com")

conn.request("DELETE", "/baseUrl/partners/:id")

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/partners/:id"

response = requests.delete(url)

print(response.json())
library(httr)

url <- "{{baseUrl}}/partners/:id"

response <- VERB("DELETE", url, content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/partners/: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/partners/: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}}/partners/: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}}/partners/:id
http DELETE {{baseUrl}}/partners/:id
wget --quiet \
  --method DELETE \
  --output-document \
  - {{baseUrl}}/partners/:id
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/partners/: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()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": {
    "message": "Authorization information (Header: %s) is missing or invalid."
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": {
    "message": "Authorization information (Header: %s) is missing or invalid."
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": {
    "message": "Authorization information (Header: %s) is missing or invalid."
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": {
    "message": "Authorization information (Header: %s) is missing or invalid."
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": {
    "message": "Internal Server Error.",
    "trace_id": "664b218f93954a3480cb0ddb8f919c3f"
  }
}
GET List all partners
{{baseUrl}}/partners
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/partners");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/get "{{baseUrl}}/partners")
require "http/client"

url = "{{baseUrl}}/partners"

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}}/partners"),
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/partners");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/partners"

	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/partners HTTP/1.1
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/partners")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/partners"))
    .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}}/partners")
  .get()
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/partners")
  .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}}/partners');

xhr.send(data);
import axios from 'axios';

const options = {method: 'GET', url: '{{baseUrl}}/partners'};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/partners';
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}}/partners',
  method: 'GET',
  headers: {}
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/partners")
  .get()
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'GET',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/partners',
  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}}/partners'};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('GET', '{{baseUrl}}/partners');

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}}/partners'};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/partners';
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}}/partners"]
                                                       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}}/partners" in

Client.call `GET uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/partners",
  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}}/partners');

echo $response->getBody();
setUrl('{{baseUrl}}/partners');
$request->setMethod(HTTP_METH_GET);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/partners');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/partners' -Method GET 
$response = Invoke-RestMethod -Uri '{{baseUrl}}/partners' -Method GET 
import http.client

conn = http.client.HTTPSConnection("example.com")

conn.request("GET", "/baseUrl/partners")

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/partners"

response = requests.get(url)

print(response.json())
library(httr)

url <- "{{baseUrl}}/partners"

response <- VERB("GET", url, content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/partners")

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/partners') do |req|
end

puts response.status
puts response.body
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/partners";

    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}}/partners
http GET {{baseUrl}}/partners
wget --quiet \
  --method GET \
  --output-document \
  - {{baseUrl}}/partners
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/partners")! 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()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": {
    "message": "Authorization information (Header: %s) is missing or invalid."
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": {
    "message": "Authorization information (Header: %s) is missing or invalid."
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": {
    "message": "Internal Server Error.",
    "trace_id": "664b218f93954a3480cb0ddb8f919c3f"
  }
}
GET Retrieve a partner
{{baseUrl}}/partners/: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}}/partners/:id");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/get "{{baseUrl}}/partners/:id")
require "http/client"

url = "{{baseUrl}}/partners/: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}}/partners/:id"),
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/partners/:id");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/partners/: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/partners/:id HTTP/1.1
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/partners/:id")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/partners/: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}}/partners/:id")
  .get()
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/partners/: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}}/partners/:id');

xhr.send(data);
import axios from 'axios';

const options = {method: 'GET', url: '{{baseUrl}}/partners/:id'};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/partners/: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}}/partners/:id',
  method: 'GET',
  headers: {}
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/partners/:id")
  .get()
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'GET',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/partners/: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}}/partners/: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}}/partners/: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}}/partners/:id'};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/partners/: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}}/partners/: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}}/partners/:id" in

Client.call `GET uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/partners/: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}}/partners/:id');

echo $response->getBody();
setUrl('{{baseUrl}}/partners/:id');
$request->setMethod(HTTP_METH_GET);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/partners/:id');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/partners/:id' -Method GET 
$response = Invoke-RestMethod -Uri '{{baseUrl}}/partners/:id' -Method GET 
import http.client

conn = http.client.HTTPSConnection("example.com")

conn.request("GET", "/baseUrl/partners/:id")

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/partners/:id"

response = requests.get(url)

print(response.json())
library(httr)

url <- "{{baseUrl}}/partners/:id"

response <- VERB("GET", url, content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/partners/: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/partners/:id') do |req|
end

puts response.status
puts response.body
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/partners/: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}}/partners/:id
http GET {{baseUrl}}/partners/:id
wget --quiet \
  --method GET \
  --output-document \
  - {{baseUrl}}/partners/:id
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/partners/: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()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": {
    "message": "Authorization information (Header: %s) is missing or invalid."
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": {
    "message": "Authorization information (Header: %s) is missing or invalid."
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": {
    "message": "Authorization information (Header: %s) is missing or invalid."
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": {
    "message": "Internal Server Error.",
    "trace_id": "664b218f93954a3480cb0ddb8f919c3f"
  }
}
PUT Update a partner
{{baseUrl}}/partners/:id
QUERY PARAMS

id
BODY json

{
  "account_number": "",
  "address": {
    "address": "",
    "city": "",
    "country_code": "",
    "post_code": ""
  },
  "emails": [],
  "general_ledger_number": "",
  "iban": "",
  "name": "",
  "phone": "",
  "swift": "",
  "taxcode": ""
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/partners/: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  \"account_number\": \"\",\n  \"address\": {\n    \"address\": \"\",\n    \"city\": \"\",\n    \"country_code\": \"\",\n    \"post_code\": \"\"\n  },\n  \"emails\": [],\n  \"general_ledger_number\": \"\",\n  \"iban\": \"\",\n  \"name\": \"\",\n  \"phone\": \"\",\n  \"swift\": \"\",\n  \"taxcode\": \"\"\n}");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/put "{{baseUrl}}/partners/:id" {:content-type :json
                                                        :form-params {:account_number ""
                                                                      :address {:address ""
                                                                                :city ""
                                                                                :country_code ""
                                                                                :post_code ""}
                                                                      :emails []
                                                                      :general_ledger_number ""
                                                                      :iban ""
                                                                      :name ""
                                                                      :phone ""
                                                                      :swift ""
                                                                      :taxcode ""}})
require "http/client"

url = "{{baseUrl}}/partners/:id"
headers = HTTP::Headers{
  "content-type" => "application/json"
}
reqBody = "{\n  \"account_number\": \"\",\n  \"address\": {\n    \"address\": \"\",\n    \"city\": \"\",\n    \"country_code\": \"\",\n    \"post_code\": \"\"\n  },\n  \"emails\": [],\n  \"general_ledger_number\": \"\",\n  \"iban\": \"\",\n  \"name\": \"\",\n  \"phone\": \"\",\n  \"swift\": \"\",\n  \"taxcode\": \"\"\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}}/partners/:id"),
    Content = new StringContent("{\n  \"account_number\": \"\",\n  \"address\": {\n    \"address\": \"\",\n    \"city\": \"\",\n    \"country_code\": \"\",\n    \"post_code\": \"\"\n  },\n  \"emails\": [],\n  \"general_ledger_number\": \"\",\n  \"iban\": \"\",\n  \"name\": \"\",\n  \"phone\": \"\",\n  \"swift\": \"\",\n  \"taxcode\": \"\"\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}}/partners/:id");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"account_number\": \"\",\n  \"address\": {\n    \"address\": \"\",\n    \"city\": \"\",\n    \"country_code\": \"\",\n    \"post_code\": \"\"\n  },\n  \"emails\": [],\n  \"general_ledger_number\": \"\",\n  \"iban\": \"\",\n  \"name\": \"\",\n  \"phone\": \"\",\n  \"swift\": \"\",\n  \"taxcode\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/partners/:id"

	payload := strings.NewReader("{\n  \"account_number\": \"\",\n  \"address\": {\n    \"address\": \"\",\n    \"city\": \"\",\n    \"country_code\": \"\",\n    \"post_code\": \"\"\n  },\n  \"emails\": [],\n  \"general_ledger_number\": \"\",\n  \"iban\": \"\",\n  \"name\": \"\",\n  \"phone\": \"\",\n  \"swift\": \"\",\n  \"taxcode\": \"\"\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/partners/:id HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 247

{
  "account_number": "",
  "address": {
    "address": "",
    "city": "",
    "country_code": "",
    "post_code": ""
  },
  "emails": [],
  "general_ledger_number": "",
  "iban": "",
  "name": "",
  "phone": "",
  "swift": "",
  "taxcode": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/partners/:id")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"account_number\": \"\",\n  \"address\": {\n    \"address\": \"\",\n    \"city\": \"\",\n    \"country_code\": \"\",\n    \"post_code\": \"\"\n  },\n  \"emails\": [],\n  \"general_ledger_number\": \"\",\n  \"iban\": \"\",\n  \"name\": \"\",\n  \"phone\": \"\",\n  \"swift\": \"\",\n  \"taxcode\": \"\"\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/partners/:id"))
    .header("content-type", "application/json")
    .method("PUT", HttpRequest.BodyPublishers.ofString("{\n  \"account_number\": \"\",\n  \"address\": {\n    \"address\": \"\",\n    \"city\": \"\",\n    \"country_code\": \"\",\n    \"post_code\": \"\"\n  },\n  \"emails\": [],\n  \"general_ledger_number\": \"\",\n  \"iban\": \"\",\n  \"name\": \"\",\n  \"phone\": \"\",\n  \"swift\": \"\",\n  \"taxcode\": \"\"\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  \"account_number\": \"\",\n  \"address\": {\n    \"address\": \"\",\n    \"city\": \"\",\n    \"country_code\": \"\",\n    \"post_code\": \"\"\n  },\n  \"emails\": [],\n  \"general_ledger_number\": \"\",\n  \"iban\": \"\",\n  \"name\": \"\",\n  \"phone\": \"\",\n  \"swift\": \"\",\n  \"taxcode\": \"\"\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/partners/:id")
  .put(body)
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/partners/:id")
  .header("content-type", "application/json")
  .body("{\n  \"account_number\": \"\",\n  \"address\": {\n    \"address\": \"\",\n    \"city\": \"\",\n    \"country_code\": \"\",\n    \"post_code\": \"\"\n  },\n  \"emails\": [],\n  \"general_ledger_number\": \"\",\n  \"iban\": \"\",\n  \"name\": \"\",\n  \"phone\": \"\",\n  \"swift\": \"\",\n  \"taxcode\": \"\"\n}")
  .asString();
const data = JSON.stringify({
  account_number: '',
  address: {
    address: '',
    city: '',
    country_code: '',
    post_code: ''
  },
  emails: [],
  general_ledger_number: '',
  iban: '',
  name: '',
  phone: '',
  swift: '',
  taxcode: ''
});

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('PUT', '{{baseUrl}}/partners/:id');
xhr.setRequestHeader('content-type', 'application/json');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'PUT',
  url: '{{baseUrl}}/partners/:id',
  headers: {'content-type': 'application/json'},
  data: {
    account_number: '',
    address: {address: '', city: '', country_code: '', post_code: ''},
    emails: [],
    general_ledger_number: '',
    iban: '',
    name: '',
    phone: '',
    swift: '',
    taxcode: ''
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/partners/:id';
const options = {
  method: 'PUT',
  headers: {'content-type': 'application/json'},
  body: '{"account_number":"","address":{"address":"","city":"","country_code":"","post_code":""},"emails":[],"general_ledger_number":"","iban":"","name":"","phone":"","swift":"","taxcode":""}'
};

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}}/partners/:id',
  method: 'PUT',
  headers: {
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "account_number": "",\n  "address": {\n    "address": "",\n    "city": "",\n    "country_code": "",\n    "post_code": ""\n  },\n  "emails": [],\n  "general_ledger_number": "",\n  "iban": "",\n  "name": "",\n  "phone": "",\n  "swift": "",\n  "taxcode": ""\n}'
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n  \"account_number\": \"\",\n  \"address\": {\n    \"address\": \"\",\n    \"city\": \"\",\n    \"country_code\": \"\",\n    \"post_code\": \"\"\n  },\n  \"emails\": [],\n  \"general_ledger_number\": \"\",\n  \"iban\": \"\",\n  \"name\": \"\",\n  \"phone\": \"\",\n  \"swift\": \"\",\n  \"taxcode\": \"\"\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/partners/: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/partners/: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({
  account_number: '',
  address: {address: '', city: '', country_code: '', post_code: ''},
  emails: [],
  general_ledger_number: '',
  iban: '',
  name: '',
  phone: '',
  swift: '',
  taxcode: ''
}));
req.end();
const request = require('request');

const options = {
  method: 'PUT',
  url: '{{baseUrl}}/partners/:id',
  headers: {'content-type': 'application/json'},
  body: {
    account_number: '',
    address: {address: '', city: '', country_code: '', post_code: ''},
    emails: [],
    general_ledger_number: '',
    iban: '',
    name: '',
    phone: '',
    swift: '',
    taxcode: ''
  },
  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}}/partners/:id');

req.headers({
  'content-type': 'application/json'
});

req.type('json');
req.send({
  account_number: '',
  address: {
    address: '',
    city: '',
    country_code: '',
    post_code: ''
  },
  emails: [],
  general_ledger_number: '',
  iban: '',
  name: '',
  phone: '',
  swift: '',
  taxcode: ''
});

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}}/partners/:id',
  headers: {'content-type': 'application/json'},
  data: {
    account_number: '',
    address: {address: '', city: '', country_code: '', post_code: ''},
    emails: [],
    general_ledger_number: '',
    iban: '',
    name: '',
    phone: '',
    swift: '',
    taxcode: ''
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/partners/:id';
const options = {
  method: 'PUT',
  headers: {'content-type': 'application/json'},
  body: '{"account_number":"","address":{"address":"","city":"","country_code":"","post_code":""},"emails":[],"general_ledger_number":"","iban":"","name":"","phone":"","swift":"","taxcode":""}'
};

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 = @{ @"account_number": @"",
                              @"address": @{ @"address": @"", @"city": @"", @"country_code": @"", @"post_code": @"" },
                              @"emails": @[  ],
                              @"general_ledger_number": @"",
                              @"iban": @"",
                              @"name": @"",
                              @"phone": @"",
                              @"swift": @"",
                              @"taxcode": @"" };

NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/partners/: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}}/partners/:id" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n  \"account_number\": \"\",\n  \"address\": {\n    \"address\": \"\",\n    \"city\": \"\",\n    \"country_code\": \"\",\n    \"post_code\": \"\"\n  },\n  \"emails\": [],\n  \"general_ledger_number\": \"\",\n  \"iban\": \"\",\n  \"name\": \"\",\n  \"phone\": \"\",\n  \"swift\": \"\",\n  \"taxcode\": \"\"\n}" in

Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/partners/: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([
    'account_number' => '',
    'address' => [
        'address' => '',
        'city' => '',
        'country_code' => '',
        'post_code' => ''
    ],
    'emails' => [
        
    ],
    'general_ledger_number' => '',
    'iban' => '',
    'name' => '',
    'phone' => '',
    'swift' => '',
    'taxcode' => ''
  ]),
  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}}/partners/:id', [
  'body' => '{
  "account_number": "",
  "address": {
    "address": "",
    "city": "",
    "country_code": "",
    "post_code": ""
  },
  "emails": [],
  "general_ledger_number": "",
  "iban": "",
  "name": "",
  "phone": "",
  "swift": "",
  "taxcode": ""
}',
  'headers' => [
    'content-type' => 'application/json',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/partners/:id');
$request->setMethod(HTTP_METH_PUT);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$request->setContentType('application/json');
$request->setBody(json_encode([
  'account_number' => '',
  'address' => [
    'address' => '',
    'city' => '',
    'country_code' => '',
    'post_code' => ''
  ],
  'emails' => [
    
  ],
  'general_ledger_number' => '',
  'iban' => '',
  'name' => '',
  'phone' => '',
  'swift' => '',
  'taxcode' => ''
]));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'account_number' => '',
  'address' => [
    'address' => '',
    'city' => '',
    'country_code' => '',
    'post_code' => ''
  ],
  'emails' => [
    
  ],
  'general_ledger_number' => '',
  'iban' => '',
  'name' => '',
  'phone' => '',
  'swift' => '',
  'taxcode' => ''
]));
$request->setRequestUrl('{{baseUrl}}/partners/: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}}/partners/:id' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
  "account_number": "",
  "address": {
    "address": "",
    "city": "",
    "country_code": "",
    "post_code": ""
  },
  "emails": [],
  "general_ledger_number": "",
  "iban": "",
  "name": "",
  "phone": "",
  "swift": "",
  "taxcode": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/partners/:id' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
  "account_number": "",
  "address": {
    "address": "",
    "city": "",
    "country_code": "",
    "post_code": ""
  },
  "emails": [],
  "general_ledger_number": "",
  "iban": "",
  "name": "",
  "phone": "",
  "swift": "",
  "taxcode": ""
}'
import http.client

conn = http.client.HTTPSConnection("example.com")

payload = "{\n  \"account_number\": \"\",\n  \"address\": {\n    \"address\": \"\",\n    \"city\": \"\",\n    \"country_code\": \"\",\n    \"post_code\": \"\"\n  },\n  \"emails\": [],\n  \"general_ledger_number\": \"\",\n  \"iban\": \"\",\n  \"name\": \"\",\n  \"phone\": \"\",\n  \"swift\": \"\",\n  \"taxcode\": \"\"\n}"

headers = { 'content-type': "application/json" }

conn.request("PUT", "/baseUrl/partners/:id", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/partners/:id"

payload = {
    "account_number": "",
    "address": {
        "address": "",
        "city": "",
        "country_code": "",
        "post_code": ""
    },
    "emails": [],
    "general_ledger_number": "",
    "iban": "",
    "name": "",
    "phone": "",
    "swift": "",
    "taxcode": ""
}
headers = {"content-type": "application/json"}

response = requests.put(url, json=payload, headers=headers)

print(response.json())
library(httr)

url <- "{{baseUrl}}/partners/:id"

payload <- "{\n  \"account_number\": \"\",\n  \"address\": {\n    \"address\": \"\",\n    \"city\": \"\",\n    \"country_code\": \"\",\n    \"post_code\": \"\"\n  },\n  \"emails\": [],\n  \"general_ledger_number\": \"\",\n  \"iban\": \"\",\n  \"name\": \"\",\n  \"phone\": \"\",\n  \"swift\": \"\",\n  \"taxcode\": \"\"\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}}/partners/: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  \"account_number\": \"\",\n  \"address\": {\n    \"address\": \"\",\n    \"city\": \"\",\n    \"country_code\": \"\",\n    \"post_code\": \"\"\n  },\n  \"emails\": [],\n  \"general_ledger_number\": \"\",\n  \"iban\": \"\",\n  \"name\": \"\",\n  \"phone\": \"\",\n  \"swift\": \"\",\n  \"taxcode\": \"\"\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/partners/:id') do |req|
  req.body = "{\n  \"account_number\": \"\",\n  \"address\": {\n    \"address\": \"\",\n    \"city\": \"\",\n    \"country_code\": \"\",\n    \"post_code\": \"\"\n  },\n  \"emails\": [],\n  \"general_ledger_number\": \"\",\n  \"iban\": \"\",\n  \"name\": \"\",\n  \"phone\": \"\",\n  \"swift\": \"\",\n  \"taxcode\": \"\"\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}}/partners/:id";

    let payload = json!({
        "account_number": "",
        "address": json!({
            "address": "",
            "city": "",
            "country_code": "",
            "post_code": ""
        }),
        "emails": (),
        "general_ledger_number": "",
        "iban": "",
        "name": "",
        "phone": "",
        "swift": "",
        "taxcode": ""
    });

    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}}/partners/:id \
  --header 'content-type: application/json' \
  --data '{
  "account_number": "",
  "address": {
    "address": "",
    "city": "",
    "country_code": "",
    "post_code": ""
  },
  "emails": [],
  "general_ledger_number": "",
  "iban": "",
  "name": "",
  "phone": "",
  "swift": "",
  "taxcode": ""
}'
echo '{
  "account_number": "",
  "address": {
    "address": "",
    "city": "",
    "country_code": "",
    "post_code": ""
  },
  "emails": [],
  "general_ledger_number": "",
  "iban": "",
  "name": "",
  "phone": "",
  "swift": "",
  "taxcode": ""
}' |  \
  http PUT {{baseUrl}}/partners/:id \
  content-type:application/json
wget --quiet \
  --method PUT \
  --header 'content-type: application/json' \
  --body-data '{\n  "account_number": "",\n  "address": {\n    "address": "",\n    "city": "",\n    "country_code": "",\n    "post_code": ""\n  },\n  "emails": [],\n  "general_ledger_number": "",\n  "iban": "",\n  "name": "",\n  "phone": "",\n  "swift": "",\n  "taxcode": ""\n}' \
  --output-document \
  - {{baseUrl}}/partners/:id
import Foundation

let headers = ["content-type": "application/json"]
let parameters = [
  "account_number": "",
  "address": [
    "address": "",
    "city": "",
    "country_code": "",
    "post_code": ""
  ],
  "emails": [],
  "general_ledger_number": "",
  "iban": "",
  "name": "",
  "phone": "",
  "swift": "",
  "taxcode": ""
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/partners/: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()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": {
    "message": "Authorization information (Header: %s) is missing or invalid."
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": {
    "message": "Authorization information (Header: %s) is missing or invalid."
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": {
    "message": "Authorization information (Header: %s) is missing or invalid."
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": {
    "message": "Authorization information (Header: %s) is missing or invalid."
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": {
    "message": "Internal Server Error.",
    "trace_id": "664b218f93954a3480cb0ddb8f919c3f"
  }
}
POST Create a product
{{baseUrl}}/products
BODY json

{
  "comment": "",
  "currency": "",
  "general_ledger_number": "",
  "general_ledger_taxcode": "",
  "id": 0,
  "name": "",
  "net_unit_price": "",
  "unit": "",
  "vat": ""
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/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  \"comment\": \"\",\n  \"currency\": \"\",\n  \"general_ledger_number\": \"\",\n  \"general_ledger_taxcode\": \"\",\n  \"id\": 0,\n  \"name\": \"\",\n  \"net_unit_price\": \"\",\n  \"unit\": \"\",\n  \"vat\": \"\"\n}");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/post "{{baseUrl}}/products" {:content-type :json
                                                     :form-params {:comment ""
                                                                   :currency ""
                                                                   :general_ledger_number ""
                                                                   :general_ledger_taxcode ""
                                                                   :id 0
                                                                   :name ""
                                                                   :net_unit_price ""
                                                                   :unit ""
                                                                   :vat ""}})
require "http/client"

url = "{{baseUrl}}/products"
headers = HTTP::Headers{
  "content-type" => "application/json"
}
reqBody = "{\n  \"comment\": \"\",\n  \"currency\": \"\",\n  \"general_ledger_number\": \"\",\n  \"general_ledger_taxcode\": \"\",\n  \"id\": 0,\n  \"name\": \"\",\n  \"net_unit_price\": \"\",\n  \"unit\": \"\",\n  \"vat\": \"\"\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}}/products"),
    Content = new StringContent("{\n  \"comment\": \"\",\n  \"currency\": \"\",\n  \"general_ledger_number\": \"\",\n  \"general_ledger_taxcode\": \"\",\n  \"id\": 0,\n  \"name\": \"\",\n  \"net_unit_price\": \"\",\n  \"unit\": \"\",\n  \"vat\": \"\"\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}}/products");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"comment\": \"\",\n  \"currency\": \"\",\n  \"general_ledger_number\": \"\",\n  \"general_ledger_taxcode\": \"\",\n  \"id\": 0,\n  \"name\": \"\",\n  \"net_unit_price\": \"\",\n  \"unit\": \"\",\n  \"vat\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/products"

	payload := strings.NewReader("{\n  \"comment\": \"\",\n  \"currency\": \"\",\n  \"general_ledger_number\": \"\",\n  \"general_ledger_taxcode\": \"\",\n  \"id\": 0,\n  \"name\": \"\",\n  \"net_unit_price\": \"\",\n  \"unit\": \"\",\n  \"vat\": \"\"\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/products HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 176

{
  "comment": "",
  "currency": "",
  "general_ledger_number": "",
  "general_ledger_taxcode": "",
  "id": 0,
  "name": "",
  "net_unit_price": "",
  "unit": "",
  "vat": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/products")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"comment\": \"\",\n  \"currency\": \"\",\n  \"general_ledger_number\": \"\",\n  \"general_ledger_taxcode\": \"\",\n  \"id\": 0,\n  \"name\": \"\",\n  \"net_unit_price\": \"\",\n  \"unit\": \"\",\n  \"vat\": \"\"\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/products"))
    .header("content-type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("{\n  \"comment\": \"\",\n  \"currency\": \"\",\n  \"general_ledger_number\": \"\",\n  \"general_ledger_taxcode\": \"\",\n  \"id\": 0,\n  \"name\": \"\",\n  \"net_unit_price\": \"\",\n  \"unit\": \"\",\n  \"vat\": \"\"\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  \"comment\": \"\",\n  \"currency\": \"\",\n  \"general_ledger_number\": \"\",\n  \"general_ledger_taxcode\": \"\",\n  \"id\": 0,\n  \"name\": \"\",\n  \"net_unit_price\": \"\",\n  \"unit\": \"\",\n  \"vat\": \"\"\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/products")
  .post(body)
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/products")
  .header("content-type", "application/json")
  .body("{\n  \"comment\": \"\",\n  \"currency\": \"\",\n  \"general_ledger_number\": \"\",\n  \"general_ledger_taxcode\": \"\",\n  \"id\": 0,\n  \"name\": \"\",\n  \"net_unit_price\": \"\",\n  \"unit\": \"\",\n  \"vat\": \"\"\n}")
  .asString();
const data = JSON.stringify({
  comment: '',
  currency: '',
  general_ledger_number: '',
  general_ledger_taxcode: '',
  id: 0,
  name: '',
  net_unit_price: '',
  unit: '',
  vat: ''
});

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('POST', '{{baseUrl}}/products');
xhr.setRequestHeader('content-type', 'application/json');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'POST',
  url: '{{baseUrl}}/products',
  headers: {'content-type': 'application/json'},
  data: {
    comment: '',
    currency: '',
    general_ledger_number: '',
    general_ledger_taxcode: '',
    id: 0,
    name: '',
    net_unit_price: '',
    unit: '',
    vat: ''
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/products';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"comment":"","currency":"","general_ledger_number":"","general_ledger_taxcode":"","id":0,"name":"","net_unit_price":"","unit":"","vat":""}'
};

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}}/products',
  method: 'POST',
  headers: {
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "comment": "",\n  "currency": "",\n  "general_ledger_number": "",\n  "general_ledger_taxcode": "",\n  "id": 0,\n  "name": "",\n  "net_unit_price": "",\n  "unit": "",\n  "vat": ""\n}'
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n  \"comment\": \"\",\n  \"currency\": \"\",\n  \"general_ledger_number\": \"\",\n  \"general_ledger_taxcode\": \"\",\n  \"id\": 0,\n  \"name\": \"\",\n  \"net_unit_price\": \"\",\n  \"unit\": \"\",\n  \"vat\": \"\"\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/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/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({
  comment: '',
  currency: '',
  general_ledger_number: '',
  general_ledger_taxcode: '',
  id: 0,
  name: '',
  net_unit_price: '',
  unit: '',
  vat: ''
}));
req.end();
const request = require('request');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/products',
  headers: {'content-type': 'application/json'},
  body: {
    comment: '',
    currency: '',
    general_ledger_number: '',
    general_ledger_taxcode: '',
    id: 0,
    name: '',
    net_unit_price: '',
    unit: '',
    vat: ''
  },
  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}}/products');

req.headers({
  'content-type': 'application/json'
});

req.type('json');
req.send({
  comment: '',
  currency: '',
  general_ledger_number: '',
  general_ledger_taxcode: '',
  id: 0,
  name: '',
  net_unit_price: '',
  unit: '',
  vat: ''
});

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}}/products',
  headers: {'content-type': 'application/json'},
  data: {
    comment: '',
    currency: '',
    general_ledger_number: '',
    general_ledger_taxcode: '',
    id: 0,
    name: '',
    net_unit_price: '',
    unit: '',
    vat: ''
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/products';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"comment":"","currency":"","general_ledger_number":"","general_ledger_taxcode":"","id":0,"name":"","net_unit_price":"","unit":"","vat":""}'
};

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 = @{ @"comment": @"",
                              @"currency": @"",
                              @"general_ledger_number": @"",
                              @"general_ledger_taxcode": @"",
                              @"id": @0,
                              @"name": @"",
                              @"net_unit_price": @"",
                              @"unit": @"",
                              @"vat": @"" };

NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/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}}/products" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n  \"comment\": \"\",\n  \"currency\": \"\",\n  \"general_ledger_number\": \"\",\n  \"general_ledger_taxcode\": \"\",\n  \"id\": 0,\n  \"name\": \"\",\n  \"net_unit_price\": \"\",\n  \"unit\": \"\",\n  \"vat\": \"\"\n}" in

Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/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([
    'comment' => '',
    'currency' => '',
    'general_ledger_number' => '',
    'general_ledger_taxcode' => '',
    'id' => 0,
    'name' => '',
    'net_unit_price' => '',
    'unit' => '',
    'vat' => ''
  ]),
  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}}/products', [
  'body' => '{
  "comment": "",
  "currency": "",
  "general_ledger_number": "",
  "general_ledger_taxcode": "",
  "id": 0,
  "name": "",
  "net_unit_price": "",
  "unit": "",
  "vat": ""
}',
  'headers' => [
    'content-type' => 'application/json',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/products');
$request->setMethod(HTTP_METH_POST);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$request->setContentType('application/json');
$request->setBody(json_encode([
  'comment' => '',
  'currency' => '',
  'general_ledger_number' => '',
  'general_ledger_taxcode' => '',
  'id' => 0,
  'name' => '',
  'net_unit_price' => '',
  'unit' => '',
  'vat' => ''
]));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'comment' => '',
  'currency' => '',
  'general_ledger_number' => '',
  'general_ledger_taxcode' => '',
  'id' => 0,
  'name' => '',
  'net_unit_price' => '',
  'unit' => '',
  'vat' => ''
]));
$request->setRequestUrl('{{baseUrl}}/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}}/products' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "comment": "",
  "currency": "",
  "general_ledger_number": "",
  "general_ledger_taxcode": "",
  "id": 0,
  "name": "",
  "net_unit_price": "",
  "unit": "",
  "vat": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/products' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "comment": "",
  "currency": "",
  "general_ledger_number": "",
  "general_ledger_taxcode": "",
  "id": 0,
  "name": "",
  "net_unit_price": "",
  "unit": "",
  "vat": ""
}'
import http.client

conn = http.client.HTTPSConnection("example.com")

payload = "{\n  \"comment\": \"\",\n  \"currency\": \"\",\n  \"general_ledger_number\": \"\",\n  \"general_ledger_taxcode\": \"\",\n  \"id\": 0,\n  \"name\": \"\",\n  \"net_unit_price\": \"\",\n  \"unit\": \"\",\n  \"vat\": \"\"\n}"

headers = { 'content-type': "application/json" }

conn.request("POST", "/baseUrl/products", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/products"

payload = {
    "comment": "",
    "currency": "",
    "general_ledger_number": "",
    "general_ledger_taxcode": "",
    "id": 0,
    "name": "",
    "net_unit_price": "",
    "unit": "",
    "vat": ""
}
headers = {"content-type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
library(httr)

url <- "{{baseUrl}}/products"

payload <- "{\n  \"comment\": \"\",\n  \"currency\": \"\",\n  \"general_ledger_number\": \"\",\n  \"general_ledger_taxcode\": \"\",\n  \"id\": 0,\n  \"name\": \"\",\n  \"net_unit_price\": \"\",\n  \"unit\": \"\",\n  \"vat\": \"\"\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}}/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  \"comment\": \"\",\n  \"currency\": \"\",\n  \"general_ledger_number\": \"\",\n  \"general_ledger_taxcode\": \"\",\n  \"id\": 0,\n  \"name\": \"\",\n  \"net_unit_price\": \"\",\n  \"unit\": \"\",\n  \"vat\": \"\"\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/products') do |req|
  req.body = "{\n  \"comment\": \"\",\n  \"currency\": \"\",\n  \"general_ledger_number\": \"\",\n  \"general_ledger_taxcode\": \"\",\n  \"id\": 0,\n  \"name\": \"\",\n  \"net_unit_price\": \"\",\n  \"unit\": \"\",\n  \"vat\": \"\"\n}"
end

puts response.status
puts response.body
use serde_json::json;
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/products";

    let payload = json!({
        "comment": "",
        "currency": "",
        "general_ledger_number": "",
        "general_ledger_taxcode": "",
        "id": 0,
        "name": "",
        "net_unit_price": "",
        "unit": "",
        "vat": ""
    });

    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}}/products \
  --header 'content-type: application/json' \
  --data '{
  "comment": "",
  "currency": "",
  "general_ledger_number": "",
  "general_ledger_taxcode": "",
  "id": 0,
  "name": "",
  "net_unit_price": "",
  "unit": "",
  "vat": ""
}'
echo '{
  "comment": "",
  "currency": "",
  "general_ledger_number": "",
  "general_ledger_taxcode": "",
  "id": 0,
  "name": "",
  "net_unit_price": "",
  "unit": "",
  "vat": ""
}' |  \
  http POST {{baseUrl}}/products \
  content-type:application/json
wget --quiet \
  --method POST \
  --header 'content-type: application/json' \
  --body-data '{\n  "comment": "",\n  "currency": "",\n  "general_ledger_number": "",\n  "general_ledger_taxcode": "",\n  "id": 0,\n  "name": "",\n  "net_unit_price": "",\n  "unit": "",\n  "vat": ""\n}' \
  --output-document \
  - {{baseUrl}}/products
import Foundation

let headers = ["content-type": "application/json"]
let parameters = [
  "comment": "",
  "currency": "",
  "general_ledger_number": "",
  "general_ledger_taxcode": "",
  "id": 0,
  "name": "",
  "net_unit_price": "",
  "unit": "",
  "vat": ""
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/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()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": {
    "message": "Authorization information (Header: %s) is missing or invalid."
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": {
    "message": "Authorization information (Header: %s) is missing or invalid."
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": {
    "message": "Authorization information (Header: %s) is missing or invalid."
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": {
    "message": "Internal Server Error.",
    "trace_id": "664b218f93954a3480cb0ddb8f919c3f"
  }
}
DELETE Delete a product
{{baseUrl}}/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}}/products/:id");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/delete "{{baseUrl}}/products/:id")
require "http/client"

url = "{{baseUrl}}/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}}/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}}/products/:id");
var request = new RestRequest("", Method.Delete);
var response = client.Execute(request);
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/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/products/:id HTTP/1.1
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/products/:id")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/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}}/products/:id")
  .delete(null)
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/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}}/products/:id');

xhr.send(data);
import axios from 'axios';

const options = {method: 'DELETE', url: '{{baseUrl}}/products/:id'};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/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}}/products/:id',
  method: 'DELETE',
  headers: {}
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/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/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}}/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}}/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}}/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}}/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}}/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}}/products/:id" in

Client.call `DELETE uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/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}}/products/:id');

echo $response->getBody();
setUrl('{{baseUrl}}/products/:id');
$request->setMethod(HTTP_METH_DELETE);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/products/:id');
$request->setRequestMethod('DELETE');
$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/products/:id' -Method DELETE 
$response = Invoke-RestMethod -Uri '{{baseUrl}}/products/:id' -Method DELETE 
import http.client

conn = http.client.HTTPSConnection("example.com")

conn.request("DELETE", "/baseUrl/products/:id")

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/products/:id"

response = requests.delete(url)

print(response.json())
library(httr)

url <- "{{baseUrl}}/products/:id"

response <- VERB("DELETE", url, content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/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/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}}/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}}/products/:id
http DELETE {{baseUrl}}/products/:id
wget --quiet \
  --method DELETE \
  --output-document \
  - {{baseUrl}}/products/:id
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/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()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": {
    "message": "Authorization information (Header: %s) is missing or invalid."
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": {
    "message": "Authorization information (Header: %s) is missing or invalid."
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": {
    "message": "Authorization information (Header: %s) is missing or invalid."
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": {
    "message": "Authorization information (Header: %s) is missing or invalid."
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": {
    "message": "Internal Server Error.",
    "trace_id": "664b218f93954a3480cb0ddb8f919c3f"
  }
}
GET List all product
{{baseUrl}}/products
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/products");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/get "{{baseUrl}}/products")
require "http/client"

url = "{{baseUrl}}/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}}/products"),
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/products");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/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/products HTTP/1.1
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/products")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/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}}/products")
  .get()
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/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}}/products');

xhr.send(data);
import axios from 'axios';

const options = {method: 'GET', url: '{{baseUrl}}/products'};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/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}}/products',
  method: 'GET',
  headers: {}
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/products")
  .get()
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'GET',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/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}}/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}}/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}}/products'};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/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}}/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}}/products" in

Client.call `GET uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/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}}/products');

echo $response->getBody();
setUrl('{{baseUrl}}/products');
$request->setMethod(HTTP_METH_GET);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/products');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/products' -Method GET 
$response = Invoke-RestMethod -Uri '{{baseUrl}}/products' -Method GET 
import http.client

conn = http.client.HTTPSConnection("example.com")

conn.request("GET", "/baseUrl/products")

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/products"

response = requests.get(url)

print(response.json())
library(httr)

url <- "{{baseUrl}}/products"

response <- VERB("GET", url, content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/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/products') do |req|
end

puts response.status
puts response.body
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/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}}/products
http GET {{baseUrl}}/products
wget --quiet \
  --method GET \
  --output-document \
  - {{baseUrl}}/products
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/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()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": {
    "message": "Authorization information (Header: %s) is missing or invalid."
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": {
    "message": "Authorization information (Header: %s) is missing or invalid."
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": {
    "message": "Internal Server Error.",
    "trace_id": "664b218f93954a3480cb0ddb8f919c3f"
  }
}
GET Retrieve a product
{{baseUrl}}/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}}/products/:id");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/get "{{baseUrl}}/products/:id")
require "http/client"

url = "{{baseUrl}}/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}}/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}}/products/:id");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/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/products/:id HTTP/1.1
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/products/:id")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/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}}/products/:id")
  .get()
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/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}}/products/:id');

xhr.send(data);
import axios from 'axios';

const options = {method: 'GET', url: '{{baseUrl}}/products/:id'};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/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}}/products/:id',
  method: 'GET',
  headers: {}
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/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/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}}/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}}/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}}/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}}/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}}/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}}/products/:id" in

Client.call `GET uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/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}}/products/:id');

echo $response->getBody();
setUrl('{{baseUrl}}/products/:id');
$request->setMethod(HTTP_METH_GET);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/products/:id');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/products/:id' -Method GET 
$response = Invoke-RestMethod -Uri '{{baseUrl}}/products/:id' -Method GET 
import http.client

conn = http.client.HTTPSConnection("example.com")

conn.request("GET", "/baseUrl/products/:id")

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/products/:id"

response = requests.get(url)

print(response.json())
library(httr)

url <- "{{baseUrl}}/products/:id"

response <- VERB("GET", url, content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/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/products/:id') do |req|
end

puts response.status
puts response.body
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/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}}/products/:id
http GET {{baseUrl}}/products/:id
wget --quiet \
  --method GET \
  --output-document \
  - {{baseUrl}}/products/:id
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/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()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": {
    "message": "Authorization information (Header: %s) is missing or invalid."
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": {
    "message": "Authorization information (Header: %s) is missing or invalid."
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": {
    "message": "Authorization information (Header: %s) is missing or invalid."
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": {
    "message": "Internal Server Error.",
    "trace_id": "664b218f93954a3480cb0ddb8f919c3f"
  }
}
PUT Update a product
{{baseUrl}}/products/:id
QUERY PARAMS

id
BODY json

{
  "comment": "",
  "currency": "",
  "general_ledger_number": "",
  "general_ledger_taxcode": "",
  "id": 0,
  "name": "",
  "net_unit_price": "",
  "unit": "",
  "vat": ""
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/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, "{\n  \"comment\": \"\",\n  \"currency\": \"\",\n  \"general_ledger_number\": \"\",\n  \"general_ledger_taxcode\": \"\",\n  \"id\": 0,\n  \"name\": \"\",\n  \"net_unit_price\": \"\",\n  \"unit\": \"\",\n  \"vat\": \"\"\n}");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/put "{{baseUrl}}/products/:id" {:content-type :json
                                                        :form-params {:comment ""
                                                                      :currency ""
                                                                      :general_ledger_number ""
                                                                      :general_ledger_taxcode ""
                                                                      :id 0
                                                                      :name ""
                                                                      :net_unit_price ""
                                                                      :unit ""
                                                                      :vat ""}})
require "http/client"

url = "{{baseUrl}}/products/:id"
headers = HTTP::Headers{
  "content-type" => "application/json"
}
reqBody = "{\n  \"comment\": \"\",\n  \"currency\": \"\",\n  \"general_ledger_number\": \"\",\n  \"general_ledger_taxcode\": \"\",\n  \"id\": 0,\n  \"name\": \"\",\n  \"net_unit_price\": \"\",\n  \"unit\": \"\",\n  \"vat\": \"\"\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}}/products/:id"),
    Content = new StringContent("{\n  \"comment\": \"\",\n  \"currency\": \"\",\n  \"general_ledger_number\": \"\",\n  \"general_ledger_taxcode\": \"\",\n  \"id\": 0,\n  \"name\": \"\",\n  \"net_unit_price\": \"\",\n  \"unit\": \"\",\n  \"vat\": \"\"\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}}/products/:id");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"comment\": \"\",\n  \"currency\": \"\",\n  \"general_ledger_number\": \"\",\n  \"general_ledger_taxcode\": \"\",\n  \"id\": 0,\n  \"name\": \"\",\n  \"net_unit_price\": \"\",\n  \"unit\": \"\",\n  \"vat\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/products/:id"

	payload := strings.NewReader("{\n  \"comment\": \"\",\n  \"currency\": \"\",\n  \"general_ledger_number\": \"\",\n  \"general_ledger_taxcode\": \"\",\n  \"id\": 0,\n  \"name\": \"\",\n  \"net_unit_price\": \"\",\n  \"unit\": \"\",\n  \"vat\": \"\"\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/products/:id HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 176

{
  "comment": "",
  "currency": "",
  "general_ledger_number": "",
  "general_ledger_taxcode": "",
  "id": 0,
  "name": "",
  "net_unit_price": "",
  "unit": "",
  "vat": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/products/:id")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"comment\": \"\",\n  \"currency\": \"\",\n  \"general_ledger_number\": \"\",\n  \"general_ledger_taxcode\": \"\",\n  \"id\": 0,\n  \"name\": \"\",\n  \"net_unit_price\": \"\",\n  \"unit\": \"\",\n  \"vat\": \"\"\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/products/:id"))
    .header("content-type", "application/json")
    .method("PUT", HttpRequest.BodyPublishers.ofString("{\n  \"comment\": \"\",\n  \"currency\": \"\",\n  \"general_ledger_number\": \"\",\n  \"general_ledger_taxcode\": \"\",\n  \"id\": 0,\n  \"name\": \"\",\n  \"net_unit_price\": \"\",\n  \"unit\": \"\",\n  \"vat\": \"\"\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  \"comment\": \"\",\n  \"currency\": \"\",\n  \"general_ledger_number\": \"\",\n  \"general_ledger_taxcode\": \"\",\n  \"id\": 0,\n  \"name\": \"\",\n  \"net_unit_price\": \"\",\n  \"unit\": \"\",\n  \"vat\": \"\"\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/products/:id")
  .put(body)
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/products/:id")
  .header("content-type", "application/json")
  .body("{\n  \"comment\": \"\",\n  \"currency\": \"\",\n  \"general_ledger_number\": \"\",\n  \"general_ledger_taxcode\": \"\",\n  \"id\": 0,\n  \"name\": \"\",\n  \"net_unit_price\": \"\",\n  \"unit\": \"\",\n  \"vat\": \"\"\n}")
  .asString();
const data = JSON.stringify({
  comment: '',
  currency: '',
  general_ledger_number: '',
  general_ledger_taxcode: '',
  id: 0,
  name: '',
  net_unit_price: '',
  unit: '',
  vat: ''
});

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('PUT', '{{baseUrl}}/products/:id');
xhr.setRequestHeader('content-type', 'application/json');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'PUT',
  url: '{{baseUrl}}/products/:id',
  headers: {'content-type': 'application/json'},
  data: {
    comment: '',
    currency: '',
    general_ledger_number: '',
    general_ledger_taxcode: '',
    id: 0,
    name: '',
    net_unit_price: '',
    unit: '',
    vat: ''
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/products/:id';
const options = {
  method: 'PUT',
  headers: {'content-type': 'application/json'},
  body: '{"comment":"","currency":"","general_ledger_number":"","general_ledger_taxcode":"","id":0,"name":"","net_unit_price":"","unit":"","vat":""}'
};

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}}/products/:id',
  method: 'PUT',
  headers: {
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "comment": "",\n  "currency": "",\n  "general_ledger_number": "",\n  "general_ledger_taxcode": "",\n  "id": 0,\n  "name": "",\n  "net_unit_price": "",\n  "unit": "",\n  "vat": ""\n}'
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n  \"comment\": \"\",\n  \"currency\": \"\",\n  \"general_ledger_number\": \"\",\n  \"general_ledger_taxcode\": \"\",\n  \"id\": 0,\n  \"name\": \"\",\n  \"net_unit_price\": \"\",\n  \"unit\": \"\",\n  \"vat\": \"\"\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/products/: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/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({
  comment: '',
  currency: '',
  general_ledger_number: '',
  general_ledger_taxcode: '',
  id: 0,
  name: '',
  net_unit_price: '',
  unit: '',
  vat: ''
}));
req.end();
const request = require('request');

const options = {
  method: 'PUT',
  url: '{{baseUrl}}/products/:id',
  headers: {'content-type': 'application/json'},
  body: {
    comment: '',
    currency: '',
    general_ledger_number: '',
    general_ledger_taxcode: '',
    id: 0,
    name: '',
    net_unit_price: '',
    unit: '',
    vat: ''
  },
  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}}/products/:id');

req.headers({
  'content-type': 'application/json'
});

req.type('json');
req.send({
  comment: '',
  currency: '',
  general_ledger_number: '',
  general_ledger_taxcode: '',
  id: 0,
  name: '',
  net_unit_price: '',
  unit: '',
  vat: ''
});

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}}/products/:id',
  headers: {'content-type': 'application/json'},
  data: {
    comment: '',
    currency: '',
    general_ledger_number: '',
    general_ledger_taxcode: '',
    id: 0,
    name: '',
    net_unit_price: '',
    unit: '',
    vat: ''
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/products/:id';
const options = {
  method: 'PUT',
  headers: {'content-type': 'application/json'},
  body: '{"comment":"","currency":"","general_ledger_number":"","general_ledger_taxcode":"","id":0,"name":"","net_unit_price":"","unit":"","vat":""}'
};

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 = @{ @"comment": @"",
                              @"currency": @"",
                              @"general_ledger_number": @"",
                              @"general_ledger_taxcode": @"",
                              @"id": @0,
                              @"name": @"",
                              @"net_unit_price": @"",
                              @"unit": @"",
                              @"vat": @"" };

NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/products/: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}}/products/:id" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n  \"comment\": \"\",\n  \"currency\": \"\",\n  \"general_ledger_number\": \"\",\n  \"general_ledger_taxcode\": \"\",\n  \"id\": 0,\n  \"name\": \"\",\n  \"net_unit_price\": \"\",\n  \"unit\": \"\",\n  \"vat\": \"\"\n}" in

Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/products/: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([
    'comment' => '',
    'currency' => '',
    'general_ledger_number' => '',
    'general_ledger_taxcode' => '',
    'id' => 0,
    'name' => '',
    'net_unit_price' => '',
    'unit' => '',
    'vat' => ''
  ]),
  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}}/products/:id', [
  'body' => '{
  "comment": "",
  "currency": "",
  "general_ledger_number": "",
  "general_ledger_taxcode": "",
  "id": 0,
  "name": "",
  "net_unit_price": "",
  "unit": "",
  "vat": ""
}',
  'headers' => [
    'content-type' => 'application/json',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/products/:id');
$request->setMethod(HTTP_METH_PUT);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$request->setContentType('application/json');
$request->setBody(json_encode([
  'comment' => '',
  'currency' => '',
  'general_ledger_number' => '',
  'general_ledger_taxcode' => '',
  'id' => 0,
  'name' => '',
  'net_unit_price' => '',
  'unit' => '',
  'vat' => ''
]));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'comment' => '',
  'currency' => '',
  'general_ledger_number' => '',
  'general_ledger_taxcode' => '',
  'id' => 0,
  'name' => '',
  'net_unit_price' => '',
  'unit' => '',
  'vat' => ''
]));
$request->setRequestUrl('{{baseUrl}}/products/: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}}/products/:id' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
  "comment": "",
  "currency": "",
  "general_ledger_number": "",
  "general_ledger_taxcode": "",
  "id": 0,
  "name": "",
  "net_unit_price": "",
  "unit": "",
  "vat": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/products/:id' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
  "comment": "",
  "currency": "",
  "general_ledger_number": "",
  "general_ledger_taxcode": "",
  "id": 0,
  "name": "",
  "net_unit_price": "",
  "unit": "",
  "vat": ""
}'
import http.client

conn = http.client.HTTPSConnection("example.com")

payload = "{\n  \"comment\": \"\",\n  \"currency\": \"\",\n  \"general_ledger_number\": \"\",\n  \"general_ledger_taxcode\": \"\",\n  \"id\": 0,\n  \"name\": \"\",\n  \"net_unit_price\": \"\",\n  \"unit\": \"\",\n  \"vat\": \"\"\n}"

headers = { 'content-type': "application/json" }

conn.request("PUT", "/baseUrl/products/:id", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/products/:id"

payload = {
    "comment": "",
    "currency": "",
    "general_ledger_number": "",
    "general_ledger_taxcode": "",
    "id": 0,
    "name": "",
    "net_unit_price": "",
    "unit": "",
    "vat": ""
}
headers = {"content-type": "application/json"}

response = requests.put(url, json=payload, headers=headers)

print(response.json())
library(httr)

url <- "{{baseUrl}}/products/:id"

payload <- "{\n  \"comment\": \"\",\n  \"currency\": \"\",\n  \"general_ledger_number\": \"\",\n  \"general_ledger_taxcode\": \"\",\n  \"id\": 0,\n  \"name\": \"\",\n  \"net_unit_price\": \"\",\n  \"unit\": \"\",\n  \"vat\": \"\"\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}}/products/: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  \"comment\": \"\",\n  \"currency\": \"\",\n  \"general_ledger_number\": \"\",\n  \"general_ledger_taxcode\": \"\",\n  \"id\": 0,\n  \"name\": \"\",\n  \"net_unit_price\": \"\",\n  \"unit\": \"\",\n  \"vat\": \"\"\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/products/:id') do |req|
  req.body = "{\n  \"comment\": \"\",\n  \"currency\": \"\",\n  \"general_ledger_number\": \"\",\n  \"general_ledger_taxcode\": \"\",\n  \"id\": 0,\n  \"name\": \"\",\n  \"net_unit_price\": \"\",\n  \"unit\": \"\",\n  \"vat\": \"\"\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}}/products/:id";

    let payload = json!({
        "comment": "",
        "currency": "",
        "general_ledger_number": "",
        "general_ledger_taxcode": "",
        "id": 0,
        "name": "",
        "net_unit_price": "",
        "unit": "",
        "vat": ""
    });

    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}}/products/:id \
  --header 'content-type: application/json' \
  --data '{
  "comment": "",
  "currency": "",
  "general_ledger_number": "",
  "general_ledger_taxcode": "",
  "id": 0,
  "name": "",
  "net_unit_price": "",
  "unit": "",
  "vat": ""
}'
echo '{
  "comment": "",
  "currency": "",
  "general_ledger_number": "",
  "general_ledger_taxcode": "",
  "id": 0,
  "name": "",
  "net_unit_price": "",
  "unit": "",
  "vat": ""
}' |  \
  http PUT {{baseUrl}}/products/:id \
  content-type:application/json
wget --quiet \
  --method PUT \
  --header 'content-type: application/json' \
  --body-data '{\n  "comment": "",\n  "currency": "",\n  "general_ledger_number": "",\n  "general_ledger_taxcode": "",\n  "id": 0,\n  "name": "",\n  "net_unit_price": "",\n  "unit": "",\n  "vat": ""\n}' \
  --output-document \
  - {{baseUrl}}/products/:id
import Foundation

let headers = ["content-type": "application/json"]
let parameters = [
  "comment": "",
  "currency": "",
  "general_ledger_number": "",
  "general_ledger_taxcode": "",
  "id": 0,
  "name": "",
  "net_unit_price": "",
  "unit": "",
  "vat": ""
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/products/: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()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": {
    "message": "Authorization information (Header: %s) is missing or invalid."
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": {
    "message": "Authorization information (Header: %s) is missing or invalid."
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": {
    "message": "Authorization information (Header: %s) is missing or invalid."
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": {
    "message": "Authorization information (Header: %s) is missing or invalid."
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": {
    "message": "Internal Server Error.",
    "trace_id": "664b218f93954a3480cb0ddb8f919c3f"
  }
}
GET Convert legacy ID to v3 ID.
{{baseUrl}}/utils/convert-legacy-id/: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}}/utils/convert-legacy-id/:id");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/get "{{baseUrl}}/utils/convert-legacy-id/:id")
require "http/client"

url = "{{baseUrl}}/utils/convert-legacy-id/: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}}/utils/convert-legacy-id/:id"),
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/utils/convert-legacy-id/:id");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/utils/convert-legacy-id/: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/utils/convert-legacy-id/:id HTTP/1.1
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/utils/convert-legacy-id/:id")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/utils/convert-legacy-id/: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}}/utils/convert-legacy-id/:id")
  .get()
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/utils/convert-legacy-id/: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}}/utils/convert-legacy-id/:id');

xhr.send(data);
import axios from 'axios';

const options = {method: 'GET', url: '{{baseUrl}}/utils/convert-legacy-id/:id'};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/utils/convert-legacy-id/: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}}/utils/convert-legacy-id/:id',
  method: 'GET',
  headers: {}
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/utils/convert-legacy-id/:id")
  .get()
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'GET',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/utils/convert-legacy-id/: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}}/utils/convert-legacy-id/: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}}/utils/convert-legacy-id/: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}}/utils/convert-legacy-id/:id'};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/utils/convert-legacy-id/: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}}/utils/convert-legacy-id/: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}}/utils/convert-legacy-id/:id" in

Client.call `GET uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/utils/convert-legacy-id/: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}}/utils/convert-legacy-id/:id');

echo $response->getBody();
setUrl('{{baseUrl}}/utils/convert-legacy-id/:id');
$request->setMethod(HTTP_METH_GET);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/utils/convert-legacy-id/:id');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/utils/convert-legacy-id/:id' -Method GET 
$response = Invoke-RestMethod -Uri '{{baseUrl}}/utils/convert-legacy-id/:id' -Method GET 
import http.client

conn = http.client.HTTPSConnection("example.com")

conn.request("GET", "/baseUrl/utils/convert-legacy-id/:id")

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/utils/convert-legacy-id/:id"

response = requests.get(url)

print(response.json())
library(httr)

url <- "{{baseUrl}}/utils/convert-legacy-id/:id"

response <- VERB("GET", url, content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/utils/convert-legacy-id/: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/utils/convert-legacy-id/:id') do |req|
end

puts response.status
puts response.body
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/utils/convert-legacy-id/: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}}/utils/convert-legacy-id/:id
http GET {{baseUrl}}/utils/convert-legacy-id/:id
wget --quiet \
  --method GET \
  --output-document \
  - {{baseUrl}}/utils/convert-legacy-id/:id
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/utils/convert-legacy-id/: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()
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": {
    "message": "Authorization information (Header: %s) is missing or invalid."
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": {
    "message": "Authorization information (Header: %s) is missing or invalid."
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": {
    "message": "Authorization information (Header: %s) is missing or invalid."
  }
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": {
    "message": "Internal Server Error.",
    "trace_id": "664b218f93954a3480cb0ddb8f919c3f"
  }
}